diff --git a/src/.gitignore b/src/.gitignore
index 93ca83f..8b13789 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1 +1 @@
-/scmpub/
+
diff --git a/src/dm/dm/apinvoice/const/cardBtn_const.js b/src/dm/dm/apinvoice/const/cardBtn_const.js
new file mode 100644
index 0000000..7b5c6ab
--- /dev/null
+++ b/src/dm/dm/apinvoice/const/cardBtn_const.js
@@ -0,0 +1,197 @@
+/*2vwrMN+vXPwuy77iumaX/nq5blftyOiZPaQeDJhE6PA=*/
+/*
+ * @Author: 刘奇
+ * @PageInfo: 卡片态按钮控制常量类
+ * @Date: 2019-03-07 18:28:28
+ * @Last Modified by: zhangmi
+ * @Last Modified time: 2021-07-28 16:50:12
+ */
+
+import { BUTTON } from './const';
+// 卡片浏览态表头显示的全部按钮
+const CARD_HEAD_ALL_ALLACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.edit,
+ BUTTON.delete,
+ BUTTON.copy,
+ BUTTON.commit,
+ BUTTON.save,
+ BUTTON.refLine,
+ BUTTON.cancel,
+ BUTTON.saveCommit,
+ BUTTON.unCommit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.verify,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh,
+ BUTTON.approveInfo
+];
+
+// 卡片浏览态自由态表头显示的按钮
+const CARD_HEAD_BROWSE_FREE_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.edit,
+ BUTTON.delete,
+ BUTTON.copy,
+ BUTTON.commit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.verify,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh,
+ BUTTON.approveInfo
+];
+
+// 卡片浏览态审批中表头显示的按钮
+const CARD_HEAD_BROWSE_APPROVING_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.copy,
+ BUTTON.unCommit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.verify,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh,
+ BUTTON.approveInfo
+];
+
+// 卡片浏览态审批通过表头显示的按钮
+const CARD_HEAD_BROWSE_AUDIT_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.copy,
+ BUTTON.unCommit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.verify,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh,
+ BUTTON.approveInfo
+];
+// 卡片浏览态关闭表头显示的按钮
+const CARD_HEAD_BROWSE_CLOSED_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.copy,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.verify,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh
+];
+// 卡片浏览态审批不通过表头显示的按钮
+const CARD_HEAD_BROWSE_NOPASS_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.edit,
+ BUTTON.delete,
+ BUTTON.copy,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.verify,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh,
+ BUTTON.approveInfo
+];
+
+const CARD_HEAD_EDIT_ACTIONS = [ BUTTON.save, BUTTON.saveCommit, BUTTON.cancel ];
+
+const CARD_HEAD_REF_ACTIONS = [ BUTTON.addGroup, BUTTON.copy ];
+const CARD_HEAD_STATUS_ACTIONS = {
+ // 所有
+ ALL: CARD_HEAD_ALL_ALLACTIONS,
+ // 自由态
+ I_FREE: CARD_HEAD_BROWSE_FREE_ACTIONS,
+ // 审批不通过
+ I_NOPASS: CARD_HEAD_BROWSE_NOPASS_ACTIONS,
+ // 审批中
+ I_AUDITING: CARD_HEAD_BROWSE_APPROVING_ACTIONS,
+ // 审批通过
+ I_AUDIT: CARD_HEAD_BROWSE_AUDIT_ACTIONS,
+ //关闭
+ I_CLOSED: CARD_HEAD_BROWSE_CLOSED_ACTIONS,
+ // 编辑态
+ EDIT: CARD_HEAD_EDIT_ACTIONS,
+ // 转单浏览态不显示的按钮
+ REF: CARD_HEAD_REF_ACTIONS
+};
+
+// 卡片肩部全的按钮
+const CARD_BODY_ALL_BUTTONS = [
+ BUTTON.addLine,
+ BUTTON.deleteLine,
+ BUTTON.DeleteLine_Verify,
+ BUTTON.copyLine,
+ BUTTON.resetRowNo,
+ BUTTON.canelCopy,
+ BUTTON.pasteLineToTail
+];
+// 卡片编辑态,肩部显示的按钮
+const CARD_BODY_EDIT_BUTTONS = [ BUTTON.addLine, BUTTON.deleteLine, BUTTON.copyLine, BUTTON.resetRowNo ];
+// 卡片复制时,肩部显示的按钮
+const CARD_BODY_PASTE_BUTTONS = [ BUTTON.canelCopy, BUTTON.pasteLineToTail ];
+// 卡片浏览态,肩部显示的按钮
+const CARD_BODY_BROWSE_BUTTONS = [];
+// 卡片编辑态,表体没数据时可用的按钮
+const CARD_BODY_NOROW_BUTTONS = [ BUTTON.addLine ];
+// 卡片编辑态,表体有数据没选中时可用的按钮
+const CARD_BODY_NOSELECT_BUTTONS = [ BUTTON.addLine, BUTTON.resetRowNo ];
+
+const CARD_BODY_BUTTONS = {
+ ALL: CARD_BODY_ALL_BUTTONS,
+ EDIT: CARD_BODY_EDIT_BUTTONS,
+ PASTE: CARD_BODY_PASTE_BUTTONS,
+ BROWSE: CARD_BODY_BROWSE_BUTTONS,
+ NOROW: CARD_BODY_NOROW_BUTTONS,
+ NOSELECT: CARD_BODY_NOSELECT_BUTTONS
+};
+// 卡片浏览态,操作列显示的按钮
+const CARD_BODY_INNER_BROWSE_BUTTONS = [ BUTTON.spread ];
+
+// 卡片编辑态,操作列显示的按钮
+const CARD_BODY_INNER_EDIT_BUTTONS = [
+ BUTTON.spread,
+ BUTTON.deleteLine,
+ BUTTON.copyLine,
+ BUTTON.insertLine,
+ BUTTON.DeleteLine_Verify
+];
+// 卡片复制,操作列显示的按钮
+const CARD_BODY_INNER_COPY_BUTTONS = [ BUTTON.pasteLine, BUTTON.DeleteLine_Verify ];
+
+const CARD_BODY_INNER_BUTTONS = {
+ EDIT: CARD_BODY_INNER_EDIT_BUTTONS,
+ BROWSE: CARD_BODY_INNER_BROWSE_BUTTONS,
+ COPY: CARD_BODY_INNER_COPY_BUTTONS
+};
+export { CARD_BODY_BUTTONS, CARD_BODY_INNER_BUTTONS, CARD_HEAD_STATUS_ACTIONS };
+
+/*2vwrMN+vXPwuy77iumaX/nq5blftyOiZPaQeDJhE6PA=*/
\ No newline at end of file
diff --git a/src/dm/dm/apinvoice/const/const.js b/src/dm/dm/apinvoice/const/const.js
new file mode 100644
index 0000000..7572e84
--- /dev/null
+++ b/src/dm/dm/apinvoice/const/const.js
@@ -0,0 +1,195 @@
+/*D3odMZWVuLtxYck7qMUaMgmVOyvcchnTDZ2EVgk+abY=*/
+/*
+ * @Author: 刘奇
+ * @PageInfo: 应付运费发票常量类
+ * @Date: 2019-03-30 10:42:31
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 13:32:50
+ */
+
+const APINVOICE_CONST = {
+ PINVOICECacheKey: 'scm.scmpub.apinvoice.cachekey',
+ formId: 'head', //表头区域
+ tableId: 'body', //表体区域
+ dm_verifydetail: 'dm_verifydetail', //核销明细,
+ bodyIds: [ 'body', 'dm_verifydetail' ],
+ left: 'left',
+ side: 'childform2', // 侧拉
+ cardPageId: '401400808_card', //卡片pagecode
+ listPageId: '401400808_list', //列表pagecode
+ ref4804PageId: '401400404_4804to4812', //运输单拉单pagecode
+ ref4808PageId: '401400804_4808to4812', //运费结算单拉单pagecode
+ searchId: 'search',
+ moduleId: '4014', //模块id
+ browse: 'browse', //状态
+ edit: 'edit',
+ add: 'add',
+ copy: 'copy',
+ output: 'output',
+ Card_URL: '/card',
+ List_URL: '/list',
+ Ref4804_URL: '/ref4804',
+ Ref4808_URL: '/ref4808',
+ AddSettle: '/addsettle',
+ editUrl: '/nccloud/dm/apinvoice/edit.do',
+ saveUrl: '/nccloud/dm/apinvoice/save.do',
+ saveCommitUrl: '/nccloud/dm/apinvoice/savecommit.do',
+ queryListUrl: '/nccloud/dm/apinvoice/query.do',
+ queryForPage: '/nccloud/dm/apinvoice/queryForPage.do',
+ queryCardUrl: '/nccloud/dm/apinvoice/querycard.do',
+ queryDetailUrl: '/nccloud/dm/apinvoice/querydetail.do',
+ transfer4804Url: '/nccloud/dm/apinvoice/transfer4804.do',
+ transfer4808Url: '/nccloud/dm/apinvoice/transfer4808.do',
+ refAddLine: '/nccloud/dm/apinvoice/refAddLine.do',
+ // 打印
+ printUrl: '/nccloud/dm/apinvoice/print.do',
+ printdatapermission: '/nccloud/dm/apinvoice/printpermission.do', //打印权限校验
+ headbefore: '/nccloud/dm/apinvoice/headbefore.do', //表头编辑前
+ headafter: '/nccloud/dm/apinvoice/headafter.do', //表头编辑后
+ bodyrowafter: '/nccloud/dm/apinvoice/bodyrowafter.do', //增行事件
+ bodyafter: '/nccloud/dm/apinvoice/bodyafter.do', //表体行编辑后
+ deleteUrl: '/nccloud/dm/apinvoice/delete.do', //删除
+ //列表
+ listbillopenUrl: '/nccloud/dm/apinvoice/listbillopen.do', //整单打开
+ listbillcloseUrl: '/nccloud/dm/apinvoice/listbillclose.do', //整单关闭
+ listcommitUrl: '/nccloud/dm/apinvoice/batchcommit.do', // 提交
+ listuncommitUrl: '/nccloud/dm/apinvoice/batchuncommit.do', // 收回
+ //卡片
+ cardbillopenUrl: '/nccloud/dm/apinvoice/cardbillopen.do', //整单打开
+ cardbillcloseUrl: '/nccloud/dm/apinvoice/cardbillclose.do', //整单关闭
+ cardcommitUrl: '/nccloud/dm/apinvoice/commit.do', // 提交
+ carduncommitUrl: '/nccloud/dm/apinvoice/uncommit.do', // 收回
+ link4808Url: '/nccloud/dm/apinvoice/linkapsttle.do', // 联查
+ delLineForVerifyUrl: '/nccloud/dm/apinvoice/dellineforverify.do',
+ copybillUrl: '/nccloud/dm/apinvoice/copybill.do', //复制
+ approve: 'approvesce',
+ scene: 'scene'
+};
+const BILLTYPE = {
+ apinvoice: '4812', //应付运费发票
+ delivbill: '4804' //运输单
+};
+const REVISEHISTORY_CONST = {
+ listTableId: 'head',
+ cardTableId: 'so_saleorder_b',
+ queryTemplet: '/nccloud/platform/templet/querypage.do',
+ queryHistory: '/nccloud/dm/apinvoice/queryhistoryhead.do',
+ queryHistoryBody: '/nccloud/dm/apinvoice/queryhistorybody.do',
+ templetCode: '400600410_history',
+ pk_field: 'corderhistoryid',
+ pk_field_b: 'corderhistorybid'
+};
+
+const ApinvoiceHeadItem = {
+ hid: 'cinvoice_hid', //主表主键
+ pk_org: 'pk_org', // 财务组织
+ pk_org_v: 'pk_org_v', // 财务组织
+ pk_group: 'pk_group', //集团
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vtrantypecode: 'vtrantypecode', //交易类型编码
+ cdmsupplierid: 'cdmsupplierid', //承运商
+ capcustid: 'capcustid', //开票方
+ capcustvid: 'capcustvid', //开票方
+ vbillcode: 'vbillcode', //单据号
+ fstatusflag: 'fstatusflag', //单据状态
+ dbilldate: 'dbilldate', //单据日期
+ crececountryid: 'crececountryid', //收货国家/地区
+ csendcountryid: 'csendcountryid', //发货国家/地区
+ ctaxcountryid: 'ctaxcountryid', //报税国家
+ fbuysellflag: 'fbuysellflag', //购销类型
+ ts: 'ts', //时间戳
+ saga_status: 'saga_status', //saga状态 add by huoyzh 云原生适配
+ saga_gtxid: 'saga_gtxid' //saga 事务id add by huoyzh 云原生适配
+};
+const ApinvoiceBodyItem = {
+ crowno: 'crowno', //行号
+ bid: 'cinvoice_bid', //子表主键
+ pk_org: 'pk_org', // 财务组织最新版本
+ pk_group: 'pk_group', // 集团
+ vdelivbillcode: 'vdelivbillcode', //运输单号
+ cfeeinvid: 'cfeeinvid', //费用项
+ ctaxcodeid: 'ctaxcodeid', //税码
+ ntaxrate: 'ntaxrate', //税率
+ ftaxtypeflag: 'ftaxtypeflag', //扣税类别
+ ncaltaxmny: 'ncaltaxmny', //计税金额
+ dbilldate: 'dbilldate', //单据日期
+ csettlebill_bid: 'csettlebill_bid', //来源运费结算单子表ID
+ ts: 'ts', //时间戳
+ cinvoice_hid: 'cinvoice_hid', //发票表头id
+
+ //核销明细表体
+ cdelivbill_hid: 'cdelivbill_hid', //运输单表头pk
+ nverifymny: 'nverifymny', //核销明细金额
+ ntaxmny: 'ntaxmny', //价税合计
+ nmny: 'nmny',//无税金额
+ ntax: 'ntax',//税额
+ cinvoice_bid: 'cinvoice_bid', //运费发票子表
+ cverify_detailid: 'cverify_detailid', //运费发票核销明细
+ capsettle_fid: 'capsettle_fid' //费用子项
+};
+// 按钮区域常亮
+const BUTTON_AREA = {
+ List_Head: 'list_head',
+ List_Inner: 'list_inner',
+ Card_Head: 'card_head',
+ Card_Body: 'card_body',
+ Card_VerifyDetail: 'card_verifydetail',
+ Card_VerifyDetail_Inner: 'card_verifydetail_inner',
+ Card_Body_Inner: 'card_body_inner'
+};
+
+//按钮名称以及区域
+const BUTTON = {
+ PrintCountQuery: 'PrintCountQuery', //打印次数查询
+ addGroup: 'AddGroup', //新增按钮组
+ add: 'Add', //新增
+ add4804: 'Add4804', //新增运输
+ add4808: 'Add4808', //新增结算单
+ refLine: 'RefLine', //参照增行
+ edit: 'Edit', //修改
+ delete: 'Delete', //删除
+ save: 'Save', //保存
+ saveCommit: 'SaveCommit', //保存提交
+ cancel: 'Cancel', //取消
+ copy: 'Copy', //复制
+ commit: 'Commit', //提交
+ unCommit: 'UnCommit', //收回
+ file: 'File', //附件
+ fileManage: 'FileManage', //附件管理
+ queryAboutBusiness: 'QueryAboutBusiness', //单据追溯
+ linkQueryApSettle: 'LinkQueryApSettle', //联查结算单
+ print: 'Print', //打印
+ output: 'Output', //输出
+ refresh: 'Refresh', //刷新
+ deleteLine: 'DeleteLine', //删行
+ DeleteLine_Verify: 'DeleteLine_Verify', //核销明细删行
+ addLine: 'AddLine', //增行
+ copyLine: 'CopyLine', //复制行
+ resetRowNo: 'ResetRowNo', //重排行号
+ approveInfo: 'ApproveInfo', //审批详情
+ verify: 'Verify', //运费核销
+ pasteLineToTail: 'PasteLineToTail', //粘贴至末行
+ canelCopy: 'CanelCopy', //取消粘贴
+ spread: 'Spread', //展开
+ pasteLine: 'PasteLine', //粘贴行
+ insertLine: 'InsertLine', //插行
+ quitTransfer: 'QuitTransfer' //退出转单
+};
+
+const BILL_STATUS = { I_AUDIT: '3', I_AUDITING: '1', I_CLOSED: '4', I_FREE: '0', I_NOPASS: '2' };
+
+const PASTE_CLEAR_FIELDS = [];
+
+export {
+ ApinvoiceHeadItem,
+ ApinvoiceBodyItem,
+ APINVOICE_CONST,
+ BUTTON_AREA,
+ BILL_STATUS,
+ REVISEHISTORY_CONST,
+ PASTE_CLEAR_FIELDS,
+ BUTTON,
+ BILLTYPE
+};
+
+/*D3odMZWVuLtxYck7qMUaMgmVOyvcchnTDZ2EVgk+abY=*/
\ No newline at end of file
diff --git a/src/dm/dm/apinvoice/const/index.js b/src/dm/dm/apinvoice/const/index.js
new file mode 100644
index 0000000..eff8333
--- /dev/null
+++ b/src/dm/dm/apinvoice/const/index.js
@@ -0,0 +1,34 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import {
+ APINVOICE_CONST,
+ BUTTON_AREA,
+ BILL_STATUS,
+ REVISEHISTORY_CONST,
+ PASTE_CLEAR_FIELDS,
+ ApinvoiceHeadItem,
+ ApinvoiceBodyItem,
+ BUTTON,
+ BILLTYPE
+} from './const';
+
+import { LIST_HEAD_BROWSE_STATUS_ACTIONS, LIST_INNER_BUTTONS } from './listBtn_const';
+import { CARD_BODY_BUTTONS, CARD_BODY_INNER_BUTTONS, CARD_HEAD_STATUS_ACTIONS } from './cardBtn_const';
+
+export {
+ ApinvoiceHeadItem,
+ ApinvoiceBodyItem,
+ APINVOICE_CONST,
+ LIST_INNER_BUTTONS,
+ CARD_BODY_BUTTONS,
+ CARD_BODY_INNER_BUTTONS,
+ BUTTON_AREA,
+ CARD_HEAD_STATUS_ACTIONS,
+ BILL_STATUS,
+ REVISEHISTORY_CONST,
+ PASTE_CLEAR_FIELDS,
+ LIST_HEAD_BROWSE_STATUS_ACTIONS,
+ BUTTON,
+ BILLTYPE
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/apinvoice/const/listBtn_const.js b/src/dm/dm/apinvoice/const/listBtn_const.js
new file mode 100644
index 0000000..ee93970
--- /dev/null
+++ b/src/dm/dm/apinvoice/const/listBtn_const.js
@@ -0,0 +1,131 @@
+/*8aJy4BLbuYtHE4reUnTnyHF2blMUbcPLAkCdfr/5Ay8=*/
+/*
+ * @Author: 刘奇
+ * @PageInfo: 列表态按钮控制常量类
+ * @Date: 2019-03-07 18:28:53
+ * @Last Modified by: zhangmi
+ * @Last Modified time: 2021-07-28 16:50:40
+ */
+
+import { BUTTON } from './const';
+// 卡片浏览态表头显示的全部按钮
+const LIST_HEAD_BROWSE_ALLACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.delete,
+ BUTTON.commit,
+ BUTTON.unCommit,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.fileManage,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output,
+ BUTTON.refresh
+];
+
+// 自由态表头可用的按钮
+const LIST_HEAD_BROWSE_FREE_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.delete,
+ BUTTON.commit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output
+];
+
+// 审批中表头可用的按钮
+const LIST_HEAD_BROWSE_APPROVING_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.unCommit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output
+];
+
+// 审批通过表头可用的按钮
+const LIST_HEAD_BROWSE_AUDIT_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.unCommit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output
+];
+
+// 审批不通过表头可用的按钮
+const LIST_HEAD_BROWSE_NOPASS_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.delete,
+ BUTTON.commit,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output
+];
+// 关闭表头可用的按钮
+const LIST_HEAD_BROWSE_CLOSED_ACTIONS = [
+ BUTTON.add,
+ BUTTON.add4804,
+ BUTTON.add4808,
+ BUTTON.fileManage,
+ BUTTON.queryAboutBusiness,
+ BUTTON.linkQueryApSettle,
+ BUTTON.print,
+ BUTTON.PrintCountQuery,
+ BUTTON.output
+];
+
+// 无数据表头可用的按钮
+const LIST_HEAD_BROWSE_NODATA_ACTIONS = [ BUTTON.add, BUTTON.add4804, BUTTON.add4808 ];
+
+const LIST_HEAD_BROWSE_STATUS_ACTIONS = {
+ // 所有
+ ALL: LIST_HEAD_BROWSE_ALLACTIONS,
+ // 自由态
+ I_FREE: LIST_HEAD_BROWSE_FREE_ACTIONS,
+ // 审批不通过
+ I_NOPASS: LIST_HEAD_BROWSE_NOPASS_ACTIONS,
+ // 审批中
+ I_AUDITING: LIST_HEAD_BROWSE_APPROVING_ACTIONS,
+ // 审批通过
+ I_AUDIT: LIST_HEAD_BROWSE_AUDIT_ACTIONS,
+ // 单据关闭
+ I_CLOSED: LIST_HEAD_BROWSE_CLOSED_ACTIONS,
+ // 无数据
+ I_NODATA: LIST_HEAD_BROWSE_NODATA_ACTIONS
+};
+
+// 应付运费发票列表下,根据状态不同,显示不同的行按钮
+const LIST_INNER_BUTTONS = {
+ // 自由态
+ I_FREE: [ BUTTON.commit, BUTTON.edit, BUTTON.delete, BUTTON.copy, BUTTON.approveInfo ],
+ // 审批不通过
+ I_NOPASS: [ BUTTON.edit, BUTTON.delete, BUTTON.copy, BUTTON.approveInfo ],
+ // 审批中
+ I_AUDITING: [ BUTTON.copy, BUTTON.approveInfo ],
+ // 审批通过
+ I_AUDIT: [ BUTTON.copy, BUTTON.approveInfo ]
+};
+export { LIST_HEAD_BROWSE_STATUS_ACTIONS, LIST_INNER_BUTTONS, BUTTON };
+
+/*8aJy4BLbuYtHE4reUnTnyHF2blMUbcPLAkCdfr/5Ay8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/body/bodyAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/body/bodyAfterEvent.js
new file mode 100644
index 0000000..d4fd71d
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/body/bodyAfterEvent.js
@@ -0,0 +1,100 @@
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
+import {
+ createExtBodyAfterEventData,
+ processExtBillCardBodyEditResult,
+ processExtBillCardHeadEditResult
+} from '../../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL, FIELD } from '../../../constance';
+import { showErrorInfo } from '../../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { processCardTableAutoAddRow } from '../../../../../../scmpub/scmpub/pub/tool/autoAddRowUtil';
+export default function(props, moduleId, key, value, changedrows, index) {
+ let userobject = {};
+ //let keyArry = [ FIELD.nastnum, FIELD.nnum, FIELD.nprice ];
+ // if (!value && !keyArry.includes(key)) {
+ // return;
+ // }
+ if (key == FIELD.nastnum) {
+ userobject.formula = true;
+ }
+ let areas = [];
+ if (moduleId === CARD.body) {
+ areas = [ CARD.body ];
+ } else if (moduleId === CARD.pack) {
+ areas = [ CARD.pack ];
+ }
+ let data = createExtBodyAfterEventData(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ areas,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ userobject
+ );
+ if (changedrows && changedrows[0]) {
+ ajax({
+ url: URL.bodyAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ res = { data: res };
+ if (res.data && res.data.data) {
+ if (res.data.data.extbillcard) {
+ props.form.setAllFormValue({ [CARD.form]: res.data.data.extbillcard.head[CARD.form] });
+ }
+ processExtBillCardBodyEditResult(props, moduleId, res.data.data);
+ //后端编辑后事件代码逻辑算不了所有表体行合计,这里在前端计算用于页面展示
+ //总主数量
+ let totalnum = 0;
+ //总数量
+ let totalastnum = 0;
+ //总重量
+ let ntotalweight = 0;
+ //总体积
+ let ntotalvolume = 0;
+ //总金额
+ let ntotalmny = 0;
+ //总主数量精度
+ let totalnumscale = 0;
+ //总数量精度
+ let totalastnumscale = 0;
+ props.cardTable.getAllRows(moduleId).forEach((row) => {
+ if (row.values['nnum'].value) {
+ totalnum = totalnum + parseFloat(row.values['nnum'].value);
+ totalastnum = totalastnum + parseFloat(row.values['nastnum'].value);
+ if(parseInt(row.values['nnum'].scale) > totalnumscale) {
+ totalnumscale = row.values['nnum'].scale;
+ }
+ if(parseInt(row.values['nastnum'].scale) > totalastnumscale) {
+ totalastnumscale = row.values['nastnum'].scale;
+ }
+ }
+ ntotalweight = ntotalweight + parseFloat((row.values['nweight'].value == undefined || row.values['nweight'].value == '') ? 0 : row.values['nweight'].value);
+ ntotalvolume = ntotalvolume + parseFloat((row.values['nvolumn'].value == undefined || row.values['nvolumn'].value == '') ? 0 : row.values['nvolumn'].value);
+ ntotalmny = ntotalmny + parseFloat((row.values['nmoney'].value == undefined || row.values['nmoney'].value == '') ? 0 : row.values['nmoney'].value);
+ });
+ props.form.setFormItemsValue('form', {['ntotalnum']:{value: totalnum, scale: totalnumscale}});
+ props.form.setFormItemsValue('form', {['ntotalastnum']:{value: totalastnum, scale: totalastnumscale}});
+ let ntotalweightscale = props.form.getFormItemsValue('form','ntotalweight');
+ props.form.setFormItemsValue('form', {['ntotalweight']:{value: ntotalweight, scale: ntotalweightscale.scale}});
+ let ntotalvolumetscale = props.form.getFormItemsValue('form','ntotalvolume');
+ props.form.setFormItemsValue('form', {['ntotalvolume']:{value: ntotalvolume, scale: ntotalvolumetscale.scale}});
+ let ntotalmnyscale = props.form.getFormItemsValue('form','ntotalmny');
+ props.form.setFormItemsValue('form', {['ntotalmny']:{value: ntotalmny, scale: ntotalmnyscale.scale}});
+ } else {
+ props.cardTable.setTableData(moduleId, { rows: [] }, null, false);
+ }
+ },
+ error: (res) => {
+ showErrorInfo(null, res.message);
+ props.cardTable.setValByKeyAndIndex(moduleId, index, key, { value: null, display: null });
+ }
+ });
+ processCardTableAutoAddRow(props, moduleId, index, { isMuli: changedrows.length > 1 ? true : false });
+ }
+}
+
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/body/bodyPackAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/body/bodyPackAfterEvent.js
new file mode 100644
index 0000000..e0e48e2
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/body/bodyPackAfterEvent.js
@@ -0,0 +1,55 @@
+/*Ne+5vtJ3LAOINbLhXMWywmg/bfMgG6ZcZ0xQZOBUX2g=*/
+import {
+ createExtBodyAfterEventData,
+ processExtBillCardBodyEditResult
+} from '../../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL } from '../../../constance';
+export default function(props, moduleId, key, value, changedrows, index) {
+ let userobject = {};
+ let data = createExtBodyAfterEventData(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ [ CARD.body, CARD.pack ],
+ moduleId,
+ key,
+ changedrows,
+ index,
+ userobject
+ );
+ ajax({
+ url: URL.bodyPackAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ res = { data: res };
+ if (res.data && res.data.data) {
+ processExtBillCardBodyEditResult(props, moduleId, res.data.data);
+ //总包装件数
+ let ntotalpacknum = 0;
+ let ntotalpacknumscale = 0;
+ //总包装重量
+ let ntotalpackweight = 0;
+ //总包装体积
+ let ntotalpackvolume = 0;
+ props.cardTable.getAllRows(moduleId).forEach((row) => {
+ ntotalpacknum = ntotalpacknum + parseFloat((row.values['npacknum'].value == undefined || row.values['npacknum'].value == '') ? 0 : row.values['npacknum'].value);
+ ntotalpackweight = ntotalpackweight + parseFloat((row.values['npackweight'].value == undefined || row.values['npackweight'].value == '') ? 0 : row.values['npackweight'].value);
+ ntotalpackvolume = ntotalpackvolume + parseFloat((row.values['npackvolume'].value == undefined || row.values['npackvolume'].value == '') ? 0 : row.values['npackvolume'].value);
+ ntotalpacknumscale = row.values['npacknum'].scale;
+ });
+
+ props.form.setFormItemsValue('form', {['ntotalpacknum']:{value: ntotalpacknum, scale: ntotalpacknumscale}});
+ let ntotalpackweightscale = props.form.getFormItemsValue('form','ntotalpackweight');
+ props.form.setFormItemsValue('form', {['ntotalpackweight']:{value: ntotalpackweight, scale: ntotalpackweightscale.scale}});
+ let ntotalpackvolumescale = props.form.getFormItemsValue('form','ntotalpackvolume');
+ props.form.setFormItemsValue('form', {['ntotalpackvolume']:{value: ntotalpackvolume, scale: ntotalpackvolumescale.scale}});
+ } else {
+ props.cardTable.setTableData(moduleId, { rows: [] }, null, false);
+ }
+ }
+ });
+}
+
+/*Ne+5vtJ3LAOINbLhXMWywmg/bfMgG6ZcZ0xQZOBUX2g=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/body/index.js b/src/dm/dm/delivbill/card/afterEvents/body/index.js
new file mode 100644
index 0000000..d5af45e
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/body/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import bodyAfterEvent from './bodyAfterEvent';
+import bodyPackAfterEvent from './bodyPackAfterEvent';
+import vbatchcodeAfterEvent from './vbatchcodeAfterEvent';
+export { bodyAfterEvent, vbatchcodeAfterEvent, bodyPackAfterEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/body/vbatchcodeAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/body/vbatchcodeAfterEvent.js
new file mode 100644
index 0000000..30595a2
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/body/vbatchcodeAfterEvent.js
@@ -0,0 +1,62 @@
+/*7xf0yjN04PKySFsD1dd/PEmjp+gEs9t1ZEprdGeWG6w=*/
+import { FIELD } from '../../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+
+export default function(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let { key, pk_stockorg, pk_material, url } = constance;
+ //组织为空,不可编辑
+ if (!pk_stockorg) {
+ resolve(false);
+ }
+ //物料为空,不可编辑
+ if (!pk_material) {
+ resolve(false);
+ }
+ //对应入库单id不为空,不可编辑
+ let data = {
+ key: key,
+ params: {
+ cinventoryvid: record[FIELD.cinventoryvid].value,
+ csendstoreorgid: record[FIELD.csendstoreorgid].value
+ }
+ };
+
+ ajax({
+ url: url,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.data) {
+ let isedit = res.data.isedit;
+ let pksList = res.data.pks;
+ let pks = '';
+ if (pksList && pksList.length != 0) {
+ pksList.forEach((pk) => {
+ pks += pk + ',';
+ });
+ }
+
+ if (isedit) {
+ resolve({ isedit: isedit, pks: pks });
+ } else if (res.data.message) {
+ toast({
+ color: 'warning',
+ content: res.data.message
+ });
+ }
+ resolve({ isedit: isedit, pks: pks });
+ }
+ },
+ error: (error) => {
+ toast({
+ color: 'warning',
+ content: error.message
+ });
+ resolve(false);
+ }
+ });
+ });
+}
+
+/*7xf0yjN04PKySFsD1dd/PEmjp+gEs9t1ZEprdGeWG6w=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/bodyAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/bodyAfterEvent.js
new file mode 100644
index 0000000..aab05c4
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/bodyAfterEvent.js
@@ -0,0 +1,96 @@
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
+/*
+ * 表体编辑后
+ * @Author: liangzhyf
+ * @Date: 2020-03-11 11:23:17
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-11-09 14:46:16
+ */
+import { FIELD, CARD, FREEFIELD } from '../../constance';
+import { bodyAfterEvent } from './body';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+export default function(props, moduleId, key, value, changedrows, index, record, type, method) {
+ let keyArry = [
+ FIELD.nnum,
+ FIELD.nprice,
+ FIELD.nmoney,
+ FIELD.cinventoryvid,
+ FIELD.castunitid,
+ FIELD.vchangerate,
+ FIELD.nastnum,
+ FIELD.csendstoreorgvid,
+ FIELD.csendvendorvid,
+ FIELD.csendvendorid,
+ FIELD.csendstoreid,
+ FIELD.creceivestoreid,
+ FIELD.dsenddate,
+ FIELD.dsendtime,
+ FIELD.drequiredate,
+ FIELD.drequiretime,
+ FIELD.creceivestoreorgvid,
+ FIELD.csendaddrdocid,
+ FIELD.creceiveaddrdocid,
+ FIELD.creceivecustvid,
+ FIELD.creceivecustid,
+ FIELD.nvolumn,
+ FIELD.nweight,
+ FIELD.ccosignvid,
+ FIELD.ccosignid,
+ FIELD.ctakefeevid,
+ FIELD.ctakefeeid
+ ];
+ let fixAssts = [
+ 'casscustid',
+ 'casscustvid',
+ 'cdefdoc',
+ 'cprojectid',
+ 'cdmsupplierid',
+ 'cdmsuppliervid',
+ 'cstateid',
+ 'cffileid'
+ ];
+ if (key == FIELD.vbatchcode) {
+ // vbatchcodeAfterEvent.call(this, props, moduleId, key, value, changedrows, index);
+ if (JSON.stringify(value || {}) === '{}' || value.length == 0) {
+ // 清空操作
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'vbatchcode', {
+ value: null,
+ display: null
+ });
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'pk_batchcode', {
+ value: null,
+ display: null
+ });
+ } else {
+ if (value && value['0'] && value['0'].values) {
+ let seldata = value['0'].values;
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'vbatchcode', {
+ value: seldata.vbatchcode.value,
+ display: seldata.vbatchcode.value
+ });
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'pk_batchcode', {
+ value: seldata.pk_batchcode.value,
+ display: seldata.pk_batchcode.value
+ });
+ }
+ }
+ return;
+ } else if (keyArry.includes(key)) {
+ bodyAfterEvent.call(this, props, moduleId, key, value, changedrows, index);
+ } else if (key.indexOf('vfree') == 0 || fixAssts.includes(key)) {
+ marAsstUtils.afterEdit.call(
+ this,
+ props,
+ null,
+ CARD.pagecode,
+ moduleId,
+ key,
+ FIELD.cinventoryvid,
+ record,
+ index,
+ FREEFIELD
+ );
+ }
+}
+
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/bodyPackAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/bodyPackAfterEvent.js
new file mode 100644
index 0000000..4aa5506
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/bodyPackAfterEvent.js
@@ -0,0 +1,35 @@
+/*Ne+5vtJ3LAOINbLhXMWywmg/bfMgG6ZcZ0xQZOBUX2g=*/
+/*
+ * 表体包装信息编辑后
+ * @Author: liangzhyf
+ * @Date: 2020-03-11 11:23:34
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-11-09 14:51:09
+ */
+import { bodyPackAfterEvent } from './body';
+import { FIELD } from '../../constance';
+export default function(props, moduleId, key, value, changedrows, index, record, type, method) {
+ let keyArry = [
+ FIELD.npacknum,
+ FIELD.cpackid,
+ FIELD.npackvolume,
+ FIELD.npackweight,
+ FIELD.ccosignvid,
+ FIELD.ccosignid,
+ FIELD.ctakefeevid,
+ FIELD.ctakefeeid,
+ FIELD.csendvendorvid,
+ FIELD.csendvendorid,
+ FIELD.creceivecustvid,
+ FIELD.creceivecustid,
+ FIELD.csendstoreorgvid,
+ FIELD.creceivestoreorgvid,
+ FIELD.casscustvid,
+ FIELD.casscustid
+ ];
+ if (keyArry.includes(key)) {
+ bodyPackAfterEvent.call(this, props, moduleId, key, value, changedrows, index);
+ }
+}
+
+/*Ne+5vtJ3LAOINbLhXMWywmg/bfMgG6ZcZ0xQZOBUX2g=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/head/commonAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/head/commonAfterEvent.js
new file mode 100644
index 0000000..a870aed
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/head/commonAfterEvent.js
@@ -0,0 +1,44 @@
+/*vu8I3i7C/JadZNFVM6mbP7slTpBKZDpuPAUhuN3YRIU=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { CARD, URL } from '../../../constance';
+import {
+ createExtBillHeadAfterEventData,
+ processExtBillCardHeadEditResult
+} from '../../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+
+export default function doAction(props, moduleId, key, value) {
+ let data = createExtBillHeadAfterEventData(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ [ CARD.body, CARD.pack ],
+ moduleId,
+ key,
+ value
+ );
+
+ ajax({
+ url: URL.headAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (
+ res.data.extbillcard &&
+ res.data.extbillcard.head &&
+ res.data.extbillcard.head[CARD.form] &&
+ res.data.extbillcard.head[CARD.form].rows[0]
+ ) {
+ processExtBillCardHeadEditResult(props, CARD.form, [ CARD.body, CARD.pack ], res.data);
+ }
+ },
+ //已经生成任务单的运输单编辑承运商时,后台报错后清除前端字段
+ error: (res) => {
+ toast({ color: 'danger', content: res.message });
+ let item = {};
+ item[key] = { value: null, display: null };
+ props.form.setFormItemsValue(CARD.form, item);
+ }
+ });
+}
+
+/*vu8I3i7C/JadZNFVM6mbP7slTpBKZDpuPAUhuN3YRIU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/head/index.js b/src/dm/dm/delivbill/card/afterEvents/head/index.js
new file mode 100644
index 0000000..32e90c0
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/head/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import orgAfterEvent from './orgAfterEvent';
+import initPkOrgAfter from './initPkOrgAfter';
+import commonAfterEvent from './commonAfterEvent';
+export { commonAfterEvent, orgAfterEvent, initPkOrgAfter };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/head/initPkOrgAfter.js b/src/dm/dm/delivbill/card/afterEvents/head/initPkOrgAfter.js
new file mode 100644
index 0000000..14094f9
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/head/initPkOrgAfter.js
@@ -0,0 +1,50 @@
+/*oKpLfPSDgG5oDu3adDb/gDxKo0FRA1mnxuIe682Rbmc=*/
+import orgAfterEvent from './orgAfterEvent';
+import { CARD, FIELD } from '../../../constance';
+export default function(props) {
+ /**
+ * 处理新增操作后的获取默认主组织
+ */
+ let context = this.contexts;
+ let pk_org_v = (context || {}).pk_org_v;
+ if (pk_org_v) {
+ props.form.setFormItemsValue(CARD.form, {
+ pk_org_v: { value: context.pk_org_v, display: context.org_v_Name }
+ });
+ //个性化中心设置默认值时,主动调用编辑后事件
+ edit(
+ props,
+ 'form',
+ CARD.form,
+ FIELD.pk_org_v,
+ { value: pk_org_v },
+ null,
+ null,
+ orgAfterEvent.bind(
+ this,
+ props,
+ CARD.form,
+ FIELD.pk_org_v,
+ { value: pk_org_v, display: context.org_v_Name },
+ null
+ )
+ );
+ } else {
+ props.initMetaByPkorg();
+ let disabledItem = { pk_org_v: false };
+ props.form.setFormItemsDisabled(CARD.form, disabledItem);
+ }
+}
+
+function edit(props, type, areacode, key, value, changedrows, index, afterEvent) {
+ props.handleRelationItems({
+ type: type, //编辑的是表单值为'form', 编辑的是表格值为'table'
+ areaCode: areacode, //编辑区域的编码
+ key: key, //编辑字段英文名称
+ value: value, //编辑字段的新值
+ callback: afterEvent, //请求成功的回调(业务组自己的编辑后事件)
+ formMetaCode: areacode
+ });
+}
+
+/*oKpLfPSDgG5oDu3adDb/gDxKo0FRA1mnxuIe682Rbmc=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/head/orgAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/head/orgAfterEvent.js
new file mode 100644
index 0000000..6cdf24c
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/head/orgAfterEvent.js
@@ -0,0 +1,114 @@
+/*50WLnzGeq39Tfv85RWLaWZT1lLmuB0Au3o9vPiF0Dds=*/
+import { ajax } from 'nc-lightapp-front';
+import { CARD, FIELD, URL } from '../../../constance';
+import { showWarningDialog } from '../../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import {
+ createExtBillHeadAfterEventData,
+ processExtBillCardHeadEditResult
+} from '../../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import transtypeUtils from '../../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../../viewController/buttonController';
+/**
+ * 主组织编辑后
+ * @param {object} props
+ * @param {string} moduleId 区域名
+ * @param {string} key 编辑字段的键
+ * @param {string} value 编辑字段的值
+ * @param {string} before 修改前的字段
+ * @param {object} constance 常量
+ * @param {function} callback 回调
+ * @param {...any} arg 其他参数
+ */
+export default function afterEvent(props, moduleId, key, value, before) {
+ if (!before || !before.value) {
+ //改变前为空,直接走编辑后事件,不清除表头以保留暂存生成的主键
+ changeOrg.call(this, props, moduleId, key, value);
+ } else {
+ //新值和旧值不同时,才需要弹出提示,如果相同,不进行任何操作
+ if (value && value.value && value.value != before.value) {
+ showWarningDialog(
+ getLangByResId(this, '4014DELIVBILL--000001'),
+ getLangByResId(this, '4014DELIVBILL-000000'),
+ {
+ /* 国际化处理: 确认修改,是否修改组织,这样会清空您录入的信息?*/
+ beSureBtnName: getLangByResId(this, '4014DELIVBILL-000001') /* 国际化处理: 确定*/,
+ cancelBtnName: getLangByResId(this, '4014DELIVBILL-000002') /* 国际化处理: 取消*/,
+ beSureBtnClick: () => {
+ props.form.EmptyAllFormValue(moduleId);
+ changeOrg.call(this, props, moduleId, key, value);
+ },
+ cancelBtnClick: cancelBtnClick.bind(this, CARD.form, before),
+ closeBtnClick: cancelBtnClick.bind(this, CARD.form, before),
+ closeByClickBackDrop: cancelBtnClick.bind(this, CARD.form)
+ }
+ );
+ } else {
+ showWarningDialog(
+ getLangByResId(this, '4014DELIVBILL--000001'),
+ getLangByResId(this, '4014DELIVBILL-000000'),
+ {
+ /* 国际化处理: 确认修改,是否修改组织,这样会清空您录入的信息?*/
+ beSureBtnName: getLangByResId(this, '4014DELIVBILL-000001') /* 国际化处理: 确定*/,
+ cancelBtnName: getLangByResId(this, '4014DELIVBILL-000002') /* 国际化处理: 取消*/,
+ beSureBtnClick: () => {
+ props.form.setFormItemsDisabled(CARD.form, { [FIELD.pk_org_v]: false });
+ props.initMetaByPkorg(FIELD.pk_org_v);
+ props.form.EmptyAllFormValue(moduleId);
+ props.cardTable.setTableData(CARD.body, { rows: [] }, null, false);
+ props.cardTable.setTableData(CARD.pack, { rows: [] }, null, false);
+ },
+ cancelBtnClick: cancelBtnClick.bind(this, CARD.form, before),
+ closeBtnClick: cancelBtnClick.bind(this, CARD.form, before),
+ closeByClickBackDrop: cancelBtnClick.bind(this, CARD.form)
+ }
+ );
+ }
+ }
+}
+
+function cancelBtnClick(formArea, oldvalue) {
+ this.props.form.setFormItemsValue(formArea, {
+ pk_org_v: { value: oldvalue.value, display: oldvalue.display }
+ });
+}
+
+const changeOrg = function(props, moduleId, key, value) {
+ if (value && value.value) {
+ props.resMetaAfterPkorgEdit();
+ } else {
+ props.form.setFormItemsDisabled(CARD.form, { [FIELD.pk_org_v]: false });
+ props.initMetaByPkorg(FIELD.pk_org_v);
+ }
+ props.cardTable.setTableData(CARD.body, { rows: [] }, null, false);
+ props.cardTable.setTableData(CARD.pack, { rows: [] }, null, false);
+ let data = createExtBillHeadAfterEventData(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ [ CARD.body, CARD.pack ],
+ moduleId,
+ key,
+ value
+ );
+ ajax({
+ url: URL.headAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (
+ res.data.extbillcard &&
+ res.data.extbillcard.head &&
+ res.data.extbillcard.head[CARD.form] &&
+ res.data.extbillcard.head[CARD.form].rows[0]
+ ) {
+ processExtBillCardHeadEditResult(props, CARD.form, [ CARD.body, CARD.pack ], res.data);
+ transtypeUtils.setValue.call(this, moduleId, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ props.cardTable.addRow(CARD.body, 0, { crowno: { display: '10', value: '10' } }, false);
+ buttonController.setButtonsEnable.call(this, props);
+ }
+ }
+ });
+};
+
+/*50WLnzGeq39Tfv85RWLaWZT1lLmuB0Au3o9vPiF0Dds=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/headAfterEvent.js b/src/dm/dm/delivbill/card/afterEvents/headAfterEvent.js
new file mode 100644
index 0000000..333f7e0
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/headAfterEvent.js
@@ -0,0 +1,111 @@
+/*9oNSQ86zYBKgm3JBJdBE6GSWmqbQoeEP34QQO2SBWx8=*/
+import { FIELD } from '../../constance';
+import { commonAfterEvent, orgAfterEvent } from './head';
+
+/**
+ * 表头编辑后事件
+ * @param {*} props 组件的props
+ * @param {*} moduleId 操作区域的id
+ * @param {*} key 操作的字段
+ * @param {*} value 编辑后,操作字段的值,主键
+ * @param {*} before 编辑前,操作字段操作前的值(对象)
+ * @param {*} after 编辑后,操作字段操作前的值(对象)
+ */
+export default function(props, moduleId, key, value, before) {
+ if (key == FIELD.pk_org_v) {
+ orgAfterEvent.call(this, props, moduleId, key, value, before);
+ } else if (key == FIELD.cdriverid) {
+ let cdriverid = props.form.getFormItemsValue(moduleId, FIELD.cdriverid).value;
+ if (cdriverid == null) {
+ props.form.setFormItemsValue(moduleId, {
+ [FIELD.vdriverphone]: {
+ value: null,
+ display: null,
+ scale: -1
+ }
+ });
+ } else {
+ commonAfterEvent.call(this, props, moduleId, key, value, before);
+ }
+ } else if (key == FIELD.csenderid) {
+ let csenderid = props.form.getFormItemsValue(moduleId, FIELD.csenderid).value;
+ if (csenderid == null) {
+ props.form.setFormItemsValue(moduleId, {
+ [FIELD.vsenderphone]: {
+ value: null,
+ display: null,
+ scale: -1
+ }
+ });
+ } else {
+ commonAfterEvent.call(this, props, moduleId, key, value, before);
+ }
+ } else if (key == FIELD.ddelivdate) {
+ let ddelivdate = props.form.getFormItemsValue(moduleId, FIELD.ddelivdate).value;
+ if (ddelivdate == null) {
+ props.form.setFormItemsValue(moduleId, {
+ [FIELD.tdelivtime]: {
+ value: null,
+ display: null
+ }
+ });
+ } else {
+ props.form.setFormItemsValue(moduleId, {
+ [FIELD.tdelivtime]: {
+ value: ddelivdate,
+ display: ddelivdate
+ }
+ });
+ }
+ } else if (key == FIELD.tdelivtime) {
+ let tdelivtime = props.form.getFormItemsValue(moduleId, FIELD.tdelivtime).value;
+ if (tdelivtime == null) {
+ props.form.setFormItemsValue(moduleId, {
+ [FIELD.ddelivdate]: {
+ value: null,
+ display: null
+ }
+ });
+ } else {
+ props.form.setFormItemsValue(moduleId, {
+ [FIELD.ddelivdate]: {
+ value: tdelivtime,
+ display: tdelivtime
+ }
+ });
+ }
+ } else {
+ commonAfterEvent.call(this, props, moduleId, key, value, before);
+ }
+}
+
+// function badvfeeRule(props, moduleId) {
+// //代垫运费
+// let badvfeeflag = props.form.getFormItemsValue(moduleId, FIELD.badvfeeflag).value;
+// let bodyData = props.cardTable.getVisibleRows(CARD.body);
+// bodyData.every((row) => {
+// if (row.values[FIELD.vsrctype].value != null) {
+// if (badvfeeflag) {
+// props.form.setFormItemsValue(moduleId, {
+// [FIELD.vsenderphone]: {
+// value: false
+// }
+// });
+// } else {
+// props.form.setFormItemsValue(moduleId, {
+// [FIELD.vsenderphone]: {
+// value: true
+// }
+// });
+// }
+// props.form.setFormItemsDisabled(moduleId, {
+// [FIELD.vsenderphone]: true
+// });
+// return false;
+// } else {
+// return true;
+// }
+// });
+// }
+
+/*9oNSQ86zYBKgm3JBJdBE6GSWmqbQoeEP34QQO2SBWx8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/afterEvents/index.js b/src/dm/dm/delivbill/card/afterEvents/index.js
new file mode 100644
index 0000000..856a1ca
--- /dev/null
+++ b/src/dm/dm/delivbill/card/afterEvents/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import headAfterEvent from './headAfterEvent';
+import bodyAfterEvent from './bodyAfterEvent';
+import bodyPackAfterEvent from './bodyPackAfterEvent';
+export { headAfterEvent, bodyAfterEvent, bodyPackAfterEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/batchEvents/bodyBatchEvents.js b/src/dm/dm/delivbill/card/batchEvents/bodyBatchEvents.js
new file mode 100644
index 0000000..2e2756b
--- /dev/null
+++ b/src/dm/dm/delivbill/card/batchEvents/bodyBatchEvents.js
@@ -0,0 +1,381 @@
+/*5tPB1LW5pXeWGt/06txI021EqoF6IDYJtHrBgrjruyc=*/
+/*
+ * @Author: zhangflr
+ * @Date: 2020-09-04 14:48:31
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-04-18 15:29:28
+ */
+import { ajax } from 'nc-lightapp-front';
+import { FIELD, CARD, URL } from '../../constance';
+import {
+ createBodyAfterEventData4BatchMore,
+ processExtBillCardBodyEditResult4Batch
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+export default function batchEvents(obj) {
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+ //数量、主数量、单价、金额、重量、体积、备注、委托单位、发货及收货地区、地点、联系电话、日期、运费承担单位
+ let BATCHITEMSNOFILTER = [
+ 'nnum',
+ 'nastnum',
+ 'nprice',
+ 'nmoney',
+ 'nweight',
+ 'nvolumn',
+ 'vbnote',
+ 'ccosignvid',
+ 'csendareaid',
+ 'csendaddrdocid',
+ 'creceiveareaid',
+ 'creceiveaddrdocid',
+ 'vbsenderphone',
+ 'vreceivephone',
+ 'dsenddate',
+ 'drequiredate',
+ 'ctakefeevid',
+ 'casscustvid',
+ 'cdmsuppliervid'
+ ];
+ //自定义项
+ if (attrcode.startsWith('vbdef') || attrcode === 'vsender' || attrcode === 'vreceiver') {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ let pk_org = this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ queryCondition = { pk_org: pk_org };
+ isManyCondition = false;
+ } else if (attrcode === FIELD.cinventoryvid) {
+ //物料
+ for (let i = 0; i < newValue.length; i++) {
+ if (newValue[i].values.vsrcrowno && newValue[i].values.vsrcrowno.value) {
+ continue;
+ }
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ let pk_org = this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ queryCondition = {
+ pk_org: pk_org ? (pk_org.includes(',') ? null : pk_org) : null,
+ discountflag: 'N',
+ fee: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.CinventoryGridRefFilter'
+ };
+ isManyCondition = false;
+ } else if (attrcode === FIELD.castunitid) {
+ //单位(辅单位)
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ let cinventoryvid = newValue[i].values.cinventoryvid.value;
+ queryValue[i].queryCondition = {
+ materialPk: cinventoryvid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.UnitGridRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode === FIELD.csendstoreid) {
+ //发货仓库
+ for (let i = 0; i < newValue.length; i++) {
+ //如果发货库存组织没有值就不允许编辑
+ if (
+ !(
+ newValue[i].values.cinventoryvid &&
+ newValue[i].values.cinventoryvid.value &&
+ newValue[i].values.csendstoreorgid &&
+ newValue[i].values.csendstoreorgid.value
+ )
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ let csendstoreorgid = newValue[i].values.csendstoreorgid.value;
+ queryValue[i].queryCondition = {
+ // 参照本身的条件
+ gubflag: 'N',
+ isdirectstore: 'N',
+ pk_org: csendstoreorgid,
+ // 自定义条件
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.StoreGridRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode === 'cffileid') {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ //每个字段单独的过滤条件,可单独处理
+ queryValue[queryValue.length - 1].queryCondition = { cmaterialvid: newValue[i].values.cinventoryvid.value };
+ }
+ isManyCondition = true;
+ } else if (attrcode === FIELD.csendaddrid) {
+ //发货地址
+ for (let i = 0; i < newValue.length; i++) {
+ //如果发货供应商没有值就不允许编辑
+ if (
+ !(
+ newValue[i].values.cinventoryvid &&
+ newValue[i].values.cinventoryvid.value &&
+ newValue[i].values.csendvendorid &&
+ newValue[i].values.csendvendorid.value
+ )
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ if (
+ newValue[i].values.vsrctype &&
+ newValue[i].values.vsrctype.value &&
+ newValue[i].values.vsrctype.value == '4Y'
+ ) {
+ continue;
+ }
+ let pk_org = this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ let csendvendorid = newValue[i].values.csendvendorid.value;
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ pk_supplier: csendvendorid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.AddrGridRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode === FIELD.creceivestoreid) {
+ //收货仓库
+ for (let i = 0; i < newValue.length; i++) {
+ //如果收货库存组织没有值就不允许编辑
+ if (
+ !(
+ newValue[i].values.cinventoryvid &&
+ newValue[i].values.cinventoryvid.value &&
+ newValue[i].values.creceivestoreorgid &&
+ newValue[i].values.creceivestoreorgid.value
+ )
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ let creceivestoreorgid = newValue[i].values.creceivestoreorgid.value;
+ queryValue[i].queryCondition = {
+ pk_org: creceivestoreorgid,
+ gubflag: 'N',
+ isdirectstore: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.StoreGridRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode === FIELD.creceiveaddrid) {
+ //收货地址
+ for (let i = 0; i < newValue.length; i++) {
+ //如果收货客户没有值就不允许编辑
+ if (
+ !(
+ newValue[i].values.cinventoryvid &&
+ newValue[i].values.cinventoryvid.value &&
+ newValue[i].values.creceivecustid &&
+ newValue[i].values.creceivecustid.value
+ )
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ if (
+ newValue[i].values.vsrctype &&
+ newValue[i].values.vsrctype.value &&
+ newValue[i].values.vsrctype.value == '4Y'
+ ) {
+ continue;
+ }
+ let pk_org = this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ let creceivecustid = newValue[i].values.creceivecustid.value;
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ pk_customer: creceivecustid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.AddrGridRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode === FIELD.csendstoreorgvid) {
+ //发货库存组织
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ //如果来源单据行号或发货供应商有值就不允许编辑
+ if (
+ (newValue[i].values.vsrcrowno && newValue[i].values.vsrcrowno.value) ||
+ (newValue[i].values.csendvendorid && newValue[i].values.csendvendorid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode === FIELD.csendvendorvid) {
+ //发货供应商
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ //如果来源单据行号或发货库存组织有值就不允许编辑
+ if (
+ (newValue[i].values.vsrcrowno && newValue[i].values.vsrcrowno.value) ||
+ (newValue[i].values.csendstoreorgvid && newValue[i].values.csendstoreorgvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ let pk_org = this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ queryCondition = {
+ pk_org: pk_org
+ };
+ isManyCondition = false;
+ } else if (attrcode === FIELD.creceivestoreorgvid) {
+ //收货库存组织
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ //如果来源单据行号或收货客户有值就不允许编辑
+ if (
+ (newValue[i].values.vsrcrowno && newValue[i].values.vsrcrowno.value) ||
+ (newValue[i].values.creceivecustid && newValue[i].values.creceivecustid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode === FIELD.creceivecustvid) {
+ //收货客户
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ //如果来源单据行号或收货库存组织有值就不允许编辑
+ //编辑前事件未根据来源单据行号控制编辑性,复制粘贴也不控制了
+ if (newValue[i].values.creceivestoreorgvid && newValue[i].values.creceivestoreorgvid.value) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ let pk_org = this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ queryCondition = {
+ pk_org: pk_org
+ };
+ isManyCondition = false;
+ } else if (BATCHITEMSNOFILTER.includes(attrcode)) {
+ //不需要参照过滤
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.cinventoryvid && newValue[i].values.cinventoryvid.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else {
+ return;
+ }
+ if (queryValue.length == 0) {
+ return;
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ //执行业务的批量编辑后事件
+ // afterEvent(props, areaCode, attrcode, queryValue, changerows);
+ if (areaCode === CARD.good_delivery) {
+ areaCode = CARD.body;
+ }
+ let data = createBodyAfterEventData4BatchMore(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ [ CARD.body, CARD.pack ],
+ areaCode,
+ attrcode,
+ changedrows,
+ indexs
+ );
+ ajax({
+ url: URL.bodyAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ card_body: 'cardTable'
+ }
+ );
+ }
+
+ processExtBillCardBodyEditResult4Batch(props, areaCode, res.data, indexs);
+
+ this.forceUpdate();
+ }
+ });
+ });
+}
+
+/*5tPB1LW5pXeWGt/06txI021EqoF6IDYJtHrBgrjruyc=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/batchEvents/index.js b/src/dm/dm/delivbill/card/batchEvents/index.js
new file mode 100644
index 0000000..5e328e5
--- /dev/null
+++ b/src/dm/dm/delivbill/card/batchEvents/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import bodyBatchEvents from './bodyBatchEvents';
+export { bodyBatchEvents };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/body/csettlefinorgBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/body/csettlefinorgBeforeEvent.js
new file mode 100644
index 0000000..5b208f0
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/body/csettlefinorgBeforeEvent.js
@@ -0,0 +1,48 @@
+/*zxjvbrtChbI3qH7Mf/D4LZKKft9vCF+qn8daLLegoFwmU57S3Qnjprxtdf2a3YkD*/
+import { ajax, toast } from 'nc-lightapp-front';
+export default function(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let {
+ key, //字段key
+ pk_org,
+ url
+ } = constance;
+ if (pk_org) {
+ let data = {
+ key: key,
+ params: { pk_org: pk_org }
+ };
+ ajax({
+ url: url,
+ data: data,
+ loading: false,
+ success: (res) => {
+ console.log(res);
+ if (res.data) {
+ let isedit = res.data[key];
+ 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);
+ }
+ });
+}
+
+/*zxjvbrtChbI3qH7Mf/D4LZKKft9vCF+qn8daLLegoFwmU57S3Qnjprxtdf2a3YkD*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/body/index.js b/src/dm/dm/delivbill/card/beforeEvents/body/index.js
new file mode 100644
index 0000000..11f3950
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/body/index.js
@@ -0,0 +1,8 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import vfreeBeforeEvent from './vfreeBeforeEvent';
+import vbatchcodeBeforeEvent from './vbatchcodeBeforeEvent';
+import vchangerateBeforeEvent from './vchangerateBeforeEvent';
+import csettlefinorgBeforeEvent from './csettlefinorgBeforeEvent';
+export { vbatchcodeBeforeEvent, vchangerateBeforeEvent, csettlefinorgBeforeEvent, vfreeBeforeEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/body/vbatchcodeBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/body/vbatchcodeBeforeEvent.js
new file mode 100644
index 0000000..54ffd0c
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/body/vbatchcodeBeforeEvent.js
@@ -0,0 +1,41 @@
+/*2QSFMHzFNRTkiDh+kC5tF4pH8PJdnHRlJbFpXylVRTGFvwhK2PYO5iPuTmMPo8cB*/
+import { ajax, toast } from 'nc-lightapp-front';
+export default function(props, constance, vdata) {
+ return new Promise(function(resolve, reject) {
+ let { key, cinventoryid, csendstoreorgid, url, index } = constance;
+ //对应入库单id不为空,不可编辑
+ let data = {
+ key: key,
+ index: index,
+ data_key: vdata,
+ cinventoryid: cinventoryid,
+ csendstoreorgid: csendstoreorgid
+ };
+
+ ajax({
+ url: url,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.data) {
+ let isedit = res.data;
+ if (isedit === false) {
+ resolve(false);
+ }
+ resolve(res.data);
+ } else {
+ resolve(false);
+ }
+ },
+ error: (error) => {
+ toast({
+ color: 'warning',
+ content: error.message
+ });
+ resolve(false);
+ }
+ });
+ });
+}
+
+/*2QSFMHzFNRTkiDh+kC5tF4pH8PJdnHRlJbFpXylVRTGFvwhK2PYO5iPuTmMPo8cB*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/body/vchangerateBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/body/vchangerateBeforeEvent.js
new file mode 100644
index 0000000..ef0ec1a
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/body/vchangerateBeforeEvent.js
@@ -0,0 +1,48 @@
+/*yssId9GKifk+5t8B49BYN6cRVMq1RQtVZyP2wK/UhI0eHEYe4dsFv0qhaZKqynUq*/
+import { ajax, toast } from 'nc-lightapp-front';
+export default function(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let {
+ key, //换算率字段key
+ cinventoryvid,
+ castunitid,
+ url
+ } = constance;
+ if (cinventoryvid && castunitid) {
+ let data = {
+ key: key,
+ params: { cinventoryvid: cinventoryvid, castunitid: castunitid }
+ };
+ ajax({
+ url: url,
+ data: data,
+ loading: false,
+ success: (res) => {
+ if (res.data) {
+ let isedit = res.data[key];
+ 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);
+ }
+ });
+}
+
+/*yssId9GKifk+5t8B49BYN6cRVMq1RQtVZyP2wK/UhI0eHEYe4dsFv0qhaZKqynUq*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/body/vfreeBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/body/vfreeBeforeEvent.js
new file mode 100644
index 0000000..4ebc86d
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/body/vfreeBeforeEvent.js
@@ -0,0 +1,53 @@
+/*VN6N61ClU/zPuqLSyAXrv/eGDVilyv4Ro7xQwZ88yi8=*/
+/**
+ * 物料自由辅助属性编辑前处理
+ * 这类方法必须有返回值,返回true为可编辑,false为不可编辑
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+export default function(constance) {
+ return new Promise(function(resolve, reject) {
+ let { key, cmaterialvid, url } = constance;
+ //物料为空,不可编辑
+ if (!cmaterialvid) {
+ resolve(false);
+ } else {
+ let data = {
+ key: key,
+ params: {
+ cmaterialvid: cmaterialvid,
+ key: key
+ }
+ };
+
+ ajax({
+ url: url,
+ 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);
+ }
+ });
+ }
+ });
+}
+
+/*VN6N61ClU/zPuqLSyAXrv/eGDVilyv4Ro7xQwZ88yi8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/bodyBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/bodyBeforeEvent.js
new file mode 100644
index 0000000..2875ce5
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/bodyBeforeEvent.js
@@ -0,0 +1,359 @@
+/*U41ajtHAnBXc4J9azvHa6RSHSsWpQhGDSN/GtRT0qDY=*/
+import { FIELD, URL, CARD, SEND_EDIT_BODY_FILED, SIGN_EDIT_BODY_FILED, FREEFIELD } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { vbatchcodeBeforeEvent, vchangerateBeforeEvent, csettlefinorgBeforeEvent, vfreeBeforeEvent } from './body';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+export default async function(props, moduleId, key, val, index, record) {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ let cinventoryvid = (record.values[FIELD.cinventoryvid] || {}).value;
+ let vsrcrowno = (record.values[FIELD.vsrcrowno] || {}).value;
+ if (this.state.loadEnterFlag == true) {
+ if (SEND_EDIT_BODY_FILED.includes(key)) {
+ return true;
+ }
+ return false;
+ }
+ if (key == FIELD.csendstoreid) {
+ let csendstoreorgid = (record.values[FIELD.csendstoreorgid] || {}).value;
+ if (csendstoreorgid == null) {
+ return false;
+ } else {
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: csendstoreorgid,
+ isdirectstore: 'N',
+ gubflag: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.StoreGridRefFilter'
+ });
+ return true;
+ }
+ } else if (key == FIELD.creceivestoreid) {
+ let creceivestoreorgid = (record.values[FIELD.creceivestoreorgid] || {}).value;
+ if (creceivestoreorgid == null) {
+ return false;
+ } else {
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: creceivestoreorgid,
+ isdirectstore: 'N',
+ gubflag: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.StoreGridRefFilter'
+ });
+ return true;
+ }
+ } else if (key == FIELD.cinventoryvid) {
+ if (vsrcrowno != null) {
+ return false;
+ } else {
+ let meta = props.meta.getMeta();
+
+ // let item = meta[moduleId].items.find((_item) => _item.attrcode == key);
+ // let item_1 = meta[CARD.good_delivery].items.find((_item) => _item.attrcode == key);
+ // item.isMultiSelectedEnabled = true;
+ // item_1.isMultiSelectedEnabled = true;
+
+ meta[moduleId].items.forEach((_item) => {
+ if (_item.attrcode == key) {
+ _item.isMultiSelectedEnabled = true;
+ }
+ });
+ meta[CARD.good_delivery].items.forEach((_item) => {
+ if (_item.attrcode == key) {
+ _item.isMultiSelectedEnabled = true;
+ }
+ });
+
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null,
+ discountflag: 'N',
+ fee: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.CinventoryGridRefFilter'
+ });
+ props.meta.setMeta(meta);
+ return true;
+ }
+ } else if (key == FIELD.vchangerate) {
+ let inventory = (record.values[FIELD.cinventoryvid] || {}).value;
+ if (!inventory) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000003')); /* 国际化处理: 请先选择物料。*/
+ return false;
+ }
+ let castunitid = (record.values[FIELD.castunitid] || {}).value;
+ if (!castunitid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000004')); /* 国际化处理: 请先选择单位。*/
+ return false;
+ }
+ let cunitid = (record.values[FIELD.cunitid] || {}).value;
+ if (castunitid == cunitid) {
+ return false;
+ } else {
+ let param = {
+ key,
+ cinventoryvid: inventory,
+ castunitid: castunitid,
+ url: URL.bodyBeforeEdit
+ };
+ let data = await vchangerateBeforeEvent.call(this, props, param);
+ return data;
+ }
+ } else if (key == FIELD.vbatchcode) {
+ let cinventoryid = (record.values['cinventoryid'] || {}).value;
+ if (!cinventoryvid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000003')); /* 国际化处理: 请先选择物料。*/
+ return false;
+ }
+ let csendstoreorgid = (record.values[FIELD.csendstoreorgid] || {}).value;
+ if (!csendstoreorgid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000005')); /* 国际化处理: 请首先录入发货库存组织信息!*/
+ return false;
+ }
+ let deliveryvo = props.createMasterChildData(CARD.pagecode, CARD.form, CARD.body);
+ let param = {
+ key,
+ index,
+ cinventoryid: cinventoryid,
+ csendstoreorgid: csendstoreorgid,
+ url: URL.vbatchcodeBefor
+ };
+ let rdata = await vbatchcodeBeforeEvent.call(this, props, param, JSON.stringify(deliveryvo));
+ if (rdata == false) {
+ return false;
+ }
+ //批次参照
+ let meta = props.meta.getMeta();
+ let item = meta[moduleId].items.find((_item) => _item.attrcode == key);
+ item.headRows = rdata.head;
+ item.undealNumCode = 'onhandshouldnum';
+ item.thisNumCode = 'onhandcurrentnum';
+ item.isSatisfyCode = 'fulfiltype';
+ //侧拉批次参照
+ let childItem = meta['good_edit'].items.find((_item) => _item.attrcode == key);
+ childItem.headRows = rdata.head;
+ childItem.undealNumCode = 'onhandshouldnum';
+ childItem.thisNumCode = 'onhandcurrentnum';
+ childItem.isSatisfyCode = 'fulfiltype';
+
+ props.meta.setMeta(meta);
+
+ return true;
+ } else if (key == FIELD.csendaddrid) {
+ //发货地址
+ let vsrctype = (record.values[FIELD.vsrctype] || {}).value;
+ // let meta = props.meta.getMeta();
+ // let item = meta[moduleId].items.find((item) => item.attrcode == key);
+ // let item_1 = meta[CARD.good_delivery].items.find((item) => item.attrcode == key);
+ if (vsrctype != null && vsrctype == '4Y') {
+ return true;
+ }
+ // else {
+ // item.itemtype = 'refer';
+ // //修改参照类型 供应商发货地址
+ // item.refcode = 'uapbd/refer/pub/SupplierAddressGridRef/index';
+ // item_1.itemtype = 'refer';
+ // //修改参照类型 供应商发货地址
+ // item_1.refcode = 'uapbd/refer/pub/SupplierAddressGridRef/index';
+ // }
+ let csendvendorid = (record.values[FIELD.csendvendorid] || {}).value;
+ if (!csendvendorid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000006')); /* 国际化处理: 请先选择发货供应商。*/
+ return false;
+ }
+ //根据供应商过滤
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null,
+ pk_supplier: csendvendorid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.AddrGridRefFilter'
+ });
+ // this.props.meta.setMeta(meta);
+ return true;
+ } else if (key == FIELD.creceiveaddrid) {
+ //收货地址
+ let vsrctype = (record.values[FIELD.vsrctype] || {}).value;
+ // let meta = props.meta.getMeta();
+ // let item = meta[moduleId].items.find((item) => item.attrcode == key);
+ // let item_1 = meta[CARD.good_delivery].items.find((item) => item.attrcode == key);
+ if (vsrctype != null && vsrctype == '4Y') {
+ //修改参照类型 地址簿
+ return true;
+ }
+ // else {
+ // item.itemtype = 'refer';
+ // //修改参照类型 客户收货地址
+ // item.refcode = 'uapbd/refer/customer/CustAddressGridRef/index';
+ // item_1.itemtype = 'refer';
+ // item_1.refcode = 'uapbd/refer/customer/CustAddressGridRef/index';
+ // }
+ let creceivecustid = (record.values[FIELD.creceivecustid] || {}).value;
+ if (!creceivecustid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000007')); /* 国际化处理: 请先选择收货客户。*/
+ return false;
+ }
+ //根据客户过滤
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null,
+ pk_customer: creceivecustid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.AddrGridRefFilter'
+ });
+ //props.meta.setMeta(meta);
+ return true;
+ } else if (key == FIELD.csettlefinorgvid) {
+ // 结算财务组织
+ let param = {
+ key,
+ pk_org: pk_org.value ? pk_org.value : null,
+ url: URL.bodyBeforeEdit
+ };
+ let data = await csettlefinorgBeforeEvent.call(this, props, param);
+ return data;
+ } else if (key == FIELD.csendstoreorgvid) {
+ // 发货仓库组织
+ if (vsrcrowno) {
+ return false;
+ }
+ //检测互斥字段编辑性
+ let value = (record.values[FIELD.csendvendorid] || {}).value;
+ return checkEnable.call(this, props, moduleId, index, FIELD.csendstoreorgvid, FIELD.csendvendorid, value);
+ } else if (key == FIELD.csendvendorvid) {
+ //发货供应商
+ if (vsrcrowno) {
+ return false;
+ }
+ //检测互斥字段编辑性
+ let value = (record.values[FIELD.csendstoreorgvid] || {}).value;
+ let flg = checkEnable.call(this, props, moduleId, index, FIELD.csendvendorid, FIELD.csendstoreorgvid, value);
+ if (flg) {
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null,
+ DataPowerOperationCode: 'SCMDefault',
+ isDataPowerEnable: true
+ });
+ }
+ return flg;
+ } else if (key == FIELD.creceivestoreorgvid) {
+ //收货仓库组织
+ if (vsrcrowno) {
+ return false;
+ }
+ //检测互斥字段编辑性
+ let value = (record.values[FIELD.creceivecustid] || {}).value;
+ return checkEnable.call(this, props, moduleId, index, FIELD.creceivestoreorgvid, FIELD.creceivecustvid, value);
+ } else if (key == FIELD.creceivecustvid) {
+ // 收货客户
+ if (vsrcrowno) {
+ return false;
+ }
+ //检测互斥字段编辑性
+ let value = (record.values[FIELD.creceivestoreorgvid] || {}).value;
+ let isEdit = checkEnable.call(
+ this,
+ props,
+ moduleId,
+ index,
+ FIELD.creceivecustvid,
+ FIELD.creceivestoreorgvid,
+ value
+ );
+ if (isEdit) {
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null
+ });
+ }
+ return isEdit;
+ } else if (key == FIELD.cffileid) {
+ //特征码
+ props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ cmaterialvid: cinventoryvid
+ };
+ }
+ });
+ } else if (key == FIELD.castunitid) {
+ if (cinventoryvid == null) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000003')); /* 国际化处理: 请先选择物料。*/
+ return false;
+ }
+ //根据物料过滤
+ setCondition.call(this, this.props, moduleId, key, {
+ materialPk: cinventoryvid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.UnitGridRefFilter'
+ });
+ return true;
+ } else if (FIELD.numfields.includes(key)) {
+ if (cinventoryvid == null) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000003')); /* 国际化处理: 请先选择物料。*/
+ return false;
+ }
+ } else if (SIGN_EDIT_BODY_FILED.includes(key)) {
+ //子表 货物信息 签收字段的编辑性控制
+ let isShow = this.state.dlgListFlag == true;
+ return isShow;
+ } else {
+ let fixAssts = [
+ 'casscustid',
+ 'casscustvid',
+ 'cdefdoc',
+ 'cprojectid',
+ 'cdmsupplierid',
+ 'cdmsuppliervid',
+ 'cstateid',
+ 'cffileid'
+ ];
+ if (key.indexOf('vfree') == 0 || fixAssts.includes(key)) {
+ let flag;
+ //物料为空时,固定辅助属性和自由辅助属性都不可编辑
+ if (!cinventoryvid) {
+ return false;
+ } else if (fixAssts.includes(key)) {
+ flag = true;
+ } else {
+ flag = await vfreeBeforeEvent({
+ key,
+ cmaterialvid: cinventoryvid,
+ url: URL.bodyBeforeEdit
+ });
+ }
+ if (flag) {
+ marAsstUtils.resetItem.call(this, props, '401400404', CARD.pagecode, moduleId, key, record, FREEFIELD);
+ }
+ return flag;
+ }
+ return true;
+ }
+ return true;
+}
+
+/**
+ * 设置参照过滤条件
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} param
+ */
+function setCondition(props, moduleId, key, param) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return param;
+ }
+ });
+}
+/**
+ * 如果互斥字段为空则该字段和其互斥字段可以编辑,否则该字段不可以编辑
+ * @param {*} props
+ * @param {*} moduleId id
+ * @param {*} index 行索引
+ * @param {*} src_item 源key
+ * @param {*} opp_item 互斥key
+ * @param {*} value 互斥key的值
+ */
+function checkEnable(props, moduleId, index, src_item, opp_item, value) {
+ let enable = false;
+ if (!value) {
+ props.cardTable.setEditableByIndex(moduleId, [ index ], [ src_item, opp_item ], true);
+ enable = true;
+ } else {
+ props.cardTable.setEditableByIndex(moduleId, [ index ], [ src_item ], false);
+ }
+ return enable;
+}
+
+/*U41ajtHAnBXc4J9azvHa6RSHSsWpQhGDSN/GtRT0qDY=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/head/ctrantypeBefore.js b/src/dm/dm/delivbill/card/beforeEvents/head/ctrantypeBefore.js
new file mode 100644
index 0000000..cdf69dd
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/head/ctrantypeBefore.js
@@ -0,0 +1,20 @@
+/*oALPuDjyYMl/pd6a/6TiQdayiXXM+0I750r1lAbdWAM=*/
+import { ajax } from 'nc-lightapp-front';
+import { URL } from '../../../constance';
+export default function(props, data) {
+ return new Promise(function(resolve, reject) {
+ ajax({
+ url: URL.trantypeFilter,
+ data: data,
+ loading: false,
+ async: false,
+ success: (res) => {
+ if (res.data) {
+ resolve(res.data);
+ }
+ }
+ });
+ });
+}
+
+/*oALPuDjyYMl/pd6a/6TiQdayiXXM+0I750r1lAbdWAM=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/head/index.js b/src/dm/dm/delivbill/card/beforeEvents/head/index.js
new file mode 100644
index 0000000..ccdf068
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/head/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import ctrantypeBefore from './ctrantypeBefore';
+
+export { ctrantypeBefore };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/headBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/headBeforeEvent.js
new file mode 100644
index 0000000..73db4c6
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/headBeforeEvent.js
@@ -0,0 +1,89 @@
+/*SXDj+UzVnkytqCOCr56eS7Z6umlwbWXvyE7Br59yj6k=*/
+import { ctrantypeBefore } from './head';
+import { FIELD, UISTATE, CARD, SEND_EDIT_FILED } from '../../constance';
+import vbillcodeBeforeEvent from '../../../pub/utils/vbillcodeBeforeEvent';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+
+export default async function(props, moduleId, key, value, index, record) {
+ let flag = true;
+ if (this.state.loadEnterFlag == true) {
+ if (SEND_EDIT_FILED.includes(key)) {
+ return true;
+ }
+ return false;
+ }
+ switch (key) {
+ case FIELD.ctrantypeid:
+ case FIELD.vtrantypecode:
+ let data = props.createExtCardData(CARD.pagecode, CARD.form, [ CARD.body, CARD.pack ]);
+ let result = await ctrantypeBefore.call(this, props, data);
+ console.log(result);
+ let meta = props.meta.getMeta();
+ let item = meta[moduleId].items.find((_item) => _item.attrcode == key);
+ // 运输类型过滤
+ if (JSON.stringify(result) == '{}') {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: FIELD.billtype
+ };
+ };
+ } else if (result.hasOwnProperty(1)) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: FIELD.billtype,
+ pk_billtypecode: result[1]
+ };
+ };
+ } else if (result.hasOwnProperty(2)) {
+ let pk_org = (this.props.form.getFormItemsValue(CARD.form, FIELD.pk_org) || {}).value;
+ item.queryCondition = () => {
+ return {
+ parentbilltype: FIELD.billtype,
+ busiType: result[2],
+ pk_org: pk_org,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.TranstypeGridRefFilter'
+ };
+ };
+ }
+ props.meta.setMeta(meta);
+ return transtypeUtils.beforeEdit.call(this, key, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ case FIELD.vdriverphone:
+ let cdriverid = props.form.getFormItemsValue(moduleId, FIELD.cdriverid).value;
+ flag = cdriverid == null ? false : true;
+ break;
+ case FIELD.vsenderphone:
+ let csenderid = props.form.getFormItemsValue(moduleId, FIELD.csenderid).value;
+ flag = csenderid == null ? false : true;
+ break;
+ case FIELD.badvfeeflag:
+ let rows = props.cardTable.getVisibleRows(CARD.body);
+ if (!rows || rows.length < 1) {
+ return false;
+ }
+ rows.forEach((row) => {
+ if (row.values.csrcid && row.values.csrcid.value) {
+ flag = false;
+ }
+ });
+ break;
+ case FIELD.vbillcode:
+ let info = {
+ key: FIELD.vbillcode,
+ formareaid: CARD.form,
+ pk_org_key: FIELD.pk_org,
+ billtype: '4804'
+ };
+ vbillcodeBeforeEvent.call(this, info);
+ break;
+ case FIELD.bapsettledflag:
+ case FIELD.naptotalverifymny:
+ case FIELD.nartotalverifymny:
+ case FIELD.bmissionbillflag:
+ flag = false;
+ break;
+ default:
+ }
+ return flag;
+}
+
+/*SXDj+UzVnkytqCOCr56eS7Z6umlwbWXvyE7Br59yj6k=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/index.js b/src/dm/dm/delivbill/card/beforeEvents/index.js
new file mode 100644
index 0000000..38bb7a6
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import headBeforeEvent from './headBeforeEvent';
+import bodyBeforeEvent from './bodyBeforeEvent';
+import packBeforeEvent from './packBeforeEvent';
+export { headBeforeEvent, bodyBeforeEvent, packBeforeEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/beforeEvents/packBeforeEvent.js b/src/dm/dm/delivbill/card/beforeEvents/packBeforeEvent.js
new file mode 100644
index 0000000..ef13040
--- /dev/null
+++ b/src/dm/dm/delivbill/card/beforeEvents/packBeforeEvent.js
@@ -0,0 +1,132 @@
+/*h4SGD31B3f6pJe/ZBzlrK8z337D8lwKr5SDEMKJk3ao=*/
+import { SEND_EDIT_BODY_FILED, CARD, FIELD, URL, SIGN_EDIT_PACK_FILED } from '../../constance';
+import { csettlefinorgBeforeEvent } from './body';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default async function(props, moduleId, key, value, index, record) {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ if (this.state.loadEnterFlag == true) {
+ if (SEND_EDIT_BODY_FILED.includes(key) || key.indexOf('vbdef') != -1) {
+ return true;
+ }
+ return false;
+ }
+ if (key == FIELD.csettlefinorgvid) {
+ // 结算财务组织
+ let param = {
+ key,
+ pk_org: pk_org.value ? pk_org.value : null,
+ url: URL.bodyBeforeEdit
+ };
+ let data = await csettlefinorgBeforeEvent.call(this, props, param);
+ return data;
+ } else if (SIGN_EDIT_PACK_FILED.includes(key)) {
+ //子表 包装信息 签收字段的编辑性控制
+ let isShow = this.state.dlgListFlag == true;
+ return isShow;
+ } else if (key == FIELD.csendstoreid) {
+ let csendstoreorgid = (record.values[FIELD.csendstoreorgid] || {}).value;
+ if (csendstoreorgid == null) {
+ return false;
+ } else {
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: csendstoreorgid,
+ isdirectstore: 'N',
+ gubflag: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.StoreGridRefFilter'
+ });
+ return true;
+ }
+ } else if (key == FIELD.creceivestoreid) {
+ let creceivestoreorgid = (record.values[FIELD.creceivestoreorgid] || {}).value;
+ if (creceivestoreorgid == null) {
+ return false;
+ } else {
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: creceivestoreorgid,
+ isdirectstore: 'N',
+ gubflag: 'N',
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.StoreGridRefFilter'
+ });
+ return true;
+ }
+ } else if (key == FIELD.csendaddrid) {
+ //发货地址
+ let vsrctype = (record.values[FIELD.vsrctype] || {}).value;
+ // let meta = props.meta.getMeta();
+ // let item = meta[moduleId].items.find((_item) => _item.attrcode == key);
+ // let item_1 = meta[CARD.pack_delivery].items.find((_item) => _item.attrcode == key);
+ if (vsrctype != null && vsrctype == '4Y') {
+ return true;
+ }
+ // else {
+ // item.itemtype = 'refer';
+ // //修改参照类型 供应商发货地址
+ // item.refcode = 'uapbd/refer/pub/SupplierAddressGridRef/index';
+ // item_1.itemtype = 'refer';
+ // //修改参照类型 供应商发货地址
+ // item_1.refcode = 'uapbd/refer/pub/SupplierAddressGridRef/index';
+ // }
+ let csendvendorid = (record.values[FIELD.csendvendorid] || {}).value;
+ if (!csendvendorid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000006')); /* 国际化处理: 请先选择发货供应商。*/
+ return false;
+ }
+ //根据供应商过滤
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null,
+ pk_supplier: csendvendorid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.AddrGridRefFilter'
+ });
+ //props.meta.setMeta(meta);
+ return true;
+ } else if (key == FIELD.creceiveaddrid) {
+ //收货地址
+ let vsrctype = (record.values[FIELD.vsrctype] || {}).value;
+ // let meta = props.meta.getMeta();
+ // let item = meta[moduleId].items.find((_item) => _item.attrcode == key);
+ // let item_1 = meta[CARD.pack_delivery].items.find((_item) => _item.attrcode == key);
+ if (vsrctype != null && vsrctype == '4Y') {
+ //修改参照类型 地址簿
+ return true;
+ }
+ // else {
+ // item.itemtype = 'refer';
+ // //修改参照类型 客户收货地址
+ // item.refcode = 'uapbd/refer/customer/CustAddressGridRef/index';
+ // item_1.itemtype = 'refer';
+ // item_1.refcode = 'uapbd/refer/customer/CustAddressGridRef/index';
+ // }
+ let creceivecustid = (record.values[FIELD.creceivecustid] || {}).value;
+ if (!creceivecustid) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000007')); /* 国际化处理: 请先选择收货客户。*/
+ return false;
+ }
+ //根据客户过滤
+ setCondition.call(this, this.props, moduleId, key, {
+ pk_org: pk_org.value ? pk_org.value : null,
+ pk_customer: creceivecustid,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.AddrGridRefFilter'
+ });
+ //props.meta.setMeta(meta);
+ return true;
+ }
+ return true;
+}
+
+/**
+ * 设置参照过滤条件
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} param
+ */
+function setCondition(props, moduleId, key, param) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return param;
+ }
+ });
+}
+
+/*h4SGD31B3f6pJe/ZBzlrK8z337D8lwKr5SDEMKJk3ao=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/addBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/addBtnClick.js
new file mode 100644
index 0000000..eb688cf
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/addBtnClick.js
@@ -0,0 +1,30 @@
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
+/*
+ * 新增
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 13:59:03
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 14:46:32
+ */
+import { viewController } from '../viewController';
+import { UISTATE, URL, CARD } from '../../constance';
+import { initPkOrgAfter } from '../afterEvents/head';
+export default function(props) {
+ let id = props.getUrlParam('id');
+ props.pushTo(URL.cardUrl, {
+ pagecode: CARD.pagecode,
+ status: UISTATE.add,
+ id: id
+ });
+ //执行光标聚焦
+ props.executeAutoFocus();
+ // 清空form区内容
+ props.form.EmptyAllFormValue(CARD.form);
+ //删除表体数据
+ props.cardTable.setTableData(CARD.body, { rows: [] });
+ props.cardTable.setTableData(CARD.pack, { rows: [] });
+ initPkOrgAfter.call(this, this.props);
+ viewController.call(this, this.props);
+}
+
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/addLine.js b/src/dm/dm/delivbill/card/btnClicks/addLine.js
new file mode 100644
index 0000000..8122eb2
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/addLine.js
@@ -0,0 +1,31 @@
+/*qA7sN6T9qIO1rWi81XdeUvtEYF9tbpbfz7Y8YP4B5Zg=*/
+/*
+ * 增行
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 13:59:20
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-02-27 16:48:15
+ */
+import { CARD, FIELD } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+
+/**
+ * 子表增行、插行
+ * @param {*} props
+ * @param {*} index 行索引
+ * @param {*} areaId 表体id
+ */
+export default function(props, index, areaId) {
+ let rowno;
+ if (areaId == CARD.body) {
+ rowno = FIELD.crowno;
+ } else if (areaId == CARD.pack) {
+ rowno = FIELD.cpackrowno;
+ }
+ let pk = (props.form.getFormItemsValue(CARD.form, FIELD.pk) || {}).value;
+ let rowCount = index != undefined ? index : props.cardTable.getNumberOfRows(areaId);
+ props.cardTable.addRow(areaId, rowCount, { [FIELD.pk]: { display: '', value: pk } }, true);
+ RownoUtils.setRowNo(this.props, areaId, rowno);
+}
+
+/*qA7sN6T9qIO1rWi81XdeUvtEYF9tbpbfz7Y8YP4B5Zg=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/backBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/backBtnClick.js
new file mode 100644
index 0000000..4c231cd
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/backBtnClick.js
@@ -0,0 +1,28 @@
+/*6Z/9eaUjZ0gHlRPudBRnSVY2ytoUYnK8xRw4VQ54s/I=*/
+import { CARD, LIST, TRANSFER, URL, UISTATE } from '../../constance';
+import { showBackWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+/**
+ * 返回
+ * @param {*} props
+ */
+export default function(props) {
+ let type = props.getUrlParam(CARD.type); //拉单标识
+ let status = props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ let urlStr = URL.listUrl;
+ let _pagecode = LIST.pagecode;
+ if (type == UISTATE.transfer) {
+ urlStr = URL.refAll;
+ _pagecode = TRANSFER.transferAllCode;
+ }
+ if (status == UISTATE.add || status == UISTATE.edit || status == UISTATE.copy) {
+ showBackWarningDialog({
+ beSureBtnClick: () => {
+ props.pushTo(urlStr, { pagecode: _pagecode });
+ }
+ });
+ } else {
+ props.pushTo(urlStr, { pagecode: _pagecode });
+ }
+}
+
+/*6Z/9eaUjZ0gHlRPudBRnSVY2ytoUYnK8xRw4VQ54s/I=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/cancelBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/cancelBtnClick.js
new file mode 100644
index 0000000..b99d18a
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/cancelBtnClick.js
@@ -0,0 +1,70 @@
+/*pr0tUH1dV1X/xaCwJNPKCMp88UEuyGWprIZeNW+seYU=*/
+/*
+ * 运输单卡片取消
+ * @Author: liangzhyf
+ * @Date: 2020-02-06 14:15:37
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2021-09-27 20:31:34
+ */
+import commonSearch from './commonSearch';
+import { UISTATE, FIELD, CARD, URL, CACHEDATA, TRANSFER } from '../../constance';
+import { changeUrlParam, getCurrentLastId, setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showCancelDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { viewController, changeFormItemsDisabledbyLoadEnter } from '../viewController';
+
+export default function(props) {
+ showCancelDialog({
+ beSureBtnClick: () => {
+ if (!props.form.getFormItemsValue(CARD.form, FIELD.pk_org_v).value) {
+ //组织为空时点取消恢复禁用
+ props.resMetaAfterPkorgEdit();
+ }
+ if (this.state.loadEnterFlag) {
+ this.setState({ loadEnterFlag: false });
+ changeFormItemsDisabledbyLoadEnter.call(this, props, false);
+ }
+ let type = props.getUrlParam(CARD.type); //拉单标识
+ if (type == UISTATE.transfer) {
+ if (props.transferTable.getTransformFormCompleteStatus(CARD.leftarea) == true) {
+ // 表单返回上一次的值
+ props.form.cancel(CARD.form);
+ // 表格返回上一次的值
+ props.cardTable.resetTableData(CARD.body);
+ props.cardTable.resetTableData(CARD.pack);
+ // this.transferStatus[this.curindex] = 'browse';
+ props.pushTo(URL.cardUrl, {
+ pagecode: CARD.pagecode,
+ type: type,
+ status: 'browse',
+ id: props.getUrlParam(FIELD.id)
+ });
+ viewController.call(this, this.props);
+ } else {
+ if (props.transferTable.getTransformFormAmount(CARD.leftarea) == 1) {
+ window.onbeforeunload = null;
+ //只剩一个,点了取消,返回到列表
+ props.pushTo(URL.refAll, { pagecode: TRANSFER.transferAllCode });
+ } else {
+ // this.setState({ pasteRowno: null });
+ props.cardTable.selectAllRows(CARD.body, false);
+ props.cardTable.selectAllRows(CARD.pack, false);
+ props.transferTable.setTransformFormStatus(CARD.leftarea, {
+ status: false,
+ onChange: (current, next) => {}
+ });
+ }
+ }
+ } else {
+ let id = props.getUrlParam(FIELD.id);
+ if (!id) {
+ id = getCurrentLastId(CACHEDATA.listCacheKey);
+ }
+ changeUrlParam(props, { status: UISTATE.browse, id: id });
+ commonSearch.call(this, this.props);
+ }
+ setDefData(CACHEDATA.tempCardCacheKey, 'tempsave', false);
+ }
+ });
+}
+
+/*pr0tUH1dV1X/xaCwJNPKCMp88UEuyGWprIZeNW+seYU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/cancelTransferBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/cancelTransferBtnClick.js
new file mode 100644
index 0000000..4324f30
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/cancelTransferBtnClick.js
@@ -0,0 +1,24 @@
+/*wXftKOHT6ouq8HUwGOdXf9c0zzh4cT4/dEu78hYGB0xwypGgQLtj7GFkGOPJC53K*/
+import { CARD, URL, LIST } from '../../constance';
+import { showQuitTransferWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+/**
+ * 退出转单
+ * @param {*} props
+ */
+export default function(props) {
+ //推单
+ let allprocess = props.transferTable.getTransformFormStatus(CARD.leftarea);
+ if (allprocess === false) {
+ showQuitTransferWarningDialog({
+ beSureBtnClick: () => {
+ this.props.pushTo(URL.listUrl, { pagecode: LIST.pagecode });
+ window.onbeforeunload = null;
+ }
+ });
+ } else {
+ this.props.pushTo(URL.listUrl, { pagecode: LIST.pagecode });
+ window.onbeforeunload = null;
+ }
+}
+
+/*wXftKOHT6ouq8HUwGOdXf9c0zzh4cT4/dEu78hYGB0xwypGgQLtj7GFkGOPJC53K*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/commonSearch.js b/src/dm/dm/delivbill/card/btnClicks/commonSearch.js
new file mode 100644
index 0000000..329b0b8
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/commonSearch.js
@@ -0,0 +1,83 @@
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
+/*
+ * 初始化,刷新处理
+ * @Author: liangzhyf
+ * @Date: 2020-01-14 19:27:02
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2021-08-26 20:05:33
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, CARD, FIELD, UISTATE, CACHEDATA } from '../../constance';
+import { viewController, setFieldValue } from '../viewController';
+import { showSuccessInfo, showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { updateCacheData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+export default function(props, isrefresh) {
+ let pk = props.getUrlParam(FIELD.id);
+ //是否暂存取消
+ let tempsave = getDefData(CACHEDATA.tempCardCacheKey, 'tempsave');
+ if ((pk == null || pk == 'undefined' || pk == 'null') && !tempsave) {
+ pk = this.props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ pk = pk && pk.value;
+ }
+
+ //pk = pk ? pk : props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+
+ if (pk) {
+ let data = {
+ pk: pk,
+ pageid: CARD.pagecode
+ };
+ ajax({
+ url: URL.queryCard,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ let type = props.getUrlParam(CARD.type); //拉单标识
+ if (type == 'transfer') {
+ //为解决拉单刷新后数据覆盖问题
+ let leftData = props.transferTable.getTransferListValue(CARD.leftarea); //获取左侧拉单全部数据
+ if (leftData.transformForm.list) {
+ leftData.transformForm.list.forEach((item) => {
+ if (
+ item.data.head.form.rows[0].values.cdelivbill_hid.value ==
+ data.head.form.rows[0].values.cdelivbill_hid.value
+ ) {
+ item.data = data;
+ }
+ });
+ }
+ }
+ setFieldValue.call(this, props, data);
+ //单据追溯返回列表时显示单据
+ updateCacheData(this.props, FIELD.pk, pk, data, CARD.form, CACHEDATA.listCacheKey);
+ //判断是否是刷新
+ if (isrefresh) {
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000008')); /* 国际化处理: 刷新成功*/
+ viewController.call(this, props, UISTATE.browse);
+ } else {
+ if (this.dlgSuccess) {
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000009')); /* 国际化处理: 签收录入成功*/
+ }
+ viewController.call(this, props);
+ }
+ this.dlgSuccess = false; //重置标识
+ } else {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000010')); /* 国际化处理: 当前单据已被删除,请返回列表*/
+ }
+ }
+ }
+ });
+ } else {
+ props.form.EmptyAllFormValue(CARD.form);
+ props.cardTable.setTableData(CARD.body, { rows: [] });
+ props.cardTable.setTableData(CARD.pack, { rows: [] });
+ viewController.call(this, this.props);
+ return;
+ }
+}
+
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/copyBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/copyBtnClick.js
new file mode 100644
index 0000000..f5df26c
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/copyBtnClick.js
@@ -0,0 +1,41 @@
+/*j5Rddi+EiXr6lL+2HQtAze8DGIPb0+m/t4EY6Wg6ZpQ=*/
+/*
+ * 运输单卡片复制
+ * @Author: liangzhyf
+ * @Date: 2020-02-07 16:32:10
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-09-23 11:00:10
+ */
+import { ajax } from 'nc-lightapp-front';
+import { CARD, FIELD, URL, UISTATE } from '../../constance';
+import { viewController, setFieldValue } from '../viewController';
+import { changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let pk = props.getUrlParam(FIELD.id);
+ pk = pk ? pk : props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ let data = {
+ pk: pk,
+ pageid: CARD.pagecode
+ };
+ ajax({
+ url: URL.copy,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ setFieldValue.call(this, props, data);
+ changeUrlParam(props, { status: UISTATE.copy, id: pk });
+ viewController.call(this, props, UISTATE.copy);
+ } else {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000010')); /* 国际化处理: 当前单据已被删除,请返回列表*/
+ }
+ }
+ }
+ });
+}
+
+/*j5Rddi+EiXr6lL+2HQtAze8DGIPb0+m/t4EY6Wg6ZpQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/copyGoodBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/copyGoodBtnClick.js
new file mode 100644
index 0000000..c48e47b
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/copyGoodBtnClick.js
@@ -0,0 +1,31 @@
+/*wcZG4mcDlX2U6Bfe4kgCW2cDX7Hq+dF6ukj8pKMqFpI=*/
+/*
+ * 卡片复制收发货信息
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:00:30
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-09-23 11:00:16
+ */
+import { CARD } from '../../constance';
+import { buttonController } from '../viewController';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let rows = props.cardTable.getCheckedRows(CARD.body);
+ if (rows.length < 1) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000011')); /* 国际化处理: 请选中一行记录*/
+ return;
+ }
+ //清空缓存
+ if (this.pasteRowno.length > 0) {
+ this.pasteRowno = [];
+ }
+ rows.forEach((row, num) => {
+ this.pasteRowno[num] = row.data.values;
+ });
+ this.pasteFlag = true;
+ props.cardTable.selectAllRows(CARD.body, false);
+ buttonController.setCardButtonVisiable.call(this, props);
+}
+
+/*wcZG4mcDlX2U6Bfe4kgCW2cDX7Hq+dF6ukj8pKMqFpI=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/copyLine.js b/src/dm/dm/delivbill/card/btnClicks/copyLine.js
new file mode 100644
index 0000000..ae170ae
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/copyLine.js
@@ -0,0 +1,24 @@
+/*rE+dHLlQmdMxcUE30u4od7NkVvKr/G2SsjzFzr3YKRU=*/
+/*
+ * 卡片表体复制行
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:01:03
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 15:13:42
+ */
+import { BUTTON, CARD } from '../../constance';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+
+/**
+ * 子表复制行
+ * @param {*} props
+ */
+export default function(props, areaId) {
+ if (areaId == CARD.body) {
+ rowCopyPasteUtils.copyRows.call(this, props, areaId, BUTTON.cardBodyInit, BUTTON.cardBodyCopy);
+ } else if (areaId == CARD.pack) {
+ rowCopyPasteUtils.copyRows.call(this, props, areaId, BUTTON.cardBodyInitPack, BUTTON.cardBodyCopyPack);
+ }
+}
+
+/*rE+dHLlQmdMxcUE30u4od7NkVvKr/G2SsjzFzr3YKRU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/copyPasteLast.js b/src/dm/dm/delivbill/card/btnClicks/copyPasteLast.js
new file mode 100644
index 0000000..e802e3e
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/copyPasteLast.js
@@ -0,0 +1,41 @@
+/*fF59yIjNmxJ+/LJhDM8MzhF6+DhGJ8vvO9/LtkuVSyc=*/
+/*
+ * 卡片粘贴末行
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:01:35
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 15:31:30
+ */
+import { buttonController } from '../viewController';
+import { CARD, FIELD, BUTTON } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+
+/**
+ * 复制行 粘贴至末行
+ * @param {*} props
+ * @param {*} areaId 表体id
+ */
+export default function(props, areaId) {
+ // 效率优化开启
+ props.beforeUpdatePage();
+ if (areaId == CARD.body) {
+ rowCopyPasteUtils.pasteRowsToTail.call(this, props, areaId, BUTTON.cardBodyInit, BUTTON.cardBodyCopy, [
+ FIELD.crowno,
+ FIELD.bpk
+ ]);
+ RownoUtils.setRowNo(props, areaId, FIELD.crowno);
+ } else if (areaId == CARD.pack) {
+ rowCopyPasteUtils.pasteRowsToTail.call(this, props, areaId, BUTTON.cardBodyInitPack, BUTTON.cardBodyCopyPack, [
+ FIELD.cpackrowno,
+ FIELD.cpackbillid
+ ]);
+ RownoUtils.setRowNo(props, areaId, FIELD.cpackrowno);
+ }
+
+ buttonController.setButtonsEnable.call(this, props);
+ // 效率优化关闭
+ props.updatePage(CARD.head, areaId);
+}
+
+/*fF59yIjNmxJ+/LJhDM8MzhF6+DhGJ8vvO9/LtkuVSyc=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/copyPasteThis.js b/src/dm/dm/delivbill/card/btnClicks/copyPasteThis.js
new file mode 100644
index 0000000..14c79bf
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/copyPasteThis.js
@@ -0,0 +1,46 @@
+/*4tmdXMYcPNwGldMXzM2R0x5aJAP1/oMowsSesb8jNp0=*/
+/*
+ * 卡片表体粘贴至此
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:02:41
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 15:31:02
+ */
+import { buttonController } from '../viewController';
+import { FIELD, BUTTON, CARD } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+
+/**
+ * 复制行 粘贴至此
+ * @param {*} props
+ * @param {*} index 行索引
+ * @param {*} areaId 表体id
+ */
+export default function(props, index, areaId) {
+ // 效率优化开启
+ props.beforeUpdatePage();
+ if (areaId == CARD.body) {
+ rowCopyPasteUtils.pasteRowsToIndex.call(this, props, areaId, index, BUTTON.cardBodyInit, BUTTON.cardBodyCopy, [
+ FIELD.crowno,
+ FIELD.bpk
+ ]);
+ RownoUtils.setRowNo(props, areaId, FIELD.crowno);
+ } else if (areaId == CARD.pack) {
+ rowCopyPasteUtils.pasteRowsToIndex.call(
+ this,
+ props,
+ areaId,
+ index,
+ BUTTON.cardBodyInitPack,
+ BUTTON.cardBodyCopyPack,
+ [ FIELD.cpackrowno, FIELD.cpackbillid ]
+ );
+ RownoUtils.setRowNo(props, areaId, FIELD.cpackrowno);
+ }
+ buttonController.setButtonsEnable.call(this, props);
+ // 效率优化关闭
+ props.updatePage(CARD.form, areaId);
+}
+
+/*4tmdXMYcPNwGldMXzM2R0x5aJAP1/oMowsSesb8jNp0=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/createPackBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/createPackBtnClick.js
new file mode 100644
index 0000000..c12e690
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/createPackBtnClick.js
@@ -0,0 +1,155 @@
+/*cGeO6zTpQx43hM8v50xBC6HYKbVtwnmzyQeh0Sv42K8=*/
+/*
+ * 卡片创建包装分类
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:03:05
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-05-21 15:31:08
+ */
+import { ajax } from 'nc-lightapp-front';
+import { CARD, FIELD, URL } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { showWarningInfo, showInfoDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let rows = props.cardTable.getVisibleRows(CARD.body);
+ let newRows = clearDelivEmptyRow.call(this, rows);
+ if (newRows.length == 0) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000012')); /* 国际化处理: 当前运输任务为空!*/
+ return;
+ }
+ // 检测表体数量,发货地址,收货地址不能为空
+ let flag = check.call(this, newRows);
+ if (!flag) {
+ return;
+ }
+ // 所选组织
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ let data = {
+ pk_org: pk_org,
+ rows: newRows
+ };
+ let packrows = props.cardTable.getVisibleRows(CARD.pack);
+ //检测包装信息页签,如果有值检测完整性,有完整的包装信息,提示用户是否覆盖,包装信息为空直接生成包装信息
+
+ let pflag = checkPackTable.call(this, props, packrows, data);
+ if (pflag) {
+ doAjax(props, data);
+ }
+}
+/**
+ * 根据物料字段过滤删除空行,如果没有物料信息当做空行处理, count赋值为非空行行数
+ */
+function clearDelivEmptyRow(rows) {
+ let newRows = [];
+ rows.forEach((row, i) => {
+ let cvalue = (row.values[FIELD.cinventoryid] || {}).value;
+ if (cvalue) {
+ newRows[i] = row;
+ }
+ });
+ return newRows;
+}
+
+/**
+ * 检测运输任务每行的数量、发货地址、收货地址不能为空
+ * @param {*} newRows
+ */
+function check(newRows) {
+ let flag = true;
+ newRows.every((row, i) => {
+ let cvalue = (row.values[FIELD.nastnum] || {}).value;
+ if (!cvalue) {
+ let m = i + 1;
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000014', { 0: m })); /* 国际化处理: 表体第{0}行[数量]不能为空*/
+ flag = false;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ return flag;
+}
+
+/**
+ * 检测包装信息页签是否有值,有值的话判断其是否录入完整,如果已经存在包装信息让用户确定是否覆盖
+ */
+function checkPackTable(props, rows, data) {
+ let newRows = clearPackEmptyRow.call(this, props, rows);
+ // let errMsg;
+ // newRows.every((row, i) => {
+ // let a = (row.values[FIELD.cpackid] || {}).value;
+ // let m = i + 1;
+ // if (!a) {
+ // errMsg = getLangByResId(this, '4014DELIVBILL-000016', { 0: m }); /* 国际化处理: 包装信息第{0}行[包装分类]不能为空!*/
+ // return false;
+ // }
+ // let b = (row.values[FIELD.npacknum] || {}).value;
+ // if (!b) {
+ // errMsg = getLangByResId(this, '4014DELIVBILL-000017', { 0: m }); /* 国际化处理: 包装信息第{0}行[包装件数]不能为空! */
+ // return false;
+ // }
+ // return true;
+ // });
+ // if (errMsg) {
+ // showWarningInfo(errMsg);
+ // return false;
+ // }
+ // 存在完整的包装信息,提示用户是否覆盖
+ if (newRows.length > 0) {
+ showInfoDialog(getLangByResId(this, '4014DELIVBILL-000018'), getLangByResId(this, '4014DELIVBILL-000019'), {
+ /* 国际化处理: 生成包装信息覆盖提示,已经存在包装信息,生成包装信息将覆盖原包装信息,是否继续?*/
+ beSureBtnClick: () => {
+ let rowCount = props.cardTable.getNumberOfRows(CARD.pack);
+ let delarr = [];
+ for (let i = 0; i < rowCount; i++) {
+ delarr.push(i);
+ }
+ props.cardTable.delRowsByIndex(CARD.pack, delarr);
+ doAjax(props, data);
+ }
+ });
+ return false;
+ } else {
+ return true;
+ }
+}
+
+function clearPackEmptyRow(props, rows) {
+ let newRows = [];
+ rows.forEach((row, i) => {
+ let a = row.values[FIELD.cpackid].value;
+ let b = row.values[FIELD.npacknum].value;
+ let c = row.values[FIELD.csendaddrdocid].value;
+ let d = row.values[FIELD.csendaddrid].value;
+ if (a || b || c || d) {
+ newRows[i] = row;
+ }
+ });
+ return newRows;
+}
+
+function doAjax(props, data) {
+ // 根据运输任务得到包装信息
+ ajax({
+ url: URL.createPack,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data && data[CARD.pack].rows) {
+ let pk = (props.form.getFormItemsValue(CARD.form, FIELD.pk) || {}).value;
+ data[CARD.pack].rows.forEach((row, i) => {
+ let rowCount = props.cardTable.getNumberOfRows(CARD.pack);
+ row.values[FIELD.pk] = { display: pk, value: pk };
+ props.cardTable.addRow(CARD.pack, rowCount, row.values, true);
+ });
+ RownoUtils.setRowNo(props, CARD.pack, FIELD.cpackrowno);
+ }
+ }
+ }
+ });
+}
+
+/*cGeO6zTpQx43hM8v50xBC6HYKbVtwnmzyQeh0Sv42K8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/delLine.js b/src/dm/dm/delivbill/card/btnClicks/delLine.js
new file mode 100644
index 0000000..84fe231
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/delLine.js
@@ -0,0 +1,32 @@
+/*E2aA2JHoQjZopwGQ26wYz9rTVf5U3mJQo8lxPOPc9AY=*/
+/*
+ * 卡片表体删行
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:03:51
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-02-25 14:03:51
+ */
+import buttonController from '../viewController/buttonController';
+
+/**
+ * 子表删行
+ * @param {*} props
+ * @param {*} index 行索引
+ * @param {*} areaId 表体id
+ */
+export default function(props, index, areaId) {
+ if (index != undefined) {
+ props.cardTable.delRowsByIndex(areaId, index);
+ } else {
+ let rows = props.cardTable.getCheckedRows(areaId);
+ let indexes = []; // 行索引
+ rows.forEach((row) => {
+ indexes.push(row.index);
+ });
+ props.cardTable.delRowsByIndex(areaId, indexes);
+ }
+ //设置按钮的可不可用
+ buttonController.setButtonsEnable.call(this, props);
+}
+
+/*E2aA2JHoQjZopwGQ26wYz9rTVf5U3mJQo8lxPOPc9AY=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/deleteBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/deleteBtnClick.js
new file mode 100644
index 0000000..8e44976
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/deleteBtnClick.js
@@ -0,0 +1,82 @@
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
+/*
+ * 运输单卡片删除
+ * @Author: liangzhyf
+ * @Date: 2020-02-06 14:52:25
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-18 13:45:25
+ */
+import { ajax } from 'nc-lightapp-front';
+import commonSearch from './commonSearch';
+import { viewController } from '../viewController';
+import { CARD, FIELD, URL, UISTATE, CACHEDATA, TRANSFER } from '../../constance';
+import { deleteCacheData, getNextId, changeUrlParam, getCurrentLastId } from '../../../../../scmpub/scmpub/pub/cache';
+import { showSuccessInfo, showSingleDeleteDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getPkTsDataIncludeBodyInExtCard } from '../../../pub/utils/operateDataUtil';
+export default function(props) {
+ let data = getPkTsDataIncludeBodyInExtCard.call(this, props, {
+ headCode: CARD.form,
+ bodyCode1: CARD.body,
+ bodyCode2: CARD.pack,
+ hidField: FIELD.pk,
+ bidField1: FIELD.bpk,
+ bidField2: FIELD.cpackbillid
+ });
+
+ showSingleDeleteDialog({
+ beSureBtnClick: () => {
+ doAction.call(this, props, data);
+ }
+ });
+}
+function doAction(props, data) {
+ ajax({
+ url: URL.delete,
+ async: false,
+ data: data,
+ success: (res) => {
+ if (res && res.success) {
+ let pk = data.infos[0].id;
+ //缓存中获取下条记录的主键
+ let nextId = getNextId(props, pk, CACHEDATA.listCacheKey);
+ if (!nextId) {
+ nextId = getCurrentLastId(CACHEDATA.listCacheKey);
+ }
+ if (pk == nextId) {
+ nextId = null;
+ }
+ //删除缓存中的记录
+ deleteCacheData(props, FIELD.pk, pk, CACHEDATA.listCacheKey);
+ //转单多单编辑处理
+ let type = props.getUrlParam(CARD.type); //拉单标识
+ if (type == UISTATE.transfer) {
+ if (props.transferTable.getTransformFormAmount(CARD.leftarea) == 1) {
+ props.pushTo(URL.refAll, { pagecode: TRANSFER.transferAllCode });
+ } else {
+ props.transferTable.setTransformFormStatus(CARD.leftarea, {
+ status: false,
+ onChange: (current, next, currentIndex) => {}
+ });
+ }
+ } else {
+ if (nextId) {
+ changeUrlParam(props, { status: UISTATE.browse, id: nextId, type: '' });
+ commonSearch.call(this, props, false);
+ } else {
+ props.beforeUpdatePage(CARD.form, CARD.body);
+ props.form.EmptyAllFormValue(CARD.form);
+ props.cardTable.setTableData(CARD.body, { rows: [] });
+ props.cardTable.setTableData(CARD.pack, { rows: [] });
+ props.updatePage(CARD.form, CARD.body);
+ changeUrlParam(props, { status: UISTATE.browse, id: '', type: '' });
+ viewController.call(this, props);
+ }
+ }
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000020')); /* 国际化处理: 删除成功!*/
+ }
+ }
+ });
+}
+
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/editBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/editBtnClick.js
new file mode 100644
index 0000000..ff1b956
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/editBtnClick.js
@@ -0,0 +1,32 @@
+/*rzxqFeC1Q4Nf7h12KpqtZffmls+sYlNzLaSthb2yEsQ=*/
+/*
+ * 运输单卡片修改
+ * @Author: liangzhyf
+ * @Date: 2020-02-05 13:09:59
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-17 13:48:18
+ */
+import { ajax } from 'nc-lightapp-front';
+import { viewController } from '../viewController';
+import { UISTATE, CARD, FIELD, URL } from '../../constance';
+import { changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache';
+
+export default function(props) {
+ let id = props.getUrlParam(FIELD.id) || props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ if (id) {
+ ajax({
+ url: URL.permissioncheck,
+ data: { actioncode: 'edit', id: id },
+ method: 'post',
+ success: (res) => {
+ //权限校验成功后修改
+ props.cardTable.selectAllRows(CARD.body, false);
+ props.cardTable.selectAllRows(CARD.pack, false);
+ changeUrlParam(props, { status: UISTATE.edit });
+ viewController.call(this, props, UISTATE.edit);
+ }
+ });
+ }
+}
+
+/*rzxqFeC1Q4Nf7h12KpqtZffmls+sYlNzLaSthb2yEsQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/fileBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/fileBtnClick.js
new file mode 100644
index 0000000..dd84efb
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/fileBtnClick.js
@@ -0,0 +1,16 @@
+/*J6frW/si/EpkjTwKn+gUiYCnhNmTsLb+0akJqjTbC48=*/
+/*
+ * 附件管理按钮事件
+ * @Author: liangzhyf
+ * @Date: 2020-03-16 10:37:00
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-03-18 09:14:14
+ */
+import { CARD, FIELD } from '../../constance';
+
+export default function(props) {
+ let pk = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ this.setState({ showUploader: true, billid: pk });
+}
+
+/*J6frW/si/EpkjTwKn+gUiYCnhNmTsLb+0akJqjTbC48=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/index.js b/src/dm/dm/delivbill/card/btnClicks/index.js
new file mode 100644
index 0000000..146bd6c
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/index.js
@@ -0,0 +1,198 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import addLine from './addLine';
+import delLine from './delLine';
+import copyLine from './copyLine';
+import maintain from './maintain';
+import resetLine from './resetLine';
+import linkQuery from './linkQuery';
+import refBtnClick from './refBtnClick';
+import pasteCancel from './pasteCancel';
+import addBtnClick from './addBtnClick';
+import backBtnClick from './backBtnClick';
+import commonSearch from './commonSearch';
+import editBtnClick from './editBtnClick';
+import saveBtnClick from './saveBtnClick';
+import copyBtnClick from './copyBtnClick';
+import fileBtnClick from './fileBtnClick';
+import pageInfoClick from './pageInfoClick';
+import printBtnClick from './printBtnClick';
+import copyPasteThis from './copyPasteThis';
+import copyPasteLast from './copyPasteLast';
+import transferSearch from './transferSearch';
+import cancelBtnClick from './cancelBtnClick';
+import deleteBtnClick from './deleteBtnClick';
+import missionBtnClick from './missionBtnClick';
+import copyGoodBtnClick from './copyGoodBtnClick';
+import pasteGoodBtnClick from './pasteGoodBtnClick';
+import loadEnterBtnClick from './loadEnterBtnClick';
+import signEnterBtnClick from './signEnterBtnClick';
+import paySettleBtnClick from './paySettleBtnClick';
+import refAddLineBtnClick from './refAddLineBtnClick';
+import createPackBtnClick from './createPackBtnClick';
+import mergeDisplyBtnClick from './mergeDisplyBtnClick';
+import cancelTransferBtnClick from './cancelTransferBtnClick';
+import refAddLineDefineBtnClick from './refAddLineDefineBtnClick';
+import { BUTTON, ACTION, CARD, UISTATE, FIELD, LIST } from '../../constance';
+import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
+import tempStorageBtnClick from './tempStorageBtnClick';
+
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.add:
+ addBtnClick.call(this, props);
+ break;
+ case BUTTON.ref:
+ refBtnClick.call(this, props);
+ break;
+ case BUTTON.delete:
+ deleteBtnClick.call(this, props);
+ break;
+ case BUTTON.edit:
+ editBtnClick.call(this, props);
+ break;
+ case BUTTON.refresh:
+ commonSearch.call(this, props, true);
+ break;
+ case BUTTON.file:
+ fileBtnClick.call(this, props);
+ break;
+ case BUTTON.print:
+ printBtnClick.call(this, props);
+ break;
+ case BUTTON.output:
+ printBtnClick.call(this, props, true);
+ break;
+ case BUTTON.queryAboutBusiness:
+ linkQuery.call(this, props);
+ break;
+ case BUTTON.save:
+ saveBtnClick.call(this, props);
+ break;
+ case BUTTON.cancel:
+ cancelBtnClick.call(this, props);
+ break;
+ case BUTTON.cancelTransfer:
+ cancelTransferBtnClick.call(this, props);
+ break;
+ case BUTTON.approve:
+ maintain.call(this, props, ACTION.approve);
+ break;
+ case BUTTON.unApprove:
+ maintain.call(this, props, ACTION.unApprove);
+ break;
+ case BUTTON.copy:
+ copyBtnClick.call(this, props);
+ break;
+ case BUTTON.charge:
+ maintain.call(this, props, ACTION.apFeeCalculate);
+ break;
+ case BUTTON.unCharge:
+ maintain.call(this, props, ACTION.unApFeeCalculate);
+ break;
+ case BUTTON.loadEnter:
+ loadEnterBtnClick.call(this, props);
+ break;
+ case BUTTON.signEnter:
+ signEnterBtnClick.call(this, props);
+ break;
+ case BUTTON.mission:
+ missionBtnClick.call(this, props);
+ break;
+ case BUTTON.paySettle:
+ paySettleBtnClick.call(this, props);
+ break;
+ case BUTTON.refAddLine:
+ refAddLineBtnClick.call(this, props);
+ break;
+ case BUTTON.copyGood:
+ copyGoodBtnClick.call(this, props);
+ break;
+ case BUTTON.pasteGood:
+ pasteGoodBtnClick.call(this, props);
+ break;
+ case BUTTON.createPack:
+ createPackBtnClick.call(this, props);
+ break;
+ case BUTTON.addLine:
+ addLine.call(this, props, null, CARD.body);
+ break;
+ case BUTTON.delLine:
+ delLine.call(this, props, index, CARD.body);
+ break;
+ case BUTTON.copyLine:
+ copyLine.call(this, props, CARD.body);
+ break;
+ case BUTTON.resetLine:
+ resetLine.call(this, props, CARD.body);
+ break;
+ case BUTTON.insertLine:
+ addLine.call(this, props, index, CARD.body);
+ break;
+ case BUTTON.pasteCancel:
+ pasteCancel.call(this, props, CARD.body);
+ break;
+ case BUTTON.pasteThis:
+ copyPasteThis.call(this, props, index, CARD.body);
+ break;
+ case BUTTON.pasteLast:
+ copyPasteLast.call(this, props, CARD.body);
+ break;
+ case BUTTON.addLinePack:
+ addLine.call(this, props, null, CARD.pack);
+ break;
+ case BUTTON.delLinePack:
+ delLine.call(this, props, index, CARD.pack);
+ break;
+ case BUTTON.copyLinePack:
+ copyLine.call(this, props, CARD.pack);
+ break;
+ case BUTTON.resetLinePack:
+ resetLine.call(this, props, CARD.pack);
+ break;
+ case BUTTON.insertLinePack:
+ addLine.call(this, props, index, CARD.pack);
+ break;
+ case BUTTON.pasteCancelPack:
+ pasteCancel.call(this, props, CARD.pack);
+ break;
+ case BUTTON.pasteThisPack:
+ copyPasteThis.call(this, props, index, CARD.pack);
+ break;
+ case BUTTON.pasteLastPack:
+ copyPasteLast.call(this, props, CARD.pack);
+ break;
+ case BUTTON.back:
+ backBtnClick.call(this, props);
+ break;
+ case BUTTON.mergeDisplay:
+ mergeDisplyBtnClick.call(this, props);
+ break;
+ case BUTTON.openBrowse: //浏览展开
+ props.cardTable.toggleRowView(CARD.body, record);
+ break;
+ case BUTTON.openEdit: //编辑展开
+ props.cardTable.openModel(CARD.body, UISTATE.edit, record, index);
+ break;
+ case BUTTON.openBrowsePack: //浏览展开
+ props.cardTable.toggleRowView(CARD.pack, record);
+ break;
+ case BUTTON.openEditPack: //编辑展开
+ props.cardTable.openModel(CARD.pack, UISTATE.edit, record, index);
+ break;
+ //打印次数查询
+ case BUTTON.PrintCountQuery:
+ let CONST = { hid: FIELD.pk, area: CARD.form };
+ printCountQuery.call(this, props, { type: 2, CONST, modal: 'code-config' });
+ break;
+ case BUTTON.TemporaryStorage: //暂存
+ tempStorageBtnClick.call(this, props);
+ break;
+ case BUTTON.ShowDraft: //显示草稿
+ this.setState({ showTemp: true });
+ break;
+ }
+}
+
+export { btnClick, commonSearch, transferSearch, pageInfoClick, copyBtnClick, refAddLineDefineBtnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/linkQuery.js b/src/dm/dm/delivbill/card/btnClicks/linkQuery.js
new file mode 100644
index 0000000..482beac
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/linkQuery.js
@@ -0,0 +1,10 @@
+/*faNHBl/08Ob96KxlSvQ7uRm5OExY240hoO1wprrdXbs=*/
+import { CARD, FIELD } from '../../constance';
+
+export default function(props) {
+ //单据追溯
+ let id = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ this.setState({ pk: id, showTrack: true });
+}
+
+/*faNHBl/08Ob96KxlSvQ7uRm5OExY240hoO1wprrdXbs=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/loadEnterBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/loadEnterBtnClick.js
new file mode 100644
index 0000000..762afa7
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/loadEnterBtnClick.js
@@ -0,0 +1,20 @@
+/*QDHrMIJyuXSVw7IPZDGlSZU8a94A1J1qrJzMmNzSAPg=*/
+/*
+ * 装车录入
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:04:28
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-16 15:40:21
+ */
+import { viewController, changeFormItemsDisabledbyLoadEnter } from '../viewController';
+import { buttonController } from '../viewController';
+import { UISTATE } from '../../constance';
+
+export default function(props) {
+ this.setState({ loadEnterFlag: true }); //装车录入标识开启
+ viewController.call(this, props, UISTATE.edit);
+ buttonController.changeBodyBtnVisabled.call(this, props);
+ changeFormItemsDisabledbyLoadEnter.call(this, props, true);
+}
+
+/*QDHrMIJyuXSVw7IPZDGlSZU8a94A1J1qrJzMmNzSAPg=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/maintain.js b/src/dm/dm/delivbill/card/btnClicks/maintain.js
new file mode 100644
index 0000000..da64d3a
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/maintain.js
@@ -0,0 +1,111 @@
+/*VWE8DgXdssq9/UDPaMvyRjf8lG8xR6Ym/qAr4obb4hk=*/
+/*
+ * 审批、取消审批,运费计算,取消计算
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:05:07
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-11-10 16:42:49
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { viewController } from '../viewController';
+import { updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { FIELD, URL, ACTION, CARD, UISTATE, CACHEDATA } from '../../constance';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getPkTsDataIncludeBodyInExtCard } from '../../../pub/utils/operateDataUtil';
+/**
+ * 审批取消审批
+ * @param {*} props
+ * @param {*} record
+ * @param {*} index
+ * @param {*} action
+ */
+export default function(props, action) {
+ var str;
+ var url;
+ switch (action) {
+ case ACTION.approve:
+ str = getLangByResId(this, '4014DELIVBILL-000021'); /* 国际化处理: 审批*/
+ url = URL.approve;
+ break;
+ case ACTION.unApprove:
+ str = getLangByResId(this, '4014DELIVBILL-000022'); /* 国际化处理: 取消审批*/
+ url = URL.unApprove;
+ break;
+ case ACTION.apFeeCalculate:
+ str = getLangByResId(this, '4014DELIVBILL-000023'); /* 国际化处理: 应付运费计算*/
+ url = URL.apFeeCalculate;
+ break;
+ case ACTION.unApFeeCalculate:
+ str = getLangByResId(this, '4014DELIVBILL-000024'); /* 国际化处理: 取消运费计算*/
+ url = URL.unApFeeCalculate;
+ break;
+ }
+ let batchdata = getPkTsDataIncludeBodyInExtCard.call(this, props, {
+ headCode: CARD.form,
+ bodyCode1: CARD.body,
+ bodyCode2: CARD.pack,
+ hidField: FIELD.pk,
+ bidField1: FIELD.bpk,
+ bidField2: FIELD.cpackbillid
+ });
+ batchdata.isCard = true;
+ batchdata.pagecode = CARD.pagecode;
+ doMathod.call(this, props, batchdata, url, str);
+}
+
+/**
+ * 执行ajax
+ * @param {*} props
+ * @param {*} rows 行信息
+ * @param {*} indexsMap id和行索引map
+ * @param {*} url url
+ * @param {*} str 提交指派信息
+ */
+function doMathod(props, batchdata, url, str) {
+ ajax({
+ url: url,
+ async: false,
+ data: batchdata,
+ success: (res) => {
+ if (res && res.success) {
+ if (res.data && res.data.data) {
+ let map = new Map();
+ map.set(FIELD.bpk, CARD.body);
+ map.set(FIELD.cpackbillid, CARD.pack);
+ let config = {
+ headAreaId: CARD.form,
+ bodyIdAndPkMap: map
+ };
+ let fullbill = updateExtBillDataForCompareByPk.call(this, props, res.data.data, config);
+ updateCacheData(
+ this.props,
+ FIELD.pk,
+ batchdata.infos[0].id,
+ fullbill,
+ CARD.form,
+ CACHEDATA.listCacheKey
+ );
+ showSuccessInfo(str + getLangByResId(this, '4014DELIVBILL-000025')); /* 国际化处理: 成功!*/
+ viewController.call(this, props, UISTATE.browse);
+ let type = props.getUrlParam(CARD.type); //拉单标识
+ if (type == UISTATE.transfer) {
+ props.transferTable.setTransformFormStatus(CARD.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {}
+ });
+ }
+ }
+ }
+ },
+ error: (ress) => {
+ toast({
+ color: 'danger',
+ content: ress.message
+ });
+ }
+ });
+}
+
+/*VWE8DgXdssq9/UDPaMvyRjf8lG8xR6Ym/qAr4obb4hk=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/mergeDisplyBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/mergeDisplyBtnClick.js
new file mode 100644
index 0000000..d8c492e
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/mergeDisplyBtnClick.js
@@ -0,0 +1,18 @@
+/*anpeuh8mcKXZpEGGqQVBZEH3AmDSwQ1S1HbZ5Z3TZZI=*/
+/*
+ * 运输单卡片合并显示
+ * @Author: liangzhyf
+ * @Date: 2020-03-10 17:23:10
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 09:48:26
+ */
+
+import { CARD, FIELD } from '../../constance';
+export default function(props) {
+ let pk = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ if (pk) {
+ this.setState({ combineViewFlag: true, combinePK: pk });
+ }
+}
+
+/*anpeuh8mcKXZpEGGqQVBZEH3AmDSwQ1S1HbZ5Z3TZZI=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/missionBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/missionBtnClick.js
new file mode 100644
index 0000000..754f4b3
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/missionBtnClick.js
@@ -0,0 +1,23 @@
+/*KpFY0qbIRO2jy5SteHEuk+qowGsRawAZJu1RUR5nEtQ=*/
+/*
+ * 生成任务单
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:05:42
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 13:13:10
+ */
+import { FIELD, CARD } from '../../constance';
+
+export default function(props) {
+ let id = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ //推单
+ props.openTo('/dm/dm/missionbill/main/#/card', {
+ appcode: '401400104',
+ pagecode: '401400104_card',
+ ids: id,
+ channelType: 'channelType', //推单标识
+ status: 'edit'
+ });
+}
+
+/*KpFY0qbIRO2jy5SteHEuk+qowGsRawAZJu1RUR5nEtQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/pageInfoClick.js b/src/dm/dm/delivbill/card/btnClicks/pageInfoClick.js
new file mode 100644
index 0000000..89dc0f1
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/pageInfoClick.js
@@ -0,0 +1,35 @@
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
+/*
+ * 运输单卡片翻页
+ * @Author: liangzhyf
+ * @Date: 2020-02-06 15:36:37
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 13:46:02
+ */
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL } from '../../constance';
+import { viewController, setFieldValue } from '../viewController';
+import { changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+
+export default function(props, pk) {
+ props = props || this.props;
+ let data = {
+ pk: pk,
+ pageid: CARD.pagecode
+ };
+ ajax({
+ url: URL.queryCard,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ changeUrlParam(props, { id: pk });
+ setFieldValue.call(this, props, data);
+ viewController.call(this, props);
+ }
+ }
+ });
+}
+
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/pasteCancel.js b/src/dm/dm/delivbill/card/btnClicks/pasteCancel.js
new file mode 100644
index 0000000..26a2cc2
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/pasteCancel.js
@@ -0,0 +1,24 @@
+/*tT8rG4FuW3iyhXrz3PstgoL2DekmNfmPdlMTtufmu10=*/
+/*
+ * 表体复制取消按钮
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:06:26
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-03-11 15:28:32
+ */
+import { BUTTON, CARD } from '../../constance';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+
+/**
+ * @param {*} props
+ * @param {*} areaId 表体id
+ */
+export default function(props, areaId) {
+ if (areaId == CARD.body) {
+ rowCopyPasteUtils.cancel.call(this, props, areaId, BUTTON.cardBodyInit, BUTTON.cardBodyCopy);
+ } else if (areaId == CARD.pack) {
+ rowCopyPasteUtils.cancel.call(this, props, areaId, BUTTON.cardBodyInitPack, BUTTON.cardBodyCopyPack);
+ }
+}
+
+/*tT8rG4FuW3iyhXrz3PstgoL2DekmNfmPdlMTtufmu10=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/pasteGoodBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/pasteGoodBtnClick.js
new file mode 100644
index 0000000..1f9691d
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/pasteGoodBtnClick.js
@@ -0,0 +1,101 @@
+/*F++T0VKlvYi13n91u4FITqC9So4dzuTPLCmeThsNkgQ=*/
+/*
+ * 粘贴收发货信息
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:06:53
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-12-24 16:32:27
+ */
+import { promptBox } from 'nc-lightapp-front';
+import { buttonController } from '../viewController';
+import { CARD, COPY_GOODS_KEYS, FIELD } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let pasteValue = this.pasteRowno;
+ let rows = props.cardTable.getCheckedRows(CARD.body);
+ if (rows.length < 1) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000026')); /* 国际化处理: 没有选中待粘贴收发货信息的行*/
+ return;
+ }
+ if (pasteValue.length == 0) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000027')); /* 国际化处理: 没有待拷贝收发货信息的行,不允许做粘贴操作*/
+ return;
+ }
+ let flag = false;
+ rows.every((row) => {
+ COPY_GOODS_KEYS.every((key) => {
+ let keyvalue = row.data.values[key].value;
+ if (keyvalue) {
+ flag = true;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ return !flag;
+ });
+ if (flag) {
+ showMessageDialog(
+ this,
+ getLangByResId(this, '4014DELIVBILL-000028'),
+ getLangByResId(this, '4014DELIVBILL-000029'),
+ {
+ /* 国际化处理: 提示,覆盖原有数据或作为新行插入?*/
+ beSureBtnClick: () => {
+ rows.forEach((row) => {
+ let pv = pasteValue[0];
+ COPY_GOODS_KEYS.forEach((key) => {
+ let data = pv[key] || {};
+ this.props.cardTable.setValByKeyAndIndex(CARD.body, row.index, key, data);
+ });
+ });
+ },
+ cancelBtnClick: () => {
+ let pk = (this.props.form.getFormItemsValue(CARD.form, FIELD.pk) || {}).value;
+ pasteValue.forEach((item) => {
+ let rowCount = this.props.cardTable.getNumberOfRows(CARD.body);
+ this.props.cardTable.addRow(
+ CARD.body,
+ rowCount,
+ { [FIELD.pk]: { display: '', value: pk } },
+ true
+ );
+ RownoUtils.setRowNo(this.props, CARD.body, FIELD.crowno);
+ let newRow = this.props.cardTable.getRowsByIndexs(CARD.body, [ rowCount ]);
+ newRow.forEach((row) => {
+ COPY_GOODS_KEYS.forEach((key) => {
+ let data = item[key] || {};
+ this.props.cardTable.setValByKeyAndRowId(CARD.body, row.rowid, key, data);
+ });
+ });
+ });
+ }
+ }
+ );
+ }
+ this.pasteRowno = []; //清空缓存
+ this.pasteFlag = false;
+ props.cardTable.selectAllRows(CARD.body, false);
+ buttonController.setCardButtonVisiable.call(this, props);
+}
+
+function showMessageDialog(_this, title, content, param = {}) {
+ promptBox({
+ color: 'info', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ noFooter: param.noFooter, // 是否显示底部按钮(确定、取消),默认显示(false),非必输
+ noCancelBtn: param.noCancelBtn, // 是否显示取消按钮,,默认显示(false),非必输
+ beSureBtnName: getLangByResId(_this, '4014DELIVBILL-000030'), // 确定按钮名称, 默认为"确定",非必输/* 国际化处理: 覆盖*/
+ cancelBtnName: getLangByResId(_this, '4014DELIVBILL-000031'), // 取消按钮名称, 默认为"取消",非必输/* 国际化处理: 插入*/
+ hasCloseBtn: true,
+ beSureBtnClick: param.beSureBtnClick, // 确定按钮点击调用函数,非必输
+ cancelBtnClick: param.cancelBtnClick, // 取消按钮点击调用函数,非必输
+ closeBtnClick: param.closeBtnClick, //关闭按钮点击调用函数,非必输
+ closeByClickBackDrop: param.closeByClickBackDrop //点击遮罩关闭提示框,默认是true点击关闭,阻止关闭是false
+ });
+}
+
+/*F++T0VKlvYi13n91u4FITqC9So4dzuTPLCmeThsNkgQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/paySettleBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/paySettleBtnClick.js
new file mode 100644
index 0000000..c48f666
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/paySettleBtnClick.js
@@ -0,0 +1,34 @@
+/*f6WFlOSG7PUJ7pRcvDAi3IYCzGyfANh/oCBT0jFHz5Y=*/
+/*
+ * 联查应付运费结算单
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:07:45
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-02-25 14:08:30
+ */
+import { ajax } from 'nc-lightapp-front';
+import { FIELD, CARD, URL, UISTATE } from '../../constance';
+
+export default function(props) {
+ let pk = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ ajax({
+ url: URL.linkApSettle,
+ data: { pk: pk },
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ props.openTo('/dm/dm/apsettle/main/#/card', {
+ appcode: '401400804',
+ pagecode: '401400804_card',
+ status: UISTATE.browse,
+ id: data
+ });
+ }
+ }
+ }
+ });
+}
+
+/*f6WFlOSG7PUJ7pRcvDAi3IYCzGyfANh/oCBT0jFHz5Y=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/printBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/printBtnClick.js
new file mode 100644
index 0000000..178bc34
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/printBtnClick.js
@@ -0,0 +1,60 @@
+/*VqFTX17u5c5T6CGoj9nmVWlRCDByW5J6/GQe3RBfo9E=*/
+/*
+ * 打印
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:08:36
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2023-07-10 11:38:13
+ */
+import { CARD, URL, FIELD } from '../../constance';
+import { output } from 'nc-lightapp-front';
+import poc from 'uap/common/components/printOnClient';
+import { ajax } from 'nc-lightapp-front';
+const { printPreview } = poc;
+/**
+ * @param {*} props
+ * @param {*} isOutput 是否是输出
+ */
+export default function(props, isOutput = false) {
+ let id = props.getUrlParam(FIELD.id) || props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ let pks = [];
+ pks.push(id);
+ ajax({
+ url: URL.permissioncheck,
+ data: { actioncode: 'print', id: id },
+ method: 'post',
+ success: (res) => {
+ if (isOutput) {
+ output({
+ url: URL.print,
+ data: {
+ oids: pks,
+ outputType: 'output'
+ }
+ });
+ } 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_org ],
+ billtype: FIELD.billtype,
+ controlPrintNum: true
+ });
+ }
+ }
+ });
+}
+
+/*VqFTX17u5c5T6CGoj9nmVWlRCDByW5J6/GQe3RBfo9E=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/refAddLineBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/refAddLineBtnClick.js
new file mode 100644
index 0000000..a4ec23f
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/refAddLineBtnClick.js
@@ -0,0 +1,46 @@
+/*wuIOsXAUiwHH/T5c1WiShpkk+yBRgjsG2O+nX+jgTgU=*/
+/*
+ * 参照增行
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:08:51
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-12-02 16:26:38
+ */
+import { CARD, FIELD, CACHEDATA } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ if (!pk_org) {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000032')); /* 国际化处理: 请选择物流组织!*/
+ return;
+ }
+ let ctrantype = props.form.getFormItemsValue(CARD.form, FIELD.vtrantypecode).value;
+ if (!ctrantype) {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000033')); /* 国际化处理: 请选择运输类型!*/
+ return;
+ }
+
+ //获取当前表体行来源主键信息,参照增行查询时,过滤使用
+ let src_body = [];
+ let bodyRows = props.cardTable.getVisibleRows(CARD.body);
+ if (bodyRows && Object.keys(bodyRows).length > 0) {
+ bodyRows.forEach((row) => {
+ if (row.values[FIELD.csrcbid].value) {
+ src_body.push(row.values[FIELD.csrcbid].value);
+ }
+ });
+ }
+ clearTransferCache(props, CACHEDATA.transferDataSource);
+ this.setState({
+ refAddLineFlag: true,
+ refAddData: {
+ pk_org: pk_org,
+ ctrantypeid: ctrantype,
+ src_body: src_body
+ }
+ });
+}
+
+/*wuIOsXAUiwHH/T5c1WiShpkk+yBRgjsG2O+nX+jgTgU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/refAddLineDefineBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/refAddLineDefineBtnClick.js
new file mode 100644
index 0000000..73809a0
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/refAddLineDefineBtnClick.js
@@ -0,0 +1,204 @@
+/*2Ug/sgK151VVkLaItQ+cDLouHtMzrSeNXo95tPmiZmOjRGuDPmK1OcS6jKLEzdKa*/
+/*
+ * 卡片参照增行
+ * @Author: liangzhyf
+ * @Date: 2020-03-10 09:35:07
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-16 17:05:10
+ */
+import { ajax } from 'nc-lightapp-front';
+import { getPK, getBPK } from '../../utils/transferUtil';
+import { URL, CARD, CACHEDATA, FIELD, TRANSFER, UISTATE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function(pk_org, tabId) {
+ this.setState({ refAddLineFlag: false, refAddData: null });
+ let ctrantypeid = this.props.form.getFormItemsValue(CARD.form, FIELD.ctrantypeid).value;
+ let badvfeeflag = this.props.form.getFormItemsValue(CARD.form, FIELD.badvfeeflag).value;
+ //参照增行前页面vo
+ let data = this.props.createExtCardData(CARD.pagecode, CARD.form, [ CARD.body, CARD.pack ]);
+ let postData = {
+ pagecode: CARD.pagecode,
+ origin: data,
+ userobj: {
+ tabId: tabId.toString(),
+ transtype: ctrantypeid || '',
+ badvfeeflag: badvfeeflag ? 'Y' : 'N',
+ pk_org: pk_org
+ }
+ };
+ let url;
+ if (tabId && tabId != 0) {
+ url = URL.refAddOther;
+ postData = getOtherTabData.call(this, this.props, tabId, postData);
+ } else {
+ url = URL.refAddAll;
+ postData = getAllTabData.call(this, this.props, postData);
+ }
+ doPost.call(this, this.props, url, postData, tabId);
+}
+
+/**
+ * 其它页签转单数据封装
+ * @param {*} props
+ */
+function getOtherTabData(props, tabId, postData) {
+ let pk = getPK(tabId);
+ let bpk = getBPK(tabId);
+ let transferIds = props.transferTable.getTransferTableMultiSelectedId(CACHEDATA.transferDataSource);
+ if (!transferIds || transferIds.length == 0) {
+ return;
+ }
+ let ids = [];
+ let bids = [];
+ transferIds.map((dd) => {
+ if (!ids.includes(dd.head[pk])) {
+ ids.push(dd.head[pk]);
+ }
+ dd.bodys.map((b) => {
+ if (!bids.includes(b[bpk])) {
+ bids.push(b[bpk]);
+ }
+ });
+ });
+ postData.pks = ids;
+ postData.bpks = bids;
+ return postData;
+}
+
+/**
+ * 全部页签转单数据封装
+ * @param {*} props
+ */
+function getAllTabData(props, postData) {
+ let selectCache = props.transferTable.getTransferTableCache(CACHEDATA.transferDataSource);
+ let selectdata = selectCache[TRANSFER.refAllHead].selected.selectedData;
+ let masterdata = selectdata.masterSelData;
+ let childdata = selectdata.childSelData;
+ let infos = [];
+ Object.keys(masterdata).forEach(function(id) {
+ let pk = (masterdata[id].data[FIELD.pk] || {}).value;
+ let type = (masterdata[id].data[FIELD.ctrantypeid] || {}).value;
+ let vbillcode = (masterdata[id].data[FIELD.vbillcode] || {}).value;
+ let index = masterdata[id].data['rowIndex'] || {};
+ infos.push({
+ id: pk,
+ type: type,
+ bid: [],
+ vbillcode: vbillcode,
+ index: index
+ });
+ });
+ for (let chi in childdata) {
+ for (let inf in infos) {
+ if (infos[inf].id == chi) {
+ Object.keys(childdata[chi]).forEach(function(id) {
+ let cd = childdata[chi][id].data;
+ let b = (cd[FIELD.bpk] || cd.values[FIELD.bpk] || {}).value;
+ infos[inf].bid.push(b);
+ });
+ }
+ }
+ }
+ postData.infos = infos;
+ return postData;
+}
+
+/**
+ * 发送请求
+ * @param {*} props
+ * @param {请求地址} url
+ * @param {封装数据} data
+ */
+function doPost(props, url, data, tabId) {
+ ajax({
+ method: 'POST',
+ url: url,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.success && res.data) {
+ let isError = false;
+ let errorInfo = '';
+ if (tabId && tabId != 0) {
+ let json = JSON.parse(res.data[0].userjson);
+ for (let item in json) {
+ if (json[item] && item.indexOf('_crowno') == -1) {
+ let str;
+ if (json[item] == FIELD.vtrantypecode) {
+ str = getLangByResId(
+ this,
+ '4014DELIVBILL-000036'
+ ); /* 国际化处理: 由于数据项[运输类型]不匹配,不能参照; */
+ } else {
+ str = getLangByResId(
+ this,
+ '4014DELIVBILL-000037'
+ ); /* 国际化处理: 由于数据项[运输类型]不匹配,不能参照; */
+ }
+ errorInfo =
+ errorInfo +
+ getLangByResId(this, '4014DELIVBILL-000034', {
+ 0: item,
+ 1: json[item + '_crowno']
+ }) /* 国际化处理: 单据号为{0},行号为{1}的行,*/ +
+ str;
+ isError = true;
+ }
+ }
+ } else {
+ data.infos.forEach((item) => {
+ let json = JSON.parse(res.data[0].userjson);
+ if (json[item.vbillcode]) {
+ let str;
+ if (json[item.vbillcode] == FIELD.ctrantypeid) {
+ str = getLangByResId(
+ this,
+ '4014DELIVBILL-000036'
+ ); /* 国际化处理: 由于数据项[运输类型]]不匹配,不能参照; */
+ } else {
+ str = getLangByResId(
+ this,
+ '4014DELIVBILL-000037'
+ ); /* 国际化处理: 由于数据项[运输类型]]不匹配,不能参照; */
+ }
+ errorInfo =
+ errorInfo +
+ getLangByResId(this, '4014DELIVBILL-000034', {
+ 0: item.vbillcode,
+ 1: json[item.vbillcode + '_crowno']
+ }) /* 国际化处理: 单据号为{0},行号为{1}的行,*/ +
+ str;
+ isError = true;
+ }
+ });
+ }
+ if (isError) {
+ showWarningDialog(getLangByResId(this, '4014DELIVBILL-000038'), errorInfo); /* 国际化处理: 匹配失败提示*/
+ }
+ let type = this.props.getUrlParam(CARD.type);
+ let allRows = res.data[0].bodys.goods.rows;
+ let insertArr = [];
+ let insertIndex = -1;
+ allRows.forEach((item, index) => {
+ if (item.status == '2') {
+ if (insertIndex == -1) {
+ insertIndex = index;
+ }
+ insertArr.push(item);
+ }
+ });
+ if (type == UISTATE.transfer) {
+ props.transferTable.setTransferListValueByIndex(CARD.leftarea, res.data[0], this.currentIndex);
+ props.cardTable.insertRowsAfterIndex(CARD.body, insertArr, insertIndex);
+ } else {
+ props.cardTable.insertRowsAfterIndex(CARD.body, insertArr, insertIndex);
+ }
+ }
+ // viewController.call(this, props);
+ }
+ });
+}
+
+/*2Ug/sgK151VVkLaItQ+cDLouHtMzrSeNXo95tPmiZmOjRGuDPmK1OcS6jKLEzdKa*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/refBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/refBtnClick.js
new file mode 100644
index 0000000..06faebb
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/refBtnClick.js
@@ -0,0 +1,9 @@
+/*Ei2QDsbLaSJ4/VQwnxUrQof0HyAptUnXAMD751hCFno=*/
+import { URL, CACHEDATA, TRANSFER } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+export default function(props) {
+ clearTransferCache(props, CACHEDATA.transferDataSource);
+ props.pushTo(URL.refAll, { pagecode: TRANSFER.transferAllCode });
+}
+
+/*Ei2QDsbLaSJ4/VQwnxUrQof0HyAptUnXAMD751hCFno=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/resetLine.js b/src/dm/dm/delivbill/card/btnClicks/resetLine.js
new file mode 100644
index 0000000..c5f3d86
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/resetLine.js
@@ -0,0 +1,27 @@
+/*miW+VvrawN7FkL70cs0iwplkkB8pl3+uyYfeE5TQdvw=*/
+/*
+ * 重排行号
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:09:04
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-02-25 14:09:04
+ */
+import { CARD, FIELD } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+
+/**
+ * 重排行号
+ * @param {*} props
+ */
+export default function(props, areaId) {
+ let rowno;
+ if (areaId == CARD.body) {
+ rowno = FIELD.crowno;
+ } else if (areaId == CARD.pack) {
+ rowno = FIELD.cpackrowno;
+ }
+ RownoUtils.resetRowNo(props, areaId, rowno);
+ this.forceUpdate();
+}
+
+/*miW+VvrawN7FkL70cs0iwplkkB8pl3+uyYfeE5TQdvw=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/saveBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/saveBtnClick.js
new file mode 100644
index 0000000..abbebc7
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/saveBtnClick.js
@@ -0,0 +1,124 @@
+/*txBx9FIYfUQl2UukqRyP7+CyhfRIGeMtpaUNE58w5e4=*/
+/*
+ * 运输单卡片保存
+ * @Author: liangzhyf
+ * @Date: 2020-02-05 13:37:44
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2022-10-17 14:09:46
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { viewController, setFieldValue, changeFormItemsDisabledbyLoadEnter } from '../viewController';
+import { CARD, FIELD, UISTATE, URL, CACHEDATA } from '../../constance';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import {
+ addCacheData,
+ updateCacheData,
+ changeUrlParam,
+ rewriteTransferSrcBids
+} from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData, setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+export default function(props) {
+ //货物空行过滤
+ props.cardTable.filterEmptyRows(
+ CARD.body,
+ [ FIELD.cinventoryvid, FIELD.castunitid, FIELD.csendaddrdocid, FIELD.creceiveaddrdocid ],
+ 'include'
+ );
+ //包装空行过滤
+ props.cardTable.filterEmptyRows(CARD.pack, [ FIELD.pk, FIELD.cpackrowno, FIELD.pseudocolumn ]);
+ let flag = props.validatePageToToast([
+ { name: CARD.form, type: 'form' },
+ { name: CARD.body, type: 'cardTable' },
+ { name: CARD.pack, type: 'cardTable' }
+ ]);
+ if (!flag.allPassed) {
+ return;
+ }
+ if (!props.cardTable.getNumberOfRows(CARD.body)) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4014DELIVBILL-000039') /* 国际化处理: 表体没有数据, 不能保存!*/
+ });
+ return;
+ }
+ //封装数据
+ let data = props.createExtCardData(CARD.pagecode, CARD.form, [ CARD.body, CARD.pack ]);
+
+ //暂存保存
+ let tempsave = getDefData(CACHEDATA.tempCardCacheKey, 'tempsave');
+
+ //暂存保存,将表头设置为新增
+ if (tempsave) {
+ data.head.form.rows[0].status = '2';
+ }
+ // 设置伪列
+ let rows = data.bodys[CARD.body].rows;
+ let newRows = [];
+ rows.forEach((row, index) => {
+ row.values.pseudocolumn = { value: index + '' };
+ newRows.push(row);
+ });
+ data.bodys[CARD.body].rows = newRows;
+ props.validateToSave(data, () => {
+ ajax({
+ url: this.state.loadEnterFlag ? URL.loadEdit : URL.save,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ let { success, data } = res;
+ if (success) {
+ let flag = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ let pk = data.head[CARD.form].rows[0].values[FIELD.pk].value; //主键
+ if (flag) {
+ //更新缓存
+ updateCacheData(props, FIELD.pk, pk, data, CARD.form, CACHEDATA.listCacheKey);
+ } else {
+ //添加缓存
+ addCacheData(props, FIELD.pk, pk, data, CARD.form, CACHEDATA.listCacheKey);
+ // 更新翻页组件当前pk值
+ props.cardPagination.setCardPaginationId({
+ id: pk,
+ status: 1
+ });
+ }
+ props.beforeUpdatePage();
+ let type = props.getUrlParam(CARD.type); //拉单标识
+ if (type == UISTATE.transfer) {
+ // 回写上游拉单
+ rewriteTransferSrcBids(props, FIELD.csrcbid, data.bodys[CARD.body].rows);
+ changeUrlParam(props, { status: UISTATE.browse, id: pk });
+ setFieldValue.call(this, props, data);
+ // 改变转单的处理状态
+ props.transferTable.setTransformFormStatus(CARD.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ props.transferTable.setTransferListValueByIndex(CARD.leftarea, data, currentIndex);
+ }
+ });
+ } else {
+ setFieldValue.call(this, props, data);
+ changeUrlParam(props, { status: UISTATE.browse, id: pk });
+ viewController.call(this, this.props);
+ }
+ if (this.state.loadEnterFlag) {
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000040')); /* 国际化处理: 装车成功!*/
+ this.setState({ loadEnterFlag: false }); //重置装车录入标识
+ changeFormItemsDisabledbyLoadEnter.call(this, props, false);
+ } else {
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000041')); /* 国际化处理: 保存成功!*/
+ }
+ props.updatePage(CARD.form, [ CARD.body, CARD.pack ]);
+ setDefData(CACHEDATA.tempCardCacheKey, 'tempsave', false);
+ }
+ }
+ });
+ });
+}
+
+/*txBx9FIYfUQl2UukqRyP7+CyhfRIGeMtpaUNE58w5e4=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/signEnterBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/signEnterBtnClick.js
new file mode 100644
index 0000000..157d1cd
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/signEnterBtnClick.js
@@ -0,0 +1,85 @@
+/*RhPMS4e7rOYSP9ociWcDYv3y4w2Myjm4uYRf23SIKQA=*/
+/*
+ * 签收录入
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 14:09:21
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 18:50:54
+ */
+import { CARD, FIELD } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let pk = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ let initData = checkItem.call(this, props);
+ if (initData) {
+ this.setState({ dlgShowFlag: true, initData: initData, pk: pk });
+ }
+}
+
+/**
+ * 校验是否存在可签收的行
+ *
+ * @param bill
+ * @return
+ */
+function checkItem(props) {
+ var values = [];
+ let invVOs = props.cardTable.getVisibleRows(CARD.body);
+ let packVOs = props.cardTable.getVisibleRows(CARD.pack);
+ // 以下逻辑表示,先取物料明细行中未签收的明细,其次取包装行中未签收明细,
+ // 否则取物料明细行或包装行中已签收明细
+ values = getSignInfo.call(this, props, invVOs, true);
+ if (values == null) {
+ values = getSignInfo.call(this, props, packVOs, true);
+ }
+ if (values == null) {
+ values = getSignInfo.call(this, props, invVOs, false);
+ }
+ if (values == null) {
+ values = getSignInfo.call(this, props, packVOs, false);
+ }
+ if (values == null) {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000042')); /* 国际化处理: 没有可签收的行*/
+ }
+ return values;
+}
+
+/**
+ * 获取签收地址和客户
+ * @param {*} props
+ * @param {*} vos
+ * @param {*} flag
+ */
+function getSignInfo(props, vos, flag) {
+ let length = vos.length;
+ if (length == 0) {
+ return null;
+ }
+ let cursor = -1;
+ vos.every((row, i) => {
+ // 签收人
+ let csignerid = row.values[FIELD.csignerid].value;
+ if (csignerid == null && flag) {
+ cursor = i;
+ return false;
+ } else if (csignerid != null && !flag) {
+ cursor = i;
+ return false;
+ }
+ return true;
+ });
+ if (cursor == -1) {
+ return null;
+ }
+ // 签收地点
+ var cReceiveAddrId = vos[cursor].values[FIELD.creceiveaddrdocid];
+ // 签收客户
+ var cReceiveCustvId = vos[cursor].values[FIELD.creceivecustvid];
+ var values = {};
+ values.address = cReceiveAddrId;
+ values.customer = cReceiveCustvId;
+ return values;
+}
+
+/*RhPMS4e7rOYSP9ociWcDYv3y4w2Myjm4uYRf23SIKQA=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/tempStorageBtnClick.js b/src/dm/dm/delivbill/card/btnClicks/tempStorageBtnClick.js
new file mode 100644
index 0000000..2ef24e7
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/tempStorageBtnClick.js
@@ -0,0 +1,61 @@
+/*HNMCc1joYd2y+PzAFeGZrrZfmv2aSXDzE0sbXaWZniU=*/
+/*
+ * @Author: guoylei
+ * @PageInfo: 暂存
+ * @Date: 2021-07-13 14:28:09
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-03-25 14:13:07
+ */
+import { ACTIONS } from '../../../../../scmpub/scmpub/components/TempSave';
+import { setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { UISTATE, CACHEDATA, CARD, FIELD } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function temporaryStorage(props) {
+ let config = {
+ pagecode: CARD.pagecode,
+ formId: CARD.form,
+ // tableId: [ CARD.pack, CARD.pack_delivery, CARD.body, CARD.good_delivery ],
+ tableId: [ CARD.pack, CARD.body ], //关联区域编码导致暂存数据重复
+ type: 'card'
+ };
+ //货物空行过滤
+ props.cardTable.filterEmptyRows(
+ CARD.body,
+ [ FIELD.cinventoryvid, FIELD.castunitid, FIELD.csendaddrdocid, FIELD.creceiveaddrdocid ],
+ 'include'
+ );
+ //包装空行过滤
+ props.cardTable.filterEmptyRows(CARD.pack, [ FIELD.pk, FIELD.cpackrowno, FIELD.pseudocolumn ]);
+ setDefData(CACHEDATA.tempCardCacheKey, 'tempsave', true);
+ ACTIONS.SAVE.call(this, props, config, checkTempSave.bind(this));
+}
+
+//暂存保存草稿方法回调,可通过条件判断是否执行保存草稿
+function checkTempSave() {
+ let option = this.props.getUrlParam('option');
+ let status = this.props.getUrlParam('status');
+ if (status == 'edit' && option != 'copy') {
+ showErrorInfo('', getLangByResId(this, '4014DELIVBILL-000100')); /* 国际化处理: 已保存单据不支持暂存!*/
+ setDefData(CACHEDATA.tempCardCacheKey, 'tempsave', false);
+ return false;
+ }
+ let srcids = this.props.cardTable.getColValue(CARD.body, 'csrcid');
+ if (!srcids || srcids.length == 0) {
+ return true;
+ }
+ let ischeck = false;
+ srcids.forEach((srcid) => {
+ if (srcid.value) {
+ ischeck = true;
+ }
+ });
+ if (ischeck) {
+ showErrorInfo('', getLangByResId(this, '4014DELIVBILL-000101')); /* 国际化处理: 单据存在来源,不能支持暂存!*/
+ setDefData(CACHEDATA.tempCardCacheKey, 'tempsave', false);
+ return false;
+ }
+ return true;
+}
+
+/*HNMCc1joYd2y+PzAFeGZrrZfmv2aSXDzE0sbXaWZniU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/temporaryClick.js b/src/dm/dm/delivbill/card/btnClicks/temporaryClick.js
new file mode 100644
index 0000000..39d0bc3
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/temporaryClick.js
@@ -0,0 +1,75 @@
+/*7idZsU/oE6l6KevOgbVCltBZ1eLnUtWSRPL602XigLg=*/
+/*
+ * @Author: guoylei
+ * @PageInfo: 打开草稿
+ * @Date: 2021-07-13 15:17:31
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2021-07-13 15:17:31
+ */
+import { changeUrlParam, setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { UISTATE, CARD, FIELD, BUTTON, CACHEDATA } from '../../constance';
+import { viewController, changeFormItemsDisabledbyLoadEnter } from '../viewController';
+
+export default function temporaryClick(props, tempdata) {
+ let empty = {
+ value: null,
+ display: null,
+ scale: '-1'
+ };
+
+ if (this.state.loadEnterFlag) {
+ this.setState({ loadEnterFlag: false });
+ changeFormItemsDisabledbyLoadEnter.call(this, props, false);
+ }
+
+ changeUrlParam(this.props, { status: UISTATE.add, tempstatus: UISTATE.add });
+ //设置页面状态
+ viewController.call(this, this.props, UISTATE.edit);
+
+ props.form.setFormItemsDisabled(CARD.form, {
+ [FIELD.pk_org_v]: false
+ });
+ // 组织为空时调用initMetaByPkorg表体不可编辑
+ if (!tempdata || !tempdata.head[CARD.form].rows[0].values.pk_org_v.value) {
+ this.props.initMetaByPkorg(FIELD.pk_org_v);
+ }
+ //buttonController.setCardButtonVisiable.call(this, this.props, UISTATE.edit);
+ let pk_org_v = null;
+ //清空主键和表头
+ this.props.form.setFormItemsValue(CARD.form, { [FIELD.pk]: empty });
+ this.props.form.EmptyAllFormValue(CARD.form);
+
+ //清空表体数据[ CARD.pack, CARD.pack_delivery, CARD.body, CARD.good_delivery ]
+ this.props.cardTable.setTableData(CARD.pack, { rows: [] }); //包装信息
+ this.props.cardTable.setTableData(CARD.pack_delivery, { rows: [] }); //包装收发货信息
+ this.props.cardTable.setTableData(CARD.body, { rows: [] }); //货物信息
+ this.props.cardTable.setTableData(CARD.good_delivery, { rows: [] }); //货物收发货信息
+
+ // 暂存
+ if (tempdata) {
+ setDefData(CACHEDATA.tempCardCacheKey, 'tempsave', true);
+ let billcodeStr = tempdata.head[CARD.form].rows[0].values.vbillcode.value;
+ //设置表头表体数据
+ this.props.form.setAllFormValue({ [CARD.form]: tempdata.head[CARD.form] });
+ if (tempdata.bodys) {
+ this.props.cardTable.setTableData(CARD.pack, tempdata.bodys[CARD.pack], null, true, true);
+ this.props.cardTable.setTableData(CARD.pack_delivery, tempdata.bodys[CARD.pack_delivery], null, true, true);
+ this.props.cardTable.setTableData(CARD.body, tempdata.bodys[CARD.body], null, true, true);
+ this.props.cardTable.setTableData(CARD.good_delivery, tempdata.bodys[CARD.good_delivery], null, true, true);
+ }
+
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: billcodeStr //修改单据号---非必传
+ });
+ let pkorgValue = tempdata.head[CARD.form].rows[0].values.pk_org_v.value;
+ if (pkorgValue) {
+ pk_org_v = pkorgValue;
+ // 组织有值时调用此方法将表体编辑性打开
+ this.props.resMetaAfterPkorgEdit();
+ }
+ }
+ //设置暂存按钮可用
+ this.props.button.setDisabled({ [BUTTON.TemporaryStorage]: false });
+}
+
+/*7idZsU/oE6l6KevOgbVCltBZ1eLnUtWSRPL602XigLg=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/btnClicks/transferSearch.js b/src/dm/dm/delivbill/card/btnClicks/transferSearch.js
new file mode 100644
index 0000000..d1dd1ce
--- /dev/null
+++ b/src/dm/dm/delivbill/card/btnClicks/transferSearch.js
@@ -0,0 +1,149 @@
+/*uf3U0Henp0gljYz0M83GJ27a3n678RVeAto3kqoLqpE=*/
+/*
+ * 转单
+ * @Author: liangzhyf
+ * @Date: 2020-02-25 19:27:02
+ * @Last Modified by: wangpju
+ * @Last Modified time: yyyy-08-Mo 12:36:45
+ */
+import { ajax } from 'nc-lightapp-front';
+import { getPK, getURL, getBPK } from '../../utils/transferUtil';
+import { CARD, CACHEDATA, FIELD, TRANSFER, URL } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+
+export default function(props) {
+ let tabId = props.getUrlParam(CARD.tabId); //拉单页签
+ let pk_org = props.getUrlParam(FIELD.pk_org);
+ let condition = getDefData.call(this, CACHEDATA.splitConditionsCach, CACHEDATA.splitConditionsCachKey); //分单规则
+ let transType = transtypeUtils.getTranstypeID.call(this);
+ let url = getURL(tabId);
+ let postData = {
+ pagecode: CARD.pagecode,
+ userobj: {
+ transtype: transType || '',
+ pk_org: pk_org,
+ condition: condition || ''
+ }
+ };
+ if (tabId && tabId != 0) {
+ postData = getOtherTabData.call(this, props, tabId, postData);
+ } else {
+ postData = getAllTabData.call(this, props, postData);
+ }
+ doPost.call(this, props, url, postData);
+}
+
+/**
+ * 其它页签转单数据封装
+ * @param {*} props
+ */
+function getOtherTabData(props, tabId, postData) {
+ let pk = getPK(tabId);
+ let bpk = getBPK(tabId);
+ let transferIds = props.transferTable.getTransferTableMultiSelectedId(CACHEDATA.transferDataSource);
+ if (!transferIds || transferIds.length == 0) {
+ return;
+ }
+ let ids = [];
+ let bids = [];
+ transferIds.map((dd) => {
+ if (!ids.includes(dd.head[pk])) {
+ ids.push(dd.head[pk]);
+ }
+ dd.bodys.map((b) => {
+ if (!bids.includes(b[bpk])) {
+ bids.push(b[bpk]);
+ }
+ });
+ });
+ postData.pks = ids;
+ postData.bpks = bids;
+ return postData;
+}
+
+/**
+ * 全部页签转单数据封装
+ * @param {*} props
+ */
+function getAllTabData(props, postData) {
+ let selectCache = props.transferTable.getTransferTableCache(CACHEDATA.transferDataSource);
+ let selectdata = selectCache[TRANSFER.refAllHead].selected.selectedData;
+ let masterdata = selectdata.masterSelData;
+ let childdata = selectdata.childSelData;
+ let infos = [];
+ Object.keys(masterdata).forEach(function(id) {
+ let pk = (masterdata[id].data[FIELD.pk] || {}).value;
+ let type = (masterdata[id].data[FIELD.ctrantypeid] || {}).value;
+ infos.push({ id: pk, type: type, bid: [] });
+ });
+ for (let chi in childdata) {
+ for (let inf in infos) {
+ if (infos[inf].id == chi) {
+ Object.keys(childdata[chi]).forEach(function(id) {
+ let cd = childdata[chi][id].data;
+ let b = (cd[FIELD.bpk] || cd.values[FIELD.bpk] || {}).value;
+ infos[inf].bid.push(b);
+ });
+ }
+ }
+ }
+ postData.infos = infos;
+ return postData;
+}
+
+/**
+ * 发送请求
+ * @param {*} props
+ * @param {请求地址} url
+ * @param {封装数据} data
+ */
+function doPost(props, url, data) {
+ ajax({
+ method: 'POST',
+ url: url,
+ data: data,
+ async: false,
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data) {
+ //由于转单后台只补充transtypeId,需在前端补充transtypeCode
+ let transtypeCode = transtypeUtils.getTranstypeCode.call(this);
+ if (transtypeCode) {
+ data.map((item) => {
+ let val = item.head.form.rows[0].values;
+ if (!val.vtrantypecode.value && val.ctrantypeid.value){
+ val.vtrantypecode = {
+ display: transtypeCode,
+ value: transtypeCode
+ };
+ }
+ });
+ }
+ //由于拉单后台数据没有包装信息子表,需在此处补充子表pack以保证平台transferTable正确初始化
+ data.forEach((item) => {
+ item.bodys[CARD.pack] = { areacode: CARD.pack, rows: [] };
+ });
+ props.transferTable.setTransferListValue(CARD.leftarea, data);
+ } else {
+ props.pushTo(URL.refAll, {
+ pagecode: TRANSFER.transferAllCode,
+ type: 'Error',
+ errorMessage: getLangByResId(this, '4014DELIVBILL-000099')
+ });
+ }
+ },
+ error: (res) => {
+ if (res.message) {
+ props.pushTo(URL.refAll, {
+ pagecode: TRANSFER.transferAllCode,
+ type: 'Error',
+ errorMessage: res.message
+ });
+ }
+ }
+ });
+}
+
+/*uf3U0Henp0gljYz0M83GJ27a3n678RVeAto3kqoLqpE=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/index.js b/src/dm/dm/delivbill/card/index.js
new file mode 100644
index 0000000..51dd9a3
--- /dev/null
+++ b/src/dm/dm/delivbill/card/index.js
@@ -0,0 +1,228 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * 运输单卡片
+ * @Author: liangzhyf
+ * @Date: 2020-01-14 15:38:36
+ * @Last Modified by: hufei
+ * @Last Modified time: 2022-06-01 13:53:12
+ */
+import { initTemplate } from './init';
+import { btnClick } from './btnClicks';
+import React, { Component } from 'react';
+import { createPage } from 'nc-lightapp-front';
+import nomalRender from './views/normalRender';
+import tansferRender from './views/transferRender';
+import { CARD, UISTATE, FIELD, BUTTON } from '../constance';
+import { viewController, setFieldValue } from './viewController';
+import { commonSearch, refAddLineDefineBtnClick } from './btnClicks';
+import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { TempDataList } from '../../../../scmpub/scmpub/components/TempSave';
+import { changeUrlParam } from '../../../../scmpub/scmpub/pub/cache';
+import temporaryClick from './btnClicks/temporaryClick';
+class DelivbillCard extends Component {
+ constructor(props) {
+ super(props);
+ props.use.cardTable(CARD.body, CARD.pack);
+ props.use.form(CARD.form);
+ this.state = {
+ pk: '',
+ showTrack: false, //单据追溯
+ showUploader: false, // 附件管理
+ billid: null,
+ dlgShowFlag: false, //签收条件弹框开关
+ initData: null, //签收条件初始化数据
+ dlgListFlag: false, //签收条件列表弹框
+ dlgCondition: null, // 签收条件表单数据
+ refAddLineFlag: false, //参照增行弹框开关
+ refAddData: null, //参照增行弹框初始化数据
+ combineViewFlag: false, //合并显示弹框开关
+ combinePK: null,
+ loadEnterFlag: false, //装车录入标识
+ tempDataList: [], // 暂存数据
+ showTemp: false
+ };
+ this.currentIndex = 0; //转单分单index
+ this.contexts = null;
+ this.pasteFlag = false; //粘贴收发货信息
+ this.pasteRowno = []; //复制行
+ this.dlgSuccess = false; //签收录入成功标识
+ this.tabKey = CARD.body;
+ initLang(this, [ '4014delivbill' ], 'dm', initTemplate.bind(this, this.props));
+ }
+
+ // 渲染页面前,执行
+ componentWillMount() {
+ // 关闭浏览器
+ window.onbeforeunload = () => {
+ let status = this.props.form.getFormStatus(CARD.form) || UISTATE.browse;
+ if (status == UISTATE.edit) {
+ return getLangByResId(this, '4014DELIVBILL-000043'); /* 国际化处理: 当前单据未保存,您确认离开此页面?*/
+ }
+ };
+ }
+
+ //获取列表肩部按钮
+ getTableHead = (areaCode) => {
+ let { createButtonApp } = this.props.button;
+ return (
+
+ {createButtonApp({
+ area: areaCode,
+ onButtonClick: btnClick.bind(this),
+ ignoreHotkeyCode: [ BUTTON.delLine ]
+ })}
+
+ );
+ };
+ onTabChangeGoods = (props, moduleId, key) => {
+ this.tabKey = key;
+ let status = status || props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ if ((status == UISTATE.edit || status == UISTATE.add || status == UISTATE.copy) && key == CARD.body) {
+ this.props.button.setButtonVisible(BUTTON.cardBodyInit, true);
+ } else {
+ this.props.button.setButtonVisible(BUTTON.cardBodyInit, false);
+ }
+ };
+
+ onTabChangePack = (props, moduleId, key) => {
+ let status = status || props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ if ((status == UISTATE.edit || status == UISTATE.add || status == UISTATE.copy) && key == CARD.pack) {
+ this.props.button.setButtonVisible(BUTTON.cardBodyInitPack, true);
+ } else {
+ this.props.button.setButtonVisible(BUTTON.cardBodyInitPack, false);
+ }
+ };
+
+ modelAddRow = (props, moduleId, modelIndex) => {
+ let rowno;
+ if (moduleId == CARD.body) {
+ rowno = FIELD.crowno;
+ } else if (moduleId == CARD.pack) {
+ rowno = FIELD.cpackrowno;
+ }
+ let pk = (props.form.getFormItemsValue(CARD.form, FIELD.pk) || {}).value;
+ //获取新增行的索引
+ let rowCount = props.cardTable.getNumberOfRows(moduleId) - 1;
+ //为新增行隐藏字段赋值
+ props.cardTable.setValByKeyAndIndex(moduleId, rowCount, FIELD.pk, {
+ display: '',
+ value: pk
+ });
+ RownoUtils.setRowNo(this.props, moduleId, rowno);
+ };
+
+ //签收条件弹框关闭
+ hideDtailsState = () => {
+ this.setState({ dlgShowFlag: false });
+ };
+ //签收条件弹框确定按钮钩子函数
+ defineDlg = (data) => {
+ //收货地址
+ if (data && data.creceiveaddrdocid && !data.creceiveaddrdocid.value) {
+ showWarningInfo(
+ null,
+ getLangByResId(this, '4014DELIVBILL-000044')
+ ); /* 国际化处理: 必须录入收货地点*/ /* 国际化处理: 必须录入收货地点*/
+ return;
+ }
+ //收货客户
+ if (data && data.creceivecustid && !data.creceivecustid.value) {
+ showWarningInfo(
+ null,
+ getLangByResId(this, '4014DELIVBILL-000045')
+ ); /* 国际化处理: 必须录入收货客户*/ /* 国际化处理: 必须录入收货客户*/
+ return;
+ }
+
+ this.setState({ dlgShowFlag: false, dlgListFlag: true, dlgCondition: data });
+ };
+ //签收条件列表弹框关闭
+ hideDlgListState = () => {
+ this.setState({ dlgListFlag: false });
+ };
+ //签收条件列表弹框确定钩子函数
+ defineListDlg = () => {
+ this.setState({ dlgListFlag: false });
+ this.dlgSuccess = true;
+ //刷新页面
+ commonSearch.call(this, this.props);
+ };
+ //参照增行弹框关闭
+ hideDlgRefState = () => {
+ this.setState({ refAddLineFlag: false, refAddData: null });
+ };
+ //参照增行弹框确定钩子函数
+ refAddLineDefine = (pk_org, tabId, conditions) => {
+ refAddLineDefineBtnClick.call(this, pk_org, tabId, conditions);
+ };
+ //合并显示弹框关闭
+ hideDlgCombineView = () => {
+ this.setState({ combineViewFlag: false });
+ };
+
+ transferSelected = (record, status, index) => {
+ if (this.currentIndex == index) {
+ if (!status) {
+ setFieldValue.call(this, this.props, record);
+ }
+ } else {
+ this.currentIndex = index;
+ setFieldValue.call(this, this.props, record);
+ }
+ if(status) {
+ commonSearch.call(this, this.props);
+ }
+ // ui状态,决定浏览态还是编辑态
+ let uistatus = status ? UISTATE.browse : UISTATE.edit;
+ changeUrlParam(this.props, { status: uistatus });
+ viewController.call(this, this.props, uistatus);
+ };
+
+ /**
+ * 暂存
+ */
+ creatTempDataList = () => {
+ return this.state.showTemp ? (
+ {
+ this.setState({ showTemp: false });
+ }}
+ clickTemporary={temporaryClick.bind(this)}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ render() {
+ let type = this.props.getUrlParam(CARD.type); //拉单标识
+ if (type == UISTATE.transfer) {
+ return tansferRender.call(this, this.props);
+ } else {
+ return nomalRender.call(this, this.props);
+ }
+ }
+}
+
+DelivbillCard = createPage({
+ billinfo: {
+ billtype: 'extcard',
+ pagecode: CARD.pagecode,
+ headcode: CARD.form,
+ bodycode: [ CARD.pack, CARD.pack_delivery, CARD.body, CARD.good_delivery ]
+ },
+ orderOfHotKey: [ CARD.form, CARD.body, CARD.good_delivery, CARD.pack, CARD.pack_delivery ]
+})(DelivbillCard);
+
+export default DelivbillCard;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/init/index.js b/src/dm/dm/delivbill/card/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/dm/dm/delivbill/card/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/init/initTemplate.js b/src/dm/dm/delivbill/card/init/initTemplate.js
new file mode 100644
index 0000000..390685a
--- /dev/null
+++ b/src/dm/dm/delivbill/card/init/initTemplate.js
@@ -0,0 +1,349 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: liangzhyf
+ * @Date: 2020-08-27 15:41:29
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-09-06 10:47:14
+ */
+import { ajax } from 'nc-lightapp-front';
+import { btnClick } from '../btnClicks';
+import { viewController } from '../viewController';
+import { initPkOrgAfter } from '../afterEvents/head';
+import { addCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { CARD, FIELD, UISTATE, BUTTON, CACHEDATA } from '../../constance';
+import { commonSearch, copyBtnClick, transferSearch } from '../btnClicks';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { columnSortUtils } from '../../../../../scmpub/scmpub/pub/tool/columnSortUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: CARD.pagecode
+ },
+ (data) => {
+ if (data) {
+ if (data.context && data.template) {
+ this.contexts = data.context;
+ transtypeUtils.init.call(this, data.context);
+ //自定义交易类型发布的运输单节点控制交易类型字段不能编辑
+ if (data.context.paramMap && data.context.paramMap.pk_transtype) {
+ let meta = data.template;
+ meta[CARD.form].items.find((item) => item.attrcode == FIELD.ctrantypeid).disabled = true;
+ props.meta.setMeta(meta);
+ }
+ }
+ //按钮
+ if (data.button) {
+ let buttons = data.button;
+ props.button.hideButtonsByAreas([ CARD.head, CARD.goodhead ]);
+ props.button.setButtons(buttons);
+ }
+ //模板
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, props, meta);
+ props.meta.setMeta(meta, init.bind(this));
+ }
+ }
+ }
+ );
+}
+
+function modifier(props, meta) {
+ meta[CARD.form].items.map((item) => {
+ initHeadFilters.call(this, props, item);
+ });
+
+ // 承运商超链接
+ meta[CARD.form].items = meta[CARD.form].items.map((item, key) => {
+ if (item.attrcode == 'ccarrierid') {
+ item.render = (text, record, index) => {
+ if (record && record.ccarrierid) {
+ return (
+ {
+ let ccarrierid = record.ccarrierid.value;
+
+ // 拼装json
+ let data = {
+ pks: [ ccarrierid ]
+ };
+
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ debugger;
+ if (res.success) {
+ let data = res.data;
+ var datum = data[ccarrierid];
+ if (datum == true) {
+ //说明是集团节点
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ccarrierid,
+ flag: 'super_outer'
+ });
+ } else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ccarrierid,
+ flag: 'super_outer'
+ });
+ }
+ }
+ }
+ });
+ }}
+ >
+ {record.ccarrierid && record.ccarrierid.display}
+
+ );
+ }
+ };
+ }
+ return item;
+ });
+
+ let bodyEditTemp = meta[CARD.body];
+ bodyEditTemp.items.map((item) => {
+ initBodyEditFielters(props, item);
+ });
+ modifBodyInner.call(this, props, bodyEditTemp);
+ meta[CARD.bodyEdit].items.map((item) => {
+ initBodyEditFielters(props, item);
+ });
+ let goodDeliveryItem = meta[CARD.good_delivery];
+ initaddrFielters(props, goodDeliveryItem);
+ let packDeliveryItem = meta[CARD.pack_delivery];
+ initaddrFielters(props, packDeliveryItem);
+ //包装添加操作列
+ let packTemp = meta[CARD.pack];
+ packTemp.items.map((item) => {
+ initPackEditFielters(props, item);
+ });
+ modifPackInner.call(this, props, packTemp);
+ meta[CARD.packEdit].items.map((item) => {
+ initPackEditFielters(props, item);
+ });
+ let packTemp1 = meta[CARD.pack_delivery];
+ packTemp1.items.map((item) => {
+ //按照组织过滤
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null
+ };
+ };
+ });
+ columnSortUtils.numberSort(meta, CARD.body, FIELD.crowno);
+ columnSortUtils.numberSort(meta, CARD.good_delivery, FIELD.crowno);
+}
+
+function modifBodyInner(props, bodyEditTemp) {
+ //货物添加操作列
+ bodyEditTemp.items.push({
+ attrcode: 'opr',
+ label: getLangByResId(this, '4014DELIVBILL-000046') /* 国际化处理: 操作*/,
+ width: 180,
+ visible: true,
+ fixed: 'right',
+ itemtype: 'customer',
+ render: (text, record, index) => {
+ let buttonAry = [ BUTTON.openBrowse, BUTTON.openEdit, BUTTON.delLine, BUTTON.insertLine, BUTTON.pasteThis ];
+ return props.button.createOprationButton(buttonAry, {
+ area: CARD.goodinner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => btnClick.call(this, props, key, record, index)
+ });
+ }
+ });
+}
+
+function modifPackInner(props, packTemp) {
+ packTemp.items.push({
+ attrcode: 'opr',
+ label: getLangByResId(this, '4014DELIVBILL-000046') /* 国际化处理: 操作*/,
+ width: 180,
+ visible: true,
+ fixed: 'right',
+ itemtype: 'customer',
+ render: (text, record, index) => {
+ let buttonAry = [
+ BUTTON.openBrowsePack,
+ BUTTON.openEditPack,
+ BUTTON.delLinePack,
+ BUTTON.insertLinePack,
+ BUTTON.pasteThisPack
+ ];
+ return props.button.createOprationButton(buttonAry, {
+ area: CARD.packinner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => btnClick.call(this, props, key, record, index)
+ });
+ }
+ });
+}
+function init() {
+ // 解析请求路径中的参数,通过参数解控制界面按钮的展示
+ let id = this.props.getUrlParam(FIELD.id); // 主键
+ let status = this.props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ let apinvoiceIds = this.props.getUrlParam(FIELD.apinvoiceIds); //应付运费发票联查主键数组
+ if (id) {
+ if (status == UISTATE.copy) {
+ //复制
+ copyBtnClick.call(this, this.props);
+ } else {
+ //浏览、修改
+ commonSearch.call(this, this.props);
+ if (apinvoiceIds) {
+ //主键添加到缓存
+ apinvoiceIds.split(',').forEach((_id) => {
+ addCacheData(this.props, FIELD.pk, _id, null, CARD.form, CACHEDATA.listCacheKey);
+ });
+ }
+ }
+ } else {
+ let type = this.props.getUrlParam(CARD.type);
+ if (type == UISTATE.transfer) {
+ transferSearch.call(this, this.props);
+ } else if (status == UISTATE.add) {
+ // 清空form区内容
+ this.props.form.EmptyAllFormValue(CARD.form);
+ initPkOrgAfter.call(this, this.props);
+ //新增或空数据卡片
+ viewController.call(this, this.props, status);
+ } else {
+ viewController.call(this, this.props);
+ }
+ }
+}
+
+/**
+ * 表头区字段过滤处理
+ * @param {*} props
+ * @param {*} item
+ */
+function initHeadFilters(props, item) {
+ if (item.attrcode == FIELD.pk_org_v) {
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgVidRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.fstatusflag) {
+ item.options = [
+ { display: getLangByResId(this, '4014DELIVBILL-000047'), value: '0' },
+ { display: getLangByResId(this, '4014DELIVBILL-000048'), value: '3' }
+ ]; /* 国际化处理: 自由,审批通过*/
+ } else if (item.attrcode == FIELD.cvehicleid || item.attrcode == FIELD.cdriverid) {
+ //车辆、司机
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ let vehicletypeId = props.form.getFormItemsValue(CARD.form, FIELD.cvehicletypeid);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null,
+ cvehicletypeid: vehicletypeId.value ? vehicletypeId.value : null,
+ GridRefActionExt: 'nccloud.web.dm.pub.ref.VehicleGridRefFilter'
+ };
+ };
+ } else if (item.attrcode == FIELD.csenderid) {
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null,
+ busifuncode: 'tr'
+ };
+ };
+ } else {
+ //按照组织过滤
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null
+ };
+ };
+ }
+}
+
+/**
+ * 子表参照过滤
+ * @param {*} props
+ * @param {*} item
+ */
+function initBodyEditFielters(props, item) {
+ if (item.attrcode == FIELD.vbatchcode) {
+ item.itemtype = 'refer';
+ item.refcode = 'ic/ic/refers/onhand/index.js';
+ } else if (item.attrcode == FIELD.csendaddrid) {
+ item.itemtype = 'refer';
+ //修改参照类型 供应商发货地址
+ item.refcode = 'uapbd/refer/pub/SupplierAddressGridRef/index';
+ } else if (item.attrcode == FIELD.creceiveaddrid) {
+ item.itemtype = 'refer';
+ //修改参照类型 供应商发货地址
+ item.refcode = 'uapbd/refer/customer/CustAddressGridRef/index';
+ } else if (item.attrcode == FIELD.cinventoryvid) {
+ // 过滤掉价格折扣、服务类物料
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null, //库存组织过滤
+ fee: 'N',
+ discountflag: 'N',
+ GridRefActionExt: 'nccloud.web.dm.delivbill.reffilter.MaterialRefFilter'
+ };
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null //库存组织过滤
+ };
+ };
+ }
+}
+
+/**
+ * 地址参照过滤
+ * @param {*} props
+ * @param {*} item
+ */
+function initaddrFielters(props, addrItem) {
+ addrItem.items.map((item) => {
+ if (item.attrcode == FIELD.csendaddrid) {
+ item.itemtype = 'refer';
+ //修改参照类型 供应商发货地址
+ item.refcode = 'uapbd/refer/pub/SupplierAddressGridRef/index';
+ }
+ if (item.attrcode == FIELD.creceiveaddrid) {
+ item.itemtype = 'refer';
+ //修改参照类型 客户收货地址
+ item.refcode = 'uapbd/refer/customer/CustAddressGridRef/index';
+ }
+ //按照组织过滤
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null
+ };
+ };
+ });
+}
+
+function initPackEditFielters(props, item) {
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org);
+ return {
+ pk_org: pk_org.value ? pk_org.value : null //库存组织过滤
+ };
+ };
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/viewController/buttonController.js b/src/dm/dm/delivbill/card/viewController/buttonController.js
new file mode 100644
index 0000000..05319db
--- /dev/null
+++ b/src/dm/dm/delivbill/card/viewController/buttonController.js
@@ -0,0 +1,361 @@
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
+/*
+ * 按钮控制
+ * @Author: liangzhyf
+ * @Date: 2020-01-14 19:50:31
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2021-09-06 15:19:45
+ */
+import { deepClone } from 'nc-lightapp-front';
+import { BUTTON, UISTATE, CARD, FIELD, BILLSTATUS, CARD_BTN_ALL } from '../../constance';
+
+/**
+ * 设置按钮的显示隐藏
+ * @param {*} props
+ */
+function setCardButtonVisiable(props, status) {
+ props.button.setButtonVisible([ BUTTON.ShowDraft ], true); //设置草稿按钮可用
+ props = props || this.props;
+ status = status || props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ let buttonstatuses = deepClone(CARD_BTN_ALL);
+ let type = this.props.getUrlParam(CARD.type);
+ //默认设置翻页按钮隐藏
+ props.cardPagination.setCardPaginationVisible(BUTTON.pagination, false);
+ if (status == UISTATE.add || status == UISTATE.edit || status == UISTATE.copy) {
+ //编辑态
+ buttonstatuses[BUTTON.save] = true;
+ buttonstatuses[BUTTON.TemporaryStorage] = true;
+ buttonstatuses[BUTTON.cancel] = true;
+ buttonstatuses[BUTTON.addLine] = true;
+ buttonstatuses[BUTTON.addLinePack] = true;
+ buttonstatuses[BUTTON.delLine] = true;
+ buttonstatuses[BUTTON.delLinePack] = true;
+ buttonstatuses[BUTTON.copyLine] = true;
+ buttonstatuses[BUTTON.copyLinePack] = true;
+ buttonstatuses[BUTTON.resetLine] = true;
+ buttonstatuses[BUTTON.resetLinePack] = true;
+ buttonstatuses[BUTTON.insertLine] = true;
+ buttonstatuses[BUTTON.openEdit] = true;
+ buttonstatuses[BUTTON.openEditPack] = true;
+ buttonstatuses[BUTTON.insertLinePack] = true;
+ if (type == UISTATE.transfer) {
+ buttonstatuses[BUTTON.cancelTransfer] = true;
+ buttonstatuses[BUTTON.ShowDraft] = false;
+ }
+ if (this.pasteFlag) {
+ buttonstatuses[BUTTON.pasteGood] = true;
+ }
+ if (!this.state.loadEnterFlag) {
+ buttonstatuses[BUTTON.refAddLine] = true;
+ buttonstatuses[BUTTON.createPack] = true;
+ buttonstatuses[BUTTON.copyGood] = true;
+ }
+ if (this.tabKey != CARD.body) {
+ buttonstatuses[BUTTON.refAddLine] = false;
+ buttonstatuses[BUTTON.createPack] = false;
+ buttonstatuses[BUTTON.copyGood] = false;
+ buttonstatuses[BUTTON.addLine] = false;
+ buttonstatuses[BUTTON.addLinePack] = false;
+ buttonstatuses[BUTTON.delLine] = false;
+ buttonstatuses[BUTTON.delLinePack] = false;
+ buttonstatuses[BUTTON.copyLine] = false;
+ buttonstatuses[BUTTON.copyLinePack] = false;
+ buttonstatuses[BUTTON.resetLine] = false;
+ buttonstatuses[BUTTON.resetLinePack] = false;
+ buttonstatuses[BUTTON.insertLine] = false;
+ buttonstatuses[BUTTON.openEdit] = false;
+ buttonstatuses[BUTTON.openEditPack] = false;
+ buttonstatuses[BUTTON.insertLinePack] = false;
+ }
+ } else {
+ //浏览态
+ buttonstatuses[BUTTON.TemporaryStorage] = false;
+ let hid = (props.form.getFormItemsValue(CARD.form, FIELD.pk) || {}).value || props.getUrlParam('id');
+ if (!hid) {
+ buttonstatuses[BUTTON.add] = true;
+ buttonstatuses[BUTTON.ref] = true;
+ } else {
+ buttonstatuses[BUTTON.add] = true;
+ buttonstatuses[BUTTON.ref] = true;
+ buttonstatuses[BUTTON.copy] = true;
+ buttonstatuses[BUTTON.queryAboutBusiness] = true;
+ buttonstatuses[BUTTON.paySettle] = true;
+ buttonstatuses[BUTTON.file] = true;
+ buttonstatuses[BUTTON.print] = true;
+ buttonstatuses[BUTTON.PrintCountQuery] = true;
+ buttonstatuses[BUTTON.output] = true;
+ buttonstatuses[BUTTON.openBrowse] = true;
+ buttonstatuses[BUTTON.openBrowsePack] = true;
+ buttonstatuses[BUTTON.mergeDisplay] = true;
+ buttonstatuses[BUTTON.refresh] = true;
+ let fstatusflag = props.form.getFormItemsValue(CARD.form, FIELD.fstatusflag).value;
+ //已生应付成运费结算单
+ let bapsettledflag = props.form.getFormItemsValue(CARD.form, FIELD.bapsettledflag).value;
+ //累计应付核销金额
+ let napnum = props.form.getFormItemsValue(CARD.form, FIELD.naptotalverifymny).value;
+ //累计应收核销金额
+ let narnum = props.form.getFormItemsValue(CARD.form, FIELD.nartotalverifymny).value;
+ //承运商
+ let ccarrierid = props.form.getFormItemsValue(CARD.form, FIELD.ccarrierid).value;
+ if (ccarrierid == null || ccarrierid == '') {
+ // 承运商非空时,不能生成任务单
+ buttonstatuses[BUTTON.mission] = true;
+ }
+ switch (fstatusflag) {
+ case BILLSTATUS.free:
+ //自由态按钮
+ buttonstatuses[BUTTON.edit] = true;
+ buttonstatuses[BUTTON.approve] = true;
+ if (bapsettledflag != null && bapsettledflag) {
+ buttonstatuses[BUTTON.unCharge] = true;
+ buttonstatuses[BUTTON.edit] = false;
+ } else {
+ buttonstatuses[BUTTON.delete] = true;
+ buttonstatuses[BUTTON.charge] = true;
+ }
+ break;
+ case BILLSTATUS.approve:
+ //审批通过按钮
+ buttonstatuses[BUTTON.unApprove] = true;
+ if (bapsettledflag != null && bapsettledflag) {
+ buttonstatuses[BUTTON.unCharge] = true;
+ } else {
+ buttonstatuses[BUTTON.charge] = true;
+ if (
+ (napnum == null || napnum == '' || napnum == 0) &&
+ (narnum == null || narnum == '' || narnum == 0)
+ ) {
+ if (!hasSigned.call(this, props) && hasBodyFlag.call(this, props)) {
+ buttonstatuses[BUTTON.loadEnter] = true;
+ }
+ if (existCustom.call(this, props) && hasBodyFlag.call(this, props)) {
+ buttonstatuses[BUTTON.signEnter] = true;
+ }
+ }
+ }
+ break;
+ }
+ if (type == UISTATE.transfer) {
+ buttonstatuses[BUTTON.add] = false;
+ buttonstatuses[BUTTON.ref] = false;
+ buttonstatuses[BUTTON.copy] = false;
+ buttonstatuses[BUTTON.cancelTransfer] = true;
+ buttonstatuses[BUTTON.ShowDraft] = false;
+ }
+ //设置翻页按钮显示
+ props.cardPagination.setCardPaginationVisible(BUTTON.pagination, true);
+ }
+ }
+ props.button.setButtonVisible(buttonstatuses);
+}
+
+/**
+ * 控制按钮可不可用
+ * @param {*} props
+ */
+function setButtonsEnable(props, status) {
+ props = props || this.props;
+ let checkedRows = props.cardTable.getCheckedRows(CARD.body);
+ let buttonstatuses = deepClone(CARD_BTN_ALL);
+ //默认不可用
+ buttonstatuses[BUTTON.delLine] = true;
+ buttonstatuses[BUTTON.delLinePack] = true;
+ buttonstatuses[BUTTON.copyLine] = true;
+ buttonstatuses[BUTTON.copyLinePack] = true;
+ buttonstatuses[BUTTON.copyGood] = true;
+ if (checkedRows && checkedRows.length > 0) {
+ buttonstatuses[BUTTON.delLine] = false;
+ buttonstatuses[BUTTON.copyLine] = false;
+ buttonstatuses[BUTTON.copyGood] = false;
+ }
+ let checkedRowsPack = props.cardTable.getCheckedRows(CARD.pack);
+ if (checkedRowsPack && checkedRowsPack.length > 0) {
+ buttonstatuses[BUTTON.delLinePack] = false;
+ buttonstatuses[BUTTON.copyLinePack] = false;
+ }
+ //主组织为空时肩部按钮置灰
+ let pk_org_v = (props.form.getFormItemsValue(CARD.form, FIELD.pk_org_v) || {}).value;
+ if (!pk_org_v) {
+ buttonstatuses[BUTTON.addLine] = true;
+ buttonstatuses[BUTTON.addLinePack] = true;
+ buttonstatuses[BUTTON.refAddLine] = true;
+ buttonstatuses[BUTTON.createPack] = true;
+ buttonstatuses[BUTTON.resetLine] = true;
+ buttonstatuses[BUTTON.resetLinePack] = true;
+ }
+ props.button.setButtonDisabled(buttonstatuses);
+}
+
+/**
+ * 设置主按钮
+ * @param {*} props
+ * @param {*} billflag
+ */
+function setMainButton(props, status) {
+ props = props || this.props;
+ status = status || props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ if (status == UISTATE.edit || status == UISTATE.add || status == UISTATE.copy) {
+ props.button.setMainButton(BUTTON.save, true);
+ }
+}
+
+/**
+ * 返回按钮的显示隐藏
+ * @param {*} props
+ */
+function setBackButtonVisible(props, status) {
+ props = props || this.props;
+ let type = this.props.getUrlParam(CARD.type);
+ let billcode = (props.form.getFormItemsValue(CARD.form, FIELD.vbillcode) || {}).value;
+ if (type == UISTATE.transfer) {
+ // 设置返回按钮
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ showBackBtn: true, //控制显示返回按钮: true为显示,false为隐藏 ---非必传
+ showBillCode: true, //控制显示单据号:true为显示,false为隐藏 ---非必传
+ billCode: billcode //修改单据号---非必传
+ });
+ } else {
+ status = status || props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ // 设置返回按钮
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ showBackBtn: status == UISTATE.browse,
+ showBillCode: billcode,
+ billCode: billcode
+ });
+ }
+ //NCC-108639 运输单暂存问题,单据保存后,再修改时,暂存置灰
+ if (status === 'edit') {
+ props.button.setDisabled({
+ [BUTTON.TemporaryStorage]: true
+ });
+ } else {
+ props.button.setDisabled({
+ [BUTTON.TemporaryStorage]: false
+ });
+ }
+}
+
+/**
+ * 检查表体所有客户是否为空,所有客户为空返回false,否则返回true.
+ * @param {*} props
+ */
+function existCustom(props) {
+ let existCustom = false;
+ let bodyData = props.cardTable.getVisibleRows(CARD.body);
+ if (bodyData.length == 0) {
+ return false;
+ }
+ // 货物行收货客户是否都为空
+ bodyData.every((row) => {
+ if (row.values[FIELD.creceivecustid].value != null) {
+ existCustom = true;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ if (!existCustom) {
+ let packData = props.cardTable.getVisibleRows(CARD.pack);
+ // 货物行收货客户为空时,检查包装行收货客户是否为空
+ if (packData.length == 0) {
+ return existCustom;
+ }
+ packData.every((row) => {
+ if (row.values[FIELD.creceivecustid].value != null) {
+ existCustom = true;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ }
+
+ return existCustom;
+}
+
+/**
+ * 判断是否签收
+ * @param {*} props
+ */
+function hasSigned(props) {
+ let flag = false;
+ let bodyData = props.cardTable.getVisibleRows(CARD.body);
+ if (bodyData.length == 0) {
+ return flag;
+ }
+ bodyData.every((row) => {
+ if (row.values[FIELD.csignerid].value != null) {
+ flag = true;
+ return false;
+ } else {
+ return true;
+ }
+ });
+
+ if (!flag) {
+ let packData = props.cardTable.getVisibleRows(CARD.pack);
+ if (packData.length == 0) {
+ return flag;
+ }
+ packData.every((row) => {
+ if (row.values[FIELD.csignerid].value != null) {
+ flag = true;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ }
+ return flag;
+}
+
+/**
+ * 判断选中行聚合vo表体是否存在标记回写
+ * @param {*} props
+ */
+function hasBodyFlag(props) {
+ let flag = true;
+ let bodyData = props.cardTable.getVisibleRows(CARD.body);
+ if (bodyData.length > 0) {
+ bodyData.every((row) => {
+ if (row.values[FIELD.bapflag] != null && row.values[FIELD.bapflag].value) {
+ flag = false;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ }
+ if (!flag) {
+ let packData = props.cardTable.getVisibleRows(CARD.pack);
+ if (packData.length > 0) {
+ packData.every((row) => {
+ if (row.values[FIELD.bapflag] != null && row.values[FIELD.bapflag].value) {
+ flag = false;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ }
+ }
+ return flag;
+}
+
+function changeBodyBtnVisabled(props) {
+ props.button.setButtonVisible({
+ [BUTTON.addLine]: false,
+ [BUTTON.delLine]: false,
+ [BUTTON.copyLine]: false,
+ [BUTTON.resetLine]: false,
+ [BUTTON.addLinePack]: false,
+ [BUTTON.delLinePack]: false,
+ [BUTTON.copyLinePack]: false,
+ [BUTTON.resetLinePack]: false,
+ [BUTTON.insertLine]: false
+ });
+}
+
+export default { setButtonsEnable, setCardButtonVisiable, setMainButton, setBackButtonVisible, changeBodyBtnVisabled };
+
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/viewController/index.js b/src/dm/dm/delivbill/card/viewController/index.js
new file mode 100644
index 0000000..51874cf
--- /dev/null
+++ b/src/dm/dm/delivbill/card/viewController/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import buttonController from './buttonController';
+import { viewController, setUIState, setFieldValue, changeFormItemsDisabledbyLoadEnter } from './viewController';
+export { buttonController, viewController, setUIState, setFieldValue, changeFormItemsDisabledbyLoadEnter };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/viewController/setFieldValue.js b/src/dm/dm/delivbill/card/viewController/setFieldValue.js
new file mode 100644
index 0000000..d5ee5ec
--- /dev/null
+++ b/src/dm/dm/delivbill/card/viewController/setFieldValue.js
@@ -0,0 +1,31 @@
+/*nlwgzEj4v/9ei+PPmh0j5b8M+ENH1HHxQsdAVqkFm8A=*/
+import { CARD } from '../../constance';
+
+/**
+ * 卡片组件赋值
+ * @param {*} props
+ */
+export default function(props, data) {
+ if (data.head) {
+ props.form.setAllFormValue({
+ [CARD.form]: data.head[CARD.form]
+ });
+ } else {
+ props.form.EmptyAllFormValue(CARD.form);
+ }
+ //子表赋值数据
+ if (data.bodys[CARD.body]) {
+ props.cardTable.setTableData(CARD.body, data.bodys[CARD.body]);
+ } else {
+ props.cardTable.setTableData(CARD.body, { rows: [] });
+ props.cardTable.setTableData(CARD.good_delivery, { rows: [] });
+ }
+ if (data.bodys[CARD.pack]) {
+ props.cardTable.setTableData(CARD.pack, data.bodys[CARD.pack]);
+ } else {
+ props.cardTable.setTableData(CARD.pack, { rows: [] });
+ props.cardTable.setTableData(CARD.pack_delivery, { rows: [] });
+ }
+}
+
+/*nlwgzEj4v/9ei+PPmh0j5b8M+ENH1HHxQsdAVqkFm8A=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/viewController/viewController.js b/src/dm/dm/delivbill/card/viewController/viewController.js
new file mode 100644
index 0000000..963da3f
--- /dev/null
+++ b/src/dm/dm/delivbill/card/viewController/viewController.js
@@ -0,0 +1,121 @@
+/*FhGt8mVXHBYBQ3wFaJJd7Zs+s3hW0YeO3T155BwQLo0=*/
+/*
+ * 页面状态及按钮控制
+ * @Author: liangzhyf
+ * @Date: 2020-01-14 19:38:46
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-16 15:38:41
+ */
+import setFieldValue from './setFieldValue';
+import { UISTATE, CARD, FIELD } from '../../constance';
+import buttonController from './buttonController';
+
+function viewController(props, status) {
+ props = props || this.props;
+ status = status || props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ //更新表格和表单状态
+ setUIState.call(this, props, status);
+ //设置按钮的显示隐藏
+ buttonController.setCardButtonVisiable.call(this, props, status);
+ //设置按钮的可不可用
+ buttonController.setButtonsEnable.call(this, props, status);
+ //返回按钮的显示隐藏
+ buttonController.setBackButtonVisible.call(this, props, status);
+ //设置主按钮
+ buttonController.setMainButton.call(this, props);
+ setPkorgEditable.call(this, props, status);
+}
+
+/**
+ * 设置界面状态
+ * @param {*} props
+ * @param {*} status
+ */
+function setUIState(props, status) {
+ if (status == UISTATE.add || status == UISTATE.copy) {
+ //新增复制都是编辑态
+ props.form.setFormStatus(CARD.form, UISTATE.edit);
+ props.cardTable.setStatus(CARD.body, UISTATE.edit);
+ props.cardTable.setStatus(CARD.good_delivery, UISTATE.edit);
+ props.cardTable.setStatus(CARD.pack, UISTATE.edit);
+ props.cardTable.setStatus(CARD.pack_delivery, UISTATE.edit);
+ } else {
+ props.form.setFormStatus(CARD.form, status);
+ props.cardTable.setStatus(CARD.body, status);
+ props.cardTable.setStatus(CARD.good_delivery, status);
+ props.cardTable.setStatus(CARD.pack, status);
+ props.cardTable.setStatus(CARD.pack_delivery, status);
+ }
+}
+
+function setPkorgEditable(props, status) {
+ let type = this.props.getUrlParam(CARD.type); //拉单标识
+ if (type == UISTATE.transfer || status == UISTATE.edit || status == UISTATE.copy) {
+ props.form.setFormItemsDisabled(CARD.form, {
+ [FIELD.pk_org_v]: true
+ });
+ } else {
+ props.form.setFormItemsDisabled(CARD.form, {
+ [FIELD.pk_org_v]: false
+ });
+ }
+}
+
+/**
+ * 装车录入时表头置灰
+ * @param {*} props
+ */
+function changeFormItemsDisabledbyLoadEnter(props, isloadEnterFlag) {
+ if (isloadEnterFlag) {
+ props.form.setFormItemsDisabled(CARD.form, {
+ pk_org_v: true,
+ vbillcode: true,
+ dbilldate: true,
+ ctrantypeid: true,
+ crouteid: true,
+ csendtypeid: true,
+ ccarrierid: true,
+ capcustvid: true,
+ badvfeeflag: true,
+ nexchangerate: true,
+ vweightunitname: true,
+ vvolumnunitname: true,
+ bmissionbillflag: true,
+ bapsettledflag: true,
+ nartotalverifymny: true,
+ naptotalverifymny: true
+ });
+ let vdef = {};
+ for (let i = 1; i <= 50; i++) {
+ vdef['vdef' + i] = true;
+ }
+ props.form.setFormItemsDisabled(CARD.form, vdef);
+ } else {
+ props.form.setFormItemsDisabled(CARD.form, {
+ pk_org_v: false,
+ vbillcode: false,
+ dbilldate: false,
+ ctrantypeid: false,
+ crouteid: false,
+ csendtypeid: false,
+ ccarrierid: false,
+ capcustvid: false,
+ badvfeeflag: false,
+ nexchangerate: false,
+ vweightunitname: false,
+ vvolumnunitname: false,
+ bmissionbillflag: false,
+ bapsettledflag: false,
+ nartotalverifymny: false,
+ naptotalverifymny: false
+ });
+ let vdef = {};
+ for (let i = 1; i <= 50; i++) {
+ vdef['vdef' + i] = false;
+ }
+ props.form.setFormItemsDisabled(CARD.form, vdef);
+ }
+}
+export { viewController, setUIState, setFieldValue, changeFormItemsDisabledbyLoadEnter };
+
+/*FhGt8mVXHBYBQ3wFaJJd7Zs+s3hW0YeO3T155BwQLo0=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/views/normalRender.js b/src/dm/dm/delivbill/card/views/normalRender.js
new file mode 100644
index 0000000..eb36bf9
--- /dev/null
+++ b/src/dm/dm/delivbill/card/views/normalRender.js
@@ -0,0 +1,210 @@
+/*YkFTtpPO29FuuRZj9TLkgycLbgOBngMvh/KJ2RgABAI=*/
+import SigntermDlg from '../../signterm';
+import CombineModel from '../../combineModel';
+import { high, base } from 'nc-lightapp-front';
+import SigntermDlgList from '../../signtermlist';
+import { buttonController } from '../viewController';
+import { btnClick, pageInfoClick } from '../btnClicks';
+import signtermBtnClick from '../../signtermlist/btnClicks';
+import MultiTransferTable from '../../transfer/transfer';
+import { bodyBatchEvents } from '../batchEvents';
+import { CARD, BUTTON, FIELD, CACHEDATA } from '../../constance';
+import { headBeforeEvent, bodyBeforeEvent, packBeforeEvent } from '../beforeEvents';
+import { createCardTitle } from '../../../../../scmpub/scmpub/pub/tool/titleUtil';
+import { headAfterEvent, bodyAfterEvent, bodyPackAfterEvent } from '../afterEvents';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import NCUploader from 'uap/common/components/NCUploader';
+let { BillTrack } = high;
+let { NCAffix, NCDiv, NCModal } = base;
+export default function(props) {
+ const { cardTable, form, button, cardPagination, modal } = this.props;
+ const { createForm } = form;
+ const { createButtonApp } = button;
+ const { createCardTable } = cardTable;
+ const { createCardPagination } = cardPagination;
+ const { createModal } = modal;
+ return (
+
+
+
+ {/* 按钮区 */}
+
+
+ {createCardTitle(this, {
+ backBtnClick: btnClick.bind(this, this.props, BUTTON.back)
+ })}
+
+
+ {createButtonApp({
+ area: CARD.head,
+ onButtonClick: btnClick.bind(this)
+ })}
+
+ {/* 上一页/下一页 */}
+
+ {createCardPagination({
+ handlePageInfoChange: (props, pk) => {
+ pageInfoClick.call(this, props, pk);
+ },
+ dataSource: CACHEDATA.listCacheKey
+ })}
+
+ {/* 单据追溯 */}
+ {
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk}
+ type={FIELD.billtype}
+ />
+ {/* 附件管理 */}
+ {this.state.showUploader && (
+ {
+ this.setState({
+ showUploader: false
+ });
+ }}
+ />
+ )}
+
+
+ {/* 表单 */}
+
+ {createForm(CARD.form, {
+ onAfterEvent: headAfterEvent.bind(this),
+ onBeforeEvent: headBeforeEvent.bind(this)
+ })}
+ {this.creatTempDataList()}
+
+
+ {/* 包装 */}
+
+ {createCardTable(CARD.pack, {
+ showCheck: true,
+ hideModelSave: true,
+ tableHead: this.getTableHead.bind(this, CARD.packhead),
+ modelAddRow: this.modelAddRow.bind(this), //侧拉展开界面右上角增行按钮的钩子函数
+ onBeforeEvent: packBeforeEvent.bind(this),
+ onAfterEvent: bodyPackAfterEvent.bind(this),
+ selectedChange: buttonController.setButtonsEnable.bind(this),
+ onBatchSelected: buttonController.setButtonsEnable.bind(this),
+ onTabChange: this.onTabChangePack,
+ adaptionHeight: false
+ })}
+
+ {/* 货物 */}
+
+ {createCardTable(CARD.body, {
+ showCheck: true,
+ hideModelSave: true,
+ adaptionHeight: true,
+ hideAdd: this.state.loadEnterFlag,
+ hideDel: this.state.loadEnterFlag,
+ tableHead: this.getTableHead.bind(this, CARD.goodhead),
+ onBeforeEvent: bodyBeforeEvent.bind(this),
+ onAfterEvent: bodyAfterEvent.bind(this),
+ onBatchChange: bodyBatchEvents.bind(this),
+ modelAddRow: this.modelAddRow.bind(this), //侧拉展开界面右上角增行按钮的钩子函数
+ selectedChange: buttonController.setButtonsEnable.bind(this),
+ onBatchSelected: buttonController.setButtonsEnable.bind(this),
+ onTabChange: this.onTabChangeGoods
+ })}
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000049')}
+ {/* 国际化处理: 运输单签收条件*/}
+
+
+
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000050')}
+ {/* 国际化处理: 签收录入*/}
+
+
+ {
+ this.formData = data;
+ }}
+ // 接收货物信息
+ setGoodsData={(goodsData, goodDeliveryData, packData, packDeliveryData) => {
+ if (goodsData !== undefined) {
+ this[CARD.body] = goodsData;
+ }
+ if (goodDeliveryData !== undefined) {
+ this[CARD.good_delivery] = goodDeliveryData;
+ }
+ if (packData !== undefined) {
+ this[CARD.pack] = packData;
+ }
+ if (packDeliveryData !== undefined) {
+ this[CARD.pack_delivery] = packDeliveryData;
+ }
+ }}
+ />
+
+
+ {this.props.button.createButtonApp({
+ area: CARD.dialog,
+ onButtonClick: signtermBtnClick.bind(this)
+ })}
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000051')}
+ {/* 国际化处理: 运输单参照生单*/}
+
+
+
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000052')}
+ {/* 国际化处理: 合并显示*/}
+
+
+ {
+ this.CombineModalContent = content;
+ }}
+ />
+
+
+ {createButtonApp({
+ area: CARD.combine,
+ onButtonClick: (...arg) => {
+ this.CombineModalContent && this.CombineModalContent.btnClick(...arg);
+ }
+ })}
+
+
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+}
+
+/*YkFTtpPO29FuuRZj9TLkgycLbgOBngMvh/KJ2RgABAI=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/card/views/transferRender.js b/src/dm/dm/delivbill/card/views/transferRender.js
new file mode 100644
index 0000000..5e046ee
--- /dev/null
+++ b/src/dm/dm/delivbill/card/views/transferRender.js
@@ -0,0 +1,199 @@
+/*tDZvrAdMQJe+xlnVQH5dvw/DhfFThXxBN5sprg28Z3U=*/
+import { btnClick } from '../btnClicks';
+import SigntermDlg from '../../signterm';
+import CombineModel from '../../combineModel';
+import { high, base } from 'nc-lightapp-front';
+import SigntermDlgList from '../../signtermlist';
+import signtermBtnClick from '../../signtermlist/btnClicks';
+import { buttonController } from '../viewController';
+import MultiTransferTable from '../../transfer/transfer';
+import { bodyBatchEvents } from '../batchEvents';
+import { FIELD, CARD, BUTTON, CACHEDATA } from '../../constance';
+import { headBeforeEvent, bodyBeforeEvent, packBeforeEvent } from '../beforeEvents';
+import { createCardTitle } from '../../../../../scmpub/scmpub/pub/tool/titleUtil';
+import { headAfterEvent, bodyAfterEvent, bodyPackAfterEvent } from '../afterEvents';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import NCUploader from 'uap/common/components/NCUploader';
+let { BillTrack } = high;
+let { NCAffix, NCDiv, NCModal } = base;
+export default function(props) {
+ const { cardTable, form, button, transferTable, modal } = this.props;
+ const { createForm } = form;
+ const { createButtonApp } = button;
+ const { createCardTable } = cardTable;
+ const { createTransferList } = transferTable;
+ const { createModal } = modal;
+ return (
+
+
+
+
+ {createCardTitle(this, {
+ backBtnClick: btnClick.bind(this, this.props, BUTTON.back)
+ })}
+
+
+ {createButtonApp({
+ area: CARD.head,
+ onButtonClick: btnClick.bind(this)
+ })}
+
+ {/* 单据追溯 */}
+ {
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk}
+ type={FIELD.billtype}
+ />
+ {/* 附件管理 */}
+ {this.state.showUploader && (
+ {
+ this.setState({
+ showUploader: false
+ });
+ }}
+ />
+ )}
+
+
+
+ {createTransferList({
+ //表格组件id
+ headcode: CARD.form,
+ bodycode: [ CARD.body, CARD.pack ],
+ transferListId: CARD.leftarea,
+ dataSource: CACHEDATA.transferDataSource,
+ onTransferItemSelected: (record, status, index) => {
+ this.transferSelected.call(this, record, status, index);
+ }
+ })}
+
+
+ {createForm(CARD.form, {
+ onAfterEvent: headAfterEvent.bind(this),
+ onBeforeEvent: headBeforeEvent.bind(this)
+ })}
+
+ {/* 包装 */}
+
+ {createCardTable(CARD.pack, {
+ showCheck: true,
+ hideModelSave: true,
+ adaptionHeight: false,
+ tableHead: this.getTableHead.bind(this, CARD.packhead),
+ onBeforeEvent: packBeforeEvent.bind(this),
+ onAfterEvent: bodyPackAfterEvent.bind(this),
+ modelAddRow: this.modelAddRow.bind(this), //侧拉展开界面右上角增行按钮的钩子函数
+ selectedChange: buttonController.setButtonsEnable.bind(this),
+ onBatchSelected: buttonController.setButtonsEnable.bind(this),
+ onTabChange: this.onTabChangePack
+ })}
+
+ {/* 货物 */}
+
+ {createCardTable(CARD.body, {
+ showCheck: true,
+ hideModelSave: true,
+ adaptionHeight: true,
+ hideAdd: this.state.loadEnterFlag,
+ hideDel: this.state.loadEnterFlag,
+ tableHead: this.getTableHead.bind(this, CARD.goodhead),
+ onBeforeEvent: bodyBeforeEvent.bind(this),
+ onAfterEvent: bodyAfterEvent.bind(this),
+ onBatchChange: bodyBatchEvents.bind(this),
+ modelAddRow: this.modelAddRow.bind(this), //侧拉展开界面右上角增行按钮的钩子函数
+ selectedChange: buttonController.setButtonsEnable.bind(this),
+ onBatchSelected: buttonController.setButtonsEnable.bind(this),
+ onTabChange: this.onTabChangeGoods
+ })}
+
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000049')}
+ {/* 国际化处理: 运输单签收条件*/}
+
+
+
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000050')}
+ {/* 国际化处理: 签收录入*/}
+
+
+ {
+ this.formData = data;
+ }}
+ // 接收货物信息
+ setGoodsData={(goodsData, goodDeliveryData, packData, packDeliveryData) => {
+ this[CARD.body] = goodsData;
+ this[CARD.good_delivery] = goodDeliveryData;
+ this[CARD.pack] = packData;
+ this[CARD.pack_delivery] = packDeliveryData;
+ }}
+ />
+
+
+ {this.props.button.createButtonApp({
+ area: CARD.dialog,
+ onButtonClick: signtermBtnClick.bind(this)
+ })}
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000051')}
+ {/* 国际化处理: 运输单参照生单*/}
+
+
+
+
+
+
+
+ {getLangByResId(this, '4014DELIVBILL-000052')}
+ {/* 国际化处理: 合并显示*/}
+
+
+ {
+ this.CombineModalContent = content;
+ }} />
+
+
+ {createButtonApp({
+ area: CARD.combine,
+ onButtonClick: (...arg) => {
+ this.CombineModalContent && this.CombineModalContent.btnClick(...arg);
+ }
+ })}
+
+
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+}
+
+/*tDZvrAdMQJe+xlnVQH5dvw/DhfFThXxBN5sprg28Z3U=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/combineModel/btnClicks/index.js b/src/dm/dm/delivbill/combineModel/btnClicks/index.js
new file mode 100644
index 0000000..ecc43ab
--- /dev/null
+++ b/src/dm/dm/delivbill/combineModel/btnClicks/index.js
@@ -0,0 +1,14 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { BUTTON } from '../../constance';
+import printBtnClick from './printBtnclick';
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.print:
+ printBtnClick.call(this, props);
+ break;
+ }
+}
+
+export { btnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/combineModel/btnClicks/printBtnclick.js b/src/dm/dm/delivbill/combineModel/btnClicks/printBtnclick.js
new file mode 100644
index 0000000..a5209d5
--- /dev/null
+++ b/src/dm/dm/delivbill/combineModel/btnClicks/printBtnclick.js
@@ -0,0 +1,49 @@
+/*MFTSPUTOtwEMhWGjumn8+8xGPSlEcjy0n9MNFliU3q8=*/
+/*
+ * 合并显示打印
+ * @Author: liangzhyf
+ * @Date: 2020-03-11 10:12:56
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2023-07-19 17:36:29
+ */
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL, FIELD } from '../../constance';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+/**
+ * @param {*} props
+ * @param {*} isOutput 是否是输出
+ */
+export default function(props) {
+ let id = props.form.getFormItemsValue(CARD.form, FIELD.pk).value;
+ let pks = [];
+ pks.push(id);
+ let pk_org = props.form.getFormItemsValue(CARD.form, FIELD.pk_org).value;
+ ajax({
+ url: URL.permissioncheck,
+ data: { actioncode: 'print', id: id },
+ method: 'post',
+ success: (res) => {
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ */
+ printPreview(props, URL.combinePrint, {
+ appcode: props.getAppCode(),
+ nodekey: null,
+ oids: pks,
+ pk_org: [ pk_org ],
+ billtype: FIELD.billtype,
+ printType: true,
+ realData: true,
+ controlPrintNum: true
+ });
+ }
+ });
+}
+
+/*MFTSPUTOtwEMhWGjumn8+8xGPSlEcjy0n9MNFliU3q8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/combineModel/index.js b/src/dm/dm/delivbill/combineModel/index.js
new file mode 100644
index 0000000..e349906
--- /dev/null
+++ b/src/dm/dm/delivbill/combineModel/index.js
@@ -0,0 +1,82 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * 运输单合并显示
+ * @Author: liangzhyf
+ * @Date: 2020-01-14 15:38:36
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-09-14 19:58:18
+ */
+import { initTemplate } from './init';
+import { btnClick } from './btnClicks';
+import React, { Component } from 'react';
+import { CARD, UISTATE } from '../constance';
+import { createPage } from 'nc-lightapp-front';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class CombineModel extends Component {
+ constructor(props) {
+ super(props);
+ props.use.cardTable(CARD.body, CARD.pack);
+ props.use.form(CARD.form);
+ this.state = {};
+ props.getInstance(this);
+ this.btnClick = btnClick.bind(this);
+ initLang(this, [ '4014delivbill' ], 'dm', initTemplate.bind(this, this.props));
+ }
+
+ // 渲染页面前,执行
+ componentWillMount() {
+ // 关闭浏览器
+ window.onbeforeunload = () => {
+ let status = this.props.getUrlParam(UISTATE.status) || UISTATE.browse;
+ if (status == UISTATE.edit) {
+ return getLangByResId(this, '4014DELIVBILL-000043'); /* 国际化处理: 当前单据未保存,您确认离开此页面?*/
+ }
+ };
+ }
+
+ render() {
+ const { cardTable, form, modal } = this.props;
+ const { createForm } = form;
+ const { createCardTable } = cardTable;
+ const { createModal } = modal;
+ return (
+
+
+ {/* 表单 */}
+
{createForm(CARD.form, {})}
+
+ {/* 货物 */}
+
+ {createCardTable(CARD.body, {
+ hideModelSave: true,
+ adaptionHeight: false
+ })}
+
+ {/* 包装 */}
+
+ {createCardTable(CARD.pack, {
+ hideModelSave: true,
+ adaptionHeight: true
+ })}
+
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+ }
+}
+
+CombineModel = createPage({
+ billinfo: {
+ billtype: 'card',
+ pagecode: CARD.pagecode,
+ headcode: CARD.form,
+ bodycode: [ CARD.body, CARD.good_delivery, CARD.pack, CARD.pack_delivery ]
+ }
+})(CombineModel);
+
+export default CombineModel;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/combineModel/init/index.js b/src/dm/dm/delivbill/combineModel/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/dm/dm/delivbill/combineModel/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/combineModel/init/initTemplate.js b/src/dm/dm/delivbill/combineModel/init/initTemplate.js
new file mode 100644
index 0000000..bf6ec73
--- /dev/null
+++ b/src/dm/dm/delivbill/combineModel/init/initTemplate.js
@@ -0,0 +1,51 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL } from '../../constance';
+import { setFieldValue } from '../../card/viewController';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: CARD.pagecode
+ },
+ (data) => {
+ if (data) {
+ //模板
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, props, meta);
+ props.meta.setMeta(meta, init.bind(this));
+ }
+ //按钮
+ if (data.button) {
+ let buttons = data.button;
+ props.button.setButtons(buttons);
+ }
+ }
+ }
+ );
+}
+
+function modifier(props, meta) {}
+
+function init() {
+ if (this.props.initData) {
+ let data = {
+ pk: this.props.initData,
+ pageid: CARD.pagecode
+ };
+ ajax({
+ url: URL.combineView,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data) {
+ setFieldValue.call(this, this.props, data);
+ }
+ }
+ });
+ }
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/constance/index.js b/src/dm/dm/delivbill/constance/index.js
new file mode 100644
index 0000000..f5ee1c6
--- /dev/null
+++ b/src/dm/dm/delivbill/constance/index.js
@@ -0,0 +1,1082 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+const TRANSFER = {
+ list_head: 'list_head', //按钮区域
+ refAllQuery: 'queryAll',
+ ref21Query: 'ref21Query',
+ ref4331Query: 'ref4331Query',
+ ref4802Query: 'ref4802Query',
+ refm4cQuery: 'refm4cQuery',
+ refm4iQuery: 'refm4iQuery',
+ refm4yQuery: 'refm4yQuery',
+ refAllHead: 'refAllHead',
+ refAllBody: 'refAllBody',
+ mainchild: 'mainchild',
+ ref21Head: 'ref21Head',
+ ref21Body: 'ref21Body',
+ mainchild21: 'mainchild21',
+ ref4802Head: 'ref4802Head',
+ ref4802Body: 'ref4802Body',
+ mainchild4802: 'mainchild4802',
+ refm4cHead: 'refm4cHead',
+ refm4cBody: 'refm4cBody',
+ mainchildm4c: 'mainchildm4c',
+ refm4iHead: 'refm4iHead',
+ refm4iBody: 'refm4iBody',
+ mainchildm4i: 'mainchildm4i',
+ refm4yHead: 'refm4yHead',
+ refm4yBody: 'refm4yBody',
+ mainchildm4y: 'mainchildm4y',
+ ref4331Head: 'ref4331Head',
+ ref4331Body: 'ref4331Body',
+ mainchild4331: 'mainchild4331',
+ transferAllCode: '401400404_all', //全部页签页面code
+ appcodeAll: '401400404', //全部页签appcode
+ transferPagecode21: '400400800_21to4804',
+ appcode21: '400400800',
+ transferPagecode4331: '400600800_4331to4804',
+ appcode4331: '400600800',
+ transferPagecode4802: '401400400_4802to4804',
+ appcode4802: '401400400',
+ transferPagecodem4c: '400801206_4Cto4804',
+ appcodem4c: '400801206',
+ transferPagecodem4i: '400801218_4Ito4804',
+ appcodem4i: '400801218',
+ transferPagecodem4y: '400801210_4Yto4804',
+ appcodem4y: '400801210',
+ splitbill: 'splitbill',
+ splitArea: 'split_area'
+};
+
+const PK = {
+ HEAD21PK: 'pk_order',
+ BODY21PK: 'pk_order_b',
+ HEAD4331PK: 'cdeliveryid',
+ BODY4331PK: 'cdeliverybid',
+ HEADM4CPK: 'cgeneralhid',
+ BODYM4CPK: 'cgeneralbid',
+ HEADM4IPK: 'cgeneralhid',
+ BODYM4IPK: 'cgeneralbid',
+ HEADM4YPK: 'cgeneralhid',
+ BODYM4YPK: 'cgeneralbid',
+ HEAD4802PK: 'capplybill_hid',
+ BODY4802PK: 'capplybill_bid'
+};
+
+const LIST = {
+ pagecode: '401400404_list', //pagecode
+ search: 'search', //查询区
+ head: 'head',
+ body: 'body',
+ srcView: 'view',
+ list: 'list', //表格区
+ inner: 'inner' //列表行
+};
+
+const UISTATE = {
+ status: 'status',
+ init: 'init',
+ browse: 'browse', //浏览
+ add: 'add', //新增
+ edit: 'edit', //修改
+ copy: 'copy', //复制
+ transfer: 'transfer' //拉单
+};
+
+const CARD = {
+ pagecode: '401400404_card', //pagecode
+ form: 'form', //表单区
+ body: 'goods', //货物信息
+ bodyBrowse: 'goods_browse', //货物信息_浏览展开
+ bodyEdit: 'good_edit', //货物信息_侧拉编辑
+ good_delivery: 'good_delivery', //货物收发货信息
+ pack: 'pack', //包装信息
+ packBrowse: 'pack_brower',
+ packEdit: 'pack_edit',
+ pack_delivery: 'pack_delivery', //包装收发货信息
+ leftarea: 'leftarea', //转单侧边栏
+ head: 'head', //按钮区
+ signterm: 'signterm', //签收条件
+ dialog: 'dialog', //弹框区
+ goodhead: 'goods_head', //货物肩部
+ goodinner: 'goods_inner', //货物表体行
+ packhead: 'pack_head', //包装肩部
+ packinner: 'pack_inner', //包装表体行
+ type: 'type',
+ tabId: 'tabId', //转单页签id
+ conditions: 'conditions', //分单条件
+ combine: 'combine' //合并显示弹框按钮区
+};
+
+const CACHEDATA = {
+ listCacheKey: 'scm.dm.delivbill.datasource', //列表数据缓存标识
+ queryCacheKey: 'dm.delivbill.conditions', //查询条件缓存自定义标识
+ transferAllCach: 'transferAllCach', //转单查询缓存标识
+ transfer21Cach: 'transfer21Cach', //转单查询缓存标识
+ transfer4331Cach: 'transfer4331Cach', //转单查询缓存标识
+ transfer4802Cach: 'transfer4802Cach', //转单查询缓存标识
+ transfer4cCach: 'transfer4cCach', //转单查询缓存标识
+ transfer4iCach: 'transfer4iCach', //转单查询缓存标识
+ transfer4yCach: 'transfer4yCach', //转单查询缓存标识
+ transferDataSource: 'scm.dm.delivbill.transferDataSource', //转单缓存数据源
+ tempCardCacheKey: 'dm.dm.delivbill.tempCardCacheKey', //暂存缓存标识
+ splitConditionsCach: 'conditionsCach', //分单条件缓存标识
+ splitConditionsCachKey: 'conditionsCachKey', //分单条件缓存标识
+ tempstatus: 'tempstatus'
+};
+
+const BILLSTATUS = {
+ free: '0', //自由
+ approve: '3' //审批通过
+};
+
+const URL = {
+ listUrl: '/list',
+ cardUrl: '/card',
+ transferUrl: '/transfer',
+ refAll: '/refAll', //拉单总页面
+ query: '/nccloud/dm/delivbill/query.do', // 列表查询
+ queryPage: '/nccloud/dm/delivbill/queryPage.do', //列表分页查询
+ delete: '/nccloud/dm/delivbill/delete.do', //删除
+ print: '/nccloud/dm/delivbill/print.do', //打印
+ permissioncheck: '/nccloud/dm/delivbill/checkPermission.do', //权限
+ approve: '/nccloud/dm/delivbill/approve.do', //审批
+ unApprove: '/nccloud/dm/delivbill/unApprove.do', //取消审批
+ queryCard: '/nccloud/dm/delivbill/queryCard.do',
+ save: '/nccloud/dm/delivbill/save.do', //保存
+ copy: '/nccloud/dm/delivbill/copy.do', // 复制
+ apFeeCalculate: '/nccloud/dm/delivbill/apFeeCalculate.do', //应付运费计算
+ unApFeeCalculate: '/nccloud/dm/delivbill/unApFeeCalculate.do', //取消应付运费计算
+ headAfterEdit: '/nccloud/dm/delivbill/headAfter.do', //表头编辑后
+ refAllQuery: '/nccloud/dm/delivbill/refAllQuery.do',
+ ref21Query: '/nccloud/dm/delivbill/ref21Query.do',
+ ref4331Query: '/nccloud/dm/delivbill/ref4331Query.do',
+ ref4802Query: '/nccloud/dm/delivbill/ref4802Query.do',
+ refm4cQuery: '/nccloud/dm/delivbill/refm4cQuery.do',
+ refm4iQuery: '/nccloud/dm/delivbill/refm4iQuery.do',
+ refm4yQuery: '/nccloud/dm/delivbill/refm4yQuery.do',
+ bodyAfterEdit: '/nccloud/dm/delivbill/bodyAfter.do', //表体编辑后
+ bodyPackAfterEdit: '/nccloud/dm/delivbill/bodyPackAfter.do', //包装表体编辑后
+ bodyBeforeEdit: '/nccloud/dm/delivbill/bodyBefore.do', //表体编辑前
+ linkApSettle: '/nccloud/dm/delivbill/linkApsettle.do', //联查应付运费结算单
+ signReceive: '/nccloud/dm/delivbill/signReceive.do', //签收录入
+ loadEdit: '/nccloud/dm/delivbill/loadEdit.do', //装车录入
+ createPack: '/nccloud/dm/delivbill/createPack.do', //创建包装分类
+ transfer4802URL: '/nccloud/dm/delivbill/transfer4802.do', //运输申请单到运输单
+ transfer4331URL: '/nccloud/dm/delivbill/transfer4331.do', //发货单到运输单
+ transfer4CURL: '/nccloud/dm/delivbill/transfer4C.do', //销售出库单到运输单
+ transfer4YURL: '/nccloud/dm/delivbill/transfer4Y.do', //调拨出库到运输单
+ transfer4IURL: '/nccloud/dm/delivbill/transfer4I.do', //其它出库到运输单
+ transfer21URL: '/nccloud/dm/delivbill/transfer21.do', //采购订单到运输单
+ transferAllURL: '/nccloud/dm/delivbill/transferAll.do', //全部页签拉单
+ querySplit: '/nccloud/dm/delivbill/splitQuery.do', //分单规则查询
+ saveSplit: '/nccloud/dm/delivbill/splitSave.do', //分单规则保存
+ defineSplit: '/nccloud/dm/delivbill/splitDefine.do', //分单规则确定
+ defaultSplit: '/nccloud/dm/delivbill/splitDefault.do', //默认分单条件
+ refAddAll: '/nccloud/dm/delivbill/refAddAll.do', //参照增行全部页签
+ refAddOther: '/nccloud/dm/delivbill/refAddOther.do', //参照增行其它页签
+ combineView: '/nccloud/dm/delivbill/combineView.do', //合并显示
+ combinePrint: '/nccloud/dm/delivbill/combinePrint.do', // 合并显示打印
+ signQry: '/nccloud/dm/delivbill/signQry.do', // 签收条件数据查询
+ trantypeFilter: '/nccloud/dm/delivbill/trantypeFilter.do', //交易类型过滤条件查询
+ vbatchcodeBefor: '/nccloud/dm/delivbill/vbatchcodeBefor.do' //批次号参照编辑前
+};
+
+const BUTTON = {
+ PrintCountQuery: 'PrintCountQuery', //打印次数查询
+ add: 'Add',
+ ref: 'Ref', //参照上游
+ back: 'Back',
+ delete: 'Delete',
+ approve: 'Approve', //审批
+ unApprove: 'UnApprove', //取消审批
+ queryAboutBusiness: 'QueryAboutBusiness', //单据追溯
+ paySettle: 'PaySettle', //应付运费结算单
+ file: 'File', //附件
+ fileBatch: 'FileBatch', //附件批量下载
+ print: 'Print',
+ output: 'Output',
+ mergeDisplay: 'MergeDisplay', //合并显示
+ refresh: 'Refresh',
+ edit: 'Edit', //修改
+ copy: 'Copy', //复制
+ charge: 'Charge', //应付运费计算
+ unCharge: 'UnCharge', //取消应付运费
+ loadEnter: 'LoadEnter', //装车录入
+ signEnter: 'SignEnter', //签收录入
+ mission: 'Mission', //生成任务单
+ save: 'Save',
+ cancel: 'Cancel',
+ cancelTransfer: 'CancelTransfer', //退出转单
+ pagination: 'Pagination',
+ define: 'Define', //弹框确定按钮
+ refAddLine: 'RefAddLine', //参照增行
+ createPack: 'CreatPack', //生成包装记录
+ copyGood: 'CopyGood', //复制收发货信息
+ pasteGood: 'PasteGood', //粘贴收发货信息
+ addLine: 'AddLine', //增行
+ delLine: 'DelLine', //删行
+ openBrowse: 'OpenBrowse', //展开
+ openEdit: 'OpenEdit', //展开
+ openBrowsePack: 'OpenBrowsePack', //展开
+ openEditPack: 'OpenEditPack', //展开
+ copyLine: 'CopyLine', //复制行
+ resetLine: 'ResetLine', //重排行号
+ insertLine: 'InsertLine', //插行
+ pasteLast: 'PasteLast', //粘贴至末行
+ pasteThis: 'PasteThis', //粘贴至此
+ pasteCancel: 'PasteCancel', //取消
+ addLinePack: 'AddLinePack', //增行
+ delLinePack: 'DelLinePack', //删行
+ copyLinePack: 'CopyLinePack', //复制行
+ resetLinePack: 'ResetLinePack', //重排行号
+ insertLinePack: 'InsertLinePack', //插行
+ pasteLastPack: 'PasteLastPack', //粘贴至末行
+ pasteThisPack: 'PasteThisPack', //粘贴至此
+ TemporaryStorage: 'TemporaryStorage', //暂存
+ ShowDraft: 'ShowDraft', //草稿
+ pasteCancelPack: 'PasteCancelPack', //取消
+ cardBodyInit: [
+ 'AddLine',
+ 'DelLine',
+ 'CopyLine',
+ 'ResetLine',
+ 'CreatPack',
+ 'CopyGood',
+ 'InsertLine',
+ 'RefAddLine'
+ ],
+ cardBodyInitPack: [ 'AddLinePack', 'DelLinePack', 'CopyLinePack', 'ResetLinePack', 'InsertLinePack' ],
+ cardBodyCopy: [ 'PasteLast', 'PasteCancel', 'PasteThis' ],
+ cardBodyCopyPack: [ 'PasteLastPack', 'PasteCancelPack', 'PasteThisPack' ],
+ distributedBill: 'DistributedBill' //分单规则
+};
+//卡片所有按钮,key为按钮编码,value为按钮
+const CARD_BTN_ALL = {
+ [BUTTON.add]: false,
+ [BUTTON.ref]: false,
+ [BUTTON.edit]: false,
+ [BUTTON.delete]: false,
+ [BUTTON.copy]: false,
+ [BUTTON.approve]: false,
+ [BUTTON.unApprove]: false,
+ [BUTTON.charge]: false,
+ [BUTTON.unCharge]: false,
+ [BUTTON.loadEnter]: false,
+ [BUTTON.signEnter]: false,
+ [BUTTON.mission]: false,
+ [BUTTON.queryAboutBusiness]: false,
+ [BUTTON.paySettle]: false,
+ [BUTTON.file]: false,
+ [BUTTON.print]: false,
+ [BUTTON.PrintCountQuery]: false,
+ [BUTTON.output]: false,
+ [BUTTON.mergeDisplay]: false,
+ [BUTTON.refresh]: false,
+ [BUTTON.save]: false,
+ [BUTTON.cancel]: false,
+ [BUTTON.cancelTransfer]: false,
+ [BUTTON.refAddLine]: false,
+ [BUTTON.createPack]: false,
+ [BUTTON.copyGood]: false,
+ [BUTTON.pasteGood]: false,
+ [BUTTON.addLine]: false,
+ [BUTTON.delLine]: false,
+ [BUTTON.copyLine]: false,
+ [BUTTON.resetLine]: false,
+ [BUTTON.insertLine]: false,
+ [BUTTON.pasteThis]: false,
+ [BUTTON.pasteLast]: false,
+ [BUTTON.pasteCancel]: false,
+ [BUTTON.addLinePack]: false,
+ [BUTTON.delLinePack]: false,
+ [BUTTON.copyLinePack]: false,
+ [BUTTON.resetLinePack]: false,
+ [BUTTON.insertLinePack]: false,
+ [BUTTON.pasteThisPack]: false,
+ [BUTTON.pasteLastPack]: false,
+ [BUTTON.pasteCancelPack]: false,
+ [BUTTON.openBrowse]: false,
+ [BUTTON.openEdit]: false,
+ [BUTTON.openBrowsePack]: false,
+ [BUTTON.openEditPack]: false
+};
+
+const LIST_BTN_ALL = {
+ [BUTTON.add]: true,
+ [BUTTON.ref]: true,
+ [BUTTON.delete]: true,
+ [BUTTON.approve]: true,
+ [BUTTON.unApprove]: true,
+ [BUTTON.queryAboutBusiness]: true,
+ [BUTTON.paySettle]: true,
+ [BUTTON.file]: true,
+ [BUTTON.fileBatch]: true,
+ [BUTTON.print]: true,
+ [BUTTON.PrintCountQuery]: true,
+ [BUTTON.output]: true,
+ [BUTTON.mergeDisplay]: true,
+ [BUTTON.refresh]: true
+};
+
+const FIELD = {
+ id: 'id',
+ pk_org: 'pk_org',
+ pk_org_v: 'pk_org_v',
+ pk_group: 'pk_group',
+ billtype: '4804', //单据类型
+ pk: 'cdelivbill_hid', //主键
+ bpk: 'cdelivbill_bid', //货物主键
+ cpackbillid: 'cpackbillid', //包装主键
+ ts: 'ts',
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vtrantypecode: 'vtrantypecode', //运输类型
+ fstatusflag: 'fstatusflag', //单据状态
+ vbillcode: 'vbillcode', //单据号
+ bapsettledflag: 'bapsettledflag', //已生应付成运费结算单
+ naptotalverifymny: 'naptotalverifymny', //累计应付核销金额
+ nartotalverifymny: 'nartotalverifymny', //累计应收核销金额
+ ccarrierid: 'ccarrierid', // 承运商
+ creceivecustid: 'creceivecustid', //收货客户
+ creceivecustvid: 'creceivecustvid', //收货客户
+ csignerid: 'csignerid', //签收人
+ bapflag: 'bapflag', //已生成代垫或应付运费发票
+ bmissionbillflag: 'bmissionbillflag',
+ vdriverphone: 'vdriverphone', //司机电话
+ vsenderphone: 'vsenderphone', //押运员电话
+ crouteid: 'crouteid', //运输路线
+ cvehicletypeid: 'cvehicletypeid', //车型
+ cvehicleid: 'cvehicleid', //车辆
+ cdriverid: 'cdriverid', //司机
+ capcustid: 'capcustid', //应付开票方
+ capcustvid: 'capcustvid', //应付开票方
+ csenderid: 'csenderid', //押运员
+ badvfeeflag: 'badvfeeflag', //代垫运费
+ vsrctype: 'vsrctype', //来源单据类型
+ cdelivbill_hid: 'cdelivbill_hid', //来源单据表头主键
+ ddelivdate: 'ddelivdate', //运输日期
+ tdelivtime: 'tdelivtime', //运输时间
+ search21Org: 'pk_order_b.pk_psfinanceorg', //采购订单
+ nprice: 'nprice', // 主单价
+ cinventoryvid: 'cinventoryvid', //物料版本
+ csendstoreid: 'csendstoreid', // 发货仓库
+ creceivestoreid: 'creceivestoreid', //收货仓库
+ creceivestoreorgid: 'creceivestoreorgid', //收货库存组织版本信息
+ csendstoreorgid: 'csendstoreorgid', //发货库存组织版本信息
+ nnum: 'nnum', //主数量
+ nastnum: 'nastnum', //数量
+ cunitid: 'cunitid', //主单位
+ castunitid: 'castunitid', //单位
+ vchangerate: 'vchangerate', //换算率
+ nmoney: 'nmoney', //金额
+ vbatchcode: 'vbatchcode', //批次号
+ pk_batchcode: 'pk_batchcode',
+ nweight: 'nweight', //重量
+ nvolumn: 'nvolumn', //体积
+ vbnote: 'vbnote', //备注
+ csendaddrid: 'csendaddrid', //发货地址
+ creceiveaddrid: 'creceiveaddrid', //收货地址
+ csettlefinorgvid: 'csettlefinorgvid', //结算财务组织
+ csendstoreorgvid: 'csendstoreorgvid', //发货仓库组织
+ csendvendorid: 'csendvendorid', //发货供应商
+ csendvendorvid: 'csendvendorvid', //发货供应商
+ creceivestoreorgvid: 'creceivestoreorgvid', //收货库存组织
+ cdefdoc: 'cdefdoc', //生产厂商
+ cprojectid: 'cprojectid', //项目
+ cffileid: 'cffileid', //特征码
+ ccosignid: 'ccosignid', //委托单位
+ ccosignvid: 'ccosignvid', //委托单位
+ ctakefeeid: 'ctakefeeid', //运费承担单位
+ ctakefeevid: 'ctakefeevid', //运费承担单位
+ cdmsupplierid: 'cdmsupplierid', //供应商
+ cdmsuppliervid: 'cdmsuppliervid', //供应商
+ csendaddrdocid: 'csendaddrdocid', //发货地点
+ creceiveaddrdocid: 'creceiveaddrdocid', //收货地点
+ vreceiver: 'vreceiver', //收货联系人
+ vsender: 'vsender', //发货联系人
+ dsigndate: 'dsigndate', //签收日期
+ crowno: 'crowno', //行号
+ cpackrowno: 'cpackrowno', //行号
+ csrcbid: 'csrcbid', //来源单据表体主键
+ csendareaid: 'csendareaid', //发货地区
+ vbsenderphone: 'vbsenderphone', //发货联系电话
+ creceiveareaid: 'creceiveareaid', //收货地区
+ vreceivephone: 'vreceivephone', //收货联系电话
+ dsenddate: 'dsenddate', //发货日期
+ drequiredate: 'drequiredate', //要求收货日期
+ drequiretime: 'drequiretime', //要求收货时间
+ dsendtime: 'dsendtime', //发货时间
+ cinventoryid: 'cinventoryid', //物料
+ cpackid: 'cpackid', //包装分类
+ npacknum: 'npacknum', //包装件数
+ npackvolume: 'npackvolume', //包装体积
+ npackweight: 'npackweight', //包装重量
+ csettlefinorgid: 'csettlefinorgid', //结算财务组织版本信息
+ casscustid: 'casscustid', //客户
+ casscustvid: 'casscustvid', //客户
+ isSplit: 'isSplit', //分单依据
+ capplybill_hid: 'capplybill_hid', //运输申请单主键
+ cdeliveryid: 'cdeliveryid', //发货单主键
+ cgeneralhid: 'cgeneralhid', //销售出库单主键、调拨出库单主键、其它出库单主键
+ pk_order: 'pk_order', //采购订单主键
+ trafficorgoid: 'trafficorgoid', //物流组织
+ delivnum: 'delivnum', //可运输主数量
+ ntotaltrannum: 'ntotaltrannum', //累计运输主数量
+ ntotaltransnum: 'ntotaltransnum', //累计运输主数量
+ nsendnum: 'nsendnum', //累计运输主数量
+ naccumdevnum: 'naccumdevnum', //累计运输主数量
+ apinvoiceIds: 'apinvoiceIds', //联查单据ids
+ pseudocolumn: 'pseudocolumn', //伪列
+ csrcid: 'csrcid', //来源单据主键
+ nsignastnum: 'nsignastnum', //签收数量
+ nsignnum: 'nsignnum', //签收主数量
+ numfields: [ 'nprice', 'nnum', 'cunitid', 'nastnum', 'nmoney', 'nweight', 'nvolumn', 'vbnote' ]
+};
+
+const SEND_EDIT_FILED = [
+ 'cvehicletypeid',
+ 'cvehicleid',
+ 'cdriverid',
+ 'vdriverphone',
+ 'csenderid',
+ 'vsenderphone',
+ 'ddelivdate',
+ 'tdelivtime',
+ 'vnote'
+];
+
+/**
+ * 自由辅助属性
+ */
+const FREEFIELD = {
+ ccustomerid: 'casscustid',
+ ccustomervid: 'casscustvid',
+ cvendorid: 'cdmsupplierid',
+ cvendorvid: 'cdmsuppliervid'
+};
+
+const SEND_EDIT_BODY_FILED = [ 'nnum', 'nastnum', 'nweight', 'nvolumn', 'npacknum', 'npackweight', 'npackvolume' ];
+
+const SIGN_EDIT_BODY_FILED = [ 'nsignastnum', 'nsignnum', 'nsignweight', 'nsignvolume', 'csignerid', 'dsigndate' ];
+
+const SIGN_EDIT_PACK_FILED = [ 'nsignpacknum', 'nsignpackweight', 'nsignpackvolumn', 'csignerid', 'dsigndate' ];
+
+const COPY_GOODS_KEYS = [
+ FIELD.ccosignid,
+ FIELD.ccosignvid,
+ FIELD.ctakefeeid,
+ FIELD.ctakefeevid,
+ FIELD.csendstoreorgid,
+ FIELD.csendstoreorgvid,
+ FIELD.csendstoreid,
+ FIELD.csendareaid,
+ FIELD.csendaddrdocid,
+ FIELD.csendvendorid,
+ FIELD.csendvendorvid,
+ FIELD.csendaddrid,
+ FIELD.vsender,
+ FIELD.vbsenderphone,
+ FIELD.creceivestoreorgid,
+ FIELD.creceivestoreorgvid,
+ FIELD.creceivestoreid,
+ FIELD.creceiveareaid,
+ FIELD.creceiveaddrid,
+ FIELD.creceivecustid,
+ FIELD.creceivecustvid,
+ FIELD.creceiveaddrdocid,
+ FIELD.vreceiver,
+ FIELD.vreceivephone,
+ FIELD.dsenddate,
+ FIELD.drequiredate,
+ FIELD.drequiretime,
+ FIELD.dsendtime
+];
+
+const ACTION = {
+ add: 'add',
+ delete: 'delete',
+ approve: 'approve',
+ unApprove: 'unApprove',
+ apFeeCalculate: 'apFeeCalculate',
+ unApFeeCalculate: 'unApFeeCalculate'
+};
+
+const ROW_STATUS = {
+ orign: '0',
+ updata: '1',
+ new: '2',
+ delete: '3'
+};
+
+const ALLVBDEF = {
+ vbdef1: 'vbdef1',
+ vbdef2: 'vbdef2',
+ vbdef3: 'vbdef3',
+ vbdef4: 'vbdef4',
+ vbdef5: 'vbdef5',
+ vbdef6: 'vbdef6',
+ vbdef7: 'vbdef7',
+ vbdef8: 'vbdef8',
+ vbdef9: 'vbdef9',
+ vbdef10: 'vbdef10',
+ vbdef11: 'vbdef11',
+ vbdef12: 'vbdef12',
+ vbdef13: 'vbdef13',
+ vbdef14: 'vbdef14',
+ vbdef15: 'vbdef15',
+ vbdef16: 'vbdef16',
+ vbdef17: 'vbdef17',
+ vbdef18: 'vbdef18',
+ vbdef19: 'vbdef19',
+ vbdef20: 'vbdef20',
+ vbdef21: 'vbdef21',
+ vbdef22: 'vbdef22',
+ vbdef23: 'vbdef23',
+ vbdef24: 'vbdef24',
+ vbdef25: 'vbdef25',
+ vbdef26: 'vbdef26',
+ vbdef27: 'vbdef27',
+ vbdef28: 'vbdef28',
+ vbdef29: 'vbdef29',
+ vbdef30: 'vbdef30',
+ vbdef31: 'vbdef31',
+ vbdef32: 'vbdef32',
+ vbdef33: 'vbdef33',
+ vbdef34: 'vbdef34',
+ vbdef35: 'vbdef35',
+ vbdef36: 'vbdef36',
+ vbdef37: 'vbdef37',
+ vbdef38: 'vbdef38',
+ vbdef39: 'vbdef39',
+ vbdef40: 'vbdef40',
+ vbdef41: 'vbdef41',
+ vbdef42: 'vbdef42',
+ vbdef43: 'vbdef43',
+ vbdef44: 'vbdef44',
+ vbdef45: 'vbdef45',
+ vbdef46: 'vbdef46',
+ vbdef47: 'vbdef47',
+ vbdef48: 'vbdef48',
+ vbdef49: 'vbdef49',
+ vbdef50: 'vbdef50'
+};
+
+const ALLVDEF = {
+ vdef1: 'vdef1',
+ vdef2: 'vdef2',
+ vdef3: 'vdef3',
+ vdef4: 'vdef4',
+ vdef5: 'vdef5',
+ vdef6: 'vdef6',
+ vdef7: 'vdef7',
+ vdef8: 'vdef8',
+ vdef9: 'vdef9',
+ vdef10: 'vdef10',
+ vdef11: 'vdef11',
+ vdef12: 'vdef12',
+ vdef13: 'vdef13',
+ vdef14: 'vdef14',
+ vdef15: 'vdef15',
+ vdef16: 'vdef16',
+ vdef17: 'vdef17',
+ vdef18: 'vdef18',
+ vdef19: 'vdef19',
+ vdef20: 'vdef20',
+ vdef21: 'vdef21',
+ vdef22: 'vdef22',
+ vdef23: 'vdef23',
+ vdef24: 'vdef24',
+ vdef25: 'vdef25',
+ vdef26: 'vdef26',
+ vdef27: 'vdef27',
+ vdef28: 'vdef28',
+ vdef29: 'vdef29',
+ vdef30: 'vdef30',
+ vdef31: 'vdef31',
+ vdef32: 'vdef32',
+ vdef33: 'vdef33',
+ vdef34: 'vdef34',
+ vdef35: 'vdef35',
+ vdef36: 'vdef36',
+ vdef37: 'vdef37',
+ vdef38: 'vdef38',
+ vdef39: 'vdef39',
+ vdef40: 'vdef40',
+ vdef41: 'vdef41',
+ vdef42: 'vdef42',
+ vdef43: 'vdef43',
+ vdef44: 'vdef44',
+ vdef45: 'vdef45',
+ vdef46: 'vdef46',
+ vdef47: 'vdef47',
+ vdef48: 'vdef48',
+ vdef49: 'vdef49',
+ vdef50: 'vdef50'
+};
+
+const KEYMAP = {
+ KEYMAP4331TO4804: {
+ refAllHead: {
+ cdelivbill_hid: 'cdeliveryid', //主键
+ ctrantypeid: '', //单据类型
+ vbillcode: 'vbillcode',
+ dbilldate: 'dbilldate',
+ csendtypeid: 'ctransporttypeid', //运输方式
+ crouteid: 'ctransportrouteid', //运输路线
+ ccarrierid: '#', //表头与表体都有某字段时,对值为#的字段屏蔽保证主子拉平时表头不会覆盖表体
+ ntotalastnum: 'ntotalastnum', //总数量
+ ntotalweight: 'ntotalweight', //总重量
+ ntotalvolume: 'ntotalvolume', //总体积
+ ntotalpacknum: 'ntotalpiece', //总件数
+ ts: 'ts',
+ vnote: 'vnote',
+ // 所有自定义项
+ ...ALLVDEF
+ },
+ refAllBody: {
+ cdelivbill_bid: 'cdeliverybid', //子表主键
+ csendstoreorgvid: 'csendstockorgvid', //发货库存组织
+ cinventoryvid: 'cmaterialvid', //物料
+ 'cinventoryvid.name': 'cmaterialvid.name',
+ 'cinventoryvid.materialspec': 'cmaterialvid.materialspec',
+ 'cinventoryvid.materialtype': 'cmaterialvid.materialtype',
+ nastnum: 'nastnum',
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ nweight: 'nweight',
+ nvolumn: 'nvolume',
+ npacknum: 'npiece', //件数
+ ccarrierid: 'ctranscustid', //承运商
+ csendaddrid: 'csendaddrid', //发货地址
+ creceivestoreorgvid: 'cinstockorgvid', //收货库存组织
+ creceiveaddrid: 'creceiveaddrid', //收货地址
+ nnum: 'nnum', //主数量
+ ntotaltrannum: 'ntotaltransnum', //累计运输主数量
+ ts: 'ts',
+ // 自由辅助属性
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ pk_batchcode: 'pk_batchcode', //批次号
+ vchangerate: 'vchangerate', //换算率
+ csendstoreid: 'csendstordocid', //发货仓库
+ csendareaid: 'csendareaid', //发货地区
+ csendaddrdocid: 'csendadddocid', //发货地点
+ csendvendorid: '', //发货供应商
+ csendvendorvid: '', //发货供应商
+ vsender: 'csendpersonid', //发货联系人
+ vbsenderphone: 'vsendtel', // 发货联系电话
+ creceivestoreid: 'cinstordocid', // 收货仓库
+ creceiveareaid: 'creceiveareaid', // 收货地区
+ creceiveaddrdocid: 'creceiveadddocid', // 收货地点
+ creceivecustid: 'creceivecustid', // 收货客户
+ creceivecustvid: 'creceivecustvid', // 收货客户
+ vreceiver: 'creceivepersonid', // 收货联系人
+ vreceivephone: 'vreceivetel', // 收货联系电话
+ dsenddate: 'dsenddate', // 发货日期
+ drequiredate: 'dreceivedate', // 要求收货日期
+ vbnote: 'frownote', // 行备注
+ vvehiclecode: '', // 运输工具号
+ vtransfercode: '', //发货车号
+ // 所有自定义项
+ ...ALLVBDEF
+ }
+ },
+ KEYMAP4CTO4804: {
+ refAllHead: {
+ cdelivbill_hid: 'cgeneralhid', //主键
+ ctrantypeid: '', //单据类型
+ vbillcode: 'vbillcode',
+ dbilldate: 'dbilldate',
+ csendtypeid: 'cdilivertypeid', //运输方式
+ crouteid: '', //运输路线
+ ccarrierid: 'ctrancustid', //承运商
+ ntotalastnum: 'ntotalnum', //总数量
+ ntotalweight: 'ntotalweight', //总重量
+ ntotalvolume: 'ntotalvolume', //总体积
+ ntotalpacknum: 'ntotalpiece', //总件数
+ ts: 'ts',
+ // 所有自定义项
+ ...ALLVDEF
+ },
+ refAllBody: {
+ cdelivbill_bid: 'cgeneralbid', //子表主键
+ csendstoreorgvid: 'pk_org_v', //发货库存组织 表头库存组织
+ cinventoryvid: 'cmaterialvid', //物料
+ 'cinventoryvid.name': 'cmaterialvid.name',
+ 'cinventoryvid.materialspec': 'cmaterialvid.materialspec',
+ 'cinventoryvid.materialtype': 'cmaterialvid.materialtype',
+ nastnum: 'nassistnum',
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ nweight: 'nweight',
+ nvolumn: 'nvolume',
+ npacknum: 'npiece', //件数
+ ccarrierid: 'ctrancustid', //承运商 表头
+ csendaddrid: 'vdiliveraddress', //发货地址 表头运输地址
+ creceivestoreorgvid: 'cothercalbodyvid', //收货库存组织 表头入库库存组织
+ creceiveaddrid: 'vreceiveaddress', //收货地址
+ nnum: 'nnum', //主数量
+ ntotaltrannum: 'ntotaltrannum', //累计运输主数量
+ ts: 'ts',
+ // 自由辅助属性
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ pk_batchcode: '', //批次号
+ vchangerate: '', //换算率
+ csendstoreid: '', //发货仓库
+ csendareaid: '', //发货地区
+ csendaddrdocid: '', //发货地点
+ csendvendorid: '', //发货供应商
+ csendvendorvid: '', //发货供应商
+ vsender: '', //发货联系人
+ vbsenderphone: '', // 发货联系电话
+ creceivestoreid: '', // 收货仓库
+ creceiveareaid: '', // 收货地区
+ creceiveaddrdocid: '', // 收货地点
+ creceivecustid: '', // 收货客户
+ creceivecustvid: '', // 收货客户
+ vreceiver: '', // 收货联系人
+ vreceivephone: '', // 收货联系电话
+ dsenddate: '', // 发货日期
+ drequiredate: '', // 要求收货日期
+ vbnote: '', // 行备注
+ vvehiclecode: '', // 运输工具号
+ vtransfercode: '', //发货车号
+ // 所有自定义项
+ ...ALLVBDEF
+ }
+ },
+ KEYMAP4YTO4804: {
+ refAllHead: {
+ cdelivbill_hid: 'cgeneralhid', //主键
+ ctrantypeid: '', //单据类型
+ vbillcode: 'vbillcode',
+ dbilldate: 'dbilldate',
+ csendtypeid: 'cdilivertypeid', //运输方式
+ crouteid: '', //运输路线
+ ccarrierid: 'ctrancustid', //承运商
+ ntotalastnum: 'ntotalnum', //总数量
+ ntotalweight: 'ntotalweight', //总重量
+ ntotalvolume: 'ntotalvolume', //总体积
+ ntotalpacknum: 'ntotalpiece', //总件数
+ ts: 'ts',
+ // 所有自定义项
+ ...ALLVDEF
+ },
+ refAllBody: {
+ cdelivbill_bid: 'cgeneralbid', //子表主键
+ csendstoreorgvid: 'pk_org_v', //发货库存组织 表头库存组织
+ cinventoryvid: 'cmaterialvid', //物料
+ 'cinventoryvid.name': 'cmaterialvid.name',
+ 'cinventoryvid.materialspec': 'cmaterialvid.materialspec',
+ 'cinventoryvid.materialtype': 'cmaterialvid.materialtype',
+ nastnum: 'nassistnum',
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ nweight: 'nweight',
+ nvolumn: 'nvolume',
+ npacknum: 'npiece', //件数
+ ccarrierid: 'ctrancustid', //承运商 表头
+ csendaddrid: 'vdiliveraddress', //发货地址 表头运输地址
+ creceivestoreorgvid: 'cothercalbodyvid', //收货库存组织 表头调入库存组织
+ creceiveaddrid: 'vreceiveaddress', //收货地址
+ nnum: 'nnum', //主数量
+ ntotaltrannum: 'ntotaltrannum', //累计运输主数量
+ ts: 'ts',
+ // 自由辅助属性
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ pk_batchcode: '', //批次号
+ vchangerate: '', //换算率
+ csendstoreid: '', //发货仓库
+ csendareaid: '', //发货地区
+ csendaddrdocid: '', //发货地点
+ csendvendorid: '', //发货供应商
+ csendvendorvid: '', //发货供应商
+ vsender: '', //发货联系人
+ vbsenderphone: '', // 发货联系电话
+ creceivestoreid: '', // 收货仓库
+ creceiveareaid: '', // 收货地区
+ creceiveaddrdocid: '', // 收货地点
+ creceivecustid: '', // 收货客户
+ creceivecustvid: '', // 收货客户
+ vreceiver: '', // 收货联系人
+ vreceivephone: '', // 收货联系电话
+ dsenddate: '', // 发货日期
+ drequiredate: '', // 要求收货日期
+ vbnote: '', // 行备注
+ vvehiclecode: '', // 运输工具号
+ vtransfercode: '', //发货车号
+ // 所有自定义项
+ ...ALLVBDEF
+ }
+ },
+ KEYMAP4ITO4804: {
+ refAllHead: {
+ cdelivbill_hid: 'cgeneralhid', //主键
+ ctrantypeid: '', //单据类型
+ vbillcode: 'vbillcode',
+ dbilldate: 'dbilldate',
+ csendtypeid: 'cdilivertypeid', //运输方式
+ crouteid: '', //运输路线
+ ccarrierid: '', //承运商
+ ntotalastnum: 'ntotalnum', //总数量
+ ntotalweight: 'ntotalweight', //总重量
+ ntotalvolume: 'ntotalvolume', //总体积
+ ntotalpacknum: 'ntotalpiece', //总件数
+ ts: 'ts',
+ // 所有自定义项
+ ...ALLVDEF
+ },
+ refAllBody: {
+ cdelivbill_bid: 'cgeneralbid', //子表主键
+ csendstoreorgvid: 'pk_org_v', //发货库存组织 表头库存组织
+ cinventoryvid: 'cmaterialvid', //物料
+ 'cinventoryvid.name': 'cmaterialvid.name',
+ 'cinventoryvid.materialspec': 'cmaterialvid.materialspec',
+ 'cinventoryvid.materialtype': 'cmaterialvid.materialtype',
+ nastnum: 'nassistnum', //实发数量
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ nweight: 'nweight',
+ nvolumn: 'nvolume',
+ npacknum: 'npiece', //件数
+ ccarrierid: '', //承运商 空
+ csendaddrid: 'vdiliveraddress', //发货地址 表头运输地址
+ creceivestoreorgvid: 'cothercalbodyvid', //收货库存组织 表头入库库存组织
+ creceiveaddrid: 'vreceiveaddress', //收货地址
+ nnum: 'nnum', //主数量
+ ntotaltrannum: 'ntotaltrannum', //累计运输主数量
+ ts: 'ts',
+ // 自由辅助属性
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ pk_batchcode: '', //批次号
+ vchangerate: '', //换算率
+ csendstoreid: '', //发货仓库
+ csendareaid: '', //发货地区
+ csendaddrdocid: '', //发货地点
+ csendvendorid: '', //发货供应商
+ csendvendorvid: '', //发货供应商
+ vsender: '', //发货联系人
+ vbsenderphone: '', // 发货联系电话
+ creceivestoreid: '', // 收货仓库
+ creceiveareaid: '', // 收货地区
+ creceiveaddrdocid: '', // 收货地点
+ creceivecustid: '', // 收货客户
+ creceivecustvid: '', // 收货客户
+ vreceiver: '', // 收货联系人
+ vreceivephone: '', // 收货联系电话
+ dsenddate: '', // 发货日期
+ drequiredate: '', // 要求收货日期
+ vbnote: '', // 行备注
+ vvehiclecode: '', // 运输工具号
+ vtransfercode: '', //发货车号
+ // 所有自定义项
+ ...ALLVBDEF
+ }
+ },
+ KEYMAP4802TO4804: {
+ refAllHead: {
+ cdelivbill_hid: 'capplybill_hid', //主键
+ ctrantypeid: '', //单据类型
+ vbillcode: 'vbillcode',
+ dbilldate: 'dbilldate',
+ csendtypeid: 'csendtypeid', //运输方式
+ crouteid: 'crouteid', //运输路线
+ ccarrierid: '', //承运商
+ ntotalastnum: 'ntotalastnum', //总数量
+ ntotalweight: 'ntotalweight', //总重量
+ ntotalvolume: 'ntotalvolume', //总体积
+ ntotalpacknum: 'ntotalpiece', //总件数
+ ts: 'ts',
+ // 所有自定义项
+ ...ALLVDEF
+ },
+ refAllBody: {
+ cdelivbill_bid: 'capplybill_bid', //子表主键
+ csendstoreorgvid: 'csendstoreorgvid', //发货库存组织
+ cinventoryvid: 'cinventoryvid', //物料
+ 'cinventoryvid.name': 'cinventoryvid.name',
+ 'cinventoryvid.materialspec': 'cinventoryvid.materialspec',
+ 'cinventoryvid.materialtype': 'cinventoryvid.materialtype',
+ nastnum: 'nastnum',
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ nweight: 'nweight',
+ nvolumn: 'nvolumn',
+ npacknum: 'npiece', //件数
+ ccarrierid: '', //承运商
+ csendaddrid: 'csendaddrid', //发货地址
+ creceivestoreorgvid: 'creceivestoreorgvid', //收货库存组织
+ creceiveaddrid: 'creceiveaddrid', //收货地址
+ nnum: 'nnum', //主数量
+ ntotaltrannum: 'nsendnum', //累计运输主数量
+ ts: 'ts',
+ // 自由辅助属性
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ pk_batchcode: '', //批次号
+ vchangerate: '', //换算率
+ csendstoreid: '', //发货仓库
+ csendareaid: '', //发货地区
+ csendaddrdocid: '', //发货地点
+ csendvendorid: '', //发货供应商
+ csendvendorvid: '', //发货供应商
+ vsender: '', //发货联系人
+ vbsenderphone: '', // 发货联系电话
+ creceivestoreid: '', // 收货仓库
+ creceiveareaid: '', // 收货地区
+ creceiveaddrdocid: '', // 收货地点
+ creceivecustid: '', // 收货客户
+ creceivecustvid: '', // 收货客户
+ vreceiver: '', // 收货联系人
+ vreceivephone: '', // 收货联系电话
+ dsenddate: '', // 发货日期
+ drequiredate: '', // 要求收货日期
+ vbnote: '', // 行备注
+ vvehiclecode: '', // 运输工具号
+ vtransfercode: '', //发货车号
+ // 所有自定义项
+ ...ALLVBDEF
+ }
+ },
+ KEYMAP21TO4804: {
+ refAllHead: {
+ cdelivbill_hid: 'pk_order', //主键
+ ctrantypeid: '', //单据类型
+ vbillcode: 'vbillcode',
+ dbilldate: 'dbilldate',
+ csendtypeid: 'pk_transporttype', //运输方式
+ crouteid: '', //运输路线
+ ccarrierid: '', //承运商
+ ntotalastnum: 'ntotalastnum', //总数量
+ ntotalweight: 'ntotalweight', //总重量
+ ntotalvolume: 'ntotalvolume', //总体积
+ ntotalpacknum: 'ntotalpiece', //总件数
+ ts: 'ts',
+ // 所有自定义项
+ ...ALLVDEF
+ },
+ refAllBody: {
+ cdelivbill_bid: 'pk_order_b', //子表主键
+ csendstoreorgvid: '', //发货库存组织
+ cinventoryvid: 'pk_material', //物料
+ 'cinventoryvid.name': 'pk_material.name',
+ 'cinventoryvid.materialspec': 'pk_material.materialspec',
+ 'cinventoryvid.materialtype': 'pk_material.materialtype',
+ nastnum: 'nastnum',
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ nweight: 'nweight',
+ nvolumn: 'nvolumn',
+ npacknum: 'npacknum', //件数
+ ccarrierid: '', //承运商
+ csendaddrid: 'vvenddevaddr', //发货地址
+ creceivestoreorgvid: 'pk_arrvstoorg_v', //收货库存组织
+ creceiveaddrid: 'pk_receiveaddress', //收货地址
+ nnum: 'nnum', //主数量
+ ntotaltrannum: 'naccumdevnum', //累计运输主数量
+ ts: 'ts',
+ // 自由辅助属性
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ pk_batchcode: '', //批次号
+ vchangerate: '', //换算率
+ csendstoreid: '', //发货仓库
+ csendareaid: '', //发货地区
+ csendaddrdocid: '', //发货地点
+ csendvendorid: '', //发货供应商
+ csendvendorvid: '', //发货供应商
+ vsender: '', //发货联系人
+ vbsenderphone: '', // 发货联系电话
+ creceivestoreid: '', // 收货仓库
+ creceiveareaid: '', // 收货地区
+ creceiveaddrdocid: '', // 收货地点
+ creceivecustid: '', // 收货客户
+ creceivecustvid: '', // 收货客户
+ vreceiver: '', // 收货联系人
+ vreceivephone: '', // 收货联系电话
+ dsenddate: '', // 发货日期
+ drequiredate: '', // 要求收货日期
+ vbnote: '', // 行备注
+ vvehiclecode: '', // 运输工具号
+ vtransfercode: '', //发货车号
+ // 所有自定义项
+ ...ALLVBDEF
+ }
+ }
+};
+
+export {
+ LIST,
+ UISTATE,
+ CARD,
+ CACHEDATA,
+ BILLSTATUS,
+ URL,
+ BUTTON,
+ CARD_BTN_ALL,
+ LIST_BTN_ALL,
+ FIELD,
+ TRANSFER,
+ ACTION,
+ PK,
+ ROW_STATUS,
+ SEND_EDIT_FILED,
+ SEND_EDIT_BODY_FILED,
+ COPY_GOODS_KEYS,
+ KEYMAP,
+ SIGN_EDIT_BODY_FILED,
+ SIGN_EDIT_PACK_FILED,
+ FREEFIELD
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/afterEvent/index.js b/src/dm/dm/delivbill/list/afterEvent/index.js
new file mode 100644
index 0000000..3c534b1
--- /dev/null
+++ b/src/dm/dm/delivbill/list/afterEvent/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchAfterEvent from './searchAfterEvent';
+
+export { searchAfterEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/afterEvent/searchAfterEvent.js b/src/dm/dm/delivbill/list/afterEvent/searchAfterEvent.js
new file mode 100644
index 0000000..159164c
--- /dev/null
+++ b/src/dm/dm/delivbill/list/afterEvent/searchAfterEvent.js
@@ -0,0 +1,107 @@
+/*VRi3nyqaeOPenSkOLNstN5huxsAj26D9/1Sipk4ggko=*/
+/*
+ * 列表查询区编辑后事件
+ * @Author: liangzhyf
+ * @Date: 2020-04-02 10:35:13
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-10-07 11:05:51
+ */
+import { FIELD, LIST } from '../../constance';
+
+export default function(key, val) {
+ let FIELDARRY = [
+ FIELD.crouteid,
+ FIELD.ccarrierid,
+ FIELD.cvehicletypeid,
+ FIELD.cvehicleid,
+ FIELD.cdriverid,
+ FIELD.csenderid,
+ 'delivbill.cinventoryid.code',
+ 'delivbill.cinventoryid.pk_marbasclass',
+ 'delivbill.cprojectid',
+ 'delivbill.ccosignid',
+ 'delivbill.ctakefeeid',
+ 'delivbill.csendvendorid',
+ 'delivbill.casscustid',
+ 'delivbill.creceivecustid',
+ 'delivbill.vsender',
+ 'delivbill.vreceiver',
+ 'delivpack.csendvendorid',
+ 'delivpack.casscustid',
+ 'delivpack.creceivecustid',
+ 'delivpack.vsender',
+ 'delivpack.vreceiver'
+ ];
+ if (key == FIELD.pk_org) {
+ let meta = this.props.meta.getMeta();
+ meta[LIST.search].items.map((item) => {
+ if (
+ FIELDARRY.includes(item.attrcode) ||
+ item.attrcode.includes('vdef') ||
+ item.attrcode.includes('vbdef') ||
+ item.attrcode.includes('vfree')
+ ) {
+ if (val && (val.length == 1 || val.refpk || (val.value && !val.value.includes(',')))) {
+ item.isShowUnit = false;
+ } else {
+ item.isShowUnit = true;
+ }
+ }
+ });
+ this.props.meta.setMeta(meta);
+ } else if (key == 'delivbill.csendstoreorgid') {
+ let meta = this.props.meta.getMeta();
+ meta[LIST.search].items.map((item) => {
+ let val = (this.props.search.getSearchValByField(LIST.search, 'delivbill.csendstoreorgid') || {}).value;
+ if (item.attrcode == 'delivbill.csendstoreid') {
+ if (val.firstvalue && !val.firstvalue.includes(',')) {
+ item.isShowUnit = false;
+ } else {
+ item.isShowUnit = true;
+ }
+ }
+ });
+ this.props.meta.setMeta(meta);
+ } else if (key == 'delivbill.creceivestoreorgid') {
+ let meta = this.props.meta.getMeta();
+ meta[LIST.search].items.map((item) => {
+ let val = (this.props.search.getSearchValByField(LIST.search, 'delivbill.creceivestoreorgid') || {}).value;
+ if (item.attrcode == 'delivbill.creceivestoreid') {
+ if (val.firstvalue && !val.firstvalue.includes(',')) {
+ item.isShowUnit = false;
+ } else {
+ item.isShowUnit = true;
+ }
+ }
+ });
+ this.props.meta.setMeta(meta);
+ } else if (key == 'delivpack.csendstoreorgid') {
+ let meta = this.props.meta.getMeta();
+ meta[LIST.search].items.map((item) => {
+ let val = (this.props.search.getSearchValByField(LIST.search, 'delivpack.csendstoreorgid') || {}).value;
+ if (item.attrcode == 'delivpack.csendstoreid') {
+ if (val.firstvalue && !val.firstvalue.includes(',')) {
+ item.isShowUnit = false;
+ } else {
+ item.isShowUnit = true;
+ }
+ }
+ });
+ this.props.meta.setMeta(meta);
+ } else if (key == 'delivpack.creceivestoreorgid') {
+ let meta = this.props.meta.getMeta();
+ meta[LIST.search].items.map((item) => {
+ let val = (this.props.search.getSearchValByField(LIST.search, 'delivpack.creceivestoreorgid') || {}).value;
+ if (item.attrcode == 'delivpack.creceivestoreid') {
+ if (val.firstvalue && !val.firstvalue.includes(',')) {
+ item.isShowUnit = false;
+ } else {
+ item.isShowUnit = true;
+ }
+ }
+ });
+ this.props.meta.setMeta(meta);
+ }
+}
+
+/*VRi3nyqaeOPenSkOLNstN5huxsAj26D9/1Sipk4ggko=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/addBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/addBtnClick.js
new file mode 100644
index 0000000..27f85f8
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/addBtnClick.js
@@ -0,0 +1,17 @@
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
+/*
+ * 运输单列表新增
+ * @Author: liangzhyf
+ * @Date: 2020-01-16 16:59:46
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 15:09:10
+ */
+import { URL, UISTATE, CARD } from '../../constance';
+export default function(props) {
+ props.pushTo(URL.cardUrl, {
+ status: UISTATE.add,
+ pagecode: CARD.pagecode
+ });
+}
+
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/commonSearch.js b/src/dm/dm/delivbill/list/btnClicks/commonSearch.js
new file mode 100644
index 0000000..9dc84cd
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/commonSearch.js
@@ -0,0 +1,83 @@
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
+import { ajax } from 'nc-lightapp-front';
+import { buttonController } from '../viewController';
+import { URL, LIST, CACHEDATA, FIELD, BUTTON } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import {
+ showSuccessInfo,
+ showWarningInfo,
+ showQueryResultInfoForNoPage
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+/**
+ * 查询,刷新
+ * @param {*} props
+ * @param {*} isRefresh
+ */
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.listCacheKey, CACHEDATA.queryCacheKey);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ queryInfo = props.search.getQueryInfo(LIST.search);
+ //查询时把查询条件缓存下来
+ setDefData(CACHEDATA.listCacheKey, CACHEDATA.queryCacheKey, queryInfo);
+ }
+ let pageInfo = props.table.getTablePageInfo(LIST.list);
+ queryInfo.pageInfo = pageInfo;
+ queryInfo = transtypeUtils.beforeSearch.call(this, queryInfo, FIELD.ctrantypeid);
+ ajax({
+ url: URL.query,
+ data: {
+ queryInfo: queryInfo,
+ pageCode: LIST.pagecode, //页面编码
+ currentTab: 'all', //当前页签编码
+ isNeedOrgPermission: 'false'
+ },
+ method: 'post',
+ success: (res) => {
+ if (res.success) {
+ props.table.setAllTableData(LIST.list, { rows: [] });
+ let count = 0;
+ if (res.data) {
+ if (
+ res.data &&
+ res.data.currentGrid &&
+ res.data.currentGrid[LIST.list] &&
+ res.data.currentGrid[LIST.list].rows
+ ) {
+ props.table.setAllTableData(LIST.list, res.data.currentGrid[LIST.list]);
+ count = res.data.currentGrid[LIST.list].allpks.length;
+ }
+ }
+ //判断是否是刷新
+ if (isRefresh) {
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000008')); /* 国际化处理: 刷新成功*/
+ } else {
+ if (count > 0) {
+ showSuccessInfo(
+ getLangByResId(this, '4014DELIVBILL-000054', { 0: count })
+ ); /* 国际化处理: 查询成功!,共{0}条*/
+ } else {
+ showQueryResultInfoForNoPage();
+ }
+ }
+ buttonController.call(this, props);
+ }
+ if (queryInfo == null) {
+ props.button.setButtonDisabled(BUTTON.refresh, true);
+ } else {
+ props.button.setButtonDisabled(BUTTON.refresh, false);
+ }
+ }
+ });
+}
+
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/copyBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/copyBtnClick.js
new file mode 100644
index 0000000..400ce64
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/copyBtnClick.js
@@ -0,0 +1,17 @@
+/*j5Rddi+EiXr6lL+2HQtAze8DGIPb0+m/t4EY6Wg6ZpQ=*/
+/*
+ * 运输单列表复制
+ * @Author: liangzhyf
+ * @Date: 2020-01-16 16:59:46
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-02-07 14:52:33
+ */
+import { URL, UISTATE, FIELD } from '../../constance';
+export default function(props, record) {
+ props.pushTo(URL.cardUrl, {
+ status: UISTATE.copy,
+ id: record[FIELD.pk].value
+ });
+}
+
+/*j5Rddi+EiXr6lL+2HQtAze8DGIPb0+m/t4EY6Wg6ZpQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/deleteBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/deleteBtnClick.js
new file mode 100644
index 0000000..b0d3c42
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/deleteBtnClick.js
@@ -0,0 +1,106 @@
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
+/*
+ * 运输单列表删除
+ * @Author: liangzhyf
+ * @Date: 2020-01-11 13:40:20
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-09-26 18:29:57
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { buttonController } from '../viewController';
+import { LIST, FIELD, URL } from '../../constance';
+import { deleteCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import {
+ showSuccessInfo,
+ showWarningInfo,
+ showDeleteDialog,
+ showBatchOprMessage
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, record, index) {
+ if (index != undefined) {
+ doDelete.call(this, props, [ { data: { values: record } } ], index);
+ } else {
+ let rows = props.table.getCheckedRows(LIST.list);
+ if (rows.length <= 0) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000057')); /* 国际化处理: 请选择要删除的数据*/
+ return;
+ }
+ let indexes = [];
+ //删行
+ rows.forEach((row) => {
+ indexes.push(row.index);
+ });
+ showDeleteDialog({
+ beSureBtnClick: doDelete.bind(this, props, rows, indexes)
+ });
+ }
+}
+
+/**
+ * 执行删除
+ * @param {*} props
+ * @param {*} rows 行数据
+ * @param {*} indexes 行索引
+ */
+function doDelete(props, rows, indexes) {
+ let deleteInfos = [];
+ rows.forEach((row) => {
+ let rowValues = row.data.values;
+ let id = rowValues[FIELD.pk].value;
+ let ts = rowValues[FIELD.ts].value;
+ if (id) {
+ deleteInfos.push({ id, ts });
+ }
+ });
+ if (deleteInfos.length > 0) {
+ ajax({
+ url: URL.delete,
+ async: false,
+ data: { infos: deleteInfos },
+ success: (res) => {
+ if (res && res.success) {
+ if (JSON.stringify(res.data.errorMessageMap || {}) != '{}') {
+ // 成功的index
+ let sucIndex = [];
+ rows.forEach((element, index) => {
+ if (!res.data.errorMessageMap[index]) {
+ sucIndex.push(element.index);
+ }
+ props.table.selectTableRows(LIST.list, indexes, true);
+ deleteCacheDataForList(props, LIST.list, element.data.values[FIELD.pk].value);
+ });
+ props.table.deleteTableRowsByIndex(LIST.list, sucIndex);
+ res.data.failedNum = rows.length - sucIndex.length;
+ } else {
+ rows.forEach((row) => {
+ let rowValues = row.data.values;
+ let id = rowValues[FIELD.pk].value;
+ if (id) {
+ deleteCacheDataForList(props, LIST.list, id);
+ }
+ props.table.selectTableRows(LIST.list, indexes, false);
+ });
+ props.table.deleteTableRowsByIndex(LIST.list, indexes);
+ res.data.failedNum = 0;
+ }
+ if (indexes.length > 1) {
+ showBatchOprMessage(null, res.data);
+ } else {
+ showSuccessInfo(getLangByResId(this, '4014DELIVBILL-000020')); /* 国际化处理: 删除成功!*/
+ }
+ buttonController.call(this, props);
+ }
+ },
+ error: (ress) => {
+ toast({
+ color: 'danger',
+ content: ress.message
+ });
+ }
+ });
+ }
+}
+
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/editBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/editBtnClick.js
new file mode 100644
index 0000000..033d7fe
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/editBtnClick.js
@@ -0,0 +1,30 @@
+/*rzxqFeC1Q4Nf7h12KpqtZffmls+sYlNzLaSthb2yEsQ=*/
+/*
+ * 运输单列表修改
+ * @Author: liangzhyf
+ * @Date: 2020-01-16 16:59:46
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 15:09:38
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, UISTATE, FIELD, CARD } from '../../constance';
+export default function(props, record) {
+ if (record) {
+ let id = record[FIELD.pk].value;
+ let delinfo = { id: id, actioncode: 'edit' };
+ ajax({
+ url: URL.permissioncheck,
+ data: delinfo,
+ method: 'post',
+ success: (res) => {
+ props.pushTo(URL.cardUrl, {
+ pagecode: CARD.pagecode,
+ status: UISTATE.edit,
+ id: id
+ });
+ }
+ });
+ }
+}
+
+/*rzxqFeC1Q4Nf7h12KpqtZffmls+sYlNzLaSthb2yEsQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/fileBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/fileBtnClick.js
new file mode 100644
index 0000000..6877816
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/fileBtnClick.js
@@ -0,0 +1,30 @@
+/*J6frW/si/EpkjTwKn+gUiYCnhNmTsLb+0akJqjTbC48=*/
+/*
+ * 附件管理按钮事件
+ * @Author: liangzhyf
+ * @Date: 2020-03-16 10:17:35
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-09-23 11:11:38
+ */
+import { LIST, FIELD } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props) {
+ let pks = [];
+ let vbillcodes = [];
+ // 点击表头钮
+ let selrows = props.table.getCheckedRows(LIST.list);
+ if (selrows == null || selrows.length == 0) {
+ showErrorInfo(null, getLangByResId(this, '4014DELIVBILL-000058')); /* 国际化处理: 请选择要操作的单据!*/
+ return;
+ }
+ selrows.forEach((row) => {
+ pks.push(row.data.values[FIELD.pk].value);
+ vbillcodes.push(row.data.values[FIELD.vbillcode].value);
+ });
+
+ this.setState({ showUploader: true, billid: pks[0], vbillcode: vbillcodes[0] });
+}
+
+/*J6frW/si/EpkjTwKn+gUiYCnhNmTsLb+0akJqjTbC48=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/index.js b/src/dm/dm/delivbill/list/btnClicks/index.js
new file mode 100644
index 0000000..2370f96
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/index.js
@@ -0,0 +1,79 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import maintain from './maintain';
+import linkQuery from './linkQuery';
+import addBtnClick from './addBtnClick';
+import refBtnClick from './refBtnClick';
+import editBtnClick from './editBtnClick';
+import copyBtnClick from './copyBtnClick';
+import commonSearch from './commonSearch';
+import fileBtnClick from './fileBtnClick';
+import printBtnClick from './printBtnClick';
+import pageInfoClick from './pageInfoClick';
+import deleteBtnClick from './deleteBtnClick';
+import { BUTTON, ACTION, FIELD, LIST } from '../../constance';
+import paySettleBtnClick from './paySettleBtnClick';
+import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
+import fileBatchDownLoadBtnClick from '../../../pub/btnClicks/fileBatchDownLoadBtnClick';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.add:
+ addBtnClick.call(this, props);
+ break;
+ case BUTTON.ref:
+ refBtnClick.call(this, props);
+ break;
+ case BUTTON.delete:
+ deleteBtnClick.call(this, props, record, index);
+ break;
+ case BUTTON.refresh:
+ commonSearch.call(this, props, true);
+ break;
+ case BUTTON.print:
+ printBtnClick.call(this, props);
+ break;
+ case BUTTON.output:
+ printBtnClick.call(this, props, true);
+ break;
+ case BUTTON.queryAboutBusiness:
+ linkQuery.call(this, props);
+ break;
+ case BUTTON.approve:
+ maintain.call(this, props, record, index, ACTION.approve);
+ break;
+ case BUTTON.unApprove:
+ maintain.call(this, props, record, index, ACTION.unApprove);
+ break;
+ case BUTTON.edit:
+ editBtnClick.call(this, props, record);
+ break;
+ case BUTTON.copy:
+ copyBtnClick.call(this, props, record);
+ break;
+ case BUTTON.paySettle:
+ paySettleBtnClick.call(this, props);
+ break;
+ case BUTTON.file:
+ fileBtnClick.call(this, props);
+ break;
+ case BUTTON.fileBatch: //附件批量下载
+ fileBatchDownLoadBtnClick.call(
+ this,
+ props,
+ LIST.list,
+ getLangByResId(this, '4014DELIVBILL-000102'),
+ 'cdelivbill_hid'
+ ); /* 国际化处理: 运输单*/
+ break;
+ //打印次数查询
+ case BUTTON.PrintCountQuery:
+ let CONST = { hid: FIELD.pk, area: LIST.list };
+ printCountQuery.call(this, props, { type: 1, CONST, modal: 'code-config' });
+ break;
+ }
+}
+
+export { btnClick, commonSearch, pageInfoClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/linkQuery.js b/src/dm/dm/delivbill/list/btnClicks/linkQuery.js
new file mode 100644
index 0000000..2a0bfc4
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/linkQuery.js
@@ -0,0 +1,23 @@
+/*faNHBl/08Ob96KxlSvQ7uRm5OExY240hoO1wprrdXbs=*/
+/*
+ * 运输单列表单据追溯
+ * @Author: liangzhyf
+ * @Date: 2020-01-11 15:15:23
+ * @Last Modified by: liangzhyf
+ * @Last Modified time: 2020-01-11 15:25:56
+ */
+import { LIST, FIELD } from '../../constance';
+
+export default function(props) {
+ let checkRows = props.table.getCheckedRows(LIST.list);
+ let pk = '';
+ if (checkRows.length >= 1) {
+ pk = checkRows[0].data.values[FIELD.pk].value;
+ }
+ this.setState({
+ pk: pk,
+ showTrack: true
+ });
+}
+
+/*faNHBl/08Ob96KxlSvQ7uRm5OExY240hoO1wprrdXbs=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/maintain.js b/src/dm/dm/delivbill/list/btnClicks/maintain.js
new file mode 100644
index 0000000..f773605
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/maintain.js
@@ -0,0 +1,150 @@
+/*VWE8DgXdssq9/UDPaMvyRjf8lG8xR6Ym/qAr4obb4hk=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { buttonController } from '../viewController';
+import { LIST, FIELD, URL, ACTION } from '../../constance';
+import {
+ showSuccessInfo,
+ showWarningInfo,
+ showBatchOperateInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+/**
+ * 审批取消审批
+ * @param {*} props
+ * @param {*} record
+ * @param {*} index
+ * @param {*} action
+ */
+export default function(props, record, index, action) {
+ var str;
+ var url;
+ switch (action) {
+ case ACTION.approve:
+ str = getLangByResId(this, '4014DELIVBILL-000021'); /* 国际化处理: 审批*/
+ url = URL.approve;
+ break;
+ case ACTION.unApprove:
+ str = getLangByResId(this, '4014DELIVBILL-000022'); /* 国际化处理: 取消审批*/
+ url = URL.unApprove;
+ break;
+ }
+ let indexsMap = new Map();
+ if (record) {
+ let id = record[FIELD.pk].value;
+ indexsMap.set(id, index);
+ doMathod.call(this, props, [ { data: { values: record } } ], indexsMap, url, str, record);
+ } else {
+ let rows = props.table.getCheckedRows(LIST.list);
+ if (rows.length <= 0) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000059', { 0: str })); /* 国际化处理: 请选择要,的数据*/
+ return;
+ }
+ rows.forEach((row) => {
+ let id = row.data.values[FIELD.pk].value;
+ indexsMap.set(id, row.index);
+ });
+ doMathod.call(this, props, rows, indexsMap, url, str, record);
+ }
+}
+
+/**
+ * 执行ajax
+ * @param {*} props
+ * @param {*} rows 行信息
+ * @param {*} indexsMap id和行索引map
+ * @param {*} url url
+ * @param {*} str 提交指派信息
+ */
+function doMathod(props, rows, indexsMap, url, str, record) {
+ let infos = [];
+ rows.forEach((row) => {
+ let rowValues = row.data.values;
+ let id = rowValues[FIELD.pk].value;
+ let ts = rowValues[FIELD.ts].value;
+ if (id) {
+ infos.push({ id, ts });
+ }
+ });
+ if (infos.length > 0) {
+ ajax({
+ url: url,
+ async: false,
+ data: { infos: infos, isCard: false, pagecode: LIST.pagecode },
+ success: (res) => {
+ if (res && res.success) {
+ if (res.data && res.data.data) {
+ let resultRows = res.data.data[LIST.list].rows;
+ // 审批之后比对(通过主键),然后将对应的单据状态修改为最新的状态
+ resultRows.map((item, index) => {
+ // 获取对应下标
+ let changeIndex = indexsMap.get(item.values[FIELD.pk].value);
+ // 获取单据状态
+ let ts = item.values[FIELD.ts];
+ let fstatusflag = item.values[FIELD.fstatusflag];
+ // 修改列表态表格的单据状态字段的值
+ props.table.setValByKeyAndIndex(LIST.list, changeIndex, FIELD.fstatusflag, fstatusflag);
+ props.table.setValByKeyAndIndex(LIST.list, changeIndex, FIELD.ts, ts);
+ props.table.selectTableRows(LIST.list, changeIndex, false);
+ });
+ }
+ let sucNum = Number.parseInt(res.data.sucessNum ? res.data.sucessNum : '0');
+ let failNum = Number.parseInt(infos.length - sucNum);
+ let contentMsg = getLangByResId(this, '4014DELIVBILL-000061') + sucNum; /* 国际化处理: 成功条数:*/
+ if (res.data.errorMessage) {
+ // 错误提示
+ contentMsg =
+ contentMsg + getLangByResId(this, '4014DELIVBILL-000062') + failNum; /* 国际化处理: 失败条数:*/
+ let errorMessages = [];
+ for (let k in res.data.errorMessageMap) {
+ errorMessages.push(
+ getLangByResId(this, '4014DELIVBILL-000064', { 0: parseInt(k) + 1 }) +
+ res.data.errorMessageMap[k]
+ ); /* 国际化处理: 第,条数据操作失败。失败原因:*/
+ }
+ let toastMsg;
+ if (sucNum && sucNum <= 0) {
+ toastMsg = { totalNum: sucNum + failNum, failNum };
+ } else {
+ toastMsg = { totalNum: sucNum + failNum, sucNum, failNum };
+ }
+ /* 出错了 */
+ showBatchOperateInfo(
+ getLangByResId(this, '4014DELIVBILL-000065') /* 国际化处理: 出错啦*/,
+ sucNum && sucNum <= 0
+ ? getLangByResId(this, '4014DELIVBILL-000066', {
+ 0: toastMsg.totalNum,
+ 1: toastMsg.failNum
+ })
+ : getLangByResId(this, '4014DELIVBILL-000055', {
+ 0: toastMsg.totalNum,
+ 1: toastMsg.sucNum,
+ 2: toastMsg.failNum
+ }) +
+ /* 国际化处理: 共处理{0}条,成功{1}条,失败{2}条!*/
+ errorMessages
+ );
+ } else {
+ if (record) {
+ showSuccessInfo(str + getLangByResId(this, '4014DELIVBILL-000025')); /* 国际化处理: 成功!*/
+ } else {
+ showSuccessInfo(
+ str + getLangByResId(this, '4014DELIVBILL-000025'),
+ getLangByResId(this, '4014DELIVBILL-000069', { 0: sucNum })
+ ); /* 国际化处理: 成功!,处理成功,条*/
+ }
+ }
+ buttonController.call(this, props);
+ }
+ },
+ error: (ress) => {
+ toast({
+ color: 'danger',
+ content: ress.message
+ });
+ }
+ });
+ }
+}
+
+/*VWE8DgXdssq9/UDPaMvyRjf8lG8xR6Ym/qAr4obb4hk=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/pageInfoClick.js b/src/dm/dm/delivbill/list/btnClicks/pageInfoClick.js
new file mode 100644
index 0000000..41f6f5c
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/pageInfoClick.js
@@ -0,0 +1,35 @@
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
+/*
+ * 运输单列表分页查询
+ * @Author: liangzhyf
+ * @Date: 2020-01-11 10:19:14
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-09-25 17:07:28
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import { URL, LIST } from '../../constance';
+import { buttonController } from '../viewController';
+
+export default function(props, config, pks) {
+ let _this = this;
+ let data = {
+ pks: pks,
+ pagecode: LIST.pagecode
+ };
+
+ ajax({
+ url: URL.queryPage,
+ data: data,
+ success: function(res) {
+ if (res.success) {
+ if (res.data && res.data[LIST.list]) {
+ props.table.setAllTableData(LIST.list, res.data[LIST.list]);
+ }
+ }
+ buttonController.call(_this, props);
+ }
+ });
+}
+
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/paySettleBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/paySettleBtnClick.js
new file mode 100644
index 0000000..948a7c7
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/paySettleBtnClick.js
@@ -0,0 +1,35 @@
+/*f6WFlOSG7PUJ7pRcvDAi3IYCzGyfANh/oCBT0jFHz5Y=*/
+import { ajax } from 'nc-lightapp-front';
+import { FIELD, URL, UISTATE, LIST } from '../../constance';
+import { showWarningInfo } from 'src/scmpub/scmpub/pub/tool/messageUtil.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props) {
+ let selectedRow = props.table.getCheckedRows(LIST.list);
+ if (!selectedRow || Object.keys(selectedRow).length == 0) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000070')); /* 国际化处理: 请选中行数据*/
+ return;
+ } else {
+ let pk = selectedRow[0].data.values[FIELD.pk].value;
+ ajax({
+ url: URL.linkApSettle,
+ data: { pk: pk },
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ props.openTo('/dm/dm/apsettle/main/#/card', {
+ appcode: '401400804',
+ pagecode: '401400804_card',
+ status: UISTATE.browse,
+ id: data
+ });
+ }
+ }
+ }
+ });
+ }
+}
+
+/*f6WFlOSG7PUJ7pRcvDAi3IYCzGyfANh/oCBT0jFHz5Y=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/printBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/printBtnClick.js
new file mode 100644
index 0000000..6a442a3
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/printBtnClick.js
@@ -0,0 +1,64 @@
+/*VqFTX17u5c5T6CGoj9nmVWlRCDByW5J6/GQe3RBfo9E=*/
+import { output } from 'nc-lightapp-front';
+import { LIST, URL, FIELD } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { ajax } from 'nc-lightapp-front';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+/**
+ * @param {*} props
+ * @param {*} isOutput 是否是输出
+ */
+export default function(props, isOutput = false) {
+ let checkeddatas = props.table.getCheckedRows(LIST.list);
+ if (checkeddatas.length == 0) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000071')); /* 国际化处理: 错误,请选择要打印的单据*/
+ return;
+ }
+ let pks = [];
+ let pk_orgs = new Set();
+ checkeddatas.forEach((row) => {
+ let pk = row.data.values[FIELD.pk].value;
+ pks.push(pk);
+ pk_orgs.add(row.data.values[FIELD.pk_org].value);
+ });
+
+ ajax({
+ url: URL.permissioncheck,
+ data: { actioncode: 'print', bid: pks },
+ method: 'post',
+ success: (res) => {
+ if (isOutput) {
+ output({
+ url: URL.print,
+ data: {
+ oids: pks,
+ outputType: 'output'
+ }
+ });
+ } 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: FIELD.billtype,
+ controlPrintNum: true
+ });
+ }
+ }
+ });
+}
+
+/*VqFTX17u5c5T6CGoj9nmVWlRCDByW5J6/GQe3RBfo9E=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/btnClicks/refBtnClick.js b/src/dm/dm/delivbill/list/btnClicks/refBtnClick.js
new file mode 100644
index 0000000..5ac8b94
--- /dev/null
+++ b/src/dm/dm/delivbill/list/btnClicks/refBtnClick.js
@@ -0,0 +1,17 @@
+/*Ei2QDsbLaSJ4/VQwnxUrQof0HyAptUnXAMD751hCFno=*/
+/*
+ * 拉单总页面
+ * @Author: liangzhyf
+ * @Date: 2020-01-16 16:59:46
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 15:09:58
+ */
+import { URL, CACHEDATA, TRANSFER } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+export default function(props) {
+ //跳转拉单界面之前先清除缓存
+ clearTransferCache(props, CACHEDATA.transferDataSource);
+ props.pushTo(URL.refAll, { pagecode: TRANSFER.transferAllCode });
+}
+
+/*Ei2QDsbLaSJ4/VQwnxUrQof0HyAptUnXAMD751hCFno=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/index.js b/src/dm/dm/delivbill/list/index.js
new file mode 100644
index 0000000..df0daaf
--- /dev/null
+++ b/src/dm/dm/delivbill/list/index.js
@@ -0,0 +1,160 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * 运输单列表
+ * @Author: liangzhyf
+ * @Date: 2020-01-09 09:48:54
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2023-06-20 16:11:49
+ */
+import { initTemplate } from './init';
+import React, { Component } from 'react';
+import { searchAfterEvent } from './afterEvent';
+import { setButtonsEnable } from './viewController';
+import { createPage, base, high } from 'nc-lightapp-front';
+import { commonSearch, pageInfoClick, btnClick } from './btnClicks';
+import { LIST, UISTATE, URL, FIELD, CACHEDATA, BUTTON, CARD } from '../constance';
+import { createListTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil';
+import transtypeUtils from '../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import NCUploader from 'uap/common/components/NCUploader';
+import { initLang } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { dateFormat } from '../../../../scmpub/scmpub/pub/tool';
+const { NCAffix, NCDiv } = base;
+const { BillTrack } = high;
+
+class DelivbillList extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(LIST.search);
+ props.use.table(LIST.list);
+ this.state = {
+ pk: '',
+ showTrack: false, //单据追溯
+ showUploader: false, // 附件管理
+ billid: null,
+ vbillcode: null
+ };
+ initLang(this, [ '4014delivbill' ], 'dm', initTemplate.bind(this, this.props));
+ }
+
+ // 渲染页面后,执行
+ componentDidMount() {
+ dateFormat();
+ }
+
+ //双击行事件 跳转卡片
+ doubleClick = (record, index, e) => {
+ this.props.pushTo(URL.cardUrl, {
+ pagecode: CARD.pagecode,
+ status: UISTATE.browse,
+ id: record[FIELD.pk].value
+ });
+ };
+
+ // 主组织编辑后事件
+ renderCompleteEvent = () => {
+ // 给通过交易类型发布的节点,查询区的交易类型字段赋默认值
+ transtypeUtils.setQueryDefaultValue.call(this, this.props, LIST.search, FIELD.ctrantypeid);
+ let pk_org = this.props.search.getSearchValByField(LIST.search, FIELD.pk_org);
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ searchAfterEvent.call(this, FIELD.pk_org, arr);
+ } else {
+ searchAfterEvent.call(this, FIELD.pk_org, []);
+ }
+ searchAfterEvent.call(this, 'delivbill.csendstoreorgid', []);
+ searchAfterEvent.call(this, 'delivbill.creceivestoreorgid', []);
+ searchAfterEvent.call(this, 'delivpack.csendstoreorgid', []);
+ searchAfterEvent.call(this, 'delivpack.creceivestoreorgid', []);
+ };
+
+ render() {
+ const { search, table, button, modal } = this.props;
+ const { NCCreateSearch } = search; // 引入创建搜索区方法
+ const { createSimpleTable } = table;
+ const { createButtonApp } = button;
+ const { createModal } = modal;
+ return (
+
+
+
+ {createListTitle(this)}
+
+ {createButtonApp({
+ area: LIST.head,
+ onButtonClick: btnClick.bind(this),
+ ignoreHotkeyCode: [ BUTTON.approve, BUTTON.delete ]
+ })}
+
+ {/* 单据追溯 */}
+ {
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk}
+ type={FIELD.billtype}
+ />
+ {/* 附件管理 */}
+ {this.state.showUploader && (
+ {
+ this.setState({
+ showUploader: false
+ });
+ }}
+ />
+ )}
+
+
+ {/* 查询区 */}
+
+ {NCCreateSearch(LIST.search, {
+ clickSearchBtn: commonSearch.bind(this, this.props, false),
+ defaultConditionsNum: 5,
+ onAfterEvent: searchAfterEvent.bind(this),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })}
+
+ {/* 列表区 */}
+
+ {createSimpleTable(LIST.list, {
+ showIndex: true,
+ showCheck: true,
+ dataSource: CACHEDATA.listCacheKey,
+ pkname: FIELD.pk,
+ onRowDoubleClick: this.doubleClick.bind(this),
+ onSelected: setButtonsEnable.bind(this),
+ onSelectedAll: setButtonsEnable.bind(this),
+ onBatchSelected: setButtonsEnable.bind(this),
+ handlePageInfoChange: pageInfoClick.bind(this)
+ })}
+
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+ }
+}
+
+DelivbillList = createPage({
+ billinfo: {
+ billtype: 'grid',
+ pagecode: LIST.pagecode,
+ headcode: LIST.search,
+ bodycode: LIST.list
+ }
+})(DelivbillList);
+
+export default DelivbillList;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/init/index.js b/src/dm/dm/delivbill/list/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/dm/dm/delivbill/list/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/init/initTemplate.js b/src/dm/dm/delivbill/list/init/initTemplate.js
new file mode 100644
index 0000000..a908ce5
--- /dev/null
+++ b/src/dm/dm/delivbill/list/init/initTemplate.js
@@ -0,0 +1,268 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * 运输单初始化
+ * @Author: liangzhyf
+ * @Date: 2020-01-11 10:36:51
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 15:10:27
+ */
+import { ajax } from 'nc-lightapp-front';
+import { btnClick } from '../btnClicks';
+import { buttonController } from '../viewController';
+import { LIST, FIELD, BUTTON, BILLSTATUS, URL, UISTATE, CARD } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import BillCodeHyperLink from 'scmpub/scmpub/components/BillCodeStyle';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {APINVOICE_CONST} from "../../../apinvoice/const";
+
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: LIST.pagecode
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ //模板
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, props, meta);
+ // 如果是通过交易类型发布的节点,查询区交易类型不可编辑
+ transtypeUtils.initQuery.call(this, props, meta, LIST.search, FIELD.ctrantypeid);
+ props.meta.setMeta(meta, () => {
+ setTimeout(() => {
+ buttonController.call(this, props);
+ }, 0);
+ });
+ }
+ //按钮
+ if (data.button) {
+ props.button.setButtons(data.button);
+ }
+ }
+ }
+ );
+}
+
+function modifier(props, meta) {
+ let listMeta = meta[LIST.list];
+ //添加操作列
+ listMeta.items.push({
+ attrcode: 'opr',
+ label: getLangByResId(this, '4014DELIVBILL-000046') /* 国际化处理: 操作*/,
+ width: 140,
+ visible: true,
+ fixed: 'right',
+ itemtype: 'customer',
+ render: (text, record, index) => {
+ let fstatusflag = record[FIELD.fstatusflag].value;
+ let bapsettledflag = record[FIELD.bapsettledflag].value;
+ let buttonAry = [];
+ switch (fstatusflag) {
+ case BILLSTATUS.free:
+ if (bapsettledflag != null && bapsettledflag) {
+ buttonAry.push(BUTTON.approve, BUTTON.copy);
+ } else {
+ buttonAry.push(BUTTON.approve, BUTTON.edit, BUTTON.delete, BUTTON.copy);
+ }
+ break;
+ case BILLSTATUS.approve:
+ buttonAry.push(BUTTON.copy);
+ break;
+ }
+ return props.button.createOprationButton(buttonAry, {
+ area: LIST.inner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => btnClick.call(this, props, key, record, index)
+ });
+ }
+ });
+
+ //模板table的单据号列加超链接
+ listMeta.items.map((item, key) => {
+ if (item.attrcode == FIELD.vbillcode) {
+ item.render = (text, record, index) => {
+ //取值前需先判断record是否为空,避免没有数据的情况报错
+ let pk = record && record.cdelivbill_hid;
+ return (
+ {
+ this.props.pushTo(URL.cardUrl, {
+ pagecode: CARD.pagecode,
+ status: UISTATE.browse,
+ id: pk.value
+ });
+ }}
+ />
+ );
+ };
+ }
+
+ // 承运商超超链接
+ if ('ccarrierid' ==item.attrcode ){
+ item.render = (text, record, index) => {
+ if (record && record.cdelivbill_hid && record.ccarrierid) {
+ return (
+ {
+
+ console.log(JSON.stringify(record))
+
+ let ccarrierid = record.ccarrierid.value;
+
+ // 拼装json
+ let data = {
+ pks: [ccarrierid]
+ };
+
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ debugger;
+ if (res.success) {
+ let data = res.data
+ var datum = data[ccarrierid];
+ if (datum == true){//说明是集团节点
+ // console.log("集团")
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ccarrierid,
+ flag:'super_outer'
+ });
+ }else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ccarrierid,
+ flag:'super_outer'
+ });
+ }
+ // console.log(datum)
+ // console.log(data)
+ }
+ }
+ });
+
+ // props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ // status: APINVOICE_CONST.browse,
+ // appcode: '400101612',
+ // pagecode: '400101612_card',
+ // id: ccarrierid
+ // });
+
+
+ }}
+ >
+ {record.ccarrierid && record.ccarrierid.display}
+
+ );
+ }
+ };
+ }
+
+
+ return item;
+ });
+
+ meta[LIST.search].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.pk_org) {
+ //质检中心
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: FIELD.billtype
+ };
+ };
+ } else if (item.attrcode == 'delivbill.pk_batchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else if (item.attrcode == 'delivbill.csendstoreid') {
+ item.queryCondition = () => {
+ let vvalue = props.search.getSearchValByField(LIST.search, 'delivbill.csendstoreorgid');
+ return {
+ pk_org:
+ vvalue && vvalue.value
+ ? vvalue.value.firstvalue.includes(',') ? null : vvalue.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'delivbill.creceivestoreid') {
+ item.queryCondition = () => {
+ let vvalue = props.search.getSearchValByField(LIST.search, 'delivbill.creceivestoreorgid');
+ return {
+ pk_org:
+ vvalue && vvalue.value
+ ? vvalue.value.firstvalue.includes(',') ? null : vvalue.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'delivpack.csendstoreid') {
+ item.queryCondition = () => {
+ let vvalue = props.search.getSearchValByField(LIST.search, 'delivpack.csendstoreorgid');
+ return {
+ pk_org:
+ vvalue && vvalue.value
+ ? vvalue.value.firstvalue.includes(',') ? null : vvalue.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'delivpack.creceivestoreid') {
+ item.queryCondition = () => {
+ let vvalue = props.search.getSearchValByField(LIST.search, 'delivpack.creceivestoreorgid');
+ return {
+ pk_org:
+ vvalue && vvalue.value
+ ? vvalue.value.firstvalue.includes(',') ? null : vvalue.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == FIELD.fstatusflag) {
+ item.options = [
+ { display: getLangByResId(this, '4014DELIVBILL-000047'), value: '0' },
+ { display: getLangByResId(this, '4014DELIVBILL-000048'), value: '3' }
+ ]; /* 国际化处理: 自由,审批通过*/
+ } else if (item.attrcode == 'delivbill.cffileid') {
+ item.queryCondition = () => {
+ let cmaterialoid = props.search.getSearchValByField(LIST.search, 'delivbill.cinventoryid');
+ if (cmaterialoid && cmaterialoid.value.firstvalue) {
+ return { cmaterialid: cmaterialoid.value.firstvalue };
+ }
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = props.search.getSearchValByField(LIST.search, FIELD.pk_org);
+ return {
+ pk_org:
+ pk_org && pk_org.value
+ ? pk_org.value.firstvalue.includes(',') ? null : pk_org.value.firstvalue
+ : null
+ };
+ };
+ }
+ });
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/list/viewController/index.js b/src/dm/dm/delivbill/list/viewController/index.js
new file mode 100644
index 0000000..6381d55
--- /dev/null
+++ b/src/dm/dm/delivbill/list/viewController/index.js
@@ -0,0 +1,87 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * 运输单列表按钮控制
+ * @Author: liangzhyf
+ * @Date: 2020-01-11 10:35:15
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2023-06-20 16:28:59
+ */
+import { deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+import { BUTTON, LIST, LIST_BTN_ALL, FIELD, BILLSTATUS } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+function buttonController(props) {
+ //默认按钮状态
+ let visableBtns = {
+ [BUTTON.add]: true,
+ [BUTTON.ref]: true,
+ [BUTTON.delete]: true,
+ [BUTTON.approve]: true,
+ [BUTTON.unApprove]: true,
+ [BUTTON.queryAboutBusiness]: true,
+ [BUTTON.paySettle]: true,
+ [BUTTON.file]: true,
+ [BUTTON.fileBatch]: true,
+ [BUTTON.print]: true,
+ [BUTTON.PrintCountQuery]: true,
+ [BUTTON.mergeDisplay]: true,
+ [BUTTON.output]: true,
+ [BUTTON.refresh]: true
+ };
+ props.button.setButtonsVisible(visableBtns);
+ props.button.setPopContent(BUTTON.delete, getLangByResId(this, '4014DELIVBILL-000072')); /* 国际化处理: 确定要删除吗?*/
+ setButtonsEnable.call(this, props);
+}
+
+/**
+ * 控制按钮可不可用
+ * @param {*} props
+ */
+function setButtonsEnable(props) {
+ props = props || this.props;
+ let rows = props.table.getAllTableData(LIST.list).rows;
+ let buttonstatuses = deepClone(LIST_BTN_ALL);
+ if (rows && rows.length > 0) {
+ let checkedRows = props.table.getCheckedRows(LIST.list);
+ if (checkedRows && checkedRows.length > 0) {
+ //有选择数据时可用按钮:单据追溯、打印、输出
+ buttonstatuses[BUTTON.queryAboutBusiness] = false;
+ buttonstatuses[BUTTON.paySettle] = false;
+ buttonstatuses[BUTTON.file] = false;
+ buttonstatuses[BUTTON.fileBatch] = false;
+ buttonstatuses[BUTTON.print] = false;
+ buttonstatuses[BUTTON.PrintCountQuery] = false;
+ buttonstatuses[BUTTON.output] = false;
+ buttonstatuses[BUTTON.mergeDisplay] = false;
+ if (checkedRows.length == 1) {
+ let row = checkedRows[0].data;
+ let fbillstatus = row.values[FIELD.fstatusflag].value;
+ switch (fbillstatus) {
+ case BILLSTATUS.free:
+ //自由和审批不通过可用按钮:删除
+ buttonstatuses[BUTTON.delete] = false;
+ buttonstatuses[BUTTON.approve] = false;
+ break;
+ case BILLSTATUS.approve:
+ //审批通过可用按钮:取消审批
+ buttonstatuses[BUTTON.unApprove] = false;
+ break;
+ }
+ } else {
+ //多选时,所有按钮都可用
+ buttonstatuses[BUTTON.unApprove] = false;
+ buttonstatuses[BUTTON.delete] = false;
+ buttonstatuses[BUTTON.approve] = false;
+ }
+ }
+ buttonstatuses[BUTTON.refresh] = false;
+ }
+ buttonstatuses[BUTTON.add] = false;
+ buttonstatuses[BUTTON.ref] = false;
+ props.button.setButtonDisabled(buttonstatuses);
+ return;
+}
+
+export { buttonController, setButtonsEnable };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/main/config.json b/src/dm/dm/delivbill/main/config.json
new file mode 100644
index 0000000..cb48649
--- /dev/null
+++ b/src/dm/dm/delivbill/main/config.json
@@ -0,0 +1,18 @@
+{
+ "dependModuleName": [
+ "uap/common/components/NCUploader",
+ "scmpub/scmpub/components/MainOrgRef",
+ "scmpub/scmpub/components/BillCodeStyle",
+ "uap/common/components/printOnClient",
+ "uap/common/components/printlimitModal",
+ "uap/common/components/getAttachmentInfo"
+ ],
+ "dependjs": [
+ "../../../../uap/common/components/NCUploader/index.js",
+ "../../../../scmpub/scmpub/components/MainOrgRef/index.js",
+ "../../../../scmpub/scmpub/components/BillCodeStyle/index.js",
+ "../../../../uap/common/components/printOnClient/index.js",
+ "../../../../uap/common/components/printlimitModal/index.js",
+ "../../../../uap/common/components/getAttachmentInfo/index.js"
+ ]
+}
diff --git a/src/dm/dm/delivbill/main/index.js b/src/dm/dm/delivbill/main/index.js
new file mode 100644
index 0000000..0cebdfa
--- /dev/null
+++ b/src/dm/dm/delivbill/main/index.js
@@ -0,0 +1,9 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { RenderRouter } from 'nc-lightapp-front';
+import routes from './router';
+
+(function main(routers, htmlTagid) {
+ RenderRouter(routers, htmlTagid);
+})(routes, 'app');
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/main/router.js b/src/dm/dm/delivbill/main/router.js
new file mode 100644
index 0000000..7cff334
--- /dev/null
+++ b/src/dm/dm/delivbill/main/router.js
@@ -0,0 +1,35 @@
+/*/Zy544GA7/bUaK4rYRYJBGq/9Gtfns910rXLm2JFwtM=*/
+import { asyncComponent } from 'nc-lightapp-front';
+
+const list = asyncComponent(() =>
+ import(/*webpackChunkName: "dm/dm/delivbill/list"*/ /* webpackMode: "eager" */ '../list')
+);
+const card = asyncComponent(() =>
+ import(/*webpackChunkName: "dm/dm/delivbill/card"*/ /* webpackMode: "eager" */ '../card')
+);
+const refAll = asyncComponent(() =>
+ import(/*webpackChunkName: "dm/dm/delivbill/transfer/transfer"*/ /* webpackMode: "eager" */ '../transfer/transfer')
+);
+const routes = [
+ {
+ path: '/',
+ component: list,
+ exact: true
+ },
+ {
+ path: '/list',
+ component: list
+ },
+ {
+ path: '/card',
+ component: card
+ },
+ {
+ path: '/refAll',
+ component: refAll
+ }
+];
+
+export default routes;
+
+/*/Zy544GA7/bUaK4rYRYJBGq/9Gtfns910rXLm2JFwtM=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signterm/btnClicks/index.js b/src/dm/dm/delivbill/signterm/btnClicks/index.js
new file mode 100644
index 0000000..f313173
--- /dev/null
+++ b/src/dm/dm/delivbill/signterm/btnClicks/index.js
@@ -0,0 +1,73 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { ajax } from 'nc-lightapp-front';
+import { BUTTON, CARD, URL } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.define:
+ let termData = props.form.getAllFormValue(CARD.signterm).rows[0].values;
+ if (check.call(this, termData, props.initBillPk)) {
+ this.props.defineDlg(termData);
+ }
+ break;
+ case BUTTON.cancel:
+ this.props.closeDlg();
+ break;
+ }
+}
+function check(termData, pk) {
+ //收货地址
+ if (termData && termData.creceiveaddrdocid && !termData.creceiveaddrdocid.value) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000073')); /* 国际化处理: 必须录入签收地点*/ /* 国际化处理: 必须录入签收地点*/
+ return;
+ }
+ //收货客户
+ if (termData && termData.creceivecustvid && !termData.creceivecustvid.value) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000074')); /* 国际化处理: 必须录入签收客户*/ /* 国际化处理: 必须录入签收客户*/
+ return;
+ }
+ //签收人
+ if (termData && termData.csignerid && !termData.csignerid.value) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000075')); /* 国际化处理: 必须录入签收人*/ /* 国际化处理: 必须录入签收人*/
+ return;
+ }
+ //签收日期
+ if (termData && termData.dsigndate && !termData.dsigndate.value) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000076')); /* 国际化处理: 必须录入签收日期*/ /* 国际化处理: 必须录入签收日期*/
+ return;
+ }
+
+ let flag = false;
+ let condition = new Map();
+ Object.keys(termData).forEach(function(key) {
+ condition.set(key, termData[key].value);
+ });
+ ajax({
+ url: URL.signQry,
+ data: {
+ pk: pk,
+ pageid: CARD.pagecode,
+ conditionMap: condition
+ },
+ method: 'POST',
+ async: false,
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ let goods = (data.bodys[CARD.body] || {}).rows;
+ let pack = (data.bodys[CARD.pack] || {}).rows;
+ if (goods || pack) {
+ flag = true;
+ }
+ }
+ }
+ }
+ });
+ return flag;
+}
+export { btnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signterm/index.js b/src/dm/dm/delivbill/signterm/index.js
new file mode 100644
index 0000000..47832d1
--- /dev/null
+++ b/src/dm/dm/delivbill/signterm/index.js
@@ -0,0 +1,39 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { initTemplate } from './init';
+import { CARD } from '../constance';
+import { btnClick } from './btnClicks';
+import { createPage } from 'nc-lightapp-front';
+import { initLang } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class SigntermDlg extends Component {
+ constructor(props) {
+ super(props);
+ props.use.form(CARD.signterm);
+ this.state = {};
+ initLang(this, [ '4014delivbill' ], 'dm', initTemplate.bind(this, this.props));
+ }
+
+ render() {
+ let { form, button } = this.props;
+ const { createForm } = form;
+ const { createButtonApp } = button;
+ return (
+
+ {createForm(CARD.signterm, {})}
+
+ {createButtonApp({
+ area: CARD.dialog,
+ onButtonClick: btnClick.bind(this)
+ })}
+
+
+ );
+ }
+}
+
+SigntermDlg = createPage({})(SigntermDlg);
+
+export default SigntermDlg;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signterm/init/index.js b/src/dm/dm/delivbill/signterm/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/dm/dm/delivbill/signterm/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signterm/init/initTemplate.js b/src/dm/dm/delivbill/signterm/init/initTemplate.js
new file mode 100644
index 0000000..0c53e53
--- /dev/null
+++ b/src/dm/dm/delivbill/signterm/init/initTemplate.js
@@ -0,0 +1,51 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+import { getBusinessInfo } from 'nc-lightapp-front';
+import { CARD, UISTATE, FIELD } from '../../constance';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: CARD.pagecode //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta, () => {
+ setTimeout(() => {
+ initData.call(this, props);
+ }, 0);
+ });
+ }
+ //按钮
+ if (data.button) {
+ let buttons = data.button;
+ props.button.setButtons(buttons);
+ }
+ }
+ }
+ );
+}
+
+//请求表单数据
+function initData(props) {
+ props.form.setFormStatus(CARD.signterm, UISTATE.edit);
+ let businessInfo = getBusinessInfo();
+ props.form.setFormItemsValue(CARD.signterm, {
+ [FIELD.csignerid]: {
+ value: businessInfo.userId,
+ display: businessInfo.userName
+ },
+ [FIELD.dsigndate]: {
+ value: businessInfo.businessDate
+ }
+ });
+ if (props.initData != null) {
+ props.form.setFormItemsValue(CARD.signterm, {
+ [FIELD.creceiveaddrdocid]: props.initData.address,
+ [FIELD.creceivecustvid]: props.initData.customer
+ });
+ }
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/btnClicks/defineBtnClick.js b/src/dm/dm/delivbill/signtermlist/btnClicks/defineBtnClick.js
new file mode 100644
index 0000000..0ef220a
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/btnClicks/defineBtnClick.js
@@ -0,0 +1,58 @@
+/*nYeTtdjwET556j3W4E0LzC4ScGUtwp7uLA75h9YCVm8=*/
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props) {
+ //封装数据
+ let data = createData.call(this, props);
+ ajax({
+ url: URL.signReceive,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success && res.data) {
+ this.defineListDlg();
+ } else {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000077')); /* 国际化处理: 签收失败*/
+ }
+ }
+ });
+}
+
+function createData(props) {
+ let data = {};
+ data.pageid = CARD.pagecode;
+ data.head = this.formData;
+ data.bodys = addBodyData.call(this, props, [ CARD.body, CARD.good_delivery, CARD.pack, CARD.pack_delivery ]);
+ return data;
+}
+
+function addBodyData(props, areaIds) {
+ let bodys = {};
+ areaIds.forEach((areaId) => {
+ let rows;
+ // 父组件中拿货物信息
+ if(areaId == CARD.body){
+ rows = this[CARD.body];
+ }else if(areaId == CARD.good_delivery){
+ rows = this[CARD.good_delivery];
+ }else if(areaId == CARD.pack){
+ rows = this[CARD.pack];
+ }else if(areaId == CARD.pack_delivery){
+ rows = this[CARD.pack_delivery];
+ }
+ // rows = props.cardTable.getVisibleRows(areaId);
+ let tdata = {};
+ tdata = {};
+ tdata.areaType = 'table';
+ tdata.areacode = areaId;
+ tdata.rows = rows;
+ bodys[areaId] = tdata;
+ });
+ return bodys;
+}
+
+/*nYeTtdjwET556j3W4E0LzC4ScGUtwp7uLA75h9YCVm8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/btnClicks/index.js b/src/dm/dm/delivbill/signtermlist/btnClicks/index.js
new file mode 100644
index 0000000..8526ba3
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/btnClicks/index.js
@@ -0,0 +1,16 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { BUTTON } from '../../constance';
+import defineBtnClick from './defineBtnClick';
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.define:
+ defineBtnClick.call(this, props);
+ break;
+ case BUTTON.cancel:
+ this.hideDlgListState();
+ break;
+ }
+}
+export default btnClick;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/event/bodyAfterEvent.js b/src/dm/dm/delivbill/signtermlist/event/bodyAfterEvent.js
new file mode 100644
index 0000000..3a30589
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/event/bodyAfterEvent.js
@@ -0,0 +1,66 @@
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
+import {
+ createExtBodyAfterEventData,
+ processExtBillCardBodyEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL, FIELD } from '../../constance';
+import { showErrorInfo, showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props, moduleId, key, value, changedrows, index) {
+ let userobject = {};
+ if (key == FIELD.nastnum) {
+ userobject.formula = true;
+ } else if (key == FIELD.nsignastnum && value <= 0) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000097'));
+ } else if (key == FIELD.nsignnum && value <= 0) {
+ showWarningInfo(null, getLangByResId(this, '4014DELIVBILL-000098'));
+ }
+ let data = createExtBodyAfterEventData(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ [ CARD.body, CARD.pack ],
+ moduleId,
+ key,
+ changedrows,
+ index,
+ userobject
+ );
+ ajax({
+ url: URL.bodyAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ res = { data: res };
+ if (res.data && res.data.data) {
+ processExtBillCardBodyEditResult(props, moduleId, res.data.data);
+ let allData = props.cardTable.getAllRows(moduleId);
+ let goods;
+ let goodDelivery;
+ let pack;
+ let packDelivery;
+ if (CARD.body === moduleId) {
+ goods = allData;
+ } else if (CARD.good_delivery === moduleId) {
+ goodDelivery = allData;
+ } else if (CARD.pack === moduleId) {
+ pack = allData;
+ } else if (CARD.pack_delivery === moduleId) {
+ packDelivery = allData;
+ }
+
+ // 编辑后的货物信息传给父组件
+ props.setGoodsData(goods, goodDelivery, pack, packDelivery);
+ } else {
+ props.cardTable.setTableData(moduleId, { rows: [] }, null, false);
+ }
+ },
+ error: (res) => {
+ props.cardTable.setValByKeyAndIndex(moduleId, index, key, { value: null, display: null });
+ showErrorInfo(null, res.message);
+ }
+ });
+}
+
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/event/bodyBeforeEvent.js b/src/dm/dm/delivbill/signtermlist/event/bodyBeforeEvent.js
new file mode 100644
index 0000000..4a2f790
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/event/bodyBeforeEvent.js
@@ -0,0 +1,10 @@
+/*U41ajtHAnBXc4J9azvHa6RSHSsWpQhGDSN/GtRT0qDY=*/
+export default async function(props, moduleId, key, value, index, record) {
+ let bodyArray = [ 'nsignastnum', 'nsignnum', 'nsignvolume', 'nsignweight' ];
+ if (bodyArray.includes(key)) {
+ return true;
+ }
+ return false;
+}
+
+/*U41ajtHAnBXc4J9azvHa6RSHSsWpQhGDSN/GtRT0qDY=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/event/index.js b/src/dm/dm/delivbill/signtermlist/event/index.js
new file mode 100644
index 0000000..cfec1da
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/event/index.js
@@ -0,0 +1,8 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import bodyBeforeEvent from './bodyBeforeEvent';
+import bodyAfterEvent from './bodyAfterEvent';
+import packBeforeEvent from './packBeforeEvent';
+import packAfterEvent from './packAfterEvent';
+export { bodyBeforeEvent, bodyAfterEvent, packBeforeEvent, packAfterEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/event/packAfterEvent.js b/src/dm/dm/delivbill/signtermlist/event/packAfterEvent.js
new file mode 100644
index 0000000..b60acb4
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/event/packAfterEvent.js
@@ -0,0 +1,39 @@
+/*ZUNh/CJV/GA6dDX4ljii11Tjk9opn9/KVvvnHT89vzM=*/
+import {
+ createExtBodyAfterEventData,
+ processExtBillCardBodyEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL } from '../../constance';
+export default function(props, moduleId, key, value, changedrows, index) {
+ if (value.values == null) {
+ return;
+ }
+ let userobject = {};
+ let data = createExtBodyAfterEventData(
+ props,
+ CARD.pagecode,
+ CARD.form,
+ [ CARD.body, CARD.pack ],
+ moduleId,
+ key,
+ changedrows,
+ index,
+ userobject
+ );
+ ajax({
+ url: URL.bodyPackAfterEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ res = { data: res };
+ if (res.data && res.data.data) {
+ processExtBillCardBodyEditResult(props, moduleId, res.data.data);
+ } else {
+ props.cardTable.setTableData(moduleId, { rows: [] }, null, false);
+ }
+ }
+ });
+}
+
+/*ZUNh/CJV/GA6dDX4ljii11Tjk9opn9/KVvvnHT89vzM=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/event/packBeforeEvent.js b/src/dm/dm/delivbill/signtermlist/event/packBeforeEvent.js
new file mode 100644
index 0000000..32db81e
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/event/packBeforeEvent.js
@@ -0,0 +1,10 @@
+/*h4SGD31B3f6pJe/ZBzlrK8z337D8lwKr5SDEMKJk3ao=*/
+export default async function(props, moduleId, key, value, index, record) {
+ let packArray = [ 'nsignpacknum', 'nsignpackvolumn', 'nsignpackweight' ];
+ if (packArray.includes(key)) {
+ return true;
+ }
+ return false;
+}
+
+/*h4SGD31B3f6pJe/ZBzlrK8z337D8lwKr5SDEMKJk3ao=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/index.js b/src/dm/dm/delivbill/signtermlist/index.js
new file mode 100644
index 0000000..099f8ff
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/index.js
@@ -0,0 +1,53 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { initTemplate } from './init';
+import { CARD } from '../constance';
+import { createPage, base } from 'nc-lightapp-front';
+import { bodyBeforeEvent, packBeforeEvent, bodyAfterEvent, packAfterEvent } from './event';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+const { NCModal } = base;
+class SigntermDlgList extends Component {
+ constructor(props) {
+ super(props);
+ props.use.cardTable(CARD.body, CARD.pack);
+ props.use.form(CARD.form);
+ this.state = {};
+ this.formData = null; //缓存表头数据
+ initLang(this, [ '4014delivbill' ], 'dm', initTemplate.bind(this, this.props));
+ }
+
+ render() {
+ let { cardTable } = this.props;
+ const { createCardTable } = cardTable;
+ return (
+
+ {/* 包装列表区 */}
+
+ {createCardTable(CARD.pack, {
+ hideModelSave: true,
+ inModal: true,
+ adaptionHeight: true,
+ onBeforeEvent: packBeforeEvent.bind(this),
+ onAfterEvent: packAfterEvent.bind(this)
+ })}
+
+ {/* 货物列表区 */}
+
+ {createCardTable(CARD.body, {
+ hideModelSave: true,
+ inModal: true,
+ adaptionHeight: true,
+ onBeforeEvent: bodyBeforeEvent.bind(this),
+ onAfterEvent: bodyAfterEvent.bind(this)
+ })}
+
+
+ );
+ }
+}
+
+SigntermDlgList = createPage({})(SigntermDlgList);
+
+export default SigntermDlgList;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/init/index.js b/src/dm/dm/delivbill/signtermlist/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/signtermlist/init/initTemplate.js b/src/dm/dm/delivbill/signtermlist/init/initTemplate.js
new file mode 100644
index 0000000..7fbcdce
--- /dev/null
+++ b/src/dm/dm/delivbill/signtermlist/init/initTemplate.js
@@ -0,0 +1,125 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+import { ajax } from 'nc-lightapp-front';
+import { CARD, URL, UISTATE } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: CARD.pagecode //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, props, meta);
+ props.meta.setMeta(meta, () => {
+ setTimeout(() => {
+ initData.call(this, props);
+ }, 0);
+ });
+ }
+ //按钮
+ if (data.button) {
+ let buttons = data.button;
+ props.button.setButtons(buttons);
+ }
+ tableUIState.call(this, props);
+ }
+ }
+ );
+}
+// 设置字段显示
+function modifier(props, meta) {
+ let bodyArray = [ 'nsignastnum', 'nsignnum', 'nsignvolume', 'nsignweight' ];
+ let packArray = [ 'nsignpacknum', 'nsignpackvolumn', 'nsignpackweight' ];
+ meta[CARD.body].items.map((item) => {
+ if (bodyArray.includes(item.attrcode)) {
+ item.visible = true;
+ }
+ });
+ meta[CARD.pack].items.map((item) => {
+ if (packArray.includes(item.attrcode)) {
+ item.visible = true;
+ }
+ });
+}
+
+//请求表单数据
+function initData(props) {
+ let pk = props.initBillPk;
+ let condition = new Map();
+ Object.keys(props.conditionData).forEach(function(key) {
+ condition.set(key, props.conditionData[key].value);
+ });
+ ajax({
+ url: URL.signQry,
+ data: {
+ pk: pk,
+ pageid: CARD.pagecode,
+ conditionMap: condition
+ },
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ props.setHeadData(data.head);
+ let goods = (data.bodys[CARD.body] || {}).rows;
+ let goodDelivery = (data.bodys[CARD.good_delivery] || {}).rows;
+ let pack = (data.bodys[CARD.pack] || {}).rows;
+ let packDelivery = (data.bodys[CARD.pack_delivery] || {}).rows;
+ // 货物信息传给父组件
+ props.setGoodsData(goods,goodDelivery,pack,packDelivery);
+ if (goods || pack) {
+ setBodyData.call(this, props, data);
+ } else {
+ this.confirmflag = false;
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000078')); /* 国际化处理: 没有满足签收条件的行*/
+ }
+ }
+ } else {
+ showErrorInfo(getLangByResId(this, '4014DELIVBILL-000078')); /* 国际化处理: 没有满足签收条件的行*/
+ }
+ }
+ });
+}
+
+/**
+ * 设置表格数据
+ * @param {*} props
+ * @param {*} data
+ */
+function setBodyData(props, data) {
+ //赋值数据
+ if (data.bodys[CARD.body]) {
+ props.cardTable.setTableData(CARD.body, data.bodys[CARD.body]);
+ } else {
+ props.cardTable.setTableData(CARD.body, { rows: [] });
+ }
+ // if (data.bodys[CARD.good_delivery]) {
+ // props.cardTable.setTableData(CARD.good_delivery, data.bodys[CARD.good_delivery]);
+ // } else {
+ // props.cardTable.setTableData(CARD.good_delivery, { rows: [] });
+ // }
+ if (data.bodys[CARD.pack]) {
+ props.cardTable.setTableData(CARD.pack, data.bodys[CARD.pack]);
+ } else {
+ props.cardTable.setTableData(CARD.pack, { rows: [] });
+ }
+ // if (data.bodys[CARD.pack_delivery]) {
+ // props.cardTable.setTableData(CARD.pack_delivery, data.bodys[CARD.pack_delivery]);
+ // } else {
+ // props.cardTable.setTableData(CARD.pack_delivery, { rows: [] });
+ // }
+}
+
+function tableUIState(props) {
+ props.cardTable.setStatus(CARD.body, UISTATE.edit);
+ props.cardTable.setStatus(CARD.good_delivery, UISTATE.edit);
+ props.cardTable.setStatus(CARD.pack, UISTATE.edit);
+ props.cardTable.setStatus(CARD.pack_delivery, UISTATE.edit);
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/splitModel/btnClicks/index.js b/src/dm/dm/delivbill/splitModel/btnClicks/index.js
new file mode 100644
index 0000000..e945502
--- /dev/null
+++ b/src/dm/dm/delivbill/splitModel/btnClicks/index.js
@@ -0,0 +1,19 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { BUTTON, URL } from '../../constance';
+import saveBtnClick from './saveBtnClick';
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.define:
+ saveBtnClick.call(this, this.props, URL.defineSplit);
+ break;
+ case BUTTON.cancel:
+ this.props.closeDlg();
+ break;
+ case BUTTON.save:
+ saveBtnClick.call(this, this.props, URL.saveSplit);
+ break;
+ }
+}
+export { btnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/splitModel/btnClicks/saveBtnClick.js b/src/dm/dm/delivbill/splitModel/btnClicks/saveBtnClick.js
new file mode 100644
index 0000000..ef086d7
--- /dev/null
+++ b/src/dm/dm/delivbill/splitModel/btnClicks/saveBtnClick.js
@@ -0,0 +1,38 @@
+/*txBx9FIYfUQl2UukqRyP7+CyhfRIGeMtpaUNE58w5e4=*/
+import { ajax } from 'nc-lightapp-front';
+import { TRANSFER, FIELD } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, url) {
+ let rows = props.editTable.getAllRows(TRANSFER.splitbill);
+ let flag = false;
+ rows.every((row, i) => {
+ let cvalue = (row.values[FIELD.isSplit] || {}).value;
+ if (cvalue) {
+ flag = true;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ if (!flag) {
+ showWarningInfo.call(getLangByResId(this, '4014DELIVBILL-000079')); /* 国际化处理: 必须要有分单条件*/
+ return;
+ }
+ ajax({
+ url: url,
+ data: { rows: rows, pk_org: props.pkorgdata },
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ props.defineDlg(data);
+ }
+ }
+ }
+ });
+}
+
+/*txBx9FIYfUQl2UukqRyP7+CyhfRIGeMtpaUNE58w5e4=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/splitModel/index.js b/src/dm/dm/delivbill/splitModel/index.js
new file mode 100644
index 0000000..80c9bd3
--- /dev/null
+++ b/src/dm/dm/delivbill/splitModel/index.js
@@ -0,0 +1,62 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { initTemplate } from './init';
+import { TRANSFER } from '../constance';
+import { btnClick } from './btnClicks';
+import { createPage, base } from 'nc-lightapp-front';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+const { NCModal } = base;
+import { initData } from './init/initTemplate.js';
+import './index.less';
+class SplitModel extends Component {
+ constructor(props) {
+ super(props);
+ props.use.editTable(TRANSFER.splitbill);
+ this.state = {};
+ initLang(this, [ '4014delivbill' ], 'dm', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.pkorgdata != this.props.pkorgdata) {
+ initData.call(this, nextProps);
+ }
+ }
+
+ render() {
+ let { editTable, button, show, closeDlg } = this.props;
+ const { createEditTable } = editTable;
+ const { createButtonApp } = button;
+ return (
+
+
+ {getLangByResId(this, '4014DELIVBILL-000096')}
+ {/* 国际化处理: 分单规则设置*/}
+
+
+ {createEditTable(TRANSFER.splitbill, {
+ inModal: true
+ })}
+
+
+ {createButtonApp({
+ modalRelation: 'dm_split_model',
+ area: TRANSFER.splitArea,
+ onButtonClick: btnClick.bind(this)
+ })}
+
+
+ );
+ }
+}
+
+SplitModel = createPage({})(SplitModel);
+
+export default SplitModel;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/splitModel/index.less b/src/dm/dm/delivbill/splitModel/index.less
new file mode 100644
index 0000000..02c2df7
--- /dev/null
+++ b/src/dm/dm/delivbill/splitModel/index.less
@@ -0,0 +1,3 @@
+// .table-next-body-inner-wrapper {
+// max-height: none !important;
+// }
diff --git a/src/dm/dm/delivbill/splitModel/init/index.js b/src/dm/dm/delivbill/splitModel/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/dm/dm/delivbill/splitModel/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/splitModel/init/initTemplate.js b/src/dm/dm/delivbill/splitModel/init/initTemplate.js
new file mode 100644
index 0000000..ae4a9ee
--- /dev/null
+++ b/src/dm/dm/delivbill/splitModel/init/initTemplate.js
@@ -0,0 +1,70 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+import { ajax } from 'nc-lightapp-front';
+import { UISTATE, TRANSFER, URL } from '../../constance';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: TRANSFER.transferAllCode //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ // 作为分单依据宽度调整
+ if(meta.splitbill){
+ let items = meta.splitbill.items;
+ items.forEach(item => {
+ if(item.attrcode == "isSplit"){
+ item.width = '250px';
+ }
+ })
+ }
+ props.meta.setMeta(meta, () => {
+ setTimeout(() => {
+ initData.call(this, props);
+ }, 0);
+ });
+ }
+ //按钮
+ if (data.button) {
+ let buttons = data.button;
+ props.button.setButtons(buttons);
+ }
+ }
+ }
+ );
+}
+
+//请求表单数据
+function initData(props) {
+ if (!!props.pkorgdata) {
+ props.editTable.setStatus(TRANSFER.splitbill, UISTATE.edit);
+ props.editTable.setTableData(TRANSFER.splitbill, { rows: [] });
+ ajax({
+ url: URL.querySplit,
+ data: {
+ pk_org: props.pkorgdata,
+ pageCode: TRANSFER.transferAllCode //页面编码
+ },
+ method: 'post',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ props.editTable.setTableData(TRANSFER.splitbill, data[TRANSFER.refAllHead]);
+ let index = 0;
+ data[TRANSFER.refAllHead].rows.forEach((item) => {
+ if (item.values.dataItemkey.value == 'a' || item.values.dataItemkey.value == 'b') {
+ props.editTable.setEditableRowKeyByIndex(TRANSFER.splitbill, index, 'isSplit', false);
+ }
+ index++;
+ });
+ }
+ }
+ });
+ }
+}
+
+export { initData };
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/index.js b/src/dm/dm/delivbill/transfer/afterEvent/index.js
new file mode 100644
index 0000000..82e6df0
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/index.js
@@ -0,0 +1,20 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchAfterEvent from './searchAfterEvent';
+import searchAfter4CEvent from './searchAfter4CEvent';
+import searchAfter4IEvent from './searchAfter4IEvent';
+import searchAfter4YEvent from './searchAfter4YEvent';
+import searchAfter21Event from './searchAfter21Event';
+import searchAfter4331Event from './searchAfter4331Event';
+import searchAfter4802Event from './searchAfter4802Event';
+
+export {
+ searchAfterEvent,
+ searchAfter4CEvent,
+ searchAfter4IEvent,
+ searchAfter4YEvent,
+ searchAfter21Event,
+ searchAfter4331Event,
+ searchAfter4802Event
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/orgAfterEvent.js b/src/dm/dm/delivbill/transfer/afterEvent/orgAfterEvent.js
new file mode 100644
index 0000000..e92db21
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/orgAfterEvent.js
@@ -0,0 +1,59 @@
+/*50WLnzGeq39Tfv85RWLaWZT1lLmuB0Au3o9vPiF0Dds=*/
+/**
+ * 物流组织编辑后事件
+ */
+import { TRANSFER, FIELD, PK } from '../../constance';
+import {
+ searchAfterEvent,
+ searchAfter4331Event,
+ searchAfter4CEvent,
+ searchAfter4YEvent,
+ searchAfter4IEvent,
+ searchAfter4802Event,
+ searchAfter21Event
+} from './index';
+
+export default function(orgVal = this.state.pk_org) {
+ switch (this.curheadTableId) {
+ case 0:
+ this.props.search.setSearchValByField(TRANSFER.refAllQuery, FIELD.pk_org, orgVal);
+ searchAfterEvent.call(this, FIELD.pk_org, orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ case 1:
+ this.props.search.setSearchValByField(TRANSFER.ref4331Query, FIELD.pk_org, orgVal);
+ searchAfter4331Event.call(this, FIELD.pk_org, orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ case 2:
+ this.props.search.setSearchValByField(TRANSFER.refm4cQuery, FIELD.trafficorgoid, orgVal);
+ searchAfter4CEvent.call(this, FIELD.trafficorgoid, orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ case 3:
+ this.props.search.setSearchValByField(TRANSFER.refm4yQuery, FIELD.trafficorgoid, orgVal);
+ searchAfter4YEvent.call(this, FIELD.trafficorgoid, orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ case 4:
+ this.props.search.setSearchValByField(TRANSFER.refm4iQuery, FIELD.trafficorgoid, orgVal);
+ searchAfter4IEvent.call(this, FIELD.trafficorgoid, orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ case 5:
+ this.props.search.setSearchValByField(TRANSFER.ref4802Query, FIELD.pk_org, orgVal);
+ searchAfter4802Event.call(this, FIELD.pk_org, orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ case 6:
+ this.props.search.setSearchValByField(TRANSFER.ref21Query, 'pk_order_b.pk_flowstockorg', orgVal);
+ searchAfter21Event.call(this, 'pk_order_b.pk_flowstockorg', orgVal);
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ default:
+ this.props.transferTable.clearAllSelectedData();
+ break;
+ }
+}
+
+/*50WLnzGeq39Tfv85RWLaWZT1lLmuB0Au3o9vPiF0Dds=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfter21Event.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter21Event.js
new file mode 100644
index 0000000..63c2c40
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter21Event.js
@@ -0,0 +1,28 @@
+/*Q+Pu1UUkXaBE+oqqlIHCXdlHd6BqQvVQd99Lhkz8Li8=*/
+import { TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === 'pk_order_b.pk_arrvstoorg') {
+ //收货库存组织
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.ref21Query, [ 'pk_order_b.pk_recvstordoc' ]);
+ } else if (key === 'pk_order_b.pk_flowstockorg') {
+ //物流组织
+ let fields = [
+ 'pk_supplier',
+ 'pk_recvcustomer',
+ 'pk_order_b.pk_material',
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_order_b.cprojectid',
+ 'pk_order_b.casscustid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.ref21Query, fields);
+ }
+}
+
+/*Q+Pu1UUkXaBE+oqqlIHCXdlHd6BqQvVQd99Lhkz8Li8=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4331Event.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4331Event.js
new file mode 100644
index 0000000..511e93c
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4331Event.js
@@ -0,0 +1,24 @@
+/*tcS66MSxx0/hkys/ByAR5jKJHHuOhCCgtzub3LAN7FQ=*/
+import { FIELD, TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === FIELD.pk_org) {
+ //物流组织
+ let fields = [
+ FIELD.ccarrierid,
+ 'cdeliverybid.ctranscustid',
+ 'cdeliverybid.cmaterialid',
+ 'cdeliverybid.cmaterialid.pk_marbasclass',
+ 'cdeliverybid.cprojectid',
+ 'cdeliverybid.creceivecustid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.ref4331Query, fields);
+ }
+}
+
+/*tcS66MSxx0/hkys/ByAR5jKJHHuOhCCgtzub3LAN7FQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4802Event.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4802Event.js
new file mode 100644
index 0000000..ea79aef
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4802Event.js
@@ -0,0 +1,30 @@
+/*kYQQBHUyfXEiKevfvVOeAlnPIsXWg2irzeFC8nQ79U0=*/
+import { FIELD, TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === FIELD.pk_org) {
+ //物流组织
+ let fields = [
+ 'cconsignid',
+ 'crouteid',
+ 'bodyfk.cinventoryid',
+ 'bodyfk.cinventoryid.pk_marbasclass',
+ 'bodyfk.cprojectid',
+ 'bodyfk.csendvendorid',
+ 'bodyfk.creceivecustid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.ref4802Query, fields);
+ } else if (key === 'bodyfk.csendstoreorgid') {
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.ref4802Query, [ 'bodyfk.csendstoreid' ]);
+ } else if (key === 'bodyfk.creceivestoreorgid') {
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.ref4802Query, [ 'bodyfk.creceivestoreid' ]);
+ }
+}
+
+/*kYQQBHUyfXEiKevfvVOeAlnPIsXWg2irzeFC8nQ79U0=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4CEvent.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4CEvent.js
new file mode 100644
index 0000000..f712a42
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4CEvent.js
@@ -0,0 +1,29 @@
+/*PZ5uNVrbcpeSxqzOQ55sA58A0ajFodijBfbKUeKcS/0=*/
+import { FIELD, TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === FIELD.pk_org) {
+ //库存组织
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.refm4cQuery, [ 'cwarehouseid' ]);
+ } else if (key === FIELD.trafficorgoid) {
+ //物流组织
+ let fields = [
+ 'ctrancustid',
+ 'ccustomerid',
+ 'cgeneralbid.cmaterialoid',
+ 'cgeneralbid.cmaterialoid.pk_marbasclass',
+ 'cgeneralbid.cprojectid',
+ 'cgeneralbid.casscustid',
+ 'cgeneralbid.creceieveid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.refm4cQuery, fields);
+ }
+}
+
+/*PZ5uNVrbcpeSxqzOQ55sA58A0ajFodijBfbKUeKcS/0=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4IEvent.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4IEvent.js
new file mode 100644
index 0000000..60c112d
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4IEvent.js
@@ -0,0 +1,27 @@
+/*2XKBtyMb4cm3EiMMh4geeGkNjceyxzrFXWOiRzrid54=*/
+import { FIELD, TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === FIELD.pk_org) {
+ //库存组织
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.refm4iQuery, [ 'cwarehouseid' ]);
+ } else if (key === FIELD.trafficorgoid) {
+ let fields = [
+ 'cgeneralbid.cmaterialoid',
+ 'cgeneralbid.cmaterialoid.pk_marbasclass',
+ 'cgeneralbid.cprojectid',
+ 'cgeneralbid.cvendorid',
+ 'cgeneralbid.casscustid',
+ 'cgeneralbid.creceieveid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.refm4iQuery, fields);
+ }
+}
+
+/*2XKBtyMb4cm3EiMMh4geeGkNjceyxzrFXWOiRzrid54=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4YEvent.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4YEvent.js
new file mode 100644
index 0000000..e6e3bd1
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfter4YEvent.js
@@ -0,0 +1,31 @@
+/*DmvMEdkFcgCvW9/zkqtZjccapvVBAiiT8mx5HRp/v14=*/
+import { FIELD, TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === FIELD.pk_org) {
+ //库存组织
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.refm4yQuery, [ 'cwarehouseid' ]);
+ } else if (key === FIELD.trafficorgoid) {
+ //物流组织
+ let fields = [
+ 'ctrancustid',
+ 'cgeneralbid.cmaterialoid',
+ 'cgeneralbid.cmaterialoid.pk_marbasclass',
+ 'cgeneralbid.cprojectid',
+ 'cgeneralbid.casscustid',
+ 'cgeneralbid.creceivecustid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.refm4yQuery, fields);
+ } else if (key === 'cothercalbodyoid') {
+ //调入库存组织
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.refm4yQuery, [ 'cotherwhid' ]);
+ }
+}
+
+/*DmvMEdkFcgCvW9/zkqtZjccapvVBAiiT8mx5HRp/v14=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/afterEvent/searchAfterEvent.js b/src/dm/dm/delivbill/transfer/afterEvent/searchAfterEvent.js
new file mode 100644
index 0000000..53853c5
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/afterEvent/searchAfterEvent.js
@@ -0,0 +1,28 @@
+/*VRi3nyqaeOPenSkOLNstN5huxsAj26D9/1Sipk4ggko=*/
+import { FIELD, TRANSFER } from '../../constance';
+import multiCorpRefUtil from '../util/multiCorpRefUtil';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+/**
+ * 查询区编辑后事件
+ * @param {*} key 操作的字段
+ * @param {*} val 编辑后,操作字段的值,主键
+ */
+export default function(key, val) {
+ if (key === FIELD.pk_org) {
+ //物流组织
+ let fields = [
+ FIELD.ccarrierid,
+ 'delivbill.cinventoryid',
+ 'delivbill.cinventoryid.pk_marbasclass',
+ 'delivbill.csendvendorid',
+ 'delivbill.creceivecustid'
+ ];
+ multiCorpRefUtil.call(this, TRANSFER.refAllQuery, fields);
+ } else if (key === 'delivbill.csendstoreorgid') {
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.refAllQuery, [ 'delivbill.csendstoreid' ]);
+ } else if (key === 'delivbill.creceivestoreorgid') {
+ multiCorpRefHandler.call(this, this.props, val, TRANSFER.refAllQuery, [ 'delivbill.creceivestoreid' ]);
+ }
+}
+
+/*VRi3nyqaeOPenSkOLNstN5huxsAj26D9/1Sipk4ggko=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/index.js b/src/dm/dm/delivbill/transfer/btnClicks/index.js
new file mode 100644
index 0000000..323a439
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/index.js
@@ -0,0 +1,65 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { BUTTON } from '../../constance';
+import transferBtnClick from './transferBtnClick';
+import search21BtnClick from './search21BtnClick';
+import searchm4cBtnClick from './searchm4cBtnClick';
+import searchm4iBtnClick from './searchm4iBtnClick';
+import searchm4yBtnClick from './searchm4yBtnClick';
+import searchAllBtnClick from './searchAllBtnClick';
+import search4331BtnClick from './search4331BtnClick';
+import search4802BtnClick from './search4802BtnClick';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+function btnClick(props, key, record, index) {
+ switch (key) {
+ case BUTTON.distributedBill:
+ if (this.state.pk_org.value) {
+ this.setState({ dlgShowFlag: true });
+ } else {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000080')); /* 国际化处理: 请选择组织*/
+ }
+ break;
+ case BUTTON.refresh:
+ switch (this.curheadTableId) {
+ case 0:
+ searchAllBtnClick.call(this, props, true);
+ break;
+ case 1:
+ search4331BtnClick.call(this, props, true);
+ break;
+ case 2:
+ searchm4cBtnClick.call(this, props, true);
+ break;
+ case 3:
+ searchm4yBtnClick.call(this, props, true);
+ break;
+ case 4:
+ searchm4iBtnClick.call(this, props, true);
+ break;
+ case 5:
+ search4802BtnClick.call(this, props, true);
+ break;
+ case 6:
+ search21BtnClick.call(this, props, true);
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+}
+
+export {
+ btnClick,
+ transferBtnClick,
+ searchAllBtnClick,
+ search21BtnClick,
+ search4331BtnClick,
+ search4802BtnClick,
+ searchm4cBtnClick,
+ searchm4iBtnClick,
+ searchm4yBtnClick
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/search21BtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/search21BtnClick.js
new file mode 100644
index 0000000..c128c2d
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/search21BtnClick.js
@@ -0,0 +1,100 @@
+/*v1W0bgW0dYUKaANbBTaIUPOi0rnCztV/m6b1rWSLjHI=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-03-30 14:40:45
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, CACHEDATA, PK, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer21Cach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ if (this.isRefAddLine) {
+ transtypecode = this.refAddData.ctrantypeid;
+ }
+ queryInfo = props.search.getQueryInfo(TRANSFER.ref21Query, false);
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer21Cach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: 'pk_order_b.pk_flowstockorg',
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferPagecode21, //页面编码
+ appcode: TRANSFER.appcode21, //应用编码
+ templetid: this.pageId21
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.ref21Query,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let datas = res.data;
+ datas.forEach((element) => {
+ element.head[TRANSFER.ref21Head].rows[0].values.ctrantypeid = {
+ value: '21',
+ display: getLangByResId(this, '4014DELIVBILL-000082')
+ }; /* 国际化处理: 采购订单*/
+ element.body[TRANSFER.ref21Body].rows.forEach((item) => {
+ item.values['cinventoryvid'] = Object.assign({}, item.values.pk_material);
+ item.values['cinventoryvid.name'] = Object.assign({}, item.values['pk_material.name']);
+ });
+ });
+ res.data = delivNumUtils.call(this, TRANSFER.ref21Body, res.data, FIELD.nnum, FIELD.naccumdevnum);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.ref21Head,
+ TRANSFER.ref21Body,
+ res.data,
+ PK.HEAD21PK,
+ PK.BODY21PK
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.ref21Head,
+ TRANSFER.ref21Body,
+ [],
+ PK.HEAD21PK,
+ PK.BODY21PK
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+/*v1W0bgW0dYUKaANbBTaIUPOi0rnCztV/m6b1rWSLjHI=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/search4331BtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/search4331BtnClick.js
new file mode 100644
index 0000000..5be9c9b
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/search4331BtnClick.js
@@ -0,0 +1,119 @@
+/*klIiUCN8aeSBKP444A1ndWuik/1eMlQPJB5DbnZ5+uc=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-02-28 17:48:49
+ */
+import { ajax } from 'nc-lightapp-front';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, PK, CACHEDATA, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4331Cach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ if (this.isRefAddLine) {
+ transtypecode = this.refAddData.ctrantypeid;
+ }
+ queryInfo = props.search.getQueryInfo(TRANSFER.ref4331Query, false);
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4331Cach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: FIELD.pk_org,
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferPagecode4331, //页面编码
+ appcode: TRANSFER.appcode4331, //应用编码
+ templetid: this.pageId4331
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.ref4331Query,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let datas = res.data;
+ datas.forEach((element) => {
+ element.head[TRANSFER.ref4331Head].rows[0].values.ctrantypeid = {
+ value: '4331',
+ display: getLangByResId(this, '4014DELIVBILL-000083')
+ }; /* 国际化处理: 发货单*/
+ element.head[TRANSFER.ref4331Head].rows[0].values['csendtypeid'] = Object.assign(
+ {},
+ element.head[TRANSFER.ref4331Head].rows[0].values.ctransporttypeid
+ );
+ element.head[TRANSFER.ref4331Head].rows[0].values['crouteid'] = Object.assign(
+ {},
+ element.head[TRANSFER.ref4331Head].rows[0].values.ctransportrouteid
+ );
+ element.body[TRANSFER.ref4331Body].rows.forEach((item) => {
+ item.values['cinventoryvid'] = Object.assign({}, item.values.cmaterialvid);
+ item.values['ccarrierid'] = Object.assign({}, item.values.ctranscustid);
+ item.values['nvolumn'] = Object.assign({}, item.values.nvolume);
+ item.values['creceivestoreorgvid'] = Object.assign({}, item.values.cinstockorgvid);
+ item.values['csendstoreorgvid'] = Object.assign({}, item.values.csendstockorgvid);
+ item.values['cinventoryvid.name'] = Object.assign({}, item.values['cmaterialvid.name']);
+ item.values['cinventoryvid.materialspec'] = Object.assign(
+ {},
+ item.values['cmaterialvid.materialspec']
+ );
+ item.values['cinventoryvid.materialtype'] = Object.assign(
+ {},
+ item.values['cmaterialvid.materialtype']
+ );
+ });
+ });
+ res.data = delivNumUtils.call(this, TRANSFER.ref4331Body, res.data, FIELD.nnum, FIELD.ntotaltransnum);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.ref4331Head,
+ TRANSFER.ref4331Body,
+ res.data,
+ PK.HEAD4331PK,
+ PK.BODY4331PK
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.ref4331Head,
+ TRANSFER.ref4331Body,
+ [],
+ PK.HEAD4331PK,
+ PK.BODY4331PK
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+/*klIiUCN8aeSBKP444A1ndWuik/1eMlQPJB5DbnZ5+uc=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/search4802BtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/search4802BtnClick.js
new file mode 100644
index 0000000..080bf87
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/search4802BtnClick.js
@@ -0,0 +1,96 @@
+/*5lTajDDdY1SGxt1qmx7BrMktWOSXaBAiGxahKsepOaU=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2023-10-31 14:25:17
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, PK, CACHEDATA, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4802Cach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ // if (this.isRefAddLine) {
+ // transtypecode = this.refAddData.ctrantypeid;
+ // }
+ queryInfo = props.search.getQueryInfo(TRANSFER.ref4802Query, false);
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4802Cach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: FIELD.pk_org,
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferPagecode4802, //页面编码
+ appcode: TRANSFER.appcode4802, //应用编码
+ templetid: this.pageId4802
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.ref4802Query,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let datas = res.data;
+ datas.forEach((element) => {
+ element.head[TRANSFER.ref4802Head].rows[0].values.ctrantypeid = {
+ value: '4802',
+ display: getLangByResId(this, '4014DELIVBILL-000084')
+ }; /* 国际化处理: 运输申请单*/
+ });
+ res.data = delivNumUtils.call(this, TRANSFER.ref4802Body, res.data, FIELD.nnum, FIELD.nsendnum);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.ref4802Head,
+ TRANSFER.ref4802Body,
+ res.data,
+ PK.HEAD4802PK,
+ PK.BODY4802PK
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.ref4802Head,
+ TRANSFER.ref4802Body,
+ [],
+ PK.HEAD4802PK,
+ PK.BODY4802PK
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+/*5lTajDDdY1SGxt1qmx7BrMktWOSXaBAiGxahKsepOaU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/searchAllBtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/searchAllBtnClick.js
new file mode 100644
index 0000000..ea715f5
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/searchAllBtnClick.js
@@ -0,0 +1,223 @@
+/*+IN6gXfDEihyPEBNcFATAZjTwmpZXg1KB/UeRF8um8k=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-09-06 15:15:53
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import translateData from '../util/translateData';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, CACHEDATA, KEYMAP, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ let _this = this;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transferAllCach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let condition = this.props.search.getAllSearchData(TRANSFER.refAllQuery);
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ // if (this.isRefAddLine) {
+ // transtypecode = this.refAddData.ctrantypeid;
+ // }
+ queryInfo = props.search.getQueryInfo(TRANSFER.refAllQuery, false);
+ queryInfo.querycondition = condition ? condition : null;
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transferAllCach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: FIELD.pk_org,
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferAllCode, //页面编码
+ appcode: TRANSFER.appcodeAll, //应用编码
+ templetid: this.pageIdAll
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.refAllQuery,
+ data: data,
+ success: (res) => {
+ if (res.data && res.data.length > 0) {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ let destdatas = dealData(res.data, _this); //数据转换
+ destdatas = delivNumUtils.call(this, TRANSFER.refAllBody, destdatas, FIELD.nnum, FIELD.ntotaltrannum); //数据加工
+ this.props.transferTable.setTransferTableValue(
+ //页面赋值
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ destdatas,
+ FIELD.pk,
+ FIELD.bpk
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ [],
+ FIELD.pk,
+ FIELD.bpk
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+function dealData(data, _this) {
+ let destdatas = [];
+ let data4331 = [];
+ let data4C = [];
+ let data4Y = [];
+ let data4I = [];
+ let data4802 = [];
+ let data21 = [];
+
+ //根据页面pageid将数据进行分类
+ for (let d of data) {
+ if (TRANSFER.transferPagecode4331 == d.pageid) {
+ data4331.push(d);
+ } else if (TRANSFER.transferPagecodem4c == d.pageid) {
+ data4C.push(d);
+ } else if (TRANSFER.transferPagecodem4y == d.pageid) {
+ data4Y.push(d);
+ } else if (TRANSFER.transferPagecodem4i == d.pageid) {
+ data4I.push(d);
+ } else if (TRANSFER.transferPagecode4802 == d.pageid) {
+ data4802.push(d);
+ } else if (TRANSFER.transferPagecode21 == d.pageid) {
+ data21.push(d);
+ }
+ }
+
+ let m4331extatt = {
+ ctrantypeid: { value: '4331', display: getLangByResId(_this, '4014DELIVBILL-000083') } /* 国际化处理: 发货单*/
+ };
+ //将数据进行转换
+ let dest4331datas = translateData(
+ data4331,
+ TRANSFER.ref4331Head,
+ TRANSFER.ref4331Body,
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ KEYMAP.KEYMAP4331TO4804,
+ m4331extatt
+ );
+ //将转换后的数据进行汇总
+ destdatas.push(...dest4331datas);
+
+ let m4Cextatt = {
+ ctrantypeid: { value: '4C', display: getLangByResId(_this, '4014DELIVBILL-000085') } /* 国际化处理: 销售出库*/
+ };
+
+ let dest4Cdatas = translateData(
+ data4C,
+ TRANSFER.refm4cHead,
+ TRANSFER.refm4cBody,
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ KEYMAP.KEYMAP4CTO4804,
+ m4Cextatt
+ );
+ // 表头取表体的值,
+ destdatas.push(...dest4Cdatas);
+
+ let m4Yextatt = {
+ ctrantypeid: { value: '4Y', display: getLangByResId(_this, '4014DELIVBILL-000086') } /* 国际化处理: 调拨出库*/
+ };
+
+ let dest4Ydatas = translateData(
+ data4Y,
+ TRANSFER.refm4yHead,
+ TRANSFER.refm4yBody,
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ KEYMAP.KEYMAP4YTO4804,
+ m4Yextatt
+ );
+ // 表头取表体的值,
+ destdatas.push(...dest4Ydatas);
+
+ let m4Iextatt = {
+ ctrantypeid: { value: '4I', display: getLangByResId(_this, '4014DELIVBILL-000087') } /* 国际化处理: 其它出库*/
+ };
+
+ let dest4Idatas = translateData(
+ data4I,
+ TRANSFER.refm4iHead,
+ TRANSFER.refm4iBody,
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ KEYMAP.KEYMAP4ITO4804,
+ m4Iextatt
+ );
+ // 表头取表体的值,
+ destdatas.push(...dest4Idatas);
+
+ let m4802extatt = {
+ ctrantypeid: { value: '4802', display: getLangByResId(_this, '4014DELIVBILL-000084') } /* 国际化处理: 运输申请单*/
+ };
+ let dest4802datas = translateData(
+ data4802,
+ TRANSFER.ref4802Head,
+ TRANSFER.ref4802Body,
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ KEYMAP.KEYMAP4802TO4804,
+ m4802extatt
+ );
+ // 表头取表体的值,biao'ti
+ destdatas.push(...dest4802datas);
+
+ let m21extatt = {
+ ctrantypeid: { value: '21', display: getLangByResId(_this, '4014DELIVBILL-000082') } /* 国际化处理: 采购订单*/
+ };
+
+ let dest21datas = translateData(
+ data21,
+ TRANSFER.ref21Head,
+ TRANSFER.ref21Body,
+ TRANSFER.refAllHead,
+ TRANSFER.refAllBody,
+ KEYMAP.KEYMAP21TO4804,
+ m21extatt
+ );
+ // 表头取表体的值,
+ destdatas.push(...dest21datas);
+ return destdatas;
+}
+
+/*+IN6gXfDEihyPEBNcFATAZjTwmpZXg1KB/UeRF8um8k=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/searchm4cBtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/searchm4cBtnClick.js
new file mode 100644
index 0000000..62cae33
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/searchm4cBtnClick.js
@@ -0,0 +1,95 @@
+/*FPbRu9xa2cQvTyZ9icpU4xD7o6Ko4pwpJPQ/YmQl+gM=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-09-23 13:09:19
+ */
+import { ajax } from 'nc-lightapp-front';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, PK, CACHEDATA, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4cCach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ if (this.isRefAddLine) {
+ transtypecode = this.refAddData.ctrantypeid;
+ }
+ queryInfo = props.search.getQueryInfo(TRANSFER.refm4cQuery, false);
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4cCach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: FIELD.trafficorgoid,
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferPagecodem4c, //页面编码
+ appcode: TRANSFER.appcodem4c, //应用编码
+ templetid: this.pageId4c
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.refm4cQuery,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let datas = res.data;
+ datas.forEach((element) => {
+ element.head[TRANSFER.refm4cHead].rows[0].values.ctrantypeid = {
+ value: '4C',
+ display: getLangByResId(this, '4014DELIVBILL-000085')
+ }; /* 国际化处理: 销售出库*/
+ });
+ res.data = delivNumUtils.call(this, TRANSFER.refm4cBody, res.data, FIELD.nnum, FIELD.ntotaltrannum);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refm4cHead,
+ TRANSFER.refm4cBody,
+ res.data,
+ PK.HEADM4CPK,
+ PK.BODYM4CPK
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refm4cHead,
+ TRANSFER.refm4cBody,
+ [],
+ PK.HEADM4CPK,
+ PK.BODYM4CPK
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+/*FPbRu9xa2cQvTyZ9icpU4xD7o6Ko4pwpJPQ/YmQl+gM=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/searchm4iBtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/searchm4iBtnClick.js
new file mode 100644
index 0000000..df84b1d
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/searchm4iBtnClick.js
@@ -0,0 +1,108 @@
+/*ao+hmYDZRHa4MqqPOr5xPpo1z20x2YTF0uACefBIjHA=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-04-06 17:27:34
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, PK, CACHEDATA, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4iCach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ if (this.isRefAddLine) {
+ transtypecode = this.refAddData.ctrantypeid;
+ }
+ queryInfo = props.search.getQueryInfo(TRANSFER.refm4iQuery, false);
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4iCach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: FIELD.trafficorgoid,
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferPagecodem4i, //页面编码
+ appcode: TRANSFER.appcodem4i, //应用编码
+ templetid: this.pageId4i
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.refm4iQuery,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let datas = res.data;
+ datas.forEach((element) => {
+ element.head[TRANSFER.refm4iHead].rows[0].values.ctrantypeid = {
+ value: '4I',
+ display: getLangByResId(this, '4014DELIVBILL-000087')
+ }; /* 国际化处理: 其它出库*/
+ element.body[TRANSFER.refm4iBody].rows.forEach((item) => {
+ item.values['cinventoryvid'] = Object.assign({}, item.values.cmaterialvid);
+ item.values['cinventoryvid.name'] = Object.assign({}, item.values['cmaterialvid.name']);
+ item.values['cinventoryvid.materialspec'] = Object.assign(
+ {},
+ item.values['cmaterialvid.materialspec']
+ );
+ item.values['cinventoryvid.materialtype'] = Object.assign(
+ {},
+ item.values['cmaterialvid.materialtype']
+ );
+ });
+ });
+ res.data = delivNumUtils.call(this, TRANSFER.refm4iBody, res.data, FIELD.nnum, FIELD.ntotaltrannum);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refm4iHead,
+ TRANSFER.refm4iBody,
+ res.data,
+ PK.HEADM4IPK,
+ PK.BODYM4IPK
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refm4iHead,
+ TRANSFER.refm4iBody,
+ [],
+ PK.HEADM4IPK,
+ PK.BODYM4IPK
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+/*ao+hmYDZRHa4MqqPOr5xPpo1z20x2YTF0uACefBIjHA=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/searchm4yBtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/searchm4yBtnClick.js
new file mode 100644
index 0000000..23b5ccf
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/searchm4yBtnClick.js
@@ -0,0 +1,95 @@
+/*FZ7uXWevAHfHjTwGneAJdn79qx8NNYltln/W1seXs2M=*/
+/*
+ * @Author: qishy
+ * @PageInfo: 查询、刷新公共处理方法
+ * @Date: 2019-05-05 13:30:50
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-09-23 13:09:26
+ */
+import { ajax } from 'nc-lightapp-front';
+import delivNumUtils from '../util/delivNumUtils';
+import {
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showWarningInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { TRANSFER, URL, PK, CACHEDATA, FIELD } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, isRefresh) {
+ let queryInfo;
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000081')); /* 国际化处理: 请选择物流组织*/
+ return;
+ }
+ if (isRefresh) {
+ //刷新时,从缓存中获取查询条件
+ queryInfo = getDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4yCach);
+ if (!queryInfo) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000053')); /* 国际化处理: 请先查询数据*/
+ return;
+ }
+ } else {
+ let transtypecode = transtypeUtils.getTranstypeCode.call(this);
+ if (this.isRefAddLine) {
+ transtypecode = this.refAddData.ctrantypeid;
+ }
+ queryInfo = props.search.getQueryInfo(TRANSFER.refm4yQuery, false);
+ queryInfo.userdefObj = { transtype: transtypecode, srcBPks: this.refAddData ? this.refAddData.src_body : null };
+ // 将查询条件缓存
+ setDefData(CACHEDATA.transferDataSource, CACHEDATA.transfer4yCach, queryInfo);
+ }
+ let orgCondition = {
+ datatype: '204',
+ field: FIELD.trafficorgoid,
+ oprtype: '=',
+ value: { firstvalue: this.state.pk_org.value, secondvalue: '' }
+ };
+ queryInfo.querycondition.conditions.push(orgCondition);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: TRANSFER.transferPagecodem4y, //页面编码
+ appcode: TRANSFER.appcodem4y, //应用编码
+ templetid: this.pageId4y
+ };
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.refm4yQuery,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let datas = res.data;
+ datas.forEach((element) => {
+ element.head[TRANSFER.refm4yHead].rows[0].values.ctrantypeid = {
+ value: '4Y',
+ display: getLangByResId(this, '4014DELIVBILL-000086')
+ }; /* 国际化处理: 调拨出库*/
+ });
+ res.data = delivNumUtils.call(this, TRANSFER.refm4yBody, res.data, FIELD.nnum, FIELD.ntotaltrannum);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refm4yHead,
+ TRANSFER.refm4yBody,
+ res.data,
+ PK.HEADM4YPK,
+ PK.BODYM4YPK
+ );
+ isRefresh == true ? showRefreshInfo() : showHasQueryResultInfo(res.data.length);
+ } else {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER.refm4yHead,
+ TRANSFER.refm4yBody,
+ [],
+ PK.HEADM4YPK,
+ PK.BODYM4YPK
+ );
+ isRefresh == true ? showRefreshInfo() : showNoQueryResultInfo();
+ }
+ }
+ });
+}
+
+/*FZ7uXWevAHfHjTwGneAJdn79qx8NNYltln/W1seXs2M=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/btnClicks/transferBtnClick.js b/src/dm/dm/delivbill/transfer/btnClicks/transferBtnClick.js
new file mode 100644
index 0000000..fae8efb
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/btnClicks/transferBtnClick.js
@@ -0,0 +1,52 @@
+/*26TAbq1hKdLG2IPb6mP9V/Ffs/s7YFW8zNnYDITPTvk=*/
+/*
+ * 点击转单按钮钩子函数
+ * @Author: liangzhyf
+ * @Date: 2020-03-02 11:11:30
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-09-09 15:13:16
+ */
+import { ajax } from 'nc-lightapp-front';
+import { UISTATE, URL, CACHEDATA, CARD } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { setDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+export default function() {
+ if (!this.splitCondition) {
+ if (!this.state.pk_org.value) {
+ showWarningInfo(getLangByResId(this, '4014DELIVBILL-000088')); /* 国际化处理: 请首先选择组织信息*/
+ return;
+ } else {
+ ajax({
+ url: URL.defaultSplit,
+ data: {
+ pk_org: this.state.pk_org.value
+ },
+ async: true,
+ method: 'post',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ this.splitCondition = data;
+ toCardPage.call(this);
+ }
+ }
+ });
+ }
+ } else {
+ toCardPage.call(this);
+ }
+}
+
+function toCardPage() {
+ setDefData.call(this, CACHEDATA.splitConditionsCach, CACHEDATA.splitConditionsCachKey, this.splitCondition);
+ this.props.pushTo(URL.cardUrl, {
+ pagecode: CARD.pagecode,
+ status: UISTATE.add,
+ type: UISTATE.transfer,
+ pk_org: this.state.pk_org.value,
+ tabId: this.curheadTableId //当前页签
+ });
+}
+
+/*26TAbq1hKdLG2IPb6mP9V/Ffs/s7YFW8zNnYDITPTvk=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/index.js b/src/dm/dm/delivbill/transfer/init/index.js
new file mode 100644
index 0000000..d29cd4c
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/index.js
@@ -0,0 +1,19 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import init21Template from './init21Template';
+import init4331Template from './init4331Template';
+import init4802Template from './init4802Template';
+import initAllTemplate from './initAllTemplate';
+import initm4cTemplate from './initm4cTemplate';
+import initm4iTemplate from './initm4iTemplate';
+import initm4yTemplate from './initm4yTemplate';
+export {
+ init21Template,
+ init4331Template,
+ init4802Template,
+ initm4cTemplate,
+ initm4iTemplate,
+ initm4yTemplate,
+ initAllTemplate
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/init21Template.js b/src/dm/dm/delivbill/transfer/init/init21Template.js
new file mode 100644
index 0000000..67cf187
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/init21Template.js
@@ -0,0 +1,104 @@
+/*5FLcO4FObN3SvNkiFdgMfC1wWdyvOgnRU9LEcPEINi4=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcode21,
+ pagecode: TRANSFER.transferPagecode21 //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageId21 = data.template.pageid;
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtype: '21',
+ pkField: FIELD.pk_order
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.ref21Head,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let linkConfig21 = {
+ moduleId: TRANSFER.mainchild21,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig21);
+
+ meta[TRANSFER.ref21Query].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '21'
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_recvstordoc') {
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.ref21Query, 'pk_order_b.pk_arrvstoorg');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+}
+
+/*5FLcO4FObN3SvNkiFdgMfC1wWdyvOgnRU9LEcPEINi4=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/init4331Template.js b/src/dm/dm/delivbill/transfer/init/init4331Template.js
new file mode 100644
index 0000000..1f569cf
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/init4331Template.js
@@ -0,0 +1,163 @@
+/*/Lu9X/5D2UBXvyGFXrrVCjWaMBi+cvpCeGczmJ37n6M=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { ajax } from 'nc-lightapp-front';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcode4331,
+ pagecode: TRANSFER.transferPagecode4331 //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageId4331 = data.template.pageid;
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtypeField: FIELD.ctrantypeid,
+ pkField: FIELD.cdeliveryid
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.ref4331Head,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let linkConfig4331 = {
+ moduleId: TRANSFER.mainchild4331,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig4331);
+
+ meta[TRANSFER.ref4331Query].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.pk_org) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '4331'
+ };
+ };
+ } else if (item.attrcode == 'cdeliverybid.vbatchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+
+ meta[TRANSFER.ref4331Head].items.map((item) => {
+ if (item.attrcode === 'ctrancustid') {
+ // 承运商超超链接
+ item.render = (text, record, index) => {
+ if (record && record.ctrancustid) {
+ return (
+ {
+ let ctrancustid = record.ctrancustid.value;
+ // 拼装json
+ let data = {
+ pks: [ ctrancustid ]
+ };
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ debugger;
+ if (res.success) {
+ let data = res.data;
+ var datum = data[ctrancustid];
+ if (datum == true) {
+ //说明是集团节点
+ // console.log("集团")
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ctrancustid,
+ flag: 'super_outer'
+ });
+ } else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ctrancustid,
+ flag: 'super_outer'
+ });
+ }
+ }
+ }
+ });
+ }}
+ >
+ {record.ctrancustid && record.ctrancustid.display}
+
+ );
+ }
+ };
+ return item;
+ }
+ });
+}
+
+/*/Lu9X/5D2UBXvyGFXrrVCjWaMBi+cvpCeGczmJ37n6M=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/init4802Template.js b/src/dm/dm/delivbill/transfer/init/init4802Template.js
new file mode 100644
index 0000000..14676e6
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/init4802Template.js
@@ -0,0 +1,126 @@
+/*T0b7b0XDnCBw4WNm3d/hajiVfHh68dCsJXgPC3UbjiQ=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcode4802,
+ pagecode: TRANSFER.transferPagecode4802 //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageId4802 = data.template.pageid;
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtype: '4802',
+ pkField: FIELD.capplybill_hid
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.ref4802Head,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let linkConfig4802 = {
+ moduleId: TRANSFER.mainchild4802,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig4802);
+
+ meta[TRANSFER.ref4802Query].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.pk_org) {
+ //质检中心
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '4802'
+ };
+ };
+ } else if (item.attrcode == 'bodyfk.vbatchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else if (item.attrcode == 'bodyfk.csendstoreid') {
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.ref4802Query, 'bodyfk.csendstoreorgid');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'bodyfk.creceivestoreid') {
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.ref4802Query, 'bodyfk.creceivestoreorgid');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+}
+
+/*T0b7b0XDnCBw4WNm3d/hajiVfHh68dCsJXgPC3UbjiQ=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/initAllTemplate.js b/src/dm/dm/delivbill/transfer/init/initAllTemplate.js
new file mode 100644
index 0000000..c5e5e21
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/initAllTemplate.js
@@ -0,0 +1,189 @@
+/*sNCPoGBR/r2IMB3zBzxxVCTMop6JH/Hz0VZBH33qxys=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { ajax } from 'nc-lightapp-front';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcodeAll,
+ pagecode: TRANSFER.transferAllCode //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ let errorMessage = props.getUrlParam('errorMessage');
+ if (errorMessage != null) {
+ showErrorInfo(errorMessage);
+ props.setUrlParam({ errorMessage: null });
+ }
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageIdAll = data.template.pageid;
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtypeField: FIELD.ctrantypeid,
+ pkField: FIELD.cdelivbill_hid
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.refAllHead,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let linkConfigAll = {
+ moduleId: TRANSFER.mainchild,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfigAll);
+
+ meta[TRANSFER.refAllQuery].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.pk_org) {
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '4331,4C,4Y,4I,4802,21'
+ };
+ };
+ } else if (item.attrcode == 'delivbill.vbatchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else if (item.attrcode == 'delivbill.csendstoreid') {
+ //发货仓库
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.refAllQuery, 'delivbill.csendstoreorgid');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'delivbill.creceivestoreid') {
+ //收货仓库
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.refAllQuery, 'delivbill.creceivestoreorgid');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+
+ meta[TRANSFER.refAllHead].items.map((item) => {
+ if (item.attrcode === 'ccarrierid') {
+ // 承运商超超链接
+ item.render = (text, record, index) => {
+ if (record && record.ccarrierid) {
+ return (
+ {
+ let ccarrierid = record.ccarrierid.value;
+ // 拼装json
+ let data = {
+ pks: [ ccarrierid ]
+ };
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ if (res.success) {
+ let data = res.data;
+ var datum = data[ccarrierid];
+ if (datum == true) {
+ //说明是集团节点
+ // console.log("集团")
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ccarrierid,
+ flag: 'super_outer'
+ });
+ } else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ccarrierid,
+ flag: 'super_outer'
+ });
+ }
+ }
+ }
+ });
+ }}
+ >
+ {record.ccarrierid && record.ccarrierid.display}
+
+ );
+ }
+ };
+ return item;
+ }
+ });
+}
+
+/*sNCPoGBR/r2IMB3zBzxxVCTMop6JH/Hz0VZBH33qxys=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/initm4cTemplate.js b/src/dm/dm/delivbill/transfer/init/initm4cTemplate.js
new file mode 100644
index 0000000..6c788a1
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/initm4cTemplate.js
@@ -0,0 +1,192 @@
+/*aeje6/AXrEGT/y9M/2O4Wf0wJPzHg+uUrp/CXm7tyiU=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+import { ajax } from 'nc-lightapp-front';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcodem4c,
+ pagecode: TRANSFER.transferPagecodem4c //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageId4c = data.template.pageid;
+ //处理超链接
+ //拉单销售出库单据号的超链接
+ meta[TRANSFER.refm4cHead].items.map((item) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: '4C',
+ billcodefield: 'vbillcode',
+ pkfield: 'cgeneralhid'
+ });
+ });
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtype: '4C',
+ pkField: FIELD.cgeneralhid
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.refm4cHead,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let linkConfig4c = {
+ moduleId: TRANSFER.mainchildm4c,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig4c);
+
+ meta[TRANSFER.refm4cQuery].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.trafficorgoid) {
+ //质检中心
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '4C'
+ };
+ };
+ } else if (item.attrcode == 'cgeneralbid.vbatchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else if (item.attrcode == 'cwarehouseid') {
+ //仓库
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.refm4cQuery, 'pk_org');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'cgeneralbid.cffileid') {
+ //配置码
+ item.queryCondition = () => {
+ let cmaterialoid = props.search.getSearchValByField(TRANSFER.refm4cQuery, 'cgeneralbid.cmaterialoid');
+ if (cmaterialoid && cmaterialoid.value.firstvalue) {
+ return { cmaterialid: cmaterialoid.value.firstvalue };
+ }
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+ meta[TRANSFER.refm4cHead].items.map((item) => {
+ if (item.attrcode === 'ctrancustid') {
+ // 承运商超超链接
+ item.render = (text, record, index) => {
+ if (record && record.ctrancustid) {
+ return (
+ {
+ let ctrancustid = record.ctrancustid.value;
+ // 拼装json
+ let data = {
+ pks: [ ctrancustid ]
+ };
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ debugger;
+ if (res.success) {
+ let data = res.data;
+ var datum = data[ctrancustid];
+ if (datum == true) {
+ //说明是集团节点
+ // console.log("集团")
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ctrancustid,
+ flag: 'super_outer'
+ });
+ } else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ctrancustid,
+ flag: 'super_outer'
+ });
+ }
+ }
+ }
+ });
+ }}
+ >
+ {record.ctrancustid && record.ctrancustid.display}
+
+ );
+ }
+ };
+ return item;
+ }
+ });
+}
+
+/*aeje6/AXrEGT/y9M/2O4Wf0wJPzHg+uUrp/CXm7tyiU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/initm4iTemplate.js b/src/dm/dm/delivbill/transfer/init/initm4iTemplate.js
new file mode 100644
index 0000000..343ccc6
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/initm4iTemplate.js
@@ -0,0 +1,133 @@
+/*hAF5NtqgZcG8GEvxAcBTXe6CyIK8vcG8xb+Wa17n+tE=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcodem4i,
+ pagecode: TRANSFER.transferPagecodem4i //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageId4i = data.template.pageid;
+ //处理超链接
+ //拉单调拨出库单据号的超链接
+ meta[TRANSFER.refm4iHead].items.map((item) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: '4I',
+ billcodefield: 'vbillcode',
+ pkfield: 'cgeneralhid'
+ });
+ });
+ meta[TRANSFER.mainchildm4i].items.map((item) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: '4I',
+ billcodefield: 'vbillcode',
+ pkfield: 'cgeneralhid'
+ });
+ });
+ // meta[TRANSFER.refm4iHead].items.map((item, key) => {
+ // outboundToDMTransSkipToSrcBillUtil.call(this, props, item, {
+ // billtypefield: 'billtype'
+ // });
+ // });
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtype: '4I',
+ pkField: FIELD.cgeneralhid
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.refm4iHead,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+
+ meta[TRANSFER.refm4iQuery].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.trafficorgoid) {
+ //质检中心
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '4I'
+ };
+ };
+ } else if (item.attrcode == 'cgeneralbid.vbatchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else if (item.attrcode == 'cwarehouseid') {
+ //仓库
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.refm4iQuery, 'pk_org');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+}
+
+/*hAF5NtqgZcG8GEvxAcBTXe6CyIK8vcG8xb+Wa17n+tE=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/init/initm4yTemplate.js b/src/dm/dm/delivbill/transfer/init/initm4yTemplate.js
new file mode 100644
index 0000000..afe0e83
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/init/initm4yTemplate.js
@@ -0,0 +1,196 @@
+/*tMqhZ1yCrg4AD3uwTETo/WXt42nuvaBQRnH67kJSyPU=*/
+import { TRANSFER, FIELD, CACHEDATA } from '../../constance';
+import transtypeUtils from '../../../../../scmpub/scmpub/pub/tool/transtypeUtils';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+import { ajax } from 'nc-lightapp-front';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: TRANSFER.appcodem4y,
+ pagecode: TRANSFER.transferPagecodem4y //卡片页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.context) {
+ transtypeUtils.init.call(this, data.context);
+ }
+ if (getDefData(CACHEDATA.transferDataSource, 'pk_order_transter')) {
+ this.setState({
+ pk_org: {
+ value: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').value,
+ display: getDefData(CACHEDATA.transferDataSource, 'pk_order_transter').display
+ }
+ });
+ } else if (!this.state.pk_org.value && data.context.pk_org) {
+ this.setState({
+ pk_org: {
+ value: data.context.pk_org,
+ display: data.context.org_Name
+ }
+ });
+ }
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, this.props, meta);
+ props.meta.addMeta(meta);
+ this.pageId4y = data.template.pageid;
+ //处理超链接
+ //拉单调拨出库单据号的超链接
+ meta[TRANSFER.refm4yHead].items.map((item) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: '4Y',
+ billcodefield: 'vbillcode',
+ pkfield: 'cgeneralhid'
+ });
+ });
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+// 对默认方法中,功能扩充
+function modifier(props, meta) {
+ // 来源单据号设置超链接
+ let linkmap = new Map([
+ [
+ FIELD.vbillcode,
+ {
+ billtype: '4Y',
+ pkField: FIELD.cgeneralhid
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: TRANSFER.refm4yHead,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let linkConfig4y = {
+ moduleId: TRANSFER.mainchildm4y,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig4y);
+
+ meta[TRANSFER.refm4yQuery].items.map((item) => {
+ //默认都显示组织切换组件
+ item.isShowUnit = false;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == FIELD.trafficorgoid) {
+ //质检中心
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '4Y'
+ };
+ };
+ } else if (item.attrcode == 'cgeneralbid.vbatchcode') {
+ item.isShowUnit = true;
+ item.checkStrictly = false;
+ item.itemtype = 'refer';
+ item.isMultiSelectedEnabled = true;
+ item.refcode = 'scmpub/refer/batchcode/BatchCodeGridRefer/index.js';
+ } else if (item.attrcode == 'cwarehouseid') {
+ //仓库
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.refm4yQuery, 'pk_org');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else if (item.attrcode == 'cotherwhid') {
+ //调入仓库
+ item.queryCondition = () => {
+ let orgid = props.search.getSearchValByField(TRANSFER.refm4yQuery, 'cothercalbodyoid');
+ return {
+ pk_org:
+ orgid && orgid.value
+ ? orgid.value.firstvalue.includes(',') ? null : orgid.value.firstvalue
+ : null
+ };
+ };
+ } else {
+ item.queryCondition = () => {
+ let pk_org = this.state.pk_org.value || null;
+ return {
+ pk_org: pk_org
+ };
+ };
+ }
+ });
+
+ meta[TRANSFER.refm4yHead].items.map((item) => {
+ if (item.attrcode === 'ctrancustid') {
+ // 承运商超超链接
+ item.render = (text, record, index) => {
+ if (record && record.ctrancustid) {
+ return (
+ {
+ let ctrancustid = record.ctrancustid.value;
+ // 拼装json
+ let data = {
+ pks: [ ctrancustid ]
+ };
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ debugger;
+ if (res.success) {
+ let data = res.data;
+ var datum = data[ctrancustid];
+ if (datum == true) {
+ //说明是集团节点
+ // console.log("集团")
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ctrancustid,
+ flag: 'super_outer'
+ });
+ } else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ctrancustid,
+ flag: 'super_outer'
+ });
+ }
+ }
+ }
+ });
+ }}
+ >
+ {record.ctrancustid && record.ctrancustid.display}
+
+ );
+ }
+ };
+ return item;
+ }
+ });
+}
+
+/*tMqhZ1yCrg4AD3uwTETo/WXt42nuvaBQRnH67kJSyPU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/transfer.js b/src/dm/dm/delivbill/transfer/transfer.js
new file mode 100644
index 0000000..219f223
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/transfer.js
@@ -0,0 +1,574 @@
+/*9fVryZpOEN7xBl7TkuRgC6qOfg1VjWGuk0BpwDH7yas=*/
+/*
+ * @Author: qishy
+ * @PageInfo:运输单拉单查询
+ * @Date: 2018-06-11 10:11:58
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-03-30 17:36:12
+ */
+import React, { Component } from 'react';
+import { createPage, base } from 'nc-lightapp-front';
+import {
+ init21Template,
+ init4331Template,
+ init4802Template,
+ initm4cTemplate,
+ initm4iTemplate,
+ initm4yTemplate,
+ initAllTemplate
+} from './init/index';
+import {
+ search21BtnClick,
+ search4331BtnClick,
+ search4802BtnClick,
+ searchm4cBtnClick,
+ searchm4iBtnClick,
+ searchm4yBtnClick,
+ searchAllBtnClick
+} from './btnClicks';
+import {
+ searchAfterEvent,
+ searchAfter21Event,
+ searchAfter4331Event,
+ searchAfter4802Event,
+ searchAfter4CEvent,
+ searchAfter4IEvent,
+ searchAfter4YEvent
+} from './afterEvent';
+import SplitModel from '../splitModel';
+import { btnClick, transferBtnClick } from './btnClicks';
+import { TRANSFER, PK, URL, CACHEDATA, FIELD, LIST } from '../constance';
+import { setDefData } from '../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { renderCompleteEvent } from '../../../../scmpub/scmpub/pub/queryarea/queryAreaInit';
+import orgAfterEvent from './afterEvent/orgAfterEvent';
+import { getLangByResId, initLang } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import MainOrgRef from 'scmpub/scmpub/components/MainOrgRef';
+const { NCDiv, NCBackBtn } = base;
+export default class MultiTransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(
+ TRANSFER.refAllQuery,
+ TRANSFER.ref4331Query,
+ TRANSFER.refm4cQuery,
+ TRANSFER.refm4yQuery,
+ TRANSFER.refm4iQuery,
+ TRANSFER.ref4802Query,
+ TRANSFER.ref21Query
+ );
+ this.state = {
+ dlgShowFlag: false, //分单规则弹框开关
+ pk_org: {},
+ toggleViewStatus: false
+ };
+ this.isRefAddLine = props.isRefAddLine; // 是否参照增行
+ this.refAddData = props.refAddData || null; //参照增行数据
+ this.pageIdAll = null; //pageid
+ this.pageId4331 = null; //pageid
+ this.pageId4c = null; //pageid
+ this.pageId4i = null; //pageid
+ this.pageId4y = null; //pageid
+ this.pageId4802 = null; //pageid
+ this.pageId21 = null; //pageid
+ this.curheadTableId = 0; //当前面板id
+ this.splitCondition = null; //分单规则缓存
+ initLang(this, [ '4014delivbill' ], 'dm', initAllTemplate.bind(this, this.props));
+ }
+
+ //分单规则弹框关闭钩子函数
+ hideModel = () => {
+ this.setState({ dlgShowFlag: false });
+ };
+
+ //分单规则确定钩子函数
+ defineDlg = (data) => {
+ this.setState({ dlgShowFlag: false });
+ this.splitCondition = data;
+ };
+
+ CompleteEvent = (searchId) => {
+ let searchArray = [ TRANSFER.refm4cQuery, TRANSFER.refm4yQuery, TRANSFER.refm4iQuery ];
+ let orgField = FIELD.pk_org;
+ if (searchArray.includes(searchId)) {
+ orgField = FIELD.trafficorgoid;
+ } else if (searchId == TRANSFER.ref21Query) {
+ orgField = 'pk_order_b.pk_flowstockorg';
+ }
+ if (this.isRefAddLine) {
+ this.setState({
+ pk_org: this.refAddData.pk_org
+ });
+ this.props.search.setSearchValByField(searchId, orgField, this.refAddData.pk_org);
+ this.props.search.setDisabledByField(searchId, orgField, true);
+ } else {
+ this.props.search.setSearchValByField(searchId, orgField, this.state.pk_org);
+ }
+ switch (searchId) {
+ case TRANSFER.refAllQuery:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfterEvent);
+ renderCompleteEvent.call(this, searchId, 'delivbill.csendstoreorgid', searchAfterEvent);
+ renderCompleteEvent.call(this, searchId, 'delivbill.creceivestoreorgid', searchAfterEvent);
+ break;
+ case TRANSFER.ref4331Query:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfter4331Event);
+ break;
+ case TRANSFER.refm4cQuery:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfter4CEvent);
+ renderCompleteEvent.call(this, searchId, FIELD.pk_org, searchAfter4CEvent);
+ break;
+ case TRANSFER.refm4yQuery:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfter4YEvent);
+ renderCompleteEvent.call(this, searchId, FIELD.pk_org, searchAfter4YEvent);
+ renderCompleteEvent.call(this, searchId, 'cothercalbodyoid', searchAfter4YEvent);
+ break;
+ case TRANSFER.refm4iQuery:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfter4IEvent);
+ renderCompleteEvent.call(this, searchId, FIELD.pk_org, searchAfter4IEvent);
+ break;
+ case TRANSFER.ref4802Query:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfter4802Event);
+ renderCompleteEvent.call(this, searchId, 'bodyfk.csendstoreorgid', searchAfter4802Event);
+ renderCompleteEvent.call(this, searchId, 'bodyfk.creceivestoreorgid', searchAfter4802Event);
+ break;
+ case TRANSFER.ref21Query:
+ renderCompleteEvent.call(this, searchId, orgField, searchAfter21Event);
+ renderCompleteEvent.call(this, searchId, 'pk_order_b.pk_arrvstoorg', searchAfter21Event);
+ break;
+ default:
+ break;
+ }
+ };
+
+ /**
+ * 主组织编辑事件
+ * @param {*} event
+ */
+ mainOrgOnchange = (event) => {
+ let pk_org = {
+ display: event.refname,
+ value: event.refpk
+ };
+ setDefData(CACHEDATA.transferDataSource, 'pk_order_transter', pk_org);
+ this.setState({
+ pk_org: {
+ display: event.refname,
+ value: event.refpk
+ }
+ });
+ orgAfterEvent.call(this, {
+ display: event.refname,
+ value: event.refpk
+ });
+ };
+
+ render() {
+ const { transferTable, search, button, meta, BillHeadInfo } = this.props;
+ const { createButtonApp } = button;
+ const { NCCreateSearch } = search;
+ const { createMultiTransferTable, changeViewType } = transferTable;
+ const { createBillHeadInfo } = BillHeadInfo;
+ const { NCToggleViewBtn } = base;
+ const META = meta.getMeta();
+ let selectedShow = transferTable.getSelectedListDisplay('all');
+
+ return (
+
+
+
+ {this.isRefAddLine ? (
+ ''
+ ) : (
+ {
+ this.props.pushTo(URL.listUrl, { pagecode: LIST.pagecode });
+ }}
+ />
+ )}
+
+ {createBillHeadInfo({
+ title: getLangByResId(this, '4014DELIVBILL-000089') /* 国际化处理: 参照上游生单*/,
+ initShowBackBtn: false
+ })}
+ {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ }}
+ />
+
+
+ {createButtonApp({
+ area: TRANSFER.list_head,
+ onButtonClick: btnClick.bind(this)
+ })}
+ {
+ let meta = this.props.meta.getMeta();
+ if (!meta[TRANSFER.ref4331Head] && this.curheadTableId == 1) {
+ init4331Template.call(this, this.props); //加载主子拉平模板
+ }
+ if (!meta[TRANSFER.refm4cHead] && this.curheadTableId == 2) {
+ initm4cTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ if (!meta[TRANSFER.refm4yHead] && this.curheadTableId == 3) {
+ initm4yTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ if (!meta[TRANSFER.refm4iHead] && this.curheadTableId == 4) {
+ initm4iTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ if (!meta[TRANSFER.ref4802Head] && this.curheadTableId == 5) {
+ init4802Template.call(this, this.props); //加载主子拉平模板
+ }
+ if (!meta[TRANSFER.ref21Head] && this.curheadTableId == 6) {
+ init21Template.call(this, this.props); //加载主子拉平模板
+ }
+ if (!meta[TRANSFER.refAllHead] && this.curheadTableId == 0) {
+ initAllTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType();
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+
+
+ {/* 创建多来源转单 */}
+ {createMultiTransferTable(
+ {
+ onTabClick: (key) => {
+ //点击页签的钩子函数
+ switch (key) {
+ case '1':
+ //发货单
+ this.curheadTableId = 1;
+ if (!META[TRANSFER.ref4331Head]) {
+ init4331Template.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ case '2':
+ //销售出库
+ this.curheadTableId = 2;
+ if (!META[TRANSFER.refm4cHead]) {
+ initm4cTemplate.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ case '3':
+ //调拨出库
+ this.curheadTableId = 3;
+ if (!META[TRANSFER.refm4yHead]) {
+ initm4yTemplate.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ case '4':
+ //其它出库
+ this.curheadTableId = 4;
+ if (!META[TRANSFER.refm4iHead]) {
+ initm4iTemplate.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ case '5':
+ //运输申请
+ this.curheadTableId = 5;
+ if (!META[TRANSFER.ref4802Head]) {
+ init4802Template.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ case '6':
+ //采购订单
+ this.curheadTableId = 6;
+ if (!META[TRANSFER.ref21Head]) {
+ init21Template.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ default:
+ this.curheadTableId = 0;
+ if (!META[TRANSFER.refAllHead]) {
+ initAllTemplate.call(this, this.props);
+ } else {
+ orgAfterEvent.call(this);
+ }
+ break;
+ }
+ },
+ showAll: true, //是否显示全部页签,不显示全部页签时不需要设置 默认为false
+ //==========以下参数必须设置showAll为true时才生效==========
+ allHeadId: TRANSFER.refAllHead, //全部页签的主表id
+ allBodyId: TRANSFER.refAllBody, //全部页签的子表id
+ allFullTableId: TRANSFER.mainchild,
+ headPkIds: [
+ PK.HEAD4331PK,
+ PK.HEADM4CPK,
+ PK.HEADM4YPK,
+ PK.HEADM4IPK,
+ PK.HEAD4802PK,
+ PK.HEAD21PK
+ ],
+ bodyPkIds: [
+ PK.BODY4331PK,
+ PK.BODYM4CPK,
+ PK.BODYM4YPK,
+ PK.BODYM4IPK,
+ PK.BODY4802PK,
+ PK.BODY21PK
+ ],
+ showChangeViewBtn: true,
+ containerSelector: '#transferDemo', //容器的选择器 必须唯一,用于设置底部已选区域宽度
+ transferBtnText: this.isRefAddLine
+ ? getLangByResId(this, '4014DELIVBILL-000001')
+ : getLangByResId(this, '4014DELIVBILL-000091'), //转单按钮显示文字/* 国际化处理: 确定,生成运输单*/
+ dataSource: CACHEDATA.transferDataSource,
+ //点击已选列表的钩子函数
+ onSelectedBtnClick: () => {},
+
+ //点击转单按钮钩子函数
+ onTransferBtnClick: () => {
+ if (this.isRefAddLine) {
+ this.props.transferTable.whenTransferTableUnmount.call(
+ this,
+ CACHEDATA.transferDataSource
+ );
+ this.props.refAddLineDefine.call(
+ this,
+ this.state.pk_org.value,
+ this.curheadTableId,
+ this.splitCondition
+ );
+ } else {
+ transferBtnClick.call(this);
+ }
+ },
+
+ //点击切换视图钩子函数
+ onChangeViewClick: () => {
+ if (!META[TRANSFER.mainchild]) {
+ initAllTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.refAllHead);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+ [
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000092') /* 国际化处理: 全部*/,
+ searchAreaCode: TRANSFER.refAllQuery,
+ headTableId: TRANSFER.refAllHead, //表格组件id
+ bodyTableId: TRANSFER.refAllBody, //子表模板id
+ fullTableId: TRANSFER.mainchild, //主子拉平模板id
+ showChangeViewBtn: true,
+ searchArea: () => {
+ return NCCreateSearch(TRANSFER.refAllQuery, {
+ clickSearchBtn: () => {
+ searchAllBtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfterEvent.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.refAllQuery),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.refAllQuery),
+ fieldid: 'delivbilltransfer_all'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchild]) {
+ initAllTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType('refAllHead');
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000083') /* 国际化处理: 发货单*/,
+ searchAreaCode: TRANSFER.ref4331Query,
+ headTableId: TRANSFER.ref4331Head, //表格组件id
+ bodyTableId: TRANSFER.ref4331Body, //子表模板id
+ fullTableId: TRANSFER.mainchild4331, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(TRANSFER.ref4331Query, {
+ clickSearchBtn: () => {
+ search4331BtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfter4331Event.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.ref4331Query),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.ref4331Query),
+ fieldid: 'delivbilltransfer_4331'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchild4331]) {
+ init4331Template.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.ref4331Head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000093') /* 国际化处理: 库存销售出库单*/,
+ headTableId: TRANSFER.refm4cHead, //表格组件id
+ bodyTableId: TRANSFER.refm4cBody, //子表模板id
+ fullTableId: TRANSFER.mainchildm4c, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(TRANSFER.refm4cQuery, {
+ clickSearchBtn: () => {
+ searchm4cBtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfter4CEvent.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.refm4cQuery),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.refm4cQuery),
+ fieldid: 'delivbilltransfer_4c'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchildm4c]) {
+ initm4cTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.refm4cHead);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000094') /* 国际化处理: 库存调拨出库单*/,
+ headTableId: TRANSFER.refm4yHead, //表格组件id
+ bodyTableId: TRANSFER.refm4yBody, //子表模板id
+ fullTableId: TRANSFER.mainchildm4y, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(TRANSFER.refm4yQuery, {
+ clickSearchBtn: () => {
+ searchm4yBtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfter4YEvent.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.refm4yQuery),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.refm4yQuery),
+ fieldid: 'delivbilltransfer_4y'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchildm4y]) {
+ initm4yTemplate.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.refm4yHead);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000095') /* 国际化处理: 其它出库单*/,
+ headTableId: TRANSFER.refm4iHead, //表格组件id
+ bodyTableId: TRANSFER.refm4iBody, //子表模板id
+ fullTableId: TRANSFER.mainchildm4i, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(TRANSFER.refm4iQuery, {
+ clickSearchBtn: () => {
+ searchm4iBtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfter4IEvent.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.refm4iQuery),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.refm4iQuery),
+ fieldid: 'delivbilltransfer_4i'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchildm4i]) {
+ initm4iTemplate.call(this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.refm4iHead);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000084') /* 国际化处理: 运输申请单*/,
+ searchAreaCode: TRANSFER.ref4802Query,
+ headTableId: TRANSFER.ref4802Head, //表格组件id
+ bodyTableId: TRANSFER.ref4802Body, //子表模板id
+ fullTableId: TRANSFER.mainchild4802, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(TRANSFER.ref4802Query, {
+ clickSearchBtn: () => {
+ search4802BtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfter4802Event.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.ref4802Query),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.ref4802Query),
+ fieldid: 'delivbilltransfer_4802'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchild4802]) {
+ init4802Template.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.ref4331Head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ },
+ {
+ tabName: getLangByResId(this, '4014DELIVBILL-000082') /* 国际化处理: 采购订单*/,
+ headTableId: TRANSFER.ref21Head, //表格组件id
+ bodyTableId: TRANSFER.ref21Body, //子表模板id
+ fullTableId: TRANSFER.mainchild21, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(TRANSFER.ref21Query, {
+ clickSearchBtn: () => {
+ search21BtnClick.call(this, this.props);
+ },
+ onAfterEvent: searchAfter21Event.bind(this),
+ renderCompleteEvent: this.CompleteEvent.bind(this, TRANSFER.ref21Query),
+ statusChangeEvent: this.CompleteEvent.bind(this, TRANSFER.ref21Query),
+ fieldid: 'delivbilltransfer_21'
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!META[TRANSFER.mainchild21]) {
+ init21Template.call(this, this.props); //加载主子拉平模板
+ }
+ changeViewType(TRANSFER.ref21Head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ }
+ ]
+ )}
+
+
+
+
+ );
+ }
+}
+MultiTransferTable = createPage({})(MultiTransferTable);
+
+/*9fVryZpOEN7xBl7TkuRgC6qOfg1VjWGuk0BpwDH7yas=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/util/delivNumUtils.js b/src/dm/dm/delivbill/transfer/util/delivNumUtils.js
new file mode 100644
index 0000000..6a2738d
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/util/delivNumUtils.js
@@ -0,0 +1,27 @@
+/*flBYBpEiLqD3SqK8yYPPA1TKBuv9KMNc93VMmd861DU=*/
+import { FIELD } from '../../constance';
+
+/**
+ * 处理可运输主数量工具类
+ * @param {*} data
+ * @param {*} nnumSrc
+ * @param {*} ntotaltrannumSrc
+ */
+export default function(bodyCode, data, nnumSrc, ntotaltrannumSrc) {
+ data.forEach((bill) => {
+ //增加计算可运输主数量
+ bill.body[bodyCode].rows.map((body) => {
+ let record = body.values;
+ let showNum = 0;
+ let nnum = record[nnumSrc]; //总数量
+ let ntotaltrannum = record[ntotaltrannumSrc]; //累计运输主数量
+ if (nnum && nnum.value != 0 && ntotaltrannum) {
+ showNum = parseFloat(nnum.value) - (ntotaltrannum.value ? parseFloat(ntotaltrannum.value) : 0);
+ }
+ body.values[FIELD.delivnum] = { value: showNum, scale: record.nnum.scale };
+ });
+ });
+ return data;
+}
+
+/*flBYBpEiLqD3SqK8yYPPA1TKBuv9KMNc93VMmd861DU=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/util/multiCorpRefUtil.js b/src/dm/dm/delivbill/transfer/util/multiCorpRefUtil.js
new file mode 100644
index 0000000..2b49ab0
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/util/multiCorpRefUtil.js
@@ -0,0 +1,16 @@
+/*t2lRFWEYSer04ulP85lyrrcrPGK7vaqerlIDuLfSBks=*/
+export default function(searchId, fields) {
+ let meta = this.props.meta.getMeta();
+ meta[searchId].items.map((item) => {
+ if (fields.includes(item.attrcode)) {
+ if (this.state.pk_org.value) {
+ item.isShowUnit = false;
+ } else {
+ item.isShowUnit = true;
+ }
+ }
+ });
+ this.props.meta.setMeta(meta);
+}
+
+/*t2lRFWEYSer04ulP85lyrrcrPGK7vaqerlIDuLfSBks=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/transfer/util/translateData.js b/src/dm/dm/delivbill/transfer/util/translateData.js
new file mode 100644
index 0000000..5a915a9
--- /dev/null
+++ b/src/dm/dm/delivbill/transfer/util/translateData.js
@@ -0,0 +1,101 @@
+/*nCFzbA2KIKM3FmjcFQABRv9p6ksVRO1qb9Mzm4TyDQ4=*/
+/*
+ * 数据转换
+ * @Author: liangzhyf
+ * @Date: 2020-03-05 18:50:15
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2021-04-19 16:04:19
+ */
+export default function(datas, srchead, srcbody, head, body, itemmap, extatt, bodyPkField) {
+ let destdatas = [];
+ for (let data of datas) {
+ let destdata = {};
+ // 转换表头
+ let headrows = data.head[srchead].rows; //获取后台返回数据的表头数据
+
+ let headmap = itemmap[head]; //获取map表头数据
+
+ let destHeadData = translate(head, headrows, headmap, extatt); //数据转换
+
+ //转换表头中的表体字段
+ if (bodyPkField) {
+ let bodyrows = data.body[srcbody].rows;
+ destHeadData = translateHeadBody(bodyrows, destHeadData, headmap, bodyPkField, head);
+ }
+
+ destdata.head = destHeadData;
+ // 转换表体
+ let bodyrows = data.body[srcbody].rows;
+ let bodydmap = itemmap[body];
+ let destBodyData = translate(body, bodyrows, bodydmap);
+
+ destdata.body = destBodyData;
+ destdatas.push(destdata); //数据汇总
+ }
+
+ return destdatas;
+}
+/**
+ * 同步表体中的数据到表头中,比如发货单的订单客户在表体,但是全部页签和查看已选中这个字段放在了表头
+ * 这个时候需要判断如果表体中所有行该字段的数据一致,则放到表头,否则不放
+ * 这里用表头映射关系取到在表体中的该字段的key(比如cdeliverybid.cordercustid.name),
+ * 在表体中的key是cordercustid.name,
+ * bodyPkField这个字段放在这是为了识别需要同步的字段。
+ * @param {*} bodyrows 表体数据
+ * @param {*} destHeadData 要同步的目标表头数据
+ * @param {*} headmap 表头的字段映射
+ * @param {*} bodyPkField 表体主键(在表头字段映射中,需要同步的表体字段上加上表体主键前缀)
+ * @param {*} head 表头的code
+ */
+export function translateHeadBody(bodyrows, destHeadData, headmap, bodyPkField, head) {
+ let bodyField;
+ let value;
+ a: for (let key in headmap) {
+ if (headmap[key].split('.').indexOf(bodyPkField) == 0) {
+ //存在表体中字段
+ bodyField = headmap[key].substring(bodyPkField.length + 1);
+ b: for (let i in bodyrows) {
+ if (!value) {
+ //如果为空,第一条设值
+ value = bodyrows[i].values[bodyField];
+ } else {
+ //第二条及以后,如果和value数据不一致,则立即停止方法
+ if (bodyrows[i].values[bodyField].value != value.value) {
+ continue a;
+ }
+ }
+ }
+ destHeadData[head].rows[0].values[key] = value;
+ }
+ }
+ return destHeadData;
+}
+export function translate(tab, tabrows, tabmap, extatt) {
+ let rows = [];
+ for (let row of tabrows) {
+ let values = {};
+ for (let destkey of Object.keys(tabmap)) {
+ //遍历map的键(全部页签模板的字段)
+ let srcValue = {};
+ if (tabmap[destkey]) {
+ srcValue = row.values[tabmap[destkey]]; //根据map值获取数据(其他页签模板的字段)
+ }
+ if (!(tabmap[destkey] && tabmap[destkey] == '#')) {
+ values[destkey] = srcValue; //将后台返回的数据转换
+ }
+ }
+ //将自定义数据放进全部页签
+ if (extatt) {
+ for (let extkey of Object.keys(extatt)) {
+ values[extkey] = extatt[extkey];
+ }
+ }
+ rows.push({ values: values }); //数据汇总
+ }
+ let desttabdata = {
+ [tab]: { rows: rows }
+ };
+ return desttabdata;
+}
+
+/*nCFzbA2KIKM3FmjcFQABRv9p6ksVRO1qb9Mzm4TyDQ4=*/
\ No newline at end of file
diff --git a/src/dm/dm/delivbill/utils/transferUtil.js b/src/dm/dm/delivbill/utils/transferUtil.js
new file mode 100644
index 0000000..dfd4364
--- /dev/null
+++ b/src/dm/dm/delivbill/utils/transferUtil.js
@@ -0,0 +1,149 @@
+/*rmwocwHsSRdatbKABbbgJ4WL4YJuApbR4HyPAQ9Onlc=*/
+import { URL, FIELD, TRANSFER, PK } from '../constance';
+/**
+ * 获取url
+ * @param {*} tabId
+ */
+function getURL(tabId) {
+ let url;
+ switch (tabId) {
+ case 0:
+ //全部
+ url = URL.transferAllURL;
+ break;
+ case 1:
+ //发货单
+ url = URL.transfer4331URL;
+ break;
+ case 2:
+ //销售出库
+ url = URL.transfer4CURL;
+ break;
+ case 3:
+ //调拨出库
+ url = URL.transfer4YURL;
+ break;
+ case 4:
+ //其它出库
+ url = URL.transfer4IURL;
+ break;
+ case 5:
+ //运输申请单
+ url = URL.transfer4802URL;
+ break;
+ case 6:
+ //采购订单
+ url = URL.transfer21URL;
+ break;
+ default:
+ break;
+ }
+ return url;
+}
+
+/**
+ * 获取主键编码
+ * @param {*} tabId
+ */
+function getPK(tabId) {
+ let pk;
+ switch (tabId) {
+ case 1:
+ //发货单
+ pk = FIELD.cdeliveryid;
+ break;
+ case 2:
+ pk = FIELD.cgeneralhid;
+ break;
+ case 3:
+ pk = FIELD.cgeneralhid;
+ break;
+ case 4:
+ //销售出库、调拨出库、其它出库
+ pk = FIELD.cgeneralhid;
+ break;
+ case 5:
+ //运输申请单
+ pk = FIELD.capplybill_hid;
+ break;
+ case 6:
+ //采购订单
+ pk = FIELD.pk_order;
+ break;
+ default:
+ break;
+ }
+ return pk;
+}
+
+/**
+ * 获取子表主键编码
+ * @param {*} tabID
+ */
+function getBPK(tabID) {
+ let pk;
+ switch (tabID) {
+ case 1:
+ //发货单
+ pk = PK.BODY4331PK;
+ break;
+ case 2:
+ pk = PK.BODYM4CPK;
+ break;
+ case 3:
+ pk = PK.BODYM4YPK;
+ break;
+ case 4:
+ //销售出库、调拨出库、其它出库
+ pk = PK.BODYM4IPK;
+ break;
+ case 5:
+ //运输申请单
+ pk = PK.BODY4802PK;
+ break;
+ case 6:
+ //采购订单
+ pk = PK.BODY21PK;
+ break;
+ default:
+ break;
+ }
+ return pk;
+}
+/**
+ * 获取主键编码
+ * @param {*} tabId
+ */
+function getAreaId(tabId) {
+ let areaId;
+ switch (tabId) {
+ case 0:
+ areaId = TRANSFER.refAllQuery;
+ break;
+ case 1:
+ areaId = TRANSFER.ref4331Query;
+ break;
+ case 2:
+ areaId = TRANSFER.refm4cQuery;
+ break;
+ case 3:
+ areaId = TRANSFER.refm4yQuery;
+ break;
+ case 4:
+ areaId = TRANSFER.refm4iQuery;
+ break;
+ case 5:
+ areaId = TRANSFER.ref4802Query;
+ break;
+ case 6:
+ areaId = TRANSFER.ref21Query;
+ break;
+ default:
+ break;
+ }
+ return areaId;
+}
+
+export { getPK, getURL, getAreaId, getBPK };
+
+/*rmwocwHsSRdatbKABbbgJ4WL4YJuApbR4HyPAQ9Onlc=*/
\ No newline at end of file
diff --git a/src/dm/dm/pub/btnClicks/fileBatchDownLoadBtnClick.js b/src/dm/dm/pub/btnClicks/fileBatchDownLoadBtnClick.js
new file mode 100644
index 0000000..800c9f7
--- /dev/null
+++ b/src/dm/dm/pub/btnClicks/fileBatchDownLoadBtnClick.js
@@ -0,0 +1,41 @@
+/*QcLSJcLBIfi1P6u/kyYYQm1/ZimxEJq99gE17fMMmbVvwZRPywLNhokJ+vfJUIwD*/
+/*
+ * @Author: yangtaow
+ * @PageInfo: 附件批量下载
+ * @Date: 2023-06-13 10:17:12
+ * @Last Modified by: yangtaow
+ * @Last Modified time: 2023-06-20 16:25:48
+ */
+import { showWarningInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import attachments from 'uap/common/components/getAttachmentInfo';
+
+export default function(props, tableArea, billType, hIdType) {
+ const { batchDownloadAttachments } = attachments;
+ let checkdatas = props.table.getCheckedRows(tableArea);
+ if (!checkdatas || Object.keys(checkdatas).length == 0) {
+ showWarningInfo('', getLangByResId(this, '4008PUB-000017')); /* 国际化处理: 请先选择数据*/
+ return;
+ }
+ let params = [];
+ checkdatas.forEach((element) => {
+ let billId;
+ if (hIdType == 'cdelivbill_hid') {
+ //运输单
+ billId = element.data.values.cdelivbill_hid.value;
+ }
+ let param = {
+ billId: billId,
+ folderName: element.data.values.vbillcode.value
+ };
+ params.push(param);
+ });
+ let datetime = new Date().Format('yyyyMMddhhmmss');
+ let additionParams = {
+ // zip包名称:单据类型(多语)+客户端时间(运输单20230619110324)
+ zipFileName: billType + datetime
+ };
+ batchDownloadAttachments(params, additionParams);
+}
+
+/*QcLSJcLBIfi1P6u/kyYYQm1/ZimxEJq99gE17fMMmbVvwZRPywLNhokJ+vfJUIwD*/
\ No newline at end of file
diff --git a/src/dm/dm/pub/utils/operateDataUtil.js b/src/dm/dm/pub/utils/operateDataUtil.js
new file mode 100644
index 0000000..2318b71
--- /dev/null
+++ b/src/dm/dm/pub/utils/operateDataUtil.js
@@ -0,0 +1,92 @@
+/*dkS8HPbHFEj6+q7wB+z0g5bPIJZGPS4tOr6InZQVNhU=*/
+/*
+ * @Author: chawix
+ * @PageInfo: 数据组装工具类
+ * @Date: 2020-11-09 13:37:06
+ * @Last Modified by: zhangflr
+ * @Last Modified time: 2020-11-10 16:27:51
+ */
+
+/**
+ * 获取卡片页表头表体pk-ts关系
+ * @param {*} props
+ * @param {*} params
+ */
+function getPkTsDataIncludeBodyInCard(props, params) {
+ let headCode = params.headCode ? params.headCode : 'head'; // 表头区域编码
+ let bodyCode = params.bodyCode ? params.bodyCode : 'body'; // 表体区域编码
+ let hidField = params.hidField ? params.hidField : 'cbillid'; // 表头主键名称
+ let bidField = params.bidField ? params.bidField : 'cbill_bid'; // 表体主键名称
+ let tsField = 'ts';
+
+ // 组件子表数据
+ let allRows = props.cardTable.getAllRows(bodyCode);
+ let bodys = [];
+ allRows.forEach((row) => {
+ bodys.push({
+ bid: row.values[bidField].value,
+ ts: row.values[tsField].value
+ });
+ });
+
+ let data = {
+ infos: [
+ {
+ id: props.form.getFormItemsValue(headCode, hidField).value,
+ ts: props.form.getFormItemsValue(headCode, tsField).value,
+ bodys: bodys
+ }
+ ]
+ };
+
+ return data;
+}
+
+/**
+ * 获取一主多子卡片页表头表体pk-ts关系
+ * @param {*} props
+ * @param {*} params
+ */
+function getPkTsDataIncludeBodyInExtCard(props, params) {
+ let headCode = params.headCode ? params.headCode : 'head'; // 表头区域编码
+ let bodyCode1 = params.bodyCode1 ? params.bodyCode1 : 'body'; // 表体区域编码
+ let bodyCode2 = params.bodyCode2 ? params.bodyCode2 : 'pack'; // 表体区域编码
+ let hidField = params.hidField ? params.hidField : 'cbillid'; // 表头主键名称
+ let bidField1 = params.bidField1 ? params.bidField1 : 'cbill_bid'; // 表体主键名称
+ let bidField2 = params.bidField2 ? params.bidField2 : 'cbill_bid2'; // 表体主键名称2
+ let tsField = 'ts';
+
+ // 组件子表1数据
+ let bodys = [];
+ let Rows1 = props.cardTable.getAllRows(bodyCode1);
+ Rows1.forEach((row) => {
+ bodys.push({
+ bid: row.values[bidField1].value,
+ ts: row.values[tsField].value
+ });
+ });
+ // 组件子表2数据
+ let Rows2 = props.cardTable.getAllRows(bodyCode2);
+ Rows2.forEach((row) => {
+ bodys.push({
+ bid: row.values[bidField2].value,
+ ts: row.values[tsField].value
+ });
+ });
+
+ let data = {
+ infos: [
+ {
+ id: props.form.getFormItemsValue(headCode, hidField).value,
+ ts: props.form.getFormItemsValue(headCode, tsField).value,
+ bodys: bodys
+ }
+ ]
+ };
+
+ return data;
+}
+
+export { getPkTsDataIncludeBodyInCard, getPkTsDataIncludeBodyInExtCard };
+
+/*dkS8HPbHFEj6+q7wB+z0g5bPIJZGPS4tOr6InZQVNhU=*/
\ No newline at end of file
diff --git a/src/dm/dm/pub/utils/vbillcodeBeforeEvent.js b/src/dm/dm/pub/utils/vbillcodeBeforeEvent.js
new file mode 100644
index 0000000..3840ce7
--- /dev/null
+++ b/src/dm/dm/pub/utils/vbillcodeBeforeEvent.js
@@ -0,0 +1,12 @@
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
+import vbillcodeBeforeEvent from '../../../../scmpub/scmpub/pub/pubrule/vbillcodeBeforeEvent';
+export default async function(constance) {
+ let flag = await vbillcodeBeforeEvent.call(this, this.props, constance);
+ if (!flag) {
+ // 针对返回的处理有bug:依然可以瞬间输入单据号,在此主动控制编辑性
+ this.props.form.setFormItemsDisabled(constance.formareaid, { [constance.key]: true });
+ }
+ return flag;
+}
+
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
\ No newline at end of file
diff --git a/src/dm/public/lang/standard/simpchn/4014apinvoice.json b/src/dm/public/lang/standard/simpchn/4014apinvoice.json
new file mode 100644
index 0000000..93090aa
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014apinvoice.json
@@ -0,0 +1,59 @@
+{
+ "4014APINVOICE-000000": "应付运费发票",
+ "4014APINVOICE-000001": "操作",
+ "4014APINVOICE-000002": "取消",
+ "4014APINVOICE-000003": "数据已经被删除,请返回列表界面!",
+ "4014APINVOICE-000004": "确认修改",
+ "4014APINVOICE-000005": "是否修改组织,这样会清空您录入的信息!",
+ "4014APINVOICE-000006": "保存成功!",
+ "4014APINVOICE-000007": "提交成功!",
+ "4014APINVOICE-000008": "刷新成功!",
+ "4014APINVOICE-000009": "删除成功!",
+ "4014APINVOICE-000010": "当前单据未保存,您确认离开此页面?",
+ "4014APINVOICE-000011": "应付运费发票维护",
+ "4014APINVOICE-000012": "请选择要删除的行!",
+ "4014APINVOICE-000013": "收回成功!",
+ "4014APINVOICE-000014": "整单关闭成功!",
+ "4014APINVOICE-000015": "确定要删除吗?",
+ "4014APINVOICE-000016": "删除",
+ "4014APINVOICE-000017": "删除失败",
+ "4014APINVOICE-000018": "请选择要操作的单据!",
+ "4014APINVOICE-000019": "指派",
+ "4014APINVOICE-000020": "整单打开成功!",
+ "4014APINVOICE-000021": "提交",
+ "4014APINVOICE-000022": "收回",
+ "4014APINVOICE-000023": "整单关闭",
+ "4014APINVOICE-000024": "整单打开",
+ "4014APINVOICE-000025": "费用冲抵情况",
+ "4014APINVOICE-000026": "请选择要打印的单据!",
+ "4014APINVOICE-000027": "生成应付运费发票",
+ "4014APINVOICE-000028": "累计核销金额",
+ "4014APINVOICE-000029": "选择运输单",
+ "4014APINVOICE-000030": "运费金额",
+ "4014APINVOICE-000031": "有未保存的单据,确定要返回吗?",
+ "4014APINVOICE-000032": "提示",
+ "4014APINVOICE-000033": "表体不能为空",
+ "4014APINVOICE-000034": "返回",
+ "4014APINVOICE-000035": "退出转单",
+ "4014APINVOICE-000036": "有未保存的单据,确定要退出转单吗?",
+ "4014APINVOICE-000037": "保存提交成功",
+ "4014APINVOICE-000038": "选择结算单",
+ "4014APINVOICE-000039": "累计核销金额",
+ "4014APINVOICE-000040": "本次核销金额",
+ "4014APINVOICE-000041": "财务组织、承运商、开票方字段不能为空",
+ "4014APINVOICE-000042": "参照增行",
+ "4014APINVOICE-000043": "所选的单据没有结算单",
+ "4014APINVOICE-000044": "提示,请选中行数据",
+ "4014APINVOICE-000045": "来源于结算单的发票不能手工核销!",
+ "4014APINVOICE-000046": "表体核销余额为0或空,禁止输入",
+ "4014APINVOICE-000047": "本次核销金额输入不正确,禁止输入",
+ "4014APINVOICE-000048": "表头核销余额为0或空,禁止输入",
+ "4014APINVOICE-000049": "表头核销余额为0或空,禁止选择",
+ "4014APINVOICE-000050": "选择表体的运输单后才能联查!",
+ "4014APINVOICE-000051": "请选择需要核销的数据",
+ "4014APINVOICE-000052": "请检查发票和运输单的本次核销金额",
+ "4014APINVOICE-000053": "核销成功",
+ "4014APINVOICE-000054": "应付运费发票核销",
+ "4014APINVOICE-000055": "删除表体行提示",
+ "4014APINVOICE-000056": "删除行存在核销明细,确定删除?"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014apsettle.json b/src/dm/public/lang/standard/simpchn/4014apsettle.json
new file mode 100644
index 0000000..6e99468
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014apsettle.json
@@ -0,0 +1,21 @@
+{
+ "4014APSETTLE-000000": "应付运费明细",
+ "4014APSETTLE-000001": "操作",
+ "4014APSETTLE-000002": "确定删除?",
+ "4014APSETTLE-000003": "注意",
+ "4014APSETTLE-000004": "确定要删除所选数据吗?",
+ "4014APSETTLE-000005": "请选中数据",
+ "4014APSETTLE-000006": "保存成功",
+ "4014APSETTLE-000007": "处理成功",
+ "4014APSETTLE-000008": "审批成功",
+ "4014APSETTLE-000009": "取消审批成功",
+ "4014APSETTLE-000010": "请选中数据",
+ "4014APSETTLE-000011": "所选的单据未生成发票",
+ "4014APSETTLE-000012": "请选择要操作的单据!",
+ "4014APSETTLE-000013": "删除成功!",
+ "4014APSETTLE-000014": "当前单据未保存,您确认离开此页面?",
+ "4014APSETTLE-000015": "自由",
+ "4014APSETTLE-000016": "审批通过",
+ "4014APSETTLE-000017": "指派",
+ "4014APSETTLE-000018": "应付运费明细"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014arinvoice.json b/src/dm/public/lang/standard/simpchn/4014arinvoice.json
new file mode 100644
index 0000000..aa45990
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014arinvoice.json
@@ -0,0 +1,40 @@
+{
+ "4014ARINVOICE-000000": "应收运费发票",
+ "4014ARINVOICE-000001": "操作",
+ "4014ARINVOICE-000002": "取消",
+ "4014ARINVOICE-000003": "数据已经被删除,请返回列表界面!",
+ "4014ARINVOICE-000004": "确认修改",
+ "4014ARINVOICE-000005": "是否修改组织,这样会清空您录入的信息!",
+ "4014ARINVOICE-000006": "保存成功!",
+ "4014ARINVOICE-000007": "提交成功!",
+ "4014ARINVOICE-000008": "刷新成功!",
+ "4014ARINVOICE-000009": "删除成功!",
+ "4014ARINVOICE-000010": "当前单据未保存,您确认离开此页面?",
+ "4014ARINVOICE-000011": "应收运费发票维护",
+ "4014ARINVOICE-000012": "请选择要删除的行!",
+ "4014ARINVOICE-000013": "收回成功!",
+ "4014ARINVOICE-000014": "整单关闭成功!",
+ "4014ARINVOICE-000015": "确定要删除吗?",
+ "4014ARINVOICE-000016": "删除",
+ "4014ARINVOICE-000017": "删除失败",
+ "4014ARINVOICE-000018": "请选择要操作的单据!",
+ "4014ARINVOICE-000019": "指派",
+ "4014ARINVOICE-000020": "整单打开成功!",
+ "4014ARINVOICE-000021": "提交",
+ "4014ARINVOICE-000022": "收回",
+ "4014ARINVOICE-000023": "整单关闭",
+ "4014ARINVOICE-000024": "整单打开",
+ "4014ARINVOICE-000025": "费用冲抵情况",
+ "4014ARINVOICE-000026": "请选择要打印的单据!",
+ "4014ARINVOICE-000027": "生成应收运费发票",
+ "4014ARINVOICE-000028": "数量",
+ "4014ARINVOICE-000029": "选择运输单",
+ "4014ARINVOICE-000030": "价税合计",
+ "4014ARINVOICE-000031": "有未保存的单据,确定要返回吗?",
+ "4014ARINVOICE-000032": "提示",
+ "4014ARINVOICE-000033": "表体不能为空",
+ "4014ARINVOICE-000034": "返回",
+ "4014ARINVOICE-000035": "退出转单",
+ "4014ARINVOICE-000036": "有未保存的单据,确定要退出转单吗?",
+ "4014ARINVOICE-000037": "保存提交成功"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014busiparams.json b/src/dm/public/lang/standard/simpchn/4014busiparams.json
new file mode 100644
index 0000000..91153bc
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014busiparams.json
@@ -0,0 +1,69 @@
+{
+ "4014BUSIPARAMS--000001": "代垫运费",
+ "4014BUSIPARAMS-000000": "运输路线",
+ "4014BUSIPARAMS-000001": "运输方式",
+ "4014BUSIPARAMS-000002": "承运商",
+ "4014BUSIPARAMS-000003": "发货库存组织",
+ "4014BUSIPARAMS-000004": "发货仓库",
+ "4014BUSIPARAMS-000005": "发货地区",
+ "4014BUSIPARAMS-000006": "发货地点",
+ "4014BUSIPARAMS-000007": "发货供应商",
+ "4014BUSIPARAMS-000008": "收货库存组织",
+ "4014BUSIPARAMS-000009": "收货仓库",
+ "4014BUSIPARAMS-000010": "收货地区",
+ "4014BUSIPARAMS-000011": "收货地点",
+ "4014BUSIPARAMS-000012": "收货客户",
+ "4014BUSIPARAMS-000013": "车型",
+ "4014BUSIPARAMS-000014": "车辆",
+ "4014BUSIPARAMS-000015": "司机",
+ "4014BUSIPARAMS-000016": "押运员",
+ "4014BUSIPARAMS-000017": "物料基本分类",
+ "4014BUSIPARAMS-000018": "物料",
+ "4014BUSIPARAMS-000019": "来源单据类型",
+ "4014BUSIPARAMS-000020": "来源单据号",
+ "4014BUSIPARAMS-000021": "业务类型",
+ "4014BUSIPARAMS-000022": "结算财务组织",
+ "4014BUSIPARAMS-000023": "委托单位",
+ "4014BUSIPARAMS-000024": "运费承担单位",
+ "4014BUSIPARAMS-000025": " 发货仓库",
+ "4014BUSIPARAMS-000026": "客户",
+ "4014BUSIPARAMS-000027": "自定义项1",
+ "4014BUSIPARAMS-000028": "自定义项2",
+ "4014BUSIPARAMS-000029": "自定义项3",
+ "4014BUSIPARAMS-000030": "自定义项4",
+ "4014BUSIPARAMS-000031": "自定义项5",
+ "4014BUSIPARAMS-000032": "自定义项6",
+ "4014BUSIPARAMS-000033": "自定义项7",
+ "4014BUSIPARAMS-000034": "自定义项8",
+ "4014BUSIPARAMS-000035": "自定义项9",
+ "4014BUSIPARAMS-000036": "自定义项10",
+ "4014BUSIPARAMS-000037": "自定义项11",
+ "4014BUSIPARAMS-000038": "自定义项12",
+ "4014BUSIPARAMS-000039": "自定义项13",
+ "4014BUSIPARAMS-000040": "自定义项14",
+ "4014BUSIPARAMS-000041": "自定义项15",
+ "4014BUSIPARAMS-000042": "自定义项16",
+ "4014BUSIPARAMS-000043": "自定义项17",
+ "4014BUSIPARAMS-000044": "自定义项18",
+ "4014BUSIPARAMS-000045": "自定义项19",
+ "4014BUSIPARAMS-000046": "自定义项20",
+ "4014BUSIPARAMS-000047": "代垫运费为必选分单条件。",
+ "4014BUSIPARAMS-000048": "运输路线为必选分单条件。",
+ "4014BUSIPARAMS-000049": "结算财务组织为必须条件!",
+ "4014BUSIPARAMS-000050": "待选",
+ "4014BUSIPARAMS-000051": "已选",
+ "4014BUSIPARAMS-000052": "动态参数设置",
+ "4014BUSIPARAMS-000053": "确定",
+ "4014BUSIPARAMS-000054": "取消",
+ "4014BUSIPARAMS-000055": "主数量",
+ "4014BUSIPARAMS-000056": "数量",
+ "4014BUSIPARAMS-000057": "重量",
+ "4014BUSIPARAMS-000058": "体积",
+ "4014BUSIPARAMS-000059": "物料版本",
+ "4014BUSIPARAMS-000060": " 客户",
+ "4014BUSIPARAMS-000061": "汇总规则",
+ "4014BUSIPARAMS-000062": "求和",
+ "4014BUSIPARAMS-000063": "求平均值",
+ "4014BUSIPARAMS-000064": "求加权平均",
+ "4014BUSIPARAMS-000065": "金额"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014calculate.json b/src/dm/public/lang/standard/simpchn/4014calculate.json
new file mode 100644
index 0000000..78a4f99
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014calculate.json
@@ -0,0 +1,7 @@
+{
+ "4014CALCULATE-000000": "请选择需要计算的数据",
+ "4014CALCULATE-000001": "应付运费计算成功",
+ "4014CALCULATE-000002": "查询成功",
+ "4014CALCULATE-000003": "操作",
+ "4014CALCULATE-000004": "请先查询数据!"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014delivapply.json b/src/dm/public/lang/standard/simpchn/4014delivapply.json
new file mode 100644
index 0000000..8703df2
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014delivapply.json
@@ -0,0 +1,35 @@
+{
+ "4014DELIVAPPLY-000000": "操作",
+ "4014DELIVAPPLY-000001": "指派",
+ "4014DELIVAPPLY-000002": "确认删除?",
+ "4014DELIVAPPLY-000003": "请选择物流组织!",
+ "4014DELIVAPPLY-000004": "删除成功!",
+ "4014DELIVAPPLY-000005": "提交成功!",
+ "4014DELIVAPPLY-000006": "请选择要删除的行!",
+ "4014DELIVAPPLY-000007": "数据已经被删除,请返回列表界面",
+ "4014DELIVAPPLY-000008": "刷新成功!",
+ "4014DELIVAPPLY-000009": "自由",
+ "4014DELIVAPPLY-000010": "表体行不能为空!",
+ "4014DELIVAPPLY-000011": "保存成功!",
+ "4014DELIVAPPLY-000012": "收回成功!",
+ "4014DELIVAPPLY-000013": "错误",
+ "4014DELIVAPPLY-000014": "请选择要操作的申请单!",
+ "4014DELIVAPPLY-000015": "请选择要提交的申请单!",
+ "4014DELIVAPPLY-000016": "提示",
+ "4014DELIVAPPLY-000017": "请选择要删除的申请单!",
+ "4014DELIVAPPLY-000018": "确认删除?",
+ "4014DELIVAPPLY-000019": "表体不能为空",
+ "4014DELIVAPPLY-000020": "保存提交成功",
+ "4014DELIVAPPLY-000021": "错误,请选中数据!",
+ "4014DELIVAPPLY-000022": "删除",
+ "4014DELIVAPPLY-000023": "请选择要输出的申请单!",
+ "4014DELIVAPPLY-000024": "请选择要打印的申请单!",
+ "4014DELIVAPPLY-000025": "请选择申请单!",
+ "4014DELIVAPPLY-000026": "收回",
+ "4014DELIVAPPLY-000027": "运输状态",
+ "4014DELIVAPPLY-000028": "请先选择发货供应商。",
+ "4014DELIVAPPLY-000029": "请先选择收货客户。",
+ "4014DELIVAPPLY-000030": "确定要删除吗?",
+ "4014DELIVAPPLY-000031": "请选择要删除的数据",
+ "4014DELIVAPPLY-000032": "请首先录入发货库存组织信息!"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014delivbill.json b/src/dm/public/lang/standard/simpchn/4014delivbill.json
new file mode 100644
index 0000000..204c700
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014delivbill.json
@@ -0,0 +1,102 @@
+{
+ "4014DELIVBILL--000001": "确认修改",
+ "4014DELIVBILL-000000": "是否修改组织,这样会清空您录入的信息?",
+ "4014DELIVBILL-000001": "确定",
+ "4014DELIVBILL-000002": "取消",
+ "4014DELIVBILL-000003": "请先选择物料。",
+ "4014DELIVBILL-000004": "请先选择单位。",
+ "4014DELIVBILL-000005": "请首先录入发货库存组织信息!",
+ "4014DELIVBILL-000006": "请先选择发货供应商。",
+ "4014DELIVBILL-000007": "请先选择收货客户。",
+ "4014DELIVBILL-000008": "刷新成功",
+ "4014DELIVBILL-000009": "签收录入成功",
+ "4014DELIVBILL-000010": "当前单据已被删除,请返回列表",
+ "4014DELIVBILL-000011": "请选中一行记录",
+ "4014DELIVBILL-000012": "当前运输任务为空!",
+ "4014DELIVBILL-000013": "表体",
+ "4014DELIVBILL-000014": "表体第{0}行[数量]不能为空",
+ "4014DELIVBILL-000015": "包装信息",
+ "4014DELIVBILL-000016": "包装信息表体第{0}行[包装分类]不能为空!",
+ "4014DELIVBILL-000017": "包装信息表体第{0}行[包装件数]不能为空!",
+ "4014DELIVBILL-000018": "生成包装信息覆盖提示",
+ "4014DELIVBILL-000019": "已经存在包装信息,生成包装信息将覆盖原包装信息,是否继续?",
+ "4014DELIVBILL-000020": "删除成功!",
+ "4014DELIVBILL-000021": "审批",
+ "4014DELIVBILL-000022": "取消审批",
+ "4014DELIVBILL-000023": "应付运费计算",
+ "4014DELIVBILL-000024": "取消运费计算",
+ "4014DELIVBILL-000025": "成功",
+ "4014DELIVBILL-000026": "没有选中待粘贴收发货信息的行",
+ "4014DELIVBILL-000027": "没有待拷贝收发货信息的行,不允许做粘贴操作",
+ "4014DELIVBILL-000028": "提示",
+ "4014DELIVBILL-000029": "覆盖原有数据或作为新行插入?",
+ "4014DELIVBILL-000030": "覆盖",
+ "4014DELIVBILL-000031": "插入",
+ "4014DELIVBILL-000032": "请选择物流组织!",
+ "4014DELIVBILL-000033": "请选择运输类型!",
+ "4014DELIVBILL-000034": "单据号为{0},行号为{1}的行,",
+ "4014DELIVBILL-000036": "由于数据项[运输类型]不匹配,不能参照;",
+ "4014DELIVBILL-000037": "由于数据项[代垫费用]不匹配,不能参照;",
+ "4014DELIVBILL-000038": "匹配失败提示",
+ "4014DELIVBILL-000039": "表体没有数据, 不能保存!",
+ "4014DELIVBILL-000040": "装车成功!",
+ "4014DELIVBILL-000041": "保存成功!",
+ "4014DELIVBILL-000042": "没有可签收的行",
+ "4014DELIVBILL-000043": "当前单据未保存,您确认离开此页面?",
+ "4014DELIVBILL-000044": "必须录入收货地点",
+ "4014DELIVBILL-000045": "必须录入收货客户",
+ "4014DELIVBILL-000046": "操作",
+ "4014DELIVBILL-000047": "自由",
+ "4014DELIVBILL-000048": "审批通过",
+ "4014DELIVBILL-000049": "运输单签收条件",
+ "4014DELIVBILL-000050": "签收录入",
+ "4014DELIVBILL-000051": "运输单参照生单",
+ "4014DELIVBILL-000052": "合并显示",
+ "4014DELIVBILL-000053": "请先查询数据",
+ "4014DELIVBILL-000054": "查询成功!共{0}条",
+ "4014DELIVBILL-000055": " 共处理{0}条数据,成功{1}条,失败{2}条!",
+ "4014DELIVBILL-000057": "请选择要删除的数据",
+ "4014DELIVBILL-000058": "请选择要操作的单据!",
+ "4014DELIVBILL-000059": "请选择要{0}的数据",
+ "4014DELIVBILL-000061": "成功条数:",
+ "4014DELIVBILL-000062": "失败条数:",
+ "4014DELIVBILL-000064": "\n第{0}条数据操作失败。失败原因:",
+ "4014DELIVBILL-000065": "出错啦",
+ "4014DELIVBILL-000066": " 共处理{0}条数据,失败{1}条!",
+ "4014DELIVBILL-000067": "失败",
+ "4014DELIVBILL-000068": "成功",
+ "4014DELIVBILL-000069": "处理成功{0}条!",
+ "4014DELIVBILL-000070": "请选中行数据",
+ "4014DELIVBILL-000071": "错误,请选择要打印的单据",
+ "4014DELIVBILL-000072": "确定要删除吗?",
+ "4014DELIVBILL-000073": "必须录入签收地点",
+ "4014DELIVBILL-000074": "必须录入签收客户",
+ "4014DELIVBILL-000075": "必须录入签收人",
+ "4014DELIVBILL-000076": "必须录入签收日期",
+ "4014DELIVBILL-000077": "签收失败",
+ "4014DELIVBILL-000078": "没有满足签收条件的行",
+ "4014DELIVBILL-000079": "必须要有分单条件",
+ "4014DELIVBILL-000080": "请选择组织",
+ "4014DELIVBILL-000081": "请选择物流组织",
+ "4014DELIVBILL-000082": "采购订单",
+ "4014DELIVBILL-000083": "发货单",
+ "4014DELIVBILL-000084": "运输申请单",
+ "4014DELIVBILL-000085": "销售出库",
+ "4014DELIVBILL-000086": "调拨出库",
+ "4014DELIVBILL-000087": "其它出库",
+ "4014DELIVBILL-000088": "请首先选择组织信息",
+ "4014DELIVBILL-000089": "参照上游生单",
+ "4014DELIVBILL-000090": "物流组织",
+ "4014DELIVBILL-000091": "生成运输单",
+ "4014DELIVBILL-000092": "全部",
+ "4014DELIVBILL-000093": "库存销售出库单",
+ "4014DELIVBILL-000094": "库存调拨出库单",
+ "4014DELIVBILL-000095": "其它出库单",
+ "4014DELIVBILL-000096": "分单规则设置",
+ "4014DELIVBILL-000097": "签收数量必须大于0!",
+ "4014DELIVBILL-000098": "签收主数量必须大于0!",
+ "4014DELIVBILL-000099": "上游单据已被收回或删除,请重新查询!",
+ "4014DELIVBILL-000100": "已保存单据不支持暂存!",
+ "4014DELIVBILL-000101": "单据存在来源,不能支持暂存!",
+ "4014DELIVBILL-000102": "运输单"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014feepolicy.json b/src/dm/public/lang/standard/simpchn/4014feepolicy.json
new file mode 100644
index 0000000..3a4a4a5
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014feepolicy.json
@@ -0,0 +1,40 @@
+{
+ "4014FEEPOLICY--000001": "批量分级到不能小于或等于批量分级从",
+ "4014FEEPOLICY-000000": "批量分级至少要有两行数据",
+ "4014FEEPOLICY-000001": "批量分级从不能为空,非最后一行到不能为空",
+ "4014FEEPOLICY-000002": "价格项的显示名称不能重复!",
+ "4014FEEPOLICY-000003": "价格项显示名称为空时该价格项禁止启用!",
+ "4014FEEPOLICY-000004": "确认修改",
+ "4014FEEPOLICY-000005": "是否修改组织,这样会清空您录入的信息?",
+ "4014FEEPOLICY-000006": "确定",
+ "4014FEEPOLICY-000007": " 取消",
+ "4014FEEPOLICY-000008": "价格项已被费用项公式引用禁止取消启用!",
+ "4014FEEPOLICY-000009": "价格项显示名称为空时该价格项禁止批量定价!",
+ "4014FEEPOLICY-000010": "该运费策略已经被应付运费价格表引用,不允许进行修改。",
+ "4014FEEPOLICY-000011": "费用项公式变量",
+ "4014FEEPOLICY-000012": "刷新成功!",
+ "4014FEEPOLICY-000013": "费用项页签的行数据不能为空!",
+ "4014FEEPOLICY-000014": "保存成功!",
+ "4014FEEPOLICY-000015": "批量依据公式变量",
+ "4014FEEPOLICY-000016": "当前单据未保存,您确认离开此页面",
+ "4014FEEPOLICY-000017": "价格项",
+ "4014FEEPOLICY-000018": "费用项",
+ "4014FEEPOLICY-000019": "元数据属性",
+ "4014FEEPOLICY-000020": "表和字段",
+ "4014FEEPOLICY-000021": "批量分级",
+ "4014FEEPOLICY-000022": "保存",
+ "4014FEEPOLICY-000023": "取消",
+ "4014FEEPOLICY-000024": "操作",
+ "4014FEEPOLICY-000025": "没有选中的行!",
+ "4014FEEPOLICY-000026": "确定要删除吗?",
+ "4014FEEPOLICY-000027": "项目",
+ "4014FEEPOLICY-000028": "内容",
+ "4014FEEPOLICY-000029": "如果",
+ "4014FEEPOLICY-000030": "否则",
+ "4014FEEPOLICY-000031": "则",
+ "4014FEEPOLICY-000032": "并且",
+ "4014FEEPOLICY-000033": "或者",
+ "4014FEEPOLICY-000034": "数字",
+ "4014FEEPOLICY-000035": "运算符",
+ "4014FEEPOLICY-000036": "逻辑"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014feetariff.json b/src/dm/public/lang/standard/simpchn/4014feetariff.json
new file mode 100644
index 0000000..2615b5d
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014feetariff.json
@@ -0,0 +1,16 @@
+{
+ "4014FEETARIFF--000001": "删除成功!",
+ "4014FEETARIFF-000000": "请先选择数据",
+ "4014FEETARIFF-000001": "刷新成功!",
+ "4014FEETARIFF-000002": "无表体行!",
+ "4014FEETARIFF-000003": "保存成功!",
+ "4014FEETARIFF-000004": "当前单据未保存,您确认离开此页面?",
+ "4014FEETARIFF-000005": "操作",
+ "4014FEETARIFF-000006": "费用项明细",
+ "4014FEETARIFF-000007": "请选中行数据",
+ "4014FEETARIFF-000008": "删除",
+ "4014FEETARIFF-000009": "确定要删除所选数据吗?",
+ "4014FEETARIFF-000010": "请先查询数据!",
+ "4014FEETARIFF-000011": "请选择要打印的单据!",
+ "4014FEETARIFF-000012": "确定要删除吗?"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014feetariffdef.json b/src/dm/public/lang/standard/simpchn/4014feetariffdef.json
new file mode 100644
index 0000000..24f13a9
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014feetariffdef.json
@@ -0,0 +1,12 @@
+{
+ "4014FEETARIFFDEF--000001": "取消",
+ "4014FEETARIFFDEF-000000": "确定要取消吗?",
+ "4014FEETARIFFDEF-000001": "请选择要删除的数据!",
+ "4014FEETARIFFDEF-000002": "该价格表定义不支持批量删除,请刷新重试!",
+ "4014FEETARIFFDEF-000003": "该运费价格表定义已经被应付运费价格表引用,不允许进行修改。",
+ "4014FEETARIFFDEF-000004": "当前单据未保存,您确认离开此页面?",
+ "4014FEETARIFFDEF-000005": "物流组织",
+ "4014FEETARIFFDEF-000006": "操作",
+ "4014FEETARIFFDEF-000007": "确定要删除吗?",
+ "4014FEETARIFFDEF-000008": "删除成功!"
+}
diff --git a/src/dm/public/lang/standard/simpchn/4014missionbill.json b/src/dm/public/lang/standard/simpchn/4014missionbill.json
new file mode 100644
index 0000000..0b44314
--- /dev/null
+++ b/src/dm/public/lang/standard/simpchn/4014missionbill.json
@@ -0,0 +1,22 @@
+{
+ "4014MISSIONBILL--000001": "确认修改",
+ "4014MISSIONBILL-000000": "是否清除发货组织,这样会清空您录入的信息?",
+ "4014MISSIONBILL-000001": "是否修改发货组织,这样会清空您录入的信息?",
+ "4014MISSIONBILL-000002": "删除成功",
+ "4014MISSIONBILL-000003": "表体数据为空,不允许保存。",
+ "4014MISSIONBILL-000004": "保存成功!",
+ "4014MISSIONBILL-000005": "当前单据未保存,您确认离开此页面?",
+ "4014MISSIONBILL-000006": "操作",
+ "4014MISSIONBILL-000007": "自由",
+ "4014MISSIONBILL-000008": "审批通过",
+ "4014MISSIONBILL-000009": "审批成功",
+ "4014MISSIONBILL-000010": " 请选择要操作的单据!",
+ "4014MISSIONBILL-000011": "请选择数据",
+ "4014MISSIONBILL-000012": "提交成功",
+ "4014MISSIONBILL-000013": "请先查询数据",
+ "4014MISSIONBILL-000014": "刷新成功",
+ "4014MISSIONBILL-000015": "查询成功!",
+ "4014MISSIONBILL-000016": "共{0}条",
+ "4014MISSIONBILL-000018": "取消审批成功",
+ "4014MISSIONBILL-000019": "确定要删除吗?"
+}
diff --git a/src/pu/pu/arrival/card/batchEvents/batchEvents.js b/src/pu/pu/arrival/card/batchEvents/batchEvents.js
new file mode 100644
index 0000000..d2573a6
--- /dev/null
+++ b/src/pu/pu/arrival/card/batchEvents/batchEvents.js
@@ -0,0 +1,330 @@
+/*8nIjANkSB9VpkQdmnMi+FFYPOshN9M6haQqD6R9IZgk=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购发票卡片批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-07 13:54:20
+ */
+import { ajax } from 'nc-lightapp-front';
+import { FIELD, BATCHITEM, PAGECODE, URL, AREA, FREEFIELD } from '../../constance';
+import {
+ createBodyAfterEventData4Batch,
+ processBillCardBodyEditResult4Batch
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { vfreeBeforeEvent } from '../../../pub/beforeevent';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { processExtBillFeeDetailsEditResult } from '../../../pub/utils/feeAfterUtil';
+
+export default async function batchEvents(obj) {
+ // console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ let querys = [];
+ let querysindex = 0;
+
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vbdef') && !attrcode.startsWith('vfree')) {
+ return;
+ }
+
+ //自定义项、备注以及表头主组织进行过滤的场景
+ if (attrcode.startsWith('vbdef') || attrcode === 'vmemob' || attrcode === 'cprojectid') {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ //每个字段单独的过滤条件,可单独处理
+ // queryValue[i].queryCondition = { pk_org: newValue[i].values.pk_purchaseorg.value };
+ }
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ queryCondition = { pk_org: pk_org };
+ isManyCondition = false;
+ } else if (FIELD.nastnum == attrcode || FIELD.nnum == attrcode) {
+ for (let i = 0; i < newValue.length; i++) {
+ if (newValue[i].values.naccumchecknum && newValue[i].values.naccumchecknum.value > 0) {
+ continue;
+ }
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.pk_receivestore || attrcode == 'nplanastnum' || attrcode == 'nplannum') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ // NCC-217965 到货单维护---拖拽收货仓库为其它仓库没有清空货位
+ if (attrcode == FIELD.pk_receivestore && changedrows.length > 1) {
+ if (
+ newValue[i].values.pk_receivestore &&
+ changedrows[i].oldvalue &&
+ newValue[i].values.pk_receivestore.value == changedrows[i].oldvalue.display
+ ) {
+ continue;
+ } else {
+ newValue[i].values.pk_rack.value = null;
+ newValue[i].values.pk_rack.display = null;
+ newValue[i].values.pk_rack._display_ = null;
+ }
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode.startsWith('vfree') || attrcode == 'cffileid') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ //辅助属性
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ let materialvid = newValue[i].values.pk_material.value;
+ let constance = {};
+ constance.key = attrcode;
+ constance.params = {
+ key: attrcode,
+ pk_org: pk_org,
+ materialvid: materialvid
+ };
+ let flag = await vfreeBeforeEvent(this.props, constance);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[queryValue.length - 1].queryCondition = marAsstUtils.getVfreeQueryCondition.call(
+ this,
+ this.props,
+ '400401200',
+ '400401200_card',
+ 'body',
+ attrcode,
+ newValue[i],
+ FREEFIELD
+ );
+ }
+ // let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ // queryCondition = { pk_org: pk_org };
+ isManyCondition = true;
+ } else if (attrcode == 'vbatchcode') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ //辅助属性
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ let materialvid = newValue[i].values.pk_material.value;
+ let constance = {};
+ constance.key = attrcode;
+ constance.params = {
+ key: attrcode,
+ pk_org: pk_org,
+ materialvid: materialvid,
+ cmaterialvid: materialvid
+ };
+ let flag = await vfreeBeforeEvent(this.props, constance);
+ if (!flag) {
+ continue;
+ }
+
+ if (flag) {
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ queryValue[queryValue.length - 1].queryCondition = {
+ pk_material: materialvid
+ };
+ // 封装参数调用库存接口查询批次号主键
+ querys[querysindex] = {
+ index: currentIndex + i,
+ cmaterialvid: newValue[i].values.pk_material.value,
+ vbatchcode: newValue[i].values.vbatchcode.value
+ };
+ querysindex = querysindex + 1;
+ }
+ }
+ ajax({
+ url: '/nccloud/ic/onhand/querybatchcode.do',
+ data: querys,
+ success: (res) => {
+ if (res.data === null) {
+ return;
+ }
+ let j = 0;
+ let k = 0;
+ for (let i = 0; i < newValue.length; i++) {
+ if (res.data.length == k) {
+ break;
+ }
+ // 处理返回数据需要根据当前行处理index
+ let index = currentIndex + i;
+ if (res.data[j] && res.data[j].index == currentIndex + i) {
+ if (res.data[j].flag == true) {
+ indexs[k] = i;
+ this.props.cardTable.setValByKeyAndIndex(AREA.body, currentIndex + i, 'vbatchcode', {
+ value: newValue[i].values.vbatchcode.value,
+ display: newValue[i].values.vbatchcode.value
+ });
+ this.props.cardTable.setValByKeyAndIndex(AREA.body, currentIndex + i, 'pk_batchcode', {
+ value: res.data[j].pk == 'null' ? '' : res.data[j].pk,
+ display: res.data[j].pk == 'null' ? '' : res.data[j].pk
+ });
+ j = j + 1;
+ k = k + 1;
+ } else {
+ this.props.cardTable.setValByKeyAndIndex(AREA.body, index, 'vbatchcode', {
+ value: newValue[i].values.vbatchcode.value,
+ display: newValue[i].values.vbatchcode.value
+ });
+ this.props.cardTable.setValByKeyAndIndex(AREA.body, index, 'pk_batchcode', {
+ value: res.data[j].pk == 'null' ? '' : res.data[j].pk,
+ display: res.data[j].pk == 'null' ? '' : res.data[j].pk
+ });
+ j = j + 1;
+ }
+ }
+ }
+ this.forceUpdate();
+ }
+ });
+
+ return;
+ } else if (attrcode == 'pk_rack') {
+ for (let i = 0; i < newValue.length; i++) {
+ let pk_receivestore = (newValue[i].values.pk_receivestore || {}).value;
+ if (!pk_receivestore) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ queryValue[queryValue.length - 1].queryCondition = {
+ pk_org: (newValue[i].values.pk_org || {}).value,
+ pk_store: (newValue[i].values.pk_receivestore || {}).value,
+ TreeRefActionExt: 'nccloud.web.pu.arrival.ref.StoragedocRefFilterUtils'
+ };
+ }
+ isManyCondition = true;
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ //执行业务的批量编辑后事件
+ // afterEvent(props, areaCode, attrcode, queryValue, changerows);
+ let data = createBodyAfterEventData4Batch(
+ props,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ areaCode,
+ attrcode,
+ changedrows,
+ indexs
+ );
+ ajax({
+ url: URL.afterBodyEdit,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ card_body: 'cardTable'
+ }
+ );
+ }
+ processBillCardBodyEditResult4Batch(props, AREA.body, res.data, indexs);
+ const ITEMFEEPRICE = [
+ 'pk_material',
+ 'castunitid',
+ 'cunitid',
+ 'nnum',
+ 'nastnum',
+ 'vchangerate',
+ 'cprojectid'
+ ];
+ // 复制粘贴物料或者数量时联动费用明细
+ if (ITEMFEEPRICE.includes(attrcode)) {
+ setFeeDetails.call(this, props, areaCode, attrcode, changedrows, indexs);
+ }
+ this.forceUpdate();
+ }
+ });
+ });
+}
+
+function setFeeDetails(props, areaCode, attrcode, changedrows, indexs) {
+ let value = props.cardTable.getRowsByIndexs(areaCode, indexs);
+ let bodyidsfee = [ AREA.body, AREA.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ areaCode,
+ attrcode,
+ value,
+ changedrows,
+ indexs,
+ null,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyidsfee,
+ null
+ );
+ ajax({
+ url: URL.cardBodyBatch,
+ data: aggvos,
+ async: false,
+ success: (res) => {
+ 0; // 处理费用明细数据
+ processExtBillFeeDetailsEditResult(props, AREA.card_fee_detail, res.data, FIELD.crowno);
+ }
+ });
+}
+
+/*8nIjANkSB9VpkQdmnMi+FFYPOshN9M6haQqD6R9IZgk=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/batchEvents/batchFeeDetailEvents.js b/src/pu/pu/arrival/card/batchEvents/batchFeeDetailEvents.js
new file mode 100644
index 0000000..bf62bc3
--- /dev/null
+++ b/src/pu/pu/arrival/card/batchEvents/batchFeeDetailEvents.js
@@ -0,0 +1,424 @@
+/*n2EPq+PeSrHZkBbUucpeRyoK4C3ib8M6nWr+dBxKi0k=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购发票卡片批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-30 14:10:50
+ */
+
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, AREA, FIELD, PAGECODE, RELATECTFIELDS } from '../../constance';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { processExtBillFeeDetailsEditResult, referFeeCT } from '../../../pub/utils/feeAfterUtil';
+import afterEvent from '../events/./feeDtailAfterEditHandler';
+import { canRateDateModify, canRateModify } from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default async function batchFeeDetailEvents(obj) {
+ // console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ let BATCHITEM = [
+ FIELD.cfeematerialvid,
+ FIELD.cfeesuppliervid,
+ FIELD.corigcurrencyid,
+ FIELD.ntaxrate,
+ FIELD.nqtorigtaxprice,
+ FIELD.nqtorigprice,
+ FIELD.cctid,
+ FIELD.norigtaxmny,
+ FIELD.ntax,
+ FIELD.nexchangerate,
+ FIELD.cratetype,
+ FIELD.dratedate,
+ FIELD.norigprice,
+ FIELD.norigtaxprice,
+ FIELD.nglobalexchgrate,
+ FIELD.ngroupexchgrate,
+ FIELD.ftaxtypeflag,
+ FIELD.csendcountryid,
+ FIELD.crececountryid,
+ FIELD.ctaxcountryid,
+ FIELD.fbuysellflag,
+ FIELD.ctaxcodeid,
+ FIELD.nnosubtaxrate,
+ FIELD.nnosubtax,
+ FIELD.cprojectid,
+ FIELD.vfmemo,
+ FIELD.norigmny
+ ];
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vbfdef')) {
+ return;
+ }
+ // 费用项
+ if (attrcode == FIELD.cfeematerialvid) {
+ let data = new Array();
+ let datas = this.props.cardTable.getColValue(AREA.body, FIELD.pk_psfinanceorg);
+ if (datas) {
+ datas.map((item) => {
+ if (!data.includes(item.value)) {
+ data.push(item.value);
+ }
+ });
+ }
+ for (let i = 0; i < newValue.length; i++) {
+ if (data.length == 0) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: data.toString(),
+ isShowVerison: '1',
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.cfeesuppliervid) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ // 费用服务商
+ for (let i = 0; i < newValue.length; i++) {
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.corigcurrencyid) {
+ // 费用币种
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.ntaxrate) {
+ // 费用税率
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigtaxprice) {
+ // 含税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigprice) {
+ // 无税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.cctid) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ let dbilldate = this.props.form.getFormItemsValue(AREA.head, FIELD.dbilldate).value;
+ // 费用合同
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ let pk_supplier = newValue[i].values.cfeesupplieroid.value;
+ let cmaterial = newValue[i].values.cfeematerialvid.value; // 费用项物料
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.vfmemo) {
+ // 备注
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nexchangerate) {
+ // 折本汇率
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ // 折本汇率
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ let curr = newValue[i].values.ccurrencyid.value;
+ if (corigcurrencyid == curr) {
+ continue;
+ }
+ let flags = true;
+ let csrcbfid = newValue[i].values.csrcbfid.value;
+ let fratecategory = newValue[i].values.fratecategory.value;
+ //来源于上游的固定汇率下游不可修改
+ if (csrcbfid && fratecategory && fratecategory == '5') {
+ flags = false;
+ }
+ // 根据汇率类别判断编辑性
+ let flag = await canRateModify.call(this, (newValue[i].values.fratecategory || {}).value, flags);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.ctaxcodeid) {
+ // 税码
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ // 税码
+ let ctaxcountryid = newValue[i].values.ctaxcountryid.value;
+ let fbuysellflag = newValue[i].values.fbuysellflag.value;
+ if (ctaxcountryid == null || ctaxcountryid == '' || null == fbuysellflag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.cratetype) {
+ // 汇率类型
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ //原币
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ //本币
+ let curr = newValue[i].values.ccurrencyid.value;
+ if (isNull(corigcurrencyid) || isNull(curr) || corigcurrencyid == curr) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.dratedate) {
+ // 汇率日期
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ let flags = true;
+ let csrcbfid = newValue[i].values.csrcbfid.value;
+ let fratecategory = newValue[i].values.fratecategory.value;
+ //来源于上游的固定汇率下游不可修改
+ if (csrcbfid && fratecategory && fratecategory == '5') {
+ flags = false;
+ }
+ let flag = canRateDateModify.call(this, (newValue[i].values.fratecategory || {}).value, flags);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ let bodyids = [ AREA.body, AREA.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ areaCode,
+ attrcode,
+ queryValue,
+ changedrows,
+ indexs,
+ null,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData.call(this, props, aggvos, URL.afterFeeDetailEdit, areaCode, attrcode, indexs[0], changedrows);
+ });
+}
+
+// 根据费用项和物料行生成费用明细
+function getAfterData(props, aggvos, url, moduleId, key, index, changedrows) {
+ let userobject = {};
+ userobject['batch'] = 'batch';
+ aggvos.userObject = userobject;
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ if (changedrows != null && changedrows.length != 0) {
+ let isError = false;
+ changedrows.forEach((row) => {
+ let srcid = props.cardTable.getValByKeyAndRowId(AREA.card_fee_detail, row.rowid, 'csrcbfid');
+ if (
+ (row.newvalue.value == '0001Z010000000000008' || row.newvalue.value == '固定汇率') &&
+ row.oldvalue.value != '0001Z010000000000008' &&
+ srcid != null &&
+ srcid.value != null
+ ) {
+ isError = true;
+ }
+ });
+ if (isError) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000074')
+ });
+ }
+ }
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, AREA.card_fee_detail, res.data, FIELD.crowno);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+}
+
+function isNull(value) {
+ if (value == undefined || value === '') {
+ return true;
+ }
+ return false;
+}
+
+/*n2EPq+PeSrHZkBbUucpeRyoK4C3ib8M6nWr+dBxKi0k=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/batchEvents/batchFeeEvents.js b/src/pu/pu/arrival/card/batchEvents/batchFeeEvents.js
new file mode 100644
index 0000000..435a33c
--- /dev/null
+++ b/src/pu/pu/arrival/card/batchEvents/batchFeeEvents.js
@@ -0,0 +1,284 @@
+/*mLY54kvp1tnJxS2ssCw05X8DcPrEmjUSZ2f8aIfK2JQ=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购发票卡片批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-28 13:55:38
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, AREA, FIELD, PAGECODE, RELATECTFIELDS } from '../../constance';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import {
+ processExtBillFeeEditResult,
+ processExtBillFeeDetailsEditResult,
+ referFeeCT
+} from '../../../pub/utils/feeAfterUtil';
+import afterEvent from '../events/./feeAfterEditHandler';
+export default async function batchFeeEvents(obj) {
+ console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ let BATCHITEM = [
+ 'cfeematerialvid',
+ 'corigcurrencyid',
+ 'cfeesuppliervid',
+ 'ntaxrate',
+ 'nqtorigtaxprice',
+ 'nqtorigprice',
+ 'cctid',
+ 'vfmemo'
+ ];
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vfdef')) {
+ return;
+ }
+ // 费用项
+ if (attrcode == FIELD.cfeematerialvid) {
+ let data = new Array();
+ let datas = this.props.cardTable.getColValue(AREA.body, FIELD.pk_psfinanceorg);
+ if (datas) {
+ datas.map((item) => {
+ if (!data.includes(item.value)) {
+ data.push(item.value);
+ }
+ });
+ }
+ for (let i = 0; i < newValue.length; i++) {
+ if (data.length == 0) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: data.toString(),
+ isShowVerison: '1',
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.cfeesuppliervid) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ // 费用服务商
+ for (let i = 0; i < newValue.length; i++) {
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.corigcurrencyid) {
+ // 费用币种
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.ntaxrate) {
+ // 费用税率
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigtaxprice) {
+ // 含税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigprice) {
+ // 无税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.cctid) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ let dbilldate = this.props.form.getFormItemsValue(AREA.head, FIELD.dbilldate).value;
+ // 费用合同
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ let pk_supplier = newValue[i].values.cfeesupplieroid.value;
+ let cmaterial = newValue[i].values.cfeematerialvid.value; // 费用项物料
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.vfmemo) {
+ // 备注
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ //执行业务的批量编辑后事件
+ // afterEvent(props, areaCode, attrcode, queryValue, changedrows, indexs);
+ let bodyids = [ AREA.body, AREA.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ areaCode,
+ attrcode,
+ queryValue,
+ changedrows,
+ indexs,
+ null,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData.call(this, props, aggvos, URL.afterFeeEdit, areaCode, attrcode, indexs[0], changedrows);
+ });
+}
+
+// 根据费用项和物料行生成费用明细
+function getAfterData(props, aggvos, url, moduleId, key, index, changedrows) {
+ let userobject = {};
+ userobject['batch'] = 'batch';
+ aggvos.userObject = userobject;
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新费用项数据
+ processExtBillFeeEditResult(props, moduleId, res.data, aggvos, index, FIELD.crowno);
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, AREA.card_fee_detail, res.data, FIELD.crowno);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+}
+
+/*mLY54kvp1tnJxS2ssCw05X8DcPrEmjUSZ2f8aIfK2JQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/batchEvents/index.js b/src/pu/pu/arrival/card/batchEvents/index.js
new file mode 100644
index 0000000..30a6125
--- /dev/null
+++ b/src/pu/pu/arrival/card/batchEvents/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import batchEvents from './batchEvents';
+import batchFeeEvents from './batchFeeEvents';
+import batchFeeDetailEvents from './batchFeeDetailEvents';
+export { batchEvents, batchFeeEvents, batchFeeDetailEvents };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/accessoryManageBtnClick.js b/src/pu/pu/arrival/card/btnClicks/accessoryManageBtnClick.js
new file mode 100644
index 0000000..716c20a
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/accessoryManageBtnClick.js
@@ -0,0 +1,19 @@
+/*jGKwsPM4TPrawPz9wEA3GYjmY4Acu7UVKsgg0KEEMULbYKHAKpZBP3sQltcTwAL7*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 附件管理
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { AREA } from '../../constance';
+export default function() {
+ let pk = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ this.setState({
+ pk: pk,
+ // target: event.target,
+ showUploader: !this.state.showUploader
+ });
+}
+
+/*jGKwsPM4TPrawPz9wEA3GYjmY4Acu7UVKsgg0KEEMULbYKHAKpZBP3sQltcTwAL7*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/addFeeDetailBtnClick.js b/src/pu/pu/arrival/card/btnClicks/addFeeDetailBtnClick.js
new file mode 100644
index 0000000..b82d965
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/addFeeDetailBtnClick.js
@@ -0,0 +1,61 @@
+/*TI2PmvNHaMOmW3sHKlLsfbX9NZBLvNPLwcD+/VE1a+Y=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 费用明细增行参照
+ * @Date: 2023-03-14 20:29:07
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-14 20:29:07
+ */
+import { AREA, FIELD, URL, PAGECODE } from '../../constance';
+import { toast } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import { creatGrandsonDataForSave } from '../../../pub/utils/grandsonUtils';
+import { ajax } from 'nc-lightapp-front';
+export default function addFeeDetailBtnClick(props) {
+ let data = props.table.getCheckedRows(AREA.card_bodyModal);
+ if (!data || data.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000070') /*请选择物料行*/
+ });
+ return;
+ }
+ let bodydatas = new Array();
+ data.forEach((item, index) => {
+ bodydatas.push(item.data);
+ });
+ let bodyids = {
+ body: FIELD.pk_arriveorder,
+ card_fee: FIELD.pk_arriveorder_f
+ };
+ let datas = creatGrandsonDataForSave(
+ this.props,
+ PAGECODE.card,
+ AREA.head,
+ bodyids,
+ AREA.card_fee_detail,
+ true,
+ FIELD.pk_arriveorder_bf
+ );
+ datas.bodys[AREA.body].rows = bodydatas;
+ // 后台通过参数PO
+ ajax({
+ url: URL.insertfeedetail,
+ data: datas,
+ success: (res) => {
+ if (res && res.data && res.data.grandSons.card_fee_detail) {
+ let rowCount = props.cardTable.getNumberOfRows(AREA.card_fee_detail);
+ let card = res.data.grandSons.card_fee_detail;
+ for (let i = 0; i < card.rows.length; i++) {
+ props.cardTable.addRow(AREA.card_fee_detail, rowCount + i, card.rows[i].values, true);
+ }
+ RownoUtils.setRowNo(props, AREA.card_fee_detail, FIELD.crowno);
+ this.setState({ showFeedetail: false });
+ }
+ this.setState({ showFeedetail: false });
+ }
+ });
+}
+
+/*TI2PmvNHaMOmW3sHKlLsfbX9NZBLvNPLwcD+/VE1a+Y=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/approveInfoBtnClick.js b/src/pu/pu/arrival/card/btnClicks/approveInfoBtnClick.js
new file mode 100644
index 0000000..e7894d0
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/approveInfoBtnClick.js
@@ -0,0 +1,22 @@
+/*7SDMIgexLY9TFEYuO69iBpIQuh8h8jSVZ1JADhbeAxM=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 查看审批详情
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+
+import { AREA } from '../../constance';
+
+export default function() {
+ let pk = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ let vtrantypecode = this.props.form.getFormItemsValue(AREA.form, 'vtrantypecode').value;
+ this.setState({
+ pk: pk,
+ billtype: vtrantypecode,
+ showApproveInfo: !this.state.showApproveInfo
+ });
+}
+
+/*7SDMIgexLY9TFEYuO69iBpIQuh8h8jSVZ1JADhbeAxM=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/cancelBtnClick.js b/src/pu/pu/arrival/card/btnClicks/cancelBtnClick.js
new file mode 100644
index 0000000..90d838a
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/cancelBtnClick.js
@@ -0,0 +1,146 @@
+/*pr0tUH1dV1X/xaCwJNPKCMp88UEuyGWprIZeNW+seYU=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态取消按钮逻辑
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-22 15:31:07
+ */
+import { ajax } from 'nc-lightapp-front';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import buttonController from '../viewControl/buttonController';
+import cancelPastBtnClick from './cancelPastBtnClick';
+import pageInfoClick from './pageInfoClick';
+
+export default function(props) {
+ let _this = this;
+ showWarningDialog(getLangByResId(_this, '4004ARRIVAL-000036'), getLangByResId(_this, '4004ARRIVAL-000001'), {
+ /* 国际化处理: 确认要取消吗?*/
+ beSureBtnClick: () => {
+ cancelPastBtnClick.call(this);
+ if (this.props.getPageStatus() != 'add') {
+ if (this.props.getUrlParam('type')) {
+ if (this.props.transferTable.getTransformFormAmount(AREA.leftarea) == 1) {
+ let allprocess = this.props.transferTable.getTransformFormStatus(AREA.leftarea);
+ if (allprocess === false) {
+ let type = this.props.getUrlParam('type');
+ let url = '/ref21';
+ let pagecode = PAGECODE.transferOrder;
+ if (type == 'arrivaltransfer61') {
+ url = '/ref61';
+ pagecode = PAGECODE.transferSubcont;
+ } else if (type == 'arrivalreturn21') {
+ url = '/return21';
+ pagecode = PAGECODE.returnOrder;
+ } else if (type == 'arrivalreturn61') {
+ url = '/return61';
+ pagecode = PAGECODE.returnSubcont;
+ } else if (type == 'quickArr') {
+ url = '/list';
+ pagecode = PAGECODE.head;
+ }
+ this.props.cardTable.setStatus(AREA.body, 'browse');
+ if (this.srcappcode) {
+ this.props.pushTo(url, { appcode: _this.srcappcode, pagecode: pagecode });
+ } else if (url == '/ref21') {
+ this.props.pushTo(url, { app: _this.appcode, type: 'transfer21', pagecode: pagecode });
+ } else {
+ this.props.pushTo(url, { pagecode: pagecode });
+ }
+ } else {
+ //表单返回上一次的值
+
+ this.props.cardTable.selectAllRows(AREA.body, false);
+ this.indexstatus[_this.state.index] = 'browse';
+ }
+ } else {
+ let pk_arriveorder = props.form.getFormItemsValue(AREA.head, 'pk_arriveorder');
+ if (pk_arriveorder && pk_arriveorder.value) {
+ props.cardTable.resetTableData(AREA.body);
+ props.cardTable.resetTableData(AREA.card_fee);
+ props.cardTable.resetTableData(AREA.card_fee_detail);
+ //表单返回上一次的值
+ props.form.cancel(AREA.head);
+ // props.button.setButtonVisible(ALLBUTTONS, false);
+ // props.button.setButtonVisible(TRANSFERFREEBUTTONS, true);
+ props.cardTable.selectAllRows(AREA.body, false);
+ _this.indexstatus[_this.state.index] = 'browse';
+ buttonController.call(this, 'borwse');
+ } else {
+ props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: false,
+ onChange: (current, next, currentIndex) => {
+ delete this.indexstatus[currentIndex];
+ let keys = Object.keys(this.indexstatus);
+ let indexstatusTemp = {};
+ keys.forEach((item, index) => {
+ indexstatusTemp[index] = this.indexstatus[item];
+ });
+ _this.indexstatus = indexstatusTemp;
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000021')); /* 国际化处理: 取消成功*/
+ }
+ });
+ }
+ }
+ } else if (this.props.getUrlParam('status') == 'return23') {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ return;
+ } else if (this.props.getUrlParam('status') == 'returnArrival') {
+ let id = this.props.getUrlParam('id');
+ this.props.setUrlParam({ status: 'browse' });
+ // initTemplate.call(this);
+ let data = { id: this.props.getUrlParam('id'), pageid: PAGECODE.card, templateid: this.templateid };
+ let url = URL.queryCard;
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res && res.data && res.data.head) {
+ let vbillcode = res.data.head[this.formId].rows[0].values.vbillcode.value;
+ this.props.form.setAllFormValue({
+ [this.formId]: res.data.head[this.formId]
+ });
+ let billstatus = this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ this.setState({ billstatus: billstatus });
+ // this.toggleShow(billstatus);
+ this.setState({ vbillcode: vbillcode });
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode
+ });
+ }
+ if (res && res.data && res.data.bodys && res.data.bodys[this.tableId]) {
+ this.props.cardTable.setTableData(this.tableId, res.data.bodys[this.tableId]);
+ // let billstatus = this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // this.toggleShow(billstatus);
+ // setTimeout(() => {
+ RownoUtils.resetRowNo(this.props, this.tableId, 'crowno');
+ // }, 0);
+ buttonController.call(this);
+ }
+ }
+ });
+ }
+ this.props.cardTable.resetTableData(AREA.body);
+ this.props.cardTable.resetTableData(AREA.card_fee);
+ this.props.cardTable.resetTableData(AREA.card_fee_detail);
+ let pk_arriveorder = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder');
+ if (pk_arriveorder && pk_arriveorder.value) {
+ pageInfoClick.call(this, this.props, pk_arriveorder.value, true);
+ }
+ //表单返回上一次的值
+ this.props.form.cancel(AREA.head);
+ //编辑返回上一次的值
+ // props.pushTo(URL.card, { });
+ this.props.setUrlParam({ status: 'browse' });
+ this.setState({ status: 'browse', id: props.getUrlParam('id') });
+ buttonController.call(this);
+ }
+ }
+ });
+}
+
+/*pr0tUH1dV1X/xaCwJNPKCMp88UEuyGWprIZeNW+seYU=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/cancelPastBtnClick.js b/src/pu/pu/arrival/card/btnClicks/cancelPastBtnClick.js
new file mode 100644
index 0000000..1cc2564
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/cancelPastBtnClick.js
@@ -0,0 +1,27 @@
+/*Zx9bizYEiyzV6gVM8C4pcea6YD0svk+WHzy8R1Y1wks=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态取消粘贴
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-13 10:34:29
+ */
+
+import { AREA } from '../../constance';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+export default function() {
+ rowCopyPasteUtils.cancel.call(
+ this,
+ this.props,
+ AREA.body,
+ [ 'CopyLines', 'DeleteLine', 'ResetRowno' ],
+ [ 'PastToThis', 'PastToLast', 'CancelPast' ]
+ );
+ // this.setState({ isCopyLine: false });
+ let checks = this.props.cardTable.getCheckedRows(AREA.body);
+ if (checks == null || checks.length == 0) {
+ this.props.button.setButtonVisible([ 'PastToThis', 'PastToLast', 'CancelPast' ], false);
+ }
+}
+
+/*Zx9bizYEiyzV6gVM8C4pcea6YD0svk+WHzy8R1Y1wks=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/checkBtnClick.js b/src/pu/pu/arrival/card/btnClicks/checkBtnClick.js
new file mode 100644
index 0000000..f00e074
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/checkBtnClick.js
@@ -0,0 +1,67 @@
+/*FZvryfJABux8o5gSnunofeRKbbb4P6bKsrUkylcplWg=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮报检处理
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let rows = this.props.cardTable.getCheckedRows(AREA.table);
+ if (rows.length < 1) {
+ toast({ content: getLangByResId(_this, '4004ARRIVAL-000008'), color: 'warning' }); /* 国际化处理: 请选择数据*/
+ }
+ let pkTsParams = rows.map((row) => {
+ return {
+ pk: row.data.values.pk_arriveorder_b.value,
+ ts: row.data.values.ts.value
+ };
+ });
+ // let pkindex = rows.map((row) => {
+ // return {
+ // pk: row.data.values.pk_arriveorder_b.value,
+ // index: row.index
+ // };
+ // });
+ let pkIndex = {};
+ for (let i = 0; i < rows.length; i++) {
+ pkIndex[rows[i].data.values.pk_arriveorder_b.value] = rows[i].index;
+ }
+
+ ajax({
+ method: 'post',
+ url: URL.verify,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: pkTsParams
+ },
+ success: function(res) {
+ if (res && res.data && res.data.body) {
+ let datas = res.data.body[AREA.body].rows.map((row) => {
+ return {
+ index: pkIndex[row.values.pk_arriveorder_b.value],
+ data: row
+ };
+ });
+ _this.props.cardTable.updateDataByIndexs(AREA.body, datas);
+ // _this.props.cardTable.setTableData(AREA.body, res.data.body[AREA.body]);
+ }
+ if (res && res.data && res.data.head) {
+ _this.props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ if (_this.props.getUrlParam('type')) {
+ // let index = _this.props.transferTable.getTransferTableSelectedId();
+ _this.props.transferTable.setTransferListValueByIndex(AREA.leftarea, res.data, _this.state.index);
+ }
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000013')); /* 国际化处理: 报检成功*/
+ }
+ });
+}
+
+/*FZvryfJABux8o5gSnunofeRKbbb4P6bKsrUkylcplWg=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/combinPrintClick.js b/src/pu/pu/arrival/card/btnClicks/combinPrintClick.js
new file mode 100644
index 0000000..e52a8a9
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/combinPrintClick.js
@@ -0,0 +1,129 @@
+/*XyfibAyPIE046FIZM6drHIV0Qm111p0c+RdVgEsTMFk=*/
+import { AREA, FIELD, URL, BILLTYPE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function(props) {
+ let jsonData = getJsonData.call(this, props);
+ this.setState({
+ showConditionModal: true,
+ jsonData: jsonData
+ });
+}
+
+function getJsonData(props) {
+ // let letfItemKey = [];
+ // props.meta.getMeta()[AREA.body].items.map((item) => {
+ // if (item.visible && item.attrcode != 'pk_material') {
+ // letfItemKey.push(item.attrcode);
+ // }
+ // });
+ // letfItemKey = letfItemKey == null ? [] : letfItemKey;
+ // let rightItemKey = [ 'pk_material' ];
+ //物料分类、行号、物料名称、型号、规格、单位、数量、计划到货日期、累计合格主数量、累计不合格主数量、结算利润中心、收货利润中心、途耗数量、收货仓库、赠品、来源订单行是否赠品、物料编码
+ let letfItemKey = [];
+ props.meta.getMeta()[AREA.body].items.map((item) => {
+ if (item.visible) {
+ letfItemKey.push(item.attrcode);
+ }
+ });
+ let groupColumn = {
+ all: letfItemKey,
+ right: [
+ // FIELD.nnum, //主数量
+ // FIELD.nastnum, //数量
+ // FIELD.nelignum, //合格主数量
+ // FIELD.nnotelignum, //不合格主数量
+ // FIELD.nwastnum //途耗主数量
+ FIELD.pk_material //物料编码
+ ]
+ };
+
+ let sumColumn = {
+ all: [
+ FIELD.norigmny, //金额
+ FIELD.norigtaxmny, //价税合计
+ FIELD.ntax, //税额
+ FIELD.nmny, //本币无税金额
+ FIELD.ntaxmny, //本币加税合计
+ FIELD.nnum, //主数量
+ FIELD.nastnum, //数量
+ FIELD.nelignum, //合格主数量
+ FIELD.nnotelignum, //不合格主数量
+ FIELD.nwastnum //途耗主数量
+ ],
+ right: [
+ FIELD.nnum, //主数量
+ FIELD.nastnum, //数量
+ FIELD.nelignum, //合格主数量
+ FIELD.nnotelignum, //不合格主数量
+ FIELD.nwastnum //途耗主数量
+ ]
+ };
+
+ let averageColumn = {
+ all: [
+ FIELD.nnum, // 主数量
+ FIELD.nastnum, // 数量
+ FIELD.norigmny, // 金额
+ FIELD.norigtaxmny, //价税合计
+ // FIELD.ncalcostmny, //计成本金额
+ // FIELD.ncaltaxmny, //计税金额
+ FIELD.nnosubtax, //不可抵扣税额
+ FIELD.ntax, //本币税额
+ FIELD.nmny, //本币无税金额
+ FIELD.ntaxmny, //本币价税合计
+ FIELD.nelignum, //合格主数量
+ FIELD.nnotelignum, //不合格主数量
+ FIELD.nwastnum //途耗主数量
+ ],
+ right: []
+ };
+
+ let weightAverageColumn = {
+ all: [
+ FIELD.norigmny, //金额
+ FIELD.norigtaxmny, //价税合计
+ FIELD.ntax, //税额
+ FIELD.nmny, //本币无税金额
+ FIELD.ntaxmny, //本币加税合计
+ FIELD.nnum, //主数量
+ FIELD.nastnum, //数量
+ FIELD.nelignum, //合格主数量
+ FIELD.nnotelignum, //不合格主数量
+ FIELD.nwastnum //途耗主数量
+ ],
+ right: []
+ };
+ let newMeta = {};
+ let attrNames = Object.keys(this.meta);
+ attrNames.forEach((attrName) => {
+ newMeta[attrName] = this.meta[attrName];
+ if (attrName == 'card_fee' || attrName == 'card_fee_detail') {
+ newMeta[attrName].areaVisible = false;
+ }
+ });
+ return {
+ title: getLangByResId(this, '4004ARRIVAL-000015') + ': ' + this.state.vbillcode /* 国际化处理: 合并显示*/,
+ materialClassification: true,
+ billPk: props.form.getFormItemsValue(AREA.form, FIELD.pk_arriveorder).value, // 主键值
+ pk_org: [ props.form.getFormItemsValue(AREA.form, FIELD.pk_org).value ], // 主组织
+ billtype: BILLTYPE.arrival,
+ materialPKColumn: FIELD.pk_material,
+ numKey: FIELD.nnum,
+ billTitle: getLangByResId(this, '4004ARRIVAL-000016') + ': ' + this.state.vbillcode /* 国际化处理: 到货单合并打印*/,
+ headCode: AREA.form, //页面头区域
+ bodyCode: AREA.body, //页面子区域
+ columnArea: AREA.body, //参数字段所在区域(根据字段翻译名称使用,一般为子表区域)
+ groupColumn: groupColumn,
+ sumColumn: sumColumn,
+ averageColumn: averageColumn,
+ weightAverageColumn: weightAverageColumn,
+ meta: newMeta, // 当前卡片页面meta
+ //funcode: null, //小应用编码
+ nodekey: null, //模板节点标识
+ combineUrl: URL.combin, //合并action
+ printUrl: URL.combinprint, //打印action
+ appcode: this.props.getAppCode()
+ };
+}
+
+/*XyfibAyPIE046FIZM6drHIV0Qm111p0c+RdVgEsTMFk=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/commit.js b/src/pu/pu/arrival/card/btnClicks/commit.js
new file mode 100644
index 0000000..2262909
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/commit.js
@@ -0,0 +1,132 @@
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
+import { URL, PAGECODE, AREA, COMMON } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { ajax } from 'nc-lightapp-front';
+import { updateCacheData, changeUrlParam, rewriteTransferSrcBids } from '../../../../../scmpub/scmpub/pub/cache';
+import buttonController from '../viewControl/buttonController';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+
+export default function commit(props, record, index, assign, skipCodes) {
+ // 获取选中行
+ // 执行提交操作
+ let _this = this;
+ let rows = this.props.cardTable.getAllRows(AREA.body);
+ let bodys = [];
+ rows.forEach((row) => {
+ bodys.push({
+ pk: row.values['pk_arriveorder_b'].value,
+ ts: row.values['ts'].value
+ });
+ });
+ // 拼装json
+ let data = {
+ pageid: PAGECODE.card,
+ pkTsParams: [
+ {
+ pk: _this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ ts: _this.props.form.getFormItemsValue(AREA.head, 'ts').value,
+ bodys: bodys
+ }
+ ]
+ };
+ skipCodes = skipCodes ? skipCodes : new Array();
+ if (skipCodes) {
+ data['skipCodes'] = skipCodes;
+ }
+ //指派
+ if (assign) {
+ data['assign'] = JSON.stringify(assign);
+ }
+ // 发送请求
+ ajax({
+ url: URL.commit,
+ data: data,
+ success: (res) => {
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ _this.commitInfo = {
+ index: index,
+ record: record
+ };
+ _this.setState({
+ compositedata: res.data,
+ compositedisplay: true
+ });
+ return;
+ }
+ if (res.data.isResume && res.data.isResume == true) {
+ showResumeModal.call(
+ _this,
+ props,
+ 'MessageDlg',
+ skipCodes,
+ res.data,
+ commit.bind(_this, props, record, index, assign, skipCodes),
+ assign
+ );
+ return;
+ }
+ // let config = {
+ // headAreaId: AREA.head,
+ // bodyAreaId: AREA.body,
+ // bodyPKfield: 'pk_arriveorder_b'
+ // };
+ let map = new Map();
+ map.set('pk_arriveorder_b', AREA.body);
+ map.set('pk_arriveorder_f', AREA.card_fee);
+ let config = {
+ headAreaId: AREA.head,
+ bodyIdAndPkMap: map
+ };
+ updateExtBillDataForCompareByPk(this.props, res.data, config);
+ let type = this.props.getUrlParam('type');
+ if (type && type != 'quickArr') {
+ let bill = res.data;
+ rewriteTransferSrcBids(_this.props, 'csourcebid', bill.bodys[AREA.body].rows);
+
+ // 转单编辑界面保存
+ updateCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ _this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ res.data,
+ AREA.head,
+ COMMON.arrivalCacheKey
+ );
+ _this.props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = 'browse';
+ }
+ });
+ if (_this.props.transferTable.getTransformFormAmount(AREA.leftarea) == 1) {
+ let vbillcode = bill.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.setState({ vbillcode: vbillcode });
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode
+ });
+ }
+ } else {
+ changeUrlParam(_this.props, { status: 'browse' });
+ updateCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ _this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ res.data,
+ AREA.head,
+ COMMON.arrivalCacheKey
+ );
+ // _this.toggleShow(fbillstatus);
+ buttonController.call(_this);
+ }
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000017')); /* 国际化处理: 提交成功*/
+ }
+ });
+}
+
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/copyLinesBtnClick.js b/src/pu/pu/arrival/card/btnClicks/copyLinesBtnClick.js
new file mode 100644
index 0000000..ccdd11e
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/copyLinesBtnClick.js
@@ -0,0 +1,36 @@
+/*RKT0TeoQwoZBhWtNsEjD5zmZGPbhaf7M2dVGHhDkh84=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮批量行复制
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-13 11:19:08
+ */
+import { toast } from 'nc-lightapp-front';
+import { AREA } from '../../constance';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let selectedRow = _this.props.cardTable.getCheckedRows(AREA.body);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(_this, '4004ARRIVAL-000007') /* 国际化处理: 请选择数据!*/
+ });
+ return;
+ }
+ // props.button.setButtonVisible([ 'CopyLines', 'DeleteLine', 'ResetRowno' ], false);
+ // props.button.setButtonVisible([ 'PastToThis', 'PastToLast', 'CancelPast' ], true);
+ rowCopyPasteUtils.copyRows.call(
+ _this,
+ _this.props,
+ AREA.body,
+ [ 'CopyLines', 'DeleteLine', 'ResetRowno', 'StockQuery' ],
+ [ 'PastToThis', 'PastToLast', 'CancelPast' ]
+ );
+ //_this.setState({ isCopyLine: true });
+ _this.props.button.setButtonDisabled([ 'PastToThis', 'PastToLast', 'CancelPast' ], false);
+}
+
+/*RKT0TeoQwoZBhWtNsEjD5zmZGPbhaf7M2dVGHhDkh84=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/delAssertCardBtnClick.js b/src/pu/pu/arrival/card/btnClicks/delAssertCardBtnClick.js
new file mode 100644
index 0000000..f3375d3
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/delAssertCardBtnClick.js
@@ -0,0 +1,52 @@
+/*yPw6p5L8UGBFttGK3Diiq4Ia+RdiszJH3evh/uWqoQU8gehLKeayv544xYrgTUP0*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 删除资产卡片
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+import { updateDtaForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let rows = _this.props.cardTable.getCheckedRows(AREA.table);
+ if (rows.length < 1) {
+ toast({ content: getLangByResId(_this, '4004ARRIVAL-000008'), color: 'warning' }); /* 国际化处理: 请选择数据*/
+ }
+ let pkTsParams = rows.map((row) => {
+ return {
+ pk: row.data.values.pk_arriveorder_b.value,
+ ts: row.data.values.ts.value
+ };
+ });
+ ajax({
+ method: 'post',
+ url: URL.delAssertCard,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: pkTsParams
+ },
+ success: function(res) {
+ if (res && res.data && res.data.head && res.data.body) {
+ let config = {
+ headAreaId: AREA.head,
+ bodyAreaId: AREA.body,
+ bodyPKfield: 'pk_arriveorder_b'
+ };
+ updateDtaForCompareByPk(_this.props, res.data, config);
+ }
+ if (_this.props.getUrlParam('type')) {
+ // let index = _this.props.transferTable.getTransferTableSelectedId();
+ _this.props.transferTable.setTransferListValueByIndex(AREA.leftarea, res.data, _this.state.index);
+ }
+
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000010')); /* 国际化处理: 删除设备卡片成功*/
+ }
+ });
+}
+
+/*yPw6p5L8UGBFttGK3Diiq4Ia+RdiszJH3evh/uWqoQU8gehLKeayv544xYrgTUP0*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/delTransAssertBtnClick.js b/src/pu/pu/arrival/card/btnClicks/delTransAssertBtnClick.js
new file mode 100644
index 0000000..8fb2e30
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/delTransAssertBtnClick.js
@@ -0,0 +1,52 @@
+/*BZvTHh/pqvCRe0NUj+ckg+mYOJh2Z8at5vb76xEFotrfzF1ylPPyoMjMmIXHMVNy*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 删除转固单
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+import { updateDtaForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let rows = _this.props.cardTable.getCheckedRows(AREA.table);
+ if (rows.length < 1) {
+ toast({ content: getLangByResId(_this, '4004ARRIVAL-000008'), color: 'warning' }); /* 国际化处理: 请选择数据*/
+ }
+ let pkTsParams = rows.map((row) => {
+ return {
+ pk: row.data.values.pk_arriveorder_b.value,
+ ts: row.data.values.ts.value
+ };
+ });
+ ajax({
+ method: 'post',
+ url: URL.delHJCard,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: pkTsParams
+ },
+ success: function(res) {
+ if (res && res.data && res.data.head && res.data.body) {
+ let config = {
+ headAreaId: AREA.head,
+ bodyAreaId: AREA.body,
+ bodyPKfield: 'pk_arriveorder_b'
+ };
+ updateDtaForCompareByPk(_this.props, res.data, config);
+ }
+ if (_this.props.getUrlParam('type')) {
+ // let index = _this.props.transferTable.getTransferTableSelectedId();
+ _this.props.transferTable.setTransferListValueByIndex(AREA.leftarea, res.data, _this.state.index);
+ }
+
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000012')); /* 国际化处理: 删除转固单片成功*/
+ }
+ });
+}
+
+/*BZvTHh/pqvCRe0NUj+ckg+mYOJh2Z8at5vb76xEFotrfzF1ylPPyoMjMmIXHMVNy*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/deleteBtnClick.js b/src/pu/pu/arrival/card/btnClicks/deleteBtnClick.js
new file mode 100644
index 0000000..bd8a4b9
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/deleteBtnClick.js
@@ -0,0 +1,147 @@
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 删除
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-08 16:19:37
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showSuccessInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, COMMON, AREA, PAGECODE, ALLBUTTONS } from '../../constance';
+import { changeUrlParam, deleteCacheData, getNextId } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../viewControl/buttonController';
+export default function() {
+ let __this = this;
+ showWarningDialog(getLangByResId(__this, '4004ARRIVAL-000002'), getLangByResId(__this, '4004ARRIVAL-000003'), {
+ /* 国际化处理: 删除,确定要删除所选数据吗?*/
+ beSureBtnClick: () => {
+ let rows = __this.props.cardTable.getAllRows(AREA.body);
+ let bodys = [];
+ rows.forEach((row) => {
+ bodys.push({
+ id: row.values['pk_arriveorder_b'].value,
+ ts: row.values['ts'].value
+ });
+ });
+ let pk_arriveorder = __this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ ajax({
+ method: 'post',
+ url: URL.delete,
+ data: [
+ {
+ id: __this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ ts: __this.props.form.getFormItemsValue(AREA.head, 'ts').value,
+ bodys: bodys
+ }
+ ],
+ success: function(res) {
+ // showSuccessInfo(getLangByResId(__this, '4004ARRIVAL-000004')); /* 国际化处理: 删除成功*/
+ let nextId = getNextId(__this.props, pk_arriveorder, COMMON.arrivalCacheKey);
+ deleteCacheData(__this.props, 'pk_arriveorder', pk_arriveorder, COMMON.arrivalCacheKey);
+ changeUrlParam(__this.props, { status: 'browse', id: nextId });
+ let data = { id: nextId, pageid: PAGECODE.card, templateid: __this.templateid };
+ ajax({
+ url: URL.queryCard,
+ data: data,
+ success: (res) => {
+ if (__this.props.getUrlParam('type') && __this.props.getUrlParam('type') != 'quickArr') {
+ if (__this.props.transferTable.getTransformFormAmount(AREA.leftarea) == 1) {
+ // history.go(-1);
+ __this.props.form.EmptyAllFormValue(AREA.form);
+ __this.setState({ vbillcode: '' });
+ __this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: ''
+ });
+ __this.props.cardTable.setTableData(AREA.body, { rows: [] });
+ __this.props.cardTable.setTableData(AREA.card_fee, { rows: [] });
+ __this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] });
+ let url;
+ let pagecode = '';
+ //删除需要回到列表
+ if (__this.props.getUrlParam('type') == 'arrivaltransfer21') {
+ // 来源采购订单
+ url = URL.transfer21;
+ pagecode = PAGECODE.transferOrder;
+ } else if (__this.props.getUrlParam('type') == 'arrivaltransfer61') {
+ // 委外到货
+ url = URL.transfer61;
+ pagecode = PAGECODE.transferSubcont;
+ } else if (__this.props.getUrlParam('type') == 'arrivalreturn21') {
+ // 采购退货
+ url = URL.return21;
+ pagecode = PAGECODE.returnOrder;
+ } else if (__this.props.getUrlParam('type') == 'arrivalreturn61') {
+ // 委外退货
+ url = URL.return61;
+ pagecode = PAGECODE.returnSubcont;
+ }
+ __this.props.pushTo(url, { pagecode: pagecode });
+ } else {
+ __this.indexstatus = {};
+ __this.props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: false,
+ onChange: (current, next, currentIndex) => {
+ showSuccessInfo(
+ getLangByResId(__this, '4004ARRIVAL-000004')
+ ); /* 国际化处理: 删除成功*/
+ }
+ });
+ }
+ // 拉单分单,多条保存,删除其中一条之后,这里不用自动渲染,在createTransferList中的onTransferItemSelected的方法中已经设置过了
+ if (__this.manyTrans) {
+ buttonController.call(__this);
+ }
+ } else {
+ if (res && res.data && res.data.head) {
+ let vbillcode = res.data.head[AREA.head].rows[0].values.vbillcode.value;
+ __this.props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ let billstatus = __this.props.form.getFormItemsValue(AREA.head, 'fbillstatus')
+ .value;
+ __this.setState({ billstatus: billstatus });
+ __this.setState({ vbillcode: vbillcode });
+ __this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode
+ });
+ __this.props.cardTable.setTableData(AREA.body, res.data.bodys[AREA.body]);
+ if (res.data.bodys && res.data.bodys[AREA.card_fee]) {
+ __this.props.cardTable.setTableData(
+ AREA.card_fee,
+ res.data.bodys[AREA.card_fee]
+ );
+ } else {
+ __this.props.cardTable.setTableData(AREA.card_fee, { rows: [] });
+ }
+ if (res.data.grandSons && res.data.grandSons[AREA.card_fee_detail]) {
+ __this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ res.data.grandSons[AREA.card_fee_detail]
+ );
+ } else {
+ __this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] });
+ }
+ } else {
+ __this.props.form.EmptyAllFormValue(AREA.form);
+
+ __this.setState({ vbillcode: '' });
+ __this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: ''
+ });
+ __this.props.cardTable.setTableData(AREA.body, { rows: [] });
+ __this.props.cardTable.setTableData(AREA.card_fee, { rows: [] });
+ __this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] });
+ }
+ showSuccessInfo(getLangByResId(__this, '4004ARRIVAL-000004')); /* 国际化处理: 删除成功*/
+ buttonController.call(__this);
+ }
+ }
+ });
+ }
+ });
+ },
+ cancelBtnClick: () => {}
+ });
+}
+
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/deleteLinesBtnClick.js b/src/pu/pu/arrival/card/btnClicks/deleteLinesBtnClick.js
new file mode 100644
index 0000000..b8b045a
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/deleteLinesBtnClick.js
@@ -0,0 +1,58 @@
+/*f+TNnWrlf04s3ZdZUnXWbC8swSsvnCLcbdgsn0odrXA=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 批量删除行
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-18 11:18:53
+ */
+import { toast } from 'nc-lightapp-front';
+import { AREA } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let selectedRow = _this.props.cardTable.getCheckedRows(AREA.body);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(_this, '4004ARRIVAL-000007') /* 国际化处理: 请选择数据!*/
+ });
+ return;
+ }
+ let rowparam = [];
+ let datas = [];
+ selectedRow.forEach((item) => {
+ rowparam.push(item.index);
+ datas.push(item.data);
+ });
+ delFeeDetailByBody.call(_this, _this.props, datas);
+ _this.props.cardTable.delRowsByIndex(AREA.body, rowparam);
+ let checks = props.cardTable.getCheckedRows(AREA.body);
+ if (!checks || checks == null || checks.length == 0) {
+ _this.props.button.setButtonDisabled([ 'CopyLines', 'DeleteLine' ], true);
+ } else {
+ _this.props.button.setButtonDisabled([ 'CopyLines', 'DeleteLine' ], false);
+ }
+}
+function delFeeDetailByBody(props, record) {
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0 && record && record.length > 0) {
+ record.forEach((reco) => {
+ data.forEach((item) => {
+ if (
+ reco.values.pk_arriveorder_b.value == item.values.pk_arriveorder_b.value ||
+ reco.rowid == item.values.pk_arriveorder_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, indexs);
+ }
+}
+
+/*f+TNnWrlf04s3ZdZUnXWbC8swSsvnCLcbdgsn0odrXA=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/dirPrintBarcodeBtnClick.js b/src/pu/pu/arrival/card/btnClicks/dirPrintBarcodeBtnClick.js
new file mode 100644
index 0000000..30a21d4
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/dirPrintBarcodeBtnClick.js
@@ -0,0 +1,69 @@
+/*h73TV7tVe4OsHH2oKl1nFRB+Z6yOWftTgm1ag/mf2XpO+B+a3DZ8xdkHgLlgypaN*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 直接打印条形码
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-17 09:11:31
+ */
+import { print } from 'nc-lightapp-front';
+// import codeNfig from '../../../../../uap/commmon/components/codeConfigModal';
+import codeNfig from 'uap/common/components/codeConfigModal';
+import { AREA, BILLTYPE } from '../../constance';
+export default function() {
+ let id = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ // print(
+ // 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
+ // '/nccloud/pu/arrival/dirprintbarcode.do', //后台服务url
+ // {
+ // billtype: '23', //单据类型
+ // funcode: '400401200', //功能节点编码,即模板编码
+ // nodekey: null, //模板节点标识
+ // oids: [ id ] // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ // // 打印按钮不用传该参数,输出按钮(文件下载)需加参数outputType,值为output。
+ // }
+ // );
+ let selectedRows = this.props.cardTable.getCheckedRows(AREA.body);
+ let bodylength = selectedRows.length;
+ let bidpks = [];
+ let materialinfo = {};
+ if (selectedRows.length > 0) {
+ for (var i = 0; i < bodylength; i++) {
+ bidpks.push(selectedRows[i].data.values.pk_arriveorder_b.value);
+ }
+ }
+ codeNfig(this.props, { data: materialinfo, directPrinter: true }, (info) => {
+ let userjson =
+ BILLTYPE.arrival + //单据类型
+ ',' +
+ info.width + //宽度
+ ',' +
+ info.height + //高度
+ ',' +
+ info.direction + //纸张方向
+ ',' +
+ info.leftMargin + //左边距
+ ',' +
+ info.rightMargin + //右边距
+ ',' +
+ info.topMargin + //上边距
+ ',' +
+ info.bottomMargin + //下边距
+ ',' +
+ info.dataColumn +
+ ',' +
+ bidpks;
+ print(
+ 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
+ '/nccloud/pu/arrival/dirprintbarcode.do', //后台服务url
+ {
+ userjson: userjson, //单据类型
+
+ oids: [ id ] // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ },
+ false
+ );
+ });
+}
+
+/*h73TV7tVe4OsHH2oKl1nFRB+Z6yOWftTgm1ag/mf2XpO+B+a3DZ8xdkHgLlgypaN*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/editBtnClick.js b/src/pu/pu/arrival/card/btnClicks/editBtnClick.js
new file mode 100644
index 0000000..caa1137
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/editBtnClick.js
@@ -0,0 +1,49 @@
+/*rzxqFeC1Q4Nf7h12KpqtZffmls+sYlNzLaSthb2yEsQ=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 修改
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-16 13:40:53
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, AREA, PAGECODE } from '../../constance';
+import buttonController from '../viewControl/buttonController';
+import { changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache';
+export default function() {
+ let pk = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ let data = { pk: pk };
+ ajax({
+ method: 'post',
+ data: data,
+ url: '/nccloud/pu/arrival/edit.do',
+ success: (res) => {
+ if (this.props.getUrlParam('type')) {
+ this.props.cardTable.selectAllRows(AREA.body, false);
+ this.props.cardTable.selectAllRows(AREA.card_fee, false);
+ this.props.cardTable.selectAllRows(AREA.card_fee_detail, false);
+ this.indexstatus[this.state.index] = 'edit';
+ buttonController.call(this, 'edit');
+ } else {
+ // this.props.pushTo(URL.card, {
+ // status: 'edit',
+ // id: this.props.getUrlParam('id'),
+ // pagecode: PAGECODE.card,
+ // scene: this.props.getUrlParam('scene')
+ // });
+ changeUrlParam(this.props, {
+ status: 'edit',
+ id: this.props.getUrlParam('id'),
+ pagecode: PAGECODE.card,
+ scene: this.props.getUrlParam('scene')
+ });
+ buttonController.call(this);
+ this.props.cardTable.selectAllRows(AREA.body, false);
+ }
+
+ // this.select();
+ }
+ });
+}
+
+/*rzxqFeC1Q4Nf7h12KpqtZffmls+sYlNzLaSthb2yEsQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/genAssertCardBtnClick.js b/src/pu/pu/arrival/card/btnClicks/genAssertCardBtnClick.js
new file mode 100644
index 0000000..8cd1f65
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/genAssertCardBtnClick.js
@@ -0,0 +1,52 @@
+/*klhrqJ2zIL4oaeXZ0ZoSthpxxxeOZCjvV4IiHVqToo0UMjM6TJ+S8A20c+cD1ojZ*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 生成资产卡片
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+import { updateDtaForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let rows = _this.props.cardTable.getCheckedRows(AREA.table);
+ if (rows.length < 1) {
+ toast({ content: getLangByResId(_this, '4004ARRIVAL-000008'), color: 'warning' }); /* 国际化处理: 请选择数据*/
+ }
+ let pkTsParams = rows.map((row) => {
+ return {
+ pk: row.data.values.pk_arriveorder_b.value,
+ ts: row.data.values.ts.value
+ };
+ });
+ ajax({
+ method: 'post',
+ url: URL.genAssertCard,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: pkTsParams
+ },
+ success: function(res) {
+ if (res && res.data && res.data.head && res.data.body) {
+ let config = {
+ headAreaId: AREA.head,
+ bodyAreaId: AREA.body,
+ bodyPKfield: 'pk_arriveorder_b'
+ };
+ updateDtaForCompareByPk(_this.props, res.data, config);
+ }
+ if (_this.props.getUrlParam('type')) {
+ // let index = _this.props.transferTable.getTransferTableSelectedId();
+ _this.props.transferTable.setTransferListValueByIndex(AREA.leftarea, res.data, _this.state.index);
+ }
+
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000009')); /* 国际化处理: 生成设备卡片成功*/
+ }
+ });
+}
+
+/*klhrqJ2zIL4oaeXZ0ZoSthpxxxeOZCjvV4IiHVqToo0UMjM6TJ+S8A20c+cD1ojZ*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/genTransAssertBtnClick.js b/src/pu/pu/arrival/card/btnClicks/genTransAssertBtnClick.js
new file mode 100644
index 0000000..b27046b
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/genTransAssertBtnClick.js
@@ -0,0 +1,52 @@
+/*KfAp4wWINYdkd6zY9nt1SKRMASv4CMDy99mZN2fl8t22mPYGjaV980zHouZjLzsx*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 生成转固单
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+import { updateDtaForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ let rows = _this.props.cardTable.getCheckedRows(AREA.table);
+ if (rows.length < 1) {
+ toast({ content: getLangByResId(_this, '4004ARRIVAL-000008'), color: 'warning' }); /* 国际化处理: 请选择数据*/
+ }
+ let pkTsParams = rows.map((row) => {
+ return {
+ pk: row.data.values.pk_arriveorder_b.value,
+ ts: row.data.values.ts.value
+ };
+ });
+ ajax({
+ method: 'post',
+ url: URL.genHJCard,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: pkTsParams
+ },
+ success: function(res) {
+ if (res && res.data && res.data.head && res.data.body) {
+ let config = {
+ headAreaId: AREA.head,
+ bodyAreaId: AREA.body,
+ bodyPKfield: 'pk_arriveorder_b'
+ };
+ updateDtaForCompareByPk(_this.props, res.data, config);
+ }
+ if (_this.props.getUrlParam('type')) {
+ // let index = _this.props.transferTable.getTransferTableSelectedId();
+ _this.props.transferTable.setTransferListValueByIndex(AREA.leftarea, res.data, _this.state.index);
+ }
+
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000011')); /* 国际化处理: 生成转固单成功*/
+ }
+ });
+}
+
+/*KfAp4wWINYdkd6zY9nt1SKRMASv4CMDy99mZN2fl8t22mPYGjaV980zHouZjLzsx*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/index.js b/src/pu/pu/arrival/card/btnClicks/index.js
new file mode 100644
index 0000000..5c340bc
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/index.js
@@ -0,0 +1,84 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import tableButtonClick from './tableButtonClick';
+import pageInfoClick from './pageInfoClick';
+import saveBtnClick from './saveBtnClick';
+import quickReceiveBtnClick from './quickReceiveBtnClick';
+import cancelBtnClick from './cancelBtnClick';
+import editBtnClick from './editBtnClick';
+import accessoryManageBtnClick from './accessoryManageBtnClick';
+import approveInfoBtnClick from './approveInfoBtnClick';
+import cancelPastBtnClick from './cancelPastBtnClick';
+import checkBtnClick from './checkBtnClick';
+import copyLinesBtnClick from './copyLinesBtnClick';
+import delAssertCardBtnClick from './delAssertCardBtnClick';
+import deleteBtnClick from './deleteBtnClick';
+import deleteLinesBtnClick from './deleteLinesBtnClick';
+import delTransAssertBtnClick from './delTransAssertBtnClick';
+import dirPrintBarcodeBtnClick from './dirPrintBarcodeBtnClick';
+import genAssertCardBtnClick from './genAssertCardBtnClick';
+import genTransAssertBtnClick from './genTransAssertBtnClick';
+import outPrintBtnClick from './outPrintBtnClick';
+import pastToLastBtnClick from './pastToLastBtnClick';
+import printBtnClick from './printBtnClick';
+import queryAboutBusinessBtnClick from './queryAboutBusinessBtnClick';
+import refOrderBtnClick from './refOrderBtnClick';
+import refreashBtnClick from './refreashBtnClick';
+import refSubcontBtnClick from './refSubcontBtnClick';
+import resetRownoBtnClick from './resetRownoBtnClick';
+import returnArrivalBtnClick from './returnArrivalBtnClick';
+import returnOrderBtnClick from './returnOrderBtnClick';
+import returnSubcontBtnClick from './returnSubcontBtnClick';
+import saveSendBtnClick from './saveSendBtnClick';
+import unCommitBtnClick from './unCommitBtnClick';
+import commit from './commit';
+import quitBtnClick from './quitBtnClick';
+import splitPrintClick from './splitPrintClick';
+import combinPrintClick from './combinPrintClick';
+import saveAndCommit from './saveAndCommit';
+import materialAssignBtnClick from './materialAssignBtnClick';
+import addFeeDetailBtnClick from './addFeeDetailBtnClick';
+import pasteLineBtn from './pasteLineBtn';
+
+export {
+ tableButtonClick,
+ pageInfoClick,
+ saveBtnClick,
+ quickReceiveBtnClick,
+ cancelBtnClick,
+ editBtnClick,
+ accessoryManageBtnClick,
+ approveInfoBtnClick,
+ cancelPastBtnClick,
+ checkBtnClick,
+ copyLinesBtnClick,
+ delAssertCardBtnClick,
+ deleteBtnClick,
+ deleteLinesBtnClick,
+ delTransAssertBtnClick,
+ dirPrintBarcodeBtnClick,
+ genAssertCardBtnClick,
+ genTransAssertBtnClick,
+ outPrintBtnClick,
+ pastToLastBtnClick,
+ printBtnClick,
+ queryAboutBusinessBtnClick,
+ refOrderBtnClick,
+ refreashBtnClick,
+ refSubcontBtnClick,
+ resetRownoBtnClick,
+ materialAssignBtnClick,
+ returnArrivalBtnClick,
+ returnOrderBtnClick,
+ returnSubcontBtnClick,
+ saveSendBtnClick,
+ unCommitBtnClick,
+ commit,
+ quitBtnClick,
+ combinPrintClick,
+ splitPrintClick,
+ saveAndCommit,
+ addFeeDetailBtnClick,
+ pasteLineBtn
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/materialAssignBtnClick.js b/src/pu/pu/arrival/card/btnClicks/materialAssignBtnClick.js
new file mode 100644
index 0000000..abaf927
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/materialAssignBtnClick.js
@@ -0,0 +1,56 @@
+/*gihvnYuBTIgt3DSxzb+m1caiAAb/brKYQG5CGeGHw++F5nJohGQYc9p1cupKsifr*/
+import { toast, cacheTools } from 'nc-lightapp-front';
+import { AREA, URL, PAGECODE, FIELD } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { ajax } from 'nc-lightapp-front';
+import remoteSagasCheck from '../../../pub/remoteCall/remoteSagasCheck';
+
+export default function(props) {
+ let _this = this;
+ let rows = _this.props.cardTable.getCheckedRows(AREA.table);
+ if (rows.length < 1) {
+ toast({ content: getLangByResId(_this, '4004ARRIVAL-000008'), color: 'warning' }); /* 国际化处理: 请选择数据*/
+ }
+ let pkTsParams = rows.map((row) => {
+ return {
+ pk: row.data.values.pk_arriveorder_b.value,
+ ts: row.data.values.ts.value
+ };
+ });
+ let vtrantypecode = (props.form.getFormItemsValue(AREA.form, 'vtrantypecode') || {}).value;
+ let hpk = (props.form.getFormItemsValue(AREA.form, 'pk_arriveorder') || {}).value;
+ let hts = (props.form.getFormItemsValue(AREA.form, 'ts') || {}).value;
+ let cachekey = '23To4A60pks';
+ ajax({
+ method: 'post',
+ url: URL.sagaCheck,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: pkTsParams
+ },
+ success: function(res) {
+ if (res && res.data) {
+ let pks = [
+ {
+ bodys: res.data,
+ head: {
+ pk: hpk,
+ ts: hts
+ }
+ }
+ ];
+ cacheTools.set(cachekey, pks);
+
+ props.openTo('/nccloud/resources/rum/assign/assign/main/index.html#/card', {
+ appcode: '458001004A',
+ pagecode: '458001004A_card',
+ srcbilltype: '23',
+ srctranstype: vtrantypecode, //传来的交易类型
+ status: 'DirectAssign'
+ });
+ }
+ }
+ });
+}
+
+/*gihvnYuBTIgt3DSxzb+m1caiAAb/brKYQG5CGeGHw++F5nJohGQYc9p1cupKsifr*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/outPrintBtnClick.js b/src/pu/pu/arrival/card/btnClicks/outPrintBtnClick.js
new file mode 100644
index 0000000..b54e107
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/outPrintBtnClick.js
@@ -0,0 +1,25 @@
+/*pY5w6awX/7PFViyP+VIQHEmJcR5Mre4AHrEjC7Y2+DY=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮 输出
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { output } from 'nc-lightapp-front';
+import { URL, AREA } from '../../constance';
+export default function() {
+ let id = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ output({
+ url: URL.print,
+ data: {
+ oids: [ id ],
+ outputType: 'output',
+ billtype: '23', //单据类型
+ funcode: '400401200', //功能节点编码,即模板编码
+ nodekey: null
+ } //模板节点标识
+ });
+}
+
+/*pY5w6awX/7PFViyP+VIQHEmJcR5Mre4AHrEjC7Y2+DY=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/pageInfoClick.js b/src/pu/pu/arrival/card/btnClicks/pageInfoClick.js
new file mode 100644
index 0000000..76dd457
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/pageInfoClick.js
@@ -0,0 +1,86 @@
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 点击翻页器的下一页或者上一页
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-22 15:36:25
+ */
+import { ajax } from 'nc-lightapp-front';
+import { PAGECODE, URL, ALLBUTTONS, EXEBUTTONS, FREEBUTTONS, COMMITBUTTONS, AREA, FIELD } from '../../constance';
+import { showSagaErrorToasts } from '../../../pub/utils/sagaMsgUtils';
+import { setSagaBtnState } from '../viewControl/buttonController';
+export default function pageInfoClick(props, pk, flag) {
+ if (pk == null) {
+ pk = this.props.getUrlParam('id');
+ }
+ if (pk) {
+ this.props.setUrlParam(pk); //动态修改地址栏中的id的值(路径中一定要是id,否则会导致切换下一条的时候,pk取不到)
+ }
+ if (flag == null || flag == undefined) {
+ flag = false;
+ }
+ let data = { id: pk, pageid: PAGECODE.card, templateid: this.templateid };
+ ajax({
+ url: URL.queryCard,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ let data = res.data;
+ if (data.head) {
+ this.props.form.setAllFormValue({ [AREA.form]: data.head[AREA.form] });
+ //到货单编号
+ this.setState({
+ vbillcode: data.head[AREA.form].rows[0].values.vbillcode.value
+ });
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: data.head[AREA.form].rows[0].values.vbillcode.value
+ });
+ if (!flag) {
+ let billstatus = data.head[AREA.form].rows[0].values.fbillstatus.value;
+ if (billstatus == 0) {
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(FREEBUTTONS, true);
+ } else if (billstatus == 1) {
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(COMMITBUTTONS, true);
+ } else if (billstatus == 2) {
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(COMMITBUTTONS, true);
+ } else if (billstatus == 3) {
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ props.button.setButtonVisible(EXEBUTTONS, true);
+ }
+ }
+ }
+ if (data.bodys && data.bodys[AREA.body]) {
+ this.props.cardTable.setTableData(AREA.body, data.bodys[AREA.body], null, true, true);
+ } // 费用项
+ if (data.bodys && data.bodys[AREA.card_fee]) {
+ this.props.cardTable.setTableData(AREA.card_fee, data.bodys[AREA.card_fee], null, true, true);
+ } else {
+ this.props.cardTable.setTableData(AREA.card_fee, { rows: [] }, null, true, true);
+ } // 费用明细
+ if (data.grandSons && data.grandSons[AREA.card_fee_detail]) {
+ this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ data.grandSons[AREA.card_fee_detail],
+ null,
+ true,
+ true
+ );
+ } else {
+ this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] }, null, true, true);
+ }
+ let sagaStatus = this.props.form.getFormItemsValue([ AREA.head ], FIELD.sagaStatus); //获得saga状态 // 第一次进入卡片页,frozen为空,取界面sags_statue的值判断冻结状态
+ let frozen = sagaStatus && sagaStatus.value == '1' ? true : false;
+ setSagaBtnState.call(this, 'browse', frozen);
+ //跳转卡片弹出提示框
+ showSagaErrorToasts(this.props, AREA.form, FIELD.pk_arriveorder);
+ }
+ }
+ });
+}
+
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/pastToLastBtnClick.js b/src/pu/pu/arrival/card/btnClicks/pastToLastBtnClick.js
new file mode 100644
index 0000000..f89539f
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/pastToLastBtnClick.js
@@ -0,0 +1,32 @@
+/*O6i6AIWZeOP37RQ/pEtk0uS1HgCN8OSZsqxU05+5Mew=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 粘贴至末行
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-13 10:34:32
+ */
+
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { AREA } from '../../constance';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+export default function() {
+ rowCopyPasteUtils.pasteRowsToTail.call(
+ this,
+ this.props,
+ AREA.body,
+ [ 'CopyLines', 'DeleteLine', 'ResetRowno' ],
+ [ 'PastToThis', 'PastToLast', 'CancelPast' ],
+ [ 'crowno', 'pk_arriveorder_b' ]
+ );
+ RownoUtils.setRowNo(this.props, AREA.body, 'crowno');
+ // props.button.setButtonVisible([ 'CopyLines', 'DeleteLine', 'ResetRowno' ], true);
+ // props.button.setButtonVisible([ 'PastToThis', 'PastToLast', 'CancelPast' ], false);
+ // this.setState({ isCopyLine: false });
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.body);
+ if (selectedRow == null || selectedRow.length == 0) {
+ this.props.button.setButtonVisible([ 'PastToThis', 'PastToLast', 'CancelPast' ], false);
+ }
+}
+
+/*O6i6AIWZeOP37RQ/pEtk0uS1HgCN8OSZsqxU05+5Mew=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/pasteLineBtn.js b/src/pu/pu/arrival/card/btnClicks/pasteLineBtn.js
new file mode 100644
index 0000000..931fd30
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/pasteLineBtn.js
@@ -0,0 +1,148 @@
+/*4wj7+msOkDtlKP8HqY1CI8zIVma2j2G+SKayldzidh4=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 页面功能描述
+ * @Date: 2023-05-22 17:24:49
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-13 10:34:31
+ */
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { URL, AREA, BUTTON, FIELD, PAGECODE } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+export default function(props, record, index) {
+ pasteLine.call(this, props, record, index).then((indexs) => {
+ updateDetail.call(this, props, record, index, indexs);
+ });
+}
+async function pasteLine(props, record, index) {
+ // 效率优化开启
+ props.beforeUpdatePage();
+ let indexs = [];
+ let copydata = [];
+ if (record) {
+ // copydata = JSON.parse(JSON.stringify(this.copyRowDatas));
+ copydata = props.cardTable.getCheckedRows(AREA.body);
+ if (copydata instanceof Array) {
+ for (let i = 0; i < copydata.length; i++) {
+ indexs.push(index + i);
+ }
+ } else {
+ indexs.push(index);
+ }
+ rowCopyPasteUtils.pasteRowsToIndex.call(
+ this,
+ props,
+ AREA.body,
+ index,
+ [ 'CopyLines', 'DeleteLine', 'ResetRowno' ],
+ [ 'PastToThis', 'PastToLast', 'CancelPast' ],
+ [ 'crowno', 'pk_arriveorder_b' ]
+ );
+ RownoUtils.setRowNo(props, AREA.body, 'crowno');
+ // this.setState({ isCopyLine: false });
+ // 粘贴至此
+ } else {
+ copydata = JSON.parse(JSON.stringify(this.copyRowDatas));
+ let rowCount = props.cardTable.getNumberOfRows(AREA.body);
+ if (copydata instanceof Array) {
+ for (let i = 0; i < copydata.length; i++) {
+ indexs.push(rowCount + i);
+ }
+ } else {
+ indexs.push(rowCount);
+ }
+ // 粘贴至末行
+ rowCopyPasteUtils.pasteRowsToTail.call(
+ this,
+ this.props,
+ AREA.body,
+ [ 'CopyLines', 'DeleteLine', 'ResetRowno' ],
+ [ 'PastToThis', 'PastToLast', 'CancelPast' ],
+ [ 'crowno', 'pk_arriveorder_b' ]
+ );
+ RownoUtils.setRowNo(this.props, AREA.body, 'crowno');
+ // props.button.setButtonVisible([ 'CopyLines', 'DeleteLine', 'ResetRowno' ], true);
+ // props.button.setButtonVisible([ 'PastToThis', 'PastToLast', 'CancelPast' ], false);
+ // this.setState({ isCopyLine: false });
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.body);
+ if (selectedRow == null || selectedRow.length == 0) {
+ this.props.button.setButtonVisible([ 'PastToThis', 'PastToLast', 'CancelPast' ], false);
+ }
+ }
+ // 设置行号和显隐性
+ this.forceUpdate();
+ // 效率优化关闭
+ return indexs;
+}
+
+function updateDetail(props, record, index, indexs) {
+ let feedata = props.cardTable.getVisibleRows(AREA.card_fee);
+ if (feedata == null || feedata.length == 0) {
+ return;
+ }
+ let copydatas = props.cardTable.getRowsByIndexs(AREA.body, indexs);
+ let bodyids = [ AREA.body, AREA.card_fee ];
+ let data = props.createExtCardDataSimple(PAGECODE.card, AREA.head, bodyids);
+ data.bodys[AREA.body].rows = copydatas;
+ ajax({
+ url: URL.copybodyInsertFeeDetail,
+ data: data,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ let card = res.data;
+ if (card.grandSons[AREA.card_fee_detail]) {
+ let addrows = [];
+ card.grandSons[AREA.card_fee_detail].rows.map((item) => {
+ item.values['cmaterialvid.name'].value = item.values['cmaterialvid'].display;
+ addrows.push(item);
+ });
+ if (addrows.length > 0) {
+ let rowCount = props.cardTable.getNumberOfRows(AREA.card_fee_detail);
+ for (let i = 0; i < addrows.length; i++) {
+ props.cardTable.addRow(AREA.card_fee_detail, rowCount + i, addrows[i].values, true);
+ }
+ RownoUtils.setRowNo(props, AREA.card_fee_detail, FIELD.crowno);
+ }
+ }
+ }
+ }
+ });
+}
+
+function pasteBtnClick(props) {
+ RownoUtils.setRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ props.button.setButtonVisible(
+ [
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ // BUTTON.Correct,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.StockQuery,
+ BUTTON.SalesQuery,
+ BUTTON.GrossProfit
+ ],
+ true
+ );
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/*4wj7+msOkDtlKP8HqY1CI8zIVma2j2G+SKayldzidh4=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/printBtnClick.js b/src/pu/pu/arrival/card/btnClicks/printBtnClick.js
new file mode 100644
index 0000000..9c683d4
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/printBtnClick.js
@@ -0,0 +1,63 @@
+/*VqFTX17u5c5T6CGoj9nmVWlRCDByW5J6/GQe3RBfo9E=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 打印
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-12 14:36:55
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, AREA, FIELD, BILLTYPE, APPCODE } from '../../constance';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+
+export default function() {
+ let id = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, 'pk_org').value;
+ let funcode = this.props.getAppCode();
+ ajax({
+ url: URL.printPermiss,
+ data: [ id ],
+ success: (res) => {
+ if (res.success) {
+ // 组装上送参数(这组参数和之前打印上送的参数是一样的,拿出来是为了添加审批中心时需要添加的属性)
+ let printParams = {
+ appcode: funcode,
+ nodekey: null,
+ oids: [ id ],
+ pk_org: [ pk_org ],
+ printType: true,
+ realData: true,
+ billtype: BILLTYPE.arrival,
+ controlPrintNum: true
+ };
+ // 审批场景再传这个参数(transactiontype-交易类型编码, billtype-单据类型,这两个参数每次只能传一个)
+ if (FIELD.approvesce == this.props.getUrlParam(FIELD.scene)) {
+ // 其他情况,需要根据单据类型找维护应用
+ printParams.istransbilltype = true;
+ printParams.userjson = JSON.stringify({ istransbilltype: true });
+ printParams.nodekey = APPCODE.arrivalapp
+ }
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ * transactiontype 交易类型编码
+ * billtype 单据类型
+ * (2023.11.30之前版本,是作为审批应用获取维护应用appcode使用,用于统一控制某单据节点的打印次数)
+ * (2023.11.30版本,必传项,这一版会根据业务单元和单据类型进行控制)
+ * istransbilltype
+ * 是否翻译appcode标志,2023.11.30版本添加,true标识审批中心打印,需要获取维护应用的appcode,false或者不传则不进行获取维护应用的appcode
+ * pk_org
+ * 主组织数组,2023.11.30版本添加,用于查询当前组织是否走打印次数控制,如果走打印次数控制需要走插件,这个参数不参与次数控制,真正控制次数的是打印时传给平台的数据源
+ */
+ printPreview(this.props, URL.print, printParams);
+ }
+ }
+ });
+}
+
+/*VqFTX17u5c5T6CGoj9nmVWlRCDByW5J6/GQe3RBfo9E=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/printbarCodeBtnClick.js b/src/pu/pu/arrival/card/btnClicks/printbarCodeBtnClick.js
new file mode 100644
index 0000000..f858cc6
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/printbarCodeBtnClick.js
@@ -0,0 +1,117 @@
+/*ALdFj/64Km01KK1c0Zu2dFQKrzgkBbc0+luU7AWnnmk=*/
+import { print, ajax } from 'nc-lightapp-front';
+// import codeNfig from '../../../../../uap/commmon/components/codeConfigModal';
+import codeNfig from 'uap/common/components/codeConfigModal';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { AREA, BILLTYPE } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+export default function(props, params) {
+ let materialinfo = {};
+ let headdata = props.form.getFormItemsValue(AREA.head, [ 'pk_org', 'pk_group', 'pk_arriveorder' ]);
+
+ //没有选中数据
+ let unSelectedRows = props.cardTable.getVisibleRows(AREA.body);
+ if (unSelectedRows.length == 1) {
+ materialinfo = {
+ pk_org: headdata[0].value,
+ nnum: parseFloat(unSelectedRows[0].values.nnum.value),
+ nassistnum: parseFloat(unSelectedRows[0].values.nastnum.value),
+ pk_group: headdata[1].value,
+ cmaterialvid: unSelectedRows[0].values.pk_material.value
+ };
+ } else {
+ materialinfo = {};
+ }
+
+ // 获取选中行
+ let flag = true;
+ let selectedRows = props.cardTable.getCheckedRows(AREA.body);
+ let bodylength = selectedRows.length;
+ let bidpks = [];
+ //有选中数据
+ if (selectedRows.length > 0) {
+ for (var i = 0; i < bodylength; i++) {
+ bidpks.push(selectedRows[i].data.values.pk_arriveorder_b.value);
+ if (selectedRows[0].data.values.pk_material.value != selectedRows[i].data.values.pk_material.value) {
+ flag = false;
+ }
+ }
+ if (!flag) {
+ materialinfo = {};
+ }
+ if (selectedRows.length == 1) {
+ materialinfo = {
+ pk_org: headdata[0].value,
+ nnum: parseFloat(selectedRows[0].data.values.nnum.value),
+ nassistnum: parseFloat(selectedRows[0].data.values.nastnum.value),
+ pk_group: headdata[1].value,
+ cmaterialvid: selectedRows[0].data.values.pk_material.value
+ };
+ }
+ } else {
+ showWarningInfo(getLangByResId(this, '4004ARRIVAL-000007'));
+ return;
+ }
+
+ codeNfig(props, { data: materialinfo }, (info) => {
+ // let userjson =
+ // BILLTYPE.arrival + ',' + info.barcodeRule + ',' + info.barcodeLabel + ',' + info.iprintcount + ',' + bidpks;
+ let userjson =
+ BILLTYPE.arrival + //单据类型
+ ',' +
+ info.barcodeRule + //条码规则
+ ',' +
+ info.barcodeLabel + //条码标签
+ ',' +
+ info.iprintcount + //打印次数
+ ',' +
+ info.width + //宽度
+ ',' +
+ info.height + //高度
+ ',' +
+ info.direction + //纸张方向
+ ',' +
+ info.leftMargin + //左边距
+ ',' +
+ info.rightMargin + //右边距
+ ',' +
+ info.topMargin + //上边距
+ ',' +
+ info.bottomMargin + //下边距
+ ',' +
+ info.dataColumn +
+ ',' +
+ bidpks; //分栏
+
+ if (info.bshowprintlist) {
+ const data = {
+ billType: BILLTYPE.arrival, //单据类型
+ cbillid: headdata[2].value, //主表主键
+ cbillbids: bidpks, //子表主键(数组)
+ barcodeRule: info.barcodeRule,
+ barcodeLabel: info.barcodeLabel,
+ iprintcount: info.iprintcount,
+ classRoute: 'nccloud.web.pu.arrival.service.BCprintVOBuildServiceImpl' //实现类的全路径
+ };
+ props.openTo('/bc/bc/bcprint/main/index.html#/list', {
+ data: JSON.stringify(data),
+ type: 'source',
+ appcode: '401700410',
+ pagecode: '401700410_list'
+ });
+ } else {
+ print(
+ 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
+ '/nccloud/pu/arrival/printbarcode.do',
+ {
+ userjson, //单据类型
+
+ oids: [ headdata[2].value ] // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ },
+ false
+ );
+ }
+ });
+}
+
+/*ALdFj/64Km01KK1c0Zu2dFQKrzgkBbc0+luU7AWnnmk=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/queryAboutBusinessBtnClick.js b/src/pu/pu/arrival/card/btnClicks/queryAboutBusinessBtnClick.js
new file mode 100644
index 0000000..b065173
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/queryAboutBusinessBtnClick.js
@@ -0,0 +1,18 @@
+/*3cjkzddTzmjKg1w3pNM0S1GP/m9rDBAAgp7YvOY1Awd7MlhY5QZHwzqRw2zDRbIS*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 到货单卡片态按钮点击事件处理
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+import { AREA } from '../../constance';
+export default function() {
+ let pk = this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value;
+ this.setState({
+ pk: pk,
+ showTrack: true
+ });
+}
+
+/*3cjkzddTzmjKg1w3pNM0S1GP/m9rDBAAgp7YvOY1Awd7MlhY5QZHwzqRw2zDRbIS*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/quickReceiveBtnClick.js b/src/pu/pu/arrival/card/btnClicks/quickReceiveBtnClick.js
new file mode 100644
index 0000000..9ad7533
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/quickReceiveBtnClick.js
@@ -0,0 +1,14 @@
+/*9h8mAjX0VE2zV2WwEM8aUJ0HggEwkF1Weq8zzOmFZsc=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 快速收货
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+export default function buttonClick(props, id, skipCodes) {
+ this.setState({ vordercode: null });
+ this.open();
+}
+
+/*9h8mAjX0VE2zV2WwEM8aUJ0HggEwkF1Weq8zzOmFZsc=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/quitBtnClick.js b/src/pu/pu/arrival/card/btnClicks/quitBtnClick.js
new file mode 100644
index 0000000..4b816ba
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/quitBtnClick.js
@@ -0,0 +1,37 @@
+/*zliMT9fL4kUDipldcD83ZImHXsejkmuEksHJQptKTZE=*/
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { URL, AREA, PAGECODE } from '../../constance';
+import { showQuitTransferWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+
+export default function(props) {
+ let _this = this;
+ let allprocess = _this.props.transferTable.getTransformFormStatus(AREA.leftarea);
+ let url = URL.list;
+ let pagecode = PAGECODE.head;
+ if (_this.isrece == 'N') {
+ url = '/ref21';
+ pagecode = PAGECODE.transferOrder;
+ }
+ if (allprocess === false) {
+ showQuitTransferWarningDialog({
+ /* 国际化处理: 提示,有未处理完的单据,是否退出转单?*/
+ beSureBtnClick: () => {
+ _this.props.cardTable.setStatus(AREA.body, 'browse');
+ if (_this.srcappcode) {
+ _this.props.pushTo(url, { appcode: _this.srcappcode, pagecode: pagecode });
+ } else {
+ _this.props.pushTo(url, { pagecode: pagecode });
+ }
+ }
+ });
+ } else {
+ if (_this.srcappcode) {
+ _this.props.pushTo(url, { appcode: _this.srcappcode, pagecode: pagecode });
+ } else {
+ _this.props.pushTo(url, { pagecode: pagecode });
+ }
+ }
+ //
+}
+
+/*zliMT9fL4kUDipldcD83ZImHXsejkmuEksHJQptKTZE=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/refOrderBtnClick.js b/src/pu/pu/arrival/card/btnClicks/refOrderBtnClick.js
new file mode 100644
index 0000000..3f45e66
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/refOrderBtnClick.js
@@ -0,0 +1,17 @@
+/*rSAzZHLahseNiExCS9IEdyeOdNhgOa4tOa3hWtRa5Yo=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 参照采购订单拉单
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 16:44:12
+ */
+
+import { URL, COMMON, PAGECODE } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+export default function() {
+ clearTransferCache(this.props, COMMON.arrivalRef21CacheKey);
+ this.props.pushTo(URL.transfer21, { type: 'transfer21', pagecode: PAGECODE.transferOrder });
+}
+
+/*rSAzZHLahseNiExCS9IEdyeOdNhgOa4tOa3hWtRa5Yo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/refSubcontBtnClick.js b/src/pu/pu/arrival/card/btnClicks/refSubcontBtnClick.js
new file mode 100644
index 0000000..734b1ff
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/refSubcontBtnClick.js
@@ -0,0 +1,33 @@
+/*RMY1VmcHx17z9UniE2whslPDDSyg01VsTSWlz0JbEm0=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 参照委外订单拉单
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 16:44:55
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, COMMON, PAGECODE } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ ajax({
+ url: '/nccloud/scmpub/pub/sysinitgroup.do',
+ data: [ '4012' ],
+
+ success: (res) => {
+ if (res.success) {
+ if (res.data['4012']) {
+ clearTransferCache(_this.props, COMMON.arrivalRef61CacheKey);
+ _this.props.pushTo(URL.transfer61, { type: 'ref61', pagecode: PAGECODE.transferSubcont });
+ } else {
+ showErrorDialog(null, getLangByResId(_this, '4004ARRIVAL-000014')); /* 国际化处理: 请启用委外模块!*/
+ }
+ }
+ }
+ });
+}
+
+/*RMY1VmcHx17z9UniE2whslPDDSyg01VsTSWlz0JbEm0=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/refreashBtnClick.js b/src/pu/pu/arrival/card/btnClicks/refreashBtnClick.js
new file mode 100644
index 0000000..958f961
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/refreashBtnClick.js
@@ -0,0 +1,69 @@
+/*W3K/rXV5iRjSKq7Rq/FEe/FoP7vkWSuT2qjZduwu/+s=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 刷新
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-05 15:38:10
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showSuccessInfo, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, AREA, PAGECODE, FIELD } from '../../constance';
+import { changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache';
+import { showSagaErrorToasts } from '../../../pub/utils/sagaMsgUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../viewControl/buttonController';
+export default function() {
+ let data = {
+ id: this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ pageid: PAGECODE.card,
+ templateid: this.templateid
+ };
+ let url = URL.queryCard;
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res && res.data && res.data.head) {
+ this.props.form.setAllFormValue({ [AREA.head]: res.data.head.head });
+ let billstatus = this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ this.setState({ billstatus: billstatus, status: 'browse' });
+ changeUrlParam(this.props, { status: 'browse', id: this.props.getUrlParam('id') });
+ // this.toggleShow(billstatus);
+ }
+ if (res && res.data && res.data.bodys && res.data.bodys[this.tableId]) {
+ this.props.cardTable.setTableData(this.tableId, res.data.bodys[this.tableId]);
+ // RownoUtils.resetRowNo(this.props, this.tableId, 'crowno');
+ }
+ if (this.props.getUrlParam('status') == 'return23') {
+ this.props.form.setFormStatus(AREA.head, 'edit');
+ this.props.cardTable.setStatus(AREA.body, 'edit');
+ }
+ if (this.props.getUrlParam('type')) {
+ this.props.transferTable.updateTransferListValueByIndex(AREA.leftarea, res.data, this.state.index);
+ }
+ if (res && res.data && res.data.bodys && res.data.bodys[this.tableId]) {
+ this.props.cardTable.setTableData(this.tableId, res.data.bodys[this.tableId]);
+ // RownoUtils.resetRowNo(this.props, this.tableId, 'crowno');
+ }
+ // 费用项
+ if (res && res.data && res.data.bodys && res.data.bodys[AREA.card_fee]) {
+ this.props.cardTable.setTableData(AREA.card_fee, res.data.bodys[AREA.card_fee]);
+ } else {
+ this.props.cardTable.setTableData(AREA.card_fee, { rows: [] });
+ } // 费用明细
+ if (res && res.data && res.data.grandSons && res.data.grandSons[AREA.card_fee_detail]) {
+ this.props.cardTable.setTableData(AREA.card_fee_detail, res.data.grandSons[AREA.card_fee_detail]);
+ } else {
+ this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] });
+ }
+ // showSuccessInfo(getLangByResId(this, '4004ARRIVAL-000059'));
+ showRefreshInfo();
+ buttonController.call(this);
+ //跳转卡片弹出提示框
+ showSagaErrorToasts(this.props, AREA.form, FIELD.pk_arriveorder);
+ }
+ });
+}
+
+/*W3K/rXV5iRjSKq7Rq/FEe/FoP7vkWSuT2qjZduwu/+s=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/resetRownoBtnClick.js b/src/pu/pu/arrival/card/btnClicks/resetRownoBtnClick.js
new file mode 100644
index 0000000..bfe913e
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/resetRownoBtnClick.js
@@ -0,0 +1,16 @@
+/*WdZroQi9hfkBJND2a/qUJoRlIn6uFUunawbmDLVbYlM=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 重排行号
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhangshqb
+ * @Last Modified time: 2018-07-09 15:32:45
+ */
+
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { AREA } from '../../constance';
+export default function() {
+ RownoUtils.resetRowNo(this.props, AREA.body, 'crowno');
+}
+
+/*WdZroQi9hfkBJND2a/qUJoRlIn6uFUunawbmDLVbYlM=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/returnArrivalBtnClick.js b/src/pu/pu/arrival/card/btnClicks/returnArrivalBtnClick.js
new file mode 100644
index 0000000..1db59e6
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/returnArrivalBtnClick.js
@@ -0,0 +1,78 @@
+/*WGYUQu+Ts+GmyKv0Cq7TSc9cKZ1EPqBFotO2QuUa8eRBPE2WDTtDND3PkZ5uu9dX*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 原到货单退货
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-28 10:40:40
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, AREA, PAGECODE, ALLBUTTONS, EDITBUTTONS } from '../../constance';
+import buttonController from '../viewControl/buttonController';
+export default function() {
+ let _this = this;
+ let id = _this.props.getUrlParam('id');
+ _this.props.setUrlParam({ status: 'returnArrival' });
+ let data = { id: _this.props.getUrlParam('id'), pageid: PAGECODE.card };
+ let url = URL.return23;
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res && res.data && res.data.head) {
+ let vbillcode = res.data.head[_this.formId].rows[0].values.vbillcode.value;
+ _this.props.form.setAllFormValue({ [_this.formId]: res.data.head[_this.formId] });
+ let billstatus = _this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ _this.setState({ billstatus: billstatus });
+ // _this.toggleShow(billstatus);
+ _this.setState({ vbillcode: vbillcode });
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode
+ });
+ }
+ if (res && res.data && res.data.bodys && res.data.bodys[AREA.body]) {
+ _this.props.cardTable.setTableData(_this.tableId, res.data.bodys[_this.tableId]);
+ // let billstatus = _this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // _this.toggleShow(billstatus);
+ // setTimeout(() => {
+ // RownoUtils.resetRowNo(_this.props, _this.tableId, 'crowno');
+ // }, 0);
+ }
+ // 清空费用项
+ _this.props.cardTable.setTableData(AREA.card_fee, { rows: [] }, null, true, true);
+ // 清空费用明细
+ _this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] }, null, true, true);
+ buttonController.call(this);
+ if (
+ _this.props.getUrlParam('status') == 'return23' ||
+ _this.props.getUrlParam('status') == 'returnArrival'
+ ) {
+ _this.props.form.setFormStatus(AREA.head, 'edit');
+ _this.props.cardTable.setStatus(AREA.body, 'edit');
+ // setTimeout(() => {
+ // RownoUtils.resetRowNo(this.props, this.tableId, 'crowno');
+ // }, 10);
+ _this.props.button.setButtonVisible(ALLBUTTONS, false);
+ _this.props.button.setButtonVisible(EDITBUTTONS, true);
+ _this.props.button.setButtonVisible(EDITBUTTONS, true);
+ _this.props.button.setButtonVisible(
+ [
+ 'PaseToThis', //粘贴至此
+ 'PastToLast', //粘贴至末行
+ 'CancelPast' //取消(复制)
+ ],
+ false
+ );
+ _this.props.button.setButtonDisabled([ 'ResetRowno' ], false);
+ _this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+ _this.props.button.setButtonVisible('Return', false);
+ _this.props.updatePage(AREA.head, [ AREA.body ]);
+ // _this.setState({ isShowBack: false });
+
+ // this.props.form.setFormItemsDisabled(AREA.form,{''})
+ }
+ }
+ });
+}
+
+/*WGYUQu+Ts+GmyKv0Cq7TSc9cKZ1EPqBFotO2QuUa8eRBPE2WDTtDND3PkZ5uu9dX*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/returnOrderBtnClick.js b/src/pu/pu/arrival/card/btnClicks/returnOrderBtnClick.js
new file mode 100644
index 0000000..9edc30c
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/returnOrderBtnClick.js
@@ -0,0 +1,17 @@
+/*zyzUefBlufNaewplEPCXOUSeOKjUf+e1DcFNLcNiFKw=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 基于采购订单退货
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 16:45:25
+ */
+
+import { URL, COMMON, PAGECODE } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+export default function() {
+ clearTransferCache(this.props, COMMON.arrivalReturn21CacheKey);
+ this.props.pushTo(URL.return21, { type: 'return21', pagecode: PAGECODE.returnOrder });
+}
+
+/*zyzUefBlufNaewplEPCXOUSeOKjUf+e1DcFNLcNiFKw=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/returnSubcontBtnClick.js b/src/pu/pu/arrival/card/btnClicks/returnSubcontBtnClick.js
new file mode 100644
index 0000000..7ca1c49
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/returnSubcontBtnClick.js
@@ -0,0 +1,33 @@
+/*ysJokO0MwJItkKa/ObJ33pEHrjwBiG/8b3q49otXtcf/kwCvQHEUKX6O2mZDNZOF*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 基于委外订单退货
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 16:45:59
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, COMMON, PAGECODE } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function() {
+ let _this = this;
+ ajax({
+ url: '/nccloud/scmpub/pub/sysinitgroup.do',
+ data: [ '4012' ],
+
+ success: (res) => {
+ if (res.success) {
+ if (res.data['4012']) {
+ clearTransferCache(_this.props, COMMON.arrivalReturn61CacheKey);
+ _this.props.pushTo(URL.return61, { type: 'return61', pagecode: PAGECODE.returnSubcont });
+ } else {
+ showErrorDialog(null, getLangByResId(_this, '4004ARRIVAL-000014')); /* 国际化处理: 请启用委外模块!*/
+ }
+ }
+ }
+ });
+}
+
+/*ysJokO0MwJItkKa/ObJ33pEHrjwBiG/8b3q49otXtcf/kwCvQHEUKX6O2mZDNZOF*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/saveAndCommit.js b/src/pu/pu/arrival/card/btnClicks/saveAndCommit.js
new file mode 100644
index 0000000..06ddeac
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/saveAndCommit.js
@@ -0,0 +1,195 @@
+/*BAghTQDCDj+1ZKHAvfYbzC599qxZsZP49+Rl1zvK43w=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 保存提交
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-07 15:14:45
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showResumeModal, showWarningInfo } from 'scmpub/scmpub/components/ResumeModal';
+import { showSaveAndCommitInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, COMMON, AREA, PAGECODE, FIELD } from '../../constance';
+import { addCacheData, rewriteTransferSrcBids } from '../../../../../scmpub/scmpub/pub/cache';
+import { changeUrlParam, updateCacheData, getCacheDataByPk } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../viewControl/buttonController';
+import cancelPastBtnClick from './cancelPastBtnClick';
+import { creatGrandsonDataForSave } from '../../../pub/utils/grandsonUtils';
+
+export default function saveAndCommit(assign, skipCodes) {
+ let _this = this;
+ let props = _this.props;
+ props.cardTable.filterEmptyRows(AREA.body, [ FIELD.pk_material ], 'include');
+ props.cardTable.filterEmptyRows(AREA.card_fee, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ props.cardTable.filterEmptyRows(AREA.card_fee_detail, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ if (!props.cardTable.getAllRows(AREA.body).length) {
+ showWarningInfo(null, getLangByResId(this, '4004ARRIVAL-000066')); /* 国际化处理: 表体为空*/
+ return;
+ }
+ let flag = _this.props.validatePageToToast([
+ {
+ // creteForm 使用的areaCode
+ name: [ AREA.head ],
+ type: 'form'
+ },
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: AREA.body,
+ type: 'cardTable'
+ }
+ ]);
+ if (!flag.allPassed) {
+ return;
+ }
+ cancelPastBtnClick.call(this);
+ // let data = props.createMasterChildDataSimple(PAGECODE.card, AREA.form, AREA.body);
+ let bodyids = {
+ body: FIELD.pk_arriveorder,
+ card_fee: FIELD.pk_arriveorder_f
+ };
+ let data = creatGrandsonDataForSave(
+ _this.props,
+ PAGECODE.card,
+ AREA.head,
+ bodyids,
+ AREA.card_fee_detail,
+ true,
+ FIELD.pk_arriveorder_bf
+ );
+ let pk_arriveorder = props.form.getFormItemsValue(AREA.head, 'pk_arriveorder');
+ let isAdd = false;
+ if (pk_arriveorder && pk_arriveorder.value != null) {
+ isAdd = true;
+ } else {
+ isAdd = false;
+ let rows = [];
+ data.bodys.body.rows.map((item) => {
+ let sta = item.status;
+ if (sta != 3) {
+ rows.push(item);
+ }
+ });
+ data.bodys.body.rows = rows;
+ }
+ skipCodes = skipCodes ? skipCodes : new Array();
+ if (skipCodes) {
+ data['skipCodes'] = skipCodes;
+ }
+ let rows = data.bodys.body.rows;
+ rows.forEach((row, index) => {
+ row.values.pseudocolumn.value = index + '';
+ });
+ if (assign) {
+ data['assign'] = JSON.stringify(assign);
+ }
+ props.validateToSave(data, () => {
+ ajax({
+ method: 'post',
+ url: URL.saveandcommit,
+ data: data,
+ success: (res) => {
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ _this.skipCodes = data['skipCodes'];
+ _this.setState({
+ compositedata: res.data,
+ compositedisplay: true,
+ saveAndCommit: true
+ });
+ return;
+ }
+ props.beforeUpdatePage();
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+
+ if (res.data.isResume && res.data.isResume == true) {
+ showResumeModal.call(
+ _this,
+ props,
+ 'MessageDlg',
+ // [ 'Y' ],
+ skipCodes,
+ res.data,
+ saveAndCommit.bind(_this),
+ assign
+ );
+ return;
+ }
+ props.cardTable.selectAllRows(AREA.body, false);
+ let billcard = res && res.data && res.data;
+ if (billcard && billcard.bodys && billcard.bodys[AREA.body]) {
+ // 先表体
+ let fulltabeData = props.cardTable.updateDataByRowId(AREA.body, billcard.bodys[AREA.body], true);
+ billcard.bodys[AREA.body] = fulltabeData;
+ }
+ if (billcard && billcard.head) {
+ // 表体处理完成后表头处理
+ props.form.setAllFormValue({ [AREA.head]: billcard.head[AREA.head] });
+ let arriveid = billcard.head[AREA.head].rows[0].values.pk_arriveorder.value;
+ changeUrlParam(props, { id: arriveid, status: 'browse' });
+ if (isAdd) {
+ updateCacheData(props, 'pk_arriveorder', arriveid, billcard, AREA.head, COMMON.arrivalCacheKey);
+ } else {
+ arriveid = billcard.head[AREA.head].rows[0].values.pk_arriveorder.value;
+ addCacheData(props, 'pk_arriveorder', arriveid, billcard, AREA.head, COMMON.arrivalCacheKey);
+ }
+ let vbillcode = billcard.head[AREA.form].rows[0].values.vbillcode.value;
+ if (this.isapprove == 'Y') {
+ props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+ _this.setState({ vbillcode: vbillcode });
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: false
+ });
+ } else {
+ props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+ _this.setState({ vbillcode: vbillcode });
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: true
+ });
+ }
+ }
+ // 处理费用明细
+ if (res.data.grandSons[AREA.card_fee_detail]) {
+ let card_mater = props.cardTable.updateDataByRowId(
+ AREA.card_fee_detail,
+ res.data.grandSons[AREA.card_fee_detail],
+ true
+ );
+ card_mater.areacode = AREA.card_fee_detail;
+ res.data.grandSons[AREA.card_fee_detail] = card_mater;
+ }
+ let type = props.getUrlParam('type');
+ if (type && type != 'quickArr') {
+ rewriteTransferSrcBids(props, 'csourcebid', billcard.bodys[AREA.body].rows);
+ _this.newqick = false; //保存后设置界面非新增快速到货
+ props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = 'browse';
+ }
+ });
+ if (props.transferTable.getTransformFormAmount(AREA.leftarea) == 1) {
+ let vbillcode = billcard.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.setState({ vbillcode: vbillcode });
+ }
+ } else {
+ buttonController.call(_this);
+ }
+ this.skipCodes = [];
+ showSaveAndCommitInfo();
+ props.updatePage(AREA.form, AREA.body);
+ }
+ });
+ });
+}
+
+/*BAghTQDCDj+1ZKHAvfYbzC599qxZsZP49+Rl1zvK43w=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/saveBtnClick.js b/src/pu/pu/arrival/card/btnClicks/saveBtnClick.js
new file mode 100644
index 0000000..a98fbc6
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/saveBtnClick.js
@@ -0,0 +1,212 @@
+/*txBx9FIYfUQl2UukqRyP7+CyhfRIGeMtpaUNE58w5e4=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 保存
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-13 10:11:02
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+import { showSuccessInfo, showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, COMMON, AREA, PAGECODE, FIELD } from '../../constance';
+import { addCacheData, rewriteTransferSrcBids } from '../../../../../scmpub/scmpub/pub/cache';
+import { changeUrlParam, updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { saveBtnClick } from '.';
+import buttonController from '../viewControl/buttonController';
+import cancelPastBtnClick from './cancelPastBtnClick';
+import { creatGrandsonDataForSave } from '../../../pub/utils/grandsonUtils';
+export default function buttonClick(props, id, skipCodes) {
+ let _this = this;
+
+ props.cardTable.filterEmptyRows(AREA.body, [ FIELD.pk_material ], 'include');
+ props.cardTable.filterEmptyRows(AREA.card_fee, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ props.cardTable.filterEmptyRows(AREA.card_fee_detail, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ if (!props.cardTable.getAllRows(AREA.body).length) {
+ showWarningInfo(null, getLangByResId(this, '4004ARRIVAL-000066')); /* 国际化处理: 表体为空*/
+ return;
+ }
+ let flag = _this.props.validatePageToToast([
+ {
+ // creteForm 使用的areaCode
+ name: [ AREA.head ],
+ type: 'form'
+ },
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: AREA.body,
+ type: 'cardTable'
+ }
+ ]);
+ if (!flag.allPassed) {
+ return;
+ }
+ // let data = _this.props.createMasterChildDataSimple(PAGECODE.card, AREA.form, AREA.body);
+ let bodyids = {
+ body: FIELD.pk_arriveorder,
+ card_fee: FIELD.pk_arriveorder_f
+ };
+ let data = creatGrandsonDataForSave(
+ _this.props,
+ PAGECODE.card,
+ AREA.head,
+ bodyids,
+ AREA.card_fee_detail,
+ true,
+ FIELD.pk_arriveorder_bf
+ );
+ let pk_arriveorder = props.form.getFormItemsValue(AREA.head, 'pk_arriveorder');
+ let isAdd = false;
+ if (pk_arriveorder && pk_arriveorder.value != null) {
+ isAdd = true;
+ } else {
+ isAdd = false;
+ let rows = [];
+ data.bodys.body.rows.map((item) => {
+ let sta = item.status;
+ if (sta != 3) {
+ rows.push(item);
+ }
+ });
+ data.bodys.body.rows = rows;
+ }
+ skipCodes = skipCodes ? skipCodes : new Array();
+ if (skipCodes) {
+ data['skipCodes'] = skipCodes;
+ }
+ let rows = data.bodys.body.rows;
+ rows.forEach((row, index) => {
+ row.values.pseudocolumn.value = index + '';
+ });
+
+ _this.props.validateToSave(data, () => {
+ ajax({
+ method: 'post',
+ url: URL.save,
+ data: data,
+ success: (res) => {
+ _this.props.beforeUpdatePage();
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ // {
+ // //参数二:界面使用的表格类型
+ // [PAGECODE.head_payment]: 'cardTable',
+ // [PAGECODE.cardbody]: 'cardTable'
+ // }
+ );
+ }
+
+ if (res.data.isResume && res.data.isResume == true) {
+ showResumeModal.call(
+ _this,
+ _this.props,
+ 'MessageDlg',
+ // [ 'Y' ],
+ skipCodes,
+ res.data,
+ saveBtnClick.bind(_this),
+ _this.props,
+ id
+ );
+ return;
+ }
+ if (res && res.data && res.data.bodys && res.data.bodys.body) {
+ let fulltabeData = _this.props.cardTable.updateDataByRowId(
+ AREA.body,
+ res.data.bodys[AREA.body],
+ true
+ );
+ res.data.bodys[AREA.body] = fulltabeData;
+ }
+ if (res && res.data && res.data.bodys.card_fee) {
+ let fulltabeDataf = _this.props.cardTable.updateDataByRowId(
+ AREA.card_fee,
+ res.data.bodys[AREA.card_fee],
+ true
+ );
+ res.data.bodys[AREA.card_fee] = fulltabeDataf;
+ }
+ if (res && res.data && res.data.grandSons.card_fee_detail) {
+ let fulltabeDatafee = _this.props.cardTable.updateDataByRowId(
+ AREA.card_fee_detail,
+ res.data.grandSons[AREA.card_fee_detail],
+ true
+ );
+ res.data.grandSons[AREA.card_fee_detail] = fulltabeDatafee;
+ }
+ if (res && res.data && res.data.head) {
+ _this.props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ let type = _this.props.getUrlParam('type');
+ let arriveid = res.data.head[AREA.head].rows[0].values.pk_arriveorder.value;
+ changeUrlParam(_this.props, { id: arriveid, status: 'browse' });
+ // let cachepk = getCacheDataByPk(
+ // _this.props,
+ // COMMON.arrivalCacheKey,
+ // bill.head[AREA.form].rows[0].values.pk_arriveorder.value
+ // );
+ if (isAdd) {
+ updateCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ arriveid,
+ res.data,
+ AREA.head,
+ COMMON.arrivalCacheKey
+ );
+ } else {
+ addCacheData(_this.props, 'pk_arriveorder', arriveid, res.data, AREA.head, COMMON.arrivalCacheKey);
+ _this.props.cardPagination.setCardPaginationId({
+ id: arriveid,
+ status: 1
+ });
+ }
+ _this.props.cardTable.selectAllRows(AREA.body, false);
+ cancelPastBtnClick.call(this);
+ let vbillcode = res.data.head[AREA.form].rows[0].values.vbillcode.value;
+ if (this.isapprove == 'Y') {
+ _this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+ _this.setState({ vbillcode: vbillcode });
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: false
+ });
+ } else {
+ _this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+ _this.setState({ vbillcode: vbillcode });
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: true
+ });
+ }
+ if (type && type != 'quickArr') {
+ let bill = res.data;
+ let datass = {};
+ datass.head = res.data.head;
+ datass.bodys = res.data.bodys;
+ if (res.data.grandSons && res.data.grandSons.card_fee_detail) {
+ datass.bodys.card_fee_detail = res.data.grandSons.card_fee_detail;
+ }
+ datass.pageid = res.data.pageid;
+ rewriteTransferSrcBids(_this.props, 'csourcebid', bill.bodys[AREA.body].rows);
+ _this.newqick = false; //保存后设置界面非新增快速到货
+ props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = 'browse';
+ props.transferTable.updateTransferListValueByIndex(AREA.leftarea, datass, currentIndex);
+ }
+ });
+ } else {
+ buttonController.call(_this);
+ }
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000000')); /* 国际化处理: 保存成功*/
+ _this.props.updatePage(AREA.form, AREA.body);
+ }
+ });
+ });
+}
+
+/*txBx9FIYfUQl2UukqRyP7+CyhfRIGeMtpaUNE58w5e4=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/saveSendBtnClick.js b/src/pu/pu/arrival/card/btnClicks/saveSendBtnClick.js
new file mode 100644
index 0000000..5fc9c28
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/saveSendBtnClick.js
@@ -0,0 +1,225 @@
+/*azbEBIfmh42yaR35fcvuBzrqq2IZo8p0SAUUFDfiewg=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 保存并提交
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-07-27 09:57:34
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { showSuccessInfo, showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, COMMON, AREA, PAGECODE, FIELD } from '../../constance';
+import {
+ changeUrlParam,
+ updateCacheData,
+ addCacheData,
+ rewriteTransferSrcBids,
+ getCacheDataByPk
+} from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../viewControl/buttonController';
+import cancelPastBtnClick from './cancelPastBtnClick';
+export default function() {
+ let _this = this;
+ let formIds = [ AREA.head ];
+
+ props.cardTable.filterEmptyRows(AREA.body, [ FIELD.pk_material ], 'include');
+ if (!props.cardTable.getAllRows(AREA.body).length) {
+ showWarningInfo(null, getLangByResId(this, '4004ARRIVAL-000066')); /* 国际化处理: 表体为空*/
+ return;
+ }
+ let flag = _this.props.validatePageToToast([
+ {
+ // creteForm 使用的areaCode
+ name: [ AREA.head ],
+ type: 'form'
+ },
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: AREA.body,
+ type: 'cardTable'
+ }
+ ]);
+ if (!flag.allPassed) {
+ return;
+ }
+ cancelPastBtnClick.call(_this);
+ let data = _this.props.createMasterChildDataSimple(PAGECODE.card, AREA.form, AREA.body);
+
+ let pk_arriveorder = _this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder');
+ if (!pk_arriveorder || pk_arriveorder.value == null) {
+ let arows = [];
+ data.body.body.rows.map((item) => {
+ let sta = item.status;
+ if (sta != 3) {
+ arows.push(item);
+ }
+ });
+ data.body.body.rows = arows;
+ }
+ let rows = data.body.body.rows;
+ rows.forEach((row, index) => {
+ row.values.pseudocolumn.value = index + '';
+ });
+ ajax({
+ method: 'post',
+ url: URL.saveSend,
+ data: data,
+ success: function(res) {
+ if (res.data.errorMsg) {
+ if (_this.props.getUrlParam('type')) {
+ let bill = res.data.card;
+ rewriteTransferSrcBids(_this.props, 'csourcebid', bill.body[AREA.body].rows);
+ // 转单编辑界面保存
+ addCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ bill.head[AREA.form].rows[0].values.pk_arriveorder.value,
+ bill,
+ AREA.form,
+ COMMON.arrivalCacheKey
+ );
+ let msg = getLangByResId(_this, '4004ARRIVAL-000020'); /* 国际化处理: 保存成功,提交失败,失败原因:*/
+ msg += res.data.errorMsg;
+ _this.newqick = false; //保存后设置界面非新增快速到货
+ _this.props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: false,
+ onChange: (current, next, currentIndex) => {
+ _this.props.transferTable.setTransferListValueByIndex(
+ AREA.leftarea,
+ res.data.card,
+ currentIndex
+ );
+ toast({ color: 'warning', content: msg });
+ _this.indexstatus[currentIndex] = 'browse';
+ }
+ });
+
+ let vbillcode = bill.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.setState({ vbillcode: vbillcode });
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: true
+ });
+ } else {
+ let bill = res.data.card;
+ updateCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ bill.head[AREA.form].rows[0].values.pk_arriveorder.value,
+ bill,
+ AREA.form,
+ COMMON.arrivalCacheKey
+ );
+ let msg = getLangByResId(_this, '4004ARRIVAL-000020'); /* 国际化处理: 保存成功,提交失败,失败原因:*/
+ msg += res.data.errorMsg;
+ toast({ color: 'warning', content: msg });
+ let vbillcode = bill.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: true
+ });
+ }
+ }
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ _this.props.form.setFormItemsValue(AREA.form, {
+ ts: { value: res.data.ts },
+ pk_arriveorder: { value: res.data.pk }
+ });
+
+ _this.setState({
+ compositedata: res.data,
+ compositedisplay: true
+ });
+ return;
+ }
+ _this.props.beforeUpdatePage();
+ if (res && res.data && res.data.card && res.data.card.body) {
+ let fullTableData = _this.props.cardTable.updateDataByRowId(
+ AREA.body,
+ res.data.card.body[AREA.body],
+ true
+ );
+ res.data.card.body = fullTableData;
+ }
+ if (res && res.data && res.data.card && res.data.card.head) {
+ _this.props.form.setAllFormValue({ [AREA.head]: res.data.card.head[AREA.head] });
+ }
+ let arriveid = res.data.card.head[AREA.head].rows[0].values.pk_arriveorder.value;
+ if (_this.props.getUrlParam('type')) {
+ let bill = res.data.card;
+ rewriteTransferSrcBids(_this.props, 'csourcebid', bill[AREA.body].rows);
+ let cachepk = getCacheDataByPk(
+ _this.props,
+ COMMON.arrivalCacheKey,
+ bill.head[AREA.form].rows[0].values.pk_arriveorder.value
+ );
+ if (cachepk) {
+ updateCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ bill.head[AREA.form].rows[0].values.pk_arriveorder.value,
+ bill,
+ AREA.form,
+ COMMON.arrivalCacheKey
+ );
+ } else {
+ // 转单编辑界面保存
+ addCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ bill.head[AREA.form].rows[0].values.pk_arriveorder.value,
+ bill,
+ AREA.form,
+ COMMON.arrivalCacheKey
+ );
+ }
+ // let bill = res.data.card;
+ let vbillcode = bill.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: true
+ });
+ _this.props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.props.transferTable.setTransferListValueByIndex(
+ AREA.leftarea,
+ res.data.card,
+ currentIndex
+ );
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000000')); /* 国际化处理: 保存成功*/
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000017')); /* 国际化处理: 提交成功*/
+ _this.indexstatus[currentIndex] = 'browse';
+ }
+ });
+
+ if (_this.props.transferTable.getTransformFormAmount(AREA.leftarea) == 1) {
+ let vbillcode = bill.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.setState({ vbillcode: vbillcode });
+ }
+ } else {
+ changeUrlParam(_this.props, { id: arriveid, status: 'browse' });
+ updateCacheData(_this.props, 'pk_arriveorder', arriveid, res.data, AREA.head, COMMON.arrivalCacheKey);
+ _this.props.cardTable.selectAllRows(AREA.body, false);
+ // _this.setState({ isShowBack: true });
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000000')); /* 国际化处理: 保存成功*/
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000017')); /* 国际化处理: 提交成功*/
+ let bill = res.data.card;
+ let vbillcode = bill.head[AREA.form].rows[0].values.vbillcode.value;
+ _this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode,
+ showBackBtn: true
+ });
+ _this.props.updatePage(AREA.form, AREA.body);
+ buttonController.call(_this);
+ }
+ }
+ });
+}
+
+/*azbEBIfmh42yaR35fcvuBzrqq2IZo8p0SAUUFDfiewg=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/setPieceBtnClick.js b/src/pu/pu/arrival/card/btnClicks/setPieceBtnClick.js
new file mode 100644
index 0000000..41deb01
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/setPieceBtnClick.js
@@ -0,0 +1,34 @@
+/*MJcV5g1bYVOVo9i1P/yXs/CEcx1ibil+TfWKYbNdxHI=*/
+/*
+ * @Author: 李浩
+ * @PageInfo:按钮处理方法
+ * @Date: 2018-04-19 10:33:09
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-22 09:46:39
+ */
+
+import { ajax, toast } from 'nc-lightapp-front';
+import { AREA, PAGECODE, URL } from '../../constance';
+
+export default function setPieceBtnClick(props, record, index) {
+ // 拼接主子表json方法,参数分别为:pageid(模板id),form区id,table区id,调用此方法即可自动拼接向后台传的json(data)
+ let cmaterialoids = [ record.values.pk_material.value ];
+ let pk_corp = record.values.pk_group.value;
+ let data = {
+ cmaterialoids: cmaterialoids,
+ pk_corp: pk_corp
+ };
+
+ ajax({
+ url: URL.generalSetpiece,
+ data: data,
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ this.setState({ showSetPiece: true, setPieceData: data });
+ }
+ }
+ });
+}
+
+/*MJcV5g1bYVOVo9i1P/yXs/CEcx1ibil+TfWKYbNdxHI=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/splitPrintClick.js b/src/pu/pu/arrival/card/btnClicks/splitPrintClick.js
new file mode 100644
index 0000000..a34d8d9
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/splitPrintClick.js
@@ -0,0 +1,39 @@
+/*xR8p8GrFYaL8q7b51hEFfp3+up6ixI8RRxqqYT1Fiw8=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 分单打印
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-07-25 10:47:50
+ */
+import { AREA, FIELD, BILLTYPE } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+
+export default function(props) {
+ let pk_org = props.form.getFormItemsValue(AREA.form, FIELD.pk_org).value;
+ let data = {
+ pk_org: pk_org
+ };
+ let id = props.form.getFormItemsValue(AREA.form, FIELD.pk_arriveorder).value;
+ ajax({
+ url: '/nccloud/pu/arrival/querysplitparam.do',
+ data: data,
+ method: 'post',
+ success: (res) => {
+ if (res.success) {
+ let splitData = {
+ appcode: this.props.getAppCode(),
+ params: res.data,
+ printType: 'pdf',
+ printUrl: '/nccloud/pu/arrival/splitprint.do',
+ pks: [ id ],
+ billtype: BILLTYPE.arrival,
+ pk_org: [ pk_org ]
+ };
+ this.setState({ showSpilt: true, splitData: splitData });
+ }
+ }
+ });
+}
+
+/*xR8p8GrFYaL8q7b51hEFfp3+up6ixI8RRxqqYT1Fiw8=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/stockQuery.js b/src/pu/pu/arrival/card/btnClicks/stockQuery.js
new file mode 100644
index 0000000..71f3620
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/stockQuery.js
@@ -0,0 +1,47 @@
+/*vgQC/rcyAzmF363iWlQVcKEOoUtRglO4384p2xNteT4=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 存量查询
+ * @Date: 2018-06-27 13:13:14
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-30 11:30:13
+ */
+import { toast } from 'nc-lightapp-front';
+import { PAGECODE, AREA } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function stockQuery(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.body);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000063') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let rowparam = [];
+ selectedRow.map((item) => {
+ if (item.data.values.pk_material.value) {
+ let data = {
+ pk_stockorgs: item.data.values.pk_org.value,
+ crowno: item.data.values.crowno.value,
+ cunitid: item.data.values.cunitid.value,
+ pk_material: item.data.values.pk_srcmaterial.value,
+ materialCode: item.data.values.pk_material.display,
+ materialName: item.data.values['pk_material.name'].display,
+ end_date: item.data.values.dbilldate.value
+ };
+ rowparam.push(data);
+ }
+ });
+ let stockquerydata = {
+ infos: rowparam
+ // pagecode: PAGECODE.card
+ };
+ this.setState({
+ showStockQuery: true,
+ stockquerydata: stockquerydata
+ });
+}
+
+/*vgQC/rcyAzmF363iWlQVcKEOoUtRglO4384p2xNteT4=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/tableButtonClick.js b/src/pu/pu/arrival/card/btnClicks/tableButtonClick.js
new file mode 100644
index 0000000..d07f697
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/tableButtonClick.js
@@ -0,0 +1,246 @@
+/*0GI1xcoeligdpMeXoHBphmJ2VrbmpkqsM7NFrgagn2k=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, AREA, PAGECODE } from '../../constance';
+import setPieceBtnClick from './setPieceBtnClick';
+import pasteLineBtn from './pasteLineBtn';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function tableButtonClick(props, key, text, record, index) {
+ switch (key) {
+ case 'CopyLine':
+ break;
+ case 'DeleteLine':
+ props.cardTable.delRowsByIndex(AREA.body, index);
+ // this.props.cardTable.delRowsByIndex(AREA.body, rowparam);
+ let checks = props.cardTable.getCheckedRows(AREA.body);
+ if (!checks || checks == null || checks.length == 0) {
+ this.props.button.setButtonDisabled([ 'CopyLines', 'DeleteLine' ], true);
+ } else {
+ this.props.button.setButtonDisabled([ 'CopyLines', 'DeleteLine' ], false);
+ }
+ delFeeDetailByBody.call(this, props, record);
+ break;
+ case 'Expend':
+ let status = props.cardTable.getStatus(AREA.body);
+ if (status == 'edit') {
+ props.cardTable.openModel(AREA.body, 'edit', record, index);
+ } else {
+ props.cardTable.toggleRowView(AREA.body, record);
+ }
+ break;
+ case 'PastToThis': // 物料 粘贴至此
+ // rowCopyPasteUtils.pasteRowsToIndex.call(
+ // this,
+ // props,
+ // AREA.body,
+ // index,
+ // [ 'CopyLines', 'DeleteLine', 'ResetRowno' ],
+ // [ 'PastToThis', 'PastToLast', 'CancelPast' ],
+ // [ 'crowno', 'pk_arriveorder_b' ]
+ // );
+ // RownoUtils.setRowNo(props, AREA.body, 'crowno');
+ // this.setState({ isCopyLine: false });
+ pasteLineBtn.call(this, props, record, index);
+ props.updatePage(AREA.head, [ AREA.card_fee_detail ]);
+ break;
+ case 'CheckLine':
+ ajax({
+ method: 'post',
+ url: URL.verify,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: [ { pk: record.values.pk_arriveorder_b.value, ts: record.values.ts.value } ]
+ },
+ success: (res) => {
+ if (res && res.data && res.data.body) {
+ props.cardTable.updateDataByIndexs(AREA.body, [
+ { index: index, data: res.data.body[AREA.body].rows[0] }
+ ]);
+ }
+ if (res && res.data && res.data.head) {
+ props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ toast({ content: getLangByResId(this, '4004ARRIVAL-000013'), color: 'success' }); /* 国际化处理: 报检成功*/
+ }
+ });
+ break;
+ case 'LetGoLine':
+ // TODO
+ break;
+ case 'GenAssertLine':
+ ajax({
+ method: 'post',
+ url: URL.verify,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: [ { pk: record.pk_arriveorder.value, ts: record.ts.value } ]
+ },
+ success: (res) => {
+ if (res && res.data && res.data.body) {
+ props.cardTable.setTableData(AREA.body, res.data.body[AREA.body]);
+ }
+ if (res && res.data && res.data.head) {
+ props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ tost({
+ content: getLangByResId(this, '4004ARRIVAL-000009'),
+ color: 'success'
+ }); /* 国际化处理: 生成设备卡片成功*/
+ }
+ });
+ break;
+ case 'DelAssertLine':
+ ajax({
+ method: 'post',
+ url: URL.verify,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: [ { pk: record.pk_arriveorder.value, ts: record.ts.value } ]
+ },
+ success: (res) => {
+ if (res && res.data && res.data.body) {
+ props.cardTable.setTableData(AREA.body, res.data.body[AREA.body]);
+ }
+ if (res && res.data && res.data.head) {
+ props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ tost({
+ content: getLangByResId(this, '4004ARRIVAL-000010'),
+ color: 'success'
+ }); /* 国际化处理: 删除设备卡片成功*/
+ }
+ });
+ break;
+ case 'GenTransLine':
+ ajax({
+ method: 'post',
+ url: URL.verify,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: [ { pk: record.pk_arriveorder.value, ts: record.ts.value } ]
+ },
+ success: (res) => {
+ if (res && res.data && res.data.body) {
+ props.cardTable.setTableData(AREA.body, res.data.body[AREA.body]);
+ }
+ if (res && res.data && res.data.head) {
+ props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ tost({ content: getLangByResId(this, '4004ARRIVAL-000011'), color: 'success' }); /* 国际化处理: 生成转固单成功*/
+ }
+ });
+ break;
+ case 'DelTransLine':
+ ajax({
+ method: 'post',
+ url: URL.verify,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: [ { pk: record.pk_arriveorder.value, ts: record.ts.value } ]
+ },
+ success: (res) => {
+ if (res && res.data && res.data.body) {
+ props.cardTable.setTableData(AREA.body, res.data.body[AREA.body]);
+ }
+ if (res && res.data && res.data.head) {
+ props.form.setAllFormValue({ [AREA.head]: res.data.head[AREA.head] });
+ }
+ tost({ content: getLangByResId(this, '4004ARRIVAL-000019'), color: 'success' }); /* 国际化处理: 删除转固单成功*/
+ }
+ });
+ break;
+ case 'SetPiece': //成套件
+ setPieceBtnClick.call(this, props, record, index);
+ break;
+ case 'Fee_Deleteline_row': //费用项表体删行
+ delFeeDetailByFee.call(this, props, record);
+ props.cardTable.delRowsByIndex(AREA.card_fee, index);
+ // 删除对应的费用明细
+ feeSelected.call(this, props);
+ break;
+ case 'Fee_Detail_Deleteline_row': //费用明细表体删行
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, index);
+ feeDetailSelected.call(this, props);
+ break;
+ default:
+ break;
+ }
+}
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeSelected(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.card_fee);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'Fee_Deleteline' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Fee_Deleteline' ], true);
+ }
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeDetailSelected(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.card_fee_detail);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'Fee_Detail_Deleteline' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Fee_Detail_Deleteline' ], true);
+ }
+}
+function delFeeDetailByFee(props, record) {
+ if (
+ record &&
+ record.values.cfeematerialvid.value != null &&
+ record.values.cfeematerialvid.value != '' &&
+ record.values.cfeesuppliervid.value != null &&
+ record.values.cfeesuppliervid.value != ''
+ ) {
+ let key = record.values.cfeematerialvid.value + record.values.cfeesuppliervid.value;
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ item.values.cfeematerialvid.value != null &&
+ item.values.cfeematerialvid.value != '' &&
+ item.values.cfeesuppliervid.value != null &&
+ item.values.cfeesuppliervid.value != ''
+ ) {
+ if (key == item.values.cfeematerialvid.value + item.values.cfeesuppliervid.value) {
+ indexs.push(item.dataIndex);
+ }
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, indexs);
+ }
+ }
+}
+
+function delFeeDetailByBody(props, record) {
+ let rowid = record.rowid;
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ record.values.pk_arriveorder_b.value == item.values.pk_arriveorder_b.value ||
+ rowid == item.values.pk_arriveorder_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, indexs);
+ }
+}
+
+/*0GI1xcoeligdpMeXoHBphmJ2VrbmpkqsM7NFrgagn2k=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/unCommitBtnClick.js b/src/pu/pu/arrival/card/btnClicks/unCommitBtnClick.js
new file mode 100644
index 0000000..fd72b91
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/unCommitBtnClick.js
@@ -0,0 +1,90 @@
+/*WziLu/4A0kO0uBbSHZ8lDoNV9TiLqdPYXBDbeH1lxUM=*/
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 收回
+ * @Date: 2018-04-28 10:17:14
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-21 20:39:51
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { URL, COMMON, AREA, PAGECODE } from '../../constance';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../viewControl/buttonController';
+export default function() {
+ let _this = this;
+ let rows = this.props.cardTable.getAllRows(AREA.body);
+ let bodys = [];
+ rows.forEach((row) => {
+ bodys.push({
+ pk: row.values['pk_arriveorder_b'].value,
+ ts: row.values['ts'].value
+ });
+ });
+ ajax({
+ method: 'post',
+ url: URL.uncommit,
+ data: {
+ pageid: PAGECODE.card,
+ pkTsParams: [
+ {
+ pk: _this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ ts: _this.props.form.getFormItemsValue(AREA.head, 'ts').value,
+ bodys: bodys
+ }
+ ]
+ },
+ success: function(res) {
+ if (res && res.data && res.data.head && res.data.bodys) {
+ let map = new Map();
+ map.set('pk_arriveorder_b', AREA.body);
+ map.set('pk_arriveorder_f', AREA.card_fee);
+ let config = {
+ headAreaId: AREA.head,
+ bodyIdAndPkMap: map
+ };
+ updateExtBillDataForCompareByPk(_this.props, res.data, config);
+ // 处理费用明细
+ if (res.data.grandSons[AREA.card_fee_detail]) {
+ _this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ res.data.grandSons[AREA.card_fee_detail],
+ null,
+ true,
+ true
+ );
+ } else {
+ _this.props.cardTable.setTableData(AREA.card_fee_detail, { rows: [] });
+ }
+ }
+
+ // props.setPageStatus('browse', props.location.search.id);
+ updateCacheData(
+ _this.props,
+ 'pk_arriveorder',
+ _this.props.form.getFormItemsValue(AREA.head, 'pk_arriveorder').value,
+ res.data,
+ AREA.head,
+ COMMON.arrivalCacheKey
+ );
+ _this.props.cardTable.setStatus(AREA.body, 'browse');
+ if (_this.props.getUrlParam('type') && _this.props.getUrlParam('type') != 'quickArr') {
+ _this.props.transferTable.setTransformFormStatus(AREA.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = 'browse';
+ // _this.props.transferTable.updateTransferListValueByIndex(AREA.leftarea, res.data, currentIndex);
+ }
+ });
+ // _this.props.transferTable.updateTransferListValueByIndex(AREA.leftarea, res.data, _this.state.index);
+ } else {
+ buttonController.call(_this);
+ }
+ showSuccessInfo(getLangByResId(_this, '4004ARRIVAL-000006')); /* 国际化处理: 收回成功*/
+ }
+ });
+}
+
+/*WziLu/4A0kO0uBbSHZ8lDoNV9TiLqdPYXBDbeH1lxUM=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/btnClicks/urgentLetGo.js b/src/pu/pu/arrival/card/btnClicks/urgentLetGo.js
new file mode 100644
index 0000000..1900a47
--- /dev/null
+++ b/src/pu/pu/arrival/card/btnClicks/urgentLetGo.js
@@ -0,0 +1,57 @@
+/*AAsnv3ptohlRY/950ufa0UVIuiOEuOa4WkkRFf0YzqA=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 紧急放行
+ * @Date: 2018-06-27 13:13:14
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-30 11:30:13
+ */
+import { ajax } from 'nc-lightapp-front';
+import { AREA, URL, FIELD } from '../../constance';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function urgentLetGo(props) {
+ let head = {
+ pk: props.form.getFormItemsValue(AREA.form, FIELD.pk_arriveorder).value,
+ ts: props.form.getFormItemsValue(AREA.form, FIELD.ts).value
+ };
+
+ let data;
+ let checkedRows = props.cardTable.getCheckedRows(AREA.table);
+ if (checkedRows.length == 0) {
+ // showWarningInfo(null, '请选择表体行');
+ data = {
+ head: head
+ };
+ } else {
+ let bodys = [];
+ checkedRows.forEach((checkedRow) => {
+ let values = checkedRow.data.values;
+ bodys.push({
+ pk: values[FIELD.pk_arriveorder_b].value,
+ ts: values[FIELD.ts].value
+ });
+ });
+ data = {
+ head: head,
+ bodys: bodys
+ };
+ }
+
+ ajax({
+ url: URL.pushToC005Check,
+ data: data,
+ success: (res) => {
+ if (res.success) {
+ props.openTo(null, {
+ appcode: 'C01002800',
+ pagecode: 'C01002800_card',
+ channelType: 'from23',
+ data: JSON.stringify(res.data)
+ });
+ }
+ }
+ });
+}
+
+/*AAsnv3ptohlRY/950ufa0UVIuiOEuOa4WkkRFf0YzqA=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/afterEvent.js b/src/pu/pu/arrival/card/events/afterEvent.js
new file mode 100644
index 0000000..1a32fff
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/afterEvent.js
@@ -0,0 +1,45 @@
+/*DncIqBreQz6WZRX+v7OzgVBZdKPVlzto4ezydf/Bg2c=*/
+import { ajax, base } from 'nc-lightapp-front';
+const { NCMessage } = base;
+import { AREA } from '../../constance';
+import bodyAfterEditHandler from './bodyAfterEditHandler';
+import feeDtailAfterEditHandler from './feeDtailAfterEditHandler';
+import feeAfterEditHandler from './feeAfterEditHandler';
+import headAfterEditHandler from './headAfterEditHandler';
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ // 表头
+ if (moduleId === AREA.head) {
+ headAfterEditHandler(props, moduleId, key, value, changedrows, record, index);
+ // 表体
+ } else if (moduleId === AREA.body) {
+ bodyAfterEditHandler(props, moduleId, key, value, changedrows, record, index);
+ } else if (moduleId === AREA.card_fee) {
+ // 费用项
+ feeAfterEditHandler.call(this, props, moduleId, key, value, changedrows, index, record);
+ } else if (moduleId === AREA.card_fee_detail) {
+ // 费用明细
+ feeDtailAfterEditHandler.call(this, props, moduleId, key, value, changedrows, index, record);
+ }
+ let type = this.props.getUrlParam('type');
+ if (type) {
+ let { index, curdata } = this.state;
+ const { transferTable } = props;
+ const { setTransferListValueByIndex } = transferTable;
+ let bodyVals = props.cardTable.getVisibleRows(AREA.body);
+ let headVals = props.form.getAllFormValue(AREA.head);
+ let feedetail = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let fee = props.cardTable.getVisibleRows(AREA.card_fee);
+ let curindex = parseInt(index);
+ curdata[curindex].head[AREA.head].rows = headVals.rows;
+ curdata[curindex].bodys[AREA.body].rows = bodyVals;
+ if (curdata[curindex].bodys[AREA.card_fee] && fee) {
+ curdata[curindex].bodys[AREA.card_fee].rows = fee;
+ }
+ if (curdata[curindex].grandSons[AREA.card_fee_detail] && feedetail) {
+ curdata[curindex].grandSons[AREA.card_fee_detail].rows = feedetail;
+ }
+ setTransferListValueByIndex(AREA.leftarea, curdata[curindex], curindex);
+ }
+}
+
+/*DncIqBreQz6WZRX+v7OzgVBZdKPVlzto4ezydf/Bg2c=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/beforeEvent.js b/src/pu/pu/arrival/card/events/beforeEvent.js
new file mode 100644
index 0000000..36d531f
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/beforeEvent.js
@@ -0,0 +1,22 @@
+/*lA7FrGfHlashLvM+HJWGNfFP8qtzbZGoR0+ewRKT3vU=*/
+import { AREA } from '../../constance';
+import headBeforeEditHandler from './headBeforeEditHandler';
+import bodyBeforeEditHandler from './bodyBeforeEditHandler';
+import feeBeforeEditHandler from './feeBeforeEditHandler';
+import feeDetailBeforeEditHandler from './feeDetailBeforeEditHandler';
+export default function beforeEvent(props, id, key, item, index, value, record) {
+ // export default function beforeEvent(id, key, value, record) {
+ if (id == AREA.form) {
+ return headBeforeEditHandler.call(this, id, key, value, record);
+ } else if (id == AREA.body) {
+ return bodyBeforeEditHandler.call(this, id, key, value, record);
+ } else if (id == AREA.card_fee) {
+ // 费用项
+ return feeBeforeEditHandler.call(this, id, key, value, record);
+ } else if (id == AREA.card_fee_detail) {
+ // 费用明细
+ return feeDetailBeforeEditHandler.call(this, id, key, index, value, record);
+ }
+}
+
+/*lA7FrGfHlashLvM+HJWGNfFP8qtzbZGoR0+ewRKT3vU=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/bodyAfterEditHandler.js b/src/pu/pu/arrival/card/events/bodyAfterEditHandler.js
new file mode 100644
index 0000000..0003fe7
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/bodyAfterEditHandler.js
@@ -0,0 +1,320 @@
+/*NVLRMI0CwsvU8Tsne/t86mLomohfrS4tOurcUyMPOOU=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 处理表体编辑后事件
+ * @Date: 2018-05-02 15:05:25
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2023-08-30 14:03:12
+ */
+
+import { AREA, FREEFIELD, PAGECODE, URL, FIELD } from './../../constance';
+import { ajax, base } from 'nc-lightapp-front';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { processBatchCodeValue } from '../../../pub/utils/batchCodeUtil';
+import {
+ createBodyAfterEventData,
+ processBillCardBodyEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { processExtBillFeeDetailsEditResult } from '../../../pub/utils/feeAfterUtil';
+export default function(props, moduleId, key, value, changedrows, record, index) {
+ if (
+ changedrows &&
+ changedrows[0].oldvalue &&
+ changedrows[0].newvalue &&
+ changedrows[0].oldvalue.value == changedrows[0].newvalue.value
+ ) {
+ return;
+ }
+ switch (key) {
+ case 'bpresent':
+ presentFlag(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'vchangerate':
+ changeRate(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'castunitid':
+ astUnit(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'pk_receivestore':
+ receiveStore(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'dproducedate':
+ case 'ivalidday':
+ produceDate(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'pk_material':
+ material(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'nnum':
+ case 'nastnum':
+ case 'nplannum':
+ case 'nplanastnum':
+ case 'nwastnum':
+ case 'nwastastnum':
+ case 'npresentnum':
+ case 'npresentastnum':
+ num(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'vbatchcode':
+ batchcode(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'cprojectid':
+ cProject(props, moduleId, key, value, changedrows, record, index);
+ break;
+ case 'vfree1':
+ case 'vfree2':
+ case 'vfree3':
+ case 'vfree4':
+ case 'vfree5':
+ case 'vfree6':
+ case 'vfree7':
+ case 'vfree8':
+ case 'vfree9':
+ case 'vfree10':
+ case 'casscustid':
+ case 'casscustvid':
+ case 'cproductorid':
+ case 'cprojectid':
+ case 'cffileid':
+ marAsstUtils.afterEdit.call(
+ this,
+ props,
+ null,
+ PAGECODE.card,
+ moduleId,
+ key,
+ 'pk_material',
+ record,
+ index,
+ FREEFIELD
+ );
+ break;
+ case 'crowno':
+ // 更新对应的费用明细行号
+ let rowid = record.rowid;
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ if (data && data.length > 0) {
+ data.map((item) => {
+ if (
+ record.values.pk_arriveorder_b.value == item.values.pk_arriveorder_b.value ||
+ rowid == item.values.pk_arriveorder_b.value
+ ) {
+ props.cardTable.setValByKeyAndRowId(AREA.card_fee_detail, item.rowid, FIELD.cmatrowno, {
+ value: record.values.crowno.value,
+ display: record.values.crowno._display_
+ });
+ }
+ });
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+function material(props, moduleId, key, value, changedrows, record, index) {
+ postEvent(props, moduleId, key, value, changedrows, record, index);
+}
+
+function batchcode(props, moduleId, key, value, changedrows, record, index) {
+ let CLEARFIELDS = [
+ 'crowno', //行号
+ 'nnum',
+ 'pk_arriveorder_b'
+ ];
+ let userobject = processBatchCodeValue(props, moduleId, value, CLEARFIELDS);
+ if (!userobject) {
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'vbatchcode', {
+ value: null,
+ display: null
+ });
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'pk_batchcode', {
+ value: null,
+ display: null
+ });
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'bc_vvendbatchcode', {
+ value: null,
+ display: null
+ });
+ return;
+ }
+ let datav = createBodyAfterEventData(
+ props,
+ PAGECODE.card,
+ AREA.form,
+ AREA.body,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ userobject
+ );
+ // let _this = this;
+ ajax({
+ url: URL.afterBodyEdit,
+ data: datav,
+ async: false,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ card_body: 'cardTable'
+ }
+ );
+ }
+ processBillCardBodyEditResult(props, moduleId, res.data, index);
+ if (key === 'vbatchcode') {
+ RownoUtils.setRowNo(props, AREA.body, FIELD.crowno);
+ }
+ // _this.forceUpdate();
+ //cachedata.call(this, moduleId);
+ }
+ });
+}
+
+function num(props, moduleId, key, value, changedrows, record, index) {
+ postEvent(props, moduleId, key, value, changedrows, record, index);
+}
+
+function changeRate(props, moduleId, key, value, changedrows, record, index) {
+ postEvent(props, moduleId, key, value, changedrows, record, index);
+}
+
+function produceDate(props, moduleId, key, value, changedrows, record, index) {
+ postEvent(props, moduleId, key, value, changedrows, record, index);
+}
+
+function presentFlag(props, moduleId, key, value, changedrows, record, index) {
+ if (value) {
+ let nnum = record.values.nnum.value;
+ props.cardTable.setValByKeyAndIndex(AREA.body, index, 'nnum', { value: nnum, display: nnum, scale: 0 });
+ let nastnum = record.values.nastnum.value;
+ props.cardTable.setValByKeyAndIndex(AREA.body, index, 'nastnum', { value: nastnum });
+ } else {
+ props.cardTable.setValByKeyAndIndex(AREA.body, index, 'npresentastnum', { value: null });
+ props.cardTable.setValByKeyAndIndex(AREA.body, index, 'npresentnum', { value: null });
+ }
+ props.form.setFormStatus(AREA.head, 'edit');
+ props.cardTable.setStatus(AREA.body, 'edit');
+}
+
+function receiveStore(props, moduleId, key, value, changedrows, record, index) {
+ props.cardTable.setValByKeyAndIndex(AREA.body, index, 'pk_rack', { value: null, display: null });
+ props.form.setFormStatus(AREA.head, 'edit');
+ props.cardTable.setStatus(AREA.body, 'edit');
+}
+
+function astUnit(props, moduleId, key, value, changedrows, record, index) {
+ postEvent(props, moduleId, key, value, changedrows, record, index);
+}
+
+function cProject(props, moduleId, key, value, changedrows, record, index) {
+ props.cardTable.setValByKeyAndIndex(AREA.body, index, 'cprojecttaskid', { value: null, display: null });
+ props.form.setFormStatus(AREA.head, 'edit');
+ props.cardTable.setStatus(AREA.body, 'edit');
+}
+/**
+ * 后台处理的编辑事件
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} value
+ * @param {*} changedrows
+ * @param {*} record
+ * @param {*} index
+ */
+function postEvent(props, moduleId, key, value, changedrows, record, index) {
+ let event = props.createBodyAfterEventData(PAGECODE.card, AREA.form, AREA.body, moduleId, key, changedrows);
+ // 过滤空行
+ // event.card.body[AREA.body].rows = event.card.body[AREA.body].rows.filter((item) => {
+ // return item.values.pk_org != undefined;
+ // });
+ let rows = [ record ];
+ event.card.body[AREA.body].rows = rows;
+
+ if (key == 'pk_material') {
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'cffileid', {
+ value: null,
+ display: null
+ });
+ }
+
+ ajax({
+ method: 'POST',
+ url: URL.afterBodyEdit,
+ data: event,
+ async: false,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ card_body: 'cardTable'
+ }
+ );
+ }
+ processBillCardBodyEditResult(props, moduleId, res.data, index);
+ // if (res && res.data && res.data.body) {
+ // let data = [ { index: index, data: res.data.body[AREA.body].rows[0] } ];
+ // props.cardTable.updateDataByIndexs(AREA.body, data, false);
+ // }
+ if (res && res.data && res.data.billCard && res.data.billCard.head) {
+ props.form.setAllFormValue({ [AREA.head]: res.data.billCard.head[AREA.head] }, false);
+ }
+ // 到货单的表体编辑后逻辑完事之后,重新走联动费用明细逻辑
+ // 物料行编辑字段对费用明细的影响,物料,单位,数量,主单位,主数量,换算率,报价单位,报价数量,报价换算率
+ const ITEMFEEPRICE = [
+ 'pk_material',
+ 'castunitid',
+ 'cunitid',
+ 'nnum',
+ 'nastnum',
+ 'vchangerate',
+ 'cprojectid'
+ ];
+ // 到货单的表体编辑后逻辑完事之后,重新走联动费用明细逻辑 ----------begin
+ if (ITEMFEEPRICE.includes(key)) {
+ let bodyids = [ AREA.body, AREA.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ ajax({
+ url: URL.afterBodyForFeeEdit,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, AREA.card_fee_detail, res.data, FIELD.crowno);
+ }
+ }
+ });
+ }
+ // 到货单的表体编辑后逻辑完事之后,重新走联动费用明细逻辑 ----------end
+ }
+ });
+}
+
+/*NVLRMI0CwsvU8Tsne/t86mLomohfrS4tOurcUyMPOOU=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/bodyBeforeEditHandler.js b/src/pu/pu/arrival/card/events/bodyBeforeEditHandler.js
new file mode 100644
index 0000000..3203004
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/bodyBeforeEditHandler.js
@@ -0,0 +1,208 @@
+/*opnhx97SEJtCyKVpG5okeLOTG11C7Y7iaoPnF3MFOHh/uQPs0/OMBO0uip01ujSI*/
+import { URL, PAGECODE, AREA, FIELD, BILLTYPE, FREEFIELD } from '../../constance';
+import { vfreeBeforeEvent } from '../../../pub/beforeevent';
+import { ajax } from 'nc-lightapp-front';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { processBatchCodeItem } from '../../../pub/utils/batchCodeUtil';
+
+
+export default async function(moduleId, key, record, value) {
+ let meta = this.props.meta.getMeta();
+ if (key == 'vchangerate') {
+ if (!(record.values.pk_material || {}).value) {
+ return false;
+ }
+ let cunitid = (record.values.cunitid || {}).value;
+ let castunitid = (record.values.castunitid || {}).value;
+ if (cunitid && castunitid) {
+ return await requestFixRate(record.values.pk_material.value, castunitid);
+ }
+ } else if ([ 'bfixedrate', 'bbackreforder' ].includes(key)) {
+ return false;
+ } else if (key == 'pk_material') {
+ if (record.values.csourcetypecode && record.values.csourcetypecode.value == '61') {
+ return false;
+ }
+ return true;
+ } else if ([ 'nnum', 'nastnum' ].includes(key)) {
+ let nnum = (record.values.nnum || {}).value;
+ if (!nnum || nnum < 0) {
+ return true;
+ }
+ let naccumchecknum = (record.values.naccumchecknum || {}).value;
+ if (naccumchecknum && naccumchecknum > 0) {
+ return false;
+ }
+ return true;
+ } else if (key == 'bpresent') {
+ let bpresentsource = (record.values.bpresentsource || {}).value;
+ let csourcetypecode = (record.values.csourcetypecode || {}).value;
+ if (bpresentsource || (csourcetypecode && csourcetypecode == BILLTYPE.scorder)) {
+ return false;
+ } else {
+ return true;
+ }
+ } else if (key == 'dproducedate' || key == 'ivalidday') {
+ // 生效日期,失效日期
+ if (!(record.values.pk_material || {}).value) {
+ return false;
+ }
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, 'pk_org');
+ if (!(pk_org || {}).value) {
+ return false;
+ }
+ let cmaterialvid = record.values.pk_material.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ key: key,
+ pk_org: pk_org.value,
+ materialvid: cmaterialvid
+ };
+ let flag = await vfreeBeforeEvent.call(this.props, constance);
+ return flag;
+ } else if (key.startsWith('vbdef') || key === 'vmemob') {
+ let flag = true;
+
+ return flag;
+ } else if (
+ key.startsWith('vfree') ||
+ [ 'casscustvid', 'casscustid', 'cproductorid', 'cprojectid', 'cffileid' ].includes(key)
+ ) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, 'pk_org').value;
+ let materialvid = record.values.pk_material.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ key: key,
+ pk_org: pk_org,
+ materialvid: materialvid
+ };
+ let flag = await vfreeBeforeEvent(this.props, constance);
+ if (flag) {
+ marAsstUtils.resetItem.call(this, this.props, '400401200', PAGECODE.card, moduleId, key, record, FREEFIELD);
+
+ if (key == 'cffileid') {
+ this.props.cardTable.setQueryCondition(AREA.body, {
+ [key]: () => {
+ return {
+ cmaterialvid: materialvid
+ };
+ }
+ });
+ }
+ }
+ return flag;
+ } else if (key == 'vbatchcode') {
+ //辅助属性
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ let materialvid = record.values.pk_material.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ key: key,
+ pk_org: pk_org,
+ materialvid: materialvid,
+ cmaterialvid: materialvid
+ };
+ let flag = await vfreeBeforeEvent(this.props, constance);
+ if (flag) {
+ //当批次号可编辑时,处理批次号参照弹出框里的数据
+ processBatchCodeItem.call(this, this.props, [ AREA.body, AREA.childform1 ], key, record, BILLTYPE.arrival);
+ }
+ return flag;
+ } else if (key.startsWith('bc_vdef')) {
+ // 批次号有值时,批次自定义项可以编辑
+ let vbatchcode = record.values.vbatchcode.value;
+ if (vbatchcode) {
+ return true;
+ } else {
+ return false;
+ }
+ } else if (key == 'pk_receivestore') {
+ // TODO 根据组织, 利润中心, 交易类型是否直运仓过滤
+ meta[AREA.body].items.map((item) => {
+ if (item.attrcode == 'pk_receivestore') {
+ let pk_org = (record.values.pk_org || {}).value;
+ let condition = {};
+ let csourcetypecode = (record.values.csourcetypecode || {}).value;
+ let vsourcetrantype = (record.values.vsourcetrantype || {}).value;
+ let pk_arrliabcenter = (record.values.pk_arrliabcenter || {}).value;
+ condition.pk_org = pk_org;
+ condition.csourcetypecode = csourcetypecode;
+ condition.vsourcetrantype = vsourcetrantype;
+ condition.pk_arrliabcenter = pk_arrliabcenter;
+ condition.GridRefActionExt = 'nccloud.web.pu.arrival.ref.ReceiveStoreRefSqlBuilder';
+ this.props.cardTable.setQueryCondition(AREA.body, {
+ [item.attrcode]: () => {
+ return {
+ csourcetypecode: csourcetypecode,
+ vsourcetrantype: vsourcetrantype,
+ pk_arrliabcenter: pk_arrliabcenter,
+ pk_org: pk_org,
+ busifuncode: 'st',
+ GridRefActionExt: 'nccloud.web.pu.arrival.ref.ReceiveStoreRefSqlBuilder'
+ };
+ }
+ });
+ }
+ });
+
+ return true;
+ } else if (
+ [
+ 'bfixedrate',
+ 'bbackreforder',
+ 'fproductclass',
+ 'bpresentsource',
+ 'npresentastnum',
+ 'npresentnum',
+ 'ntaxrate',
+ 'pk_reqstoorg',
+ 'pk_reqstore',
+ 'pk_apfinanceorg',
+ 'pk_apfinanceorg_v',
+ 'pk_psfinanceorg',
+ 'pk_psfinanceorg_v',
+ 'dinvaliddate',
+ 'nexchangerate',
+ 'cffileid'
+ ].includes(key)
+ ) {
+ return false;
+ } else if (key == 'cprojecttaskid') {
+ let cprojectid = (record.values.cprojectid || {}).value;
+ if (!cprojectid) {
+ return false;
+ }
+ } else if (key == 'pk_rack') {
+ let pk_receivestore = (record.values.pk_receivestore || {}).value;
+ if (!pk_receivestore) {
+ return false;
+ } else {
+ return true;
+ }
+ } else {
+ return false;
+ }
+}
+
+function requestFixRate(pk_material, castunitid) {
+ return new Promise((resolve, reject) => {
+ ajax({
+ method: 'post',
+ url: URL.fixRate,
+ data: { pk_material, castunitid },
+ success: (res) => {
+ let fixRate = res.data;
+ if (!fixRate) {
+ resolve(true);
+ } else {
+ resolve(false);
+ }
+ }
+ });
+ });
+}
+
+/*opnhx97SEJtCyKVpG5okeLOTG11C7Y7iaoPnF3MFOHh/uQPs0/OMBO0uip01ujSI*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/feeAfterEditHandler.js b/src/pu/pu/arrival/card/events/feeAfterEditHandler.js
new file mode 100644
index 0000000..b4ed521
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/feeAfterEditHandler.js
@@ -0,0 +1,212 @@
+/*IR1PZpAw03KLCcbCGU00zoLTp25F7/JmhK185O1lrq0=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 处理表体编辑后事件
+ * @Date: 2018-05-02 15:05:25
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-17 10:10:04
+ */
+
+import { AREA, PAGECODE, URL, FIELD, RELATECTFIELDS } from './../../constance';
+import { ajax } from 'nc-lightapp-front';
+import {
+ processExtBillFeeEditResult,
+ processExtBillFeeDetailsEditResult,
+ referFeeCT
+} from '../../../pub/utils/feeAfterUtil';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ let _this = this;
+ if (
+ changedrows &&
+ changedrows.length == 1 &&
+ changedrows[0].oldvalue &&
+ changedrows[0].newvalue &&
+ changedrows[0].oldvalue.value == changedrows[0].newvalue.value
+ ) {
+ return;
+ }
+ let bodyids = [ AREA.body, AREA.card_fee ];
+ if (key == FIELD.cfeematerialvid) {
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(AREA.card_fee);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.afterFeeEdit, moduleId, key, index);
+ //费用项
+ } else if (key == FIELD.cfeesuppliervid) {
+ //费用服务商
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(AREA.card_fee);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.afterFeeEdit, moduleId, key, index);
+ } else if (key == FIELD.cctid) {
+ //费用合同
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeEdit, moduleId, key, index);
+ } else if (key == FIELD.nqtorigprice || key == FIELD.nqtorigtaxprice || key == FIELD.ntaxrate) {
+ //无税单价,含税单价,税率
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeEdit, moduleId, key, index);
+ } else if (key == FIELD.corigcurrencyid) {
+ // 币种
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeEdit, moduleId, key, index);
+ } else if (key == FIELD.ftaxtypeflag) {
+ // 扣税类别
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeEdit, moduleId, key, index);
+ }
+ // 根据费用项和物料行生成费用明细
+ function getAfterData(_this, props, aggvos, url, moduleId, key, index) {
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新费用项数据
+ processExtBillFeeEditResult(props, moduleId, res.data, aggvos, index, FIELD.crowno);
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, AREA.card_fee_detail, res.data, FIELD.crowno);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ _this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+ }
+}
+
+/*IR1PZpAw03KLCcbCGU00zoLTp25F7/JmhK185O1lrq0=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/feeBeforeEditHandler.js b/src/pu/pu/arrival/card/events/feeBeforeEditHandler.js
new file mode 100644
index 0000000..a35880f
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/feeBeforeEditHandler.js
@@ -0,0 +1,108 @@
+/*a/m5xbY7uf6cKjWg5ZNbhp1/PtoxtOXuFC8uVwKi2rg=*/
+import { AREA, FIELD } from '../../constance';
+
+export default async function(moduleId, key, record, value) {
+ let meta = this.props.meta.getMeta();
+ let flag = true;
+ if (key == FIELD.cfeesuppliervid) {
+ // 费用服务商
+ meta[AREA.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ let orgs = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ return {
+ pk_org: orgs,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cfeematerialvid) {
+ let data = new Array();
+ let datas = this.props.cardTable.getColValue(AREA.body, FIELD.pk_psfinanceorg);
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ if (datas) {
+ datas.map((item) => {
+ if (!data.includes(item.value)) {
+ data.push(item.value);
+ }
+ });
+ }
+ // 费用项
+ meta[AREA.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_org,
+ pk_psfinanceorg:data.toString(),
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cctid) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.form, FIELD.pk_org).value;
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ let dbilldate = this.props.form.getFormItemsValue(AREA.form, FIELD.dbilldate).value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ flag = false;
+ }
+ if (flag) {
+ meta[AREA.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cctid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ });
+ }
+ });
+ }
+ } else if (key == FIELD.vfmemo) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else if (key.startsWith('vfdef')) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ }
+ return flag;
+}
+
+/*a/m5xbY7uf6cKjWg5ZNbhp1/PtoxtOXuFC8uVwKi2rg=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/feeDetailBeforeEditHandler.js b/src/pu/pu/arrival/card/events/feeDetailBeforeEditHandler.js
new file mode 100644
index 0000000..4c60b91
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/feeDetailBeforeEditHandler.js
@@ -0,0 +1,221 @@
+/*2Feu7BsWyiG/UqiE8TOhAziq6pqsA6td95EKPnnfqOcnHUgSpd5ltOFEIR3FNOtF*/
+import { AREA, FIELD, URL } from '../../constance';
+import {
+ rateTypeSellFilter,
+ canRateDateModify,
+ canRateModify
+} from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil';
+import remoteRequest from './remoteRequest';
+export default async function(moduleId, key, index, record, value) {
+ let meta = this.props.meta.getMeta();
+ let flag = true;
+ if (key == FIELD.cfeesuppliervid) {
+ // 费用服务商
+ meta[AREA.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ let orgs = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ return {
+ pk_org: orgs,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cfeematerialvid) {
+ let pk_psfinanceorg = this.props.cardTable.getValByKeyAndIndex(moduleId, index, FIELD.pk_psfinanceorg).value;
+ let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ // 费用明细
+ meta[AREA.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_org,
+ pk_psfinanceorg:pk_psfinanceorg,
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cctid) {
+ let pk_org = this.props.form.getFormItemsValue(AREA.form, FIELD.pk_org).value;
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let dbilldate = this.props.form.getFormItemsValue(AREA.form, FIELD.dbilldate).value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ flag = false;
+ }
+ if (flag) {
+ meta[AREA.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cctid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ });
+ }
+ });
+ }
+ } else if (key == FIELD.ctaxcodeid) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 税码
+ flag = true;
+ let ctaxcountryid = record.values.ctaxcountryid.value;
+ let fbuysellflag = record.values.fbuysellflag.value;
+ if (ctaxcountryid == null || ctaxcountryid == '' || null == fbuysellflag) {
+ flag = false;
+ } else {
+ meta[AREA.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.ctaxcodeid) {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ ctaxcountryid: ctaxcountryid,
+ fbuysellflag: fbuysellflag,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CtaxcodeidBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ }
+ } else if (key == FIELD.nexchangerate) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 折本汇率
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let curr = record.values.ccurrencyid.value;
+ if (corigcurrencyid == curr) {
+ flag = false;
+ } else {
+ let csrcbfid = record.values.csrcbfid.value;
+ let fratecategory = record.values.fratecategory.value;
+ let flags = true;
+ //来源于上游的固定汇率下游不可修改
+ if (csrcbfid && fratecategory && fratecategory == '5') {
+ flags = false;
+ }
+ // 根据汇率类别判断编辑性
+ return canRateModify.call(this, (record.values.fratecategory || {}).value, flags);
+ }
+ } else if (key == FIELD.cratetype) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 汇率类型
+ this.props.cardTable.setQueryCondition(AREA.card_fee_detail, {
+ [key]: () => {
+ return rateTypeSellFilter();
+ }
+ });
+ //原币
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ //本币
+ let curr = record.values.ccurrencyid.value;
+ if (isNull(corigcurrencyid) || isNull(curr) || corigcurrencyid == curr) {
+ flag = false;
+ }
+ } else if (key == FIELD.dratedate) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ let flags = true;
+ let csrcbfid = record.values.csrcbfid.value;
+ let fratecategory = record.values.fratecategory.value;
+ //来源于上游的固定汇率下游不可修改
+ if (csrcbfid && fratecategory && fratecategory == '5') {
+ flags = false;
+ }
+ // 汇率日期
+ return canRateDateModify.call(this, (record.values.fratecategory || {}).value, flags);
+ } else if (key == FIELD.nglobalexchgrate) {
+ // 全局本位币汇率
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let ccurrencyid = record.values.ccurrencyid.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ corigcurrencyid: corigcurrencyid,
+ ccurrencyid: ccurrencyid
+ };
+ flag = await remoteRequest(URL.feeDetailBeforeEvent, constance);
+ return flag;
+ } else if (key == FIELD.ngroupexchgrate) {
+ // 集团本位币汇率
+ let pk_group = record.values.pk_group.value;
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let ccurrencyid = record.values.ccurrencyid.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ pk_group: pk_group,
+ corigcurrencyid: corigcurrencyid,
+ ccurrencyid: ccurrencyid
+ };
+ flag = await remoteRequest(URL.feeDetailBeforeEvent, constance);
+ return flag;
+ } else if (key == FIELD.vfmemo) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else if (key.startsWith('vbfdef')) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ }
+ return flag;
+}
+
+function isNull(value) {
+ if (value == undefined || value === '') {
+ return true;
+ }
+ return false;
+}
+
+/*2Feu7BsWyiG/UqiE8TOhAziq6pqsA6td95EKPnnfqOcnHUgSpd5ltOFEIR3FNOtF*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/feeDtailAfterEditHandler.js b/src/pu/pu/arrival/card/events/feeDtailAfterEditHandler.js
new file mode 100644
index 0000000..32af8f5
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/feeDtailAfterEditHandler.js
@@ -0,0 +1,252 @@
+/*mZ4vRNZjWGTVbh4vU9X8ejjdq0H4I3xrbtNeocDz6jh9vtiNE4EAoWKf8aYcNcJL*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 处理表体编辑后事件
+ * @Date: 2018-05-02 15:05:25
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-15 16:07:43
+ */
+
+import { AREA, PAGECODE, URL, FIELD, FEEPRICE, RELATECTFIELDS } from './../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+import { processExtBillFeeDetailsAfterEditResult, referFeeCT } from '../../../pub/utils/feeAfterUtil';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ let _this = this;
+ if (
+ changedrows &&
+ changedrows.length == 1 &&
+ changedrows[0].oldvalue &&
+ changedrows[0].newvalue &&
+ changedrows[0].oldvalue.value == changedrows[0].newvalue.value
+ ) {
+ return;
+ }
+ let bodyids = [ AREA.body ];
+ if (key == FIELD.cfeematerialvid) {
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(AREA.card_fee_detail);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key, index);
+ //费用项
+ } else if (key == FIELD.cfeesuppliervid) {
+ //费用服务商
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(AREA.card_fee_detail);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key, index);
+ } else if (key == FIELD.cctid) {
+ //费用合同
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key);
+ } else if (FEEPRICE.includes(key)) {
+ //税率,无税单价,含税单价,价税合计,无税金额,税额,主含税单价,主无税单价,计税金额,不可抵扣税额,集团本位币汇率,全局本位币汇率,扣税类别
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key);
+ } else if (key == FIELD.cratetype) {
+ if (changedrows != null && changedrows.length != 0) {
+ let isError = false;
+ changedrows.forEach((row) => {
+ let srcid = props.cardTable.getValByKeyAndRowId(moduleId, row.rowid, 'csrcbfid');
+ if (
+ row.newvalue.value == '0001Z010000000000008' &&
+ row.oldvalue.value != '0001Z010000000000008' &&
+ srcid != null &&
+ srcid.value != null
+ ) {
+ isError = true;
+ }
+ });
+ if (isError) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(_this, '4004ARRIVAL-000074')
+ });
+ }
+ }
+ //组织汇率类型
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key);
+ } else if (
+ key == FIELD.crececountryid ||
+ key == FIELD.csendcountryid ||
+ key == FIELD.ctaxcountryid ||
+ key == FIELD.ctaxcodeid
+ ) {
+ //发货国家/地区,收货国家/地区,报税国家/地区,税码
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key);
+ } else if (key == FIELD.corigcurrencyid) {
+ //币种
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.afterFeeDetailEdit, moduleId, key, index);
+ }
+ // 根据费用项和物料行生成费用明细
+ function getAfterData(_this, props, aggvos, url, moduleId, key, index) {
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ processExtBillFeeDetailsAfterEditResult(props, moduleId, res.data, FIELD.crowno, index);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ _this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+ }
+}
+
+/*mZ4vRNZjWGTVbh4vU9X8ejjdq0H4I3xrbtNeocDz6jh9vtiNE4EAoWKf8aYcNcJL*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/headAfterEditHandler.js b/src/pu/pu/arrival/card/events/headAfterEditHandler.js
new file mode 100644
index 0000000..dd974f0
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/headAfterEditHandler.js
@@ -0,0 +1,128 @@
+/*iKwA56reJyieX+kxSmmKGJZLuDZGn747Mx0OCc/K6PQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 处理表头编辑后事件
+ * @Date: 2018-05-02 15:06:16
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-06-26 10:35:32
+ */
+import { URL, AREA, PAGECODE, FIELD } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+export default function(props, moduleId, key, value, changedrows, record, index) {
+ if (key == FIELD.dbilldate) {
+ // 制单日期编辑后费用项,费用明细重新询税率,汇率
+ let feeDetailData = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let feeData = props.cardTable.getVisibleRows(AREA.card_fee);
+ props.cardTable.filterEmptyRows(AREA.card_fee, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ if (feeData != null || feeDetailData != null) {
+ setFeeInfo.call(this, props, moduleId, key, value, changedrows, index, record);
+ }
+ } else {
+ if (key != 'ctrantypeid' && key != 'pk_pupsndoc') {
+ return;
+ }
+ let headArea = AREA.head;
+ let bodyArea = AREA.body;
+ // afterEditHead: '/nccloud/pu/puinvoice/afterEditHead.do', //表头编辑后
+ let data = props.createHeadAfterEventData(PAGECODE.card, headArea, bodyArea, moduleId, key, value);
+ data.card.body.body.rows = [];
+ if (value !== null && value.value !== null && value.value !== '') {
+ ajax({
+ url: URL.afterEditHead,
+ data: data,
+ mode: 'normal',
+ async: false,
+ success: (res) => {
+ let data = res.data;
+ // if (res.data && res.data.data && res.data.data.head && res.data.data.head[headArea]) {
+ // let headvo = res.data.data.head[headArea];
+ // setTimeout(() => {
+ // this.props.form.setAllFormValue({ [headArea]: headvo });
+ // }, 0);
+ // }
+ if (data && data.billCard && data.billCard.head && data.billCard.head[headArea]) {
+ let headvo = data.billCard.head[headArea];
+ // setTimeout(() => {
+ props.form.setAllFormValue({ [headArea]: headvo }, false);
+ // }, 0);
+ }
+ if (
+ data &&
+ data.billCard &&
+ data.billCard.body &&
+ data.billCard.body[bodyArea] &&
+ data.billCard.body[bodyArea].rows
+ ) {
+ let bodyrows = res.data.billCard.body[bodyArea].rows;
+ // setTimeout(() => {
+ props.cardTable.setTableData(bodyArea, bodyrows, false);
+ // }, 0);
+ }
+ // if (data && data.data && data.data.body && data.data.body[bodyArea] && data.data.body[bodyArea].rows) {
+ // let bodyrows = data.data.body[bodyArea].rows;
+ // setTimeout(() => {
+ // this.props.cardTable.setTableData(bodyArea, bodyrows);
+ // }, 0);
+ // }
+ // transtypeUtils.setValue.call(this, moduleId, 'ctrantypeid', 'vtrantypecode');
+ }
+ });
+ }
+ }
+}
+
+function setFeeInfo(props, moduleId, key, value, changedrows, index, record) {
+ let bodyids = [ AREA.body, AREA.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.card,
+ AREA.head,
+ AREA.body,
+ AREA.card_fee_detail,
+ FIELD.pk_arriveorder_b,
+ FIELD.pk_arriveorder_b,
+ true,
+ bodyids,
+ null
+ );
+ ajax({
+ url: URL.headafterdbillddate,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ let card = res.data.extbillcard;
+ let updaterows = [];
+ if (card.bodys[AREA.card_fee]) {
+ card.bodys[AREA.card_fee].rows.map((item) => {
+ updaterows.push(item);
+ });
+ }
+ if (updaterows.length > 0) {
+ props.cardTable.updateTableData(AREA.card_fee, { rows: updaterows });
+ }
+ // 效率优化关闭
+ // 更新费用明细数据
+ if (card.grandSons[AREA.card_fee_detail]) {
+ let uprows = [];
+ card.grandSons[AREA.card_fee_detail].rows.map((item) => {
+ uprows.push(item);
+ });
+ if (uprows.length > 0) {
+ props.cardTable.updateTableData(AREA.card_fee_detail, { rows: uprows });
+ }
+ }
+ }
+ }
+ });
+}
+
+/*iKwA56reJyieX+kxSmmKGJZLuDZGn747Mx0OCc/K6PQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/headBeforeEditHandler.js b/src/pu/pu/arrival/card/events/headBeforeEditHandler.js
new file mode 100644
index 0000000..5ca9540
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/headBeforeEditHandler.js
@@ -0,0 +1,42 @@
+/*Lze6+z0xO7+ruIG7OmR7ivTDUAqfojKl9ZEVJVrAa9eDBuqG7WMdX+qXqeS88y67*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, AREA, PAGEID, FIELD } from '../../constance';
+import vbillcodeBeforeEvent from './vbillcodeBeforeEvent';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+export default function(id, key, value, record) {
+ if (
+ [
+ 'pk_arriveorder',
+ 'pk_purchaseorg',
+ 'pk_purchaseorg_v',
+ 'pk_supplier_v',
+ 'pk_supplier',
+ 'pk_busitype',
+ 'pk_org_v',
+ 'pk_org',
+ 'bisback',
+ 'vtrantypecode',
+ 'iprintcount'
+ ].includes(key)
+ ) {
+ return false;
+ } else if (key == FIELD.vbillcode) {
+ return vbillcodeBeforeEvent.call(this, this.props);
+ } else if (key == 'vbackreason') {
+ // let isBack = record.values.vbackreason.value
+ let isBack = this.props.form.getFormItemsValue(AREA.form, 'bisback').value;
+ if (isBack) {
+ return true;
+ }
+ return false;
+ } else if (key == 'ctrantypeid') {
+ if (this.isapprove == 'Y') {
+ return false;
+ }
+ let transty = transtypeUtils.beforeEdit.call(this, key, 'ctrantypeid', 'vtrantypecode');
+ return transty;
+ }
+ return true;
+}
+
+/*Lze6+z0xO7+ruIG7OmR7ivTDUAqfojKl9ZEVJVrAa9eDBuqG7WMdX+qXqeS88y67*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/index.js b/src/pu/pu/arrival/card/events/index.js
new file mode 100644
index 0000000..621a84d
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import afterEvent from './afterEvent';
+import beforeEvent from './beforeEvent';
+export { beforeEvent, afterEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/remoteRequest.js b/src/pu/pu/arrival/card/events/remoteRequest.js
new file mode 100644
index 0000000..5d47435
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/remoteRequest.js
@@ -0,0 +1,44 @@
+/*RUKQ7yF3RNKqie1Y0AQyAf5LY52ls6CfOOMTtDl4w4U=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 编辑前ajax远程读取编辑性
+ * @Date: 2018-08-04 11:02:42
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-25 15:18:30
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+export default function remoteRequest(url, constance) {
+ return new Promise(function(resolve, reject) {
+ let data = {
+ key: constance.key,
+ params: constance.params
+ };
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let editFlag = res.data.isedit;
+ if (editFlag) {
+ resolve(editFlag);
+ } else if (res.data.message) {
+ toast({
+ color: 'warning',
+ content: res.data.message
+ });
+ }
+ resolve(false);
+ }
+ },
+ error: (error) => {
+ toast({
+ color: 'warning',
+ content: error.message
+ });
+ resolve(false);
+ }
+ });
+ });
+}
+
+/*RUKQ7yF3RNKqie1Y0AQyAf5LY52ls6CfOOMTtDl4w4U=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/events/vbillcodeBeforeEvent.js b/src/pu/pu/arrival/card/events/vbillcodeBeforeEvent.js
new file mode 100644
index 0000000..5162764
--- /dev/null
+++ b/src/pu/pu/arrival/card/events/vbillcodeBeforeEvent.js
@@ -0,0 +1,65 @@
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 单据号编辑前事件,这类方法必须有返回值,返回true为可编辑,false为不可编辑
+ * @Date: 2018-07-23 14:17:10
+ * @Last Modified by: jiangfw
+ * @Last Modified time: 2018-07-28 17:17:00
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, FIELD, BILLTYPE, AREA } from '../../constance';
+export default async function(props) {
+ let constance = {
+ key: FIELD.vbillcode,
+ formareaid: AREA.form,
+ pk_org_key: FIELD.pk_org,
+ billtype: BILLTYPE.arrival
+ };
+ // let flag = await canEditAble(props, constance);
+ return await canEditAble(props, constance);
+}
+
+function canEditAble(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let { key, formareaid, pk_org_key, billtype } = constance;
+ let pk_org = props.form.getFormItemsValue(formareaid, pk_org_key);
+ if (!pk_org || !pk_org.value) {
+ resolve(false);
+ } else {
+ let data = {
+ key: key,
+ params: {
+ pk_org: pk_org.value,
+ billtype: billtype
+ }
+ };
+ ajax({
+ url: URL.beforeEditHead,
+ 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);
+ }
+ });
+ }
+ });
+}
+
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/index.js b/src/pu/pu/arrival/card/index.js
new file mode 100644
index 0000000..7ec3bda
--- /dev/null
+++ b/src/pu/pu/arrival/card/index.js
@@ -0,0 +1,1418 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单卡片态
+ * @Date: 2018-04-17 15:47:23
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-13 11:20:27
+ */
+import React, { Component } from 'react';
+import { createPage, ajax, base, high, toast } from 'nc-lightapp-front';
+import { beforeEvent, afterEvent } from './events';
+import { batchEvents, batchFeeEvents, batchFeeDetailEvents } from './batchEvents';
+import { pageInfoClick, saveAndCommit, addFeeDetailBtnClick } from './btnClicks';
+import btnClickController from './viewControl/btnClickController';
+import { initTemplate } from './init';
+const { NCDiv, NCModal, NCButton, NCSelect, NCFormControl, NCAffix, NCTooltip, NCHotKeys } = base;
+const { BillTrack } = high;
+import NCUploader from 'uap/common/components/NCUploader';
+import ApproveDetail from 'uap/common/components/ApproveDetail';
+import { showWarningDialog } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import MergePrinting from 'scmpub/scmpub/components/MergePrinting';
+import SplitPrintDlg from 'scmpub/scmpub/components/SplitPrinting';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { rewriteTransferSrcBids, getDefData, updateCacheData } from '../../../../scmpub/scmpub/pub/cache';
+import { getCardDisableHotKeyBtn } from '../../../../scmpub/scmpub/pub/tool/hotKeysUtil';
+import { showSagaErrorToasts } from '../../pub/utils/sagaMsgUtils';
+import { URL, AREA, COMMON, PAGECODE, TRANSFER, BUTTONAREA, ALLBUTTONS, FREEBUTTONS, FIELD } from '../constance';
+import StockQuery from '../../pub/stockQuery';
+import { addCacheData } from '../../../../scmpub/scmpub/pub/cache';
+import { changeUrlParam } from '../../../../scmpub/scmpub/pub/cache';
+import ApprovalTrans from 'uap/common/components/approvalTrans';
+import commit from './btnClicks/commit';
+import buttonController from './viewControl/buttonController';
+import { feeSelected, feeDetailSelected } from './viewControl/buttonController';
+import { showErrorInfo } from 'src/scmpub/scmpub/pub/tool/messageUtil.js';
+import SetPiece from '../../pub/setPiece';
+import { createCardTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+import './index.less';
+import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import { Callbacks } from 'jquery';
+class ArrivalCard extends Component {
+ constructor(props) {
+ super(props);
+ props.use.form(AREA.head);
+ props.use.cardTable(AREA.body);
+ props.use.cardTable(AREA.card_fee);
+ props.use.cardTable(AREA.card_fee_detail);
+ props.use.table(AREA.card_bodyModal);
+ (this.copyRowDatas = null), // 复制行数据
+ (this.state = {
+ msgContent: '',
+ vbillcode: '',
+ billstatus: 0,
+ index: 0,
+ showTrack: false,
+ pk: '',
+ target: null,
+ showUploader: false,
+ showApproveInfo: false,
+ curdata: null,
+ billtype: '23',
+ compositedisplay: false, //指派参数
+ compositedata: null, //指派
+ // isCopyLine: null,
+ showModal: false,
+ vordercode: null,
+ isbrowsebeforesave: 'Y',
+ // isShowBack: null,
+ jsonData: null,
+ showConditionModal: false,
+ showSpilt: false,
+ splitData: {},
+ showSetPiece: false, //是否显示成套件
+ setPieceData: null, //成套件数据
+ showStockQuery: false, //存量查询是否显示
+ stockquerydata: null, //存量查询参数
+ saveAndCommit: false, //是否保存提交
+ showFeedetail: false //是否显示费用明细参照增行
+ });
+ this.commitInfo = {
+ index: null,
+ record: null
+ };
+ (this.orderbids = null), (this.formId = AREA.head);
+ this.moduleId = COMMON.moudleid;
+ this.tableId = AREA.body;
+ this.isrece;
+ this.isapprove;
+ this.meta;
+ this.srcappcode;
+ this.indexstatus = {};
+ this.templateid;
+ this.skipCodes = []; //交互式异常码
+ this.manyTrans = true; // 是不是多单转单的标志,多单的时候删除需要控制一下按钮状态
+ this.newqick = false; // 设置是否新增快速到货,卡片新增到货时设置,避免转单过来设置有误
+ initLang(this, [ '4004arrival', '4004pub' ], 'pu', initTemplate.bind(this, this.getData));
+ }
+
+ close = () => {
+ this.setState({ showModal: false });
+ };
+
+ open = () => {
+ this.setState({ showModal: true });
+ };
+ componentWillMount() {
+ // 关闭浏览器
+ window.onbeforeunload = () => {
+ let status = this.props.cardTable.getStatus(AREA.body);
+ if (status == 'edit') {
+ return getLangByResId(this, '4004ARRIVAL-000024'); /* 国际化处理: 当前单据未保存,您确认离开此页面?*/
+ }
+ };
+ }
+ componentDidMount() {
+ // initTemplate.call(this, this.getData);
+ }
+
+ getData = () => {
+ let type = this.props.getUrlParam('type');
+
+ if (type) {
+ let transferIds = this.props.transferTable.getTransferTableSelectedId(AREA.head);
+ if (type == 'quickArr') {
+ let code = this.props.getUrlParam('vordercode');
+ // this.setState({ vordercode: code });
+ this.getTransferValueByordercode(code);
+ } else {
+ this.getTransferValue(transferIds);
+ }
+ this.props.cardTable.setStatus(AREA.body, 'edit');
+ this.props.cardTable.setStatus(AREA.card_fee, 'edit');
+ this.props.cardTable.setStatus(AREA.card_fee_detail, 'edit');
+ this.props.form.setFormStatus(AREA.head, 'edit');
+ } else {
+ //查询单据详情
+ if (this.props.getUrlParam('status') != 'add') {
+ let data = { id: this.props.getUrlParam('id'), pageid: PAGECODE.card, templateid: this.templateid };
+ let url = URL.queryCard;
+ //基于原到货单退货
+ if (
+ this.props.getUrlParam('status') == 'return23' ||
+ 'returnArrival' == this.props.getUrlParam('status')
+ ) {
+ url = URL.return23;
+ }
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ this.props.beforeUpdatePage();
+ if (res && res.data && res.data.head) {
+ let vbillcode = res.data.head[this.formId].rows[0].values.vbillcode.value;
+
+ this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] });
+ // let billstatus = this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // this.setState({ billstatus: billstatus }, () => {
+ // this.toggleShow(billstatus);
+ // });
+
+ this.setState({ vbillcode: vbillcode });
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode
+ });
+
+ updateCacheData(
+ this.props,
+ 'pk_arriveorder',
+ res.data.head[this.formId].rows[0].values.pk_arriveorder.value,
+ res.data,
+ this.formId,
+ COMMON.arrivalCacheKey
+ );
+ }
+ if (res && res.data && res.data.bodys) {
+ this.props.cardTable.setTableData(this.tableId, res.data.bodys[this.tableId]);
+ // let billstatus = this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // this.toggleShow(billstatus);
+ }
+ // 处理费用项
+ if (res && res.data && res.data.bodys[AREA.card_fee]) {
+ this.props.cardTable.setTableData(AREA.card_fee, res.data.bodys[AREA.card_fee]);
+ }
+ // 处理费用明细
+ if (res.data && res.data.grandSons && res.data.grandSons[AREA.card_fee_detail]) {
+ this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ res.data.grandSons[AREA.card_fee_detail]
+ );
+ }
+ buttonController.call(this);
+ this.select();
+ this.props.updatePage(AREA.form, AREA.body);
+ //跳转卡片弹出提示框
+ showSagaErrorToasts(this.props, AREA.form, FIELD.pk_arriveorder);
+ // if (
+ // this.props.getUrlParam('status') == 'return23' ||
+ // this.props.getUrlParam('status') == 'returnArrival'
+ // ) {
+ // this.props.form.setFormStatus(AREA.head, 'edit');
+ // this.props.cardTable.setStatus(AREA.body, 'edit');
+ // // setTimeout(() => {
+ // // }, 10);
+ // this.props.button.setButtonVisible(ALLBUTTONS, false);
+ // this.props.button.setButtonVisible(EDITBUTTONS, true);
+ // this.props.button.setButtonVisible(
+ // [
+ // 'PaseToThis', //粘贴至此
+ // 'PastToLast', //粘贴至末行
+ // 'CancelPast' //取消(复制)
+ // ],
+ // false
+ // );
+ // this.props.button.setButtonDisabled([ 'ResetRowno' ], false);
+ // this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+ // this.props.button.setButtonVisible('Return', false);
+ // this.setState({ isShowBack: false });
+ // let billstatus = this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // this.toggleShow(billstatus);
+ //设置退货理由的编辑性
+ // this.props.form.setFormItemsDisabled(AREA.form,{''})
+ // }
+ },
+ error: (res) => {
+ buttonController.call(this);
+ this.select();
+ showErrorInfo(null, res.message);
+ }
+ });
+ }
+ }
+ };
+
+ onFeeClose = () => {
+ this.setState({ showFeedetail: false });
+ };
+
+ createTransferModal = () => {
+ const { createSimpleTable } = this.props.table;
+ return this.state.showFeedetail ? (
+
+
+ {getLangByResId(this, '4004ARRIVAL-000068')}
+
+
+ {createSimpleTable(AREA.card_bodyModal, {
+ showCheck: true,
+ showIndex: true,
+ adaptionHeight: true
+ })}
+
+
+ {
+ addFeeDetailBtnClick.call(this, this.props);
+ }
+ }}
+ // 是否启用组件
+ enabled={true}
+ // 是否为聚焦触发
+ focused={true}
+ // 默认display 可以设置 inline-block 等dispaly属性
+ display="inline-block"
+ >
+
+
+ {getLangByResId(this, '4004ARRIVAL-000069')}
+ (Y)
+
+
+
+
+ {
+ this.onFeeClose.call(this);
+ }
+ }}
+ // 是否启用组件
+ enabled={true}
+ // 是否为聚焦触发
+ focused={true}
+ // 默认display 可以设置 inline-block 等dispaly属性
+ display="inline-block"
+ >
+
+
+ {getLangByResId(this, '4004ARRIVAL-000036')}
+ (N)
+
+
+
+
+
+ ) : (
+ ''
+ );
+ };
+
+ getTransferValueByordercode = (code) => {
+ if (!code) {
+ return;
+ }
+ let data = {
+ vordercode: code
+ };
+ ajax({
+ method: 'POST',
+ url: URL.quickArrQuery,
+ data: data,
+ success: (res) => {
+ if (res && res.data) {
+ this.props.transferTable.setTransferListValue(AREA.leftarea, res.data);
+ this.props.form.setFormStatus(AREA.head, 'edit');
+ this.props.cardTable.setStatus(AREA.body, 'edit');
+
+ this.setState({ curdata: res.data, vbillcode: '' });
+ }
+ }
+ });
+ };
+
+ getTransferValue = (ids) => {
+ if (!ids) {
+ return;
+ }
+ this.isrece = this.props.getUrlParam('isreceive');
+ let type = this.props.getUrlParam('type');
+ let transferoid = this.props.getUrlParam('transferoid');
+ const oid = {
+ arrivaltransfer21: TRANSFER.oid,
+ arrivaltransfer61: TRANSFER.subcontoid,
+ arrivalreturn21: TRANSFER.oid,
+ arrivalreturn61: TRANSFER.subcontoid
+ };
+ const url = {
+ arrivaltransfer21: URL.transferOrder,
+ arrivaltransfer61: URL.transferSubcont,
+ arrivalreturn21: URL.transferReturnOrder,
+ arrivalreturn61: URL.transferReturnSubcont
+ };
+ let data = {
+ data: ids,
+ pagecode: PAGECODE.card,
+ queryAreaCode: AREA.searchArea,
+ oid: transferoid
+ };
+ let _this = this;
+ ajax({
+ method: 'POST',
+ url: url[type],
+ data: data,
+ success: (res) => {
+ if (res && res.data) {
+ let dataList = new Array();
+ res.data.map((o) => {
+ let datass = {};
+ datass.head = o.head;
+ datass.bodys = o.bodys;
+ datass.pageid = o.pageid;
+ if (o.grandSons && o.grandSons.card_fee_detail) {
+ datass.bodys.card_fee_detail = o.grandSons.card_fee_detail;
+ } else {
+ datass.bodys.card_fee_detail = { rows: [] };
+ }
+ datass.bodys.card_fee = { rows: [] };
+ dataList.push(datass);
+ });
+ // this.props.transferTable.setTransferListValue(AREA.leftarea, res.data);
+ this.props.transferTable.setTransferListValue(AREA.leftarea, dataList);
+ this.props.form.setFormStatus(AREA.head, 'edit');
+ this.props.cardTable.setStatus(AREA.body, 'edit');
+ this.setState({ curdata: res.data });
+ // transtypeUtils.setValue.call(this, this.props, AREA.searchArea, 'ctrantypeid', 'vtrantypecode');
+ let typecode = getDefData(COMMON.arrivalRefBillCachekey, 'cbilltypecode');
+ let typdid = getDefData(COMMON.arrivalRefBillCachekey, 'cbilltypeid');
+ let typename = getDefData(COMMON.arrivalRefBillCachekey, 'cbilltypename');
+ if (typecode && typdid && typename) {
+ this.props.form.setFormItemsValue(AREA.form, {
+ ctrantypeid: { value: typdid, display: typename },
+ vtrantypecode: { value: typecode, display: typecode }
+ });
+ }
+ this.forceUpdate();
+ }
+ },
+ error: (error) => {
+ let url = null;
+ let pagecode = null;
+ if (type == 'arrivaltransfer21') {
+ url = URL.transfer21;
+ pagecode = PAGECODE.transferOrder;
+ } else if (type == 'arrivaltransfer61') {
+ url = URL.transfer61;
+ pagecode = PAGECODE.transferSubcont;
+ } else if (type == 'arrivalreturn21') {
+ url = URL.return21;
+ pagecode = PAGECODE.returnOrder;
+ } else if (type == 'arrivalreturn61') {
+ url = URL.return61;
+ pagecode = PAGECODE.returnSubcont;
+ }
+ this.props.pushTo(url, pagecode);
+ showErrorInfo(getLangByResId(_this, '4004ARRIVAL-000076'), error.message); /* 国际化处理: 注意*/
+ }
+ });
+ };
+
+ onHideUploader = () => {
+ this.setState({
+ showUploader: false
+ });
+ };
+
+ // 提交指派
+ getAssginUsedr = (value) => {
+ //重新执行提交操作重新执行提交操作
+ if (this.state.saveAndCommit == true) {
+ saveAndCommit.call(this, value, this.skipCodes);
+ } else if (this.commitInfo.record) {
+ commit.call(this, this.props, this.commitInfo.record, this.commitInfo.index, value);
+ } else {
+ commit.call(this, this.props, null, null, value);
+ }
+ this.setState({ compositedisplay: false, saveAndCommit: false });
+ };
+
+ //删除单据
+ delConfirm = () => {
+ ajax({
+ url: URL.delete,
+ data: {
+ id: this.props.getUrlParam('id'),
+ ts: this.props.form.getFormItemsValue(this.formId, 'ts').value
+ },
+ success: () => {
+ this.props.linkTo('../list');
+ }
+ });
+ };
+ closeApprove = () => {
+ this.setState({
+ showApproveInfo: false
+ });
+ };
+
+ //获取列表肩部信息
+ getTableHead = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.cardbody,
+ ignoreHotkeyCode: getCardDisableHotKeyBtn(),
+ onButtonClick: btnClickController.bind(this)
+ })}
+
+ );
+ };
+
+ //获取费用项肩部信息
+ getTableHeadFee = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: AREA.card_fee,
+ onButtonClick: btnClickController.bind(this)
+ })}
+
+ );
+ };
+
+ //获取费用明细肩部信息
+ getTableHeadFeeDetail = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: AREA.card_fee_detail,
+ onButtonClick: btnClickController.bind(this)
+ })}
+
+ );
+ };
+
+ handleClick() {
+ this.props.pushTo('/list', { pagecode: PAGECODE.head });
+ }
+
+ back() {
+ let type = this.props.getUrlParam('type');
+ let url = '/ref21';
+ let pagecode = PAGECODE.transferOrder;
+ if (type == 'arrivaltransfer61') {
+ url = '/ref61';
+ pagecode = PAGECODE.transferSubcont;
+ } else if (type == 'arrivalreturn21') {
+ url = '/return21';
+ pagecode = PAGECODE.returnOrder;
+ } else if (type == 'arrivalreturn61') {
+ url = '/return61';
+ pagecode = PAGECODE.returnSubcont;
+ } else if (type == 'quickArr') {
+ url = '/list';
+ pagecode = PAGECODE.head;
+ }
+
+ let allprocess = this.props.transferTable.getTransformFormStatus(AREA.leftarea);
+ if (allprocess === false) {
+ showWarningDialog(getLangByResId(this, '4004ARRIVAL-000022'), getLangByResId(this, '4004ARRIVAL-000023'), {
+ /* 国际化处理: 提示,有未处理完的单据,是否退出转单?*/
+ beSureBtnClick: () => {
+ this.props.cardTable.setStatus(AREA.body, 'browse');
+ if (this.srcappcode) {
+ this.props.pushTo(url, { appcode: this.srcappcode, pagecode: pagecode });
+ } else {
+ this.props.pushTo(url, { pagecode: pagecode });
+ }
+ }
+ });
+ } else {
+ this.props.pushTo(url, { pagecode: pagecode });
+ }
+ }
+
+ sure = () => {
+ let data = {
+ vordercode: this.state.vordercode,
+ isbrowsebeforesave: this.state.isbrowsebeforesave
+ };
+
+ if (!this.state.vordercode) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000025'),
+ color: 'warning'
+ }); /* 国际化处理: 订单号未录入!*/
+ return;
+ }
+
+ if (this.state.isbrowsebeforesave == 'Y') {
+ // this.props.pushTo(URL.card, { type: 'quickArr' });
+ this.setState({ showModal: false });
+ let _this = this;
+ ajax({
+ method: 'post',
+ url: URL.quickArr,
+ data: data,
+ success: function(res) {
+ _this.props.setUrlParam({ type: 'quickArr' });
+ initTemplate.call(_this, _this.getData);
+ _this.newqick = true;
+ _this.getTransferValueByordercode(_this.state.vordercode);
+ }
+ });
+ } else {
+ this.setState({ showModal: false });
+ let __this = this;
+ ajax({
+ method: 'post',
+ url: URL.quickArr,
+ data: data,
+ success: function(res) {
+ if (res && res.data && res.data[0].head) {
+ let vbillcode = res.data[0].head[AREA.form].rows[0].values.vbillcode.value;
+
+ __this.props.form.setAllFormValue({ [AREA.form]: res.data[0].head[AREA.form] });
+ let billstatus = __this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // __this.setState({ billstatus: billstatus }, () => {
+ // __this.toggleShow(billstatus);
+ // });
+
+ __this.setState({ vbillcode: vbillcode });
+ __this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: vbillcode
+ });
+ for (let i = 0; i < res.data.length; i++) {
+ let arriveid = res.data[i].head[AREA.head].rows[0].values.pk_arriveorder.value;
+ addCacheData(
+ __this.props,
+ 'pk_arriveorder',
+ arriveid,
+ res.data[i],
+ AREA.head,
+ COMMON.arrivalCacheKey
+ );
+ changeUrlParam(__this.props, { id: arriveid, status: 'browse' });
+ }
+ }
+ if (res && res.data && res.data[0].bodys) {
+ __this.props.cardTable.setTableData(AREA.body, res.data[0].bodys[AREA.body]);
+ __this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ res.data[0].grandSons[AREA.card_fee_detail]
+ );
+
+ // let billstatus = __this.props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ // __this.toggleShow(billstatus);
+ }
+ buttonController.call(__this);
+ toast({
+ content: getLangByResId(__this, '4004ARRIVAL-000026'),
+ color: 'success'
+ }); /* 国际化处理: 快速收货成功*/
+ }
+ });
+ }
+ };
+
+ onChange = (e) => {
+ this.setState({ vordercode: e });
+ };
+
+ handleChange = (e) => {
+ this.setState({ isbrowsebeforesave: e });
+ };
+
+ select = () => {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.body);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'CopyLines', 'DeleteLine' ], false);
+ this.props.button.setButtonDisabled(
+ [
+ 'Check',
+ 'GenAssertCard',
+ 'DelAssertCard',
+ 'MaterialAssign',
+ 'GenTransAssert',
+ 'DelTransAssert',
+ 'StockQuery',
+ 'UrgentLetGo'
+ ],
+ false
+ );
+ } else {
+ this.props.button.setButtonDisabled([ 'CopyLines', 'DeleteLine' ], true);
+ this.props.button.setButtonDisabled(
+ [
+ 'Check',
+ 'GenAssertCard',
+ 'DelAssertCard',
+ 'MaterialAssign',
+ 'GenTransAssert',
+ 'DelTransAssert',
+ 'StockQuery',
+ 'UrgentLetGo'
+ ],
+ true
+ );
+ }
+ };
+
+ selectfee = () => {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.card_fee);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'Fee_Deleteline' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Fee_Deleteline' ], true);
+ }
+ };
+
+ selectfeedetail = () => {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.card_fee_detail);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'Fee_Detail_Deleteline' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Fee_Detail_Deleteline' ], true);
+ }
+ };
+
+ hideModal = () => {
+ this.setState({ showSetPiece: false });
+ };
+
+ render() {
+ let { form, cardTable, button, transferTable, modal, cardPagination } = this.props;
+ let { createForm } = form;
+ let { createCardTable } = cardTable;
+ let { createModal } = modal;
+ const { createBillHeadInfo } = this.props.BillHeadInfo;
+ let type = this.props.getUrlParam('type');
+ const { createCardPagination } = cardPagination;
+ const NCOption = NCSelect.NCOption;
+ let refdatasource = this.props.getUrlParam('type') + 'DataSource';
+ const { createTransferList } = transferTable;
+ const { socket } = this.props;
+ const MergePrintingProps = {
+ jsonData: this.state.jsonData,
+ toggleConditionModal: () => {
+ this.setState({ showConditionModal: !this.state.showConditionModal });
+ },
+ showConditionModal: this.state.showConditionModal
+ };
+
+ this.props.controlAutoFocus(true);
+ if (type) {
+ return (
+
+ {this.createConnectMesg(socket)}
+
+
+ {/* */}
+
+ {createCardTitle(this, {
+ billCode: '', //单据号
+ backBtnClick: this.back.bind(this)
+ })}
+
+
+ {this.props.button.createErrorFlag({
+ headBtnAreaCode: BUTTONAREA.cardhead
+ })}
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.cardhead,
+ onButtonClick: btnClickController.bind(this)
+ })}
+
{
+ this.setState({
+ showTrack: false
+ });
+ }}
+ pk={this.state.pk}
+ type="23"
+ />
+ {this.state.showUploader && (
+
+ )}
+
+
+ {this.state.compositedisplay && (
+ {
+ this.setState({ compositedisplay: false });
+ }}
+ />
+ )}
+
+
+
+
+ {createTransferList({
+ headcode: AREA.head,
+ bodycode: [ AREA.body, AREA.card_fee, AREA.card_fee_detail ],
+ transferListId: AREA.leftarea, //转单列表id
+ dataSource: refdatasource,
+ onTransferItemSelected: (record, status, index) => {
+ //点击转单缩略图的钩子函数
+ this.setState({
+ index: index
+ });
+ let isEdit = status ? 'browse' : 'edit';
+ if (this.indexstatus[index]) {
+ if (this.indexstatus[index] == 'browse') {
+ isEdit = 'browse';
+ } else if (this.indexstatus[index] == 'edit') {
+ isEdit = 'edit';
+ }
+ }
+ // 列表快速收货后卡片快速收货时触发,此时应该为edit,保存后将 this.newqick 设置为 false
+ if (this.newqick) {
+ isEdit = 'edit';
+ }
+ this.indexstatus[index] = isEdit;
+ this.props.form.setAllFormValue({ [this.formId]: record.head[this.formId] });
+ let billstatus = this.props.form.getFormItemsValue(this.formId, 'fbillstatus').value;
+ let vbillcode = this.props.form.getFormItemsValue(this.formId, 'vbillcode').value;
+ this.setState({ billstatus: billstatus, vbillcode: vbillcode });
+ if (record && record.bodys) {
+ this.props.cardTable.setTableData(
+ this.tableId,
+ record.bodys[this.tableId],
+ null,
+ true,
+ true
+ );
+ this.props.cardTable.setTableData(
+ AREA.card_fee,
+ record.bodys[AREA.card_fee],
+ null,
+ true,
+ true
+ );
+ //---------------------处理费用明细开始
+ this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ record.bodys[AREA.card_fee_detail],
+ null,
+ true,
+ true
+ );
+ if (record.grandSons) {
+ //---------------------处理费用明细开始
+ this.props.cardTable.setTableData(
+ AREA.card_fee_detail,
+ record.grandSons[AREA.card_fee_detail],
+ null,
+ true,
+ true
+ );
+ }
+ // 重新构建到货单物料信息和费用明细之间的关系
+ // 物料信息
+ let carddata = this.props.cardTable.getVisibleRows(AREA.body);
+ // 费用明细信息
+ let feedata = this.props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ // 通过采购订单表体主键找到对应关系,然后把费用明细记录的到货单表体主键设置为rowid
+ if (carddata && feedata) {
+ carddata.map((item) => {
+ feedata.map((item1) => {
+ if (
+ item.values[FIELD.pk_order_b].value &&
+ item1.values[FIELD.pk_arriveorder_b].value &&
+ item.values[FIELD.pk_order_b].value ==
+ item1.values[FIELD.pk_arriveorder_b].value
+ ) {
+ item1.values[FIELD.pk_arriveorder_b].value = item.rowid;
+ }
+ });
+ });
+ }
+ RownoUtils.setRowNo(this.props, AREA.card_fee_detail, FIELD.crowno);
+ //---------------------处理费用明细结束
+ }
+ if (record && record.body) {
+ this.props.cardTable.setTableData(
+ this.tableId,
+ record.body[this.tableId],
+ null,
+ true,
+ true
+ );
+ }
+ this.props.form.setFormStatus(this.formId, isEdit);
+ this.props.cardTable.setStatus(this.tableId, isEdit);
+ this.props.cardTable.setStatus(AREA.card_fee, isEdit);
+ this.props.cardTable.setStatus(AREA.card_fee_detail, isEdit);
+ buttonController.call(this, isEdit);
+ this.manyTrans = false;
+ }
+ })}
+
+
+ {createForm(this.formId, {
+ expandArr: [ PAGECODE.head ],
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this)
+ })}
+
+
+ {/* {this.getTableHead()} */}
+ {/* {createCardTable(this.tableId, {
+ tableHead: this.getTableHead,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ hideAdd: true,
+ hideDel: false,
+ hideModelSave: true,
+ adaptionHeight: true,
+ onSelected: this.select,
+ onBatchSelected: this.select,
+ selectedChange: this.select
+ })} */}
+ {createCardTable(this.tableId, {
+ multiConfig: {
+ [this.tableId]: {
+ tableHead: this.getTableHead,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ hideAdd: true,
+ hideDel: false,
+ hideModelSave: true,
+ adaptionHeight: true,
+ onSelected: this.select,
+ onBatchSelected: this.select,
+ selectedChange: this.select,
+ modelDelRow: (props, moduleId, rowId) => {
+ let pk_arriveorder_b = props.cardTable.getValByKeyAndRowId(
+ moduleId,
+ rowId.beforeDelRowid,
+ FIELD.pk_arriveorder_b
+ );
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ (pk_arriveorder_b &&
+ pk_arriveorder_b.value ==
+ item.values.pk_arriveorder_b.value) ||
+ rowId.beforeDelRowid == item.values.pk_arriveorder_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, indexs);
+ }
+ }
+ },
+ [AREA.card_fee]: {
+ tableHead: this.getTableHeadFee,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onSelected: this.selectfee,
+ onSelectedAll: this.selectfee,
+ onBatchSelected: this.selectfee,
+ onBatchChange: batchFeeEvents.bind(this),
+ hideAdd: true,
+ hideDel: false,
+ hideModelSave: true,
+ adaptionHeight: true
+ },
+ [AREA.card_fee_detail]: {
+ tableHead: this.getTableHeadFeeDetail,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onSelected: this.selectfeedetail,
+ onSelectedAll: this.selectfeedetail,
+ onBatchSelected: this.selectfeedetail,
+ onBatchChange: batchFeeDetailEvents.bind(this),
+ hideAdd: true,
+ hideDel: false,
+ hideModelSave: true,
+ adaptionHeight: true
+ }
+ }
+ })}
+
+ {createModal('delete', {
+ title: getLangByResId(this, '4004ARRIVAL-000002') /* 国际化处理: 删除*/,
+ content: getLangByResId(this, '4004ARRIVAL-000028') /* 国际化处理: 是否确认删除?*/,
+ beSureBtnClick: this.delConfirm
+ })}
+ {createModal('code-config')}
+ {createModal('MessageDlg', {
+ zIndex: 350,
+ content: this.state.msgContent
+ })}
+ {/* 物料行参照*/}
+ {this.createTransferModal()}
+ {/* 合并打印 */}
+ {this.state.jsonData &&
}
+ {/* 分单打印 */}
+
+ {this.state.showSpilt && (
+
{
+ this.setState({ showSpilt: false });
+ }}
+ />
+ )}
+
+ {/* 快速收货弹窗 */}
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000030')}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000033')}
+
+
+ {getLangByResId(this, '4004ARRIVAL-000034')}
+
+
+
+
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000035') /* 国际化处理: 确定*/}(Y)
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000036') /* 国际化处理: 取消*/}(N)
+
+
+
+
+
+ {/* 成套件 2019-04-12*/}
+ {
+ this.setState({ showSetPiece: false });
+ }}
+ />
+ {/* 存量查询 2019-04-22*/}
+ {
+ this.setState({ showStockQuery: false });
+ }}
+ />
+
+
+
+ );
+ } else {
+ return (
+
+ {this.createConnectMesg(socket)}
+
+
+
+
+ {createCardTitle(this, {
+ billCode: '', //单据号
+ backBtnClick: this.handleClick.bind(this)
+ })}
+
+
+
+ {this.props.button.createErrorFlag({
+ headBtnAreaCode: BUTTONAREA.cardhead
+ })}
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.cardhead,
+ onButtonClick: btnClickController.bind(this)
+ })}
+
{
+ this.setState({
+ showTrack: false
+ });
+ }}
+ pk={this.state.pk}
+ type="23"
+ />
+ {this.state.showUploader && (
+
+ )}
+
+ {/* 上一页/下一页 */}
+
+ {createCardPagination({
+ handlePageInfoChange: pageInfoClick.bind(this),
+ dataSource: COMMON.arrivalCacheKey
+ })}
+
+ {this.state.jsonData && }
+ {/* 分单打印 */}
+ {this.state.showSpilt && (
+ {
+ this.setState({ showSpilt: false });
+ }}
+ />
+ )}
+
+
+
+
+ {createForm(this.formId, {
+ expandArr: [ PAGECODE.head ],
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this)
+ })}
+
+
+
+ {/* 表体 */}
+
+ {/* {this.getTableHead()} */}
+ {/* {createCardTable(this.tableId, {
+ tableHead: this.getTableHead,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ hideAdd: true,
+ adaptionHeight: true,
+ hideModelSave: true,
+ onSelected: this.select,
+ onBatchSelected: this.select,
+ selectedChange: this.select
+ })} */}
+ {createCardTable(this.tableId, {
+ multiConfig: {
+ [this.tableId]: {
+ tableHead: this.getTableHead,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ hideAdd: true,
+ adaptionHeight: true,
+ hideModelSave: true,
+ onSelected: this.select,
+ onBatchSelected: this.select,
+ selectedChange: this.select,
+ modelDelRow: (props, moduleId, rowId) => {
+ let pk_arriveorder_b = props.cardTable.getValByKeyAndRowId(
+ moduleId,
+ rowId.beforeDelRowid,
+ FIELD.pk_arriveorder_b
+ );
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ (pk_arriveorder_b &&
+ pk_arriveorder_b.value ==
+ item.values.pk_arriveorder_b.value) ||
+ rowId.beforeDelRowid == item.values.pk_arriveorder_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, indexs);
+ }
+ }
+ },
+ [AREA.card_fee]: {
+ tableHead: this.getTableHeadFee,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onBatchChange: batchFeeEvents.bind(this),
+ onSelected: this.selectfee,
+ onSelectedAll: this.selectfee,
+ onBatchSelected: this.selectfee,
+ hideAdd: true,
+ adaptionHeight: true,
+ hideModelSave: true
+ },
+ [AREA.card_fee_detail]: {
+ tableHead: this.getTableHeadFeeDetail,
+ showCheck: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onBatchChange: batchFeeDetailEvents.bind(this),
+ onSelected: this.selectfeedetail,
+ onSelectedAll: this.selectfeedetail,
+ onBatchSelected: this.selectfeedetail,
+ hideAdd: true,
+ adaptionHeight: true,
+ hideModelSave: true
+ }
+ }
+ })}
+
+
+ {createModal('delete')}
+ {createModal('code-config')}
+ {createModal('MessageDlg', {
+ zIndex: 350,
+ content: this.state.msgContent
+ })}
+ {/* 物料行参照*/}
+ {this.createTransferModal()}
+ {/* 快速收货弹窗 */}
+ {/* 快速收货弹窗 */}
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000030')}
+
+
+
+
+
+
+
+
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000033')}
+ {getLangByResId(this, '4004ARRIVAL-000034')}
+
+
+
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000035') /* 国际化处理: 确定*/}(Y)
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000036') /* 国际化处理: 取消*/}(N)
+
+
+
+
+ {this.state.compositedisplay && (
+
{
+ let arriveid = this.props.form.getFormItemsValue(AREA.form, 'pk_arriveorder').value;
+ changeUrlParam(this.props, { id: arriveid, status: 'browse' });
+ this.props.form.setFormStatus(AREA.head, 'browse');
+
+ this.props.cardTable.setStatus(AREA.body, 'browse');
+ this.props.button.setButtonVisible(ALLBUTTONS, false);
+ this.props.button.setButtonVisible(FREEBUTTONS, true);
+ this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+ // this.setState({ isShowBack: true });
+ let type = this.props.getUrlParam('type');
+ if (type) {
+ rewriteTransferSrcBids(
+ this.props,
+ 'csourcebid',
+ this.props.cardTable.getAllRows(AREA.body).rows
+ );
+ }
+ this.setState({ compositedisplay: false });
+ }}
+ />
+ )}
+ {/* 成套件 2019-04-12*/}
+ {
+ this.setState({ showSetPiece: false });
+ }}
+ />
+ {/* 存量查询 2019-04-22*/}
+ {
+ this.setState({ showStockQuery: false });
+ }}
+ />
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+ }
+ }
+ createConnectMesg = (socket) => {
+ return (
+
+ {socket.connectMesg({
+ headBtnAreaCode: BUTTONAREA.cardhead, // 表头按钮区域ID
+ formAreaCode: AREA.head, // 表头Form区域ID
+ billtype: '23',
+ billpkname: FIELD.pk_arriveorder,
+ dataSource: COMMON.arrivalCacheKey
+ })}
+
+ );
+ };
+}
+
+ArrivalCard = createPage({
+ billinfo: {
+ billtype: 'extcard',
+ pagecode: PAGECODE.card,
+ headcode: AREA.head,
+ bodycode: [ AREA.body, AREA.card_fee, AREA.card_fee_detail ]
+ },
+ orderOfHotKey: [ AREA.head, AREA.body, AREA.card_fee, AREA.card_fee_detail ]
+ //mutiLangCode: COMMON.moudleid
+})(ArrivalCard);
+
+// ReactDOM.render(, document.querySelector('#app'));
+export default ArrivalCard;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/index.less b/src/pu/pu/arrival/card/index.less
new file mode 100644
index 0000000..e6c09ff
--- /dev/null
+++ b/src/pu/pu/arrival/card/index.less
@@ -0,0 +1,19 @@
+.quick-receive-modal {
+ .field-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 8px;
+ .field-label {
+ width: 120px;
+ text-align: right;
+ margin-right: 8px;
+ &::before {
+ content: "*";
+ color: red;
+ }
+ }
+ .field-content {
+ width: 200px;
+ }
+ }
+}
diff --git a/src/pu/pu/arrival/card/init/index.js b/src/pu/pu/arrival/card/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/arrival/card/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/init/initTemplate.js b/src/pu/pu/arrival/card/init/initTemplate.js
new file mode 100644
index 0000000..f1ca743
--- /dev/null
+++ b/src/pu/pu/arrival/card/init/initTemplate.js
@@ -0,0 +1,634 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单列表界面元数据初始化
+ * @Date: 2018-04-02 13:46:03
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-16 20:44:57
+ */
+import { tableButtonClick } from '../btnClicks';
+import { PAGECODE, APPID, AREA, BUTTONAREA, ALLBUTTONS, FIELD } from '../../constance';
+import MeasdocDefaultGridRef from 'uapbd/refer/material/MeasdocDefaultGridRef';
+import PsndocTreeGridRef from 'uapbd/refer/psninfo/PsndocTreeGridRef';
+import RacKDefaultTreeRef from 'uapbd/refer/busiinfo/RackDefaultTreeRef';
+import MaterialMultiVersionGridRef from 'uapbd/refer/material/MaterialVersionGridRef';
+import { transtypeUtils, deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { columnSortUtils } from '../../../../../scmpub/scmpub/pub/tool/columnSortUtils';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function(callback) {
+ let type = this.props.getUrlParam('type');
+ if (
+ type === 'transfer21' ||
+ type === 'transfer61' ||
+ type === 'return21' ||
+ type === 'return61' ||
+ type === 'quickArr'
+ ) {
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.card //页面id
+ //appid: APPID //注册按钮的id
+ },
+ (data) => {
+ if (data) {
+ transtypeUtils.init.call(this, data.context);
+ if (data.button) {
+ let button = data.button;
+ // RownoUtils.resetRowNo(this.props, this.tableId, 'crowno');
+ this.props.button.setButtons(button);
+ }
+ if (data.template) {
+ let meta = data.template;
+ this.templateid = meta.pageid;
+ this.meta = deepClone(meta);
+ // if (!data.template[AREA.card_fee] && !data.template[AREA.card_fee_detail]) {
+ // showWarningInfo(
+ // null,
+ // getLangByResId(this, '4004ORDERREVISE-000065')
+ // ); /* 国际化处理: 模板中不存在【费用项】【费用明细】页签,请重新复制预制模板*/
+ // return;
+ // }
+ modifierMeta.call(this, this.props, meta);
+ this.props.meta.setMeta(meta);
+ this.srcappcode = this.props.getUrlParam('srcappcode');
+ }
+ callback();
+ }
+ }
+ );
+ } else {
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.card, //页面id
+ appid: APPID //注册按钮的id
+ },
+ (data) => {
+ if (data) {
+ transtypeUtils.init.call(this, data.context);
+ if (data.button) {
+ let button = data.button;
+
+ // RownoUtils.resetRowNo(this.props, this.tableId, 'crowno');
+ this.props.button.setButtons(button);
+ this.props.button.setButtonVisible(ALLBUTTONS, false);
+ this.props.button.setButtonVisible('Quit', false);
+ }
+ if (data.template) {
+ let meta = data.template;
+ this.meta = deepClone(meta);
+ this.templateid = meta.pageid;
+ // if (!data.template[AREA.card_fee] && !data.template[AREA.card_fee_detail]) {
+ // showWarningInfo(
+ // null,
+ // getLangByResId(this, '4004ARRIVAL-000073')
+ // ); /* 国际化处理: 模板中不存在【费用项】【费用明细】页签,请重新复制预制模板*/
+ // return;
+ // }
+ modifierMeta.call(this, this.props, meta);
+ this.props.meta.setMeta(meta);
+ }
+ if (this.props.getUrlParam('scene') == 'approvesce') {
+ // this.setState({ isShowBack: false });
+ this.isapprove = 'Y';
+ }
+ this.srcappcode = this.props.getUrlParam('srcappcode');
+ callback();
+ }
+ }
+ );
+ }
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ let linkmap = new Map([
+ [
+ 'vsourcecode',
+ {
+ billtypeField: 'csourcetypecode',
+ pkField: 'csourceid'
+ }
+ ],
+ [
+ 'vfirstcode',
+ {
+ billtypeField: 'cfirsttypecode',
+ pkField: 'cfirstid'
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: AREA.table,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let _this = this;
+ let status = props.getUrlParam('status');
+ meta[AREA.form].status = status;
+ meta[AREA.table].status = status;
+ // 参照过滤处理
+ meta[AREA.form].items.map((item) => {
+ if (item.attrcode === 'ctrantypeid') {
+ item.queryCondition = () => {
+ let pk_org =
+ props.form.getFormItemsValue(AREA.form, 'pk_org') == null
+ ? null
+ : props.form.getFormItemsValue(AREA.form, 'pk_org').value; // 调用相应组件的取值API
+ let pk_busitype =
+ props.form.getFormItemsValue(AREA.form, 'pk_busitype') == null
+ ? null
+ : props.form.getFormItemsValue(AREA.form, 'pk_busitype').value;
+ return {
+ parentbilltype: '23',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSITYPE: pk_busitype,
+ SCM_BUSIORG: pk_org,
+ GridRefActionExt: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ };
+ };
+ } else if (item.attrcode == 'pk_receivepsndoc') {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org =
+ props.form.getFormItemsValue(AREA.form, 'pk_org') == null
+ ? null
+ : props.form.getFormItemsValue(AREA.form, 'pk_org').value; // 调用相应组件的取值API
+ return {
+ pk_org: pk_org, // 这里对record.values.materiel要做一下非空校验
+ busifuncode: 'st'
+ };
+ };
+ } else if (item.attrcode == 'pk_pupsndoc') {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org =
+ props.form.getFormItemsValue(AREA.form, 'pk_purchaseorg') == null
+ ? null
+ : props.form.getFormItemsValue(AREA.form, 'pk_purchaseorg').value; // 调用相应组
+ return { pk_org: pk_org, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_dept_v') {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org =
+ props.form.getFormItemsValue(AREA.form, 'pk_purchaseorg') == null
+ ? null
+ : props.form.getFormItemsValue(AREA.form, 'pk_purchaseorg').value;
+ return { pk_org: pk_org, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org =
+ props.form.getFormItemsValue(AREA.form, 'pk_org') == null
+ ? null
+ : props.form.getFormItemsValue(AREA.form, 'pk_org').value; // 调用相应组件的取值API
+ return { pk_org: pk_org }; // 根据pk_org过滤
+ };
+ }
+ });
+
+ meta[AREA.body].items.map((item) => {
+ // TODO 批次号 物料
+ item.col = 4;
+ // item.width = 120;
+ if (item.attrcode == 'castunitid') {
+ item.render = function(text, record, index) {
+ console.log(record);
+ return MeasdocDefaultGridRef({
+ queryCondition: () => {
+ return {
+ // 这里对record.values.materiel要做一下非空校验
+ scm_cmaterialid: (record.values.pk_material || {}).value,
+ GridRefActionExt: 'nccloud.web.scmpub.ref.MeasdocRefFilterUtils'
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_receivepsndoc') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'creporterid') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_group: (record.pk_group || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ }
+ });
+ };
+ // } else if (item.attrcode == 'pk_receivestore') {
+ // item.isShowUnit = false;
+ // item.render = function(text, record, index) {
+ // return StorDocDefaulteGridRef({
+ // queryCondition: () => {
+ // let pk_org = (record.values.pk_org || {}).value;
+ // let condition = {};
+ // let csourcetypecode = (record.values.csourcetypecode || {}).value;
+ // let vsourcetrantype = (record.values.vsourcetrantype || {}).value;
+ // let pk_arrliabcenter = (record.values.pk_arrliabcenter || {}).value;
+ // condition.pk_org = pk_org;
+ // condition.csourcetypecode = csourcetypecode;
+ // condition.vsourcetrantype = vsourcetrantype;
+ // condition.pk_arrliabcenter = pk_arrliabcenter;
+ // condition.GridRefActionExt = 'nccloud.web.pu.arrival.ref.ReceiveStoreRefSqlBuilder';
+ // return condition;
+ // }
+ // });
+ // };
+ } else if (item.attrcode == 'creporterid') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_group: (record.values.pk_group || {}).value
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_rack') {
+ item.render = function(text, record, index) {
+ return RacKDefaultTreeRef({
+ queryCondition: () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value,
+ pk_store: (record.values.pk_receivestore || {}).value,
+ TreeRefActionExt: 'nccloud.web.pu.arrival.ref.StoragedocRefFilterUtils'
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_material') {
+ item.render = function(text, record, index) {
+ item.refName = getLangByResId(_this, '4004ARRIVAL-000037'); /* 国际化处理: 物料替换件参照*/
+ return MaterialMultiVersionGridRef({
+ queryCondition: () => {
+ let warehouse = record.values.pk_receivestore;
+ let pk_org = record.values.pk_org;
+ let condition = {};
+ condition.pk_org = pk_org.value;
+ let csourcebillbid = record.values.csourcebid;
+ condition.GridRefActionExt = 'nccloud.web.pu.arrival.ref.MaterialRefSqlBuilder';
+ if (csourcebillbid && csourcebillbid.value) {
+ condition.csourcebillbid = csourcebillbid.value;
+ }
+ let bpresent = record.values.bpresent;
+ if (bpresent && bpresent.value) {
+ condition.bpresent = bpresent.value;
+ }
+ let cmaterialvid = record.values.pk_material;
+ if (cmaterialvid && cmaterialvid.value) {
+ condition.cmaterialvid = cmaterialvid.value;
+ }
+ return condition;
+ }
+ });
+ };
+ } else if (item.attrcode == 'cffileid') {
+ item.queryCondition = () => {
+ return { cmaterialvid: (record.values.pk_material || {}).value }; // 根据pk_org过滤
+ };
+ } else {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(AREA.head, 'pk_org').value;
+ return { pk_org: pk_org }; // 根据pk_org过滤
+ };
+ }
+ });
+
+ // 费用项
+ meta[AREA.card_fee] &&
+ meta[AREA.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode != FIELD.pk_org) {
+ item.queryCondition = () => {
+ let org = props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ return { pk_org: org };
+ };
+ }
+ });
+ // 费用明细
+ meta[AREA.card_fee_detail] &&
+ meta[AREA.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode != FIELD.pk_org) {
+ item.queryCondition = () => {
+ let org = props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value;
+ return { pk_org: org };
+ };
+ }
+ });
+
+ meta['childform1'].items.map((item) => {
+ // TODO 批次号 物料
+ item.col = 4;
+ // item.width = 120;
+ if (item.attrcode == 'castunitid') {
+ item.render = function(text, record, index) {
+ console.log(record);
+ return MeasdocDefaultGridRef({
+ queryCondition: () => {
+ return {
+ // 这里对record.values.materiel要做一下非空校验
+ scm_cmaterialid: (record.values.pk_material || {}).value,
+ GridRefActionExt: 'nccloud.web.scmpub.ref.MeasdocRefFilterUtils'
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_receivepsndoc') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'creporterid') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_group: (record.pk_group || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_receivestore') {
+ // item.render = function(text, record, index) {
+ // return StorDocDefaulteGridRef({
+ // queryCondition: () => {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value
+ // };
+ // }
+ // });
+ // };
+ } else if (item.attrcode == 'creporterid') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_group: (record.values.pk_group || {}).value
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_rack') {
+ item.render = function(text, record, index) {
+ return RacKDefaultTreeRef({
+ queryCondition: () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value,
+ pk_store: (record.values.pk_receivestore || {}).value,
+ TreeRefActionExt: 'nccloud.web.pu.arrival.ref.StoragedocRefFilterUtils'
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_material') {
+ item.render = function(text, record, index) {
+ item.refName = getLangByResId(_this, '4004ARRIVAL-000037'); /* 国际化处理: 物料替换件参照*/
+ return MaterialMultiVersionGridRef({
+ queryCondition: () => {
+ let warehouse = record.values.pk_receivestore;
+ let pk_org = record.values.pk_org;
+ let condition = {};
+ condition.pk_org = pk_org.value;
+ let csourcebillbid = record.values.csourcebid;
+ condition.GridRefActionExt = 'nccloud.web.pu.arrival.ref.MaterialRefSqlBuilder';
+ if (csourcebillbid && csourcebillbid.value) {
+ condition.csourcebillbid = csourcebillbid.value;
+ }
+ let bpresent = record.values.bpresent;
+ if (bpresent && bpresent.value) {
+ condition.bpresent = bpresent.value;
+ }
+ let cmaterialvid = record.values.pk_material;
+ if (cmaterialvid && cmaterialvid.value) {
+ condition.cmaterialvid = cmaterialvid.value;
+ }
+ return condition;
+ }
+ });
+ };
+ } else {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(AREA.head, 'pk_org').value;
+ return { pk_org: pk_org }; // 根据pk_org过滤
+ };
+ }
+ });
+
+ meta['childform2'].items.map((item) => {
+ // TODO 批次号 物料
+ item.col = 4;
+ // item.width = 120;
+ if (item.attrcode == 'castunitid') {
+ item.render = function(text, record, index) {
+ console.log(record);
+ return MeasdocDefaultGridRef({
+ queryCondition: () => {
+ return {
+ // 这里对record.values.materiel要做一下非空校验
+ scm_cmaterialid: (record.values.pk_material || {}).value,
+ GridRefActionExt: 'nccloud.web.scmpub.ref.MeasdocRefFilterUtils'
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_receivepsndoc') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'creporterid') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_group: (record.pk_group || {}).value // 这里对record.values.materiel要做一下非空校验
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_receivestore') {
+ // item.render = function(text, record, index) {
+ // return StorDocDefaulteGridRef({
+ // queryCondition: () => {
+ // return {
+ // pk_org: (record.values.pk_org || {}).value
+ // };
+ // }
+ // });
+ // };
+ } else if (item.attrcode == 'creporterid') {
+ item.render = function(text, record, index) {
+ return PsndocTreeGridRef({
+ queryCondition: () => {
+ return {
+ pk_group: (record.values.pk_group || {}).value
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_rack') {
+ item.render = function(text, record, index) {
+ return RacKDefaultTreeRef({
+ queryCondition: () => {
+ return {
+ pk_org: (record.values.pk_org || {}).value,
+ pk_store: (record.values.pk_receivestore || {}).value,
+ TreeRefActionExt: 'nccloud.web.pu.arrival.ref.StoragedocRefFilterUtils'
+ };
+ }
+ });
+ };
+ } else if (item.attrcode == 'pk_material') {
+ item.render = function(text, record, index) {
+ item.refName = getLangByResId(_this, '4004ARRIVAL-000037'); /* 国际化处理: 物料替换件参照*/
+ return MaterialMultiVersionGridRef({
+ queryCondition: () => {
+ let warehouse = record.values.pk_receivestore;
+ let pk_org = record.values.pk_org;
+ let condition = {};
+ condition.pk_org = pk_org.value;
+ let csourcebillbid = record.values.csourcebid;
+ condition.GridRefActionExt = 'nccloud.web.pu.arrival.ref.MaterialRefSqlBuilder';
+ if (csourcebillbid && csourcebillbid.value) {
+ condition.csourcebillbid = csourcebillbid.value;
+ }
+ let bpresent = record.values.bpresent;
+ if (bpresent && bpresent.value) {
+ condition.bpresent = bpresent.value;
+ }
+ let cmaterialvid = record.values.pk_material;
+ if (cmaterialvid && cmaterialvid.value) {
+ condition.cmaterialvid = cmaterialvid.value;
+ }
+ return condition;
+ }
+ });
+ };
+ } else {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org = props.form.getFormItemsValue(AREA.head, 'pk_org').value;
+ return { pk_org: pk_org }; // 根据pk_org过滤
+ };
+ }
+ });
+
+ let porCol = {
+ itemtype: 'customer',
+ attrcode: 'opr',
+ label: getLangByResId(_this, '4004ARRIVAL-000038') /* 国际化处理: 操作*/,
+ visible: true,
+ width: '200px',
+ fixed: 'right',
+ render(text, record, index) {
+ let status = props.cardTable.getStatus(AREA.body);
+ let billstatus = props.form.getFormItemsValue(AREA.head, 'fbillstatus').value;
+ let buttonAry = [ 'Expend', 'DeleteLine', 'CopyLine', 'CheckLine' ];
+ if (status == 'edit') {
+ if (_this.copyRowDatas == null) {
+ buttonAry = [ 'Expend', 'DeleteLine', 'CopyLine', 'SetPiece' ];
+ } else {
+ buttonAry = [ 'PastToThis' ];
+ }
+ } else if (billstatus == 0) {
+ buttonAry = [ 'Expend', 'SetPiece' ];
+ } else if (billstatus == 1) {
+ buttonAry = [ 'Expend', 'SetPiece' ];
+ } else if (billstatus == 2) {
+ buttonAry = [ 'Expend', 'SetPiece' ];
+ } else if (billstatus == 3) {
+ buttonAry = [ 'Expend', 'CheckLine', 'SetPiece' ];
+ }
+ return props.button.createOprationButton(buttonAry, {
+ area: BUTTONAREA.cardbodyinner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => tableButtonClick.call(_this, props, key, text, record, index)
+ });
+ }
+ };
+
+ let porColFee = {
+ itemtype: 'customer',
+ attrcode: 'opr',
+ label: getLangByResId(_this, '4004ARRIVAL-000038') /* 国际化处理: 操作*/,
+ visible: true,
+ width: '200px',
+ fixed: 'right',
+ render(text, record, index) {
+ let paymentStatus = props.cardTable.getStatus(AREA.card_fee);
+ let buttonAry = paymentStatus != 'browse' ? [ 'Fee_Deleteline_row' ] : [];
+ return props.button.createOprationButton(buttonAry, {
+ area: BUTTONAREA.card_fee_inner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => tableButtonClick.call(_this, props, key, text, record, index)
+ });
+ }
+ };
+
+ let porColFeeDetail = {
+ itemtype: 'customer',
+ attrcode: 'opr',
+ label: getLangByResId(_this, '4004ARRIVAL-000038') /* 国际化处理: 操作*/,
+ visible: true,
+ width: '200px',
+ fixed: 'right',
+ render(text, record, index) {
+ let paymentStatus = props.cardTable.getStatus(AREA.card_fee_detail);
+ let buttonAry = paymentStatus != 'browse' ? [ 'Fee_Detail_Deleteline_row' ] : [];
+ return props.button.createOprationButton(buttonAry, {
+ area: BUTTONAREA.card_fee_detail_inner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => tableButtonClick.call(_this, props, key, text, record, index)
+ });
+ }
+ };
+ meta[AREA.body].items.push(porCol);
+ meta[AREA.card_fee] && meta[AREA.card_fee].items.push(porColFee); // 费用项
+ meta[AREA.card_fee_detail] && meta[AREA.card_fee_detail].items.push(porColFeeDetail); //费用明细
+ // 行号排序处理
+ columnSortUtils.numberSort(meta, AREA.body, FIELD.crowno);
+
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/viewControl/btnClickController.js b/src/pu/pu/arrival/card/viewControl/btnClickController.js
new file mode 100644
index 0000000..1c2b832
--- /dev/null
+++ b/src/pu/pu/arrival/card/viewControl/btnClickController.js
@@ -0,0 +1,354 @@
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
+import {
+ saveBtnClick,
+ quickReceiveBtnClick,
+ cancelBtnClick,
+ editBtnClick,
+ deleteBtnClick,
+ saveSendBtnClick,
+ dirPrintBarcodeBtnClick,
+ unCommitBtnClick,
+ copyLinesBtnClick,
+ pastToLastBtnClick,
+ cancelPastBtnClick,
+ deleteLinesBtnClick,
+ resetRownoBtnClick,
+ genAssertCardBtnClick,
+ delAssertCardBtnClick,
+ genTransAssertBtnClick,
+ delTransAssertBtnClick,
+ checkBtnClick,
+ refOrderBtnClick,
+ refSubcontBtnClick,
+ returnOrderBtnClick,
+ returnSubcontBtnClick,
+ returnArrivalBtnClick,
+ queryAboutBusinessBtnClick,
+ printBtnClick,
+ outPrintBtnClick,
+ accessoryManageBtnClick,
+ approveInfoBtnClick,
+ refreashBtnClick,
+ commit,
+ quitBtnClick,
+ materialAssignBtnClick,
+ splitPrintClick,
+ combinPrintClick,
+ saveAndCommit,
+ pasteLineBtn
+} from '../btnClicks';
+import stockQuery from '../btnClicks/stockQuery';
+import { NCModule } from '../../../pub/constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import urgentLetGo from '../btnClicks/urgentLetGo';
+import sysModuleCheck from '../../../pub/remoteCall/sysModuleCheck';
+import printbarCodeBtnClick from '../btnClicks/printbarCodeBtnClick';
+import { FIELD, AREA } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
+import { toast } from 'nc-lightapp-front';
+
+export default function buttonClick(props, id) {
+ switch (id) {
+ case 'Save':
+ saveBtnClick.call(this, props, id);
+ break;
+ case 'QuickReceive':
+ quickReceiveBtnClick.bind(this)();
+ break;
+ case 'Cancel':
+ cancelBtnClick.bind(this, props)();
+ break;
+ case 'Edit':
+ editBtnClick.bind(this)();
+ break;
+ case 'Delete':
+ deleteBtnClick.bind(this)();
+ break;
+ case 'Back':
+ window.location.hash = URL.list;
+ break;
+ case 'SaveSend': //保存提交
+ saveAndCommit.call(this);
+ // saveSendBtnClick.bind(this)();
+ break;
+ //打印条形码
+ case 'PrintBarCode':
+ printbarCodeBtnClick.call(this, props);
+ break;
+ case 'DirPrintBarcode':
+ dirPrintBarcodeBtnClick.bind(this)();
+ break;
+ case 'Commit':
+ commit.bind(this)();
+ break;
+ case 'UnCommit':
+ unCommitBtnClick.bind(this)();
+ break;
+ case 'CopyLines':
+ copyLinesBtnClick.bind(this)();
+ break;
+ case 'PastToLast': // 物料 粘贴至末行
+ // pastToLastBtnClick.bind(this)();
+ pasteLineBtn.call(this, props, null, null);
+ props.updatePage(AREA.head, [ AREA.card_fee_detail ]);
+ break;
+ case 'CancelPast': // 物料 复制取消
+ cancelPastBtnClick.bind(this)();
+ break;
+ case 'DeleteLine':
+ deleteLinesBtnClick.bind(this)();
+ break;
+ case 'ResetRowno':
+ resetRownoBtnClick.bind(this)();
+ let bodys = props.cardTable.getVisibleRows(AREA.body);
+ let grandsons = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ grandsons.forEach((item) => {
+ for (let i = 0; i < bodys.length; i++) {
+ if (
+ (bodys[i].values.pk_arriveorder_b &&
+ item.values.pk_arriveorder_b.value &&
+ item.values.pk_arriveorder_b.value == bodys[i].values.pk_arriveorder_b.value) ||
+ item.values.pk_arriveorder_b.value == bodys[i].rowid
+ ) {
+ props.cardTable.setValByKeyAndRowId(
+ AREA.card_fee_detail,
+ item.rowid,
+ FIELD.cmatrowno,
+ bodys[i].values.crowno
+ );
+ break;
+ }
+ }
+ });
+ break;
+ case 'GenAssertCard':
+ genAssertCardBtnClick.bind(this)();
+ break;
+ case 'DelAssertCard':
+ delAssertCardBtnClick.bind(this)();
+ break;
+ case 'GenTransAssert':
+ genTransAssertBtnClick.bind(this)();
+ break;
+ case 'DelTransAssert':
+ delTransAssertBtnClick.bind(this)();
+ break;
+ case 'Check':
+ checkBtnClick.bind(this)();
+ break;
+ case 'RefOrder':
+ refOrderBtnClick.bind(this)();
+ break;
+ case 'RefSubcont':
+ refSubcontBtnClick.bind(this)();
+ break;
+ case 'ReturnOrder':
+ returnOrderBtnClick.bind(this)();
+ break;
+ case 'ReturnSubcont':
+ returnSubcontBtnClick.bind(this)();
+ break;
+ case 'ReturnArrival':
+ returnArrivalBtnClick.bind(this)();
+ break;
+ case 'QueryAboutBusiness':
+ queryAboutBusinessBtnClick.bind(this)();
+ break;
+ case 'Print':
+ printBtnClick.bind(this)();
+ break;
+ case 'OutPrint':
+ outPrintBtnClick.bind(this)();
+ break;
+ case 'AccessoryManage':
+ accessoryManageBtnClick.bind(this)();
+ break;
+ case 'ApproveInfo':
+ approveInfoBtnClick.bind(this)();
+ break;
+ case 'SplitPrint':
+ splitPrintClick.call(this, this.props);
+ break;
+ case 'CombinPrint':
+ combinPrintClick.call(this, this.props);
+ break;
+ case 'Refresh':
+ refreashBtnClick.bind(this)();
+ break;
+ case 'MaterialAssign':
+ sysModuleCheck.call(this, NCModule.RUM, getLangByResId(this, '4004ARRIVAL-000064'), () => {
+ materialAssignBtnClick.call(this, this.props);
+ });
+ break;
+ case 'Quit':
+ quitBtnClick.bind(this)();
+ break;
+ case 'StockQuery':
+ stockQuery.bind(this)();
+ break;
+ case 'UrgentLetGo':
+ urgentLetGo.call(this, props);
+ break;
+ case 'PrintCountQuery':
+ let CONST = { hid: FIELD.pk_arriveorder, area: AREA.form };
+ printCountQuery.call(this, props, { type: 2, CONST, modal: 'code-config' });
+ break;
+ case 'Fee_Addline': //费用项增行
+ // 来源于委外订单费用项不允许增行
+ let bodyData1 = this.props.cardTable.getVisibleRows(AREA.body);
+ let type = this.props.getUrlParam('type');
+ if (
+ (bodyData1 &&
+ bodyData1.length > 0 &&
+ bodyData1[0].values[FIELD.csourcetypecode] &&
+ bodyData1[0].values[FIELD.csourcetypecode].value == '61') ||
+ type == 'arrivaltransfer61' ||
+ type == 'arrivalreturn61'
+ ) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000075')
+ });
+ return;
+ }
+ let feerowCount = props.cardTable.getNumberOfRows(AREA.card_fee);
+ props.cardTable.addRow(
+ AREA.card_fee,
+ feerowCount,
+ { nitemdiscountrate: { display: '100.00', value: '100.00' } },
+ true
+ );
+ RownoUtils.setRowNo(props, AREA.card_fee, FIELD.crowno);
+ break;
+ case 'Fee_Deleteline': //费用项删行
+ let selectedRow = props.cardTable.getCheckedRows(AREA.card_fee);
+ if (selectedRow == null || selectedRow.length == 0) {
+ return;
+ }
+ let rowparam = [];
+ let datas = [];
+ selectedRow.forEach((item) => {
+ rowparam.push(item.index);
+ datas.push(item.data);
+ });
+ // 删除对应的费用明细
+ delFeeDetailByFee.call(this, props, datas);
+ props.cardTable.delRowsByIndex(AREA.card_fee, rowparam);
+ feeSelected.call(this, props);
+ break;
+ case 'Fee_Resetno': //费用项重排行号
+ RownoUtils.resetRowNo(props, AREA.card_fee, FIELD.crowno);
+ break;
+ case 'Fee_Detail_Addline': //费用明细参照增行
+ // 来源于委外订单费用明细不允许增行
+ let bodyData = this.props.cardTable.getVisibleRows(AREA.body);
+ let type1 = this.props.getUrlParam('type');
+ if (
+ (bodyData &&
+ bodyData.length > 0 &&
+ bodyData[0].values[FIELD.csourcetypecode] &&
+ bodyData[0].values[FIELD.csourcetypecode].value == '61') ||
+ type1 == 'arrivaltransfer61' ||
+ type1 == 'arrivalreturn61'
+ ) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000075')
+ });
+ return;
+ }
+ let tableData = [];
+ bodyData.forEach((item) => {
+ if (
+ item.values[FIELD.crowno] &&
+ item.values[FIELD.crowno].value &&
+ item.values[FIELD.pk_material] &&
+ item.values[FIELD.pk_material].value
+ ) {
+ tableData.push(item);
+ }
+ });
+ this.props.table.setAllTableData(AREA.card_bodyModal, { rows: tableData });
+ this.setState({ showFeedetail: true });
+ break;
+ case 'Fee_Detail_Deleteline': //费用明细删行
+ let selectedRowde = props.cardTable.getCheckedRows(AREA.card_fee_detail);
+ if (selectedRowde == null || selectedRowde.length == 0) {
+ return;
+ }
+ let derowparam = [];
+ selectedRowde.forEach((item) => {
+ derowparam.push(item.index);
+ });
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, derowparam);
+ feeDetailSelected.call(this, props);
+ break;
+ case 'Fee_Detail_Resetno': //费用明细重排行号
+ RownoUtils.resetRowNo(props, AREA.card_fee_detail, FIELD.crowno);
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeSelected(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.card_fee);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'Fee_Deleteline' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Fee_Deleteline' ], true);
+ }
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeDetailSelected(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(AREA.card_fee_detail);
+ if (selectedRow && selectedRow.length > 0) {
+ this.props.button.setButtonDisabled([ 'Fee_Detail_Deleteline' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'Fee_Detail_Deleteline' ], true);
+ }
+}
+
+function delFeeDetailByFee(props, record) {
+ let data = [];
+ data = props.cardTable.getVisibleRows(AREA.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0 && record && record.length > 0) {
+ record.forEach((reco) => {
+ if (
+ reco.values.cfeematerialvid.value != null &&
+ reco.values.cfeematerialvid.value != '' &&
+ reco.values.cfeesuppliervid.value != null &&
+ reco.values.cfeesuppliervid.value != ''
+ ) {
+ let key = reco.values.cfeematerialvid.value + reco.values.cfeesuppliervid.value;
+ data.forEach((item) => {
+ if (
+ item.values.cfeematerialvid.value != null &&
+ item.values.cfeematerialvid.value != '' &&
+ item.values.cfeesuppliervid.value != null &&
+ item.values.cfeesuppliervid.value != ''
+ ) {
+ if (key == item.values.cfeematerialvid.value + item.values.cfeesuppliervid.value) {
+ indexs.push(item.dataIndex);
+ }
+ }
+ });
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(AREA.card_fee_detail, indexs);
+ }
+}
+
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/card/viewControl/buttonController.js b/src/pu/pu/arrival/card/viewControl/buttonController.js
new file mode 100644
index 0000000..d70b375
--- /dev/null
+++ b/src/pu/pu/arrival/card/viewControl/buttonController.js
@@ -0,0 +1,365 @@
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
+import {
+ AREA,
+ ALLBUTTONS,
+ EDITBUTTONS,
+ TRANSFERFREEBUTTONS,
+ TRANSFERFAILBUTTONS,
+ FREEBUTTONS,
+ FAILBUTTONS,
+ COMMITBUTTONS,
+ EXEBUTTONS,
+ TRANSFERCOMMITBUTTONS,
+ TRANSFEREXEBUTTONS,
+ ADDBUTTONS,
+ BUTTONAREA,
+ FIELD,
+ COMMON
+} from '../../constance';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+
+/*
+ * @Author: zhangshqb
+ * @PageInfo: 按钮的状态控制
+ * 包括显示隐藏,可用性
+ * @Date: 2019-1-9 10:42:16
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-08 15:51:05
+ */
+
+export default function(status) {
+ if (!status) {
+ status = this.props.getUrlParam('status');
+ if (status == undefined) {
+ status = this.props.form.getFormStatus(AREA.form);
+ }
+ }
+
+ let sagaStatus = this.props.form.getFormItemsValue([ AREA.head ], FIELD.sagaStatus); //获得saga状态 // 第一次进入卡片页,frozen为空,取界面sags_statue的值判断冻结状态
+ let frozen = sagaStatus && sagaStatus.value == '1' ? true : false;
+
+ // 1.设置界面状态
+ setUIState.call(this, this.props, status);
+
+ let isBrowse = status === 'browse';
+ if (status === 'return23') {
+ isBrowse = false;
+ }
+ // 2.设置按钮的显示隐藏
+ setCardButtonVisiable.call(this, this.props, status, isBrowse);
+
+ // 4.返回按钮的显示隐藏
+ setBackButtonVisiable.call(this, this.props, isBrowse);
+ // 5.设置卡片分页器的显示隐藏
+ setCardPaginationVisible.call(this, this.props, isBrowse);
+ // 6.设置按钮的可用性
+ setCardButtonDisiable.call(this, this.props, isBrowse);
+
+ if (status != 'edit' && status != 'browse') {
+ this.props.executeAutoFocus();
+ }
+ setSagaBtnState.call(this, status, frozen);
+}
+
+function setOtherButtonVisiable(props, isBrowse) {
+ let isTransfer = isFromTransfer.call(this, props);
+ // 1.【退出转单按钮】的控制
+ if (!isTransfer) {
+ props.button.setButtonVisible('Quit', false);
+ } else {
+ props.button.setButtonVisible('Quit', true);
+ }
+
+ // 3.支持审批中修改
+ if (isBrowse && isFromApproveCenter.call(this, props)) {
+ let billstatus = (props.form.getFormItemsValue(AREA.form, 'fbillstatus') || {}).value;
+ if (billstatus == 2 || billstatus == 1) {
+ props.button.setButtonVisible('Edit', true);
+ }
+ }
+
+ // 4. 根据流程控制按钮
+ let billtypes = getDefData(COMMON.arrivalRefBillCachekey, 'refBillDataCach');
+ if (billtypes) {
+ if (billtypes.indexOf('61') < 0) {
+ this.props.button.setButtonVisible('RefSubcont', false);
+ }
+ if (billtypes.indexOf('21') < 0) {
+ this.props.button.setButtonVisible('RefOrder', false);
+ }
+ }
+}
+
+function setCardButtonDisiable(props, isBrowse) {
+ //界面无数据时"原到货单退货"不可用
+ let pk_arriveorder = (props.form.getFormItemsValue(AREA.form, 'pk_arriveorder') || {}).value;
+ if (isBrowse && !pk_arriveorder) {
+ props.button.setButtonDisabled([ 'ReturnArrival' ], true);
+ } else if (isBrowse && pk_arriveorder) {
+ props.button.setButtonDisabled([ 'ReturnArrival' ], false);
+ }
+
+ let rows = props.cardTable.getCheckedRows(AREA.body);
+ if (rows && rows.length > 0) {
+ props.button.setButtonDisabled([ 'StockQuery', 'UrgentLetGo' ], false);
+ } else {
+ props.button.setButtonDisabled([ 'StockQuery', 'UrgentLetGo' ], true);
+ }
+ let disableFeeArr = {
+ ['Fee_Deleteline']: true,
+ ['Fee_Detail_Deleteline']: true
+ };
+ props.button.setDisabled(disableFeeArr);
+}
+
+function setCardPaginationVisible(props, isBrowse) {
+ let showPage = isBrowse;
+ let billstatus = (props.form.getFormItemsValue(AREA.form, 'fbillstatus') || {}).value;
+ // 卡片下空白界面不需要显示分页
+ if (!billstatus) {
+ showPage = false;
+ } else if (isFromApproveCenter.call(this, props)) {
+ showPage = false;
+ }
+ // 设置卡片分页的显示隐藏
+ props.cardPagination.setCardPaginationVisible('cardPaginationBtn', showPage);
+}
+
+/**
+ * 设置返回按钮的可见性
+ * @param {*} props
+ */
+function setBackButtonVisiable(props, isBrowse) {
+ // 只有自制的编辑态没有返回按钮
+ let isShowReturn = true;
+
+ let isTransfer = isFromTransfer.call(this, props);
+ if (!isTransfer) {
+ isShowReturn = isBrowse;
+ }
+
+ if (isFromApproveCenter.call(this, props)) {
+ isShowReturn = false;
+ }
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ showBillCode: true,
+ billCode: props.form.getFormItemsValue([ AREA.head ], FIELD.vbillcode).value, //修改单据号---非必传,
+ showBackBtn: isShowReturn //控制显示返回按钮: true为显示,false为隐藏 ---非必传
+ });
+ if (this.isapprove == 'Y') {
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ showBackBtn: false
+ });
+ }
+}
+
+function isFromApproveCenter(props) {
+ let pageMsgType = this.props.getUrlParam('scene');
+ if (pageMsgType && pageMsgType == 'approvesce') {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function isFromTransfer(props) {
+ let transfer = this.props.getUrlParam('type');
+ let isTransfer = transfer != undefined;
+ return isTransfer;
+}
+
+/**
+ * 设置界面状态
+ * @param {*} props
+ * @param {*} status
+ */
+function setUIState(props, status) {
+ let pk = props.getUrlParam('id');
+ let formstatus = null;
+ let tablestatus = null;
+ if (status == 'browse') {
+ formstatus = 'browse';
+ tablestatus = 'browse';
+ } else {
+ formstatus = 'edit';
+ tablestatus = 'edit';
+ }
+ props.form.setFormStatus(AREA.form, formstatus);
+ props.cardTable.setStatus(AREA.body, tablestatus);
+ props.cardTable.setStatus(AREA.card_fee, tablestatus);
+ props.cardTable.setStatus(AREA.card_fee_detail, tablestatus);
+}
+
+//切换页面状态
+// toggleShow = (fbillstatus) => {
+// let status = this.props.getUrlParam('status');
+// let flag = status === 'browse' ? false : true;
+// this.props.button.setButtonVisible(ALLBUTTONS, false);
+// if (status == 'edit' || status == 'return23') {
+// this.props.button.setButtonVisible(EDITBUTTONS, true);
+// this.props.button.setButtonVisible(
+// [
+// 'PaseToThis', //粘贴至此
+// 'PastToLast', //粘贴至末行
+// 'CancelPast' //取消(复制)
+// ],
+// false
+// );
+// this.props.button.setButtonDisabled([ 'ResetRowno' ], false);
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+// this.props.button.setButtonVisible('Return', false);
+// this.setState({ isShowBack: false });
+// } else if (fbillstatus == 0) {
+// this.props.button.setButtonVisible(FREEBUTTONS, true);
+
+// if (this.isapprove == 'Y') {
+// this.props.button.setButtonVisible([ 'Edit' ], false);
+// this.setState({ isShowBack: false });
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+// } else {
+// this.setState({ isShowBack: true });
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+// }
+// } else if (fbillstatus == 1 || fbillstatus == 2) {
+// this.props.button.setButtonVisible(COMMITBUTTONS, true);
+// if (this.isapprove == 'Y') {
+// this.props.button.setButtonVisible([ 'Edit' ], true);
+// this.setState({ isShowBack: false });
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+// } else {
+// this.setState({ isShowBack: true });
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+// }
+// } else if (fbillstatus == 3) {
+// this.props.button.setButtonVisible(EXEBUTTONS, true);
+// let selectedRow = this.props.cardTable.getCheckedRows(AREA.body);
+// if (selectedRow == null || selectedRow.length == 0) {
+// this.props.button.setButtonDisabled(
+// [ 'Check', 'GenAssertCard', 'DelAssertCard', 'GenTransAssert', 'DelTransAssert' ],
+// true
+// );
+// }
+// if (this.isapprove == 'Y') {
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+// this.setState({ isShowBack: false });
+// } else {
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+// this.setState({ isShowBack: true });
+// }
+// } else if (fbillstatus == 4) {
+// this.props.button.setButtonVisible(FAILBUTTONS, true);
+// this.setState({ isShowBack: true });
+// this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true);
+// }
+// };
+
+/**
+ * //1.优先根据界面状态判断显示按钮显示
+ // 2.再根据单据状态控制按钮显示
+ * @param {*} props
+ * @param {*} status
+ */
+function setCardButtonVisiable(props, status, isBrowse) {
+ // 1.设置表头按钮
+ if (isBrowse) {
+ // 先设置按钮全不显示
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ // 再根据状态设置按钮显示
+ props.button.setButtonVisible(getShowBtnArray(props), true);
+ } else {
+ // 先设置按钮全不显示
+ props.button.setButtonVisible(ALLBUTTONS, false);
+ // 再根据状态设置按钮显示
+ props.button.setButtonVisible(EDITBUTTONS, true);
+ }
+
+ // 2.设置肩部按钮
+ // 如果是卡片浏览态
+ // 要根据单据状态进行肩部按钮的显示和隐藏
+ // props.button.setButtonVisible(CARD_BODY_BUTTONS.ALL, false);
+ if (!isBrowse) {
+ props.button.setButtonVisible(
+ [
+ 'PaseToThis', //粘贴至此
+ 'PastToLast', //粘贴至末行
+ 'CancelPast' //取消(复制)
+ ],
+ false
+ );
+ }
+
+ setOtherButtonVisiable.call(this, props, isBrowse);
+
+ // 3. 控制表体肩部按钮
+ // rowbtn_Controller.call(this);
+}
+
+function getShowBtnArray(props) {
+ let billstatus = (props.form.getFormItemsValue(AREA.form, 'fbillstatus') || {}).value;
+ let type = props.getUrlParam('type');
+ if (type && type != 'quickArr') {
+ // 快速收货不算转单
+ switch (billstatus) {
+ case null:
+ return '';
+ case undefined:
+ return '';
+ // 自由态行按钮
+ case '0':
+ return TRANSFERFREEBUTTONS;
+ // 审批不通过
+ case '4':
+ return TRANSFERFAILBUTTONS;
+ // 审批中
+ case '1':
+ return TRANSFERCOMMITBUTTONS;
+ case '2':
+ return TRANSFERCOMMITBUTTONS;
+ // 审批通过
+ case '3':
+ return TRANSFEREXEBUTTONS;
+ default:
+ return '';
+ }
+ } else {
+ switch (billstatus) {
+ case null:
+ return ADDBUTTONS;
+ case undefined:
+ return ADDBUTTONS;
+ // 自由态行按钮
+ case '0':
+ return FREEBUTTONS;
+ // 审批不通过
+ case '4':
+ return FAILBUTTONS;
+ // 审批中
+ case '1':
+ return COMMITBUTTONS;
+ case '2':
+ return COMMITBUTTONS;
+ // 审批通过
+ case '3':
+ return EXEBUTTONS;
+ default:
+ return '';
+ }
+ }
+}
+
+function setSagaBtnState(status, frozen) {
+ // 设置回退、重试按钮状态,用来是否显示
+ if (status == 'browse' && frozen) {
+ this.props.button.toggleErrorStatus(BUTTONAREA.cardhead, {
+ isError: true
+ });
+ } else {
+ this.props.button.toggleErrorStatus(BUTTONAREA.cardhead, {
+ isError: false
+ });
+ }
+}
+
+export { setSagaBtnState };
+
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/constance/index.js b/src/pu/pu/arrival/constance/index.js
new file mode 100644
index 0000000..d8d798a
--- /dev/null
+++ b/src/pu/pu/arrival/constance/index.js
@@ -0,0 +1,660 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单常量
+ * @Date: 2018-04-19 19:10:26
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-10-20 10:29:41
+ */
+
+const URL = {
+ save: '/nccloud/pu/arrival/insert.do',
+ queryParam: '/nccloud/pu/arrival/queryParam.do',
+ saveSend: '/nccloud/pu/arrival/saveSend.do',
+ update: '/nccloud/pu/arrival/insert.do',
+ delete: '/nccloud/pu/arrival/delete.do',
+ queryScheme: '/nccloud/pu/arrival/queryScheme.do',
+ pageQuery: '/nccloud/pu/arrival/pageQuery.do',
+ queryCard: '/nccloud/pu/arrival/queryCard.do',
+ commit: '/nccloud/pu/arrival/commit.do',
+ uncommit: '/nccloud/pu/arrival/uncommit.do',
+ approve: '/nccloud/pu/arrival/approve.do',
+ unapprove: '/nccloud/pu/arrival/unapprove.do',
+ quickArr: '/nccloud/pu/arrival/quickArr.do', //快速收货
+ quickArrQuery: '/nccloud/pu/arrival/quickArrQuery.do',
+ card: '/card',
+ list: '/list',
+ transfer21: '/ref21',
+ transfer61: '/ref61',
+ return21: '/return21',
+ return61: '/return61',
+ genAssertCard: '/nccloud/pu/arrival/crtAssert.do',
+ delAssertCard: '/nccloud/pu/arrival/delAssert.do',
+ genHJCard: '/nccloud/pu/arrival/transAssert.do',
+ delHJCard: '/nccloud/pu/arrival/delTransAssert.do',
+ verify: '/nccloud/pu/arrival/qualityCheck.do',
+ queryOrder: '/nccloud/pu/arrival/queryOrder.do',
+ queryOrderByPK: '/nccloud/pu/arrival/queryOrderByPK.do',
+ transferOrder: '/nccloud/pu/arrival/transferOrder.do',
+ querySubcont: '/nccloud/pu/arrival/querySubcont.do',
+ transferSubcont: '/nccloud/pu/arrival/transferSubcont.do',
+ queryReturnOrder: '/nccloud/pu/arrival/queryReturnOrder.do',
+ transferReturnOrder: '/nccloud/pu/arrival/transferReturnOrder.do',
+ queryReturnSubcont: '/nccloud/pu/arrival/queryReturnSubcont.do',
+ transferReturnSubcont: '/nccloud/pu/arrival/transferReturnSubcont.do',
+ fixRate: '/nccloud/pu/arrival/fixRate.do',
+ print: '/nccloud/pu/arrival/print.do',
+ printPermiss: '/nccloud/pu/arrival/printPermiss.do',
+ beforeEditHead: '/nccloud/pu/arrival/beforeEditHead.do', //表头编辑前
+ afterEditHead: '/nccloud/pu/arrival/afterEditHead.do', //表头编辑后
+ afterBodyEdit: '/nccloud/pu/arrival/afterBodyEdit.do', //表体编辑后
+ afterBodyForFeeEdit: '/nccloud/pu/arrival/afterBodyForFeeEdit.do', //表体编辑后联动费用明细
+ afterFeeEdit: '/nccloud/pu/arrival/afterFeeEdit.do', //费用项编辑后
+ afterFeeDetailEdit: '/nccloud/pu/arrival/afterFeeDetailEdit.do', //费用明细编辑后
+ return23: '/nccloud/pu/arrival/return23.do', //基于原到货单退货
+ combin: '/nccloud/pu/arrival/combin.do',
+ combinprint: '/nccloud/pu/arrival/combinprint.do',
+ pushToC005Check: '/nccloud/pu/arrival/pushToC005Check.do', //到货单推紧急放行单
+ generalSetpiece: '/nccloud/pu/pub/generalSetpiece.do', //成套件信息
+ saveandcommit: '/nccloud/pu/arrival/saveandcommit.do', // 到货单保存提交For Nccnative
+ sagaCheck: '/nccloud/pu/arrival/materialsagacheck.do',
+ scanTrans: '/nccloud/pu/arrival/scanTrans.do', //扫码拉单
+ poorderToHandleArrive: '/nccloud/pu/workbench/poorderToHandleArrive.do', // 未来7天需到货的采购订单查询
+ scorderToHandleArrive: '/nccloud/pu/workbench/scorderToHandleArrive.do', // 未来7天需到货的委外订单查询
+ copybodyInsertFeeDetail: '/nccloud/pu/arrival/copybodyinsertfeedetail.do',
+ cardBodyBatch: '/nccloud/pu/arrival/cardbodybatch.do', // 复制粘贴物料或者数量时联动费用明细
+ headafterdbillddate: '/nccloud/pu/arrival/headafterdbillddate.do',
+ insertfeedetail: '/nccloud/pu/arrival/insertfeedetail.do', // 费用明细参照物料增行
+ feeDetailBeforeEvent: '/nccloud/pu/arrival/feeDetailBeforeEvent.do' // 费用明细编辑前
+};
+/**
+ * 单据模板ID
+ */
+const PAGECODE = {
+ head: '400401200_list',
+ card: '400401200_card',
+ // transferOrder: '400401200_ref23',
+ transferOrder: '400400800_21to23',
+ // returnOrder: '400401200_return21',
+ returnOrder: '400400800_return23',
+ // transferSubcont: '400401200_ref61',
+ transferSubcont: '400401200_61to23',
+ returnSubcont: '400401200_61return23',
+ transferCard: '400401200_transfer'
+};
+
+/**
+ * 字段
+ */
+const FIELD = {
+ sagaStatus: 'saga_status',
+ vbillcode: 'vbillcode', //单据号
+ pk_org: 'pk_org', //库存组织
+ pk_material: 'pk_material', //物料
+ pk_arriveorder: 'pk_arriveorder', //到货单主键
+ pk_arriveorder_b: 'pk_arriveorder_b', //到货单表体主键
+ norigmny: 'norigmny', //金额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ntax: 'ntax', //税额
+ nmny: 'nmny', //本币无税金额
+ ntaxmny: 'ntaxmny', //本币加税合计
+ nnum: 'nnum', //主数量
+ nastnum: 'nastnum', //数量
+ nelignum: 'nelignum', //合格主数量
+ nnotelignum: 'nnotelignum', //不合格主数量
+ nwastnum: 'nwastnum', //途耗主数量
+ crowno: 'crowno', //行号
+ free: '0',
+ unapproved: '4',
+ castunitid: 'castunitid',
+ dplanreceivedate: 'dplanreceivedate',
+ pk_apliabcenter_v: 'pk_apliabcenter_v',
+ pk_arrliabcenter_v: 'pk_arrliabcenter_v',
+ pk_receivestore: 'pk_receivestore',
+ bpresent: 'bpresent',
+ bpresentsource: 'bpresentsource',
+ materialname: 'pk_material.name',
+ materialspec: 'pk_material.materialspec',
+ materialtype: 'pk_material.materialtype',
+ ts: 'ts',
+ scene: 'scene',
+ approvesce: 'approvesce',
+ pks: 'pks', // 看板跳转
+ pk_arriveorder_f: 'pk_arriveorder_f', // 费用项主键
+ cfeematerialvid: 'cfeematerialvid', // 费用项
+ cfeematerialoid: 'cfeematerialoid', // 费用项版本
+ cfeesuppliervid: 'cfeesuppliervid', // 费用服务商
+ cfeesupplieroid: 'cfeesupplieroid', // 费用服务商_版本
+ cctid: 'cctid', // 费用合同
+ cctbid: 'cctbid', // 费用合同明细
+ pk_arriveorder_bf: 'pk_arriveorder_bf', // 物料费用明细主键
+ cmatrowno: 'cmatrowno', // 订单物料行号
+ cmaterialvid: 'cmaterialvid', // 物料
+ cmaterialoid: 'cmaterialoid', // 物料_版本
+ nqtunitnum: 'nqtunitnum', // 报价单位
+ vchangerate: 'vchangerate', // 换算率
+ vqtunitrate: 'vqtunitrate', // 报价换算率
+ cmaterialvidName: 'cmaterialvid.name', // 物料名称
+ cmaterialvidMaterialspec: 'cmaterialvid.materialspec', // 规格
+ cmaterialvidMaterialtype: 'cmaterialvid.materialtype', // 型号
+ pk_materialName: 'pk_material.name', // 物料名称
+ pk_materialMaterialspec: 'pk_material.materialspec', // 规格
+ pk_materialMaterialtype: 'pk_material.materialtype', // 型号
+ ftaxtypeflag: 'ftaxtypeflag', // 扣税类别
+ crececountryid: 'crececountryid', //收货国
+ csendcountryid: 'csendcountryid', // 发货国
+ ctaxcountryid: 'ctaxcountryid', //报税国
+ ctaxcodeid: 'ctaxcodeid', //税码
+ nexchangerate: 'nexchangerate', //折本汇率
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ nnosubtaxrate: 'nnosubtaxrate', //不可抵扣税率
+ cunitid: 'cunitid', // 主单位
+ pk_psfinanceorg: 'pk_psfinanceorg', // 结算财务组织
+ dbilldate: 'dbilldate', // 制单日期
+ nqtorigprice: 'nqtorigprice', // 含税单价
+ nqtorigtaxprice: 'nqtorigtaxprice', // 无税单价
+ corigcurrencyid: 'corigcurrencyid', // 币种
+ pk_order_b: 'pk_order_b',
+ ntaxrate: 'ntaxrate',
+ cratetype: 'cratetype',
+ pk_srcmaterial: 'pk_srcmaterial',
+ vfmemo: 'vfmemo',
+ vbmemo: 'vbmemo',
+ dratedate: 'dratedate',
+ nglobalexchgrate: 'nglobalexchgrate',
+ ngroupexchgrate: 'ngroupexchgrate',
+ fbuysellflag: 'fbuysellflag',
+ nnosubtax: 'nnosubtax',
+ cprojectid: 'cprojectid',
+ csourcetypecode: 'csourcetypecode'
+};
+
+const BATCHITEM = [
+ 'nastnum',
+ 'nnum',
+ 'nplanastnum',
+ 'nplannum',
+ 'pk_receivestore',
+ 'cprojectid',
+ 'vmemob',
+ 'pk_rack',
+ 'vbatchcode',
+ 'cffileid'
+];
+
+// 费用明细可编辑单价金额相关字段
+const FEEPRICE = [
+ 'ntaxrate',
+ 'nqtorigprice',
+ 'nqtorigtaxprice',
+ 'norigtaxmny',
+ 'norigmny',
+ 'ntax',
+ 'norigtaxprice',
+ 'norigprice',
+ 'ncaltaxmny',
+ 'nnosubtax',
+ 'ngroupexchgrate',
+ 'nglobalexchgrate',
+ 'ftaxtypeflag',
+ 'nexchangerate'
+];
+
+/**
+ * 单据类型
+ */
+const BILLTYPE = {
+ arrival: '23', //到货单
+ scorder: '61'
+};
+
+/**
+ * 应用编码
+ */
+const APPCODE = {
+ poorder: '400400800', //采购订单维护
+ arrival: '400401200', //到货单
+ arrivalapp: '400401206' //到货单审批
+};
+/**
+ * 区域编码
+ */
+const AREA = {
+ searchArea: 'searchArea',
+ form: 'head',
+ table: 'body',
+ head: 'head',
+ body: 'body',
+ leftarea: 'leftarea',
+ transferhead: 'transferhead',
+ transferbody: 'transferbodd',
+ transferview: 'transferview',
+ childform1: 'childform1',
+ card_fee: 'card_fee', // 费用项
+ card_fee_detail: 'card_fee_detail', // 费用明细
+ card_bodyModal: 'card_bodyModal'
+};
+
+const COMMON = {
+ moudleid: '4004',
+ oid: '1001Z81000000000AJQ7',
+ arrivalCacheKey: 'scm.pu.arrival.ArrivalListCacheKey',
+ arrivalCacheTabKey: 'scm.pu.arrival.ArrivalListTabCacheKey',
+ arrivalServal: 'scm.pu.arrival.ArrivalServalKey',
+ arrivalRef21CacheKey: 'arrivaltransfer21DataSource',
+ arrivalRef61CacheKey: 'arrivaltransfer61DataSource',
+ arrivalReturn21CacheKey: 'arrivalreturn21DataSource',
+ arrivalReturn61CacheKey: 'arrivalreturn61DataSource',
+ arrivalRefBillCachekey: 'arrivalRefBillCachekey'
+};
+/**
+ * 小应用ID
+ */
+const TRANSFER = {
+ oid: '1001Z81000000000D9MJ',
+ subcontoid: '1001Z810000000018U79',
+ appid: '0001Z81000000003A2TC'
+};
+const APPID = '0001Z81000000002X382';
+const LISTBUTTONS = [
+ 'Receive', //收货
+ 'RefOrder', //订单收货
+ 'RefSubcont', //委外收货
+ 'Return', //退货
+ 'ReturnOrder', //采购订单退货
+ 'ReturnSubcont', //委外订单退货
+ 'Commit', //提交
+ 'Edit', //修改
+ 'Delete', //删除
+ 'CommitGroup', //提交组
+ 'UnCommit', //收回
+ 'AulixiaryFunction', //辅助功能
+ 'QuickReceive', //快速收货
+ 'AccessoryManage', //附件
+ 'QueryAboutBusiness', //单据追溯
+ 'Print', //打印
+ 'Refresh', //刷新
+ 'OutPrint' //输出
+];
+/**
+ * 卡片态全部按钮
+ */
+const ALLBUTTONS = [
+ 'Receive',
+ 'RefOrder',
+ 'RefSubcont',
+ 'Return',
+ 'ReturnOrder',
+ 'ReturnSubcont',
+ 'ReturnArrival',
+ 'Commit',
+ 'Edit',
+ 'Delete',
+ 'UnCommit',
+ 'Check',
+ 'AulixiaryFunction', //辅助功能
+ 'QuickReceive', //快速收货
+ 'AccessoryManage', //附件
+ 'Print',
+ 'Refresh',
+ 'ApproveInfo',
+ 'UergencyLetGo',
+ 'More',
+ 'PrintBarcode', //打印条码
+ 'DirPrintBarcode', //直接打印条形码
+ 'GenAssertCard',
+ 'DelAssertCard',
+ 'MaterialAssign',
+ 'GenTransAssert',
+ 'DelTransAssert',
+ 'Save',
+ 'SaveSend',
+ 'Cancel',
+ 'UrgencyLetGo',
+ 'CheckLine',
+ 'QueryAboutBusiness',
+ 'CopyLines',
+ 'DeleteLine',
+ 'ResetRowno',
+ 'PaseToThis',
+ 'PastToLast',
+ 'CancelPast',
+ 'StockQuery',
+ 'UrgentLetGo',
+ 'Card_Fee_Group',
+ 'Card_Fee_Detail_Group',
+ 'Fee_Resetno',
+ 'Fee_Detail_Resetno'
+];
+/**
+ * 编辑态按钮
+ */
+const EDITBUTTONS = [
+ 'Save', //保存
+ 'SaveSend', //保存提交
+ 'Cancel', //取消
+ 'DeleteLine', //删行
+ 'CopyLines', //复制行
+ 'ResetRowno', //重排行号
+ 'PaseToThis', //粘贴至此
+ 'PastToLast', //粘贴至末行
+ 'CancelPast', //取消(复制)
+ 'StockQuery', //存量查询
+ 'Card_Fee_Group', // 费用项增行,删行
+ 'Card_Fee_Detail_Group', // 费用明细增行,删行
+ 'Fee_Resetno', // 重排行号
+ 'Fee_Detail_Resetno' // 重排行号
+];
+
+const ADDBUTTONS = [
+ 'Receive', //收货
+ 'RefOrder', //采购订单收货
+ 'RefSubcont', //委外订单收货
+ 'Return', //退货
+ 'ReturnOrder', //采购订单退货
+ 'ReturnSubcont', //委外订单退货
+ 'ReturnArrival'
+];
+/**
+ * 审批不通过浏览态按钮
+ */
+const FAILBUTTONS = [
+ 'Receive', //收货
+ 'RefOrder', //采购订单收货
+ 'RefSubcont', //委外订单收货
+ 'Return', //退货
+ 'ReturnOrder', //采购订单退货
+ 'ReturnSubcont', //委外订单退货
+ 'ReturnArrival',
+ 'QuickReceive', //快速收货
+ 'Edit', //修改
+ 'Delete',
+ 'More', //辅助功能
+ 'Print', //打印
+ 'OutPrint', //输出
+ 'PrintBarcode', //打印条码
+ 'DirPrintBarcode', //直接打印条码
+ 'AulixiaryFunction', //已无此按钮
+ 'AccessoryManage', //附件
+ 'QueryAboutBusiness', //单据追溯
+ 'ApproveInfo',
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'Refresh', //刷新
+ 'StockQuery' //存量查询
+];
+/**
+ * 转单界面审批不通过按钮
+ */
+const TRANSFERFAILBUTTONS = [
+ 'Edit', //修改
+ 'More', //辅助功能
+ 'Print', //打印
+ 'OutPrint', //输出
+ 'PrintBarcode', //打印条码
+ 'DirPrintBarcode', //直接打印条码
+ 'AulixiaryFunction', //已无此按钮
+ 'AccessoryManage', //附件
+ 'PrintBarcode', //打印条码
+ 'QueryAboutBusiness', //单据追溯
+ 'DirPrintBarcode', //直接打印条码
+ 'Refresh',
+ 'Quit', //退出转单
+ 'StockQuery' //存量查询
+];
+/**
+ * 自由态按钮
+ */
+const FREEBUTTONS = [
+ 'Receive', //收货
+ 'RefOrder', //采购订单收货
+ 'RefSubcont', //委外订单收货
+ 'Return', //退货
+ 'ReturnOrder', //采购订单退货
+ 'ReturnSubcont', //委外订单退货
+ 'QuickReceive', //快速收货
+ 'Commit', //提交
+ 'Edit', //修改
+ 'Delete', //删除
+ 'More', //辅助功能
+ 'Print', //打印
+ 'OutPrint', //输出
+ 'PrintBarcode', //打印条码
+ 'DirPrintBarcode', //直接打印条码
+ 'AulixiaryFunction',
+ 'AccessoryManage', //附件
+ 'ApproveInfo', //审批详情
+ 'QueryAboutBusiness', //单据追溯
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'Refresh', //刷新
+ 'StockQuery' //存量查询
+];
+/**
+ * 转单界面自由态按钮
+ */
+const TRANSFERFREEBUTTONS = [
+ 'Commit', //提交
+ 'Edit', //修改
+ 'Delete', //删除
+ 'More', //辅助功能
+ 'Print', //打印
+ 'PrintBarcode', //打印条码
+ 'DirPrintBarcode', //直接打印条码
+ 'AulixiaryFunction',
+ 'AccessoryManage', //附件
+ 'QueryAboutBusiness', //单据追溯
+ 'ApproveInfo', //审批详情
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'Refresh',
+ 'Quit', //退出转单
+ 'StockQuery' //存量查询
+];
+/**
+ * 执行中按钮
+ */
+const EXEBUTTONS = [
+ 'Receive',
+ 'RefOrder',
+ 'RefSubcont',
+ 'Return',
+ 'ReturnOrder',
+ 'ReturnSubcont',
+ 'ReturnArrival',
+ 'Check',
+ 'CheckLine',
+ 'QuickReceive', //快速收货
+ 'UrgencyLetGo',
+ 'More',
+ 'AccessoryManage',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'GenAssertCard',
+ 'DelAssertCard',
+ 'MaterialAssign',
+ 'GenTransAssert',
+ 'DelTransAssert',
+ 'QuickReceive',
+ 'Refresh',
+ 'ApproveInfo',
+ 'UnCommit',
+ 'UrgentLetGo',
+ 'StockQuery' //存量查询
+];
+/**
+ * 转单界面执行中按钮
+ */
+const TRANSFEREXEBUTTONS = [
+ 'CheckLine',
+ 'Check',
+ 'UnCommit',
+ 'ApproveInfo',
+ 'UrgencyLetGo',
+ 'More',
+ 'AccessoryManage',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'GenAssertCard',
+ 'DelAssertCard',
+ 'MaterialAssign',
+ 'GenTransAssert',
+ 'DelTransAssert',
+ 'Refresh',
+ 'Quit',
+ 'StockQuery', //存量查询
+ 'UrgentLetGo'
+];
+/**
+ * 审批中单据按钮
+ */
+const COMMITBUTTONS = [
+ // 'Edit',
+ 'Receive',
+ 'RefOrder',
+ 'RefSubcont',
+ 'Return',
+ 'ReturnOrder',
+ 'ReturnSubcont',
+ 'UnCommit',
+ 'More',
+ 'QuickReceive', //快速收货
+ 'ApproveInfo',
+ 'AccessoryManage',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'Refresh',
+ 'StockQuery' //存量查询
+];
+/**
+ * 转单界面审批中单据按钮
+ */
+const TRANSFERCOMMITBUTTONS = [
+ 'UnCommit',
+ 'More',
+ 'ApproveInfo',
+ 'AccessoryManage',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'Refresh',
+ 'Quit',
+ 'StockQuery' //存量查询
+];
+/**
+ * 转单界面所有按钮
+ */
+const TRANSFERBUTTONS = [
+ 'Commit',
+ 'Edit',
+ 'Delete',
+ 'UnCommit',
+ 'Check',
+ 'AulixiaryFunction',
+ 'QuickReceive',
+ 'AccessoryManage',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'Refresh',
+ 'ApproveInfo',
+ 'UgencyLetGo',
+ 'More',
+ 'PrintBarcode',
+ 'DirPrintBarcode',
+ 'GenAssertCard',
+ 'DelAssertCard',
+ 'MaterialAssign',
+ 'GenTransAssert',
+ 'DelTransAssert',
+ 'Quit',
+ 'UrgencyLetGo',
+ 'Save',
+ 'SaveSend',
+ 'Cancel',
+ 'CopyLines',
+ 'DeleteLine',
+ 'ResetRowno',
+ 'PaseToThis',
+ 'Refresh',
+ 'Card_Fee_Group', // 费用项增行,删行
+ 'Card_Fee_Detail_Group', // 费用明细增行,删行
+ 'Fee_Resetno', // 重排行号
+ 'Fee_Detail_Resetno' // 重排行号
+];
+/**
+ * 转单界面编辑态按钮
+ */
+const TRANSFEREDITBUTTONS = [
+ 'Save',
+ 'SaveSend',
+ 'Cancel',
+ 'DeleteLine',
+ 'CopyLines',
+ 'ResetRowno',
+ 'PaseToThis',
+ 'Quit',
+ 'Card_Fee_Group', // 费用项增行,删行
+ 'Card_Fee_Detail_Group', // 费用明细增行,删行
+ 'Fee_Resetno', // 重排行号
+ 'Fee_Detail_Resetno' // 重排行号
+];
+const BUTTONAREA = {
+ listhead: 'list_head',
+ listinner: 'list_inner',
+ cardhead: 'card_head',
+ cardbody: 'card_body',
+ cardbodyinner: 'card_body_inner',
+ card_fee_inner: 'card_fee_inner',
+ card_fee_detail_inner: 'card_fee_detail_inner'
+};
+
+const RELATECTFIELDS = [ FIELD.cfeematerialvid, FIELD.cfeesuppliervid, FIELD.corigcurrencyid ];
+/**
+ * 自由辅助属性
+ */
+const FREEFIELD = {
+ ccustomerid: 'casscustid',
+ ccustomervid: 'casscustvid',
+ cvendorid: 'pk_supplier',
+ cvendorvid: 'pk_supplier_v'
+};
+export {
+ URL,
+ AREA,
+ APPCODE,
+ PAGECODE,
+ APPID,
+ COMMON,
+ TRANSFER,
+ BUTTONAREA,
+ ALLBUTTONS,
+ EDITBUTTONS,
+ FREEBUTTONS,
+ COMMITBUTTONS,
+ EXEBUTTONS,
+ TRANSFERBUTTONS,
+ LISTBUTTONS,
+ TRANSFEREDITBUTTONS,
+ TRANSFEREXEBUTTONS,
+ TRANSFERFREEBUTTONS,
+ TRANSFERFAILBUTTONS,
+ TRANSFERCOMMITBUTTONS,
+ FAILBUTTONS,
+ FIELD,
+ BATCHITEM,
+ BILLTYPE,
+ ADDBUTTONS,
+ FREEFIELD,
+ FEEPRICE,
+ RELATECTFIELDS
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/buttonClick.js b/src/pu/pu/arrival/list/btnClicks/buttonClick.js
new file mode 100644
index 0000000..56275dc
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/buttonClick.js
@@ -0,0 +1,503 @@
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
+import { ajax, toast, output } from 'nc-lightapp-front';
+import { URL, AREA, PAGECODE, COMMON, FIELD, BILLTYPE } from '../../constance';
+import { deleteCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { updateCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { showBatchOprMessage } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { showSuccessInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import commonSerach from './commonSearch';
+import commit from './commit';
+import urgentLetGo from './urgentLetGo';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
+import fileBatchDownLoadBtnClick from '../../../pub/btnClicks/fileBatchDownLoadBtnClick';
+
+export default function(props, id, text, record, index) {
+ switch (id) {
+ case 'RefOrder': // 批量保存
+ clearTransferCache(props, COMMON.arrivalRef21CacheKey);
+ props.pushTo(URL.transfer21, { type: 'transfer21', app: this.appcode, pagecode: PAGECODE.transferOrder });
+ break;
+ case 'RefSubcont':
+ {
+ ajax({
+ url: '/nccloud/scmpub/pub/sysinitgroup.do',
+ data: [ '4012' ],
+
+ success: (res) => {
+ if (res.success) {
+ if (res.data['4012']) {
+ clearTransferCache(props, COMMON.arrivalRef61CacheKey);
+ props.pushTo(URL.transfer61, {
+ type: 'ref61',
+ app: this.appcode,
+ pagecode: PAGECODE.transferSubcont
+ });
+ } else {
+ showErrorDialog(null, getLangByResId(this, '4004ARRIVAL-000014')); /* 国际化处理: 请启用委外模块!*/
+ }
+ }
+ }
+ });
+ }
+ break;
+ case 'Edit':
+ {
+ ajax({
+ method: 'post',
+ data: { pk: record.pk_arriveorder.value, tsto: record.ts.value },
+ url: '/nccloud/pu/arrival/edit.do',
+ success: (res) => {
+ props.pushTo(URL.card, {
+ status: 'edit',
+ id: record.pk_arriveorder.value,
+ pagecode: PAGECODE.card
+ });
+ }
+ });
+ }
+ break;
+ case 'ApproveInfo':
+ {
+ let id = record.pk_arriveorder.value;
+ let billtype = record.vtrantypecode.value;
+ this.setState({
+ pk: id,
+ billtype: billtype,
+ showApproveInfo: !this.state.showApproveInfo
+ });
+ }
+ break;
+ case 'ReturnOrder':
+ {
+ clearTransferCache(props, COMMON.arrivalReturn21CacheKey);
+ props.pushTo(URL.return21, { type: 'return21', app: this.appcode, pagecode: PAGECODE.returnOrder });
+ }
+ break;
+ case 'ReturnSubcont':
+ {
+ ajax({
+ url: '/nccloud/scmpub/pub/sysinitgroup.do',
+ data: [ '4012' ],
+
+ success: (res) => {
+ if (res.success) {
+ if (res.data['4012']) {
+ clearTransferCache(props, COMMON.arrivalReturn61CacheKey);
+ props.pushTo(URL.return61, {
+ type: 'return61',
+ app: this.appcode,
+ pagecode: PAGECODE.returnSubcont
+ });
+ } else {
+ showErrorDialog(null, getLangByResId(this, '4004ARRIVAL-000014')); /* 国际化处理: 请启用委外模块!*/
+ }
+ }
+ }
+ });
+ }
+ break;
+ case 'ReturnArrival':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ let id = rows[0].data.values.pk_arriveorder.value;
+ props.pushTo(URL.card, { status: 'return23', id: id, pagecode: PAGECODE.card });
+ }
+ break;
+ case 'Delete':
+ {
+ if (record && record.pk_arriveorder) {
+ ajax({
+ method: 'post',
+ url: URL.delete,
+ data: [ { id: record.pk_arriveorder.value, ts: record.ts.value } ],
+ success: (res) => {
+ props.table.deleteTableRowsByIndex(AREA.head, index);
+ showSuccessInfo(getLangByResId(this, '4004ARRIVAL-000004')); /* 国际化处理: 删除成功*/
+ // buttonController.setListButtonVisiable(props, true);
+ this.onSelect();
+ }
+ });
+ } else {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let indexs = rows.map((row) => {
+ return row.data.index;
+ });
+ let data = rows.map((row) => {
+ return { id: row.data.values.pk_arriveorder.value, ts: row.data.values.ts.value };
+ });
+ showWarningDialog(
+ getLangByResId(this, '4004ARRIVAL-000002'),
+ getLangByResId(this, '4004ARRIVAL-000042'),
+ {
+ /* 国际化处理: 删除,确认要删除所选数据吗?*/
+ beSureBtnClick: () => {
+ ajax({
+ method: 'post',
+ url: URL.delete,
+ data: data,
+ success: (res) => {
+ if (JSON.stringify(res.data.errorMessageMap || {}) != '{}') {
+ // 成功的index
+ let sucIndex = [];
+ rows.forEach((element, index) => {
+ if (!res.data.errorMessageMap[index]) {
+ sucIndex.push(element.index);
+ }
+ deleteCacheDataForList(
+ props,
+ AREA.head,
+ element.data.values.pk_arriveorder.value
+ );
+ });
+ props.table.deleteTableRowsByIndex(AREA.head, sucIndex);
+ } else {
+ //
+ let succIndex = [];
+ rows.forEach((element, index) => {
+ deleteCacheDataForList(
+ props,
+ AREA.head,
+ element.data.values.pk_arriveorder.value
+ );
+ succIndex.push(element.index);
+ });
+ props.table.deleteTableRowsByIndex(AREA.head, succIndex);
+ }
+ showBatchOprMessage(null, res.data, getLangByResId(this, '4004ARRIVAL-000061'));
+ this.onSelect();
+ }
+ });
+ }
+ }
+ );
+ }
+ }
+ break;
+ case 'Edit':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let id = rows[0].data.values.pk_arriveorder.value;
+ ajax({
+ method: 'post',
+ data: { pk: id },
+ url: '/nccloud/pu/arrival/edit.do',
+ success: (res) => {
+ props.linkTo(URL.card, { status: 'edit', id: id });
+ }
+ });
+ }
+ break;
+ case 'Commit':
+ {
+ if (record && record.pk_arriveorder) {
+ let _this = this;
+ ajax({
+ method: 'post',
+ url: URL.commit,
+ data: {
+ pageid: PAGECODE.head,
+ pkTsParams: [ { pk: record.pk_arriveorder.value, ts: record.ts.value } ]
+ },
+ success: (res) => {
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ this.commitInfo = {
+ index: index,
+ record: record
+ };
+ this.setState({
+ compositedata: res.data,
+ compositedisplay: true
+ });
+ return;
+ }
+ showSuccessInfo(getLangByResId(this, '4004ARRIVAL-000017')); /* 国际化处理: 提交成功*/
+ // showBatchOprMessage(null, res.data);
+ updateCacheDataForList(props, AREA.head, 'pk_arriveorder', res.data, index);
+ _this.onSelect();
+ }
+ });
+ } else {
+ commit.bind(this)();
+ }
+ }
+ break;
+ case 'UnCommit':
+ {
+ if (record && record.pk_arriveorder) {
+ ajax({
+ method: 'post',
+ url: URL.uncommit,
+ data: {
+ pageid: PAGECODE.head,
+ pkTsParams: [ { pk: record.pk_arriveorder.value, ts: record.ts.value } ]
+ },
+ success: (res) => {
+ showSuccessInfo(getLangByResId(this, '4004ARRIVAL-000006')); /* 国际化处理: 收回成功*/
+ // showBatchOprMessage(null, res.data);
+ updateCacheDataForList(props, AREA.head, 'pk_arriveorder', res.data, index);
+ this.onSelect();
+ }
+ });
+ } else {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let indexs = rows.map((row) => {
+ return row.index;
+ });
+ let data = {};
+ data.pageid = PAGECODE.head;
+ data.pkTsParams = rows.map((row) => {
+ return { pk: row.data.values.pk_arriveorder.value, ts: row.data.values.ts.value };
+ });
+
+ ajax({
+ method: 'post',
+ url: URL.uncommit,
+ data: data,
+ success: (res) => {
+ showBatchOprMessage(null, res.data, getLangByResId(this, '4004ARRIVAL-000062'));
+ updateCacheDataForList(props, AREA.head, 'pk_arriveorder', res.data);
+ this.onSelect();
+ }
+ });
+ }
+ }
+ break;
+ case 'Print':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let pk_orgs = new Set();
+ let ids = rows.map((row) => {
+ pk_orgs.add(row.data.values.pk_org.value);
+ return row.data.values.pk_arriveorder.value;
+ });
+
+ ajax({
+ url: URL.printPermiss,
+ data: ids,
+ success: (res) => {
+ if (res.success) {
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ * billtype 2023.11.30版本添加,单据类型
+ * pk_org 2023.11.30版本添加,主组织数组
+ */
+ printPreview(props, URL.print, {
+ appcode: props.getAppCode(),
+ nodekey: null,
+ oids: ids,
+ pk_org: pk_orgs,
+ billtype: BILLTYPE.arrival,
+ printType: true,
+ realData: true,
+ controlPrintNum: true
+ });
+ }
+ }
+ });
+ }
+ break;
+ case 'Print_list':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_arriveorder.value;
+ });
+
+ ajax({
+ url: URL.printPermiss,
+ data: ids,
+ success: (res) => {
+ if (res.success) {
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ */
+ printPreview(props, URL.print, {
+ appcode: props.getAppCode(),
+ nodekey: 'listing_print',
+ oids: ids,
+ printType: true,
+ realData: true,
+ controlPrintNum: true
+ });
+ }
+ }
+ });
+ }
+ break;
+ case 'OutPrint':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_arriveorder.value;
+ });
+ output({
+ url: URL.print, //后台服务url
+ data: {
+ outputType: 'output',
+ billtype: '23', //单据类型
+ nodekey: null, //模板节点标识
+ oids: ids // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ // 打印按钮不用传该参数,输出按钮(文件下载)需加参数outputType,值为output。
+ }
+ });
+ }
+ break;
+ case 'QueryAboutBusiness':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_arriveorder.value;
+ });
+
+ this.setState({
+ pk: ids[0],
+ showTrack: true
+ });
+ }
+ break;
+ case 'QuickReceive':
+ {
+ this.setState({ vordercode: null });
+ this.open();
+ }
+ break;
+ case 'AccessoryManage':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_arriveorder.value;
+ });
+ let vbillcode = rows.map((row) => {
+ return row.data.values.vbillcode.value;
+ });
+ this.setState({
+ pk: ids[0],
+ // target: event.target,
+ showUploader: !this.state.showUploader,
+ billNo: vbillcode[0]
+ });
+ }
+ break;
+ case 'FileBatch':
+ fileBatchDownLoadBtnClick.call(
+ this,
+ props,
+ AREA.form,
+ getLangByResId(this, '4004ARRIVAL-000029') /* 国际化处理: 到货单*/,
+ FIELD.pk_arriveorder
+ );
+ break;
+ case 'ApproveInfo':
+ {
+ let rows = props.table.getCheckedRows(AREA.head);
+ if (rows.length == 0) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000041'),
+ color: 'warning'
+ }); /* 国际化处理: 请先选择数据*/
+ break;
+ }
+ let ids = rows.map((row) => {
+ return row.data.values.pk_arriveorder.value;
+ });
+ this.setState({
+ pk: ids[0],
+ showApproveInfo: !this.state.showApproveInfo
+ });
+ }
+ break;
+ case 'Refresh':
+ {
+ let searchVal = this.state.searchVal;
+ let tabcode = this.state.currentTab;
+ commonSerach.call(this, tabcode, searchVal, true, false);
+ }
+ break;
+ case 'UrgentLetGo':
+ urgentLetGo.call(this, props);
+ break;
+ case 'PrintCountQuery':
+ let CONST = { hid: FIELD.pk_arriveorder, area: AREA.form };
+ printCountQuery.call(this, props, { type: 1, CONST, modal: 'code-config' });
+ break;
+ default:
+ break;
+ }
+}
+
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/commit.js b/src/pu/pu/arrival/list/btnClicks/commit.js
new file mode 100644
index 0000000..689c53c
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/commit.js
@@ -0,0 +1,86 @@
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
+import { URL, FIELD, PAGECODE, AREA } from '../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+import { showBatchOprMessage } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function commit(props, record, index, assign) {
+ // 获取选中行
+ // 执行提交操作
+ let dataRows = [];
+ let indexs = [];
+ if (record && record.pk_arriveorder) {
+ let info = {
+ pk: record.pk_arriveorder.value,
+ ts: record.ts.value
+ };
+ dataRows.push(info);
+ indexs.push(index);
+ } else {
+ let rows = this.props.table.getCheckedRows(AREA.head);
+ // 如果没有选中行,则提示并返回,不进行任何操作
+ if (rows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000043') /* 国际化处理: 请选择需要提交的数据!*/
+ });
+ return;
+ }
+
+ rows.map((item) => {
+ let info = {
+ pk: item.data.values.pk_arriveorder.value,
+ ts: item.data.values.ts.value
+ };
+ dataRows.push(info);
+ indexs.push(item.index);
+ });
+ }
+
+ // 拼装json
+ let data = {
+ pkTsParams: dataRows,
+ pageid: PAGECODE.head
+ };
+ //指派
+ if (assign) {
+ data['assign'] = JSON.stringify(assign);
+ }
+ // 发送请求
+ ajax({
+ url: URL.commit,
+ data: data,
+ success: (res) => {
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ this.commitInfo = {
+ index: index,
+ record: record
+ };
+ this.setState({
+ compositedata: res.data,
+ compositedisplay: true
+ });
+ return;
+ }
+ if (res.success) {
+ if (record && record.pk_arriveorder) {
+ toast({ color: 'success', content: getLangByResId(this, '4004ARRIVAL-000017') }); /* 国际化处理: 提交成功*/
+ updateCacheDataForList(this.props, AREA.head, 'pk_arriveorder', res.data, index);
+ } else {
+ showBatchOprMessage(null, res.data, getLangByResId(this, '4004ARRIVAL-000060'));
+ updateCacheDataForList(this.props, AREA.head, 'pk_arriveorder', res.data);
+ }
+
+ // initButtons.call(this, props);
+ }
+ this.onSelect();
+ }
+ });
+}
+
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/commonSearch.js b/src/pu/pu/arrival/list/btnClicks/commonSearch.js
new file mode 100644
index 0000000..9e71ab6
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/commonSearch.js
@@ -0,0 +1,123 @@
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 通用列表查询
+ * @Date: 2018-05-08 13:43:33
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-07-04 10:02:36
+ */
+import { ajax } from 'nc-lightapp-front';
+import { AREA, COMMON, URL, FIELDS, PAGECODE } from '../../constance';
+import { setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import {
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showSuccessInfo,
+ showQuerySuccess
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function commonSerach(tabCode, queryInfo, isRefreash, isFirst) {
+ let pageInfo = this.props.table.getTablePageInfo(AREA.head); //分页信息
+ let custconditions = [
+ //页签信息
+ {
+ field: tabCode,
+ value: { firstvalue: tabCode }
+ }
+ ];
+ if (!queryInfo) {
+ queryInfo = this.props.search.getQueryInfo(AREA.searchArea, false);
+ if (!queryInfo.querycondition) {
+ queryInfo.querycondition = {};
+ }
+ }
+ queryInfo = transtypeUtils.beforeSearch.call(this, queryInfo, 'ctrantypeid');
+ queryInfo.pageInfo = pageInfo;
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: PAGECODE.head, //页面编码
+ currentTab: tabCode //当前页签编码
+ };
+
+ ajax({
+ url: URL.queryScheme,
+ data: data,
+ method: 'post',
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.success) {
+ if (res.data === undefined || res.data == null) {
+ this.props.table.setAllTableData(AREA.head, { rows: [] });
+ this.setState({
+ toCommitNum: '0',
+ approvingNum: '0',
+ exeNum: '0'
+ });
+ } else {
+ let toCommitNum; // 未提交数量
+ let approvingNum; // 审批中数量
+ let exeNum;
+ if (res.data.tabNum) {
+ toCommitNum = res.data.tabNum.toCommit;
+ approvingNum = res.data.tabNum.approving;
+ exeNum = res.data.tabNum.exe;
+ }
+ this.setState(
+ {
+ toCommitNum: toCommitNum,
+ approvingNum: approvingNum,
+ exeNum: exeNum
+ },
+ () => {
+ let currentTab = res.data.currentTab;
+ let rowsData = { rows: [] };
+ if (res.data.currentGrid && res.data.currentGrid.head) {
+ rowsData = res.data.currentGrid.head;
+ if (isRefreash) {
+ showRefreshInfo();
+ } else if (!isFirst) {
+ showSuccessInfo(getLangByResId(this, '4004ARRIVAL-000058'));
+ }
+ } else {
+ if (isRefreash) {
+ showRefreshInfo();
+ } else if (isFirst != undefined && !isFirst) {
+ showQuerySuccess();
+ }
+ }
+ this.props.table.setAllTableData(AREA.head, rowsData);
+ }
+ );
+ setDefData.call(this, COMMON.arrivalCacheKey, 'totalNum', {
+ currentTab: tabCode,
+ toCommitNum: toCommitNum,
+ approvingNum: approvingNum,
+ processingNum: exeNum
+ });
+ }
+ let butArray = [
+ 'ReturnArrival',
+ 'Delete',
+ 'Commit',
+ 'UnCommit',
+ 'AccessoryManage',
+ 'FileBatch',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'OutPrint',
+ 'CombinPrint',
+ 'SplitPrint',
+ 'UrgentLetGo'
+ ];
+ this.props.button.setButtonDisabled(butArray, true);
+ }
+ }
+ });
+}
+
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/index.js b/src/pu/pu/arrival/list/btnClicks/index.js
new file mode 100644
index 0000000..971c650
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/index.js
@@ -0,0 +1,9 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import buttonClick from './buttonClick';
+import pageInfoClick from './pageInfoClick';
+import searchBtnClick from './searchBtnClick';
+import commonSearch from './commonSearch';
+import commit from './commit';
+export { buttonClick, pageInfoClick, searchBtnClick, commonSearch, commit };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/pageInfoClick.js b/src/pu/pu/arrival/list/btnClicks/pageInfoClick.js
new file mode 100644
index 0000000..f7315ce
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/pageInfoClick.js
@@ -0,0 +1,49 @@
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 分页查询
+ * @Date: 2018-05-07 08:35:41
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2023-06-21 15:55:05
+ */
+import { ajax } from 'nc-lightapp-front';
+import { AREA, COMMON, URL, PAGECODE } from '../../constance';
+export default function(props, config, pks) {
+ let data = {
+ pks: pks,
+ pagecode: PAGECODE.head
+ };
+ //得到数据渲染到页面
+ let that = this;
+ ajax({
+ url: URL.pageQuery,
+ data: data,
+ success: function(res) {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ props.table.setAllTableData(AREA.head, data[AREA.head]);
+ } else {
+ props.table.setAllTableData(AREA.head, { rows: [] });
+ }
+ let butArray = [
+ 'ReturnArrival',
+ 'Delete',
+ 'Commit',
+ 'UnCommit',
+ 'AccessoryManage',
+ 'FileBatch',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'OutPrint',
+ 'CombinPrint',
+ 'SplitPrint',
+ 'UrgentLetGo'
+ ];
+ props.button.setButtonDisabled(butArray, true);
+ }
+ }
+ });
+}
+
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/searchBtnClick.js b/src/pu/pu/arrival/list/btnClicks/searchBtnClick.js
new file mode 100644
index 0000000..171a44f
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/searchBtnClick.js
@@ -0,0 +1,29 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 查询按钮点击
+ * @Date: 2018-04-18 10:39:11
+ * @Last Modified by: zhaochyu
+ * @Last Modified time: 2019-07-26 16:26:57
+ */
+import { ajax, base, toast } from 'nc-lightapp-front';
+import { URL, COMMON, AREA, PAGECODE } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+//点击查询,获取查询区数据
+import commonSerach from './commonSearch';
+export default function clickSerachBtn(tabCode) {
+ let pageInfo = this.props.table.getTablePageInfo(AREA.head); //分页信息
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea); //必输项为空时,返回值为false
+ if (!searchVal) {
+ return;
+ }
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, true);
+ // 将查询条件缓存
+ this.setState({ searchVal: queryInfo });
+ // 查询
+ commonSerach.call(this, tabCode, queryInfo, false, false);
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/btnClicks/urgentLetGo.js b/src/pu/pu/arrival/list/btnClicks/urgentLetGo.js
new file mode 100644
index 0000000..1fde8e8
--- /dev/null
+++ b/src/pu/pu/arrival/list/btnClicks/urgentLetGo.js
@@ -0,0 +1,40 @@
+/*AAsnv3ptohlRY/950ufa0UVIuiOEuOa4WkkRFf0YzqA=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 紧急放行
+ * @Date: 2018-06-27 13:13:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-04-19 10:09:40
+ */
+import { ajax } from 'nc-lightapp-front';
+import { AREA, URL } from '../../constance';
+
+export default function urgentLetGo(props) {
+ let selectRow = props.table.getCheckedRows(AREA.head)[0];
+
+ let head = {
+ pk: selectRow.data.values.pk_arriveorder.value,
+ ts: selectRow.data.values.ts.value
+ };
+
+ let data = {
+ head: head
+ };
+
+ ajax({
+ url: URL.pushToC005Check,
+ data: data,
+ success: (res) => {
+ if (res.success) {
+ props.openTo(null, {
+ appcode: 'C01002800',
+ pagecode: 'C01002800_card',
+ channelType: 'from23',
+ data: JSON.stringify(res.data)
+ });
+ }
+ }
+ });
+}
+
+/*AAsnv3ptohlRY/950ufa0UVIuiOEuOa4WkkRFf0YzqA=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/index.js b/src/pu/pu/arrival/list/index.js
new file mode 100644
index 0000000..e194c45
--- /dev/null
+++ b/src/pu/pu/arrival/list/index.js
@@ -0,0 +1,559 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单列表
+ * @Date: 2018-04-17 15:48:43
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-07-04 10:08:26
+ */
+import React, { Component } from 'react';
+import { createPage, ajax, base, high, toast } from 'nc-lightapp-front';
+import { searchBtnClick, buttonClick, pageInfoClick, commonSearch, commit } from './btnClicks';
+import { initTemplate } from './init';
+import { URL, AREA, COMMON, BUTTONAREA, FIELD, BILLTYPE, PAGECODE } from '../constance';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import ApprovalTrans from 'uap/common/components/approvalTrans';
+import { transtypeUtils } from '../../../../scmpub/scmpub/pub/tool';
+import { getDefData, setDefData } from '../../../../scmpub/scmpub/pub/cache';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { createListTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+import ApproveDetail from 'uap/common/components/ApproveDetail';
+import NCUploader from 'uap/common/components/NCUploader';
+import { dateFormat } from '../../../../scmpub/scmpub/pub/tool';
+
+const { NCTabsControl, NCDiv, NCTooltip, NCHotKeys } = base;
+const { BillTrack } = high;
+import './index.less';
+class ArrivalList extends Component {
+ constructor(props) {
+ super(props);
+ this.moduleId = COMMON.moudleid;
+ this.searchId = AREA.searchArea;
+ this.tableId = AREA.head;
+ props.use.search(this.searchId);
+ props.use.table(this.tableId);
+ this.scmodelcode = '4012';
+ this.appcode;
+ this.state = {
+ pk: '',
+ target: null,
+ showUploader: false,
+ billNo: '',
+ showTrack: false,
+ showApproveInfo: false,
+ searchVal: null,
+ currentTab: 'toCommit',
+ billtype: '23',
+ toCommitNum: '0',
+ approvingNum: '0',
+ exeNum: '0',
+ currentLocale: 'en-Us',
+ compositedisplay: false, //指派参数
+ compositedata: null, //指派
+ vordercode: null,
+ isbrowsebeforesave: 'Y',
+ showModal: false
+ };
+ this.commitInfo = {
+ index: null,
+ record: null
+ };
+ // initTemplate.call(this);
+ initLang(this, [ '4004arrival' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentDidMount() {
+ this.onSelect();
+ dateFormat();
+ }
+
+ hanelChange = (tab) => {
+ this.setState({ currentTab: tab }); //更新当前页签编码
+ setDefData.call(this, COMMON.arrivalCacheKey, COMMON.arrivalCacheTabKey, {
+ tabCode: tab
+ });
+ // if ('all' == tab) {
+ // // 点击全部页签时,若未输入查询条件,就不查
+ // if (this.state.searchVal) {
+ // commonSearch.bind(this, tab, this.state.searchVal)(); // 调用查询方法
+ // } else {
+ // let rowsData = { rows: [] };
+ // this.props.table.setAllTableData(AREA.head, rowsData);
+ // return;
+ // }
+ // } else {
+ commonSearch.bind(this, tab, this.state.searchVal)(); // 调用查询方法
+ //}
+ };
+
+ handleChange = (value) => {
+ this.setState({ isbrowsebeforesave: 'N' });
+ };
+
+ // 提交指派
+ getAssginUsedr = (value) => {
+ //重新执行提交操作重新执行提交操作
+ if (this.commitInfo.record) {
+ commit.call(this, this.props, this.commitInfo.record, this.commitInfo.index, value);
+ } else {
+ commit.call(this, this.props, null, null, value);
+ }
+ this.setState({ compositedisplay: false });
+ };
+
+ sure = () => {
+ let data = {
+ vordercode: this.state.vordercode,
+ isbrowsebeforesave: this.state.isbrowsebeforesave
+ };
+
+ if (!this.state.vordercode) {
+ toast({
+ content: getLangByResId(this, '4004ARRIVAL-000044'),
+ color: 'warning'
+ }); /* 国际化处理: 订单号未录入!*/
+ return;
+ }
+
+ if (this.state.isbrowsebeforesave == 'Y') {
+ this.setState({ showModal: false });
+ let _this = this;
+ ajax({
+ method: 'post',
+ url: URL.quickArr,
+ data: data,
+ success: function(res) {
+ if (res && res.data) {
+ _this.props.pushTo(URL.card, {
+ type: 'quickArr',
+ vordercode: _this.state.vordercode,
+ pagecode: PAGECODE.card
+ });
+ } else {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004ARRIVAL-000045')
+ }); /* 国际化处理: 该订单不满足快速收货条件,无法再进行快速收货!*/
+ }
+ }
+ });
+ } else {
+ this.setState({ showModal: false });
+ let _this = this;
+ ajax({
+ method: 'post',
+ url: URL.quickArr,
+ data: data,
+ success: function(res) {
+ toast({
+ content: getLangByResId(_this, '4004ARRIVAL-000026'),
+ color: 'success'
+ }); /* 国际化处理: 快速收货成功*/
+ }
+ });
+ }
+ };
+
+ onAfterEvent(field, val) {
+ if (field == 'pk_org') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [
+ 'pk_supplier',
+ 'pk_arriveorder_b.pk_srcmaterial',
+ 'pk_arriveorder_b.casscustid',
+ 'pk_arriveorder_b.pk_receivestore',
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20',
+ 'pk_arriveorder_b.vbdef1',
+ 'pk_arriveorder_b.vbdef2',
+ 'pk_arriveorder_b.vbdef3',
+ 'pk_arriveorder_b.vbdef4',
+ 'pk_arriveorder_b.vbdef5',
+ 'pk_arriveorder_b.vbdef6',
+ 'pk_arriveorder_b.vbdef7',
+ 'pk_arriveorder_b.vbdef8',
+ 'pk_arriveorder_b.vbdef9',
+ 'pk_arriveorder_b.vbdef10',
+ 'pk_arriveorder_b.vbdef11',
+ 'pk_arriveorder_b.vbdef12',
+ 'pk_arriveorder_b.vbdef13',
+ 'pk_arriveorder_b.vbdef14',
+ 'pk_arriveorder_b.vbdef15',
+ 'pk_arriveorder_b.vbdef16',
+ 'pk_arriveorder_b.vbdef17',
+ 'pk_arriveorder_b.vbdef18',
+ 'pk_arriveorder_b.vbdef19',
+ 'pk_arriveorder_b.vbdef20',
+ 'pk_arriveorder_b.vfree1',
+ 'pk_arriveorder_b.vfree2',
+ 'pk_arriveorder_b.vfree3',
+ 'pk_arriveorder_b.vfree4',
+ 'pk_arriveorder_b.vfree5',
+ 'pk_arriveorder_b.vfree6',
+ 'pk_arriveorder_b.vfree7',
+ 'pk_arriveorder_b.vfree8',
+ 'pk_arriveorder_b.vfree9',
+ 'pk_arriveorder_b.vfree10',
+ 'pk_arriveorder_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_arriveorder_b.pk_material.materialstock.pk_marpuclass',
+ 'pk_arriveorder_b.pk_receivestore',
+ 'pk_arriveorder_b.cprojectid',
+ 'pk_arriveorder_b.casscustid'
+ ]);
+ } else if (field == 'pk_purchaseorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'pk_dept', 'pk_pupsndoc' ]);
+ }
+ }
+
+ doubleClick = (record, index) => {
+ this.props.pushTo('/card', {
+ status: 'browse',
+ id: record.pk_arriveorder.value,
+ pagecode: PAGECODE.card
+ });
+ };
+
+ onSelect = () => {
+ let butArray = [
+ 'ReturnArrival',
+ 'Delete',
+ 'Commit',
+ 'UnCommit',
+ 'AccessoryManage',
+ 'FileBatch',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'Print_list',
+ 'PrintCountQuery',
+ 'OutPrint',
+ 'CombinPrint',
+ 'SplitPrint',
+ 'UrgentLetGo'
+ ];
+ //单选可用按钮
+ let singlebutArray = [
+ 'ReturnArrival',
+ 'AccessoryManage',
+ 'FileBatch',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'Print_list',
+ 'PrintCountQuery',
+ 'OutPrint',
+ 'CombinPrint',
+ 'SplitPrint'
+ ];
+ //多选可用按钮
+ let mutibutarray = [
+ 'Delete',
+ 'Commit',
+ 'UnCommit',
+ 'AccessoryManage',
+ 'FileBatch',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'Print_list',
+ 'PrintCountQuery',
+ 'OutPrint',
+ 'CombinPrint',
+ 'SplitPrint',
+ 'UrgentLetGo'
+ ];
+ let rows = this.props.table.getCheckedRows(AREA.head);
+ if (rows && rows.length > 0) {
+ if (rows.length == 1) {
+ this.props.button.setButtonDisabled(butArray, true);
+ this.props.button.setButtonDisabled(singlebutArray, false);
+ let status = rows[0].data.values.fbillstatus.value;
+ if (status == 0) {
+ this.props.button.setButtonDisabled([ 'Commit', 'Delete' ], false);
+ } else if (status == 1 || status == 2 || status == 3) {
+ this.props.button.setButtonDisabled([ 'UnCommit', 'UrgentLetGo' ], false);
+ }
+ if (status == 3) {
+ this.props.button.setButtonDisabled([ 'ReturnArrival' ], false);
+ } else {
+ this.props.button.setButtonDisabled([ 'ReturnArrival' ], true);
+ }
+ } else {
+ this.props.button.setButtonDisabled(mutibutarray, false);
+ }
+ } else {
+ this.props.button.setButtonDisabled(butArray, true);
+ }
+ };
+
+ closeApprove = () => {
+ this.setState({
+ showApproveInfo: false
+ });
+ };
+
+ onHideUploader = () => {
+ this.setState({
+ showUploader: false
+ });
+ };
+
+ open = () => {
+ this.setState({ showModal: true });
+ };
+
+ close = () => {
+ this.setState({ showModal: false });
+ };
+
+ onChange = (e) => {
+ this.setState({ vordercode: e });
+ };
+
+ renderCompleteEvent = () => {
+ transtypeUtils.setQueryDefaultValue.call(this, this.props, AREA.searchArea, 'ctrantypeid');
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_org');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let orgvalue = pk_org.value.firstvalue;
+ let arr = orgvalue.split(',').map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent('pk_org', arr);
+ }
+ };
+
+ getdefaultTab = () => {
+ let tabCode = getDefData.call(this, COMMON.arrivalCacheKey, COMMON.arrivalCacheTabKey);
+ // 里程碑看板跳转过来,直接跳转全部页签
+ let srcpk = this.props.getUrlParam(FIELD.pk);
+ if (srcpk) {
+ tabCode = { tabCode: 'all' };
+ }
+ if (tabCode == null || tabCode.tabCode == null) {
+ return 0;
+ } else {
+ // return tabCode.tabCode;
+ if (tabCode.tabCode == 'toCommit') {
+ return 0;
+ } else if (tabCode.tabCode == 'approving') {
+ return 1;
+ } else if (tabCode.tabCode == 'exe') {
+ return 2;
+ } else if (tabCode.tabCode == 'all') {
+ return 3;
+ }
+ }
+ };
+ render() {
+ const { table, button, search, ncmodal } = this.props;
+ const { createSimpleTable } = table;
+ const { NCCreateSearch } = search;
+ const { NCModal, NCButton, NCSelect, NCFormControl } = base;
+ let { createModal } = ncmodal;
+ const NCOption = NCSelect.NCOption;
+ const { socket } = this.props;
+ let { toCommitNum, approvingNum, exeNum } = this.state;
+ return (
+
+ {socket.connectMesg({
+ tableAreaCode: this.tableId,
+ billpkname: FIELD.pk_arriveorder,
+ billtype: BILLTYPE.arrival
+ })}
+
+ {createListTitle(this)}
+
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.listhead,
+ onButtonClick: buttonClick.bind(this)
+ })}
+
{
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk}
+ type="23"
+ />
+ {this.state.showUploader && (
+
+ )}
+
+
+
+
+ {NCCreateSearch('searchArea', {
+ clickSearchBtn: searchBtnClick.bind(this, this.state.currentTab),
+ onAfterEvent: this.onAfterEvent.bind(this),
+ defaultConditionsNum: 5,
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent,
+ dataSource: COMMON.arrivalCacheKey,
+ pkname: 'pk_arriveorder'
+ })}
+
+
+ {createModal('delete')}
+ {createModal('quickReceive', {
+ size: 'sm',
+ title: getLangByResId(this, '4004ARRIVAL-000030'), // 快速收货
+ content:
+ })}
+
+
+ this.hanelChange('toCommit')}>
+ {`${getLangByResId(this, '4004ARRIVAL-000046')}(${toCommitNum})`}
+
+ this.hanelChange('approving')}>
+ {`${getLangByResId(this, '4004ARRIVAL-000047')}(${approvingNum})`}
+
+ this.hanelChange('exe')}>
+ {`${getLangByResId(this, '4004ARRIVAL-000048')}(${exeNum})`}
+
+ this.hanelChange('all')}>
+ {getLangByResId(this, '4004ARRIVAL-000049')}
+
+
+ {createSimpleTable(this.tableId, {
+ handlePageInfoChange: pageInfoClick,
+ showIndex: true,
+ showCheck: true,
+ onRowDoubleClick: this.doubleClick.bind(this),
+ onSelected: this.onSelect.bind(this),
+ onBatchSelected: this.onSelect.bind(this),
+ onSelectedAll: this.onSelect.bind(this),
+ dataSource: COMMON.arrivalCacheKey,
+ pkname: 'pk_arriveorder',
+ componentInitFinished: this.onSelect.bind(this)
+ })}
+ {/* 快速收货弹窗 */}
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000030')}
+
+
+
+
+
+
+
+
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000033')}
+ {getLangByResId(this, '4004ARRIVAL-000034')}
+
+
+
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000035') /* 国际化处理: 确定*/}(Y)
+
+
+
+
+ {getLangByResId(this, '4004ARRIVAL-000036') /* 国际化处理: 取消*/}(N)
+
+
+
+
+ {this.state.compositedisplay && (
+
{
+ this.setState({ compositedisplay: false });
+ }}
+ />
+ )}
+
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+ }
+}
+
+ArrivalList = createPage({
+ billinfo: {
+ billtype: 'grid',
+ pagecode: PAGECODE.card,
+ bodycode: {
+ [AREA.head]: 'simpleTable' //此处发生变化了,需要传一个对象
+ }
+ }
+})(ArrivalList);
+export default ArrivalList;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/index.less b/src/pu/pu/arrival/list/index.less
new file mode 100644
index 0000000..e6c09ff
--- /dev/null
+++ b/src/pu/pu/arrival/list/index.less
@@ -0,0 +1,19 @@
+.quick-receive-modal {
+ .field-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 8px;
+ .field-label {
+ width: 120px;
+ text-align: right;
+ margin-right: 8px;
+ &::before {
+ content: "*";
+ color: red;
+ }
+ }
+ .field-content {
+ width: 200px;
+ }
+ }
+}
diff --git a/src/pu/pu/arrival/list/init/index.js b/src/pu/pu/arrival/list/init/index.js
new file mode 100644
index 0000000..8f4f849
--- /dev/null
+++ b/src/pu/pu/arrival/list/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/list/init/initTemplate.js b/src/pu/pu/arrival/list/init/initTemplate.js
new file mode 100644
index 0000000..0795e17
--- /dev/null
+++ b/src/pu/pu/arrival/list/init/initTemplate.js
@@ -0,0 +1,312 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单元数据加载
+ * @Date: 2018-04-17 15:47:30
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-22 10:18:28
+ */
+import { ajax, base, cacheTools } from 'nc-lightapp-front';
+import { APPID, PAGECODE, AREA, URL, BUTTONAREA, COMMON, FIELD } from '../../constance';
+import { commonSearch, buttonClick, pageInfoClick } from '../btnClicks';
+import { getDefData, hasListCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { refBillQueryCache } from '../../../pub/refBillQueryCache/refBillQueryCache';
+import { setDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getListDisableHotKeyBtn } from '../../../../../scmpub/scmpub/pub/tool/hotKeysUtil';
+import BillCodeHyperLink from 'scmpub/scmpub/components/BillCodeStyle';
+import ntpLinkList from '../../../pub/linkQuery/ntpLinkList';
+
+let { NCPopconfirm, NCIcon } = base;
+
+export default function() {
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.head //页面id
+ //appid: APPID //注册按钮的id
+ },
+ (templedata) => {
+ if (templedata) {
+ transtypeUtils.init.call(this, templedata.context);
+ if (templedata.template) {
+ let meta = templedata.template;
+ transtypeUtils.initQuery.call(this, this.props, meta, AREA.searchArea, 'ctrantypeid');
+ modifierMeta.call(this, this.props, meta);
+ this.props.meta.setMeta(meta, initQueryData.bind(this, this.props));
+ // commonSearch.bind(this, 'toCommit')(); // 调用查询方法
+ }
+ if (templedata.button) {
+ let button = templedata.button;
+ this.props.button.setButtons(button);
+ this.props.button.setPopContent(
+ 'Delete',
+ getLangByResId(this, '4004ARRIVAL-000050')
+ ); /* 国际化处理: 确认删除?*/
+ this.onSelect();
+ }
+ let refBillQueryData = { billType: '23' };
+ if (templedata.context.paramMap && templedata.context.paramMap.transtype) {
+ refBillQueryData.transType = templedata.context.paramMap.transtype;
+ }
+ // refBillQueryCache(refBillQueryData, COMMON.arrivalRefBillCachekey, 'refBillDataCach');
+ if (templedata.context.paramMap && templedata.context.paramMap.transtype) {
+ setDefData(COMMON.arrivalRefBillCachekey, 'cbilltypecode', templedata.context.paramMap.transtype);
+ setDefData(COMMON.arrivalRefBillCachekey, 'cbilltypeid', templedata.context.paramMap.pk_transtype);
+ setDefData(
+ COMMON.arrivalRefBillCachekey,
+ 'cbilltypename',
+ templedata.context.paramMap.transtype_name
+ );
+ ajax({
+ url: '/nccloud/pu/pub/refbillqueryaction.do',
+ data: refBillQueryData,
+ success: (res) => {
+ if (res.success) {
+ if (res.data) {
+ setDefData(
+ COMMON.arrivalRefBillCachekey,
+ 'refBillDataCach',
+ refBillQueryData.transType
+ );
+
+ let billtypes = res.data.map((item) => {
+ return item.src_billtype;
+ });
+ setDefData(COMMON.arrivalRefBillCachekey, 'refBilltypesCach', billtypes);
+ if (billtypes.indexOf('61') < 0) {
+ this.props.button.setButtonVisible('RefSubcont', false);
+ }
+ if (billtypes.indexOf('21') < 0) {
+ this.props.button.setButtonVisible('RefOrder', false);
+ }
+ } else {
+ this.props.button.setButtonVisible([ 'RefOrder', 'RefSubcont' ], false);
+ }
+ }
+ }
+ });
+ }
+ }
+ }
+ );
+}
+
+function initQueryData(props) {
+ if (props.getUrlParam('pk_ntbparadimvo')) {
+ // 采购计划联查过来的
+ ntpLinkList.call(this, props, { cardUrl: URL.card, listFormId: AREA.form }, () => {
+ let butArray = [
+ 'ReturnArrival',
+ 'Delete',
+ 'Commit',
+ 'UnCommit',
+ 'AccessoryManage',
+ 'FileBatch',
+ 'QueryAboutBusiness',
+ 'Print',
+ 'OutPrint',
+ 'CombinPrint',
+ 'SplitPrint',
+ 'UrgentLetGo'
+ ];
+ this.props.button.setButtonDisabled(butArray, true);
+ });
+ } else {
+ if (!hasListCache(props, COMMON.arrivalCacheKey)) {
+ let srcpks = this.props.getUrlParam(FIELD.pks);
+ if (srcpks) {
+ let pksrc = srcpks.split(',');
+ let pks = new Array();
+ pksrc.map((item) => {
+ if (item) {
+ pks.push(item);
+ }
+ });
+ //更新当前页签编码
+ pageInfoClick.call(this, this.props, null, pks);
+ }
+ let queryInfo = cacheTools.get(COMMON.arrivalServal);
+ commonSearch.bind(this, 'toCommit', queryInfo, false, true)();
+ } else {
+ let totalnum = getDefData.call(this, COMMON.arrivalCacheKey, 'totalNum');
+ if (totalnum) {
+ this.setState({
+ currentTab: totalnum.currentTab,
+ toCommitNum: totalnum.toCommitNum,
+ approvingNum: totalnum.approvingNum,
+ exeNum: totalnum.processingNum
+ });
+ }
+ // btn_Controller.call(this, this.props);
+ }
+ }
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ meta[AREA.searchArea].items.map((item, key) => {
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == 'ctrantypeid') {
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return {
+ parentbilltype: '23',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSIORG: data
+ };
+ };
+ } else if (item.attrcode == 'pk_org') {
+ //主组织过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (
+ item.attrcode == 'billmaker' ||
+ item.attrcode == 'approver' ||
+ item.attrcode == 'pk_freecust' ||
+ item.attrcode == 'pk_transporttype' ||
+ item.attrcode == 'pk_arriveorder_b.creporterid'
+ ) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else if (item.attrcode != 'pk_org') {
+ if (item.attrcode == 'pk_pupsndoc') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_purchaseorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_purchaseorg').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_purchaseorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_purchaseorg').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_arriveorder_b.cffileid') {
+ //配置码
+ item.queryCondition = () => {
+ let pk_srcmaterial = props.search.getSearchValByField(
+ AREA.searchArea,
+ 'pk_arriveorder_b.pk_srcmaterial'
+ ); // 调用相应组件的取值API
+ return {
+ cmaterialid: pk_srcmaterial && pk_srcmaterial.value ? pk_srcmaterial.value.firstvalue : null
+ };
+ };
+ } else if (item.attrcode == 'pk_supplier') {
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return {
+ pk_org: data,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景}; // 根据pk_org过滤
+ };
+ };
+ } else {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ }
+ }
+ });
+ let listTable = meta.head;
+ meta[AREA.head].items = meta[AREA.head].items.map((item, key) => {
+ // item.width = 150;
+ if (item.attrcode == 'vbillcode') {
+ item.render = (text, record, index) => {
+ if (record !== undefined) {
+ return (
+ {
+ props.pushTo('/card', {
+ status: 'browse',
+ id: record.pk_arriveorder.value,
+ pagecode: PAGECODE.card
+ });
+ }}
+ />
+ );
+ }
+ };
+ }
+ return item;
+ });
+ //添加操作列
+ meta[AREA.head].items.push({
+ itemtype: 'customer',
+ attrcode: 'opr',
+ label: getLangByResId(this, '4004ARRIVAL-000038') /* 国际化处理: 操作*/,
+ width: 200,
+ visible: true,
+ fixed: 'right',
+ render: (text, record, index) => {
+ if (record !== undefined) {
+ let status = record.fbillstatus.value;
+ let buttonAry = [ 'Commit', 'Edit', 'Delete', 'CopyLine', 'ApproveInfo' ];
+ if (status == 0) {
+ // 自由
+ buttonAry = [ 'Commit', 'Edit', 'Delete', 'ApproveInfo' ];
+ } else if (status == 1 || status == 2) {
+ // 审批中
+ buttonAry = [ 'UnCommit', 'ApproveInfo' ];
+ } else if (status == 3) {
+ // 审批通过
+ buttonAry = [ 'ApproveInfo' ];
+ } else if (status == 4) {
+ // 审批不通过
+ buttonAry = [ 'Edit', 'ApproveInfo' ];
+ }
+ return props.button.createErrorButton({
+ record: record,
+ showBack: false, // 是否显示回退按钮
+ sucessCallBack: () => {
+ return props.button.createOprationButton(buttonAry, {
+ area: BUTTONAREA.listinner,
+ ignoreHotkeyCode: getListDisableHotKeyBtn(),
+ buttonLimit: 3,
+ onButtonClick: (props, key) => buttonClick.call(this, props, key, text, record, index)
+ });
+ }
+ });
+ }
+ }
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/main/config.json b/src/pu/pu/arrival/main/config.json
new file mode 100644
index 0000000..ba15393
--- /dev/null
+++ b/src/pu/pu/arrival/main/config.json
@@ -0,0 +1,38 @@
+{
+ "dependModuleName": [
+ "uap/common/components/codeConfigModal",
+ "uap/common/components/ApproveDetail",
+ "uap/common/components/NCUploader",
+ "uap/common/components/approvalTrans",
+ "uap/common/components/scanCodeView",
+ "scmpub/scmpub/components/MergePrinting",
+ "scmpub/scmpub/components/BillCodeStyle",
+ "scmpub/scmpub/components/ResumeModal",
+ "scmpub/scmpub/components/SplitPrinting",
+ "uap/common/components/printOnClient",
+ "uap/common/components/printlimitModal",
+ "uapbd/refer/busiinfo/RackDefaultTreeRef",
+ "uap/common/components/getAttachmentInfo",
+ "uapbd/refer/material/MeasdocDefaultGridRef",
+ "uapbd/refer/psninfo/PsndocTreeGridRef",
+ "uapbd/refer/material/MaterialVersionGridRef"
+ ],
+ "dependjs": [
+ "../../../../uap/common/components/codeConfigModal/index.js",
+ "../../../../uap/common/components/ApproveDetail/index.js",
+ "../../../../uap/common/components/NCUploader/index.js",
+ "../../../../uap/common/components/approvalTrans/index.js",
+ "../../../../uap/common/components/scanCodeView/index.js",
+ "../../../../uap/common/components/printOnClient/index.js",
+ "../../../../scmpub/scmpub/components/MergePrinting/index.js",
+ "../../../../scmpub/scmpub/components/BillCodeStyle/index.js",
+ "../../../../scmpub/scmpub/components/ResumeModal/index.js",
+ "../../../../scmpub/scmpub/components/SplitPrinting/index.js",
+ "../../../../uap/common/components/printlimitModal/index.js",
+ "../../../../uapbd/refer/busiinfo/RackDefaultTreeRef/index.js",
+ "../../../../uap/common/components/getAttachmentInfo/index.js",
+ "../../../../uapbd/refer/material/MeasdocDefaultGridRef/index.js",
+ "../../../../uapbd/refer/psninfo/PsndocTreeGridRef/index.js",
+ "../../../../uapbd/refer/material/MaterialVersionGridRef/index.js"
+ ]
+}
diff --git a/src/pu/pu/arrival/main/index.js b/src/pu/pu/arrival/main/index.js
new file mode 100644
index 0000000..b04fa81
--- /dev/null
+++ b/src/pu/pu/arrival/main/index.js
@@ -0,0 +1,9 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import {RenderRouter} from 'nc-lightapp-front';
+import routes from './router';
+
+(function main(routers,htmlTagid){
+ RenderRouter(routers,htmlTagid);
+})(routes,"app");
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/main/router.js b/src/pu/pu/arrival/main/router.js
new file mode 100644
index 0000000..bf87d27
--- /dev/null
+++ b/src/pu/pu/arrival/main/router.js
@@ -0,0 +1,55 @@
+/*/Zy544GA7/bUaK4rYRYJBGq/9Gtfns910rXLm2JFwtM=*/
+import { asyncComponent } from 'nc-lightapp-front';
+import ArrivalList from '../list';
+//import card from '../card';
+const card = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/arrival/card/card"*/ /* webpackMode: "eager" */ '../card')
+);
+
+const ref21 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/arrival/transfer21/ref21"*/ /* webpackMode: "eager" */ '../transfer21')
+);
+const return21 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/arrival/return21/ref21"*/ /* webpackMode: "eager" */ '../return21')
+);
+const return61 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/arrival/return61/ref61"*/ /* webpackMode: "eager" */ '../return61')
+);
+
+const ref61 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/arrival/transfer61/ref61"*/ /* webpackMode: "eager" */ '../transfer61')
+);
+const routes = [
+ {
+ path: '/',
+ component: ArrivalList,
+ exact: true
+ },
+ {
+ path: '/list',
+ component: ArrivalList
+ },
+ {
+ path: '/card',
+ component: card
+ },
+ {
+ path: '/return21',
+ component: return21
+ },
+ {
+ path: '/return61',
+ component: return61
+ },
+ {
+ path: '/ref21',
+ component: ref21
+ },
+ {
+ path: '/ref61',
+ component: ref61
+ }
+];
+export default routes;
+
+/*/Zy544GA7/bUaK4rYRYJBGq/9Gtfns910rXLm2JFwtM=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return21/btnClick/index.js b/src/pu/pu/arrival/return21/btnClick/index.js
new file mode 100644
index 0000000..7118995
--- /dev/null
+++ b/src/pu/pu/arrival/return21/btnClick/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+
+export {searchBtnClick}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return21/btnClick/searchBtnClick.js b/src/pu/pu/arrival/return21/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..25afea1
--- /dev/null
+++ b/src/pu/pu/arrival/return21/btnClick/searchBtnClick.js
@@ -0,0 +1,74 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 查询按钮点击
+ * @Date: 2018-04-18 10:39:11
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-10 13:50:05
+ */
+import { ajax, base, toast } from 'nc-lightapp-front';
+const { NCMessage } = base;
+import { URL, COMMON, AREA, PAGECODE, TRANSFER, APPCODE } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+//点击查询,获取查询区数据
+export default function() {
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea);
+ if (!searchVal) {
+ return;
+ }
+ let pageinfo = {
+ pageSize: 10,
+ pageIndex: 0
+ };
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, true);
+ let data = {
+ queryInfo: queryInfo,
+ // {
+ // querycondition: searchVal? searchVal : {logic: 'and'}, //查询条件
+ // pageInfo: pageinfo, //分页信息
+ // queryAreaCode: AREA.searchArea, //查询区编码
+ // oid: TRANSFER.oid, //查询模板id,手工添加在界面模板json中,放在查询区,后期会修改
+ // querytype: 'tree'
+ // },
+ // pageCode: PAGECODE.transferOrderlist, //页面编码
+ pageCode: PAGECODE.returnOrder, //页面编码
+ appcode: APPCODE.poorder, //应用编码
+ templetid: this.state.templetid //模板id
+ };
+
+ this.searchVal = data;
+ let _this = this;
+ //得到数据渲染到页面
+ ajax({
+ url: URL.queryReturnOrder,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ _this.setState({ ntotalnum: 0 });
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ showNoQueryResultInfo(); /* 国际化处理: 查询成功*/
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ }
+ });
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return21/index.js b/src/pu/pu/arrival/return21/index.js
new file mode 100644
index 0000000..59a8c51
--- /dev/null
+++ b/src/pu/pu/arrival/return21/index.js
@@ -0,0 +1,294 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick } from './btnClick';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { PAGECODE, AREA, COMMON, URL, BUTTONAREA } from '../constance';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { createCardTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo,
+ showRefreshInfo
+} from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn } = base;
+const { NCMessage, NCDiv } = base;
+
+class TransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(AREA.searchArea);
+ this.state = {
+ ntotalnum: 0,
+ templetid: '',
+ toggleViewStatus: false
+ };
+ this.searchVal;
+ // initTemplate.call(this);
+ initLang(this, [ '4004arrival' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ // calTotal = (flag, record, bodys) => {
+ // let ntotalnum = this.state.ntotalnum;
+ // if (flag == true) {
+ // if (bodys) {
+ // bodys.forEach((element) => {
+ // ntotalnum = sum(ntotalnum, element.ncanarrivenum.value);
+ // });
+ // } else {
+ // ntotalnum = sum(ntotalnum, record.ncanarrivenum.value);
+ // }
+ // // += (record.ncanarrivenum || {}).value || 0;
+ // } else {
+ // if (bodys) {
+ // bodys.forEach((element) => {
+ // ntotalnum = sum(ntotalnum, -element.ncanarrivenum.value);
+ // });
+ // } else {
+ // ntotalnum = sum(ntotalnum, -record.ncanarrivenum.value);
+ // }
+ // // ntotalnum -= (record.ncanarrivenum || {}).value || 0;
+ // }
+ // this.setState({
+ // ntotalnum: ntotalnum
+ // });
+ // };
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let orgvalue = pk_org.value.firstvalue;
+ let arr = orgvalue.split(',').map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent('pk_order_b.pk_arrvstoorg', arr);
+ }
+ };
+
+ onAfterEvent(field, val) {
+ if (field == 'pk_order_b.pk_arrvstoorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [
+ 'pk_supplier',
+ 'pk_payterm',
+ 'pk_invcsupllier',
+ 'pk_recvcustomer',
+ 'pk_order_b.pk_srcmaterial',
+ 'pk_order_b.casscustid',
+ 'pk_order_b.pk_material',
+ 'pk_order_b.pk_recvstordoc',
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20',
+ 'pk_order_b.vbdef1',
+ 'pk_order_b.vbdef2',
+ 'pk_order_b.vbdef3',
+ 'pk_order_b.vbdef4',
+ 'pk_order_b.vbdef5',
+ 'pk_order_b.vbdef6',
+ 'pk_order_b.vbdef7',
+ 'pk_order_b.vbdef8',
+ 'pk_order_b.vbdef9',
+ 'pk_order_b.vbdef10',
+ 'pk_order_b.vbdef11',
+ 'pk_order_b.vbdef12',
+ 'pk_order_b.vbdef13',
+ 'pk_order_b.vbdef14',
+ 'pk_order_b.vbdef15',
+ 'pk_order_b.vbdef16',
+ 'pk_order_b.vbdef17',
+ 'pk_order_b.vbdef18',
+ 'pk_order_b.vbdef19',
+ 'pk_order_b.vbdef20',
+ 'pk_order_b.vfree1',
+ 'pk_order_b.vfree2',
+ 'pk_order_b.vfree3',
+ 'pk_order_b.vfree4',
+ 'pk_order_b.vfree5',
+ 'pk_order_b.vfree6',
+ 'pk_order_b.vfree7',
+ 'pk_order_b.vfree8',
+ 'pk_order_b.vfree9',
+ 'pk_order_b.vfree10',
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_order_b.pk_recvstordoc',
+ 'pk_order_b.cprojectid'
+ ]);
+ } else if (field == 'pk_org') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'cemployeeid', 'pk_dept' ]);
+ } else if (field == 'pk_order_b.pk_reqstoorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'pk_order_b.pk_reqstordoc' ]);
+ }
+ }
+
+ handleClick() {}
+
+ refreash = () => {
+ let data = this.searchVal;
+ if (data == null || data == 'null') {
+ return;
+ }
+ let _this = this;
+ ajax({
+ url: URL.queryReturnOrder,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ // showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ // showNoQueryResultInfo();
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ showRefreshInfo();
+ }
+ });
+ };
+
+ // react:界面渲染函数
+ render() {
+ const { transferTable, button, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createTransferTable, createTransferList, getTransformFormDisplay } = transferTable;
+ let totalstr = getLangByResId(this, '4004ARRIVAL-000052'); /* 国际化处理: 本次退货主数量:*/
+ let selectedShow = transferTable.getSelectedListDisplay(AREA.head);
+ return (
+
+ {!selectedShow ? (
+
+
+ {/* {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ }}
+ /> */}
+ {createCardTitle(this, {
+ title: getLangByResId(this, '4004ARRIVAL-000054') /*国际化处理: 选择订单*/,
+ backBtnClick: () => {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ }
+ })}
+ {/* {getLangByResId(this, '4004ARRIVAL-000054') /*国际化处理: 选择订单*/}
+ {/*
+
+
+ */}
+
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.listhead,
+ onButtonClick: this.refreash.bind(this)
+ })}
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+
+ {NCCreateSearch(AREA.searchArea, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })
+ //模块id
+ }
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ searchAreaCode: AREA.searchArea,
+ headTableId: AREA.head, //表格组件id
+ bodyTableId: AREA.body, //子表模板id
+ fullTableId: AREA.transferview, //主子拉平VO
+ //点击加号展开,设置表格数据
+ transferBtnText: getLangByResId(this, '4004ARRIVAL-000053'), //转单按钮显示文字/* 国际化处理: 生成退货单*/
+ containerSelector: '#transferList',
+ onTransferBtnClick: (ids) => {
+ this.props.pushTo(URL.card, { type: 'arrivalreturn21', pagecode: PAGECODE.card });
+ },
+ totalKey: [ 'ncanarrivenum' ],
+ totalTitle: [ getLangByResId(this, '4004ARRIVAL-000052') ],
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // //勾选的回调函数
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys);
+ // },
+ // selectArea: () => {
+ // return {totalstr + this.state.ntotalnum};
+ // },
+ // onSelectedItemRemove: (record, bodys) => {
+ // this.calTotal(false, record, bodys);
+ // },
+ // onClearAll: () => {
+ // this.setState({
+ // ntotalnum: 0
+ // });
+ // },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ },
+ dataSource: COMMON.arrivalReturn21CacheKey
+ })}
+
+
+ );
+ }
+}
+
+TransferTable = createPage({})(TransferTable);
+// ReactDOM.render(, document.querySelector('#app'));
+export default TransferTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return21/init/index.js b/src/pu/pu/arrival/return21/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/arrival/return21/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return21/init/initTemplate.js b/src/pu/pu/arrival/return21/init/initTemplate.js
new file mode 100644
index 0000000..8659348
--- /dev/null
+++ b/src/pu/pu/arrival/return21/init/initTemplate.js
@@ -0,0 +1,153 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单转单列表
+ * @Date: 2018-05-25 10:26:08
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-20 16:57:02
+ */
+import { PAGECODE, AREA, APPCODE } from '../../constance';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ _this.props.createUIDom(
+ {
+ appcode: APPCODE.poorder, //应用编码
+ pagecode: PAGECODE.returnOrder //页面id
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ let meta = data.template;
+ modifierMeta(_this.props, meta);
+ _this.props.meta.setMeta(meta);
+ }
+ if (data.button) {
+ let button = data.button;
+ _this.props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[AREA.body].items.map((item) => {
+ // item.width = 120;
+ return item;
+ });
+ meta[AREA.searchArea].items.map((item) => {
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == 'ctrantypeid') {
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API)
+ return {
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSIORG: pk_org.firstvalue
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_arrvstoorg') {
+ //主组织过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (
+ item.attrcode != 'pk_org' &&
+ item.attrcode != 'pk_order_b.pk_arrvstoorg' &&
+ item.attrcode != 'pk_order_b.pk_reqstoorg'
+ ) {
+ if (item.attrcode == 'cemployeeid') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ let dept =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_dept') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_dept').value.firstvalue
+ : null;
+ return { pk_org: data, pk_dept: dept, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (
+ item.attrcode == 'billmaker' ||
+ item.attrcode == 'approver' ||
+ item.attrcode == 'pk_freecust' ||
+ item.attrcode == 'pk_transporttype'
+ ) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg').value
+ .firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_reqstordoc') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_reqstoorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_reqstoorg').value
+ .firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg').value
+ .firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ }
+ }
+ });
+ meta[AREA.head].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '21',
+ pkfield: 'pk_order'
+ });
+ });
+ meta[AREA.transferview].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '21',
+ pkfield: 'pk_order'
+ });
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return61/btnClick/index.js b/src/pu/pu/arrival/return61/btnClick/index.js
new file mode 100644
index 0000000..7118995
--- /dev/null
+++ b/src/pu/pu/arrival/return61/btnClick/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+
+export {searchBtnClick}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return61/btnClick/searchBtnClick.js b/src/pu/pu/arrival/return61/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..53a8109
--- /dev/null
+++ b/src/pu/pu/arrival/return61/btnClick/searchBtnClick.js
@@ -0,0 +1,72 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 查询按钮点击
+ * @Date: 2018-04-18 10:39:11
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-10 13:50:24
+ */
+import { ajax, base, toast } from 'nc-lightapp-front';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+const { NCMessage } = base;
+import { URL, COMMON, AREA, PAGECODE, TRANSFER } from '../../constance';
+//点击查询,获取查询区数据
+export default function() {
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea);
+ if (!searchVal) {
+ return;
+ }
+ let pageinfo = {
+ pageSize: 10,
+ pageIndex: 0
+ };
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, true);
+ let data = {
+ queryInfo: queryInfo,
+ // {
+ // querycondition: searchVal? searchVal : {logic: 'and'}, //查询条件
+ // pageInfo: pageinfo, //分页信息
+ // queryAreaCode: AREA.searchArea, //查询区编码
+ // oid: TRANSFER.subcontoid, //查询模板id,手工添加在界面模板json中,放在查询区,后期会修改
+ // querytype: 'tree'
+ // },
+ pageCode: PAGECODE.transferSubcontlist //页面编码
+ };
+
+ _this.searchVal = data;
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.queryReturnSubcont,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ _this.setState({ ntotalnum: 0 });
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ showNoQueryResultInfo(); /* 国际化处理: 查询成功*/
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ }
+ });
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return61/index.js b/src/pu/pu/arrival/return61/index.js
new file mode 100644
index 0000000..9b2fc27
--- /dev/null
+++ b/src/pu/pu/arrival/return61/index.js
@@ -0,0 +1,270 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick } from './btnClick';
+import { PAGECODE, AREA, COMMON, URL, BUTTONAREA } from '../constance';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { createCardTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo,
+ showRefreshInfo
+} from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+const { NCMessage } = base;
+
+class TransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(AREA.searchArea);
+ this.state = {
+ ntotalnum: 0,
+ templetid: '', //拉单模板ID
+ toggleViewStatus: false
+ };
+ this.searchVal;
+ // initTemplate.call(this);
+ initLang(this, [ '4004arrival' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+
+ // calTotal = (flag, record) => {
+ // let ntotalnum = this.state.ntotalnum;
+ // if (flag == true) {
+ // ntotalnum += (record.ncanarrivenum || {}).value || 0;
+ // } else {
+ // ntotalnum -= (record.ncanarrivenum || {}).value || 0;
+ // }
+ // this.setState({
+ // ntotalnum: ntotalnum
+ // });
+ // };
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let orgvalue = pk_org.value.firstvalue;
+ let arr = orgvalue.split(',').map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent('pk_stockorg', arr);
+ }
+ };
+
+ onAfterEvent(field, val) {
+ if (field == 'pk_stockorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [
+ 'pk_supplier',
+ 'pk_payterm',
+ 'pk_invcsupllier',
+ 'pk_order_b.pk_srcmaterial',
+ 'pk_order_b.casscustid',
+ 'pk_order_b.pk_material',
+ 'pk_order_b.pk_recvstordoc',
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20',
+ 'pk_order_b.vbdef1',
+ 'pk_order_b.vbdef2',
+ 'pk_order_b.vbdef3',
+ 'pk_order_b.vbdef4',
+ 'pk_order_b.vbdef5',
+ 'pk_order_b.vbdef6',
+ 'pk_order_b.vbdef7',
+ 'pk_order_b.vbdef8',
+ 'pk_order_b.vbdef9',
+ 'pk_order_b.vbdef10',
+ 'pk_order_b.vbdef11',
+ 'pk_order_b.vbdef12',
+ 'pk_order_b.vbdef13',
+ 'pk_order_b.vbdef14',
+ 'pk_order_b.vbdef15',
+ 'pk_order_b.vbdef16',
+ 'pk_order_b.vbdef17',
+ 'pk_order_b.vbdef18',
+ 'pk_order_b.vbdef19',
+ 'pk_order_b.vbdef20',
+ 'pk_order_b.vfree1',
+ 'pk_order_b.vfree2',
+ 'pk_order_b.vfree3',
+ 'pk_order_b.vfree4',
+ 'pk_order_b.vfree5',
+ 'pk_order_b.vfree6',
+ 'pk_order_b.vfree7',
+ 'pk_order_b.vfree8',
+ 'pk_order_b.vfree9',
+ 'pk_order_b.vfree10',
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_order_b.cprojectid'
+ ]);
+ } else if (field == 'pk_org') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'cemployeeid', 'pk_dept' ]);
+ }
+ }
+
+ handleClick() {}
+
+ refreash() {
+ let data = this.searchVal;
+ if (data == null || data == 'null') {
+ return;
+ }
+ let _this = this;
+ ajax({
+ url: URL.queryReturnSubcont,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ // showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ // showNoQueryResultInfo();
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ showRefreshInfo();
+ }
+ });
+ }
+
+ // react:界面渲染函数
+ render() {
+ const { transferTable, button, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createTransferTable, createTransferList, getTransformFormDisplay } = transferTable;
+ let selectedShow = transferTable.getSelectedListDisplay(AREA.head);
+ return (
+
+ {!selectedShow ? (
+
+
+ {/* {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ }}
+ /> */}
+ {createCardTitle(this, {
+ title: getLangByResId(this, '4004ARRIVAL-000054') /*国际化处理: 选择订单*/,
+ backBtnClick: () => {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ }
+ })}
+ {/* {getLangByResId(this, '4004ARRIVAL-000054')} */}
+ {/*
+
+
+ */}
+
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.listhead,
+ onButtonClick: this.refreash.bind(this)
+ })}
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+
+ {NCCreateSearch(AREA.searchArea, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })
+ //模块id
+ }
+
+
+ ) : (
+ ''
+ )}
+
+
+ {createTransferTable({
+ searchAreaCode: AREA.searchArea,
+ headTableId: AREA.head, //表格组件id
+ bodyTableId: AREA.body, //子表模板id
+ fullTableId: AREA.transferview, //主子拉平VO
+ //点击加号展开,设置表格数据
+ transferBtnText: getLangByResId(this, '4004ARRIVAL-000053'), //转单按钮显示文字/* 国际化处理: 生成退货单*/
+ containerSelector: '#transferList',
+ onTransferBtnClick: (ids) => {
+ this.props.pushTo(URL.card, { type: 'arrivalreturn61', pagecode: PAGECODE.card });
+ },
+ totalKey: [ 'ncanarrivenum' ],
+ totalTitle: [ getLangByResId(this, '4004ARRIVAL-000052') ],
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // //勾选的回调函数
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys);
+ // },
+ // onSelectedItemRemove: (record, bodys) => {
+ // this.calTotal(false, record, bodys);
+ // },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ },
+ dataSource: COMMON.arrivalReturn61CacheKey
+ })}
+
+
+ );
+ }
+}
+
+TransferTable = createPage({})(TransferTable);
+// ReactDOM.render(, document.querySelector('#app'));
+export default TransferTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return61/init/index.js b/src/pu/pu/arrival/return61/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/arrival/return61/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/return61/init/initTemplate.js b/src/pu/pu/arrival/return61/init/initTemplate.js
new file mode 100644
index 0000000..cef1ad6
--- /dev/null
+++ b/src/pu/pu/arrival/return61/init/initTemplate.js
@@ -0,0 +1,135 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单转单列表
+ * @Date: 2018-05-25 10:26:08
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-20 16:57:27
+ */
+import { PAGECODE, AREA, APPCODE } from '../../constance';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+export default function() {
+ let _this = this;
+ _this.props.createUIDom(
+ {
+ pagecode: PAGECODE.returnSubcont, //页面id
+ appcode: APPCODE.arrival //应用编码
+ //appid: TRANSFER.appid //注册按钮的id
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ let meta = data.template;
+ modifierMeta(_this.props, meta);
+ _this.props.meta.setMeta(meta);
+ }
+ if (data.button) {
+ let button = data.button;
+ _this.props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[AREA.body].items.map((item) => {
+ // item.width = 120;
+ return item;
+ });
+ meta[AREA.searchArea].items.map((item) => {
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == 'ctrantypeid') {
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API)
+ return {
+ parentbilltype: '61',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSIORG: pk_org.firstvalue
+ };
+ };
+ } else if (item.attrcode == 'pk_stockorg') {
+ //主组织过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode != 'pk_org' && item.attrcode != 'pk_stockorg') {
+ if (item.attrcode == 'cemployeeid') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ let dept =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_dept') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_dept').value.firstvalue
+ : null;
+ return { pk_org: data, pk_dept: dept, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (
+ item.attrcode == 'billmaker' ||
+ item.attrcode == 'approver' ||
+ item.attrcode == 'pk_freecust' ||
+ item.attrcode == 'pk_transporttype'
+ ) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg').value.firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg').value.firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ }
+ }
+ });
+ meta[AREA.head].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '61',
+ pkfield: 'pk_order'
+ });
+ });
+ meta[AREA.transferview].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '61',
+ pkfield: 'pk_order'
+ });
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer21/btnClick/index.js b/src/pu/pu/arrival/transfer21/btnClick/index.js
new file mode 100644
index 0000000..de8e5e3
--- /dev/null
+++ b/src/pu/pu/arrival/transfer21/btnClick/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+import scanBtnClick from './scanBtnClick';
+
+export { searchBtnClick, scanBtnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer21/btnClick/scanBtnClick.js b/src/pu/pu/arrival/transfer21/btnClick/scanBtnClick.js
new file mode 100644
index 0000000..317c1d3
--- /dev/null
+++ b/src/pu/pu/arrival/transfer21/btnClick/scanBtnClick.js
@@ -0,0 +1,64 @@
+/*iwEetgKaX0fudi3nP4PVZReFQrWJ0MmEn1OZOkmHsuI=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 扫码拉单查询
+ * @Date: 2018-04-18 10:39:11
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-10 13:50:40
+ */
+import { ajax, base, toast } from 'nc-lightapp-front';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+const { NCMessage } = base;
+import { URL, COMMON, AREA, PAGECODE, TRANSFER, APPCODE } from '../../constance';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+//点击查询,获取查询区数据
+export default function(value) {
+ let cbilltypecode = getDefData(COMMON.arrivalRefBillCachekey, 'cbilltypecode');
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, false);
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: PAGECODE.transferOrder, //页面编码
+ appcode: APPCODE.poorder, //应用编码
+ templetid: this.state.templetid, //模板id
+ userobj: { cbilltypecode: cbilltypecode, value: value }
+ };
+
+ clearTransferCache(this.props, COMMON.arrivalRef21CacheKey);
+
+ this.searchVal = data;
+ let _this = this;
+ //得到数据渲染到页面
+ ajax({
+ url: URL.queryOrderByPK,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ _this.setState({ ntotalnum: 0 });
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ showNoQueryResultInfo();
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ }
+ });
+}
+
+/*iwEetgKaX0fudi3nP4PVZReFQrWJ0MmEn1OZOkmHsuI=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer21/btnClick/searchBtnClick.js b/src/pu/pu/arrival/transfer21/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..d11ec0d
--- /dev/null
+++ b/src/pu/pu/arrival/transfer21/btnClick/searchBtnClick.js
@@ -0,0 +1,87 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 查询按钮点击
+ * @Date: 2018-04-18 10:39:11
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-10 13:50:51
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showQueryResultInfoForNoPage, showNoQueryResultInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { URL, COMMON, AREA, PAGECODE, APPCODE } from '../../constance';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache/cacheDataManager';
+import { showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+//点击查询,获取查询区数据
+export default function(isRefresh) {
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea);
+ if (!searchVal) {
+ return;
+ }
+ let cbilltypecode = getDefData(COMMON.arrivalRefBillCachekey, 'cbilltypecode');
+
+ let pageinfo = {
+ pageSize: 10,
+ pageIndex: 0
+ };
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, true);
+ let data = {
+ queryInfo: queryInfo,
+ // {
+ // querycondition: searchVal? searchVal : {logic: 'and'}, //查询条件
+ // pageInfo: pageinfo, //分页信息
+ // queryAreaCode: AREA.searchArea, //查询区编码
+ // oid: TRANSFER.oid, //查询模板id,手工添加在界面模板json中,放在查询区,后期会修改
+ // querytype: 'tree'
+ // },
+ // pageCode: PAGECODE.transferlist, //页面编码
+ pageCode: PAGECODE.transferOrder, //页面编码
+ appcode: APPCODE.poorder, //应用编码
+ templetid: this.state.templetid, //模板id
+ userobj: { cbilltypecode: cbilltypecode }
+ };
+
+ clearTransferCache(this.props, COMMON.arrivalRef21CacheKey);
+
+ this.searchVal = data;
+ let _this = this;
+ //得到数据渲染到页面
+ ajax({
+ url: URL.queryOrder,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ _this.setState({ ntotalnum: 0 });
+ _this.props.button.setButtonDisabled({
+ ['Refresh']: false
+ });
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ if (typeof isRefresh == 'boolean' && isRefresh) {
+ showRefreshInfo(); // 刷新成功
+ } else {
+ showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ }
+ } else {
+ if (typeof isRefresh == 'boolean' && isRefresh) {
+ showRefreshInfo(); // 刷新成功
+ } else {
+ showNoQueryResultInfo();
+ }
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ }
+ });
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer21/index.js b/src/pu/pu/arrival/transfer21/index.js
new file mode 100644
index 0000000..fd4dabb
--- /dev/null
+++ b/src/pu/pu/arrival/transfer21/index.js
@@ -0,0 +1,370 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick } from './btnClick';
+import { AREA, COMMON, URL, BUTTONAREA, PAGECODE } from '../constance';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+//import ScanCode from '../../../../uap/msgcenter/message/scanCodeView';
+import { showRefreshInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { createCardTitle, createListTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+
+const { NCToggleViewBtn, NCBackBtn, NCDiv, NCFormControl } = base;
+
+class TransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(AREA.searchArea);
+ this.state = {
+ ntotalnum: 0,
+ templetid: '', //拉单模板ID
+ isreceive: false,
+ scanValue: '',
+ toggleViewStatus: false
+ };
+ this.searchVal;
+ this.appc;
+ // initTemplate.call(this);
+ initLang(this, [ '4004arrival' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ // this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let orgvalue = pk_org.value.firstvalue;
+ let arr = orgvalue.split(',').map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent('pk_order_b.pk_arrvstoorg', arr);
+ }
+ };
+
+ onAfterEvent(field, val) {
+ if (field == 'pk_order_b.pk_arrvstoorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [
+ 'pk_supplier',
+ 'pk_payterm',
+ 'pk_invcsupllier',
+ 'pk_recvcustomer',
+ 'pk_order_b.pk_srcmaterial',
+ 'pk_order_b.casscustid',
+ 'pk_order_b.pk_material',
+ 'pk_order_b.pk_recvstordoc',
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20',
+ 'pk_order_b.vbdef1',
+ 'pk_order_b.vbdef2',
+ 'pk_order_b.vbdef3',
+ 'pk_order_b.vbdef4',
+ 'pk_order_b.vbdef5',
+ 'pk_order_b.vbdef6',
+ 'pk_order_b.vbdef7',
+ 'pk_order_b.vbdef8',
+ 'pk_order_b.vbdef9',
+ 'pk_order_b.vbdef10',
+ 'pk_order_b.vbdef11',
+ 'pk_order_b.vbdef12',
+ 'pk_order_b.vbdef13',
+ 'pk_order_b.vbdef14',
+ 'pk_order_b.vbdef15',
+ 'pk_order_b.vbdef16',
+ 'pk_order_b.vbdef17',
+ 'pk_order_b.vbdef18',
+ 'pk_order_b.vbdef19',
+ 'pk_order_b.vbdef20',
+ 'pk_order_b.vfree1',
+ 'pk_order_b.vfree2',
+ 'pk_order_b.vfree3',
+ 'pk_order_b.vfree4',
+ 'pk_order_b.vfree5',
+ 'pk_order_b.vfree6',
+ 'pk_order_b.vfree7',
+ 'pk_order_b.vfree8',
+ 'pk_order_b.vfree9',
+ 'pk_order_b.vfree10',
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_order_b.pk_recvstordoc',
+ 'pk_order_b.cprojectid'
+ ]);
+ } else if (field == 'pk_org') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'cemployeeid', 'pk_dept' ]);
+ } else if (field == 'pk_order_b.pk_reqstoorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'pk_order_b.pk_reqstordoc' ]);
+ }
+ }
+
+ clickBtn(props, id, text, record, index) {
+ switch (id) {
+ //刷新
+ case 'Refresh':
+ // this.refreash.call(this);
+ searchBtnClick.call(this, true);
+ break;
+ //扫码
+ case 'ScanTransfer':
+ this.scanTransfer.call(this);
+ break;
+ }
+ }
+ // scanTransfer() {
+ // this.props.modal.show('general', {
+ // title: getLangByResId(this, '4004ARRIVAL-000065') /* 国际化处理: 扫码枪直接扫描*/,
+ // size: 'lg',
+ // noFooter: true,
+ // content:
+ // });
+ // }
+ onScanTransferChange = (e) => {
+ this.setState({ scanValue: e });
+ };
+
+ onScanTransfer = (e) => {
+ let scanValue = this.state.scanValue;
+ this.setState({ scanValue: '' });
+ ajax({
+ url: URL.scanTrans,
+ data: scanValue,
+ success: (res) => {
+ if (res && res.data) {
+ let datas = [];
+ for (let i = 0; i < res.data.length; i++) {
+ let insertData = {
+ children: res.data[i].body.body.rows,
+ values: res.data[i].head.head.rows[0].values
+ };
+ datas[i] = insertData;
+ }
+
+ this.props.transferTable.insertTransferTableValue(
+ AREA.head,
+ AREA.body,
+ datas,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ // this.props.transferTable.insertTransferTableValue
+ }
+ }
+ });
+ };
+ // scanCodeSearchMessage = (value) => {
+ // if (value == null || value == '') {
+ // return;
+ // }
+ // //检查
+ // scanBtnClick.call(this, value);
+ // };
+ refreash() {
+ let data = this.searchVal;
+ if (data == null || data == 'null') {
+ return;
+ }
+ let _this = this;
+ ajax({
+ url: URL.queryOrder,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ // showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ // showNoQueryResultInfo();
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ showRefreshInfo();
+ }
+ });
+ }
+
+ getParam() {
+ if (this.isreceive == 'Y') {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ // react:界面渲染函数
+ render() {
+ const { transferTable, button, search, modal } = this.props;
+ const { NCCreateSearch } = search;
+ const { createModal } = modal;
+ const { createTransferTable, createTransferList, getTransformFormDisplay } = transferTable;
+ let totalstr = `${getLangByResId(this, '4004ARRIVAL-000057')}:`; /* 国际化处理: 本次收货主数量*/
+ let selectedShow = transferTable.getSelectedListDisplay(AREA.head);
+ return (
+
+ {!selectedShow ? (
+
+
+ {this.state.isreceive &&
+ createCardTitle(this, {
+ title: getLangByResId(this, '4004ARRIVAL-000054') /*国际化处理: 选择订单*/,
+ backBtnClick: () => {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ }
+ })}
+ {!this.state.isreceive &&
+ createListTitle(this, {
+ title: getLangByResId(this, '4004ARRIVAL-000054') /*国际化处理: 选择订单*/
+ })}
+ {/* {getLangByResId(this, '4004ARRIVAL-000054')} */}
+ {/*
+
+
+ */}
+
+ {
+
+ }
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.listhead,
+ onButtonClick: this.clickBtn.bind(this)
+ })}
+ {
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+
+ {NCCreateSearch(
+ AREA.searchArea,
+ {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ }
+ //模块id
+ )}
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ searchAreaCode: AREA.searchArea,
+ headTableId: AREA.head, //表格组件id
+ bodyTableId: AREA.body, //子表模板id
+ fullTableId: AREA.transferview, //主子拉平VO
+ //点击加号展开,设置表格数据
+ transferBtnText: getLangByResId(this, '4004ARRIVAL-000055'), //转单按钮显示文字/* 国际化处理: 生成到货单*/
+ containerSelector: '#transferList',
+ onTransferBtnClick: (ids) => {
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, false);
+ let isrece = this.state.isreceive;
+ let appparam = 'N';
+ if (isrece == true) {
+ appparam = 'Y';
+ }
+ let type = this.props.getUrlParam('type');
+ if (type == 'transfer21' || type == 'ref21') {
+ this.props.pushTo(URL.card, {
+ type: 'arrivaltransfer21',
+ transferoid: queryInfo.oid,
+ isreceive: appparam,
+ pagecode: PAGECODE.card
+ });
+ } else {
+ this.props.pushTo(URL.card, {
+ type: 'arrivaltransfer21',
+ transferoid: queryInfo.oid,
+ billtype: '23',
+ isreceive: appparam,
+ srcappcode: this.appc,
+ pagecode: PAGECODE.card
+ });
+ }
+ },
+ totalKey: [ 'ncanarrivenum' ],
+ totalTitle: [ getLangByResId(this, '4004ARRIVAL-000057') ],
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // //勾选的回调函数
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys);
+ // },
+ // onSelectedItemRemove: (record, bodys) => {
+ // this.calTotal(false, record, bodys);
+ // },
+ // selectArea: () => {
+ // return {totalstr + this.state.ntotalnum};
+ // },
+ // onClearAll: () => {
+ // this.setState({
+ // ntotalnum: 0
+ // });
+ // },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ },
+ dataSource: COMMON.arrivalRef21CacheKey
+ })}
+
+ {createModal('general')}
+
+ );
+ }
+}
+
+TransferTable = createPage(
+ {
+ // initTemplate: initTemplate
+ }
+)(TransferTable);
+// ReactDOM.render(, document.querySelector('#app'));
+export default TransferTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer21/init/index.js b/src/pu/pu/arrival/transfer21/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/arrival/transfer21/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer21/init/initTemplate.js b/src/pu/pu/arrival/transfer21/init/initTemplate.js
new file mode 100644
index 0000000..2a2230a
--- /dev/null
+++ b/src/pu/pu/arrival/transfer21/init/initTemplate.js
@@ -0,0 +1,211 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单转单列表
+ * @Date: 2018-05-25 10:26:08
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-20 16:57:46
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, AREA, APPCODE } from '../../constance';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+export default function() {
+ let _this = this;
+ _this.props.createUIDom(
+ {
+ appcode: APPCODE.poorder, //应用编码
+ pagecode: PAGECODE.transferOrder //页面id
+ //appid: TRANSFER.appid //注册按钮的id
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ let meta = data.template;
+ modifierMeta(_this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ setTimeout(() => {
+ let scene = _this.props.getUrlParam('scene');
+ if (scene) {
+ getWorkbenchData.call(_this, scene);
+ }
+ }, 0);
+ });
+ }
+ if (data.button) {
+ let button = data.button;
+ _this.props.button.setButtons(button);
+ }
+ getParam.call(_this);
+ }
+ }
+ );
+}
+
+function getParam() {
+ let appcode = this.props.getSearchParam('c');
+ this.appc = appcode;
+ let data = {
+ appcode: appcode,
+ paramname: 'ISRECEIVE'
+ };
+ let _this = this;
+ ajax({
+ url: URL.queryParam,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ if (res.data == 'Y') {
+ _this.props.button.setButtonDisabled({
+ ['Refresh']: true
+ });
+ _this.setState({ isreceive: false });
+ }
+ } else {
+ _this.setState({ isreceive: true });
+ }
+ }
+ });
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[AREA.body].items.map((item) => {
+ // item.width = 120;
+ return item;
+ });
+ meta[AREA.searchArea].items.map((item) => {
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == 'ctrantypeid') {
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API)
+ return {
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSIORG: pk_org.firstvalue
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_arrvstoorg') {
+ //主组织过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (
+ item.attrcode != 'pk_org' &&
+ item.attrcode != 'pk_order_b.pk_arrvstoorg' &&
+ item.attrcode != 'pk_order_b.pk_reqstoorg'
+ ) {
+ if (item.attrcode == 'cemployeeid') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (
+ item.attrcode == 'billmaker' ||
+ item.attrcode == 'approver' ||
+ item.attrcode == 'pk_freecust' ||
+ item.attrcode == 'pk_transporttype'
+ ) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg').value
+ .firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_reqstordoc') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_reqstoorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_reqstoorg').value
+ .firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_order_b.pk_arrvstoorg').value
+ .firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ }
+ }
+ });
+ meta[AREA.head].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '21',
+ pkfield: 'pk_order'
+ });
+ });
+ meta[AREA.transferview].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '21',
+ pkfield: 'pk_order'
+ });
+ });
+ return meta;
+}
+
+/**
+ * 小部件链接跳转过来是默认显示数据
+ * @param {*} scene
+ */
+function getWorkbenchData(scene) {
+ // 当来源是到货单拉采购订单指标卡小部件时默认加载数据
+ if (typeof scene == 'string' && scene == 'workbench') {
+ ajax({
+ url: URL.poorderToHandleArrive,
+ data: [],
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data && data.length > 0) {
+ this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ }
+ }
+ });
+ }
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer61/btnClick/index.js b/src/pu/pu/arrival/transfer61/btnClick/index.js
new file mode 100644
index 0000000..7118995
--- /dev/null
+++ b/src/pu/pu/arrival/transfer61/btnClick/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+
+export {searchBtnClick}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer61/btnClick/searchBtnClick.js b/src/pu/pu/arrival/transfer61/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..2a234ce
--- /dev/null
+++ b/src/pu/pu/arrival/transfer61/btnClick/searchBtnClick.js
@@ -0,0 +1,72 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 查询按钮点击
+ * @Date: 2018-04-18 10:39:11
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-10 13:51:11
+ */
+import { ajax, base, toast } from 'nc-lightapp-front';
+const { NCMessage } = base;
+import { URL, COMMON, AREA, PAGECODE, TRANSFER } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo
+} from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+//点击查询,获取查询区数据
+export default function() {
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea);
+ if (!searchVal) {
+ return;
+ }
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea, true);
+ let pageinfo = {
+ pageSize: 10,
+ pageIndex: 0
+ };
+ let _this = this;
+ let data = {
+ queryInfo: queryInfo,
+ // {
+ // querycondition: searchVal? searchVal : {logic: 'and'}, //查询条件
+ // pageInfo: pageinfo, //分页信息
+ // queryAreaCode: AREA.searchArea, //查询区编码
+ // oid: TRANSFER.subcontoid, //查询模板id,手工添加在界面模板json中,放在查询区,后期会修改
+ // querytype: 'tree'
+ // },
+ pageCode: PAGECODE.transferSubcont //页面编码
+ };
+
+ _this.searchVal = data;
+
+ //得到数据渲染到页面
+ ajax({
+ url: URL.querySubcont,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ _this.setState({ ntotalnum: 0 });
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ showNoQueryResultInfo();
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ }
+ });
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer61/index.js b/src/pu/pu/arrival/transfer61/index.js
new file mode 100644
index 0000000..ada545d
--- /dev/null
+++ b/src/pu/pu/arrival/transfer61/index.js
@@ -0,0 +1,291 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick } from './btnClick';
+import { PAGECODE, AREA, COMMON, URL, BUTTONAREA } from '../constance';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { createCardTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+
+import {
+ showSuccessInfo,
+ showQueryResultInfoForNoPage,
+ showNoQueryResultInfo,
+ showRefreshInfo
+} from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+const { NCMessage } = base;
+
+class TransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(AREA.searchArea);
+ this.state = {
+ ntotalnum: 0,
+ templetid: '', //拉单模板ID
+ toggleViewStatus: false
+ };
+ this.searchVal;
+ // initTemplate.call(this);
+ initLang(this, [ '4004arrival' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let orgvalue = pk_org.value.firstvalue;
+ let arr = orgvalue.split(',').map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent('pk_stockorg', arr);
+ }
+ };
+
+ onAfterEvent(field, val) {
+ if (field == 'pk_stockorg') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [
+ 'pk_supplier',
+ 'pk_payterm',
+ 'pk_invcsupllier',
+ 'pk_order_b.pk_srcmaterial',
+ 'pk_order_b.pk_material.pk_marbasclass',
+ 'pk_order_b.casscustid',
+ 'pk_order_b.pk_material',
+ 'pk_order_b.pk_recvstordoc',
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20',
+ 'pk_order_b.vbdef1',
+ 'pk_order_b.vbdef2',
+ 'pk_order_b.vbdef3',
+ 'pk_order_b.vbdef4',
+ 'pk_order_b.vbdef5',
+ 'pk_order_b.vbdef6',
+ 'pk_order_b.vbdef7',
+ 'pk_order_b.vbdef8',
+ 'pk_order_b.vbdef9',
+ 'pk_order_b.vbdef10',
+ 'pk_order_b.vbdef11',
+ 'pk_order_b.vbdef12',
+ 'pk_order_b.vbdef13',
+ 'pk_order_b.vbdef14',
+ 'pk_order_b.vbdef15',
+ 'pk_order_b.vbdef16',
+ 'pk_order_b.vbdef17',
+ 'pk_order_b.vbdef18',
+ 'pk_order_b.vbdef19',
+ 'pk_order_b.vbdef20',
+ 'pk_order_b.vfree1',
+ 'pk_order_b.vfree2',
+ 'pk_order_b.vfree3',
+ 'pk_order_b.vfree4',
+ 'pk_order_b.vfree5',
+ 'pk_order_b.vfree6',
+ 'pk_order_b.vfree7',
+ 'pk_order_b.vfree8',
+ 'pk_order_b.vfree9',
+ 'pk_order_b.vfree10',
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_order_b.cprojectid'
+ ]);
+ } else if (field == 'pk_org') {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [ 'cemployeeid', 'pk_dept' ]);
+ }
+ }
+
+ // calTotal = (flag, record, bodys) => {
+ // let ntotalnum = this.state.ntotalnum;
+ // if (flag == true) {
+ // if (bodys) {
+ // bodys.forEach((element) => {
+ // ntotalnum = sum(ntotalnum, element.ncanarrivenum.value);
+ // });
+ // } else {
+ // ntotalnum = sum(ntotalnum, record.ncanarrivenum.value);
+ // }
+ // // += (record.ncanarrivenum || {}).value || 0;
+ // } else {
+ // if (bodys) {
+ // bodys.forEach((element) => {
+ // ntotalnum = sum(ntotalnum, -element.ncanarrivenum.value);
+ // });
+ // } else {
+ // ntotalnum = sum(ntotalnum, -record.ncanarrivenum.value);
+ // }
+ // // ntotalnum -= (record.ncanarrivenum || {}).value || 0;
+ // }
+ // this.setState({
+ // ntotalnum: ntotalnum
+ // });
+ // };
+
+ refreash() {
+ let data = this.searchVal;
+ if (data == null || data == 'null') {
+ return;
+ }
+ let _this = this;
+ ajax({
+ url: URL.querySubcont,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ _this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ // showQueryResultInfoForNoPage(res.data.length); /* 国际化处理: 查询成功*/
+ } else {
+ // showNoQueryResultInfo();
+ _this.props.transferTable.setTransferTableValue(AREA.head, AREA.body, [], 'pk_order', 'pk_order_b');
+ }
+ showRefreshInfo();
+ }
+ });
+ }
+
+ // react:界面渲染函数
+ render() {
+ const { transferTable, button, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ let totalstr = `${getLangByResId(this, '4004ARRIVAL-000057')}:`; /* 国际化处理: 本次收货主数量*/
+ const { createTransferTable, createTransferList, getTransformFormDisplay } = transferTable;
+ let selectedShow = transferTable.getSelectedListDisplay(AREA.head);
+ return (
+
+ {!selectedShow ? (
+
+
+ {/* {
+ this.props.pushTo(URL.list, { PAGECODE: PAGECODE.head });
+ }}
+ /> */}
+ {createCardTitle(this, {
+ title: getLangByResId(this, '4004ARRIVAL-000054') /*国际化处理: 选择订单*/,
+ backBtnClick: () => {
+ this.props.pushTo(URL.list, { pagecode: PAGECODE.head });
+ }
+ })}
+ {/* {getLangByResId(this, '4004ARRIVAL-000054')} */}
+ {/*
+
+
+ */}
+
+ {this.props.button.createButtonApp({
+ area: BUTTONAREA.listhead,
+ onButtonClick: this.refreash.bind(this)
+ })}
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+
+ {NCCreateSearch(AREA.searchArea, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })
+ //模块id
+ }
+
+
+ ) : (
+ ''
+ )}
+
+
+ {createTransferTable({
+ searchAreaCode: AREA.searchArea,
+ headTableId: AREA.head, //表格组件id
+ bodyTableId: AREA.body, //子表模板id
+ fullTableId: AREA.transferview, //主子拉平VO
+ //点击加号展开,设置表格数据
+ transferBtnText: getLangByResId(this, '4004ARRIVAL-000055'), //转单按钮显示文字/* 国际化处理: 生成到货单*/
+ containerSelector: '#transferList',
+ onTransferBtnClick: (ids) => {
+ this.props.pushTo(URL.card, { type: 'arrivaltransfer61', pagecode: PAGECODE.card });
+ },
+ totalKey: [ 'ncanarrivenum' ],
+ totalTitle: [ getLangByResId(this, '4004ARRIVAL-000057') ],
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // //勾选的回调函数
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys);
+ // },
+ // onSelectedItemRemove: (record, bodys) => {
+ // this.calTotal(false, record, bodys);
+ // },
+ // selectArea: () => {
+ // return {totalstr + this.state.ntotalnum};
+ // },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[AREA.transferview]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.head);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ },
+ dataSource: COMMON.arrivalRef61CacheKey
+ })}
+
+
+ );
+ }
+}
+
+TransferTable = createPage(
+ {
+ // initTemplate: initTemplate
+ }
+)(TransferTable);
+// ReactDOM.render(, document.querySelector('#app'));
+export default TransferTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer61/init/index.js b/src/pu/pu/arrival/transfer61/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/arrival/transfer61/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/arrival/transfer61/init/initTemplate.js b/src/pu/pu/arrival/transfer61/init/initTemplate.js
new file mode 100644
index 0000000..cb4d8c6
--- /dev/null
+++ b/src/pu/pu/arrival/transfer61/init/initTemplate.js
@@ -0,0 +1,169 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: ligangt
+ * @PageInfo: 到货单转单列表
+ * @Date: 2018-05-25 10:26:08
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-20 16:58:03
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, AREA, APPCODE } from '../../constance';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+export default function() {
+ let _this = this;
+ _this.props.createUIDom(
+ {
+ pagecode: PAGECODE.transferSubcont, //页面id
+ appcode: APPCODE.arrival //应用编码
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ let meta = data.template;
+ modifierMeta(_this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ setTimeout(() => {
+ let scene = _this.props.getUrlParam('scene');
+ if (scene) {
+ getWorkbenchData.call(_this, scene);
+ }
+ }, 0);
+ });
+ }
+ if (data.button) {
+ let button = data.button;
+ _this.props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[AREA.body].items.map((item) => {
+ // item.width = 120;
+ return item;
+ });
+ meta[AREA.searchArea].items.map((item) => {
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (item.attrcode == 'ctrantypeid') {
+ item.queryCondition = () => {
+ let pk_org = (props.search.getSearchValByField(AREA.searchArea, 'pk_org') || {}).value; // 调用相应组件的取值API)
+ return {
+ parentbilltype: '61',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSIORG: pk_org.firstvalue
+ };
+ };
+ } else if (item.attrcode == 'pk_stockorg') {
+ //主组织过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode != 'pk_stockorg' && item.attrcode != 'pk_org') {
+ if (item.attrcode == 'cemployeeid') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ let dept =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_dept') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_dept').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_org') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_org').value.firstvalue
+ : null;
+ return { pk_org: data, busifuncode: 'pu' }; // 根据pk_org过滤
+ };
+ } else if (
+ item.attrcode == 'billmaker' ||
+ item.attrcode == 'approver' ||
+ item.attrcode == 'pk_freecust' ||
+ item.attrcode == 'pk_transporttype'
+ ) {
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg').value.firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ } else {
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data =
+ props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg') != null
+ ? props.search.getSearchValByField(AREA.searchArea, 'pk_stockorg').value.firstvalue
+ : null;
+ return {
+ pk_org: data
+ };
+ };
+ }
+ }
+ });
+ meta[AREA.head].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '61',
+ pkfield: 'pk_order'
+ });
+ });
+ meta[AREA.transferview].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '61',
+ pkfield: 'pk_order'
+ });
+ });
+ return meta;
+}
+
+/**
+ * 小部件链接跳转过来是默认显示数据
+ * @param {*} scene
+ */
+function getWorkbenchData(scene) {
+ // 当来源是到货单拉委外订单指标卡小部件 时默认加载数据
+ if (typeof scene == 'string' && scene == 'workbench') {
+ ajax({
+ url: URL.scorderToHandleArrive,
+ data: [],
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data && data.length > 0) {
+ this.props.transferTable.setTransferTableValue(
+ AREA.head,
+ AREA.body,
+ data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ }
+ }
+ });
+ }
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/buyingreq/siconst/index.js b/src/pu/pu/buyingreq/siconst/index.js
new file mode 100644
index 0000000..2a78d9e
--- /dev/null
+++ b/src/pu/pu/buyingreq/siconst/index.js
@@ -0,0 +1,31 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import {
+ BUYINGREQ_LIST,
+ BUYINGREQ_CARD,
+ ATTRCODE,
+ ATTRCODES,
+ BUYINGREQ_LIST_BUTTON,
+ BUYINGREQ_CARD_BUTTON,
+ FBILLSTATUS,
+ CLEARFIELDS,
+ clearItems,
+ BATCHITEMSNOFILTER,
+ FREEFIELD,
+ INTELLAREA
+} from './siconst';
+export {
+ BUYINGREQ_LIST,
+ BUYINGREQ_CARD,
+ ATTRCODE,
+ ATTRCODES,
+ BUYINGREQ_LIST_BUTTON,
+ BUYINGREQ_CARD_BUTTON,
+ FBILLSTATUS,
+ CLEARFIELDS,
+ clearItems,
+ BATCHITEMSNOFILTER,
+ FREEFIELD,
+ INTELLAREA
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/buyingreq/siconst/siconst.js b/src/pu/pu/buyingreq/siconst/siconst.js
new file mode 100644
index 0000000..0c22bc8
--- /dev/null
+++ b/src/pu/pu/buyingreq/siconst/siconst.js
@@ -0,0 +1,473 @@
+/*VBvoYusXgjgCCWxNw9um8OQe28Od129plUT87iz/Cys=*/
+/*
+ * @Author: zhangchangqing
+ * @PageInfo: 请购单
+ * @Date: 2018-04-19 10:28:28
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-11 14:30:54
+ */
+
+const BUYINGREQ_LIST = {
+ transferDataSource: 'pu.pu.buyingreq.transferDataSource', //缓存名称,转单和下游卡片页为一个缓存
+ dataSource: 'pu.pu.buyingreq.buyingreqDataSource', //缓存名称 列表和卡片公用一个
+ printURL: '/nccloud/pu/buyingreq/print.do', //请购单打印
+ priceprintURL: '/nccloud/pu/buyingreq/priceprint.do', //请购单价格论证表打印
+ queryTransferURL: '/nccloud/pu/buyingreq/queryTransferList.do', //查询物资需求申请单
+ openBillURL: '/nccloud/pu/buyingreq/openBill.do', //整单打开的地址
+ closeBillURL: '/nccloud/pu/buyingreq/closeBill.do', //整单关闭的地址
+ commitURL: '/nccloud/pu/buyingreq/commit.do', //提交地址
+ uncommitURL: '/nccloud/pu/buyingreq/uncommit.do', //收回
+ queryListURL: '/nccloud/pu/buyingreq/queryList.do', //查询列表地址
+ batchDeleteURL: '/nccloud/pu/buyingreq/batchDelete.do', //批量删除地址
+ deleteURL: '/nccloud/pu/buyingreq/delete.do', //删除地址
+ queryPageURL: '/nccloud/pu/buyingreq/queryPage.do', //分页查询地址
+ ntpLinkList: '/nccloud/pu/buyingreq/ntpLinkList.do', //单据联查采购计划到请购单的列表加载
+ id: 'id',
+ oid: '1001K61000000000N5TC', //查询模板id,手工添加在界面模板json中,放在查询区,后期会修改 1001K61000000000N5TC 1001K61000000000JOMN
+ ooid: '1001K61000000000JOMN', //查询物资需求申请单使用
+ listUrl: '/list',
+ cardUrl: '/card',
+ pk_storereq: 'pk_storereq', //物资需求申请单的表头pk
+ pk_storereq_b: 'pk_storereq_b', //物资需求申请单的表体pk
+ transferUrl: '/transfer',
+ transfer: 'transfer', //
+ grid: 'grid', //表格bodycode
+ formId: 'list_head', //表头区域
+ tableId: 'list_body', //表体区域
+ VIEW: 'VIEW', //拉单拉平取悦
+ tailinfo: 'tailinfo', //操作信息
+ status: 'status',
+ purchaseorg: 'pu', // 采购 业务场景
+ storereq: 'st', // 库存 业务场景
+ appcode: '400400000', //物资需求申请单的应用编码
+ appcode20: '400400400', //请购单的应用编码
+ cardpageid: '400400400_card', //卡片pagecode
+ listpageid: '400400400_list', //列表pagecode
+ transferList: '400400000_422Xto20', //请购单拉单查询列表 400400000_422Xto20 400400000_transfer
+ transferCard: '', //
+ appid: '0001Z810000000039R8O', //注册小应用
+ transferAppid: '0001Z81000000002YS6G', //注册小应用
+ moduleId: '4004', //模块id
+ browse: 'browse', //状态
+ add: 'add', //状态
+ tree: 'tree', //查询模式
+ simple: 'simple', //查询模式
+ searchId: 'list_query',
+ edit: 'edit',
+ // 列表态页签,单据状态
+ toCommit: 'toCommit', // 待提交
+ approving: 'approving', //审批中
+ executing: 'executing', //执行中
+ all: 'all', //全部
+ templetqueryurl: '/nccloud/platform/templet/querypage.do',
+ // firstcontent: getLangByResId(this, '4004PRAYBILL-000042'),/* 国际化处理: 首页*/
+ // firstcontent: getLangByResId(this, '4004PRAYBILL-000043'),/* 国际化处理: 请购单管理*/
+ // firstcontent: getLangByResId(this, '4004PRAYBILL-000044'),/* 国际化处理: 物资需求申请*/
+ pk_org: 'pk_org',
+ billType: '20', //请购单的单据类型
+ outputType: 'output', //打印输出类型
+ pk_appdept: 'pk_buyingreq_b.pk_appdept', //部门
+ pk_apppsn: 'pk_buyingreq_b.pk_apppsn', //人员
+ pk_reqstordoc: 'pk_buyingreq_b.pk_reqstordoc', //需求仓库
+ vbillcode: 'vbillcode', //单据号码
+ exportset: '/nccloud/pu/buyingreq/exportset.do', //导出模板设置
+ import: '/nccloud/pu/buyingreq/import.do', //导入
+ scene: 'scene',
+ approvesce: 'approvesce'
+};
+//单据状态
+const FBILLSTATUS = {
+ free: '0', //单据状态 自由
+ commit: '1', //提交
+ approve: '2', //审批中
+ approved: '3', //审批
+ unapproved: '4', //审批不通过
+ other: '5' //关闭
+};
+//列表按钮
+const BUYINGREQ_LIST_BUTTON = {
+ Refresh: 'Refresh', //刷新
+ StorereqBtn: 'StorereqBtn', //拉单-物资需求申请单
+ ApproveInfo: 'ApproveInfo', //查看审批意见
+ add: 'Add', //新增
+ delete: 'Delete', //删除
+ deleteRow: 'Delete', //删除-行
+ Edit: 'Edit', //修改
+ copy: 'Copy', //复制
+ File: 'File', //附件管理
+ FileBatch: 'FileBatch', //附件批量下载
+ Print: 'Print', //打印
+ Print_list: 'Print_list', //打印清单
+ output: 'output', //输出
+ commit: 'Commit', //提交
+ commitRow: 'Commit', //提交-行
+ uncommit: 'UnCommit', //收回
+ OpenBill: 'OpenBill', //整单打开
+ CloseBill: 'CloseBill', //整单关闭
+ list_inner: 'list_inner', //列表行按钮区域
+ QueryAboutBusiness: 'QueryAboutBusiness', //单据追溯
+ Import: 'Import', //导入
+ Export: 'Export', //导出
+ PrintCountQuery: 'PrintCountQuery' //打印次数查询
+};
+const BUYINGREQ_CARD = {
+ card: 'card', //一主一子 billtype
+ //推单
+ sotoPraybillURL: '/nccloud/pu/buyingreq/sotoPraybillqueryaction.do', // 销售请购单
+ reqstordocURL: 'nccloud.web.pu.buyingreq.util.ReqstordocSqlBuilder', //需求仓库过滤
+ materialURL: 'nccloud.web.pu.buyingreq.util.MaterialSqlBuilder', //物料过滤
+ headBeforeEventURL: '/nccloud/pu/buyingreq/headBeforeEdit.do', //表头编辑前事件
+ bodyBeforeEventURL: '/nccloud/pu/buyingreq/bodyBeforeEdit.do', //表体编辑前事件
+ commitURL: '/nccloud/pu/buyingreq/commit.do', //提交地址
+ querypriceURL: '/nccloud/pu/buyingreq/queryprice.do', //查询价格论证表
+ saveCommitURL: '/nccloud/pu/buyingreq/saveCommit.do', //保存提交
+ uncommitURL: '/nccloud/pu/buyingreq/uncommit.do', //收回地址
+ transferURL: '/nccloud/pu/buyingreq/transferAction.do', //根据选中的物资需求申请单生成请购单
+ openBillForCardURL: '/nccloud/pu/buyingreq/openBillForCard.do', //整单打开的地址
+ closeBillForCardURL: '/nccloud/pu/buyingreq/closeBillForCard.do', //整单关闭的地址
+ orgChangEventURL: '/nccloud/pu/buyingreq/orgChangEvent.do', //主组织编辑事件
+ deleteURL: '/nccloud/pu/buyingreq/delete.do', //删除地址
+ saveURL: '/nccloud/pu/buyingreq/save.do', //修改保存
+ newSaveURL: '/nccloud/pu/buyingreq/newSave.do', //新增保存
+ lineCloseURL: '/nccloud/pu/buyingreq/lineClose.do', //行关闭
+ lineOpenURL: '/nccloud/pu/buyingreq/lineOpen.do', //行打开
+ copyCardInfoURL: '/nccloud/pu/buyingreq/copy.do', //复制新增
+ queryCardInfoURL: '/nccloud/pu/buyingreq/queryCardInfo.do', //查询卡片信息
+ editCardInfoURL: '/nccloud/pu/buyingreq/edit.do', //修改查询卡片信息pu.buyingreq.edit
+ numbAfterEditURL: '/nccloud/pu/buyingreq/numbAfterEdit.do', //联动计算请求地址
+ bodyAfterEditURL: '/nccloud/pu/buyingreq/bodyAfterEdit.do', //表体编辑后请求地址
+ headAfterEditURL: '/nccloud/pu/buyingreq/headAfterEdit.do', //表头编辑后请求地址
+ combine: '/nccloud/pu/buyingreq/combineshowaction.do', //合并显示
+ combintPrint: '/nccloud/pu/buyingreq/combineprintaction.do', //合并打印
+ saveandcommit: '/nccloud/pu/buyingreq/saveandcommit.do', //保存提交
+ linpayplay: '/nccloud/pu/buyingreq/linpayplay.do', //联查采购计划,
+ id: 'id',
+ orgChange: 'orgChange', //组织修改的弹出框定义
+ ts: 'ts',
+ copy: 'copy',
+ comeType: 'comeType',
+ oid: '0001Z810000000039R8O',
+ approveoid: '0001Z81000000004X97S', //请购单审批的oid
+ transferid: '1001K610000000017L9J', //请购单拉物资需求申请单
+ purchaseorg: 'pu', // 采购 业务场景
+ storereq: 'st', // 库存 业务场景
+ listUrl: '/list',
+ cardUrl: '/card',
+ formId: 'card_head', //表头区域
+ tableId: 'card_body', //表体区域
+ childform1: 'childform1', //侧拉区域
+ price_form: 'price_form', //价格论证表区域
+ leftarea: 'leftarea', //左侧的列表区域
+ tailinfo: 'tailinfo', //操作信息
+ status: 'status',
+ type: 'type', //用来判断是否是从转单页面进入
+ transfer: 'transfer', //
+ cardpageid: '400400400_card', //卡片pagecode
+ listpageid: '400400400_list', //列表pagecode
+ pricePage: '400400400_price', //价格论证表
+ pageid: 'pageid', //模板id
+ moduleId: '4004', //模块id
+ browse: 'browse', //状态
+ add: 'add', //状态
+ searchId: 'list_query',
+ edit: 'edit',
+ // 列表态页签,单据状态
+ toCommit: 'toCommit', // 待提交
+ approving: 'approving', //审批中
+ executing: 'executing', //执行中
+ all: 'all', //全部
+ templetqueryurl: '/nccloud/platform/templet/querypage.do',
+ // firstcontent: getLangByResId(this, '4004PRAYBILL-000042'),/* 国际化处理: 首页*/
+ // firstcontent: getLangByResId(this, '4004PRAYBILL-000043'),/* 国际化处理: 请购单管理*/
+ // firstcontent: getLangByResId(this, '4004PRAYBILL-000044'),/* 国际化处理: 物资需求申请*/
+ pk_org: 'pk_org', //库存组织
+ pk_org_v: 'pk_org_v', //库存组织版本
+ billType: '20', //请购单的单据类型
+ billTypeOrder: '21', //采购订单类型
+ replenishmentarrange: 'replenishmentarrange', //推单
+ directarrange: 'directarrange', //推单
+ channelTypeDataSource1: 'scm.so.replenishmentarrange.main', //直运的缓存id
+ channelTypeDataSource2: 'scm.so.directarrange.main', //补货的缓存id
+ channelTypeDataSource3: 'scm.so.directarrange.main', //维修计划缓存
+ channelType: 'channelType', //推单
+ srcbilltype: 'srcbilltype', //维修计划推单
+ srcbilltype4B32: '4B32', //维修计划单据类型
+ srcbilltype4B36: '4B36', //资产工单单据类型
+ tempstatus: 'tempstatus', //暂存标志
+ tempCardCacheKey: 'pu.pu.buyingreq.tempCardCacheKey', //暂存缓存标识
+ config: {
+ headAreaId: 'card_head',
+ bodyAreaId: 'card_body',
+ bodyPKfield: 'pk_praybill_b'
+ },
+ bodyFileds: [
+ 'pk_purchaseorg',
+ 'pk_srcmaterial',
+ 'pk_material',
+ 'cordertrantypecode',
+ 'cprojectid',
+ 'dbilldate',
+ 'pk_suggestsupplier',
+ 'pk_suggestsupplier_v',
+ 'dsuggestdate',
+ 'nnum',
+ 'nastnum',
+ 'ntaxmny',
+ 'ntaxprice'
+ ]
+};
+
+// 标准单据区域字段
+const INTELLAREA = {
+ // 业务助手
+ INTELLAREA: 'smartCard',
+ // 现存量组件外层
+ WALLET_ATP: 'wallet_atp',
+ // 现存量组件
+ ATP: 'atp'
+};
+//卡片按钮
+const BUYINGREQ_CARD_BUTTON = {
+ Import: 'Import', //导入
+ Export: 'Export', //导出
+ Group1: 'Group1', //新增页按钮组
+ Group2: 'Group2', //新增肩上按钮组
+ Group3: 'Group3', //自由态单据浏览态按钮组
+ Group7: 'Group7', //整单打开和关闭的分组
+ Save: 'Save', //保存
+ SaveCommit: 'SaveCommit', //保存提交
+ Cancel: 'Cancel', //取消
+ AddLine: 'AddLine', //新增肩上增行
+ DeleteLine: 'DeleteLine', //新增肩上删行
+ CopyLine: 'CopyLine', //新增肩上复制行
+ OnhandQuery: 'OnhandQuery', //新增肩上存量查拣
+ LinkPoPlan: 'LinkPoPlan', //联查采购计划
+ BatchUpdate: 'BatchUpdate', //新增肩上批改
+ EditRowNum: 'EditRowNum', //新增肩上重排行号
+ StorereqBtn: 'StorereqBtn', //请购单拉单
+ CancelTransfer: 'CancelTransfer', //退出转单
+ Adds: 'Adds',
+ Add: 'Add',
+ Edit: 'Edit',
+ Delete: 'Delete',
+ Copy: 'Copy',
+ Commit: 'Commit',
+ More: 'More', //联查
+ Refresh: 'Refresh', //刷新
+ Price: 'Price', //价格论证表
+ QueryAboutBusiness: 'QueryAboutBusiness', //更多里的单据追溯
+ File: 'File', //更多里的附件管理
+ Print: 'Print', //更多里的打印
+ PrintCountQuery: 'PrintCountQuery', //打印次数查询
+ output: 'output', //输出
+ mergeShow: 'mergeShow', //合并显示
+ UnCommit: 'UnCommit', //收回
+ ApproveInfo: 'ApproveInfo', //查看审批意见
+ AssistMenu: 'AssistMenu', //辅助功能下拉按钮
+ CloseBill: 'CloseBill', //整单关闭
+ OpenBill: 'OpenBill', //整单打开
+ OpenRow: 'OpenRow', //展开通用
+ CloseRow: 'CloseRow', //收起
+ OpenRowBrowse: 'OpenRowBrowse', //行操作-展开-浏览态
+ OpenRowEdit: 'OpenRowEdit', //行操作-展开-编辑,新增
+ Delete_row: 'DeleteLine', //行操作-删行
+ CopyLine_row: 'CopyLine_row', //行操作-复制行
+ InsertLine: 'InsertLine', //行操作-插入行
+ LineOpen: 'LineOpen', //行打开
+ LineClose: 'LineClose', //行关闭
+ Material_PastLast: 'Material_PastLast', //新增肩上粘贴按钮组
+ PasteLast: 'PasteLast', //粘贴至末行
+ PasteCancel: 'PasteCancel', //新增肩上复制取消
+ PasteThis: 'PasteThis', //粘贴至此
+ card_body_inner: 'card_body_inner', //行操作-area 按钮显示区域名称
+ TemporaryStorage: 'TemporaryStorage', //暂存
+ ShowDraft: 'ShowDraft', //草稿
+ cardBodyInit: [
+ 'Group2',
+ 'AddLine',
+ 'DeleteLine',
+ 'CopyLine',
+ 'OnhandQuery',
+ // 'LinkPoPlan',
+ 'EditRowNum',
+ 'OpenRow',
+ 'DeleteLine',
+ 'CopyLine_row',
+ 'InsertLine'
+ ],
+ cardBodyCopy: [ 'Material_PastLast', 'PasteLast', 'PasteCancel', 'PasteThis' ],
+ shoudlerBtns: [ 'DeleteLine', 'CopyLine', 'OnhandQuery', 'EditRowNum', 'LinkPoPlan' ]
+};
+//表头
+const ATTRCODE = {
+ ts: 'ts',
+ vtrantypecode: 'vtrantypecode', //单据类型编码
+ pk_praybill: 'pk_praybill', //请购单表头主键
+ pk_srcpraybill: 'pk_srcpraybill',
+ pk_org_v: 'pk_org_v',
+ pk_org: 'pk_org', //组织最新版本
+ dbilldate: 'dbilldate', //申请日期
+ pk_apppsnh: 'pk_apppsnh', //表头申请人
+ pk_appdepth_v: 'pk_appdepth_v', //表头申请部门
+ pk_appdepth: 'pk_appdepth', //表头申请部门最新版本
+ ctrantypeid: 'ctrantypeid', //表头请购类型
+ fbillstatus: 'fbillstatus', //单据状态
+ modifystatus: 'modifystatus', //变更状态
+ freqtypeflag: 'freqtypeflag', //需求类型
+ pk_plandept_v: 'pk_plandept_v', //计划部门版本
+ pk_plandept: 'pk_plandept', //计划部门
+ pk_planpsn: 'pk_planpsn', //计划员
+ chprojectid: 'chprojectid', //项目
+ vbillcode: 'vbillcode', //单据号
+ bdirecttransit: 'bdirecttransit', //直运
+ bispositioninv: 'bispositioninv', //按计划岗过滤物料
+ vmemo: 'vmemo', //备注
+ bsctype: 'bsctype', //委外
+ otherfields: [ 'pk_org' ],
+ sagaStatus: 'saga_status',
+ saga_gtxid: 'saga_gtxid'
+};
+//表体
+const ATTRCODES = {
+ ts: 'ts',
+ bpublishtoec: 'bpublishtoec', //发布到电子商务
+ nquotebill: 'nquotebill', //生成询报价单次数
+ npriceauditbill: 'npriceauditbill', //生成价格审批单次数
+ ngenct: 'ngenct', //生成合同次数
+ naccumulatenum: 'naccumulatenum', //累计订货数量
+ browclose: 'browclose', //行关闭
+ vclosereason: 'vclosereason', //关闭/打开原因
+ vcloseperson: 'vcloseperson', //关闭/打开人
+ vclosetime: 'vclosetime', //关闭/打开时间
+ crowno: 'crowno', //行号
+ nastnum: 'nastnum', //数量
+ nnum: 'nnum', //主数量
+ pk_purchaseorg_v: 'pk_purchaseorg_v', //采购组织版本
+ pk_purchaseorg: 'pk_purchaseorg', //采购组织
+ pk_employee: 'pk_employee', //采购员
+ bcanpurchaseorgedit: 'bcanpurchaseorgedit', //采购组织可编辑
+ dreqdate: 'dreqdate', //需求日期
+ dsuggestdate: 'dsuggestdate', //建议订货日期
+ pk_suggestsupplier: 'pk_suggestsupplier', //建议供应商
+ pk_suggestsupplier_v: 'pk_suggestsupplier_v', //建议供应商版本
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ pk_reqstor: 'pk_reqstor', //需求仓库
+ pk_reqdept: 'pk_praybill_b.pk_reqdept', //需求部门
+ dbilldate: 'dbilldate', //需求日期
+ pk_appdept_v: 'pk_appdept_v', //申请部门
+ pk_material: 'pk_material', //物料编码
+ cprojectid: 'cprojectid', //项目
+ cprojecttaskid: 'cprojecttaskid', //项目任务
+ vbatchcode: 'vbatchcode', //批次号
+ pk_batchcode: 'pk_batchcode', //批次档案
+ vchangerate: 'vchangerate', //换算率
+ cordertrantypecode: 'cordertrantypecode', //订单类型
+ ntaxmny: 'ntaxmny', //本币价税合计
+ ntaxprice: 'ntaxprice', //主本币含税单价
+ csourcetypecode: 'csourcetypecode', //来源单据类型
+ csourceid: 'csourceid', //来源单据标识
+ csourcebid: 'csourcebid', //来源单据表体行id
+ pk_org_v: 'pk_org_v',
+ // 发布到电子商务 采购组织可编辑 是否固定换算率 行关闭 主计量单位 集团 库存组织 请购单主键 请购单行id 累计订货数量 生成合同次数 生成价格审批单次数 生成询报价单次数 来源单据分录标识 来源单据标识 来源单据类型 来源单据行号 来源交易类型 源头单据分录标识 源头单据标识 源头单据类型 源头单据号 源头单据行号 源头单据类型 已安排
+ otherfields: [
+ 'bpublishtoec',
+ 'bcanpurchaseorgedit',
+ 'bfixedrate',
+ 'browclose',
+ 'cunitid',
+ 'pk_group',
+ 'pk_org',
+ 'pk_praybill',
+ 'pk_praybill_b',
+ 'naccumulatenum',
+ 'ngenct',
+ 'npriceauditbill',
+ 'nquotebill',
+ 'csourcebid',
+ 'csourcetypecode',
+ 'vsourcecode',
+ 'vsourcerowno',
+ 'vsrctrantypecode',
+ 'cfirstbid',
+ 'cfirstid',
+ 'cfirsttypecode',
+ 'vfirstcode',
+ 'vfirstrowno',
+ 'vfirsttrantype',
+ 'bisarrange'
+ ],
+ dreqdate: 'dreqdate'
+};
+let CLEARFIELDS = [
+ 'crowno', //行号
+ 'nnum'
+];
+
+let BATCHITEMSNOFILTER = [
+ 'nastnum',
+ 'nnum',
+ 'ntaxmny',
+ 'dreqdate', //需求日期
+ 'dsuggestdate' //建议订货日期
+];
+
+//物料编辑后要清空的字段
+let clearItems = [
+ 'pk_srcmaterial', //物料信息
+ 'pk_material.name', //物料名称
+ 'pk_material.materialspec', //规格
+ 'pk_material.materialtype', //型号
+ 'cprojectid', //项目
+ 'pk_purchaseorg', //采购组织
+ 'pk_purchaseorg_v', //采购组织版本
+ 'pk_suggestsupplier', //建议供应商
+ 'pk_suggestsupplier_v', //建议供应商版本
+ 'cunitid', //主单位
+ 'castunitid', //单位
+ 'vchangerate', //换算率
+ 'bfixedrate', //是否固定换算率
+ 'pk_employee', //采购员
+ 'dreqdate', //需求日期
+ 'dsuggestdate', //建议订货日期
+ 'ccurrencyid', //本币币种
+ 'ntaxprice', //主本币含税单价
+ 'vbatchcode', //批次号
+ 'pk_batchcode', //批次号主键
+ 'vfree1',
+ 'vfree2',
+ 'vfree3',
+ 'vfree4',
+ 'vfree5',
+ 'vfree6',
+ 'vfree7',
+ 'vfree8',
+ 'vfree9',
+ 'vfreee10',
+ 'cffileid'
+];
+/**
+ * 自由辅助属性
+ */
+const FREEFIELD = {
+ ccustomerid: 'casscustid',
+ ccustomervid: 'casscustvid',
+ cvendorid: 'pk_suggestsupplier',
+ cvendorvid: 'pk_suggestsupplier_v'
+};
+export {
+ BUYINGREQ_LIST,
+ BUYINGREQ_CARD,
+ ATTRCODE,
+ ATTRCODES,
+ BUYINGREQ_LIST_BUTTON,
+ BUYINGREQ_CARD_BUTTON,
+ FBILLSTATUS,
+ CLEARFIELDS,
+ clearItems,
+ BATCHITEMSNOFILTER,
+ FREEFIELD,
+ INTELLAREA
+};
+
+/*VBvoYusXgjgCCWxNw9um8OQe28Od129plUT87iz/Cys=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/constance/index.js b/src/pu/pu/initialest/constance/index.js
new file mode 100644
index 0000000..ccc8bda
--- /dev/null
+++ b/src/pu/pu/initialest/constance/index.js
@@ -0,0 +1,478 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 常量定义
+ * @Date: 2018-04-28 16:05:16
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-10-24 11:19:39
+ */
+const URL = {
+ gotoTransfer: '/transfer', //跳转到转单界面
+ gotoCard: '/pu/pu/initialest/card/index.html', //跳转到卡片态
+ gotoList: '/pu/pu/initialest/list/index.html', // 跳转到列表态
+ cardQuery: '/nccloud/pu/initialest/cardquery.do', //卡片态查询
+ listQuery: '/nccloud/pu/initialest/listquery.do', //列表态查询
+ cardSave: '/nccloud/pu/initialest/cardsave.do', //卡片保存
+ cardUpadate: '/nccloud/pu/initialest/cardupdate.do', //卡片更新
+ queryPage: '/nccloud/pu/initialest/querypage.do', //分页查询
+ query: '/nccloud/pu/initialest/query.do', //列表界面查询
+ cardinsert: '/nccloud/pu/initialest/insert/do', //卡片态新增链接
+ orgRef: '/nccloud/pu/initialestcard/orgsRef.do', //采购组织参照
+ getCard: '/nccloud/pu/initialestcard/query.do', //卡片态数据查询
+ delete: '/nccloud/pu/initialest/delete.do', //删除
+ save: '/nccloud/pu/initialest/save.do', //保存
+ headAfterEdit: '/nccloud/pu/initialest/headafter.do', //表头编辑后事件
+ bodyAfterEdit: '/nccloud/pu/initialest/bodyafter.do', //表头编辑后事件
+ orgafter: '/nccloud/pu/initialest/orgafter.do', //主组织编辑后事件
+ approve: '/nccloud/pu/initialest/approve.do', //审批
+ unapprove: '/nccloud/pu/initialest/unapprove.do', //取消审批
+ copy: '/nccloud/pu/initialest/copy.do', //复制
+ queryOrder: '/nccloud/pu/initialest/queryOrder.do', //拉单采购订单查询
+ transferOrder: '/nccloud/pu/initialest/transferOrder.do', //转单
+ queryAddTab: '/nccloud/pu/initialest/queryAddTab.do', //查询业务流信息
+ print: '/nccloud/pu/initialest/print.do', //打印
+ import: '/nccloud/pu/initialest/import.do', //导入
+ extrefsqlbuilder: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils', //交易类型参照过滤
+ materialsqlbuilder: 'nccloud.web.pu.initialest.util.MaterialSqlBuilder', //物料编辑前事件过滤
+ castunitidSqlBuilder: 'nccloud.web.pu.initialest.util.CastunitidSqlBuilder', //单位过滤
+ ctaxcodeidSqlBuilder: 'nccloud.web.pu.initialest.util.CtaxcodeidSqlBuilder', //税码过滤
+ beforeEdit: '/nccloud/pu/initialest/before.do', //编辑前事件处理
+ cardurl: '/card', //新交互跳转
+ listurl: '/list', //新交互列表跳转
+ org_permissions: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter', //主组织权限
+ orgv_permissions: 'nccloud.web.scmpub.ref.AppPermissionOrgVidRefFilter', //主组织vid权限
+ fixRate: '/nccloud/pu/initialest/vchange.do', //汇率设置
+ exportset: '/nccloud/pu/initialest/exportset.do', //导出模板设置
+ sagascheck: '/nccloud/pu/initialest/initialestsagascheck.do' // sagas事务校验
+};
+/**
+ * 操作类型
+ */
+const ACTIONNAME = {
+ write: 'WRITE', //保存
+ delete: 'DELETE', //删除
+ sign: 'SIGN', //签字
+ cancelsign: 'CANCELSIGN' //取消签字
+};
+/**
+ * 界面状态
+ */
+const UISTATE = {
+ edit: 'edit', // 编辑态
+ browse: 'browse', // 浏览态
+ add: 'add', //新增态
+ transfer: 'transfer', //转单
+ Copy: 'Copy' //复制
+};
+/**
+ * 页签code
+ */
+const TABCODE = {
+ process: 0, //处理中
+ total: 1 //总数
+};
+// 区域ID
+const AREA = {
+ searchArea: 'searchArea',
+ listSearchArea: 'list_query', //列表态搜索区域
+ listTableArea: 'list_head', //列表态表格区域
+ cardFormArea: 'card_head', //卡片态from区域
+ cardTableArea: 'card_body', //卡片态表格区域
+ modalArea: 'modal', //modal区域
+ list_inner: 'list_inner', //列表态行内区域
+ leftarea: 'leftarea', //左边区域
+ card_body_inner: 'card_body_inner', //卡片态行内区域
+ VIEW: 'view' //拉单拉平取悦
+};
+/**
+ * 字段
+ */
+const ATTRCODES = {
+ crowno: 'crowno'
+};
+/**
+ * 小应用ID
+ */
+const TRANSFER = {
+ //oid: "1005Z8100000000132CC",
+ oid: '1001K61000000001GN64',
+ appid: '0001Z810000000034RGJ',
+ view: 'view'
+};
+//页面编码
+const PAGECODE = {
+ poorder: '400400800', //采购订单
+ dbilldateVal: '',
+ searchId: 'list_query', //查询区编码
+ oid: '0001Z81000000006TH8H',
+ // oid: "1001AA10000000013RCB",
+ appcode: '400402800', //小应用编码
+ appid: '0001Z810000000034RGJ',
+ tableId: 'list_head', //列表的table区
+ listpagecode: '400402800_list',
+ list: '400402800_list', // 列表界面编码
+ cardpagecode: '400402800_card', //卡片界面编码
+ cardhead: 'card_head', //卡片态from区
+ cardbody: 'card_body', //卡片态table区
+ childform1: 'childform1',
+ childform2: 'childform2',
+ childform3: 'childform3', //卡片态操作信息
+ queryType: 'simple',
+ billType: '4T', //期初暂估类型
+ pageInfo: {
+ //分页信息
+ pageIndex: 0,
+ pageSize: 10
+ },
+ transferlist: '400400800_21to4T', //转单页面code
+ transfercard: '400402800_transfer' //转单页面code
+};
+const FBILLSTATUS = {
+ free: '0', //自由态
+ approved: '3' //审批通过
+};
+
+const FIELD = {
+ default: [
+ {
+ field: 'dr',
+ value: { firstvalue: '0' },
+ oprtype: '\u003d'
+ }
+ ],
+ operation: 'operation', //操作列
+ pk_initialest: 'pk_initialest',
+ pk_org_v: 'pk_org_v', //组织参照
+ formArea: 'card_head', // 卡片态form表单区
+ cardTable: 'card_body', //卡片态表格区
+ searchArea: 'list_query', // search搜索区
+ tableArea: 'list_head', // table表格区
+ all: 'all', //页签全部
+ free: 'free', //页签处理中
+ fbillstatus: 'billStatus', //单据状态
+ ts: 'ts', //时间戳
+ cardId: 'id', //列表态跳转卡片态,主键请求参数
+ cardStatus: 'status', //列表态跳转卡片态,主键请求参数
+ transfer: 'transfer', //转单
+ output: 'output', //输出
+ pk_order: 'pk_order', //采购订单表头
+ pk_order_b: 'pk_order_b', //采购订单表体
+ pu: 'pu', //pu模块
+ st: 'st', //库存模块
+ attachpk_initialest: 'attachpk_initialest', //附件管理主键
+ showUploader: 'showUploader', //附件管理位置主键
+ target: 'target', //目标位置
+ freeNum: 'freeNum', //自由态数量
+ currentTab: 'currentTab', //当前页签
+ endpk_initialest: 'pk_initialest', //列表态最后一条pk
+ isSelfMake: 'isSelfMake', //是否配了新增按钮课件
+ isref21: 'isref21', //是否配了拉采购订单
+ org: 'org', //将默认的个性化中心组织放在缓冲里
+ orgName: 'orgName', //将默认的个性化中心组织名称放在缓冲里
+ tabCode: 'tabCode', //页签
+ btntabcode: 'btntabcode', //按钮可见性控制性帮助变量,
+ sagaStatus: 'saga_status' //事务状态
+};
+const TABS = [ 'free', 'all' ];
+//表体自定义项
+const VBDEF = [
+ 'vbdef1',
+ 'vbdef2',
+ 'vbdef3',
+ 'vbdef4',
+ 'vbdef5',
+ 'vbdef6',
+ 'vbdef7',
+ 'vbdef8',
+ 'vbdef9',
+ 'vbdef10',
+ 'vbdef11',
+ 'vbdef12',
+ 'vbdef13',
+ 'vbdef14',
+ 'vbdef15',
+ 'vbdef16',
+ 'vbdef17',
+ 'vbdef18',
+ 'vbdef19',
+ 'vbdef20'
+];
+//表头自定义项
+const VDEF = [
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20'
+];
+const LIST_BUTTON = {
+ Selfmake: 'Selfmake', //自制
+ Delete: 'Delete', //表头删除
+ //Approve: 'Approve', //行内审批
+ Approve: 'Approve', //审批
+ UnApprove: 'UnApprove', //取消审批
+ Edit: 'Edit', //修改
+ More: 'More', //更多
+ Copy: 'Copy', //行内复制
+ //UnApprove: 'UnApprove', //行内取消审批
+ Puorder: 'Puorder', //拉单
+ modelList: 'modelList', //弹出框提示
+ BillTraceability: 'BillTraceability', //单据追溯
+ AttaMange: 'AttaMange', //附件管理
+ Refresh: 'Refresh', //刷新
+ Print: 'Print', //打印
+ Output: 'Output', //输出
+ Import: 'Import', //导入
+ Export: 'Export' //导出
+};
+const CARD_BUTTON = {
+ AddLine: 'AddLine', //增行
+ Selfmake: 'Selfmake', //审批已通过新增
+ DeleteLine: 'DeleteLine', //删行
+ Edit: 'Edit', //修改
+ Delete: 'Delete', //删除
+ Copy: 'Copy', //复制(自由态卡片)
+ Save: 'Save', //保存
+ Renumber: 'Renumber', //重新排号
+ Cancel: 'Cancel', //取消
+ Unfold: 'Unfold', //展开
+ unfold: 'unfold', //展开
+ deleteLine: 'deleteLine', //删行
+ copyLine: 'copyLine', //行内复制行
+ CopyLine: 'CopyLine', //肩上复制行
+ InsertLine: 'InsertLine', //插入行
+ BillTraceability: 'BillTraceability', //卡片自由态单据追溯
+ Approve: 'Approve', //审批
+ AttaMange: 'AttaMange', //卡片自由态附件管理
+ quitTransfer: 'quitTransfer', //退出转单
+ UnApprove: 'UnApprove', //取消审批
+ Puorder: 'Puorder', //卡片审批已通过拉采购订单
+ Print: 'Print', //打印
+ modelList: 'modelList', //删除弹出框提示
+ formModel: 'formModel', //切换主组织弹出框提示
+ cancelModel: 'cancelModel', //取消弹框提示
+ Cancelcopyline: 'Cancelcopyline', //取消复制行
+ Pastetolast: 'Pastetolast', //粘贴至末行
+ Pastehere: 'Pastehere', //粘贴至此
+ Refresh: 'Refresh', //自由态刷新
+ Import: 'Import', //导入
+ Export: 'Export', //导出
+ Output: 'Output', //输出
+ Add: 'Add', //新增
+ More: 'More' //更多
+};
+/**
+ * 卡片表头字段
+ */
+const HEAD_FIELD = {
+ pk_initialest: 'pk_initialest', //期初暂估单
+ pk_org_v: 'pk_org_v', //主组织版本
+ pk_org: 'pk_org', //主组织
+ pk_stockorg: 'pk_stockorg', //库存组织
+ pk_stockorg_v: 'pk_stockorg_v', //库存组织版本
+ vtrantypecode: 'vtrantypecode', //期初暂估类型编码
+ pk_busitype: 'pk_busitype', //业务流程
+ ccurrencyid: 'ccurrencyid', //本位币
+ nexchangerate: 'nexchangerate', //折本汇率
+ pk_managepsn: 'pk_managepsn', //保管员
+ pk_stordoc: 'pk_stordoc', //仓库
+ ctrantypeid: 'ctrantypeid', //期初暂估类型
+ pk_supplier: 'pk_supplier', //供应商
+ pk_supplier_v: 'pk_supplier_v', //供应商
+ pk_dept_v: 'pk_dept_v', //部门版本
+ pk_dept: 'pk_dept', //部门
+ pk_bizpsn: 'pk_bizpsn', //采购员
+ pk_purchaseorg: 'pk_purchaseorg', //采购组织版
+ vbillcode: 'vbillcode', //单据号
+ fbillstatus: 'fbillstatus', //单据状态
+ ntotalastnum: 'ntotalastnum', //总数量
+ ntotalorigmny: 'ntotalorigmny', //总价税合计
+ corigcurrencyid: 'corigcurrencyid', //币种
+ dbilldate: 'dbilldate', //单据日期
+ pk_purchaseorg_v: 'pk_purchaseorg_v', //采购组织
+ cratetype: 'cratetype',
+ dratedate: 'dratedate',
+ fratecategory: 'fratecategory'
+};
+/**
+ * 卡片表体
+ */
+const BODY_FIELD = {
+ pk_initialest_b: 'pk_initialest_b', //期初暂估单表体主键
+ pk_material: 'pk_material', //物料
+ pk_apliabcenter_v: 'pk_apliabcenter_v', //利润中心版本
+ pk_apliabcenter: 'pk_apliabcenter', //利润中心
+ casscustid: 'casscustid', //客户
+ casscustvid: 'casscustvid', //客户
+ csourceid: 'csourceid', //来源单据
+ csourcebid: 'csourcebid', //来源单据明细
+ vsourcerowno: 'vsourcerowno', //来源单据行号
+ sourcets: 'sourcets', //来源单据时间戳
+ sourcebts: 'sourcebts', //来源单据行时间戳
+ vordertrantype: 'vordertrantype', //订单交易类型
+ pk_order_b: 'pk_order_b', //订单行主键
+ pk_order: 'pk_order', //订单主键
+ vordercode: 'vordercode', //订单号
+ corderrowno: 'corderrowno', //订单行号
+ bsettlefinish: 'bsettlefinish', //是否结算完成
+ naccsettlenum: 'naccsettlenum', //累计结算数量
+ naccwashmny: 'naccwashmny', //累计冲减暂估金额
+ bestimateap: 'bestimateap', //暂估应付标志
+ naccinvoicenum: 'naccinvoicenum', //累计开票数量
+ ncaninvoicenum: 'ncaninvoicenum', //可开票数量
+ ncalcostmny: 'ncalcostmny', //计成本金额
+ ts: 'ts', //时间戳
+ ftaxtypeflag: 'ftaxtypeflag', //扣税类别
+ crowno: 'crowno', //行号
+ vctcode: 'vctcode', //合同号
+ pk_apfinanceorg_v: 'pk_apfinanceorg_v', //应付组织
+ pk_org_v:'pk_org_v',
+ pk_srcmaterial: 'pk_srcmaterial', //物料版本
+ materialspec: 'pk_material.materialspec', //规格
+ materialtype: 'pk_material.materialtype', //型号
+ vchangerate: 'vchangerate', //换算率
+ pk_batchcode: 'pk_batchcode', //批次档案
+ vbatchcode: 'vbatchcode', //批次号
+ cunitid: 'cunitid', //主单位
+ castunitid: 'castunitid', //单位
+ nastnum: 'nastnum', //数量
+ nnum: 'nnum', //主数量
+ nastorigprice: 'nastorigprice', //无税单价
+ norigmny: 'norigmny', //无税金额
+ ntaxrate: 'ntaxrate', //税率
+ nasttaxprice: 'nasttaxprice', //本币含税单价
+ nastprice: 'nastprice', //本币无税单价
+ nmny: 'nmny', //本币无税金额
+ ntaxmny: 'ntaxmny', //本币价税合计
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ nprice: 'nprice', //主本币无税价
+ ntaxprice: 'ntaxprice', //主本币含税价
+ nastorigtaxprice: 'nastorigtaxprice', //含税单价
+ ntax: 'ntax', //税额
+ ncaltaxmny: 'ncaltaxmny', //计税金额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ bopptaxflag: 'bopptaxflag', //逆向征税
+ naccgoodssettlemny: 'naccgoodssettlemny', //累计货物结算金额
+ naccsettlemny: 'naccsettlemny', //累计结算金额
+ naccfeesettlemny: 'naccfeesettlemny', //累计费用结算金额
+ nsourcenum: 'nsourcenum', //来源单据主数量
+ nestcalcostprice: 'nestcalcostprice', //计成本单价
+ csendcountryid: 'csendcountryid', //发货国家/地区
+ crececountryid: 'crececountryid', //收货国家/地区
+ ctaxcountryid: 'ctaxcountryid', //报税国家/地区
+ fbuysellflag: 'fbuysellflag', //购销类型
+ btriatradeflag: 'btriatradeflag', //三角贸易
+ ctaxcodeid: 'ctaxcodeid', //税码
+ nnosubtaxrate: 'nnosubtaxrate', //不可抵扣税率
+ nnosubtax: 'nnosubtax', //不可抵扣税额
+ vbmemo: 'vbmemo', //备注
+ baffectcost: 'baffectcost', //影响成本标志
+ baffectpccost: 'baffectpccost', //影响利润中心成本
+ cproductorid: 'cproductorid', //生产厂商
+ cprojectid: 'cprojectid', //项目
+ csourcetypecode: 'csourcetypecode', //来源单据类型
+ vsourcetrantype: 'vsourcetrantype', //来源交易类型
+ vsourcecode: 'vsourcecode', //来源单据号
+ pk_materialname: 'pk_material.name', //物料名称
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ childform1: 'childform1',
+ cardInitBtn: [ 'AddLine', 'DeleteLine', 'CopyLine', 'Renumber', 'unfold', 'deleteLine', 'copyLine', 'InsertLine' ], //卡片肩部初始化要显示的按钮
+ cardPastBtn: [ 'Pastetolast', 'Cancelcopyline', 'Cancelcopyline' ],
+ pk_invcsupllier: 'pk_invcsupllier', //开票供应商
+ cffileid: 'cffileid'
+};
+/**
+ * 搜索区字段
+ */
+const SEARCH_FIELD = {
+ pk_org: 'pk_org', //主组织
+ pk_srcmaterial: 'po_initialest_b.pk_srcmaterial', //物料
+ pk_supplier: 'pk_supplier', //供应商(和拉单一样)
+ ctrantypeid: 'ctrantypeid', //期初暂估类型(和拉单一样)
+ pk_stockorg: 'pk_stockorg', //库存组织
+ pk_stordoc: 'pk_stordoc', //仓库
+ pk_srcmaterialCode: 'po_initialest_b.pk_srcmaterial.code', //物料编码
+ pk_srcmaterialName: 'po_initialest_b.pk_srcmaterial.name', //物料名称
+ pk_marbasclass: 'po_initialest_b.pk_srcmaterial.pk_marbasclass', //物料基本分类
+ casscustid: 'po_initialest_b.casscustid', //客户
+ // 拉单
+ pk_psfinanceorg: 'pk_order_b.pk_psfinanceorg', //结算财务组织
+ pk_srcmaterialorder: 'pk_order_b.pk_srcmaterial', //拉单物料
+ pk_srcmaterialcode: 'pk_order_b.pk_srcmaterial.code', //拉单物料编码
+ pk_srcmaterialname: 'pk_order_b.pk_srcmaterial.name', //拉单物料名称
+ pk_marbasclassorder: 'pk_order_b.pk_srcmaterial.pk_marbasclass', //拉单物料基本分类
+ casscustidorder: 'pk_order_b.casscustid', //客户
+ billmaker: 'billmaker', //制单人
+ approver: 'approver' //审批人
+};
+
+/**
+ * DATASOURCE常量
+ */
+const DATASOURCE = {
+ dataSource: 'scm.pu.initialest.datasource', //列表卡片缓冲数据空间
+ listDataCache: 'listDataCache', //表格数据缓冲主键
+ transferdataSource: 'scm.pu.initialest.transferdataSource' //转单缓冲空间
+};
+const CLEARFIELDS = [
+ 'crowno', //行号
+ 'nnum'
+];
+/**
+ * 自由辅助属性
+ */
+const FREEFIELD = {
+ ccustomerid: 'casscustid',
+ ccustomervid: 'casscustvid',
+ cvendorid: 'pk_supplier',
+ cvendorvid: 'pk_supplier_v'
+};
+export {
+ URL,
+ PAGECODE,
+ FIELD,
+ UISTATE,
+ TABCODE,
+ AREA,
+ LIST_BUTTON,
+ TRANSFER,
+ CARD_BUTTON,
+ FBILLSTATUS,
+ ATTRCODES,
+ SEARCH_FIELD,
+ HEAD_FIELD,
+ BODY_FIELD,
+ DATASOURCE,
+ TABS,
+ VDEF,
+ VBDEF,
+ CLEARFIELDS,
+ FREEFIELD
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/list/afterEvents/afterEvent.js b/src/pu/pu/initialest/list/afterEvents/afterEvent.js
new file mode 100644
index 0000000..40e48e4
--- /dev/null
+++ b/src/pu/pu/initialest/list/afterEvents/afterEvent.js
@@ -0,0 +1,36 @@
+/*DncIqBreQz6WZRX+v7OzgVBZdKPVlzto4ezydf/Bg2c=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 列表编辑后事件
+ * @Date: 2018-07-27 17:30:19
+ * @Last Modified by: zhaochyu
+ * @Last Modified time: 2019-01-08 17:01:25
+ */
+import { SEARCH_FIELD, PAGECODE, AREA } from '../../constance';
+import multiCorpRefHandler from '../../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+export default function afterEvent(field, val) {
+ if (field == SEARCH_FIELD.pk_org) {
+ multiCorpRefHandler(this.props, val, PAGECODE.searchId, [
+ SEARCH_FIELD.pk_srcmaterial,
+ SEARCH_FIELD.pk_supplier,
+ SEARCH_FIELD.pk_srcmaterial,
+ SEARCH_FIELD.pk_srcmaterialCode,
+ SEARCH_FIELD.pk_srcmaterialName,
+ SEARCH_FIELD.pk_marbasclass,
+ SEARCH_FIELD.casscustid
+ ]);
+ } else if (field == SEARCH_FIELD.pk_stockorg) {
+ multiCorpRefHandler(this.props, val, PAGECODE.searchId, [ SEARCH_FIELD.pk_stordoc ]);
+ } else if (field == SEARCH_FIELD.pk_psfinanceorg) {
+ multiCorpRefHandler(this.props, val, AREA.searchArea, [
+ SEARCH_FIELD.pk_srcmaterialorder,
+ SEARCH_FIELD.pk_supplier,
+ SEARCH_FIELD.pk_srcmaterialcode,
+ SEARCH_FIELD.pk_srcmaterialname,
+ SEARCH_FIELD.pk_marbasclassorder,
+ SEARCH_FIELD.casscustidorder
+ ]);
+ }
+}
+
+/*DncIqBreQz6WZRX+v7OzgVBZdKPVlzto4ezydf/Bg2c=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/transfer/btnClick/index.js b/src/pu/pu/initialest/transfer/btnClick/index.js
new file mode 100644
index 0000000..03676e8
--- /dev/null
+++ b/src/pu/pu/initialest/transfer/btnClick/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+export { searchBtnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/transfer/btnClick/searchBtnClick.js b/src/pu/pu/initialest/transfer/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..98e2a41
--- /dev/null
+++ b/src/pu/pu/initialest/transfer/btnClick/searchBtnClick.js
@@ -0,0 +1,76 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 查询按钮
+ * @Date: 2018-06-19 10:34:44
+ * @Last Modified by: zhangmi
+ * @Last Modified time: 2023-08-09 10:28:49
+ */
+
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, AREA, PAGECODE, DATASOURCE, FIELD } from '../../constance';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+//点击查询,获取查询区数据
+export default function(props, key) {
+ let flag = key === 'Refresh';
+ let searchVal = this.props.search.getAllSearchData(AREA.searchArea);
+ if (!searchVal) {
+ return;
+ }
+ let transtype = getDefData(DATASOURCE.dataSource, 'transtype');
+ let queryInfo = this.props.search.getQueryInfo(AREA.searchArea);
+ let data = {
+ templetid: getDefData(DATASOURCE.transferdataSource, FIELD.templetid),
+ queryInfo: queryInfo,
+ pageCode: PAGECODE.transferlist,
+ userobj: { billtype_qs_key: transtype }
+ }; //分页信息 //查询区编码 //查询模板id //查询条件 //页面编码
+ //得到数据渲染到页面
+ ajax({
+ url: URL.queryOrder,
+ data: data,
+ success: (res) => {
+ if (flag) {
+ showSuccessInfo(getLangByResId(this, '4004INITIALEST-000037')); /* 国际化处理: 刷新成功*/
+ }
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ this.props.transferTable.setTransferTableValue(
+ AREA.cardFormArea,
+ AREA.cardTableArea,
+ res.data,
+ 'pk_order',
+ 'pk_order_b'
+ );
+ if (!flag) {
+ toast({
+ color: 'success',
+ content: getLangByResId(this, '4004INITIALEST-000038') /* 国际化处理:"查询成功!"*/
+ });
+ }
+ } else {
+ if (!flag) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004INITIALEST-000034') /* 国际化处理:"未查询出符合条件的数据!"*/
+ });
+ }
+ this.props.transferTable.setTransferTableValue(
+ AREA.cardFormArea,
+ AREA.cardTableArea,
+ [],
+ 'pk_order',
+ 'pk_order_b'
+ );
+ }
+ }
+ });
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/transfer/index.js b/src/pu/pu/initialest/transfer/index.js
new file mode 100644
index 0000000..7c2e02a
--- /dev/null
+++ b/src/pu/pu/initialest/transfer/index.js
@@ -0,0 +1,157 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo:采购订单生成期初暂估单
+ * @Date: 2018-08-01 09:27:52
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 20:26:15
+ */
+
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick } from './btnClick';
+import afterEvent from '../list/afterEvents/afterEvent';
+import { PAGECODE, AREA, TRANSFER, URL, FIELD, DATASOURCE, UISTATE, SEARCH_FIELD } from '../constance';
+import { clearTransferCache } from '../../../../scmpub/scmpub/pub/cache';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+const { NCToggleViewBtn, NCBackBtn, NCDiv } = base;
+class TransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(AREA.searchArea);
+ this.state = {
+ toggleViewStatus: false
+ };
+ // this.state = { templetid: null }; //模板ID
+ //initTemplate.call(this, this.props);
+ initLang(this, [ '4004initialest' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(
+ AREA.cardFormArea,
+ AREA.cardTableArea,
+ [],
+ FIELD.pk_order,
+ FIELD.pk_order_b
+ );
+ }
+ //主组织编辑后回调
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(AREA.searchArea, SEARCH_FIELD.pk_psfinanceorg);
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ afterEvent.call(this, SEARCH_FIELD.pk_psfinanceorg, arr);
+ }
+ };
+ // react:界面渲染函数
+ render() {
+ const { transferTable, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createTransferTable } = transferTable;
+ let selectedShow = transferTable.getSelectedListDisplay(PAGECODE.cardhead);
+ return (
+
+ {!selectedShow ? (
+
+
+ {
+ this.props.pushTo(URL.listurl, { pagecode: PAGECODE.listpagecode });
+ }}
+ />
+
+
{getLangByResId(this, '4004INITIALEST-000036')}
+ {/* 国际化处理: 选择采购订单*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: PAGECODE.cardhead,
+ onButtonClick: searchBtnClick.bind(this)
+ })}
+
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[TRANSFER.view]) {
+ initTemplate.call(this, TRANSFER.view); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType();
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ {NCCreateSearch(AREA.searchArea, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })
+ //模块id
+ }
+
+
+ ) : (
+ ''
+ )}
+
+
+ {createTransferTable({
+ dataSource: DATASOURCE.transferdataSource,
+ headTableId: AREA.cardFormArea, //表格组件id
+ bodyTableId: AREA.cardTableArea, //子表模板id
+ fullTableId: TRANSFER.view,
+ //点击加号展开,设置表格数据
+ transferBtnText: getLangByResId(this, '4004INITIALEST-000035'), //转单按钮显示文字/* 国际化处理: 生成期初暂估单*/
+ containerSelector: '#transferList',
+ onTransferBtnClick: (ids) => {
+ clearTransferCache(this.props, DATASOURCE.transferdataSource);
+ this.props.pushTo(URL.cardurl, {
+ status: UISTATE.transfer,
+ pagecode: PAGECODE.cardpagecode
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[TRANSFER.view]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(AREA.cardFormArea);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ },
+ componentInitFinished: () => {
+ //缓存数据赋值成功的钩子函数
+ //若初始化数据后需要对数据做修改,可以在这里处理
+ }
+ })}
+
+
+ );
+ }
+}
+
+TransferTable = createPage({
+ billinfo: {
+ billtype: 'card',
+ pagecode: PAGECODE.cardpagecode,
+ headcode: PAGECODE.cardhead,
+ bodycode: {
+ [PAGECODE.cardbody]: 'cardTable' //此处发生变化了,需要传一个对象
+ }
+ }
+})(TransferTable);
+//ReactDOM.render(, document.querySelector("#app"));
+export default TransferTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/transfer/init/index.js b/src/pu/pu/initialest/transfer/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/initialest/transfer/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/initialest/transfer/init/initTemplate.js b/src/pu/pu/initialest/transfer/init/initTemplate.js
new file mode 100644
index 0000000..a7ea85c
--- /dev/null
+++ b/src/pu/pu/initialest/transfer/init/initTemplate.js
@@ -0,0 +1,114 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 期初暂估单转单列表
+ * @Date: 2018-06-19 10:36:18
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-09-12 15:29:33
+ */
+import { URL, PAGECODE, SEARCH_FIELD, AREA, DATASOURCE, FIELD } from '../../constance';
+import { setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: PAGECODE.transferlist, //页面id
+ appcode: PAGECODE.poorder, //应用编码
+ //appid: TRANSFER.appid //注册按钮的id
+ },
+ data => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ //交易类型引用
+ transtypeUtils.init.call(this, data.context);
+ modifierMeta(this.props, meta);
+ this.props.meta.setMeta(meta, () => {
+ setDefData(DATASOURCE.transferdataSource, FIELD.templetid, data.template.pageid);
+ });
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+function getFieldValue2Arr(props, code) {
+ let data = props.search.getSearchValByField(AREA.searchArea, code);
+ data = ((data && data.value && data.value.firstvalue) || '').split(',');
+ let length = data.length;
+ if (length > 1) {
+ return {};
+ }
+ return data;
+}
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[AREA.cardTableArea].items.map(item => {
+ // item.width = 120;
+ return item;
+ });
+
+ meta[AREA.searchArea].items.map(item => {
+ let code = item.attrcode;
+ item.col = 4;
+ // item.width = 120;
+ setPsndocShowLeavePower(item);
+ setRefShowDisabledData(item);
+ if (
+ code == SEARCH_FIELD.pk_srcmaterialorder ||
+ code == SEARCH_FIELD.pk_supplier ||
+ code == SEARCH_FIELD.pk_srcmaterialcode ||
+ code == SEARCH_FIELD.pk_srcmaterialname ||
+ code == SEARCH_FIELD.pk_marbasclassorder ||
+ code == SEARCH_FIELD.casscustidorder
+ ) {
+ item.isShowUnit = true;
+ item.isMultiSelectedEnabled = true;
+ item.queryCondition = () => {
+ let data = getFieldValue2Arr(props, SEARCH_FIELD.pk_psfinanceorg);
+ return { pk_org: data[0] };
+ };
+ } else if (code == SEARCH_FIELD.pk_psfinanceorg) {
+ item.queryCondition = () => {
+ return { TreeRefActionExt: URL.org_permissions };
+ };
+ } else if (code == SEARCH_FIELD.ctrantypeid) {
+ item.isShowUnit = true;
+ item.isMultiSelectedEnabled = true;
+ item.queryCondition = () => {
+ let data = getFieldValue2Arr(props, SEARCH_FIELD.pk_psfinanceorg);
+ return {
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ SCM_BUSIORG: data[0],
+ };
+ };
+ } else if (code == SEARCH_FIELD.billmaker || code == SEARCH_FIELD.approver) {
+ item.isMultiSelectedEnabled = true;
+ }
+ });
+ meta[AREA.cardFormArea].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '21',
+ pkfield: 'pk_order',
+ });
+ });
+ meta[AREA.VIEW].items.map((item, key) => {
+ transferSkipToSrcBillUtil.call(this, props, item, {
+ billtype: '21',
+ pkfield: 'pk_order',
+ });
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/afterEvent/afterEvent.js b/src/pu/pu/poorder/arriveplan/afterEvent/afterEvent.js
new file mode 100644
index 0000000..8154be0
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/afterEvent/afterEvent.js
@@ -0,0 +1,167 @@
+/*DncIqBreQz6WZRX+v7OzgVBZdKPVlzto4ezydf/Bg2c=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 到货计划编辑后事件
+ * @Date: 2018-06-28 10:44:50
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-04-06 20:57:23
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, FIELD, ARRIVEPLAN, STATUS } from '../../constance';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+import { deleteCheck } from '../btnClicks/index';
+
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ if (changedrows[0].newvalue.value == changedrows[0].oldvalue.value && key != 'pk_arrvstoorg_v') {
+ //新旧值相等不触发编辑后
+ return;
+ }
+ //过滤空行
+ let empty = { value: null, display: null, scale: '-1' };
+ // props.editTable.filterEmptyRows(ARRIVEPLAN.TABLEID, new Array());
+ let allRows = props.editTable.getAllRows(ARRIVEPLAN.TABLEID, false);
+ let editRowid = record.rowid;
+ let data = {};
+ let array = new Array();
+ array.push(record);
+ let formData = {
+ areacode: ARRIVEPLAN.TABLEID,
+ areaType: 'table',
+ rows: array
+ };
+ data.grid = {
+ pageid: ARRIVEPLAN.PAGECODE,
+ model: formData
+ };
+ data.attrcode = key;
+ data.changedrows = changedrows;
+ data.index = 0;
+ if (moduleId === ARRIVEPLAN.TABLEID) {
+ if (key == 'crownobb1') {
+ //行号编辑后事件: //订单行号
+ if (value && value.length > 0) {
+ let arraynew = [];
+ allRows.forEach((item, i) => {
+ if (item.rowid == editRowid) {
+ arraynew.push(item);
+ }
+ });
+ formData.rows = arraynew;
+ // data.index = index;
+ getAfterData(props, data, index);
+ } else {
+ // // 清空行号场景
+ // let ndata = new Array();
+ // ndata.push(record);
+ // let model = {
+ // areacode: ARRIVEPLAN.TABLEID,
+ // areaType: 'table',
+ // rows: ndata
+ // };
+ // let checkdata = {
+ // pageid: ARRIVEPLAN.PAGECODE,
+ // model: model
+ // };
+ // deleteCheck.call(this, checkdata, () => {
+ // props.editTable.deleteTableRowsByIndex(ARRIVEPLAN.TABLEID, index);
+ // buttonController.togglePageShow.call(this, this.props, STATUS.edit);
+ // });
+ // props.editTable.addRow(ARRIVEPLAN.TABLEID);
+ getAfterData(props, data, index);
+ }
+ } else if (key == 'nnum') {
+ let naccumdevnum = record && record.values && record.values.naccumdevnum.value;
+ if (value.value - naccumdevnum < 0) {
+ // 旧值设置回去
+ props.editTable.setValByKeyAndIndex(ARRIVEPLAN.TABLEID, index, 'nnum', { value: changedrows.value });
+ /* 国际化处理: 到货计划已经执行运输,不能将到货计划数量修改的比已经运输数量小!*/
+ toast({ color: 'warning', content: getLangByResId(this, '4004POORDER-000000') });
+ return;
+ } else {
+ getAfterData(props, data, index);
+ }
+ } else if (key == 'pk_arrvstoorg_v') {
+ let insertNum = index;
+ // 若只修改一行
+ if (value && changedrows.length == 1) {
+ getAfterData(props, data, index);
+ return;
+ }
+
+ value &&
+ value.forEach((element, i) => {
+ if (i == 0) {
+ record.index = index;
+ record.values.pk_recvstordoc = empty; //收货仓库
+ record.values[key] = { display: value[0].refname, value: value[0].refpk, scale: -1 };
+ props.editTable.updateDataByIndexs(moduleId, record, true);
+ } else if (element.refcode) {
+ let newRecord = deepClone(record);
+ newRecord.rowid = null;
+ newRecord.values.nnum = { value: null, display: null, scale: record.values.nnum.scale }; //主数量
+ newRecord.values.nastnum = { value: null, display: null, scale: record.values.nastnum.scale }; //数量
+ newRecord.values.nqtunitnum = {
+ value: null,
+ display: null,
+ scale: record.values.nqtunitnum.scale
+ }; //报价数量
+ newRecord.values.pk_recvstordoc = empty; //收货仓库
+ newRecord.values.pk_order_bb1 = empty; //收货仓库
+ newRecord.values[key] = { display: element.refname, value: element.refpk, scale: -1 };
+ props.editTable.pasteRow(ARRIVEPLAN.TABLEID, newRecord, insertNum++);
+ }
+ });
+ getAfterData(props, data, index);
+ //收货库存组织 --收货库存组织,清空收货仓库 pk_recvstordoc
+ } else if (key == 'pk_recvstordoc') {
+ //收货仓库 -- 后台
+ getAfterData(props, data, index);
+ } else if (key == 'pk_receiveaddress') {
+ //收货地址 如果表体地址清空,则表体相关地区 cdevareaid 、地点也清空 cdevaddrid
+ if (value == null || value.value == null) {
+ props.editTable.setValByKeyAndIndex(ARRIVEPLAN.TABLEID, index, 'cdevareaid', empty);
+ props.editTable.setValByKeyAndIndex(ARRIVEPLAN.TABLEID, index, 'cdevaddrid', empty);
+ }
+ } else if (key == 'vvenddevaddr') {
+ //供应商发货地址 表体地址清空,则表体相关地区 cvenddevareaid 、地点也清空 cvenddevaddrid
+ if (value == null || value.value == null) {
+ props.editTable.setValByKeyAndIndex(ARRIVEPLAN.TABLEID, index, 'cvenddevareaid', empty);
+ props.editTable.setValByKeyAndIndex(ARRIVEPLAN.TABLEID, index, 'cvenddevaddrid', empty);
+ }
+ } else if (key == 'nastnum' || key == 'nqtunitnum') {
+ // 数量、主数量、报价数量
+ getAfterData(props, data, index);
+ }
+ }
+}
+
+function getAfterData(props, viewvo, index) {
+ ajax({
+ url: URL.arriveplanafterevent,
+ data: viewvo,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data) {
+ let insertArray = [];
+ let updateArray = [];
+ data.grid[ARRIVEPLAN.TABLEID].rows.forEach((element, i) => {
+ if (element.rowid) {
+ updateArray.push(element);
+ } else {
+ insertArray.push(element);
+ }
+ });
+ props.editTable.updateDataByRowId(ARRIVEPLAN.TABLEID, { rows: updateArray }, null, false);
+ props.editTable.insertRowsAfterIndex(ARRIVEPLAN.TABLEID, insertArray, index);
+ // props.editTable.setTableData(ARRIVEPLAN.TABLEID, data[ARRIVEPLAN.TABLEID]);
+ buttonController.togglePageShow.call(this, props, STATUS.edit);
+ }
+ }
+ });
+}
+
+/*DncIqBreQz6WZRX+v7OzgVBZdKPVlzto4ezydf/Bg2c=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/afterEvent/index.js b/src/pu/pu/poorder/arriveplan/afterEvent/index.js
new file mode 100644
index 0000000..513d8aa
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/afterEvent/index.js
@@ -0,0 +1,13 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 到货计划编辑后事件
+ * @Date: 2018-06-28 10:40:52
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-01-07 11:20:54
+ */
+import afterEvent from './afterEvent';
+
+export { afterEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/batchEvents/batchEvents.js b/src/pu/pu/poorder/arriveplan/batchEvents/batchEvents.js
new file mode 100644
index 0000000..d5c9c59
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/batchEvents/batchEvents.js
@@ -0,0 +1,225 @@
+/*8nIjANkSB9VpkQdmnMi+FFYPOshN9M6haQqD6R9IZgk=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购订单到货计划批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-04-14 11:20:58
+ */
+import { ajax } from 'nc-lightapp-front';
+import { FIELD, PAGECODE, URL, ARRIVEPLAN, STATUS } from '../../constance';
+
+import {
+ createGridAfterEventDataBatch,
+ processGridEditResultBatch
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { buttonController } from '../viewController/index';
+import { vfreeBeforeEvent } from '../../../pub/beforeevent';
+import { deleteCheck } from '../btnClicks/index';
+
+export default async function batchEvents(obj) {
+ // console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ let BATCHITEM = [
+ 'crownobb1',
+ 'nastnum',
+ 'dplanarrvdate',
+ 'pk_recvstordoc',
+ 'pk_arrvstoorg_v',
+ 'cdevareaid',
+ 'cdevaddrid',
+ 'pk_receiveaddress',
+ 'cvenddevareaid',
+ 'cvenddevaddrid',
+ 'vvenddevaddr',
+ 'nnum',
+ 'nqtunitnum',
+ 'vmemo'
+ ];
+
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vbdef') && !attrcode.startsWith('vfree')) {
+ return;
+ }
+ if (attrcode == 'crownobb1') {
+ for (let i = 0; i < newValue.length; i++) {
+ let userObject = '';
+ let allRows = this.props.editTable.getAllRows(ARRIVEPLAN.TABLEID, false);
+ let rownoSet = new Set();
+ if (allRows && allRows.length > 0) {
+ allRows.map((item) => {
+ let pk_order_b = item.values && item.values.pk_order_b && item.values.pk_order_b.value;
+ let status = item.status;
+ let nastnum = item.values && item.values.nastnum && item.values.nastnum.value;
+ pk_order_b = pk_order_b == undefined ? '' : pk_order_b;
+ nastnum = nastnum == undefined ? '' : nastnum;
+ if (pk_order_b && status != 3) {
+ userObject += pk_order_b + ',' + nastnum + ';';
+ }
+ rownoSet.add(item.values.crownobb1.value);
+ });
+ }
+ //获取全部的行,如果重复的就跳过。
+ if (rownoSet.has(newValue[i].values.crownobb1.value)) {
+ continue;
+ }
+
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[queryValue.length - 1].queryCondition = {
+ pk_order: this.props.pk_order,
+ userObject: userObject
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == 'pk_recvstordoc') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_arrvstoorg && newValue[i].values.pk_arrvstoorg.value)) {
+ continue;
+ }
+
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[queryValue.length - 1].queryCondition = {
+ pk_order: this.props.pk_order,
+ pk_org: newValue[i].values.pk_arrvstoorg.value,
+ busifuncode: FIELD.STOCKORG,
+ // pk_arrvstoorg: pk_arrvstoorg,
+ crownobb1: newValue[i].values.crownobb1.value,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RPReceiveWarehouseRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == 'vvenddevaddr') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_org && newValue[i].values.pk_org.value)) {
+ continue;
+ }
+
+ let pk_org = this.model.pk_org;
+ let pk_supplier = this.model.pk_supplier;
+ let pk_order = newValue[i].values.pk_order.value;
+ if (pk_order == null) {
+ continue;
+ } else {
+ if (pk_supplier == null) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[queryValue.length - 1].queryCondition = {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RPVenddevaddr'
+ };
+ }
+ }
+ isManyCondition = true;
+ } else if (attrcode.startsWith('vfree')) {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_org && newValue[i].values.pk_org.value)) {
+ continue;
+ }
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let constance = {};
+ let pk_org = newValue[i].values.pk_org.value;
+ let materialvid = newValue[i].values.pk_material.value;
+ constance.key = attrcode;
+ constance.params = {
+ key: attrcode,
+ pk_org: pk_org,
+ materialvid: materialvid
+ };
+ let flag = await vfreeBeforeEvent(this.props, constance);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ isManyCondition = true;
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ this.props.editTable
+ .updateAfterBatchChange({
+ areaCode, //区域code
+ column, //对应的列,可直接使用上面获取到的column对象
+ indexs, //满足并需要处理的行(可能存在第一行允许编辑,第二行不允许编辑的场景,所以indexs数组中的行数并不一定与粘贴的行数相等))
+ queryValue, //与indexs对应的行数据数组(包含前过滤条件)
+ changedrows, //变更行的数组(仅有newValue与oldValue)
+ pasteData, //粘贴的具体内容,对于参照类型的列,此字段必传,不然无法翻译
+ queryCondition, //该列统一的前过滤条件,比如物料都是根据表头主组织进行过滤
+ isManyCondition //是否多个过滤条件,如物料都根据表头主组织进行过滤,此参数传false,如表体的部门根据表体的某个组织过滤,此参数传true
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ //执行业务的批量编辑后事件
+ // afterEvent(props, areaCode, attrcode, queryValue, changerows);
+ let data = createGridAfterEventDataBatch(
+ props,
+ ARRIVEPLAN.PAGECODE,
+ ARRIVEPLAN.TABLEID,
+ areaCode,
+ attrcode,
+ changedrows,
+ indexs
+ );
+ ajax({
+ url: URL.arriveplanafterevent,
+ data: data,
+ async: false,
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data) {
+ let insertArray = [];
+ let updateArray = [];
+ data.grid[ARRIVEPLAN.TABLEID].rows.forEach((element, i) => {
+ if (element.rowid) {
+ updateArray.push(element);
+ } else {
+ insertArray.push(element);
+ }
+ });
+ // NCC-304732 第四个参数设置为false,标志假删
+ props.editTable.updateDataByRowId(ARRIVEPLAN.TABLEID, { rows: updateArray }, null, false);
+ //props.editTable.insertRowsAfterIndex(ARRIVEPLAN.TABLEID, insertArray, index);
+ // props.editTable.setTableData(ARRIVEPLAN.TABLEID, data[ARRIVEPLAN.TABLEID]);
+ buttonController.togglePageShow.call(this, props, STATUS.edit);
+ }
+ }
+ });
+ });
+}
+
+/*8nIjANkSB9VpkQdmnMi+FFYPOshN9M6haQqD6R9IZgk=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/batchEvents/index.js b/src/pu/pu/poorder/arriveplan/batchEvents/index.js
new file mode 100644
index 0000000..5c970c6
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/batchEvents/index.js
@@ -0,0 +1,6 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import batchEvents from './batchEvents';
+
+export { batchEvents };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/beforeEvents/beforeEvent.js b/src/pu/pu/poorder/arriveplan/beforeEvents/beforeEvent.js
new file mode 100644
index 0000000..189365c
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/beforeEvents/beforeEvent.js
@@ -0,0 +1,249 @@
+/*lA7FrGfHlashLvM+HJWGNfFP8qtzbZGoR0+ewRKT3vU=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 订单到货计划编辑前事件
+ * @Date: 2018-09-12 13:36:23
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-04-13 11:22:14
+ */
+import { URL, FIELD, ARRIVEPLAN } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { vfreeBeforeEvent } from '../../../pub/beforeevent';
+
+export default async function beforeEvent(props, moduleId, key, value, index, record) {
+ if (moduleId == ARRIVEPLAN.TABLEID) {
+ let meta = this.props.meta.getMeta();
+ let flag = true;
+ let pk_order = record && record.values.pk_order.value;
+ if (
+ key.attrcode != 'crownobb1' &&
+ (record.values.crownobb1.value == null ||
+ record.values.crownobb1.value == 'null' ||
+ record.values.crownobb1.value == '')
+ ) {
+ return false;
+ }
+ let rpreceiveOrg = [
+ 'pk_arrvstoorg_v',
+ 'nastnum',
+ 'dplanarrvdate',
+ 'cdevareaid',
+ 'cdevaddrid',
+ 'cvenddevaddrid',
+ 'cvenddevareaid',
+ 'nnum',
+ 'nqtunitnum',
+ 'vmemo',
+ 'nweight',
+ 'cvendorid',
+ 'btransclosed',
+ 'nvolumn',
+ 'npacknum',
+ 'vfree1',
+ 'vfree2',
+ 'vfree3',
+ 'vfree4',
+ 'vfree5',
+ 'vfree6',
+ 'vfree7',
+ 'vfree8',
+ 'vfree9',
+ 'vfree10',
+ 'vbdef1',
+ 'vbdef2',
+ 'vbdef3',
+ 'vbdef4',
+ 'vbdef5',
+ 'vbdef6',
+ 'vbdef7',
+ 'vbdef8',
+ 'vbdef9',
+ 'vbdef10',
+ 'vbdef11',
+ 'vbdef12',
+ 'vbdef13',
+ 'vbdef14',
+ 'vbdef15',
+ 'vbdef16',
+ 'vbdef17',
+ 'vbdef18',
+ 'vbdef19',
+ 'vbdef20',
+ 'vecbillcode',
+ 'dsenddate',
+ 'vehicletype',
+ 'vehiclelicense',
+ 'vlinkpsn',
+ 'vlinktype'
+ ];
+ if (rpreceiveOrg.includes(key.attrcode)) {
+ //收货库存组织版本信息、数量、计划到货日期、收货地区、收货地点、供应商发货地点、供应商发货地区、主数量、报价数量、备注
+ //重量、生产厂商、是否运输关闭、体积、件数、自由辅助属性1-10、自定义项1-20、自定义项1-20、EC发货单号、发货日期、运输工具
+ //车票号、联系人、联系方式、
+ if (key.attrcode == 'pk_arrvstoorg_v') {
+ // 收货仓库支持多选
+ meta[ARRIVEPLAN.TABLEID].items.map((item) => {
+ if (item.attrcode == key.attrcode) {
+ item.isMultiSelectedEnabled = true;
+ }
+ });
+ }
+ flag = true;
+ if (pk_order == null) {
+ flag = false;
+ }
+ } else if (key.attrcode == 'crownobb1') {
+ // 订单行号
+ flag = true;
+ // let pk_order_b = record && record.values.pk_order_b && record.values.pk_order_b.value;
+ // pk_order_b = pk_order_b == undefined ? '' : pk_order_b;
+ // let nastnum = record && record.values.nastnum && record.values.nastnum.value;
+ let userObject = '';
+ let allRows = props.editTable.getAllRows(ARRIVEPLAN.TABLEID, false);
+ if (allRows && allRows.length > 0) {
+ allRows.map((item) => {
+ let pk_order_b = item.values && item.values.pk_order_b && item.values.pk_order_b.value;
+ let pk_order_bb1 = item.values && item.values.pk_order_bb1 && item.values.pk_order_bb1.value;
+ let status = item.status;
+ let nastnum = item.values && item.values.nastnum && item.values.nastnum.value;
+ pk_order_b = pk_order_b == undefined ? '' : pk_order_b;
+ nastnum = nastnum == undefined ? '' : nastnum;
+ if (pk_order_b) {
+ // NCC-302366 页面上删除已经存在的行,但是后端没有执行真正删除逻辑时,前端应该要展示前端删除的行
+ if (pk_order_bb1 && status == 3) {
+ userObject += pk_order_b + ',0;';
+ } else if (status != 3) {
+ userObject += pk_order_b + ',' + nastnum + ';';
+ }
+ }
+ });
+ }
+ let pk_org = record && record.values.pk_arrvstoorg.value;
+ meta[ARRIVEPLAN.TABLEID].items.map((item) => {
+ if (item.attrcode == 'crownobb1') {
+ item.isMultiSelectedEnabled = true;
+ item.refName = getLangByResId(this, '4004POORDER-000001'); /* 国际化处理: 订单行号参照(可多选)*/
+ }
+ item.queryCondition = () => {
+ return {
+ pk_order: props.pk_order,
+ userObject: userObject
+ };
+ };
+ });
+ props.meta.setMeta(meta);
+ } else if (key.attrcode == 'pk_recvstordoc') {
+ //收货仓库
+ flag = true;
+ let pk_arrvstoorg = record && record.values.pk_arrvstoorg.value;
+ if (pk_arrvstoorg == null) {
+ flag = false;
+ } else {
+ pk_arrvstoorg = record && record.values.pk_arrvstoorg.value;
+ let crownobb1 = record && record.values.crownobb1.value;
+ meta[ARRIVEPLAN.TABLEID].items.map((item) => {
+ if (item.attrcode == key.attrcode) {
+ // props.cardTable.setQueryCondition(moduleId, {
+ // [item.attrcode]: () => {
+ // return {
+ // pk_order: pk_order,
+ // pk_org: pk_arrvstoorg,
+ // busifuncode: FIELD.STOCKORG,
+ // // pk_arrvstoorg: pk_arrvstoorg,
+ // crownobb1: crownobb1,
+ // GridRefActionExt: 'nccloud.web.pu.order.ref.RPReceiveWarehouseRefFilter'
+ // };
+ // }
+ // });
+ item.queryCondition = () => {
+ return {
+ pk_order: pk_order,
+ pk_org: pk_arrvstoorg,
+ busifuncode: FIELD.STOCKORG,
+ // pk_arrvstoorg: pk_arrvstoorg,
+ crownobb1: crownobb1,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RPReceiveWarehouseRefFilter'
+ };
+ };
+ }
+ });
+ props.meta.setMeta(meta);
+ flag = true;
+ }
+ } else if (key.attrcode == 'pk_receiveaddress') {
+ //收货地址
+ flag = true;
+ if (pk_order == null) {
+ flag = false;
+ } else {
+ let pk_customer = this.model.pk_customer;
+ meta[ARRIVEPLAN.TABLEID].items.map((item) => {
+ if (item.attrcode === 'pk_receiveaddress') {
+ if (!pk_customer) {
+ item.refName = getLangByResId(this, '4004POORDER-000002'); /* 国际化处理: 地址簿*/
+ item.itemtype = 'refer';
+ item.refcode = 'uapbd/refer/pubinfo/AddressRef/index.js';
+ } else {
+ item.refName = getLangByResId(this, '4004POORDER-000003'); /* 国际化处理: 客户收货地址*/
+ item.itemtype = 'refer';
+ item.refcode = 'uapbd/refer/customer/CustAddressGridRef/index.js';
+ item.queryCondition = () => {
+ return {
+ pk_recvcustomer: pk_customer,
+ pk_customer: pk_customer,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RPReceiveAddressRefFilter'
+ };
+ };
+ }
+ }
+ });
+ props.meta.setMeta(meta);
+ }
+ } else if (key.attrcode == 'vvenddevaddr') {
+ //供应商发货地址
+ flag = true;
+ let pk_org = this.model.pk_org;
+ let pk_supplier = this.model.pk_supplier;
+ if (pk_order == null) {
+ flag = false;
+ } else {
+ if (pk_supplier == null) {
+ flag = false;
+ } else {
+ flag = true;
+ meta[ARRIVEPLAN.TABLEID].items.map((item) => {
+ if (item.attrcode == key.attrcode) {
+ item.queryCondition = () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RPVenddevaddr'
+ };
+ };
+ }
+ });
+ props.meta.setMeta(meta);
+ }
+ }
+ } else {
+ flag = false;
+ }
+
+ if (key.attrcode.startsWith('vfree')) {
+ let constance = {};
+ let pk_org = record.values.pk_org.value;
+ let materialvid = record.values.pk_material.value;
+ constance.key = key.attrcode;
+ constance.params = {
+ key: key.attrcode,
+ pk_org: pk_org,
+ materialvid: materialvid
+ };
+ flag = await vfreeBeforeEvent(this.props, constance);
+ }
+
+ return flag;
+ }
+}
+
+/*lA7FrGfHlashLvM+HJWGNfFP8qtzbZGoR0+ewRKT3vU=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/beforeEvents/index.js b/src/pu/pu/poorder/arriveplan/beforeEvents/index.js
new file mode 100644
index 0000000..9e3a2e8
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/beforeEvents/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import beforeEvent from './beforeEvent';
+export { beforeEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/btnClicks/cancelButton.js b/src/pu/pu/poorder/arriveplan/btnClicks/cancelButton.js
new file mode 100644
index 0000000..3603fa0
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/btnClicks/cancelButton.js
@@ -0,0 +1,27 @@
+/*cDw43rokbrnVLIt4MHOMtaxhprJoy7Cg3S4DrQcxPzo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单付款计划
+ * @Date: 2018-06-09 13:16:54
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-01-09 15:16:10
+ */
+import { ARRIVEPLAN, STATUS } from '../../constance';
+import { buttonController } from '../viewController/index';
+import { showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function cancelButton() {
+ showWarningDialog(getLangByResId(this, '4004POORDER-000019'), getLangByResId(this, '4004POORDER-000031'), {
+ /* 国际化处理: 确认要取消吗?*/
+ beSureBtnClick: () => {
+ // 单表也需要适配 在浏览态时勾选行去掉勾选
+ this.props.editTable.selectAllRows(ARRIVEPLAN.TABLEID, false);
+ //回到页面上次状态
+ this.props.editTable.cancelEdit(ARRIVEPLAN.TABLEID);
+ buttonController.togglePageShow.call(this, this.props, STATUS.browse);
+ }
+ });
+}
+
+/*cDw43rokbrnVLIt4MHOMtaxhprJoy7Cg3S4DrQcxPzo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/btnClicks/deleteCheck.js b/src/pu/pu/poorder/arriveplan/btnClicks/deleteCheck.js
new file mode 100644
index 0000000..508a164
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/btnClicks/deleteCheck.js
@@ -0,0 +1,28 @@
+/*U11df+h/daQqbSEMyOrrDNK7ZhE5uTMQoDECYAskF0w=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 数据权限检查
+ * @Date: 2018-08-01 19:51:18
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-22 13:43:55
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD } from '../../constance';
+
+/**
+* @param {*} callBack 回调
+*/
+export default function deleteCheck(data, callBack) {
+ ajax({
+ url: URL.arrivedeletecheckaction,
+ data: data,
+ method: 'post',
+ success: (res) => {
+ if (res && res.success && res.data == true) {
+ callBack && callBack();
+ }
+ }
+ });
+}
+
+/*U11df+h/daQqbSEMyOrrDNK7ZhE5uTMQoDECYAskF0w=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/btnClicks/index.js b/src/pu/pu/poorder/arriveplan/btnClicks/index.js
new file mode 100644
index 0000000..2cbcfd1
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/btnClicks/index.js
@@ -0,0 +1,17 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-08-31 10:08:04
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-01-07 10:42:54
+ */
+import saveButton from './saveButton';
+import print_BtnClick from './print_BtnClick';
+import cancelButton from './cancelButton';
+import searchBtnClick from './searchBtnClick';
+import deleteCheck from './deleteCheck';
+
+export { saveButton, print_BtnClick, cancelButton, searchBtnClick, deleteCheck };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/btnClicks/print_BtnClick.js b/src/pu/pu/poorder/arriveplan/btnClicks/print_BtnClick.js
new file mode 100644
index 0000000..08bedde
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/btnClicks/print_BtnClick.js
@@ -0,0 +1,35 @@
+/*9a1eTd5yO0nmu7639LcU5tOG+wP56TJsHNNZOreV3vs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 打印
+ * @Date: 2018-07-04 14:50:40
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-13 16:14:45
+ */
+import { print, toast } from 'nc-lightapp-front';
+import { ARRIVEPLAN, URL } from '../../constance';
+
+export default function print_BtnClick(props) {
+ let pks = [];
+ let selrows = props.editTable.getAllData('po_order_bb1');
+
+ selrows.rows.forEach((row) => {
+ let pk = row.values.pk_order_bb1.value;
+ if (pk) {
+ pks.push(pk);
+ }
+ });
+ if (pks && pks.length > 0) {
+ print(
+ 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
+ URL.receiveplanprint,
+ {
+ funcode: '400400800',
+ nodekey: '400400416', //模板节点标识
+ oids: pks // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印,
+ }
+ );
+ }
+}
+
+/*9a1eTd5yO0nmu7639LcU5tOG+wP56TJsHNNZOreV3vs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/btnClicks/saveButton.js b/src/pu/pu/poorder/arriveplan/btnClicks/saveButton.js
new file mode 100644
index 0000000..cf1f109
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/btnClicks/saveButton.js
@@ -0,0 +1,78 @@
+/*qx4laBTLfLnQEEUBY8FVZL5i80r/AAsBvCNp1/DGkq0=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单付款计划保存
+ * @Date: 2018-06-11 19:59:12
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-12-08 13:39:34
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, ARRIVEPLAN, FIELD, STATUS } from '../../constance';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function saveButton(props) {
+ let _this = this;
+ // 单表也需要适配 在浏览态时勾选行去掉勾选
+ props.editTable.selectAllRows(ARRIVEPLAN.TABLEID, false);
+ let column = [ 'blargess', 'btransclosed', 'crownobb1' ];
+ props.editTable.filterEmptyRows(ARRIVEPLAN.TABLEID, column);
+ //创建保存的VO
+ let allRows = props.editTable.getAllRows(ARRIVEPLAN.TABLEID, true);
+ allRows.forEach((row, index) => {
+ let sta = row.status;
+ let pk_order_bb1 = row && row.values && row.values.pk_order_bb1 && row.values.pk_order_bb1.value;
+ pk_order_bb1 = pk_order_bb1 == null ? '' : pk_order_bb1;
+ if (sta == 3 && pk_order_bb1 == '') {
+ // 新增时过滤掉删除的数据
+ allRows.splice(index, 1);
+ }
+ });
+ let isSave = props.editTable.checkRequired(ARRIVEPLAN.TABLEID, allRows);
+ if (!isSave) {
+ return;
+ }
+ let data = {};
+ if (allRows && allRows.length > 0) {
+ let model = {
+ areacode: ARRIVEPLAN.TABLEID,
+ areaType: 'table',
+ rows: allRows
+ };
+ data = {
+ pageid: ARRIVEPLAN.PAGECODE,
+ model: model
+ };
+ } else {
+ buttonController.togglePageShow.call(this, props, STATUS.browse);
+ showSuccessInfo(getLangByResId(_this, '4004POORDER-000005')); /* 国际化处理: 保存成功!*/
+ return;
+ }
+ delete data.attrcode;
+
+ ajax({
+ method: 'post',
+ url: URL.arriveplansave,
+ data: data,
+ success: function(res) {
+ let { success, data } = res;
+ if (success) {
+ let rowsData = { rows: [] };
+ if (data == undefined) {
+ props.editTable.setTableData(ARRIVEPLAN.TABLEID, rowsData);
+ } else {
+ rowsData = data[ARRIVEPLAN.TABLEID];
+ rowsData.rows.forEach((row) => {
+ row.values.crownobb1.display = row.values.crownobb1.value;
+ });
+ props.editTable.setTableData(ARRIVEPLAN.TABLEID, rowsData);
+ }
+ }
+ buttonController.togglePageShow.call(this, props, STATUS.browse);
+ showSuccessInfo(getLangByResId(_this, '4004POORDER-000005')); /* 国际化处理: 保存成功!*/
+ }
+ });
+}
+
+/*qx4laBTLfLnQEEUBY8FVZL5i80r/AAsBvCNp1/DGkq0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/btnClicks/searchBtnClick.js b/src/pu/pu/poorder/arriveplan/btnClicks/searchBtnClick.js
new file mode 100644
index 0000000..e473fc8
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/btnClicks/searchBtnClick.js
@@ -0,0 +1,38 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, ARRIVEPLAN, STATUS } from '../../constance';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function searchBtnClick(props, pk_order, isRefresh) {
+ if (pk_order) {
+ ajax({
+ url: URL.arriveplanquery,
+ data: {
+ pks: [ pk_order ],
+ pageid: ARRIVEPLAN.PAGECODE
+ },
+ success: (res) => {
+ let { success, data } = res;
+ let rowsData = { rows: [] };
+ if (data) {
+ rowsData = data[ARRIVEPLAN.TABLEID];
+ }
+ rowsData.rows.forEach((row) => {
+ row.values.crownobb1.display = row.values.crownobb1.value;
+ });
+ props.editTable.setTableData(ARRIVEPLAN.TABLEID, rowsData);
+ buttonController.togglePageShow.call(this, props, STATUS.browse);
+ // toast({color: 'success',content: getLangByResId(this, '4004POORDER-000006')});
+ /* 国际化处理: 查询成功!*/
+ isRefresh == true ? showRefreshInfo() : showSuccessInfo(getLangByResId(this, '4004POORDER-000006'));
+ }
+ });
+ } else {
+ let empty = { rows: [] };
+ props.editTable.setTableData(ARRIVEPLAN.TABLEID, empty);
+ }
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/index.js b/src/pu/pu/poorder/arriveplan/index.js
new file mode 100644
index 0000000..cab6f20
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/index.js
@@ -0,0 +1,161 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 到货计划模态框
+ * @Date: 2018-06-28 09:15:54
+<<<<<<< HEAD
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2022-08-04 16:29:25
+=======
+ * @Last Modified by: chuaijl
+ * @Last Modified time: 2023-09-21 16:23:51
+>>>>>>> develop-fea-cf
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal, NCDiv } = base;
+import { initTemplate } from './init';
+import { STATUS, LIST_BUTTON, URL, ARRIVEPLAN } from '../constance';
+import { afterEvent } from './afterEvent';
+import { beforeEvent } from './beforeEvents';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonClickController, buttonController, btnClickController } from './viewController/index';
+import { batchEvents } from './batchEvents';
+
+class ArrivePlan extends Component {
+ constructor(props) {
+ super(props);
+ props.use.editTable(ARRIVEPLAN.TABLEID);
+ this.state = {
+ state: STATUS.browse,
+ pk_order: null,
+ queryDataFlag: true
+ };
+ //前端模型 编辑前参数
+ this.model = {
+ pk_org: null,
+ pk_customer: null,
+ pk_supplier: null,
+ context: null,
+ pk_order: null,
+ currentIndex: 0
+ };
+ initLang(this, [ '4004poorder', '4004pub' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillMount() {
+ // 关闭浏览器
+ window.addEventListener('beforeunload', this.handleBeforeUnload);
+ }
+
+ componentWillUnmount() {
+ // 组件卸载时移除事件监听, 防止内存泄漏
+ window.removeEventListener('beforeunload', this.handleBeforeUnload);
+ }
+
+ handleBeforeUnload = (event) => {
+ this.setState({ queryDataFlag: true });
+ let status = this.props.editTable.getStatus(ARRIVEPLAN.TABLEID);
+ if (status == STATUS.edit) {
+ event.returnValue = getLangByResId(this, '4004POORDER-000054');
+ }
+ };
+
+ componentWillReceiveProps(nextProps) {
+ if (this.props.showModal && nextProps.showModal && this.state.queryDataFlag) {
+ let pk_order = nextProps.pk_order;
+ if (pk_order) {
+ this.model.pk_order = pk_order;
+ this.model.pk_org = nextProps.pk_org;
+ this.model.pk_customer = nextProps.pk_customer;
+ this.model.pk_supplier = nextProps.pk_supplier;
+ this.queryData(pk_order);
+ }
+ }
+ }
+
+ /**
+ * 查询数据
+ */
+ queryData = (pk_order) => {
+ ajax({
+ url: URL.arriveplanquery,
+ data: {
+ pks: [ pk_order ],
+ pageid: ARRIVEPLAN.PAGECODE
+ },
+ success: (res) => {
+ let { success, data } = res;
+ let rowsData = { rows: [] };
+ this.setState({ queryDataFlag: false });
+ if (data) {
+ rowsData = data[ARRIVEPLAN.TABLEID];
+ }
+ rowsData.rows.forEach((row) => {
+ row.values.crownobb1.display = row.values.crownobb1.value;
+ });
+ this.props.editTable.setTableData(ARRIVEPLAN.TABLEID, rowsData);
+ setTimeout(() => {
+ buttonController.togglePageShow.call(this, this.props, STATUS.browse);
+ }, 0);
+ }
+ });
+ buttonController.initButtonVisible.call(this);
+ };
+
+ render() {
+ const { createEditTable } = this.props.editTable;
+ return (
+
+
{
+ let status = this.props.editTable.getStatus(ARRIVEPLAN.TABLEID);
+ this.props.onClose(status);
+ }}
+ fieldid="po_arriveplanmodal"
+ >
+
+ {getLangByResId(this, '4004POORDER-000007')}
+
+
+
+
+
+ {this.props.button.createButtonApp({
+ area: ARRIVEPLAN.LIST_TITLE,
+ onButtonClick: buttonClickController.bind(this),
+ modalRelation: 'to'
+ })}
+
+
+
+
+ {/* 列表区域 */}
+ {createEditTable(ARRIVEPLAN.TABLEID, {
+ height: 465,
+ showIndex: true, //显示序号
+ showCheck: true,
+ inModal: true,
+ onBeforeEvent: beforeEvent.bind(this),
+ onAfterEvent: afterEvent.bind(this),
+ onSelected: buttonController.selectedChange.bind(this),
+ onBatchSelected: buttonController.selectedChange.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ onSelectedAll: buttonController.selectedChange.bind(this)
+ // adaptionHeight: true
+ })}
+
+
+
+
+
+ );
+ }
+}
+export default (ArrivePlan = createPage({})(ArrivePlan));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/init/index.js b/src/pu/pu/poorder/arriveplan/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/init/initTemplate.js b/src/pu/pu/poorder/arriveplan/init/initTemplate.js
new file mode 100644
index 0000000..f837bc9
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/init/initTemplate.js
@@ -0,0 +1,67 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * 模板初始化
+ * @Author: CongKe
+ * @Date: 2018-06-07 12:45:19
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-10-20 11:00:45
+ */
+import { ARRIVEPLAN, LIST_BUTTON, STATUS, APPCODE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonClickController, buttonController } from '../viewController/index';
+import { columnSortUtils } from '../../../../../scmpub/scmpub/pub/tool/columnSortUtils';
+
+export default function(props) {
+ let _this = this;
+ this.props.createUIDom(
+ {
+ appcode: APPCODE.orderAppCode,
+ pagecode: ARRIVEPLAN.PAGECODE
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modifier.call(this, meta, props);
+ // 订单行号排序
+ columnSortUtils.numberSort(meta, ARRIVEPLAN.TABLEID, 'crownobb1');
+ this.props.meta.setMeta(meta, () => {});
+ }
+ if (data.button) {
+ let button = data.button;
+ this.props.button.setButtons(button);
+ }
+ buttonController.togglePageShow.call(this, props, STATUS.browse);
+ }
+ }
+ );
+}
+
+/**
+ * 列表数据后处理修饰
+ * @param meta
+ * @param {*} props
+ */
+function modifier(meta, props) {
+ let material_event = {
+ label: getLangByResId(this, '4004POORDER-000008') /* 国际化处理: 操作*/,
+ itemtype: 'customer',
+ attrcode: 'opr',
+ width: '150px',
+ visible: true,
+ fixed: 'right',
+ render: (text, record, mindex) => {
+ let buttonAry =
+ props.editTable.getStatus(ARRIVEPLAN.TABLEID) === STATUS.browse ? [] : [ LIST_BUTTON.CopyLine ];
+ return props.button.createOprationButton(buttonAry, {
+ area: ARRIVEPLAN.TABLEINNER,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => buttonClickController.call(this, props, key, text, record, mindex)
+ });
+ }
+ };
+ meta[ARRIVEPLAN.TABLEID].items.push(material_event);
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/viewController/btnClickController.js b/src/pu/pu/poorder/arriveplan/viewController/btnClickController.js
new file mode 100644
index 0000000..a5ec629
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/viewController/btnClickController.js
@@ -0,0 +1,199 @@
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 付款计划按钮功能
+ * @Date: 2018-05-09 11:29:02
+ * @Last Modified by: chuaijl
+ * @Last Modified time: 2023-12-12 16:22:58
+ */
+import { toast } from 'nc-lightapp-front';
+import { deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { LIST_BUTTON, ARRIVEPLAN, STATUS, PAGECODE } from '../../constance';
+import { searchBtnClick, cancelButton, saveButton, print_BtnClick, deleteCheck } from '../btnClicks/index';
+import { buttonController } from './index';
+import { YYC_BUTTON_ARRAY } from '../../../yyc/constance';
+import { arrivePlanYYCBtnClick } from '../../../yyc/ext/yycBtnClick';
+
+export default function(props, key, text, record, index) {
+ let pk;
+ let rowindex = [];
+ let rows = props.editTable.getCheckedRows(ARRIVEPLAN.TABLEID);
+ let closerows = [];
+ if (rows.length > 0) {
+ rows.map((item) => {
+ rowindex.push(item.index);
+ });
+ }
+ pk = rows && rows[0] && rows[0].rows && rows[0].rows.values.pk_order.value;
+ switch (key) {
+ case LIST_BUTTON.Edit: // 修改
+ // 单表也需要适配 在浏览态时勾选行去掉勾选
+ props.editTable.selectAllRows(ARRIVEPLAN.TABLEID, false);
+ buttonController.togglePageShow.call(this, this.props, STATUS.edit);
+ break;
+ case LIST_BUTTON.SMS_CIRCULAR: // 短信通知
+ break;
+ case LIST_BUTTON.Print: // 打印
+ print_BtnClick.call(this, this.props);
+ break;
+ case LIST_BUTTON.Refresh: //刷新
+ searchBtnClick.call(this, this.props, this.model.pk_order, true);
+ break;
+ case LIST_BUTTON.Add: //新增
+ props.editTable.addRow(ARRIVEPLAN.TABLEID);
+ break;
+ case LIST_BUTTON.Delete: //删除
+ if (rows.length > 0) {
+ let emptyline = [];
+ rows.map((item) => {
+ let index = item.index;
+ let pk_order_bb1 = item.data.values.pk_order_bb1.value;
+ pk_order_bb1 = pk_order_bb1 == null ? '' : pk_order_bb1;
+ if (pk_order_bb1 == '') {
+ emptyline.push(index);
+ }
+ });
+ if (emptyline && emptyline.length > 0) {
+ props.editTable.deleteTableRowsByIndex(ARRIVEPLAN.TABLEID, emptyline);
+ }
+ buttonController.togglePageShow.call(this, this.props, STATUS.edit);
+ rows = props.editTable.getCheckedRows(ARRIVEPLAN.TABLEID);
+ }
+ if (rows && rows.length > 0) {
+ let ndata = new Array();
+ rows.map((item) => {
+ ndata.push(item.data);
+ });
+ let model = {
+ areacode: ARRIVEPLAN.TABLEID,
+ areaType: 'table',
+ rows: ndata
+ };
+ let checkdata = {
+ pageid: ARRIVEPLAN.PAGECODE,
+ model: model
+ };
+ deleteCheck.call(this, checkdata, () => {
+ if (rowindex && rowindex.length > 0) {
+ props.editTable.deleteTableRowsByIndex(ARRIVEPLAN.TABLEID, rowindex);
+ }
+ buttonController.togglePageShow.call(this, this.props, STATUS.edit);
+ });
+ }
+ break;
+ case LIST_BUTTON.Save: //保存
+ saveButton.call(this, props);
+ break;
+ case LIST_BUTTON.Cancel: //取消
+ cancelButton.call(this);
+ break;
+ case LIST_BUTTON.DelLine: //删行
+ if (rows && rows.length > 0) {
+ let model = {
+ areacode: ARRIVEPLAN.TABLEID,
+ areaType: 'table',
+ rows: rows
+ };
+ let data = {
+ pageid: ARRIVEPLAN.PAGECODE,
+ model: model
+ };
+ deleteCheck.call(this, data, () => {
+ props.editTable.deleteTableRowsByRowId(ARRIVEPLAN.TABLEID, record.rowid);
+ buttonController.togglePageShow.call(this, this.props, STATUS.edit);
+ });
+ }
+ break;
+ case LIST_BUTTON.CopyLine: //复制行
+ let planrows = props.editTable.getAllRows(ARRIVEPLAN.TABLEID);
+ let vbillcode = record.values.vbillcode.value;
+
+ // 校验是否行关闭且累计到货数量是否大于0
+ if (record.values.naccumreceivenum && record.values.naccumreceivenum.value > 0) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000133', { 0: vbillcode })); // 到货计划{0}存在后续单据,不能复制!
+ return;
+ }
+ // let fisactive = record.values.fisactive.value;
+ // if(fisactive && fisactive == 1) {
+ // showWarningInfo(null, '到货计划' + vbillcode + '相关订单行已关闭,不能复制!');
+ // return;
+ // }
+ let pk_order_b = record.values.pk_order_b.value;
+ let cardrows = props.cardProps.cardTable.getAllRows(PAGECODE.cardbody);
+ for (let i = 0; i < cardrows.length; i++) {
+ if (
+ cardrows[i].values.pk_order_b.value == pk_order_b &&
+ cardrows[i].values.fisactive &&
+ cardrows[i].values.fisactive.value &&
+ cardrows[i].values.fisactive.value == 1
+ ) {
+ // 行已关闭
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000134', { 0: vbillcode })); // 到货计划{0}相关订单行已关闭,不能复制!
+ return;
+ }
+ }
+ if (vbillcode) {
+ let MAX_CODE = 1;
+ planrows.forEach((row) => {
+ let num = new Number(row.values.vbillcode.value.split('-')[1]);
+ if (num > MAX_CODE) {
+ MAX_CODE = num;
+ }
+ });
+
+ let newnum = prefixInteger(MAX_CODE + 1, 4);
+ let newcode = vbillcode.split('-')[0] + '-' + newnum;
+ let newrecord = deepClone(record);
+ newrecord.values.vbillcode.value = newcode;
+ newrecord.values['pk_order_bb1'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['bpublish'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['breleasedover'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['fcoopstatus'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['vreason'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['norigordernum'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['dorigplanarrvdate'] = { value: null, display: null, scale: '-1' };
+ props.editTable.pasteRow(ARRIVEPLAN.TABLEID, newrecord, planrows.length - 1);
+ } else {
+ let newrecord = deepClone(record);
+ newrecord.values['pk_order_bb1'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['bpublish'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['breleasedover'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['fcoopstatus'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['vreason'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['norigordernum'] = { value: null, display: null, scale: '-1' };
+ newrecord.values['dorigplanarrvdate'] = { value: null, display: null, scale: '-1' };
+ props.editTable.pasteRow(ARRIVEPLAN.TABLEID, newrecord, planrows.length - 1);
+ }
+ // setPKempty(props, index + 1);
+ break;
+ default:
+ break;
+ }
+ // 友云采扩展 add by guozhq
+ if (YYC_BUTTON_ARRAY.includes(key)) {
+ arrivePlanYYCBtnClick.call(this, props, key, {
+ isList: true,
+ listArea: ARRIVEPLAN.TABLEID,
+ billidField: 'pk_order_bb1',
+ pageCode: ARRIVEPLAN.PAGECODE
+ });
+ // 在浏览态时勾选行去掉勾选
+ props.editTable.selectAllRows(ARRIVEPLAN.TABLEID, false);
+ }
+}
+
+function prefixInteger(num, length) {
+ return (Array(length).join('0') + num).slice(-length);
+}
+
+function setPKempty(props, index) {
+ props.editTable.setValByKeyAndIndex(ARRIVEPLAN.TABLEID, index, 'pk_order_bb1', {
+ value: null,
+ display: null,
+ scale: '-1'
+ });
+}
+
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/viewController/buttonController.js b/src/pu/pu/poorder/arriveplan/viewController/buttonController.js
new file mode 100644
index 0000000..13b6e89
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/viewController/buttonController.js
@@ -0,0 +1,73 @@
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
+import { ARRIVEPLAN, LIST_BUTTON, STATUS } from '../../constance';
+import { arrivePlanBtnControl } from '../../../yyc/ext/yycBtnControl';
+import { YYC_BUTTON_ID } from '../../../yyc/constance/index';
+import { isYYC } from '../../../yyc/ext/yycBtnInit';
+
+/**
+ * 根据页面状态,修改编辑态表格
+ * @param {*} props
+ * @param {*} status
+ */
+function togglePageShow(props, status) {
+ let flag = true;
+ if (status === STATUS.browse) {
+ flag = false;
+ props.editTable.hideColByKey(ARRIVEPLAN.TABLEID, 'opr');
+ } else {
+ props.editTable.setStatus(ARRIVEPLAN.TABLEID, STATUS.edit);
+ props.editTable.showColByKey(ARRIVEPLAN.TABLEID, 'opr');
+ }
+ //edit
+ props.button.setButtonVisible([ LIST_BUTTON.Add, LIST_BUTTON.Delete, LIST_BUTTON.Cancel, LIST_BUTTON.Save ], flag);
+ //browse
+ props.button.setButtonVisible(
+ [ LIST_BUTTON.Edit, LIST_BUTTON.SMS_CIRCULAR, LIST_BUTTON.Print, LIST_BUTTON.Refresh ],
+ !flag
+ );
+ // --------START---友云采按钮控制--------------
+ if (isYYC()) {
+ props.button.setButtonVisible([ YYC_BUTTON_ID.SendToYC, YYC_BUTTON_ID.CancelSendToYC ], !flag);
+ }
+ // --------END--------------------------------
+ let check = props.editTable.getCheckedRows(ARRIVEPLAN.TABLEID);
+ let isshowdel = check.length > 0 ? false : true;
+ let rowNumbers = props.editTable.getNumberOfRows(ARRIVEPLAN.TABLEID);
+ let disabled = rowNumbers > 0 ? false : true;
+ props.button.setDisabled([ LIST_BUTTON.Print ], disabled);
+ props.button.setDisabled([ LIST_BUTTON.Delete ], isshowdel);
+ props.editTable.setStatus(ARRIVEPLAN.TABLEID, status);
+}
+
+/**
+ * 按钮状态初始化
+ */
+function initButtonVisible() {
+ let flag = true;
+ this.props.button.setButtonsVisible({
+ [LIST_BUTTON.Edit]: flag,
+ [LIST_BUTTON.SMS_CIRCULAR]: flag,
+ [LIST_BUTTON.Print]: flag,
+ [LIST_BUTTON.Refresh]: flag,
+ [LIST_BUTTON.Add]: !flag,
+ [LIST_BUTTON.Delete]: !flag,
+ [LIST_BUTTON.Save]: !flag,
+ [LIST_BUTTON.Cancel]: !flag
+ });
+ // --------START---友云采按钮控制--------------
+ arrivePlanBtnControl(this.props, { listArea: ARRIVEPLAN.LIST_TITLE });
+ // --------END--------------------------------
+}
+
+/**
+ * 勾选事件
+ */
+function selectedChange() {
+ let rows = this.props.editTable.getCheckedRows(ARRIVEPLAN.TABLEID);
+ let disable = rows.length > 0 ? false : true;
+ this.props.button.setDisabled([ LIST_BUTTON.Print, LIST_BUTTON.Delete ], disable);
+}
+
+export default { togglePageShow, initButtonVisible, selectedChange };
+
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/arriveplan/viewController/index.js b/src/pu/pu/poorder/arriveplan/viewController/index.js
new file mode 100644
index 0000000..b46b0a0
--- /dev/null
+++ b/src/pu/pu/poorder/arriveplan/viewController/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import buttonClickController from './btnClickController';
+import buttonController from './buttonController';
+
+export { buttonClickController, buttonController };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/atpquery/index.js b/src/pu/pu/poorder/atpquery/index.js
new file mode 100644
index 0000000..9ce6ba3
--- /dev/null
+++ b/src/pu/pu/poorder/atpquery/index.js
@@ -0,0 +1,102 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 存量查询模态框
+ * @Date: 2018-06-28 09:15:54
+ * @Last Modified by: hufeim
+ * @Last Modified time: 2023-03-30 14:02:46
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal } = base;
+import { initTemplate } from './init';
+import { URL, STOCKQUERY } from '../constance';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class StockQuery extends Component {
+ constructor(props) {
+ super(props);
+ props.use.table(STOCKQUERY.TABLEID);
+ this.state = {
+ pk: null,
+ queryDataFlag: false
+ };
+ //前端模型
+ this.model = {
+ context: null,
+ param: null,
+ currentIndex: 0
+ };
+ // initTemplate.call(this, props);
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (this.state.queryDataFlag) {
+ this.setState({
+ queryDataFlag: false
+ });
+ return;
+ }
+ if (nextProps && nextProps.stockquerydata != null && nextProps.showModal) {
+ this.model.param = nextProps.stockquerydata;
+ this.queryData(this.model.param);
+ }
+ }
+
+ /**
+ * 查询数据
+ */
+ queryData = (param) => {
+ ajax({
+ url: URL.stockquery,
+ data: param,
+ success: (res) => {
+ let { success, data } = res;
+ let rowsData = { rows: [] };
+ if (data) {
+ //初始化模型
+ rowsData = data[STOCKQUERY.TABLEID];
+ }
+ this.setState(
+ {
+ queryDataFlag: true
+ },
+ () => {
+ this.props.table.setAllTableData(STOCKQUERY.TABLEID, rowsData);
+ }
+ );
+ }
+ });
+ };
+
+ render() {
+ const { createSimpleTable } = this.props.table;
+ return (
+
+
+
+ {getLangByResId(this, '4004POORDER-000009')}
+ {/* 国际化处理: 存量查询*/}
+
+
+ {createSimpleTable(STOCKQUERY.TABLEID, {
+ showIndex: true
+ })}
+
+
+
+ );
+ }
+}
+export default (StockQuery = createPage({})(StockQuery));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/atpquery/init/index.js b/src/pu/pu/poorder/atpquery/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/poorder/atpquery/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/atpquery/init/initTemplate.js b/src/pu/pu/poorder/atpquery/init/initTemplate.js
new file mode 100644
index 0000000..bab2226
--- /dev/null
+++ b/src/pu/pu/poorder/atpquery/init/initTemplate.js
@@ -0,0 +1,27 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * 模板初始化
+ * @Author: guozhq
+ * @Date: 2018-06-07 12:45:19
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-07-10 10:23:06
+ */
+import { STOCKQUERY } from '../../constance';
+export default function(props) {
+ let _this = this;
+ props.createUIDom(
+ {
+ pagecode: STOCKQUERY.PAGECODE
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta);
+ }
+ }
+ }
+ );
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/afterEvents.js b/src/pu/pu/poorder/card/afterEvents/afterEvents.js
new file mode 100644
index 0000000..7f8a3c5
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/afterEvents.js
@@ -0,0 +1,34 @@
+/*KgNfvpwDZe8QWUV1CjKJKF6VBiC1GwKQjRugxXnM8+U=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 编辑后事件
+ * @Date: 2018-12-13 17:03:17
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-14 14:28:33
+ */
+
+import { PAGECODE } from '../../constance';
+import headAfterEvent from './headAfterEvent';
+import bodyAfterEvent from './bodyAfterEvent';
+import paymentAfterEvent from './paymentAfterEvent';
+import feeAfterEvent from './feeAfterEvent';
+import feeDetailAfterEvent from './feeDetailAfterEvent';
+
+export default function afterEvents(props, moduleId, key, value, changeRow, index, record) {
+ if (moduleId === PAGECODE.cardhead) {
+ headAfterEvent.call(this, props, moduleId, key, value, changeRow, index, record);
+ } else if (moduleId === PAGECODE.head_payment) {
+ // 付款协议 19/01/15平台已支持拉单推单缓存页面数据
+ paymentAfterEvent.call(this, props, moduleId, key, value, changeRow, index, record);
+ // buttonController.cachedata.call(this);
+ } else if (moduleId === PAGECODE.card_fee) {
+ feeAfterEvent.call(this, props, moduleId, key, value, changeRow, index, record);
+ } else if (moduleId === PAGECODE.card_fee_detail) {
+ feeDetailAfterEvent.call(this, props, moduleId, key, value, changeRow, index, record);
+ } else {
+ // 物料表体
+ bodyAfterEvent.call(this, props, moduleId, key, value, changeRow, index, record);
+ }
+}
+
+/*KgNfvpwDZe8QWUV1CjKJKF6VBiC1GwKQjRugxXnM8+U=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/bodyAfterEvent.js b/src/pu/pu/poorder/card/afterEvents/bodyAfterEvent.js
new file mode 100644
index 0000000..6b2752c
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/bodyAfterEvent.js
@@ -0,0 +1,811 @@
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-12-13 17:06:24
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-10-07 10:53:10
+ */
+import { ajax, promptBox } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, TRANSFER, ITEMFEEPRICE } from '../../constance';
+import RelateCTDLG from '../../relateCT/list';
+import { processBatchCodeValue } from '../../../pub/utils/batchCodeUtil';
+import { showErrorInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import {
+ createExtBodyAfterEventData,
+ processExtBillCardBodyEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { processCardTableAutoAddRow } from '../../../../../scmpub/scmpub/pub/tool/autoAddRowUtil';
+import { dealFormulaMsg } from '../../../../../scmpub/scmpub/pub/tool/formulaMsgUtils';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { processExtBillFeeDetailsEditResult } from '../../../pub/utils/feeAfterUtil';
+
+let bodyids = [ PAGECODE.cardbody ];
+// let bodyid=[PAGECODE.cardbody,PAGECODE.head_payment];
+let tableCommonCloumn = [
+ 'castunitid',
+ 'nqtorigtaxprice',
+ 'ntaxrate',
+ 'pk_arrvstoorg_v',
+ 'pk_arrliabcenter_v',
+ 'cqtunitid',
+ 'pk_receiveaddress',
+ 'crececountryid',
+ 'pk_recvstordoc',
+ 'pk_reqstoorg_v',
+ 'csendcountryid',
+ 'pk_psfinanceorg_v',
+ 'vvenddevaddr',
+ 'ctaxcodeid',
+ 'ctaxcountryid',
+ 'ncalcostmny',
+ 'ncaltaxmny',
+ 'nexchangerate',
+ 'nglobalmny',
+ 'nglobaltaxmny',
+ 'nitemdiscountrate',
+ 'nmaxprice',
+ 'nmny',
+ 'nnetprice',
+ 'nnopayorgmny',
+ 'nnosubtax',
+ 'nnosubtaxrate',
+ 'nnum',
+ 'norigmny',
+ 'norignetprice',
+ 'norigprice',
+ 'norigtaxmny',
+ 'norigtaxnetprice',
+ 'norigtaxprice',
+ 'nprice',
+ 'nqtnetprice',
+ 'nqtorignetprice',
+ 'nqtorigprice',
+ 'nqtorigtaxnetprc',
+ 'nqtorigtaxprice',
+ 'nqtprice',
+ 'nqttaxnetprice',
+ 'nqttaxprice',
+ 'nqtunitnum',
+ 'ntax',
+ 'ntaxmny',
+ 'ntaxnetprice',
+ 'ntaxprice',
+ 'vchangerate',
+ 'vqtunitrate',
+ 'pk_apfinanceorg_v',
+ 'cproductorid',
+ 'cqualitylevelid',
+ 'cdevareaid',
+ 'ccontractid',
+ 'ngroupexchgrate',
+ 'nglobalexchgrate',
+ 'blargess',
+ 'cratetype',
+ 'pk_supplier_v',
+ 'pk_supplier',
+ 'casscustid',
+ 'casscustvid',
+ 'dplanarrvdate'
+];
+let headCommonCloumn = [
+ 'ctrantypeid',
+ 'pk_supplier',
+ 'pk_payterm',
+ 'pk_invcsupllier',
+ 'dbilldate',
+ 'corigcurrencyid',
+ 'pk_recvcustomer',
+ 'fhtaxtypeflag',
+ 'nhtaxrate',
+ 'pk_dept_v',
+ 'cemployeeid'
+];
+const FixAssts = [ 'casscustid', 'cproductorid', 'cprojectid', 'pk_supplier', 'cffileid' ];
+
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ let _this = this;
+ if (key == FIELD.pk_material) {
+ let bodyidsfee = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ //物料多选增行
+ if (JSON.stringify(value || {}) != '{}' && value.length != 0) {
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyidsfee,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(PAGECODE.cardbody);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ aggvos.index = index; //序号
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ } else {
+ // 清空当前行 单位、换算率、主单位、物料名称、规格、型号、物料版本
+ let clearBodyItems = [
+ 'castunitid',
+ 'vchangerate',
+ 'cunitid',
+ 'pk_material.name',
+ 'pk_material.version',
+ 'pk_material.materialspec',
+ 'pk_material.materialtype',
+ 'pk_srcmaterial',
+ 'cffileid'
+ ];
+ let emptyData = { value: null, display: null, scale: '-1' };
+ for (let bodyItem of clearBodyItems) {
+ this.props.cardTable.setValByKeyAndIndex(PAGECODE.cardbody, index, bodyItem, emptyData);
+ }
+ // 删除对应的费用明细
+ delFeeDetailByBody.call(this, props, record);
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ }
+ // js端提示 "关联合同出错" "第{0}行合同累计订单数量大于合同数量,订单数量置为0,请手工修改数量."
+ // * 如果不为空,且不为0,则返回null。即数量为空或者为0,才去修改主数量 主数量 累计订单主数量
+ } else if (tableCommonCloumn.includes(key)) {
+ // 计量单位、数量、含税单价、价税合计、税率 联动算法、收货库存组织、收货利润中心、报价单位、收货地址、收货国家/地区、
+ // 收货仓库、需求库存组织、发货国/地区、结算财务组织、供应商发货地址、税码、报税国/地区、应付组织、生产厂商、质量等级、
+ // 收货地区、合同信息、组织汇率类型
+ let feedatas = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ let feedetailsdatas = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ if (
+ (key == FIELD.pk_psfinanceorg_v && feedatas && feedatas.length > 0) ||
+ (key == FIELD.pk_psfinanceorg_v && feedetailsdatas && feedetailsdatas.length > 0)
+ ) {
+ if (value.value == null || value == '' || value instanceof Array || Object.keys(value.value).length === 0) {
+ let pk_order_b = props.cardTable.getValByKeyAndRowId(
+ PAGECODE.cardbody,
+ changedrows[0].rowid,
+ FIELD.pk_order_b
+ );
+ let id = pk_order_b.value == null ? changedrows[0].rowid : pk_order_b.value;
+ showWarningDialog(
+ getLangByResId(_this, '4004POORDER-000010'),
+ getLangByResId(_this, '4004POORDER-000165'),
+ {
+ /* 国际化处理: 确认修改,修改结算财务组织,会清空您费用明细页签录入的对应费用项信息,请确认是否修改?*/
+ beSureBtnClick: () => {
+ if (changedrows && changedrows[0].newvalue.value != changedrows[0].oldvalue.value) {
+ let aggvos = createExtBodyAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId);
+ }
+ let datas = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let delrowid = [];
+ if (datas) {
+ datas.forEach((item) => {
+ if (id == item.values[FIELD.pk_order_b].value) {
+ delrowid.push(item.rowid);
+ }
+ });
+ }
+ // 删除结算财务组织对应的费用明细
+ if (delrowid.length > 0) {
+ delrowid.forEach((rowid) => {
+ props.cardTable.delRowByRowId(PAGECODE.card_fee_detail, rowid);
+ });
+ }
+ let feedatas = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (feedatas != null && feedatas.length > 0) {
+ // 处理没有权限的费用项
+ deleteFee.call(this, props);
+ }
+ },
+ cancelBtnClick: () => {
+ props.cardTable.setValByKeyAndRowId(
+ PAGECODE.cardbody,
+ changedrows[0].rowid,
+ FIELD.pk_psfinanceorg_v,
+ {
+ value: changedrows[0].oldvalue.value,
+ display: changedrows[0].oldvalue.display
+ }
+ );
+ }
+ }
+ );
+ } else if (changedrows && changedrows[0].newvalue.value != changedrows[0].oldvalue.value) {
+ // 获取当前财务组织的oid
+ let pk_order_b = props.cardTable.getValByKeyAndRowId(
+ PAGECODE.cardbody,
+ changedrows[0].rowid,
+ FIELD.pk_order_b
+ );
+ let id = pk_order_b.value == null ? changedrows[0].rowid : pk_order_b.value;
+ showWarningDialog(
+ getLangByResId(_this, '4004POORDER-000010'),
+ getLangByResId(_this, '4004POORDER-000165'),
+ {
+ /* 国际化处理: 确认修改,修改结算财务组织,会清空您费用明细页签录入的对应费用项信息,请确认是否修改?*/
+ beSureBtnClick: () => {
+ if (changedrows && changedrows[0].newvalue.value != changedrows[0].oldvalue.value) {
+ let aggvos = createExtBodyAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId);
+ }
+ let datas = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let delrowid = [];
+ if (datas) {
+ datas.forEach((item) => {
+ if (id == item.values[FIELD.pk_order_b].value) {
+ delrowid.push(item.rowid);
+ }
+ });
+ }
+ // 删除结算财务组织对应的费用明细
+ if (delrowid.length > 0) {
+ delrowid.forEach((rowid) => {
+ props.cardTable.delRowByRowId(PAGECODE.card_fee_detail, rowid);
+ });
+ }
+ let feedatas = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (feedatas != null && feedatas.length > 0) {
+ // 处理没有权限的费用项
+ deleteFee.call(this, props);
+ }
+ },
+ cancelBtnClick: () => {
+ props.cardTable.setValByKeyAndRowId(
+ PAGECODE.cardbody,
+ changedrows[0].rowid,
+ FIELD.pk_psfinanceorg_v,
+ {
+ value: changedrows[0].oldvalue.value,
+ display: changedrows[0].oldvalue.display
+ }
+ );
+ }
+ }
+ );
+ }
+ } else {
+ if (changedrows && changedrows[0].newvalue.value != changedrows[0].oldvalue.value) {
+ if (ITEMFEEPRICE.includes(key)) {
+ // 需要联动费用明细的字段
+ let bodyidsfee = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ _this.props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyidsfee,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ } else {
+ // 不需要联动费用明细的字段
+ let aggvos = createExtBodyAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ }
+ }
+ }
+ } else if (key == FIELD.nastnum) {
+ if (changedrows && changedrows[0].newvalue.value != changedrows[0].oldvalue.value) {
+ let nbreturn = props.form.getFormItemsValue(PAGECODE.cardhead, 'breturn');
+ nbreturn = nbreturn && nbreturn.value;
+ if (nbreturn && value > 0) {
+ showErrorInfo(null, getLangByResId(_this, '4004POORDER-000013')); /* 国际化处理: 提示,退货订单,数量不允许为正*/
+ let noldvalue = changedrows[0].oldvalue.value;
+ //旧值设置回去
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'nastnum', { value: noldvalue });
+ } else {
+ // let aggvos = createExtBodyAfterEventData(
+ // props,
+ // PAGECODE.cardcode,
+ // PAGECODE.cardhead,
+ // bodyids,
+ // moduleId,
+ // key,
+ // changedrows,
+ // index,
+ // null
+ // );
+ // aggvos.index = index;
+ // aggvos.changedrows = changedrows;
+ // getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ let bodyidsfee = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ _this.props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyidsfee,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ }
+ }
+ } else if (key === 'vbatchcode') {
+ //批次号
+ //暂时先写成这个,具体要根据nc改一下
+ let userobject = {};
+ let CLEARFIELDS = [
+ 'crowno', //行号
+ 'nnum',
+ //'vchangerate', //换算率
+ //'vqtunitrate' //报价换算率
+ 'rowid'
+ ];
+ userobject = processBatchCodeValue(props, moduleId, value, CLEARFIELDS);
+ if (!userobject) {
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'vbatchcode', {
+ value: null,
+ display: null
+ });
+ props.cardTable.setValByKeyAndIndex(moduleId, index, 'pk_batchcode', {
+ value: null,
+ display: null
+ });
+ return;
+ }
+ let aggvos = createExtBodyAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ userobject
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ } else if (key == 'ftaxtypeflag') {
+ //扣税类别
+ if (changedrows && changedrows[0].newvalue.value != changedrows[0].oldvalue.value) {
+ // props.cardTable.setValByKeyAndIndex(moduleId, index, 'ftaxtypeflag', {
+ // value: changedrows.value,
+ // display: changedrows.display
+ // });
+
+ let aggvos = createExtBodyAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ changedrows,
+ index,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ }
+ } else if (key.indexOf('vfree') == 0 || FixAssts.includes(key)) {
+ let freefield = {
+ cvendorid: 'pk_supplier',
+ cvendorvid: 'pk_supplier_v'
+ };
+ marAsstUtils.afterEdit.call(
+ this,
+ props,
+ null,
+ PAGECODE.cardcode,
+ moduleId,
+ key,
+ FIELD.pk_material,
+ record,
+ index,
+ freefield
+ );
+ } else if (key == FIELD.crowno) {
+ // 更新对应的费用明细行号
+ let rowid = record.rowid;
+ let data = [];
+ data = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ record.values.pk_order_b.value == item.values.pk_order_b.value ||
+ rowid == item.values.pk_order_b.value
+ ) {
+ props.cardTable.setValByKeyAndRowId(PAGECODE.card_fee_detail, item.rowid, FIELD.cmatrowno, {
+ value: record.values.crowno.value,
+ display: record.values.crowno._display_
+ });
+ }
+ });
+ }
+ }
+ if (FIELD.cprojectid == key || key == FIELD.cunitid) {
+ // 项目和主单位联动费用明细
+ let bodyidsfee = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ _this.props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyidsfee,
+ null
+ );
+ aggvos.index = index;
+ aggvos.changedrows = changedrows;
+ getAfterData(_this, URL.cardBodyAfterEvent, aggvos, moduleId, key);
+ }
+}
+
+let rowIndex = null;
+/**
+ * 编辑后事件请求
+ * @param {*} props
+ * @param {*} url
+ * @param {*} aggvo
+ */
+function getAfterData(_this, url, aggvo, moduleId, key) {
+ rowIndex = aggvo.index;
+ aggvo.index = 0;
+ ajax({
+ url: url,
+ data: aggvo,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ let crownos = new Set();
+ if (res.data.extbillcard) {
+ _this.props.beforeUpdatePage();
+ let data = res.data.extbillcard;
+ if (data.head) {
+ _this.props.form.setAllFormValue({ [PAGECODE.cardhead]: data.head[PAGECODE.cardhead] });
+ }
+ if (key == FIELD.vbatchcode) {
+ res.data.extbillcard.bodys[moduleId].rows[0].values.vbatchcode.isEdit = false;
+ }
+ processExtBillCardBodyEditResult(_this.props, moduleId, res.data);
+ _this.props.updatePage(PAGECODE.cardhead, PAGECODE.bodyIds);
+ // 自动增行处理
+ processCardTableAutoAddRow(_this.props, PAGECODE.cardbody, rowIndex, {
+ isMuli: aggvo.changedrows.length > 1 ? true : false
+ });
+ if (res.data.extbillcard.bodys[moduleId]) {
+ res.data.extbillcard.bodys[moduleId].rows.forEach((row) => {
+ crownos.add(row.values[FIELD.crowno].value);
+ });
+ }
+ }
+ let transfer = _this.props.getUrlParam(TRANSFER.transfer);
+ if (res.data.userObject.relateCTVO && transfer != 'MULTI') {
+ if (res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ let returndata = res && res.data && res.data.extbillcard;
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 关联合同*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 确定要关联合同吗?*/
+ leftBtnName: getLangByResId(_this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(_this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: relateCTOKBtnClick.bind(
+ _this,
+ _this.props,
+ returndata,
+ res.data.userObject,
+ url,
+ aggvo,
+ moduleId
+ ), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(_this, _this.props, res.data.userObject) //点击确定按钮事件
+ });
+ }
+ }
+ // 物料编辑后再重新走一遍生成费用明细的逻辑 -----------begin
+ // if (ITEMFEEPRICE.includes(key)) {
+ // let bodyidsfee = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ // let aggvos = creatGrandsonDataForAfterEdit(
+ // _this.props,
+ // moduleId,
+ // key,
+ // value,
+ // changedrows,
+ // index,
+ // record,
+ // PAGECODE.cardcode,
+ // PAGECODE.cardhead,
+ // PAGECODE.cardbody,
+ // PAGECODE.card_fee_detail,
+ // FIELD.pk_order_b,
+ // FIELD.pk_order_b,
+ // true,
+ // bodyidsfee,
+ // null
+ // );
+ // ajax({
+ // url: URL.afterbodyforfeedetail,
+ // data: aggvos,
+ // method: 'POST',
+ // async: false, //同步
+ // success: (res) => {
+ // if (res.data && res.data.extbillcard.grandSons[PAGECODE.card_fee_detail]) {
+ // // 更新费用明细数据
+ // processExtBillFeeDetailsEditResult(
+ // _this.props,
+ // PAGECODE.card_fee_detail,
+ // res.data,
+ // FIELD.crowno
+ // );
+ // }
+ // }
+ // });
+ // }
+ // 物料编辑后再重新走一遍生成费用明细的逻辑 -----------end
+ // 处理费用明细数据
+ if (res.data.extbillcard.grandSons[PAGECODE.card_fee_detail]) {
+ if (key == FIELD.pk_material) {
+ // 重新建立物料多选增出来的行和费用明细关系
+ let dataitem = _this.props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let dataitemnew = [];
+ dataitem.forEach((row) => {
+ if (crownos.has(row.values[FIELD.crowno].value)) {
+ dataitemnew.push(row);
+ }
+ });
+ let datafee = res.data.extbillcard.grandSons[PAGECODE.card_fee_detail].rows;
+ for (let i = 0; i < datafee.length; i++) {
+ let id = datafee[i].values[FIELD.pk_order_b];
+ for (let j = 0; j < dataitemnew.length; j++) {
+ // 如果rowid已经设置过了,则跳过
+ if (id && id.value == dataitemnew[j].rowid) {
+ break;
+ }
+ if (
+ dataitemnew[j].values[FIELD.pseudocolumn] &&
+ dataitemnew[j].values[FIELD.pseudocolumn].value &&
+ id &&
+ dataitemnew[j].values[FIELD.pseudocolumn].value == id.value
+ ) {
+ datafee[i].values[FIELD.pk_order_b].value = dataitemnew[j].rowid;
+ }
+ }
+ }
+ }
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(_this.props, PAGECODE.card_fee_detail, res.data, FIELD.crowno);
+ }
+ dealFormulaMsg(
+ _this.props,
+ res.formulamsg,
+ {
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ },
+ null,
+ null,
+ rowIndex
+ );
+ //编辑后处理现存量
+ setTimeout(() => {
+ if (
+ [ FIELD.pk_material, FIELD.pk_recvstordoc, FIELD.pk_arrvstoorg_v, FIELD.dplanarrvdate ].includes(
+ key
+ ) &&
+ _this.showDragCom
+ ) {
+ let click = _this.props.cardTable.getClickRowIndex(PAGECODE.cardbody);
+ if (
+ click.record.values[FIELD.pk_material].value &&
+ click.record.values[FIELD.pk_arrvstoorg_v].value
+ ) {
+ _this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: click.record.values
+ });
+ _this.click = click;
+ } else {
+ _this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ _this.click = {};
+ }
+ }
+ }, 0);
+ }
+ });
+}
+
+/**
+ * 是否关联合同确定处理
+ * @param {*} props
+ * @param {*} userObject
+ */
+function relateCTOKBtnClick(props, returndata, userObject, url, aggvo, moduleId) {
+ let head = returndata.head[PAGECODE.cardhead];
+ let material = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ aggvo.card.head.card_head.rows = head.rows;
+ aggvo.card.bodys.card_material.rows = material;
+ let ctsalevos = userObject.relateCTVO;
+ if (ctsalevos.pk_ct_pu.rows.length > 1) {
+ let getSelectRows = (data) => {
+ this.selCTViews = data;
+ };
+ this.props.modal.show('MessageDlg', {
+ zIndex: 350,
+ title: getLangByResId(this, '4004POORDER-000017'), // 弹框表头信息/* 国际化处理: 采购订单关联合同*/
+ content: , //弹框内容,可以是字符串或dom
+ leftBtnName: getLangByResId(this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: selectCTOKBtnClick.bind(this, this.props, userObject, url, aggvo, moduleId), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(this, this.props, userObject)
+ });
+ } else if ((ctsalevos.pk_ct_pu.rows.length = 1)) {
+ aggvo['userObject'] = {
+ relateCTVO: JSON.stringify(ctsalevos),
+ relateCTROWS: [ 0 + '' ] //[ userObject.relateCTVO.pk_ct_pu.rows[0].values.crowno.value ]
+ };
+ getAfterData(this, url, aggvo, moduleId);
+ }
+}
+
+function selectCTOKBtnClick(props, userObject, url, aggvo, moduleId) {
+ let indexrows = new Array();
+ let rows = [];
+ this.selCTViews.forEach((row, index) => {
+ rows.push(row.data);
+ indexrows.push(index + '');
+ });
+ let table = {
+ areaType: 'table',
+ pageinfo: null,
+ rows: rows
+ };
+ let ctrows = {
+ pageid: '400400800_ct', //pk_ct_pu
+ table: table
+ };
+ //重新取一次数据
+
+ aggvo.userObject = aggvo['userobject'] || {};
+ aggvo.userObject.relateCTVO = JSON.stringify(ctrows);
+ aggvo.userObject.relateCTROWS = indexrows;
+ getAfterData(this, url, aggvo, moduleId);
+}
+
+function relateCTCancelBtnClick(props, userObject) {}
+function delFeeDetailByBody(props, record) {
+ let rowid = record.rowid;
+ let data = [];
+ data = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ record.values.pk_order_b.value == item.values.pk_order_b.value ||
+ rowid == item.values.pk_order_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee_detail, indexs);
+ }
+}
+
+function deleteFee(props) {
+ let feedata = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (feedata == null || feedata.length == 0) {
+ return;
+ }
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let data = props.createExtCardDataSimple(PAGECODE.cardcode, PAGECODE.cardhead, bodyids);
+ ajax({
+ url: URL.financeorgChangeFee,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ let card = res.data;
+ if (card.bodys[PAGECODE.card_fee]) {
+ let deleterows = [];
+ card.bodys[PAGECODE.card_fee].rows.map((item) => {
+ if (item.status == '3') {
+ deleterows.push(item.rowid);
+ }
+ });
+ if (deleterows.length > 0) {
+ deleterows.forEach((rowid) => {
+ props.cardTable.delRowByRowId(PAGECODE.card_fee, rowid);
+ });
+ }
+ }
+ }
+ }
+ });
+}
+
+/*t062wrAbzsHyGvc+J5WsZM6rHgtLA3u5l4OvqqnsTec=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/feeAfterEvent.js b/src/pu/pu/poorder/card/afterEvents/feeAfterEvent.js
new file mode 100644
index 0000000..f6fdc79
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/feeAfterEvent.js
@@ -0,0 +1,203 @@
+/*pL7uHJukW0PD5SdEnK62J2aFrRE+UWdwD54IfwSFdwk=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 费用项编辑后
+ * @Date: 2023-03-14 14:26:58
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-14 14:26:58
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, RELATECTFIELDS } from '../../constance';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import {
+ processExtBillFeeEditResult,
+ processExtBillFeeDetailsEditResult,
+ referFeeCT
+} from '../../../pub/utils/feeAfterUtil';
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ let _this = this;
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ if (key == FIELD.cfeematerialvid) {
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(PAGECODE.card_fee);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.cardFeeAfterEvent, moduleId, key, index);
+ //费用项
+ } else if (key == FIELD.cfeesuppliervid) {
+ //费用服务商
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(PAGECODE.card_fee);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.cardFeeAfterEvent, moduleId, key, index);
+ } else if (key == FIELD.cctid) {
+ //费用合同
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeAfterEvent, moduleId, key, index);
+ } else if (key == FIELD.nqtorigprice || key == FIELD.nqtorigtaxprice || key == FIELD.ntaxrate) {
+ //无税单价,含税单价,税率
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeAfterEvent, moduleId, key, index);
+ } else if (key == FIELD.corigcurrencyid) {
+ // 币种
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeAfterEvent, moduleId, key, index);
+ } else if (key == FIELD.ftaxtypeflag) {
+ // 扣税类别
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeAfterEvent, moduleId, key, index);
+ }
+
+ // 根据费用项和物料行生成费用明细
+ function getAfterData(_this, props, aggvos, url, moduleId, key, index) {
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新费用项数据
+ processExtBillFeeEditResult(props, moduleId, res.data, aggvos, index, FIELD.crowno);
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, PAGECODE.card_fee_detail, res.data, FIELD.crowno);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ _this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+ }
+}
+
+/*pL7uHJukW0PD5SdEnK62J2aFrRE+UWdwD54IfwSFdwk=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/feeDetailAfterEvent.js b/src/pu/pu/poorder/card/afterEvents/feeDetailAfterEvent.js
new file mode 100644
index 0000000..05887c6
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/feeDetailAfterEvent.js
@@ -0,0 +1,223 @@
+/*FZKtb9e8pfTNjwceqMAia7P7oZHOcPGXpkbf/2rwXHc=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 费用明细编辑后
+ * @Date: 2023-03-14 14:26:58
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-14 14:26:58
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, FEEPRICE, RELATECTFIELDS } from '../../constance';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { processExtBillFeeDetailsAfterEditResult, referFeeCT } from '../../../pub/utils/feeAfterUtil';
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ let _this = this;
+ let bodyids = [ PAGECODE.cardbody ];
+ if (key == FIELD.cfeematerialvid) {
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(PAGECODE.card_fee_detail);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key, index);
+ //费用项
+ } else if (key == FIELD.cfeesuppliervid) {
+ //费用服务商
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ let crownos = [];
+ let rows = props.cardTable.getAllRows(PAGECODE.card_fee_detail);
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ let userobject = {};
+ userobject = userobject ? userobject : {};
+ userobject['scm_originindex'] = index + '';
+ userobject['scm_allrownos'] = crownos;
+ aggvos.userObject = userobject;
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key, index);
+ } else if (key == FIELD.cctid) {
+ //费用合同
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key);
+ } else if (FEEPRICE.includes(key)) {
+ //税率,无税单价,含税单价,价税合计,无税金额,税额,主含税单价,主无税单价,计税金额,不可抵扣税额,集团本位币汇率,全局本位币汇率,扣税类别
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key);
+ } else if (key == FIELD.cratetype) {
+ //组织汇率类型
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key);
+ } else if (
+ key == FIELD.crececountryid ||
+ key == FIELD.csendcountryid ||
+ key == FIELD.ctaxcountryid ||
+ key == FIELD.ctaxcodeid
+ ) {
+ //发货国家/地区,收货国家/地区,报税国家/地区,税码
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key);
+ } else if (key == FIELD.corigcurrencyid) {
+ //发货国家/地区,收货国家/地区,报税国家/地区,税码
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData(_this, props, aggvos, URL.cardFeeDetailAfterEvent, moduleId, key, index);
+ }
+
+ // 根据费用项和物料行生成费用明细
+ function getAfterData(_this, props, aggvos, url, moduleId, key, index) {
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新数据
+ processExtBillFeeDetailsAfterEditResult(props, moduleId, res.data, FIELD.crowno, index);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ _this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+ }
+}
+
+/*FZKtb9e8pfTNjwceqMAia7P7oZHOcPGXpkbf/2rwXHc=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/headAfterEvent.js b/src/pu/pu/poorder/card/afterEvents/headAfterEvent.js
new file mode 100644
index 0000000..675d657
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/headAfterEvent.js
@@ -0,0 +1,407 @@
+/*9oNSQ86zYBKgm3JBJdBE6GSWmqbQoeEP34QQO2SBWx8=*/
+import { ajax, promptBox } from 'nc-lightapp-front';
+import { URL, PAGECODE, BUTTON, FIELD, TRANSFER } from '../../constance';
+import RelateCTDLG from '../../relateCT/list';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ createExtBillHeadAfterEventData,
+ processExtBillCardHeadEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment, PAGECODE.card_fee ];
+let headCommonCloumn = [
+ 'ctrantypeid',
+ 'pk_supplier',
+ 'pk_supplier_v',
+ 'pk_payterm',
+ 'pk_invcsupllier',
+ 'pk_invcsupllier_v',
+ 'dbilldate',
+ 'corigcurrencyid',
+ 'pk_recvcustomer',
+ 'pk_recvcustomer_v',
+ 'fhtaxtypeflag',
+ 'nhtaxrate',
+ 'pk_dept_v',
+ 'cemployeeid'
+];
+let noNeedMaterialBodyColumn = [ FIELD.cemployeeid, FIELD.pk_dept_v ];
+import { buttonController } from '../viewController/index';
+
+export default function afterEvent(props, moduleId, key, value, changedrows, index, record) {
+ let _this = this;
+ let aggvo = null;
+ //表头编辑后事件:
+ if (key == FIELD.pk_org_v) {
+ if (value.value == null || value == '' || value instanceof Array || Object.keys(value.value).length === 0) {
+ showWarningDialog(
+ getLangByResId(_this, '4004POORDER-000010'),
+ getLangByResId(_this, '4004POORDER-000011'),
+ {
+ /* 国际化处理: 确认修改,是否修改组织,这样会清空您录入的信息?*/
+ beSureBtnClick: () => {
+ // 1、采购组织为空时清空表单数据且表体不可编辑
+ props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ setTimeout(() => {
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ }, 0);
+ props.initMetaByPkorg(FIELD.pk_org_v);
+ let disableArr = {
+ [BUTTON.Material_AddLine]: true,
+ [BUTTON.Pay_Addline]: true,
+ [BUTTON.Resetno]: true,
+ [BUTTON.Fee_Addline]: true,
+ [BUTTON.Fee_Resetno]: true,
+ [BUTTON.Fee_Detail_Resetno]: true,
+ [BUTTON.Fee_Detail_Addline]: true
+ };
+ props.button.setDisabled(disableArr);
+ // 默认付款协议收起
+ buttonController.paymentShow.call(_this, props);
+ },
+ cancelBtnClick: () => {
+ props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.pk_org_v]: { value: changedrows.value, display: changedrows.display }
+ });
+ }
+ }
+ );
+ } else {
+ //2、不为空时释放页面编辑性同时判断和旧值不相等清空表体数据
+ props.resMetaAfterPkorgEdit();
+ props.cardTable.setColEditableByKey('card_material', 'pk_material', false);
+ if (changedrows && value.value != changedrows.value && changedrows.value) {
+ showWarningDialog(
+ getLangByResId(_this, '4004POORDER-000010'),
+ getLangByResId(_this, '4004POORDER-000011'),
+ {
+ /* 国际化处理: 确认修改,是否修改组织,这样会清空您录入的信息?*/
+ beSureBtnClick: () => {
+ props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.pk_org_v]: { value: value.value, display: value.display }
+ });
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ addOneNowRow(props, PAGECODE.cardbody);
+ transtypeUtils.setValue.call(this, moduleId, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ aggvo = createExtBillHeadAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ value
+ );
+ //3、带出币种,取值:采购组织本位币调用后台
+ getAfterData(
+ _this,
+ URL.cardHeadAfterEvent,
+ aggvo,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index
+ );
+ // setTimeout(() => {
+ // transtypeUtils.setValue.call(this, moduleId, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ // }, 0);
+ },
+ cancelBtnClick: () => {
+ props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.pk_org_v]: { value: changedrows.value, display: changedrows.display }
+ });
+ }
+ }
+ );
+ } else {
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ // 组织不为空新增一行
+ addOneNowRow(props, PAGECODE.cardbody);
+ transtypeUtils.setValue.call(this, moduleId, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ //3、带出币种,取值:采购组织本位币调用后台
+ aggvo = createExtBillHeadAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ value
+ );
+ getAfterData(_this, URL.cardHeadAfterEvent, aggvo, moduleId, key, value, changedrows, index);
+ // setTimeout(() => {
+ // transtypeUtils.setValue.call(this, moduleId, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ // }, 0);
+ }
+ let disableArr = {
+ [BUTTON.Material_AddLine]: false,
+ [BUTTON.Pay_Addline]: false,
+ [BUTTON.Resetno]: false,
+ [BUTTON.Fee_Addline]: false,
+ [BUTTON.Fee_Resetno]: false,
+ [BUTTON.Fee_Detail_Resetno]: false,
+ [BUTTON.Fee_Detail_Addline]: false
+ };
+ props.button.setDisabled(disableArr);
+ }
+ } else if (headCommonCloumn.includes(key)) {
+ // 订单类型、供应商、付款协议、开票供应商、订单日期、币种、收货客户、整单扣税类别、整单税率、采购部门、采购员
+ // 订单类型编辑后事件,带出订单类型编码,订单类型编码不可编辑,如果交易类型存在到货计划则修改收货库组织为非必输项
+ // 付款协议: 带出款协议详细内容到付款协议页签下
+ if (value.value != changedrows.value) {
+ aggvo = createExtBillHeadAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ value
+ );
+ if (noNeedMaterialBodyColumn.includes(key)) {
+ // 不须要物料表体数据的字段
+ aggvo.card.bodys[PAGECODE.cardbody].rows = new Array();
+ aggvo.card.bodys[PAGECODE.head_payment].rows = new Array();
+ }
+ if (key != FIELD.pk_payterm && key != FIELD.pk_supplier_v && key != FIELD.pk_supplier) {
+ // 非付款协议字段不需要付款协议
+ aggvo.card.bodys[PAGECODE.head_payment].rows = new Array();
+ }
+
+ // NCC-211652,供应商采购信息设置默认付款计划,修改订单时,切换供应商,付款计划会有验证不等于100%的问题,需要先删除切换前的供应商带出来的付款协议 begin
+ // 这个改到请求返回后吧
+ // if (key == FIELD.pk_supplier || key == FIELD.pk_supplier_v) {
+ // let rowCount = props.cardTable.getNumberOfRows(PAGECODE.head_payment);
+ // if (rowCount > 0) {
+ // for (let i = rowCount - 1; i >= 0; i--) {
+ // props.cardTable.delRowsByIndex(PAGECODE.head_payment, i);
+ // }
+ // }
+ // }
+ // NCC-211652,供应商采购信息设置默认付款计划,修改订单时,切换供应商,付款计划会有验证不等于100%的问题,需要先删除切换前的供应商带出来的付款协议 end
+ getAfterData(_this, URL.cardHeadAfterEvent, aggvo, moduleId, key, value, changedrows, index, record);
+ }
+ if (key == 'ctrantypeid' && !value.value) {
+ _this.props.form.setFormItemsValue(PAGECODE.cardhead, { bdirect: { value: null, display: null } });
+ }
+ } else if (key == 'brefwhenreturn' || key == 'breturn') {
+ //1、退货、退货基于原订单补货 互斥,有一方被选中,另一个不能修改
+ let disableColumn = key == 'brefwhenreturn' ? 'breturn' : 'brefwhenreturn';
+ props.form.setFormItemsDisabled(PAGECODE.cardhead, { [disableColumn]: value.value == false ? false : true });
+ }
+}
+
+/**
+ * 编辑后事件请求
+ * @param {*} props
+ * @param {*} url
+ * @param {*} aggvo
+ */
+function getAfterData(_this, url, aggvo, moduleId, key, value, changedrows, index, record) {
+ ajax({
+ url: url,
+ data: aggvo,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ }
+ );
+ }
+ let transfer = _this.props.getUrlParam(TRANSFER.transfer);
+ if (res.data.userObject.relateCTVO && transfer != 'MULTI') {
+ if (res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 提示*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 是否关联合同?*/
+ leftBtnName: getLangByResId(_this, '4004POORDER-000015') /* 国际化处理: 是*/,
+ rightBtnName: getLangByResId(_this, '4004POORDER-000016') /* 国际化处理: 否*/,
+ beSureBtnClick: relateCTOKBtnClick.bind(
+ _this,
+ _this.props,
+ res.data.userObject,
+ url,
+ aggvo,
+ moduleId
+ ), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(_this, _this.props, res.data.userObject) //点击确定按钮事件
+ });
+ }
+ }
+ // NCC-211652,判断一下,如果后台返回的付款协议有值,则使用后台返回的,如果没有,页面保持原状不进行更新 begin
+ // 供应商采购信息设置默认付款计划,修改订单时,切换供应商,付款计划会有验证不等于100%的问题,需要先删除切换前的供应商带出来的付款协议
+ if (
+ res.data.extbillcard &&
+ res.data.extbillcard.bodys &&
+ res.data.extbillcard.bodys.card_payment &&
+ res.data.extbillcard.bodys.card_payment.rows &&
+ res.data.extbillcard.bodys.card_payment.rows.length > 0
+ ) {
+ if (!res.data.extbillcard.bodys.card_payment.rows[0].rowid) {
+ let rowCount = _this.props.cardTable.getNumberOfRows(PAGECODE.head_payment);
+ if (rowCount > 0) {
+ for (let i = rowCount - 1; i >= 0; i--) {
+ _this.props.cardTable.delRowsByIndex(PAGECODE.head_payment, i);
+ }
+ }
+ }
+ }
+ // NCC-211652,判断一下,如果后台返回的付款协议有值,则会用后台返回的,如果没有,页面保持原状不进行更新 end
+ if (res.data && res.data.extbillcard) {
+ processExtBillCardHeadEditResult(_this.props, PAGECODE.cardhead, bodyids, res.data);
+ }
+ buttonController.cachedata.call(_this);
+ // 制单日期编辑后费用项,费用明细重新询税率,汇率
+ let feeDetailData = _this.props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let feeData = _this.props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (key == FIELD.dbilldate && (feeData != null || feeDetailData != null)) {
+ setFeeInfo.call(this, _this.props, moduleId, key, value, changedrows, index, record);
+ }
+ }
+ });
+}
+
+function addOneNowRow(props, tableId) {
+ props.cardTable.addRow(tableId, 0, { crowno: { display: '10', value: '10' } }, false);
+}
+
+function setFeeInfo(props, moduleId, key, value, changedrows, index, record) {
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changedrows,
+ index,
+ record,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ ajax({
+ url: URL.headafterdbillddate,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ let card = res.data.extbillcard;
+ let updaterows = [];
+ if (card.bodys[PAGECODE.card_fee]) {
+ card.bodys[PAGECODE.card_fee].rows.map((item) => {
+ updaterows.push(item);
+ });
+ }
+ if (updaterows.length > 0) {
+ props.cardTable.updateTableData(PAGECODE.card_fee, { rows: updaterows });
+ }
+ // 效率优化关闭
+ // 更新费用明细数据
+ if (card.grandSons[PAGECODE.card_fee_detail]) {
+ let uprows = [];
+ card.grandSons[PAGECODE.card_fee_detail].rows.map((item) => {
+ uprows.push(item);
+ });
+ if (uprows.length > 0) {
+ props.cardTable.updateTableData(PAGECODE.card_fee_detail, { rows: uprows });
+ }
+ }
+ }
+ }
+ });
+}
+
+/**
+ * 是否关联合同确定处理
+ * @param {*} props
+ * @param {*} userObject
+ */
+function relateCTOKBtnClick(props, userObject, url, aggvo, moduleId) {
+ let ctsalevos = userObject.relateCTVO;
+ if (ctsalevos.pk_ct_pu.rows.length > 1) {
+ let getSelectRows = (data) => {
+ this.selCTViews = data;
+ };
+ this.props.modal.show('MessageDlg', {
+ zIndex: 350,
+ title: getLangByResId(this, '4004POORDER-000017'), // 弹框表头信息/* 国际化处理: 采购订单关联合同*/
+ content: , //弹框内容,可以是字符串或dom
+ leftBtnName: getLangByResId(this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: selectCTOKBtnClick.bind(this, this.props, userObject, url, aggvo, moduleId), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(this, this.props, userObject)
+ });
+ } else if ((ctsalevos.pk_ct_pu.rows.length = 1)) {
+ //重新取一次数据
+ let head = props.form.getAllFormValue(PAGECODE.cardhead);
+ let material = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ aggvo.card.head.card_head.rows = head.rows;
+ aggvo.card.bodys.card_material.rows = material;
+ aggvo['userObject'] = {
+ relateCTVO: JSON.stringify(ctsalevos),
+ relateCTROWS: [ 0 + '' ] //[ userObject.relateCTVO.pk_ct_pu.rows[0].values.crowno.value ]
+ };
+ getAfterData(this, url, aggvo, moduleId);
+ }
+}
+
+function selectCTOKBtnClick(props, userObject, url, aggvo, moduleId) {
+ let indexrows = new Array();
+ let rows = [];
+ this.selCTViews.forEach((row, index) => {
+ rows.push(row.data);
+ indexrows.push(index + '');
+ });
+ let table = {
+ areaType: 'table',
+ pageinfo: null,
+ rows: rows
+ };
+ let ctrows = {
+ pageid: '400400800_ct', //pk_ct_pu
+ table: table
+ };
+ //重新取一次数据
+ let head = props.form.getAllFormValue(PAGECODE.cardhead);
+ let material = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let pay = props.cardTable.getVisibleRows(PAGECODE.head_payment);
+ aggvo.card.head.card_head.rows = head.rows;
+ aggvo.card.bodys.card_material.rows = material;
+ aggvo.card.bodys.card_payment.rows = pay;
+
+ aggvo.userObject = aggvo['userobject'] || {};
+ aggvo.userObject.relateCTVO = JSON.stringify(ctrows);
+ aggvo.userObject.relateCTROWS = indexrows;
+ getAfterData(this, url, aggvo, moduleId);
+}
+
+function relateCTCancelBtnClick(props, userObject) {}
+
+/*9oNSQ86zYBKgm3JBJdBE6GSWmqbQoeEP34QQO2SBWx8=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/index.js b/src/pu/pu/poorder/card/afterEvents/index.js
new file mode 100644
index 0000000..b569dbe
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/index.js
@@ -0,0 +1,14 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单编辑后事件统一规范入口
+ * @Date: 2018-04-19 10:39:52
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-01-03 14:47:06
+ */
+import afterEvents from './afterEvents';
+import relationCT from './relationCT';
+
+export { afterEvents, relationCT };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/paymentAfterEvent.js b/src/pu/pu/poorder/card/afterEvents/paymentAfterEvent.js
new file mode 100644
index 0000000..14fd36d
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/paymentAfterEvent.js
@@ -0,0 +1,80 @@
+/*Yi4NaZxog3TRJtjQagyfxZEqCcTlh5F7F1PtB9sE5uM=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 订单付款协议编辑后
+ * @Date: 2019-02-16 16:01:52
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-22 10:57:48
+ */
+import { PAGECODE } from '../../constance';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { sum } from 'nc-lightapp-front';
+
+let payBodyId = PAGECODE.head_payment;
+let zeroCell = { value: '0', display: null, scale: '-1' };
+let emptyCell = { value: null, display: null, scale: '-1' };
+export default function afterEvent(props, moduleId, key, value, changedrows, index) {
+ if (changedrows && changedrows[0].newvalue.value == changedrows[0].oldvalue.value) {
+ return;
+ }
+ /* 国际化处理: 当月生效*/
+ let effectmonthcell = { value: '0', display: getLangByResId(this, '4004POORDER-000107'), scale: '-1' };
+ if (key == 'checkdata') {
+ // 固定结账日
+ if (value != null && value != '') {
+ setValByKeyAndIndex(props, index, 'effectmonth', effectmonthcell);
+ setValByKeyAndIndex(props, index, 'effectaddmonth', zeroCell);
+ setValByKeyAndIndex(props, index, 'paymentday', emptyCell);
+ } else {
+ // 清空固定结账日的同时清空生效月和附加月
+ setValByKeyAndIndex(props, index, 'effectmonth', emptyCell);
+ setValByKeyAndIndex(props, index, 'effectaddmonth', emptyCell);
+ }
+ } else if (key == 'accrate') {
+ // 付款比例
+ let sums = 0;
+ let allrows = props.cardTable.getAllRows(payBodyId);
+ //let accrates = props.cardTable.getColValue(payBodyId, 'accrate');
+ for (let allrow of allrows) {
+ let linevalue = allrow.values.accrate.value;
+ if (allrow.status != 3) {
+ if (linevalue == null) {
+ continue;
+ }
+ if (parseFloat(linevalue) == 0) {
+ /* 国际化处理: 提示,付款比例不允许为0,请重新输入*/
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000105'));
+ setValByKeyAndIndex(props, index, 'accrate', emptyCell);
+ continue;
+ }
+ sums = sum(sums, linevalue);
+ }
+ }
+ if (parseFloat(sums) > 100) {
+ /* 国际化处理: 提示,付款比例之和不允许超过100!*/
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000106'));
+ setValByKeyAndIndex(props, index, 'accrate', zeroCell);
+ }
+ } else if (key == 'accountday') {
+ // 出账日编辑后事件
+ setValByKeyAndIndex(props, index, 'paymentday', emptyCell);
+ } else if (key == 'paymentday') {
+ // 账期天数编辑后事件
+ setValByKeyAndIndex(props, index, 'checkdata', emptyCell);
+ setValByKeyAndIndex(props, index, 'effectmonth', emptyCell);
+ setValByKeyAndIndex(props, index, 'effectaddmonth', emptyCell);
+ setValByKeyAndIndex(props, index, 'accountday', emptyCell);
+ } else if (key == 'effectaddmonth') {
+ // 附加月编辑后事件
+ if (!value) {
+ setValByKeyAndIndex(props, index, 'effectaddmonth', zeroCell);
+ }
+ }
+}
+
+function setValByKeyAndIndex(props, index, key, cell) {
+ props.cardTable.setValByKeyAndIndex(payBodyId, index, key, cell);
+}
+
+/*Yi4NaZxog3TRJtjQagyfxZEqCcTlh5F7F1PtB9sE5uM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/afterEvents/relationCT.js b/src/pu/pu/poorder/card/afterEvents/relationCT.js
new file mode 100644
index 0000000..1fcc5ab
--- /dev/null
+++ b/src/pu/pu/poorder/card/afterEvents/relationCT.js
@@ -0,0 +1,195 @@
+/*0fd6Ewd7lzvUPLaLcB7gIZ2Fvs2zqhu1jZaBfjfGeHA=*/
+import { ajax, promptBox } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, STATUS, BUTTON, TRANSFER, OrderCache } from '../../constance';
+import { changeUrlParam, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import RelateCTDLG from '../../relateCT/list';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ createExtBillHeadAfterEventData,
+ processExtBillCardHeadEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment ];
+let moduleId = PAGECODE.cardbody;
+let key = 'dbilldate';
+
+function relationCT(props, record, existRefData) {
+ let value = props.form.getFormItemsValue(PAGECODE.cardhead, key);
+ let aggvo = createExtBillHeadAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ value
+ );
+ let status = this.props.form.getFormStatus(PAGECODE.cardhead);
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ if (status == STATUS.edit && transfer != 'MULTI' && transfer != 'Z2') {
+ let cachaggvo;
+ if (existRefData) {
+ cachaggvo = deepClone(aggvo);
+ // 参照增行时排除已经存在的行数据
+ if (aggvo.card) {
+ let rows = aggvo.card.bodys[PAGECODE.cardbody].rows;
+ let bodypks = [];
+ let newrows = [];
+ existRefData.data.forEach((e) => {
+ e.bodys &&
+ e.bodys.forEach((body) => {
+ bodypks.push(body.pk.substring(0, 20));
+ });
+ });
+ rows.forEach((row) => {
+ if (bodypks.indexOf(row.values.csourcebid.value) < 0) {
+ newrows.push(row);
+ }
+ });
+ aggvo.card.bodys[PAGECODE.cardbody].rows = newrows;
+ }
+ }
+ getAfterData(this, props, aggvo, false, cachaggvo);
+ }
+}
+
+/**
+ * 是否关联合同确定处理
+ * @param {*} props
+ * @param {*} userObject
+ */
+function relateCTOKBtnClick(props, userObject, aggvo) {
+ let ctsalevos = userObject.relateCTVO;
+ if (ctsalevos.pk_ct_pu.rows.length > 1) {
+ let getSelectRows = (data) => {
+ this.selCTViews = data;
+ };
+ props.modal.show('MessageDlg', {
+ zIndex: 350,
+ title: getLangByResId(this, '4004POORDER-000017'), // 弹框表头信息/* 国际化处理: 采购订单关联合同*/
+ content: , //弹框内容,可以是字符串或dom
+ leftBtnName: getLangByResId(this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: selectCTOKBtnClick.bind(this, props, userObject, aggvo), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(this, props, userObject)
+ });
+ } else if ((ctsalevos.pk_ct_pu.rows.length = 1)) {
+ aggvo['userObject'] = {
+ relateCTVO: JSON.stringify(ctsalevos),
+ relateCTROWS: [ 0 + '' ] //[ userObject.relateCTVO.pk_ct_pu.rows[0].values.crowno.value ]
+ };
+ getAfterData(this, props, aggvo, true);
+ }
+}
+
+function selectCTOKBtnClick(props, userObject, aggvo) {
+ let indexrows = new Array();
+ let rows = new Array();
+ this.selCTViews.forEach((row, index) => {
+ rows.push(row.data);
+ indexrows.push(index + '');
+ });
+ let table = {
+ areaType: 'table',
+ pageinfo: null,
+ rows: rows
+ };
+ let ctrows = {
+ pageid: '400400800_ct', //pk_ct_pu
+ table: table
+ };
+ aggvo.userObject = aggvo['userobject'] || {};
+ aggvo.userObject.relateCTVO = JSON.stringify(ctrows);
+ aggvo.userObject.relateCTROWS = indexrows;
+ getAfterData(this, props, aggvo, true);
+}
+
+function relateCTCancelBtnClick(props, userObject) {}
+
+function getAfterData(_this, props, aggvo, isshowpage, cachaggvo) {
+ ajax({
+ url: URL.cardHeadAfterEvent,
+ data: aggvo,
+ method: 'POST',
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ }
+ );
+ }
+ if (res.data.userObject.relateCTVO) {
+ if (res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 关联合同*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 确定要关联合同吗?*/
+ beSureBtnName: getLangByResId(_this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ cancelBtnName: getLangByResId(_this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: relateCTOKBtnClick.bind(
+ _this,
+ _this.props,
+ res.data.userObject,
+ cachaggvo ? cachaggvo : aggvo
+ ), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(_this, _this.props, res.data.userObject) //点击确定按钮事件
+ });
+ }
+ }
+ if (isshowpage == true) {
+ if (res.data.extbillcard) {
+ processExtBillCardHeadEditResult(_this.props, PAGECODE.cardhead, bodyids, res.data);
+ // let data = res.data.extbillcard;
+ // let head = data.head && data.head[PAGECODE.cardhead].rows;
+ // let material = data.bodys && data.bodys[PAGECODE.cardbody].rows;
+ // let pay = data.bodys && data.bodys[PAGECODE.head_payment] && data.bodys[PAGECODE.head_payment].rows;
+ // if (data.head) {
+ // _this.props.form.setAllFormValue({ [PAGECODE.cardhead]: data.head[PAGECODE.cardhead] });
+ // }
+ // if (data.bodys) {
+ // let cards = data.bodys;
+ // if (cards.card_payment) {
+ // _this.props.cardTable.setTableData(PAGECODE.head_payment, cards[PAGECODE.head_payment]);
+ // }
+ // if (cards[PAGECODE.cardbody]) {
+ // _this.props.cardTable.updateDataByRowId(PAGECODE.cardbody, cards[PAGECODE.cardbody], true);
+ // // 19/01/15平台已支持拉单推单缓存页面数据
+ // // cachedata.call(_this, head, pay, material);
+ // }
+ // }
+ }
+ changeUrlParam(_this.props, { id: null });
+ }
+ }
+ });
+}
+
+function cachedata(headval, pay, material) {
+ return;
+ if (this.props.getUrlParam(TRANSFER.transfer) || this.props.getUrlParam(TRANSFER.channelType)) {
+ let curindex = parseInt(this.curindex);
+ let transferData = {};
+ let head = { card_head: { rows: headval } };
+ let body = { card_material: { rows: material } };
+ if (pay && pay.length > 0) {
+ body.card_payment = { rows: pay };
+ }
+ transferData.head = head;
+ transferData.body = body;
+ this.props.transferTable.setTransferListValueByIndex(PAGECODE.leftarea, transferData, curindex);
+ }
+}
+
+export default {
+ cachedata,
+ relationCT,
+ relateCTOKBtnClick,
+ relateCTCancelBtnClick
+};
+
+/*0fd6Ewd7lzvUPLaLcB7gIZ2Fvs2zqhu1jZaBfjfGeHA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/batchEvents/batchEvents.js b/src/pu/pu/poorder/card/batchEvents/batchEvents.js
new file mode 100644
index 0000000..21d3a74
--- /dev/null
+++ b/src/pu/pu/poorder/card/batchEvents/batchEvents.js
@@ -0,0 +1,529 @@
+/*8nIjANkSB9VpkQdmnMi+FFYPOshN9M6haQqD6R9IZgk=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购发票卡片批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-12-01 11:17:48
+ */
+import { ajax } from 'nc-lightapp-front';
+import { FIELD, BATCHITEM, PAGECODE, URL, FREEFIELD, BATCHITEMPRCE, ITEMFEEPRICE, TRANSFER49 } from '../../constance';
+import {
+ processExtBillCardBodyEditResult4Batch,
+ createBodyAfterEventData4BatchMore
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { vfreeBeforeEvent } from '../../../pub/beforeevent';
+import { showErrorInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { canRateModify, isRowSelfMake } from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil';
+import { marAsstUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import remoteRequest from '../beforeEvents/remoteRequest';
+import { processExtBillFeeDetailsEditResult } from '../../../pub/utils/feeAfterUtil';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+
+export default async function batchEvents(obj) {
+ // console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vbdef') && !attrcode.startsWith('vfree')) {
+ return;
+ }
+ if (attrcode == FIELD.pk_reqstordoc) {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果需求组织没有值就不允许编辑
+ if (!(newValue[i].values.pk_reqstoorg && newValue[i].values.pk_reqstoorg.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: newValue[i].values.pk_reqstoorg.value,
+ busifuncode: FIELD.STOCKORG,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RequestWarehouseBodyRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (
+ //自定义项、备注以及表头主组织进行过滤的场景
+ attrcode.startsWith('vbdef') ||
+ attrcode === 'vbmemo' ||
+ attrcode === 'cprojectid'
+ ) {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ queryCondition = { pk_org: pk_org };
+ isManyCondition = false;
+ } else if (attrcode === FIELD.pk_material) {
+ for (let i = 0; i < newValue.length; i++) {
+ if (
+ newValue[i].values.csourcetypecode &&
+ newValue[i].values.csourcetypecode.value == TRANSFER49.CSOURCETYPECODE
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ if (newValue[i].values.csourcetypecode && newValue[i].values.csourcetypecode.value == FIELD.PurDaily) {
+ let ccontractrowid = newValue[i].values.ccontractrowid.value;
+ queryValue[i].queryCondition = {
+ pk_org: newValue[i].values.pk_org.value,
+ ccontractrowid: ccontractrowid,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.MaterialBodyRefFilter'
+ };
+ }
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.pk_reqstoorg_v) {
+ for (let i = 0; i < newValue.length; i++) {
+ if (newValue[i].values.csourcetypecode && newValue[i].values.csourcetypecode.value == FIELD.PrayBill) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.pk_arrvstoorg_v) {
+ for (let i = 0; i < newValue.length; i++) {
+ if (
+ newValue[i].values.csourcetypecode &&
+ newValue[i].values.csourcetypecode.value != undefined &&
+ newValue[i].values.csourcetypecode.value != '' &&
+ newValue[i].values.csourcetypecode.value != FIELD.SoOrder
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.pk_psfinanceorg_v) {
+ //结算财务组织
+ let vcoopordercode = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vcoopordercode).value;
+ if (vcoopordercode != null) {
+ return;
+ }
+ for (let i = 0; i < newValue.length; i++) {
+ if (newValue[i].values.csourcetypecode && newValue[i].values.csourcetypecode.value == FIELD.SoOrder) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ let feedatas = this.props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ let feedetailsdatas = this.props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ if ((feedatas && feedatas.length > 0) || (feedetailsdatas && feedetailsdatas.length > 0)) {
+ let id = [];
+ changedrows.forEach((item) => {
+ let pk_order_b = this.props.cardTable.getValByKeyAndRowId(
+ PAGECODE.cardbody,
+ item.rowid,
+ FIELD.pk_order_b
+ );
+ let key = pk_order_b ? item.rowid : pk_order_b;
+ id.push(key);
+ });
+ showWarningDialog(getLangByResId(this, '4004POORDER-000010'), getLangByResId(this, '4004POORDER-000165'), {
+ /* 国际化处理: 确认修改,修改结算财务组织,会清空您费用明细页签录入的对应费用项信息,请确认是否修改?*/
+ beSureBtnClick: () => {
+ let datas = this.props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let delrowid = [];
+ if (datas) {
+ id.forEach((item1) => {
+ datas.forEach((item) => {
+ if (item1 == item.values[FIELD.pk_order_b].value) {
+ delrowid.push(item.rowid);
+ }
+ });
+ });
+ }
+ // 删除结算财务组织对应的费用明细
+ if (delrowid.length > 0) {
+ delrowid.forEach((rowid) => {
+ this.props.cardTable.delRowByRowId(PAGECODE.card_fee_detail, rowid);
+ });
+ }
+ let feedatas = this.props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (feedatas != null && feedatas.length > 0) {
+ // 处理没有权限的费用项
+ deleteFee.call(this, this.props);
+ }
+ },
+ cancelBtnClick: () => {}
+ });
+ }
+ } else if (attrcode == 'pk_flowstockorg_v') {
+ // 物流组织
+ for (let i = 0; i < newValue.length; i++) {
+ let pk_recvstordoc = newValue[i].values.pk_recvstordoc.value;
+ let pk_arrvstoorg = newValue[i].values.pk_arrvstoorg.value;
+ if (pk_recvstordoc == null && pk_arrvstoorg == null) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_recvstordoc: pk_recvstordoc,
+ pk_arrvstoorg: pk_arrvstoorg,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FlowstockorgBodyRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == 'ctaxcodeid') {
+ // 税码
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let ctaxcountryid = newValue[i].values.ctaxcountryid.value;
+ let fbuysellflag = newValue[i].values.fbuysellflag.value;
+ if (ctaxcountryid == null || null == fbuysellflag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ ctaxcountryid: ctaxcountryid,
+ fbuysellflag: fbuysellflag,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CtaxcodeidBodyRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == 'nexchangerate') {
+ //折本汇率
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let corigcurrencyid = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.corigcurrencyid).value; //原币
+ let curr = newValue[i].values.ccurrencyid.value;
+ if (corigcurrencyid == curr) {
+ continue;
+ } else {
+ let flag = await canRateModify.call(
+ this,
+ (newValue[i].values.fratecategory || {}).value,
+ isRowSelfMake.call(this, newValue[i], 'csourcetypecode', [ '23', 'Z2', '30', '45' ])
+ );
+ if (!flag) {
+ continue;
+ }
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (
+ attrcode == 'pk_arrvstoorg' ||
+ attrcode == 'pk_reqstoorg' ||
+ attrcode == 'pk_psfinanceorg' ||
+ attrcode == 'pk_apfinanceorg' ||
+ attrcode == 'ccurrencyid'
+ ) {
+ return;
+ } else if (attrcode == 'pk_recvstordoc') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let pk_arrvstoorg = newValue[i].values.pk_arrvstoorg.value;
+ if (pk_arrvstoorg == null) {
+ continue;
+ }
+ let pk_arrliabcenter = newValue[i].values.pk_arrliabcenter.value;
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: pk_arrvstoorg,
+ busifuncode: FIELD.STOCKORG,
+ pk_arrliabcenter: pk_arrliabcenter,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RequestWarehouseBodyRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode.startsWith('vfree')) {
+ let tableId = PAGECODE.cardbody;
+ let formId = PAGECODE.cardhead;
+ for (let i = 0; i < newValue.length; i++) {
+ //辅助属性
+ let flag = true;
+ let pk_org = this.props.form.getFormItemsValue(formId, FIELD.pk_org).value;
+ let materialvid = this.props.cardTable.getValByKeyAndIndex(tableId, currentIndex + i, FIELD.pk_material)
+ .value;
+ let constance = {
+ key: attrcode,
+ params: {
+ key: attrcode,
+ pk_org: pk_org,
+ materialvid: materialvid,
+ cmaterialvid: materialvid
+ }
+ };
+
+ flag = await vfreeBeforeEvent(this.props, constance);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[queryValue.length - 1].queryCondition = marAsstUtils.getVfreeQueryCondition.call(
+ this,
+ this.props,
+ '400400800',
+ '400400800_card',
+ 'card_material',
+ attrcode,
+ newValue[i],
+ FREEFIELD
+ );
+ }
+ // let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ // queryCondition = { pk_org: pk_org };
+ isManyCondition = true;
+ } else if (attrcode == 'nastnum') {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let wbs = this.props.cardTable.getValByKeyAndIndex(PAGECODE.cardbody, 0, FIELD.wbs);
+ if (wbs && wbs.value) {
+ continue;
+ }
+ let nbreturn = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'breturn'); //原币
+ nbreturn = nbreturn && nbreturn.value;
+
+ if (nbreturn && newValue[i].values.nastnum.value > 0) {
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000013')); /* 国际化处理: 提示,退货订单,数量不允许为正*/
+ continue;
+ }
+
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (BATCHITEMPRCE.includes(attrcode)) {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let tableId = PAGECODE.cardbody;
+ let formId = PAGECODE.cardhead;
+ // 根据交易类型属性价格来源方式,判断无税单价,含税单价,价税合计,无税金额,税额,无税净价,含税净价,主无税单价,主含税单价,主无税净价,主含税净价编辑性
+ let flag = true;
+ let vtrantypecode = this.props.form.getFormItemsValue(formId, FIELD.vtrantypecode).value;
+ let fpricesourceflag = this.props.cardTable.getValByKeyAndIndex(
+ tableId,
+ currentIndex + i,
+ FIELD.fpricesourceflag
+ ).value;
+ let constance = {
+ key: attrcode,
+ params: {
+ vtrantypecode: vtrantypecode,
+ fpricesourceflag: fpricesourceflag
+ }
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode === 'cffileid') {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ //每个字段单独的过滤条件,可单独处理
+ queryValue[queryValue.length - 1].queryCondition = { cmaterialvid: newValue[i].values.pk_material.value };
+ }
+ isManyCondition = true;
+ } else if (attrcode === FIELD.nqtunitnum || attrcode === FIELD.nnum) {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果物料没有值就不允许编辑
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ let wbs = this.props.cardTable.getValByKeyAndIndex(PAGECODE.cardbody, 0, FIELD.wbs);
+ if (wbs && wbs.value) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ if (!(newValue[i].values.pk_material && newValue[i].values.pk_material.value)) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ // NCC-231904
+ if (queryValue == null || queryValue.length == 0) {
+ return;
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ //执行业务的批量编辑后事件
+ // afterEvent(props, areaCode, attrcode, queryValue, changerows);
+ let data = createBodyAfterEventData4BatchMore(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ [ PAGECODE.cardbody, PAGECODE.card_fee ],
+ areaCode,
+ attrcode,
+ changedrows,
+ indexs
+ );
+ ajax({
+ url: URL.cardBodyAfterEvent,
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ }
+ );
+ }
+ processExtBillCardBodyEditResult4Batch(props, PAGECODE.cardbody, res.data, indexs);
+ // 复制粘贴物料或者数量时联动费用明细全部字段
+ if (
+ FIELD.cprojectid ||
+ attrcode == FIELD.nastnum ||
+ attrcode == FIELD.pk_material ||
+ ITEMFEEPRICE.includes(attrcode)
+ ) {
+ setFeeDetails.call(this, props, areaCode, attrcode, changedrows, indexs);
+ }
+ this.forceUpdate();
+ }
+ });
+ });
+}
+
+function setFeeDetails(props, areaCode, attrcode, changedrows, indexs) {
+ let value = props.cardTable.getRowsByIndexs(areaCode, indexs);
+ let bodyidsfee = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ areaCode,
+ attrcode,
+ value,
+ changedrows,
+ indexs,
+ null,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyidsfee,
+ null
+ );
+ ajax({
+ url: URL.cardBodyBatch,
+ data: aggvos,
+ async: false,
+ success: (res) => {
+ if (res.data && res.data.extbillcard.grandSons[PAGECODE.card_fee_detail]) {
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, PAGECODE.card_fee_detail, res.data, FIELD.crowno);
+ }
+ }
+ });
+}
+
+function deleteFee(props) {
+ let feedata = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (feedata == null || feedata.length == 0) {
+ return;
+ }
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let data = props.createExtCardDataSimple(PAGECODE.cardcode, PAGECODE.cardhead, bodyids);
+ ajax({
+ url: URL.financeorgChangeFee,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ let card = res.data;
+ if (card.bodys[PAGECODE.card_fee]) {
+ let deleterows = [];
+ card.bodys[PAGECODE.card_fee].rows.map((item) => {
+ if (item.status == '3') {
+ deleterows.push(item.rowid);
+ }
+ });
+ if (deleterows.length > 0) {
+ deleterows.forEach((rowid) => {
+ props.cardTable.delRowByRowId(PAGECODE.card_fee, rowid);
+ });
+ }
+ }
+ }
+ }
+ });
+}
+
+/*8nIjANkSB9VpkQdmnMi+FFYPOshN9M6haQqD6R9IZgk=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/batchEvents/batchFeeDetailEvents.js b/src/pu/pu/poorder/card/batchEvents/batchFeeDetailEvents.js
new file mode 100644
index 0000000..c32b3ef
--- /dev/null
+++ b/src/pu/pu/poorder/card/batchEvents/batchFeeDetailEvents.js
@@ -0,0 +1,400 @@
+/*n2EPq+PeSrHZkBbUucpeRyoK4C3ib8M6nWr+dBxKi0k=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购发票卡片批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-11 10:20:44
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, RELATECTFIELDS } from '../../constance';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import { processExtBillFeeDetailsEditResult, referFeeCT } from '../../../pub/utils/feeAfterUtil';
+import { canRateDateModify, canRateModify } from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil';
+import afterEvent from '../afterEvents/./feeDetailAfterEvent';
+
+export default async function batchFeeDetailEvents(obj) {
+ // console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ let BATCHITEM = [
+ FIELD.cfeematerialvid,
+ FIELD.cfeesuppliervid,
+ FIELD.corigcurrencyid,
+ FIELD.ntaxrate,
+ FIELD.nqtorigtaxprice,
+ FIELD.nqtorigprice,
+ FIELD.cctid,
+ FIELD.vfmemo,
+ FIELD.norigtaxmny,
+ FIELD.ntax,
+ FIELD.nexchangerate,
+ FIELD.cratetype,
+ FIELD.dratedate,
+ FIELD.norigprice,
+ FIELD.norigtaxprice,
+ FIELD.nglobalexchgrate,
+ FIELD.ngroupexchgrate,
+ FIELD.ftaxtypeflag,
+ FIELD.csendcountryid,
+ FIELD.crececountryid,
+ FIELD.ctaxcountryid,
+ FIELD.fbuysellflag,
+ FIELD.ctaxcodeid,
+ FIELD.nnosubtaxrate,
+ FIELD.nnosubtax,
+ FIELD.cprojectid,
+ FIELD.vfmemo,
+ FIELD.norigmny
+ ];
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vbfdef')) {
+ return;
+ }
+ // 费用项
+ if (attrcode == FIELD.cfeematerialvid) {
+ let data = new Array();
+ let datas = this.props.cardTable.getColValue(PAGECODE.cardbody, FIELD.pk_psfinanceorg);
+ if (datas) {
+ datas.map((item) => {
+ if (!data.includes(item.value)) {
+ data.push(item.value);
+ }
+ });
+ }
+ for (let i = 0; i < newValue.length; i++) {
+ if (data.length == 0) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: data.toString(),
+ isShowVerison: '1',
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.cfeesuppliervid) {
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ // 费用服务商
+ for (let i = 0; i < newValue.length; i++) {
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.corigcurrencyid) {
+ // 费用币种
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.ntaxrate) {
+ // 费用税率
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigtaxprice) {
+ // 含税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigprice) {
+ // 无税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.cctid) {
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let dbilldate = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value;
+ // 费用合同
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ let pk_supplier = newValue[i].values.cfeesupplieroid.value;
+ let cmaterial = newValue[i].values.cfeematerialvid.value; // 费用项物料
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.vfmemo) {
+ // 备注
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nexchangerate) {
+ // 折本汇率
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ // 折本汇率
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ let curr = newValue[i].values.ccurrencyid.value;
+ if (corigcurrencyid == curr) {
+ continue;
+ }
+ // 根据汇率类别判断编辑性
+ let flag = await canRateModify.call(this, (newValue[i].values.fratecategory || {}).value, true);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.ctaxcodeid) {
+ // 税码
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ // 税码
+ let ctaxcountryid = newValue[i].values.ctaxcountryid.value;
+ let fbuysellflag = newValue[i].values.fbuysellflag.value;
+ if (ctaxcountryid == null || ctaxcountryid == '' || null == fbuysellflag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.cratetype) {
+ // 汇率类型
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ //原币
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ //本币
+ let curr = newValue[i].values.ccurrencyid.value;
+ if (isNull(corigcurrencyid) || isNull(curr) || corigcurrencyid == curr) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.dratedate) {
+ // 汇率日期
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ let flag = canRateDateModify.call(this, (newValue[i].values.fratecategory || {}).value, true);
+ if (!flag) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ areaCode,
+ attrcode,
+ queryValue,
+ changedrows,
+ indexs,
+ null,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData.call(
+ this,
+ props,
+ aggvos,
+ URL.cardFeeDetailAfterEvent,
+ areaCode,
+ attrcode,
+ changedrows,
+ indexs[0]
+ );
+ });
+}
+
+// 根据费用项和物料行生成费用明细
+function getAfterData(props, aggvos, url, moduleId, key, changedrows, index) {
+ let userobject = {};
+ userobject['batch'] = 'batch';
+ aggvos.userObject = userobject;
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, PAGECODE.card_fee_detail, res.data, FIELD.crowno);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+}
+
+function isNull(value) {
+ if (value == undefined || value === '') {
+ return true;
+ }
+ return false;
+}
+
+/*n2EPq+PeSrHZkBbUucpeRyoK4C3ib8M6nWr+dBxKi0k=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/batchEvents/batchFeeEvents.js b/src/pu/pu/poorder/card/batchEvents/batchFeeEvents.js
new file mode 100644
index 0000000..4262ddf
--- /dev/null
+++ b/src/pu/pu/poorder/card/batchEvents/batchFeeEvents.js
@@ -0,0 +1,285 @@
+/*mLY54kvp1tnJxS2ssCw05X8DcPrEmjUSZ2f8aIfK2JQ=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 采购发票卡片批量粘贴编辑事件
+ * @Date: 2020-09-01 09:28:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-28 13:55:54
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, RELATECTFIELDS } from '../../constance';
+import { creatGrandsonDataForAfterEdit } from '../../../pub/utils/grandsonUtils';
+import {
+ processExtBillFeeEditResult,
+ processExtBillFeeDetailsEditResult,
+ referFeeCT
+} from '../../../pub/utils/feeAfterUtil';
+import afterEvent from '../afterEvents/./feeAfterEvent';
+export default async function batchFeeEvents(obj) {
+ // console.log(obj);
+ let areaCode = obj.areaCode; //区域编码
+ let column = obj.column; //列信息
+ let newValue = obj.newValue; //变更的行信息
+ let queryValue = [];
+ let changedrows = obj.changedrows; //变更的信息,仅包含newValue和OldValue
+ let currentIndex = obj.currentIndex; //当前行
+ let indexs = [];
+ let rows = [];
+ let attrcode = column.attrcode; //列code
+ let queryCondition; //统一过滤的过滤条件
+ let isManyCondition = null; //是否多个过滤条件
+ let pasteData = obj.pasteData; //粘贴的值
+
+ let BATCHITEM = [
+ // 常量
+ FIELD.cfeematerialvid,
+ FIELD.corigcurrencyid,
+ FIELD.cfeesuppliervid,
+ FIELD.ntaxrate,
+ FIELD.nqtorigtaxprice,
+ FIELD.nqtorigprice,
+ FIELD.cctid,
+ FIELD.vfmemo
+ ];
+ if (!BATCHITEM.includes(attrcode) && !attrcode.startsWith('vfdef')) {
+ return;
+ }
+ // 费用项
+ if (attrcode == FIELD.cfeematerialvid) {
+ let data = new Array();
+ let datas = this.props.cardTable.getColValue(PAGECODE.cardbody, FIELD.pk_psfinanceorg);
+ if (datas) {
+ datas.map((item) => {
+ if (!data.includes(item.value)) {
+ data.push(item.value);
+ }
+ });
+ }
+ for (let i = 0; i < newValue.length; i++) {
+ if (data.length == 0) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: data.toString(),
+ isShowVerison: '1',
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.cfeesuppliervid) {
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ // 费用服务商
+ for (let i = 0; i < newValue.length; i++) {
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.corigcurrencyid) {
+ // 费用币种
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.ntaxrate) {
+ // 费用税率
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigtaxprice) {
+ // 含税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.nqtorigprice) {
+ // 无税单价
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else if (attrcode == FIELD.cctid) {
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let dbilldate = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value;
+ // 费用合同
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ let pk_supplier = newValue[i].values.cfeesupplieroid.value;
+ let cmaterial = newValue[i].values.cfeematerialvid.value; // 费用项物料
+ let corigcurrencyid = newValue[i].values.corigcurrencyid.value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ queryValue[i].queryCondition = {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ isManyCondition = true;
+ } else if (attrcode == FIELD.vfmemo) {
+ // 备注
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) ||
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ } else {
+ for (let i = 0; i < newValue.length; i++) {
+ //如果费用项,费用服务商没有值就不允许编辑
+ if (
+ !(newValue[i].values.cfeesuppliervid && newValue[i].values.cfeesuppliervid.value) &&
+ !(newValue[i].values.cfeematerialvid && newValue[i].values.cfeematerialvid.value)
+ ) {
+ continue;
+ }
+ queryValue.push(newValue[i]);
+ indexs[i] = currentIndex + i;
+ rows[i] = [ i ];
+ }
+ }
+ this.props.cardTable
+ .updateAfterBatchChange({
+ areaCode,
+ column,
+ indexs,
+ queryValue,
+ changedrows,
+ pasteData,
+ queryCondition,
+ isManyCondition
+ })
+ .then((res) => {
+ let props = res.props;
+ changedrows = res.changedrows;
+ indexs = res.indexs;
+
+ //执行业务的批量编辑后事件
+ // afterEvent(props, areaCode, attrcode, queryValue, changedrows, indexs);
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.card_fee ];
+ let aggvos = creatGrandsonDataForAfterEdit(
+ props,
+ areaCode,
+ attrcode,
+ queryValue,
+ changedrows,
+ indexs,
+ null,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee_detail,
+ FIELD.pk_order_b,
+ FIELD.pk_order_b,
+ true,
+ bodyids,
+ null
+ );
+ getAfterData.call(this, props, aggvos, URL.cardFeeAfterEvent, areaCode, attrcode, indexs[0], changedrows);
+ });
+}
+
+// 根据费用项和物料行生成费用明细
+function getAfterData(props, aggvos, url, moduleId, key, index, changedrows) {
+ let userobject = {};
+ userobject['batch'] = 'batch';
+ aggvos.userObject = userobject;
+ ajax({
+ url: url,
+ data: aggvos,
+ method: 'POST',
+ async: false, //同步
+ success: (res) => {
+ if (res.data) {
+ // 更新费用项数据
+ processExtBillFeeEditResult(props, moduleId, res.data, aggvos, index, FIELD.crowno);
+ // 更新费用明细数据
+ processExtBillFeeDetailsEditResult(props, PAGECODE.card_fee_detail, res.data, FIELD.crowno);
+ // 费用项,费用服务商,币种编辑后关联合同
+ referFeeCT(
+ this,
+ props,
+ moduleId,
+ index,
+ changedrows,
+ afterEvent,
+ res.data.userObject,
+ RELATECTFIELDS,
+ key
+ );
+ }
+ }
+ });
+}
+
+/*mLY54kvp1tnJxS2ssCw05X8DcPrEmjUSZ2f8aIfK2JQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/batchEvents/index.js b/src/pu/pu/poorder/card/batchEvents/index.js
new file mode 100644
index 0000000..30a6125
--- /dev/null
+++ b/src/pu/pu/poorder/card/batchEvents/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import batchEvents from './batchEvents';
+import batchFeeEvents from './batchFeeEvents';
+import batchFeeDetailEvents from './batchFeeDetailEvents';
+export { batchEvents, batchFeeEvents, batchFeeDetailEvents };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/beforeEvent.js b/src/pu/pu/poorder/card/beforeEvents/beforeEvent.js
new file mode 100644
index 0000000..8467ae1
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/beforeEvent.js
@@ -0,0 +1,30 @@
+/*lA7FrGfHlashLvM+HJWGNfFP8qtzbZGoR0+ewRKT3vU=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片编辑前
+ * @Date: 2018-07-25 09:58:00
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-10 11:19:35
+ */
+
+import { FIELD, PAGECODE } from '../../constance';
+import headBeforeEvent from './headBeforeEvent';
+import bodyBeforeEvent from './bodyBeforeEvent';
+import paymentBeforEvents from './paymentBeforEvents';
+import feeBeforEvents from './feeBeforEvents';
+import feeDetailBeforEvents from './feeDetailBeforEvents';
+export default function beforeEvent(props, moduleId, key, value, index, record) {
+ if (moduleId == PAGECODE.cardhead) {
+ return headBeforeEvent.call(this, props, moduleId, key, value);
+ } else if (moduleId == PAGECODE.cardbody || moduleId == PAGECODE.childform2 || moduleId == PAGECODE.material1) {
+ return bodyBeforeEvent.call(this, props, moduleId, key, value, index, record);
+ } else if (moduleId == PAGECODE.head_payment) {
+ return paymentBeforEvents.call(this, props, moduleId, key, value, index, record);
+ } else if (moduleId == PAGECODE.card_fee) {
+ return feeBeforEvents.call(this, props, moduleId, key, value, index, record);
+ } else if (moduleId == PAGECODE.card_fee_detail) {
+ return feeDetailBeforEvents.call(this, props, moduleId, key, value, index, record);
+ }
+}
+
+/*lA7FrGfHlashLvM+HJWGNfFP8qtzbZGoR0+ewRKT3vU=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/bodyBeforeEvent.js b/src/pu/pu/poorder/card/beforeEvents/bodyBeforeEvent.js
new file mode 100644
index 0000000..263691c
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/bodyBeforeEvent.js
@@ -0,0 +1,877 @@
+/*U41ajtHAnBXc4J9azvHa6RSHSsWpQhGDSN/GtRT0qDY=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片表体编辑前事件
+ * @Date: 2018-08-06 15:53:53
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-29 10:20:58
+ */
+import { toast } from 'nc-lightapp-front';
+import { FIELD, PAGECODE, URL, FREEFIELD, BATCHITEMPRCE, NUMS, TRANSFER49 } from '../../constance';
+import vbillcodeBeforeEvent from './vbillcodeBeforeEvent';
+import vtrantypecode from './vtrantypecode';
+import remoteRequest from './remoteRequest';
+import { vfreeBeforeEvent } from '../../../pub/beforeevent';
+import { processBatchCodeItem } from '../../../pub/utils/batchCodeUtil';
+import { marAsstUtils, crossRuleUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import {
+ canRateDateModify,
+ canRateModify,
+ rateTypeSellFilter,
+ isRowSelfMake
+} from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default async function(props, moduleId, key, value, index, record) {
+ let _this = this;
+ let checkmaterial = record.values.pk_material.value;
+ checkmaterial = checkmaterial == '' ? null : checkmaterial;
+ if (key != 'pk_material' && checkmaterial == null) {
+ return false;
+ }
+ let flag = true;
+ let constance = {};
+ let meta = this.props.meta.getMeta();
+ let pk_org = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ //wbs推单生成的采购订单不允许修改数量主数量,而且推单生成的采购订单表体wbs一定优值,且是唯一值
+ //所以在此取订单表体第一行的wbs的值,作为判断
+ let wbs = this.props.cardTable.getValByKeyAndIndex(PAGECODE.cardbody, 0, FIELD.wbs);
+ meta[PAGECODE.cardbody].items.map((item) => {
+ // if (item.attrcode == FIELD.pk_material) {
+ // item.isMultiSelectedEnabled = true;
+ // }
+ if (item.attrcode == 'pk_reqdept_v') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ let pk_reqstoorg = record.values.pk_reqstoorg.value;
+ return {
+ pk_org: pk_reqstoorg,
+ busifuncode: FIELD.STOCKORG
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ if (key == FIELD.castunitid) {
+ let wbs = record.values.wbs;
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000167')); /* 国际化处理: 计划编制生成的采购订单,不允许修改单位,换算率*/
+ return false;
+ }
+ // 计量单位
+ let material = record.values.pk_material.value;
+ if (material == null) {
+ flag = false;
+ } else {
+ // 根据本行物料做参照过滤
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.castunitid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_material: material,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.AssistUnitBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ flag = true;
+ }
+ } else if (key == FIELD.cqtunitid) {
+ let wbs = record.values.wbs;
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000167')); /* 国际化处理: 计划编制生成的采购订单,不允许修改单位,换算率*/
+ return false;
+ }
+ // 报价单位
+ flag = true;
+ // 物料
+ let materialmaterial = record.values.pk_material.value;
+ if (materialmaterial == null) {
+ flag = false;
+ } else {
+ // 根据本行物料做参照过滤
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.cqtunitid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_material: materialmaterial,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.AssistUnitBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ flag = true;
+ }
+ } else if (key == FIELD.pk_reqstordoc) {
+ flag = true;
+ let pk_reqstoorg = record.values.pk_reqstoorg.value;
+ if (pk_reqstoorg == null) {
+ flag = false;
+ }
+ // 过滤需求仓库参照
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_reqstordoc) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_reqstoorg,
+ busifuncode: FIELD.STOCKORG,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RequestWarehouseBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ // } else if (key == 'pk_apliabcenter_v') {
+ // flag = true;
+ // let pk_psfinanceorg = record.values.pk_psfinanceorg && record.values.pk_psfinanceorg.value;
+ // meta[PAGECODE.cardbody].items.map((item) => {
+ // if (item.attrcode == 'pk_apliabcenter_v') {
+ // props.cardTable.setQueryCondition(moduleId, {
+ // [item.attrcode]: () => {
+ // return {
+ // pk_manageorg: pk_psfinanceorg
+ // };
+ // }
+ // });
+ // }
+ // });
+ // } else if (key == 'pk_arrliabcenter_v') {
+ // flag = true;
+ // let pk_arrvstoorg = record.values.pk_arrvstoorg && record.values.pk_arrvstoorg.value;
+ // meta[PAGECODE.cardbody].items.map((item) => {
+ // if (item.attrcode == 'pk_arrliabcenter_v') {
+ // props.cardTable.setQueryCondition(moduleId, {
+ // [item.attrcode]: () => {
+ // return {
+ // pk_manageorg: pk_arrvstoorg
+ // };
+ // }
+ // });
+ // }
+ // });
+ } else if (key == FIELD.pk_recvstordoc) {
+ // 收货仓库的编辑前事件
+ flag = true;
+ let pk_arrvstoorg = record.values.pk_arrvstoorg.value;
+ if (pk_arrvstoorg == null) {
+ flag = false;
+ }
+ let pk_arrliabcenter = record.values.pk_arrliabcenter.value; // 利润中心
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_recvstordoc) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_arrvstoorg,
+ busifuncode: FIELD.STOCKORG,
+ pk_arrliabcenter: pk_arrliabcenter,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.RequestWarehouseBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ } else if (key == FIELD.pk_reqdept_v) {
+ // 需求部门
+ flag = true;
+ let pk_reqstoorg = record.values.pk_reqstoorg.value;
+ if (pk_reqstoorg == null) {
+ flag = false;
+ }
+ let csourcetypecode = record.values.csourcetypecode.value;
+ if (FIELD.PrayBill == csourcetypecode) {
+ flag = false;
+ }
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_reqdept_v) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_reqstoorg,
+ busifuncode: FIELD.STOCKORG
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ } else if (key == FIELD.ccontractid) {
+ //合同
+ flag = true;
+ let csourcetypecode = record.values.csourcetypecode.value;
+ if (FIELD.PurDaily == csourcetypecode) {
+ flag = false;
+ }
+ if (flag) {
+ let pk_org = record.values.pk_org.value;
+ let pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ let cmaterial = record.values.pk_material.value;
+ let corigcurrencyid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.corigcurrencyid).value;
+ let dbilldate = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ flag = false;
+ }
+ if (flag) {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == key) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CcontractidBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ }
+ } else if (key == FIELD.pk_material) {
+ //物料
+ flag = true;
+ //let pk_org = record.values.pk_org.value;
+ let csourcetypecode = record.values.csourcetypecode.value;
+ if (TRANSFER49.CSOURCETYPECODE == csourcetypecode) {
+ flag = false;
+ } else {
+ if (FIELD.PurDaily == csourcetypecode) {
+ let ccontractrowid = record.values.ccontractrowid.value;
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_material) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ pk_org = record.values.pk_org.value;
+ ccontractrowid = record.values.ccontractrowid.value;
+ return {
+ pk_org: pk_org,
+ ccontractrowid: ccontractrowid,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.MaterialBodyRefFilter',
+ TreeRefActionExt: 'nccloud.web.pu.order.ref.MaterialBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ } else if (!csourcetypecode) {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_material) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_org
+ };
+ }
+ });
+ }
+ });
+ }
+ }
+ } else if (key == FIELD.pk_reqstoorg_v) {
+ //需求库存组织
+ flag = true;
+ let csourcetypecode = record.values.csourcetypecode.value;
+ if (FIELD.PrayBill == csourcetypecode) {
+ flag = false;
+ } else if (FIELD.SoOrder == csourcetypecode) {
+ flag = true;
+ let vsourcetrantype = record.values.vsourcetrantype.value;
+ constance.key = key;
+ constance.params = {
+ vsourcetrantype: vsourcetrantype
+ };
+ let direct = await remoteRequest(URL.bodybeforeedit, constance);
+ if (direct) {
+ //是直运的情况要做参照过滤 如果是直运,参照范围为结算财务组织下属的库存组织档案.
+ let pk_psfinanceorg = record.values.pk_psfinanceorg.value;
+ if (pk_psfinanceorg != null) {
+ let pk_group = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_group).value;
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_reqstoorg_v) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_group: pk_group,
+ pk_psfinanceorg: pk_psfinanceorg,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.ReqstoorgBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ } else {
+ flag = true;
+ }
+ }
+ } else if (key == FIELD.pk_arrvstoorg_v) {
+ // 收货库存组织
+ flag = true;
+ let csourcetypecode = record.values.csourcetypecode.value;
+ if (FIELD.SoOrder != csourcetypecode) {
+ flag = true;
+ } else {
+ let vsourcetrantype = record.values.vsourcetrantype.value;
+ constance.key = key;
+ constance.params = {
+ vsourcetrantype: vsourcetrantype
+ };
+ let direct = await remoteRequest(URL.bodybeforeedit, constance);
+ if (direct) {
+ //是直运的情况要做参照过滤 如果是直运,参照范围为结算财务组织下属的库存组织档案.
+ let pk_psfinanceorg = record.values.pk_psfinanceorg.value;
+ if (pk_psfinanceorg != null) {
+ let pk_group = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_group).value;
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_arrvstoorg_v) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_group: pk_group,
+ pk_psfinanceorg: pk_psfinanceorg,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.ReqstoorgBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ } else {
+ flag = true;
+ }
+ }
+ } else if (key == FIELD.pk_psfinanceorg_v) {
+ //结算财务组织 直运、协同销售订单时结算财务组织不可编辑
+ flag = true;
+ let vcoopordercode = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vcoopordercode).value;
+ let csourcetypecode = record.values.csourcetypecode.value;
+ let vsourcetrantype = record.values.vsourcetrantype.value;
+ if (vcoopordercode != null) {
+ flag = false;
+ } else if (FIELD.SoOrder != csourcetypecode) {
+ flag = true;
+ } else {
+ constance.key = key;
+ constance.params = {
+ vsourcetrantype: vsourcetrantype
+ };
+ let direct = await remoteRequest(URL.bodybeforeedit, constance);
+ if (direct) {
+ flag = false;
+ }
+ }
+ } else if (key == 'vchangerate') {
+ let wbs = record.values.wbs;
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000167')); /* 国际化处理: 计划编制生成的采购订单,不允许修改单位,换算率*/
+ return false;
+ }
+ // 换算率
+ flag = true;
+ let material = record.values.pk_material.value;
+ let castunitid = record.values.castunitid.value;
+ let cqtunitid = record.values.cqtunitid.value;
+ let cunitid = record.values.cunitid.value;
+ if (material == null) {
+ flag = false;
+ } else {
+ constance.key = key;
+ constance.params = {
+ pk_material: material,
+ castunitid: castunitid,
+ cqtunitid: cqtunitid,
+ cunitid: cunitid
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ }
+ } else if (key == 'vqtunitrate') {
+ let wbs = record.values.wbs;
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000167')); /* 国际化处理: 计划编制生成的采购订单,不允许修改单位,换算率*/
+ return false;
+ }
+ // 报价单位换算率
+ flag = true;
+ let material = record.values.pk_material.value;
+ let castunitid = record.values.castunitid.value;
+ let cqtunitid = record.values.cqtunitid.value;
+ let cunitid = record.values.cunitid.value;
+ if (material == null) {
+ flag = false;
+ } else {
+ constance.key = key;
+ constance.params = {
+ pk_material: material,
+ castunitid: castunitid,
+ cqtunitid: cqtunitid,
+ cunitid: cunitid
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ }
+ } else if (key == FIELD.vbatchcode) {
+ // 批次号
+ flag = true;
+ let pk_material = record.values.pk_material.value;
+ let pk_arrvstoorg = record.values.pk_arrvstoorg.value;
+ constance.key = key;
+ constance.params = {
+ cmaterialvid: pk_material,
+ materialvid: pk_material,
+ pk_org: pk_arrvstoorg
+ };
+ // flag = await remoteRequest(URL.bodybeforeedit, constance);
+ flag = await vfreeBeforeEvent(_this.props, constance);
+ if (flag) {
+ //当批次号可编辑时,处理批次号参照弹出框里的数据
+ processBatchCodeItem.call(_this, props, [ PAGECODE.childform2, PAGECODE.cardbody ], key, record, '21');
+ }
+ } else if (key == 'cqpbaseschemeid') {
+ //优质优价方案
+ flag = true;
+ let pk_srcmaterial = record.values.pk_srcmaterial.value;
+ let pk_org = record.values.pk_org.value;
+ let pk_group = record.values.pk_group.value;
+ let dbilldate = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value;
+ if (pk_srcmaterial == null || pk_org == null) {
+ flag = false;
+ } else {
+ let pk_order = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value;
+ let pk_order_b = record.values.pk_order_b.value;
+ if (null == pk_order || null == pk_order_b) {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'cqpbaseschemeid') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_srcmaterial: pk_srcmaterial,
+ pk_org: pk_org,
+ pk_group: pk_group,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CqpbaseschemeidBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ } else {
+ constance.key = key;
+ constance.params = {
+ pk_order: pk_order,
+ pk_order_b: pk_order_b
+ };
+ let havePs = await remoteRequest(URL.bodybeforeedit, constance);
+ if (havePs) {
+ flag = false;
+ } else {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'cqpbaseschemeid') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_srcmaterial: pk_srcmaterial,
+ pk_org: pk_org,
+ pk_group: pk_group,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CqpbaseschemeidBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ }
+ }
+ } else if (key == 'pk_flowstockorg_v') {
+ // 物流组织
+ flag = true;
+ let pk_recvstordoc = record.values.pk_recvstordoc.value;
+ let pk_arrvstoorg = record.values.pk_arrvstoorg.value;
+ if (pk_recvstordoc != null || pk_arrvstoorg != null) {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'pk_flowstockorg_v') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_recvstordoc: pk_recvstordoc,
+ pk_arrvstoorg: pk_arrvstoorg,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FlowstockorgBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ } else {
+ flag = false;
+ }
+ } else if (key == 'nglobalexchgrate') {
+ // 全局本位币汇率
+ flag = true;
+ let corigcurrencyid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, 'corigcurrencyid').value;
+ let ccurrencyid = record.values.ccurrencyid.value;
+ constance.key = key;
+ constance.params = {
+ corigcurrencyid: corigcurrencyid,
+ ccurrencyid: ccurrencyid
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ } else if (key == 'ngroupexchgrate') {
+ // 集团本位币汇率
+ flag = true;
+ let pk_group = record.values.pk_group.value;
+ let corigcurrencyid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, 'corigcurrencyid').value;
+ let ccurrencyid = record.values.ccurrencyid.value;
+ constance.key = key;
+ constance.params = {
+ pk_group: pk_group,
+ corigcurrencyid: corigcurrencyid,
+ ccurrencyid: ccurrencyid
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ } else if (key == 'blargess') {
+ // 赠品
+ flag = true;
+ let breceiveplan = record.values.breceiveplan.value;
+ if (breceiveplan) {
+ flag = false;
+ }
+ } else if (key == 'casscustvid' || key == 'casscustid') {
+ // 客户 参照的范围为主组织可见的客户 已经在方法入口统一处理
+ flag = true;
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == key) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ let pk_org = record.values.pk_org.value;
+ return {
+ pk_org: pk_org
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ } else if (key == 'ncaltaxmny') {
+ // 计税金额
+ flag = true;
+ let buysellflag = record.values.fbuysellflag.value;
+ // 当购销类型=国内采购时不可编辑;购销类型=进口采购时跨国业务支持编辑。
+ flag = FIELD.EXPORTATION == buySellFlag || FIELD.IMPORTATION == buySellFlag;
+ } else if (key == 'ctaxcodeid') {
+ // 税码
+ flag = true;
+ let ctaxcountryid = record.values.ctaxcountryid.value;
+ let fbuysellflag = record.values.fbuysellflag.value;
+ if (ctaxcountryid == null || null == fbuysellflag) {
+ flag = false;
+ } else {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'ctaxcodeid') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ ctaxcountryid: ctaxcountryid,
+ fbuysellflag: fbuysellflag,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CtaxcodeidBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ } else if (key == 'cdestiareaid') {
+ // 目的地区
+ flag = true;
+ let country = record.values.cdesticountryid.value;
+ if (country == null) {
+ flag = false;
+ } else {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'cdestiareaid') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: country
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ } else if (key == 'corigareaid') {
+ // 原产地区
+ flag = true;
+ let country = record.values.corigcountryid.value;
+ if (country == null) {
+ flag = false;
+ } else {
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'corigareaid') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: country
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ } else if (key == 'nitemdiscountrate') {
+ // 折扣
+ flag = true;
+ let pk_discount = record.values.pk_discount.value;
+ // 询过折扣(折扣规则编码不为空),折扣字段不允许编辑
+ if (pk_discount != null) {
+ flag = false;
+ let pk_org = record.values.pk_org.value;
+ // 取参数:调整无税金额、价税合计、含税净价、无税净价时调整折扣还是单价。
+ constance.key = key;
+ constance.params = {
+ pk_org: pk_org
+ };
+ let po84 = await remoteRequest(URL.bodybeforeedit, constance);
+ // 如果参数“PO84调整无税金额、价税合计、含税净价、无税净价时调整折扣还是单价”为调折扣,则无税金额、价税合计、含税净价、无税净价也不允许手工编辑
+ if (!po84) {
+ //false 代表以下字段不可编辑
+ _this.props.cardTable.setEditableByRowId(moduleId, record.rowid, 'norigmny', false);
+ _this.props.cardTable.setEditableByRowId(moduleId, record.rowid, 'norigtaxmny', false);
+ _this.props.cardTable.setEditableByRowId(moduleId, record.rowid, 'nqtorigtaxnetprc', false);
+ _this.props.cardTable.setEditableByRowId(moduleId, record.rowid, 'nqtorignetprice', false);
+ }
+ } else {
+ flag = true;
+ }
+ } else if (key == 'vvenddevaddr') {
+ // 供应商发货地址
+ flag = true;
+ let pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ if (pk_supplier != null) {
+ let pk_org = record.values.pk_org.value;
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == 'vvenddevaddr') {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier
+ // GridRefActionExt: 'nccloud.web.pu.order.ref.VenddevaddrBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ // props.meta.setMeta(meta);
+ flag = true;
+ } else {
+ flag = false;
+ }
+ } else if (key == 'pk_receiveaddress') {
+ // 收货地址
+ flag = true;
+ let pk_customer = _this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_recvcustomer').value;
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode === 'pk_receiveaddress') {
+ if (pk_customer == null) {
+ item.label = getLangByResId(this, '4004POORDER-000002'); /* 国际化处理: 地址簿*/
+ item.itemtype = 'refer';
+ item.refcode = 'uapbd/refer/pubinfo/AddressRef/index.js';
+ } else {
+ // refPanel.setRefModel(RefPubUtil.getRefModel(getLangByResId(this, '4004POORDER-000003'))); /* 国际化处理: 客户收货地址*//* -=notranslate=- */
+ item.label = getLangByResId(this, '4004POORDER-000003'); /* 国际化处理: 客户收货地址*/
+ item.itemtype = 'refer';
+ item.refcode = 'uapbd/refer/customer/CustAddressGridRef/index.js';
+ setTimeout(() => {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_recvcustomer: pk_customer,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.ReceiveAddressBodyRefFilter'
+ };
+ }
+ });
+ }, 0);
+ }
+ }
+ });
+ // props.meta.setMeta(meta);
+ } else if (key == 'nexchangerate') {
+ // 折本汇率
+ flag = true;
+ let corigcurrencyid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.corigcurrencyid).value; //原币
+ let curr = record.values.ccurrencyid.value;
+ if (corigcurrencyid == curr) {
+ flag = false;
+ } else {
+ // 根据汇率类别判断编辑性
+ return canRateModify.call(
+ this,
+ (record.values.fratecategory || {}).value,
+ isRowSelfMake.call(this, record, 'csourcetypecode', [ '23', 'Z2', '45' ])
+ );
+ }
+ } else if (key == FIELD.cratetype) {
+ // 汇率类型
+ _this.props.cardTable.setQueryCondition(PAGECODE.cardbody, {
+ [key]: () => {
+ return rateTypeSellFilter();
+ }
+ });
+ //原币
+ let corigcurrencyid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.corigcurrencyid).value;
+ //组织本位币
+ let curr = record.values.ccurrencyid.value;
+ if (isNull(corigcurrencyid) || isNull(curr) || corigcurrencyid == curr) {
+ flag = false;
+ }
+ } else if (key == FIELD.dratedate) {
+ // 汇率日期
+ return canRateDateModify.call(
+ this,
+ (record.values.fratecategory || {}).value,
+ isRowSelfMake.call(this, record, 'csourcetypecode', [ '23', 'Z2', '45' ])
+ );
+ } else if (key == 'vvendorordercode' || key == 'vvendororderrow' || key == 'nconfirmnum' || key == 'dconfirmdate') {
+ // 对方订单号、对方订单行号、确认数量、确认日期
+ flag = true;
+ let vtrantypecode = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vtrantypecode).value;
+ constance.key = key;
+ constance.params = {
+ vtrantypecode: vtrantypecode
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ } else if (
+ key == 'pk_arrvstoorg' ||
+ key == 'pk_reqstoorg' ||
+ key == 'pk_psfinanceorg' ||
+ key == 'pk_apfinanceorg' ||
+ key == 'ccurrencyid'
+ ) {
+ flag = false;
+ } else if (BATCHITEMPRCE.includes(key)) {
+ // 根据交易类型属性价格来源方式,判断无税单价,含税单价,价税合计,无税金额,税额,无税净价,含税净价,主无税单价,主含税单价,主无税净价,主含税净价编辑性
+ flag = true;
+ let vtrantypecode = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vtrantypecode).value;
+ // 价格来源
+ let fpricesourceflag = record.values.fpricesourceflag.value;
+ constance.key = key;
+ constance.params = {
+ vtrantypecode: vtrantypecode,
+ fpricesourceflag: fpricesourceflag
+ };
+ flag = await remoteRequest(URL.bodybeforeedit, constance);
+ }
+ let fixAssts = [
+ 'casscustvid',
+ 'casscustid',
+ 'cproductorid',
+ 'cprojectid',
+ 'pk_supplier_v',
+ 'pk_supplier',
+ 'cffileid'
+ ];
+ if (key.startsWith('vfree') || fixAssts.includes(key)) {
+ let materialvid = record.values.pk_material.value;
+ //辅助属性
+ if (fixAssts.includes(key)) {
+ if (key == 'cprojectid' && wbs && wbs.value && wbs.value != null) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000161')); /* 国际化处理: 计划编制生成的采购订单,不允许编辑项目字段*/
+ flag = false;
+ } else {
+ flag = true;
+ }
+ } else {
+ let pk_org = record.values.pk_org.value;
+
+ constance.key = key;
+ constance.params = {
+ key: key,
+ pk_org: pk_org,
+ materialvid: materialvid
+ };
+ flag = await vfreeBeforeEvent(_this.props, constance);
+ }
+ if (flag) {
+ if (key == 'cffileid') {
+ this.props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ cmaterialvid: materialvid
+ };
+ }
+ });
+ }
+
+ marAsstUtils.resetItem.call(
+ this,
+ props,
+ '400400800',
+ PAGECODE.cardcode,
+ moduleId,
+ key,
+ record, // marAsstUtils.filterRecord.call(this, 'vfree', fixAssts, record)
+ FREEFIELD
+ );
+ }
+ } else if (NUMS.includes(key)) {
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000160')); /* 国际化处理: 计划编制生成的采购订单,不允许修改数量,主数量*/
+ return false;
+ }
+ } else if (key == FIELD.wbs) {
+ return false;
+ }
+ // if (flag && moduleId == PAGECODE.cardbody) {
+ let crossRuleParams = {
+ props,
+ key, //当前字段
+ appcode: null, //小应用编码,如果是本应用,可为空
+ pagecode: PAGECODE.cardcode, //页面编码
+ headarea: PAGECODE.cardhead, //表头区域编码
+ bodyarea: PAGECODE.cardbody, //表体区域编码
+ isHead: false, //是否为表头区字段
+ record, //当前表体行数据,如果是表头触发,可以为空
+ pk_org_field: FIELD.pk_org, //组织字段,注意为oid
+ billtype: '21', //单据类型
+ transtypeid_field: FIELD.ctrantypeid //交易类型id字段
+ };
+ crossRuleUtils.beforeEdit.call(this, crossRuleParams);
+ // }
+ return flag;
+}
+function isNull(value) {
+ if (value == undefined || value === '') {
+ return true;
+ }
+ return false;
+}
+
+/*U41ajtHAnBXc4J9azvHa6RSHSsWpQhGDSN/GtRT0qDY=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/feeBeforEvents.js b/src/pu/pu/poorder/card/beforeEvents/feeBeforEvents.js
new file mode 100644
index 0000000..dbcfefe
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/feeBeforEvents.js
@@ -0,0 +1,115 @@
+/*AawEVE7M/vpQpVSwcCK5kaUEg1i7HqKvXV7TG7bMC5c=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 费用项编辑前
+ * @Date: 2023-03-10 10:34:27
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-10 10:34:27
+ */
+import { FIELD, PAGECODE } from '../../constance';
+export default async function(props, moduleId, key, value, index, record) {
+ let meta = this.props.meta.getMeta();
+ let flag = true;
+ if (key == FIELD.cfeesuppliervid) {
+ // 费用服务商
+ meta[PAGECODE.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ let orgs = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: orgs,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cfeematerialvid) {
+ let data = new Array();
+ let datas = props.cardTable.getColValue(PAGECODE.cardbody, FIELD.pk_psfinanceorg);
+ if (datas) {
+ datas.map((item) => {
+ if (!data.includes(item.value)) {
+ data.push(item.value);
+ }
+ });
+ }
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ // 费用项
+ meta[PAGECODE.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org:pk_org,
+ pk_psfinanceorg: data.toString(),
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cctid) {
+ //费用合同
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let dbilldate = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ flag = false;
+ }
+ if (flag) {
+ meta[PAGECODE.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cctid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ });
+ }
+ });
+ }
+ } else if (key == FIELD.vfmemo) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else if (key.startsWith('vfdef')) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ }
+ return flag;
+}
+
+/*AawEVE7M/vpQpVSwcCK5kaUEg1i7HqKvXV7TG7bMC5c=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/feeDetailBeforEvents.js b/src/pu/pu/poorder/card/beforeEvents/feeDetailBeforEvents.js
new file mode 100644
index 0000000..9152266
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/feeDetailBeforEvents.js
@@ -0,0 +1,232 @@
+/*J82yblgwIkCKSFjUvy+luNUzSxCA6MvXrD4qhD1zRl8=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 费用明细编辑前
+ * @Date: 2023-03-10 10:34:27
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-10 10:34:27
+ */
+import { FIELD, PAGECODE, URL } from '../../constance';
+import {
+ rateTypeSellFilter,
+ canRateDateModify,
+ canRateModify
+} from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil';
+import remoteRequest from './remoteRequest';
+export default async function(props, moduleId, key, value, index, record) {
+ let meta = this.props.meta.getMeta();
+ let flag = true;
+ if (key == FIELD.cfeesuppliervid) {
+ // 费用服务商
+ meta[PAGECODE.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ let orgs = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: orgs,
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cfeematerialvid) {
+ let pk_psfinanceorg = props.cardTable.getValByKeyAndIndex(moduleId, index, FIELD.pk_psfinanceorg).value;
+ let pk_org = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ // 费用项
+ meta[PAGECODE.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ pk_org: pk_org,
+ pk_psfinanceorg:pk_psfinanceorg,
+ GridRefActionExt: 'nccloud.web.pu.pub.ref.FeeMaterialRefFilter',
+ isDataPowerEnable: true, // 是否启用权限管理
+ DataPowerOperationCode: 'SCMDefault' // 使用场景
+ };
+ }
+ });
+ }
+ });
+ } else if (key == FIELD.cctid) {
+ //费用合同
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let dbilldate = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value;
+ if (
+ null == pk_org ||
+ null == pk_supplier ||
+ null == cmaterial ||
+ null == corigcurrencyid ||
+ null == dbilldate
+ ) {
+ flag = false;
+ }
+ if (flag) {
+ meta[PAGECODE.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cctid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [key]: () => {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pk_material: cmaterial,
+ corigcurrencyid: corigcurrencyid,
+ dbilldate: dbilldate,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.FeeCctidRefFilter'
+ };
+ }
+ });
+ }
+ });
+ }
+ } else if (key == FIELD.nexchangerate) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 折本汇率
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let curr = record.values.ccurrencyid.value;
+ if (corigcurrencyid == curr) {
+ flag = false;
+ } else {
+ // 根据汇率类别判断编辑性
+ return canRateModify.call(this, (record.values.fratecategory || {}).value, true);
+ }
+ } else if (key == FIELD.cratetype) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 汇率类型
+ props.cardTable.setQueryCondition(PAGECODE.card_fee_detail, {
+ [key]: () => {
+ return rateTypeSellFilter();
+ }
+ });
+ //原币
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ //本币
+ let curr = record.values.ccurrencyid.value;
+ if (isNull(corigcurrencyid) || isNull(curr) || corigcurrencyid == curr) {
+ flag = false;
+ }
+ } else if (key == FIELD.dratedate) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 汇率日期
+ return canRateDateModify.call(this, (record.values.fratecategory || {}).value, true);
+ } else if (key == FIELD.ctaxcodeid) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ // 税码
+ let ctaxcountryid = record.values.ctaxcountryid.value;
+ let fbuysellflag = record.values.fbuysellflag.value;
+ if (ctaxcountryid == null || ctaxcountryid == '' || null == fbuysellflag) {
+ flag = false;
+ } else {
+ meta[PAGECODE.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.ctaxcodeid) {
+ props.cardTable.setQueryCondition(moduleId, {
+ [item.attrcode]: () => {
+ return {
+ ctaxcountryid: ctaxcountryid,
+ fbuysellflag: fbuysellflag,
+ GridRefActionExt: 'nccloud.web.pu.order.ref.CtaxcodeidBodyRefFilter'
+ };
+ }
+ });
+ }
+ });
+ }
+ } else if (key == FIELD.nglobalexchgrate) {
+ // 全局本位币汇率
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let ccurrencyid = record.values.ccurrencyid.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ corigcurrencyid: corigcurrencyid,
+ ccurrencyid: ccurrencyid
+ };
+ flag = await remoteRequest(URL.feeDetailBeforeEvent, constance);
+ return flag;
+ } else if (key == FIELD.ngroupexchgrate) {
+ // 集团本位币汇率
+ let pk_group = record.values.pk_group.value;
+ let corigcurrencyid = record.values.corigcurrencyid.value;
+ let ccurrencyid = record.values.ccurrencyid.value;
+ let constance = {};
+ constance.key = key;
+ constance.params = {
+ pk_group: pk_group,
+ corigcurrencyid: corigcurrencyid,
+ ccurrencyid: ccurrencyid
+ };
+ flag = await remoteRequest(URL.feeDetailBeforeEvent, constance);
+ return flag;
+ } else if (key == FIELD.vfmemo) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else if (key.startsWith('vbfdef')) {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ } else {
+ let pk_supplier = record.values.cfeesupplieroid.value;
+ let cmaterial = record.values.cfeematerialvid.value; // 费用项物料
+ if (!pk_supplier || !cmaterial) {
+ flag = false;
+ }
+ }
+ return flag;
+}
+
+function isNull(value) {
+ if (value == undefined || value === '') {
+ return true;
+ }
+ return false;
+}
+
+/**
+ * 表体行是否符合自制规则
+ * @param {*} record
+ * @param {*} srctypeField 来源单据类型字段
+ * @param {*} cannotEditSrctypes 不可编辑的来源单据类型数组
+ * @returns
+ */
+function isRowSelfMake(rowdata) {
+ let isSelfMake = true;
+ let category = (rowdata.values.fratecategory || {}).value;
+ // 获取对应的采购订单行
+ if (category == '5') {
+ // 固定汇率、来源单据类型是不可编辑的单据类型
+ isSelfMake = false;
+ }
+ return isSelfMake;
+}
+
+/*J82yblgwIkCKSFjUvy+luNUzSxCA6MvXrD4qhD1zRl8=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/headBeforeEvent.js b/src/pu/pu/poorder/card/beforeEvents/headBeforeEvent.js
new file mode 100644
index 0000000..cab7099
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/headBeforeEvent.js
@@ -0,0 +1,218 @@
+/*SXDj+UzVnkytqCOCr56eS7Z6umlwbWXvyE7Br59yj6k=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片表头编辑后事件
+ * 所有字段的主组织过滤均在init中统一加入一次
+ * @Date: 2018-07-25 10:02:28
+ * @Last Modified by: zhr
+ * @Last Modified time: 2023-01-16 16:30:16
+ */
+import { FIELD, PAGECODE, URL, TRANSFER } from '../../constance';
+import vbillcodeBeforeEvent from './vbillcodeBeforeEvent';
+import vtrantypecode from './vtrantypecode';
+import remoteRequest from './remoteRequest';
+import { crossRuleUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default async function(props, moduleId, key, value) {
+ let _this = this;
+ let flag = true;
+ let constance = {};
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ transfer = transfer == null ? this.props.getUrlParam(TRANSFER.channelType) : transfer;
+ let meta = this.props.meta.getMeta();
+ let tailinfo = [
+ 'billmaker',
+ 'dmakedate',
+ 'approver',
+ 'taudittime',
+ 'crevisepsn',
+ 'trevisiontime',
+ 'pk_freezepsndoc',
+ 'tfreezetime',
+ 'iprintcount',
+ 'creator',
+ 'creationtime',
+ 'modifier',
+ 'modifiedtime'
+ ];
+ // 编辑表头需要有表体的字段
+ let needBodys = [ FIELD.nhtaxrate ];
+ if (key == FIELD.vbillcode) {
+ constance = {
+ key: FIELD.vbillcode,
+ formareaid: PAGECODE.cardhead,
+ pk_org_key: FIELD.pk_org,
+ billtype: PAGECODE.billType
+ };
+ flag = await vbillcodeBeforeEvent.call(this, props, constance);
+ } else if (key == FIELD.cemployeeid) {
+ // 原nc的业务员的编辑前事件是根据采购组织和采购部门参照过滤的
+ flag = true;
+ } else if (key == FIELD.pk_dept_v) {
+ // 原nc的采购部门编辑前事件根据采购组织和采购部门oid过滤
+ flag = true;
+ } else if (key == FIELD.pk_dept) {
+ // 原nc的采购部门编辑前事件根据采购组织和采购部门oid过滤
+ flag = true;
+ } else if (key == FIELD.ctrantypeid) {
+ // 交易类型
+ flag = await vtrantypecode.call(this);
+ let transty = transtypeUtils.beforeEdit.call(this, key, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ flag = flag && transty;
+ let forderstatus = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'forderstatus'); //单据状态
+ forderstatus = forderstatus && forderstatus.value;
+ flag = forderstatus == FIELD.approve ? false : flag;
+ } else if (key == FIELD.pk_supplier_v) {
+ // 供应商
+ flag = true;
+ let vcoopordercode = _this.props.form.getFormItemsValue(PAGECODE.cardhead, 'vcoopordercode').value;
+ if (vcoopordercode != null) {
+ flag = false;
+ }
+ if (this.props.getUrlParam('transfer') == 'Z2') {
+ //拉合同过来不可编辑供应商
+ flag = false;
+ }
+ if (flag) {
+ meta[PAGECODE.cardhead].items.map((item) => {
+ if (item.attrcode == key) {
+ item.queryCondition = () => {
+ let orgs = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: orgs
+ };
+ };
+ }
+ });
+ // props.meta.setMeta(meta);
+ }
+ } else if (key == FIELD.pk_freecust) {
+ // 散户
+ let pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ pk_supplier = pk_supplier == '' ? null : pk_supplier;
+ flag = pk_supplier == null ? false : flag;
+ if (null != pk_supplier) {
+ constance.key = key;
+ constance.params = {
+ pk_supplier: pk_supplier
+ };
+ flag = await remoteRequest(URL.headbeforeedit, constance);
+ if (flag) {
+ // 过滤
+ meta[PAGECODE.cardhead].items.map((item) => {
+ if (item.attrcode == key) {
+ item.queryCondition = () => {
+ let orgs = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let pk_dept = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_dept).value;
+ pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier)
+ .value;
+ return {
+ // pk_org: orgs,
+ pk_supplier: pk_supplier,
+ customSupplier: pk_supplier
+ // GridRefActionExt: 'nccloud.web.pu.order.ref.FreecustRefFilter'
+ };
+ };
+ }
+ });
+ props.meta.setMeta(meta);
+ }
+ }
+ } else if (key == FIELD.pk_bankdoc) {
+ //银行账户
+ flag = true;
+ } else if (key == FIELD.pk_deliveradd) {
+ //供应商发货地址
+ flag = true;
+ let pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ if (pk_supplier == null) {
+ flag = false;
+ }
+ } else if (key == FIELD.corigcurrencyid) {
+ flag = true;
+ //币种 原币 编辑前
+ let table = _this.props.cardTable.getAllData(PAGECODE.cardbody);
+ //取到表体所有行 判断每行合同是否为空,只要有不为空的 就不可编辑 flag =fale;
+ table.rows.map((o) => {
+ let ccontractid = o.values.ccontractid.value;
+ if (ccontractid != null && ccontractid != '') {
+ flag = false;
+ }
+ });
+ if (this.props.getUrlParam('transfer') == 'Z2') {
+ //拉合同时不可编辑
+ flag = false;
+ }
+ } else if (key == FIELD.pk_payterm) {
+ //
+ flag = true;
+ // 付款协议编辑前,主组织过滤
+ let bisreplenish = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.bisreplenish).value;
+ if (bisreplenish == true) {
+ flag = false;
+ }
+ } else if (key == 'vmemo') {
+ flag = true;
+ } else if (key == 'bisreplenish') {
+ //补货 一直不可编辑
+ flag = false;
+ } else if (key == 'breturn') {
+ // 退货
+ // 补货不可编辑
+ flag = true;
+ flag = transfer == 'MULTI' ? false : flag;
+ } else if (key == 'brefwhenreturn') {
+ // 退货 / 库基于原订单补货
+ // 补货不可编辑
+ flag = true;
+ flag = transfer == 'MULTI' ? false : flag;
+ } else if (tailinfo.includes(key)) {
+ //表尾信息
+ flag = false;
+ } else if (needBodys.includes(key)) {
+ // NCC-136131 编辑整单税率时,需要表体,这里判断一下
+ let rows = this.props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ flag = false;
+ if (rows.length <= 0) {
+ flag = false;
+ } else {
+ for (let i = 0; i < rows.length; i++) {
+ if (rows[i].values[FIELD.pk_material].value) {
+ flag = true;
+ break;
+ }
+ }
+ }
+ if (!flag) {
+ showErrorInfo(null, '表体为空!');
+ }
+ } else if (key == 'pk_project') {
+ //判断表体第一行wbs是否有值
+ let wbs = props.cardTable.getValByKeyAndIndex(PAGECODE.cardbody, 0, 'wbs');
+ let wbs2 = props.cardTable.getValByKeyAndIndex(PAGECODE.cardbody, 0, 'wbs');
+ if (wbs && wbs.value && wbs.value != null) {
+ return false;
+ }
+ }
+
+ let record = null;
+ let crossRuleParams = {
+ props,
+ key, //当前字段
+ appcode: null, //小应用编码,如果是本应用,可为空
+ pagecode: PAGECODE.cardcode, //页面编码
+ headarea: PAGECODE.cardhead, //表头区域编码
+ bodyarea: PAGECODE.cardbody, //表体区域编码
+ isHead: true, //是否为表头区字段
+ record, //当前表体行数据,如果是表头触发,可以为空
+ pk_org_field: FIELD.pk_org, //组织字段,注意为oid
+ billtype: '21', //单据类型
+ transtypeid_field: FIELD.ctrantypeid //交易类型id字段
+ };
+ crossRuleUtils.beforeEdit.call(this, crossRuleParams);
+ return flag;
+}
+
+/*SXDj+UzVnkytqCOCr56eS7Z6umlwbWXvyE7Br59yj6k=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/index.js b/src/pu/pu/poorder/card/beforeEvents/index.js
new file mode 100644
index 0000000..7a4601c
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import beforeEvent from "./beforeEvent";
+export { beforeEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/paymentBeforEvents.js b/src/pu/pu/poorder/card/beforeEvents/paymentBeforEvents.js
new file mode 100644
index 0000000..1e8f859
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/paymentBeforEvents.js
@@ -0,0 +1,61 @@
+/*uaJuV8wdLvUuTxYPPHqQPtKgJyK8tWzdS+jeTOv9/HA=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-08-10 22:13:48
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-22 16:53:06
+ */
+import { toast } from 'nc-lightapp-front';
+import remoteRequest from './remoteRequest';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default async function(props, moduleId, key, value, index, record) {
+ let _this = this;
+ if (key == 'effectmonth') {
+ // 付款协议页签生效月
+ let flag = true;
+ let checkdata = record.values.checkdata.value;
+ if (checkdata == null) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000021') /* 国际化处理: 请先填写固定结账日!*/
+ });
+ flag = false;
+ }
+ return flag;
+ } else if (key == 'effectaddmonth') {
+ let flag = true;
+ // 付款协议页签附加月
+ let checkdata = record.values.checkdata.value;
+ if (checkdata == null) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000021') /* 国际化处理: 请先填写固定结账日!*/
+ });
+ flag = false;
+ }
+ return flag;
+ } else if (
+ key == 'accrate' ||
+ key == 'prepayment' ||
+ key == 'effectdateadddate' ||
+ key == 'pk_payperiod' ||
+ key == 'paymentday' ||
+ key == 'accountday' ||
+ key == 'checkdata' ||
+ key == 'effectmonth' ||
+ key == 'effectaddmonth' ||
+ key == 'pk_balatype' ||
+ key == 'isdeposit' ||
+ key == 'pk_rate'
+ ) {
+ //付款比例、预付款、起效日期延迟天数、起效日期、账期天数、出账日、固定结账日、生效月、附加月、结算方式、质保金、现金折扣
+ return true;
+ } else {
+ return false;
+ }
+ return true;
+}
+
+/*uaJuV8wdLvUuTxYPPHqQPtKgJyK8tWzdS+jeTOv9/HA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/remoteRequest.js b/src/pu/pu/poorder/card/beforeEvents/remoteRequest.js
new file mode 100644
index 0000000..98b181d
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/remoteRequest.js
@@ -0,0 +1,44 @@
+/*RUKQ7yF3RNKqie1Y0AQyAf5LY52ls6CfOOMTtDl4w4U=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 编辑前ajax远程读取编辑性
+ * @Date: 2018-08-04 11:02:42
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-08-04 11:21:22
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+export default function remoteRequest(url, constance) {
+ return new Promise(function(resolve, reject) {
+ let data = {
+ key: constance.key,
+ params: constance.params
+ };
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let editFlag = res.data.isedit;
+ if (editFlag) {
+ resolve(editFlag);
+ } else if (res.data.message) {
+ toast({
+ color: 'warning',
+ content: res.data.message
+ });
+ }
+ resolve(false);
+ }
+ },
+ error: (error) => {
+ toast({
+ color: 'warning',
+ content: error.message
+ });
+ resolve(false);
+ }
+ });
+ });
+}
+
+/*RUKQ7yF3RNKqie1Y0AQyAf5LY52ls6CfOOMTtDl4w4U=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/vbillcodeBeforeEvent.js b/src/pu/pu/poorder/card/beforeEvents/vbillcodeBeforeEvent.js
new file mode 100644
index 0000000..43fd3c1
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/vbillcodeBeforeEvent.js
@@ -0,0 +1,56 @@
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 单据号编辑前事件,这类方法必须有返回值,返回true为可编辑,false为不可编辑
+ * @Date: 2018-07-25 10:03:14
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-08-02 19:01:35
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+import { duration } from 'moment';
+
+export default function(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let { key, formareaid, pk_org_key, billtype } = constance;
+ let pk_org = props.form.getFormItemsValue(formareaid, pk_org_key);
+ if (!pk_org || !pk_org.value) {
+ resolve(false);
+ } else {
+ let data = {
+ key: key,
+ params: {
+ pk_org: pk_org.value,
+ billtype: billtype
+ }
+ };
+ ajax({
+ url: URL.headbeforeedit,
+ 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);
+ }
+ });
+ }
+ });
+}
+
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/beforeEvents/vtrantypecode.js b/src/pu/pu/poorder/card/beforeEvents/vtrantypecode.js
new file mode 100644
index 0000000..440a1de
--- /dev/null
+++ b/src/pu/pu/poorder/card/beforeEvents/vtrantypecode.js
@@ -0,0 +1,32 @@
+/*dGeiyeUrT9H7BR5L3EAxPE6V/FeG4iU9JRl3NcKlFjA=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 订单类型编辑前
+ * @Date: 2018-08-02 19:01:57
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-14 20:03:38
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, FIELD, PAGECODE } from '../../constance';
+
+export default async function vtrantypecode() {
+ let flag = true;
+ // let table = this.props.table.getAllTableData(PAGECODE.cardbody);
+ let table = this.props.cardTable.getAllData(PAGECODE.cardbody);
+ if (!table || table.rows.length == 0) {
+ return true;
+ }
+ let breceiveplan = null;
+ table.rows.map((o) => {
+ if (o.values.breceiveplan.value == true) {
+ breceiveplan = true;
+ }
+ });
+ if (breceiveplan) {
+ // 存在到货计划
+ flag = false;
+ }
+ return flag;
+}
+
+/*dGeiyeUrT9H7BR5L3EAxPE6V/FeG4iU9JRl3NcKlFjA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/addBtnClick.js b/src/pu/pu/poorder/card/btnClicks/addBtnClick.js
new file mode 100644
index 0000000..b5e3f64
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/addBtnClick.js
@@ -0,0 +1,82 @@
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 采购订单新增
+ * @Date: 2019-05-08 14:09:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-09 09:33:32
+ */
+import { PAGECODE, STATUS, FIELD, OrderCache, BUTTON } from '../../constance';
+import { afterEvents } from '../afterEvents';
+import { changeUrlParam, getDefData, setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import buttonController from '../viewController/buttonController';
+
+export default function addBtnClick(props, tempdata) {
+ let empty = {
+ value: null,
+ display: null,
+ scale: '-1'
+ };
+ this.setState({ status: STATUS.edit });
+ changeUrlParam(this.props, { id: null, status: STATUS.add, tempstatus: STATUS.add });
+ let pk_org_v = null;
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, { [FIELD.pk_order]: empty });
+ this.props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.forderstatus]: {
+ value: '0',
+ display: getLangByResId(this, '4004POORDER-000020')
+ } /* 国际化处理: 自由*/
+ });
+ if (!tempdata) {
+ this.props.initMetaByPkorg(FIELD.pk_org_v);
+ }
+ this.props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ this.props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] });
+ this.props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ this.props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ pk_org_v = getDefData(OrderCache.OrderCardCache, FIELD.pk_org_v);
+ let org_v_Name = getDefData(OrderCache.OrderCardCache, 'pk_org_v_name');
+ // 暂存
+ if (tempdata) {
+ setDefData(OrderCache.OrderCardCache, 'tempsave', true);
+ let billcodeStr = tempdata.head[PAGECODE.cardhead].rows[0].values.vbillcode.value;
+ this.props.form.setAllFormValue({ [PAGECODE.cardhead]: tempdata.head[PAGECODE.cardhead] });
+ if (tempdata.bodys) {
+ this.props.cardTable.setTableData(PAGECODE.cardbody, tempdata.bodys[PAGECODE.cardbody], null, true, true);
+ this.props.cardTable.setTableData(
+ PAGECODE.head_payment,
+ tempdata.bodys[PAGECODE.head_payment],
+ null,
+ true,
+ true
+ );
+ }
+
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ billCode: billcodeStr //修改单据号---非必传
+ });
+ let pkorgValue = tempdata.head[PAGECODE.cardhead].rows[0].values.pk_org_v.value;
+ if (pkorgValue) {
+ pk_org_v = pkorgValue;
+ this.props.resMetaAfterPkorgEdit();
+ }
+ } else if (pk_org_v) {
+ let changeRow = { value: pk_org_v, display: org_v_Name };
+ // let changeRow = { refpk: pk_org_v, refname: org_v_Name };
+ let obj_pk_org_v = { value: pk_org_v, display: org_v_Name, scale: '-1', refpk: pk_org_v, refname: org_v_Name };
+ // let obj_pk_org_v = { value: pk_org_v, display: org_v_Name, scale: '-1' };
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, { [FIELD.pk_org_v]: obj_pk_org_v });
+ afterEvents.call(this, this.props, PAGECODE.cardhead, FIELD.pk_org_v, obj_pk_org_v, changeRow);
+ }
+ //物料
+ setTimeout(() => {
+ buttonController.togglePageShow.call(this, this.props, STATUS.edit, pk_org_v);
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { pk_org_v: false });
+ }, 0);
+ //add by zhaochyu暂存功能
+ this.props.button.setDisabled({ [BUTTON.TemporaryStorage]: false });
+}
+
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/addFeeDetailBtnClick.js b/src/pu/pu/poorder/card/btnClicks/addFeeDetailBtnClick.js
new file mode 100644
index 0000000..a96ce8c
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/addFeeDetailBtnClick.js
@@ -0,0 +1,60 @@
+/*TI2PmvNHaMOmW3sHKlLsfbX9NZBLvNPLwcD+/VE1a+Y=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 费用明细增行参照
+ * @Date: 2023-03-14 20:29:07
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-14 20:29:07
+ */
+import { PAGECODE, FIELD, URL } from '../../constance';
+import { toast } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import { ajax } from 'nc-lightapp-front';
+import { creatGrandsonDataForSave } from '../../../pub/utils/grandsonUtils';
+export default function addFeeDetailBtnClick(props) {
+ let data = props.table.getCheckedRows(PAGECODE.card_bodyModal);
+ if (!data || data.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000162') /*请选择物料行*/
+ });
+ return;
+ }
+ let bodydatas = new Array();
+ data.forEach((item, index) => {
+ bodydatas.push(item.data);
+ });
+ let bodyids = {
+ card_material: FIELD.pk_order,
+ card_payment: FIELD.pk_payterm,
+ card_fee: FIELD.pk_order_f
+ };
+ let datas = creatGrandsonDataForSave(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ PAGECODE.card_fee_detail,
+ true,
+ FIELD.pk_order_bf
+ );
+ datas.bodys[PAGECODE.cardbody].rows = bodydatas;
+ ajax({
+ url: URL.insertfeedetail,
+ data: datas,
+ success: (res) => {
+ if (res && res.data && res.data.grandSons.card_fee_detail) {
+ let rowCount = props.cardTable.getNumberOfRows(PAGECODE.card_fee_detail);
+ let card = res.data.grandSons.card_fee_detail;
+ for (let i = 0; i < card.rows.length; i++) {
+ props.cardTable.addRow(PAGECODE.card_fee_detail, rowCount + i, card.rows[i].values, true);
+ }
+ RownoUtils.setRowNo(props, PAGECODE.card_fee_detail, FIELD.crowno);
+ this.setState({ showFeedetail: false });
+ }
+ }
+ });
+}
+
+/*TI2PmvNHaMOmW3sHKlLsfbX9NZBLvNPLwcD+/VE1a+Y=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/backButton.js b/src/pu/pu/poorder/card/btnClicks/backButton.js
new file mode 100644
index 0000000..130509f
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/backButton.js
@@ -0,0 +1,89 @@
+/*XJvye9UdUJY3/1sEg5mBx/lkH4UAjlAw960GDkz62Tk=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 返回
+ * @Date: 2018-05-03 20:43:29
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 21:06:06
+ */
+import {
+ URL,
+ PAGECODE,
+ TRANSFER,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ OrderCache,
+ TRANSFER49
+} from '../../constance';
+import { showBackWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { changeUrlParam, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function backButton(error) {
+ let transfer = this.props.getUrlParam('transfer');
+ //推单标识
+ let channelType = this.props.getUrlParam(TRANSFER.channelType);
+ if (transfer || channelType) {
+ //页面回退 处理拉单
+ if (error && error.message) {
+ //拉单报错
+ goSourceBack.call(this, transfer);
+ }
+ let allprocess = this.props.transferTable.getTransformFormStatus(PAGECODE.leftarea);
+ if (allprocess === false) {
+ showBackWarningDialog({
+ beSureBtnClick: () => {
+ // 移除浏览器监听提示
+ window.removeEventListener('beforeunload', this.onMove);
+ //如果是推单过来的直接返回到
+ if (channelType) {
+ // add by CongKe 推单取消需求变更
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ } else {
+ goSourceBack.call(this, transfer);
+ }
+ }
+ });
+ } else {
+ if (channelType) {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ } else {
+ goSourceBack.call(this, transfer);
+ }
+ }
+ } else {
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ let urlJson = {};
+ urlJson = scene != null ? { scene: scene, pagecode: PAGECODE.listcode } : urlJson;
+ this.props.pushTo(URL.gotoList, urlJson);
+ }
+}
+
+function goSourceBack(transfer) {
+ let map = new Map();
+ map.set('20', TRANSFER20.GOTO20);
+ map.set('Z2', TRANSFERZ2.GOTOZ2);
+ map.set('30TO21', TRANSFER30TO21.GOTO30SALE);
+ map.set('30TO21COOP', TRANSFER30TO21COOP.GOTO30COOP);
+ map.set('MULTI', TRANSFERMULTI.GOTOMULTI);
+ map.set('49', TRANSFER49.GOTO49);
+ let _url = map.get(transfer);
+ let map2 = new Map();
+ map2.set('20', TRANSFER20.PAGEID);
+ map2.set('Z2', TRANSFERZ2.PAGEID);
+ map2.set('30TO21', TRANSFER30TO21.PAGEID);
+ map2.set('30TO21COOP', TRANSFER30TO21COOP.PAGEID);
+ map2.set('MULTI', TRANSFERMULTI.PAGEID);
+ map2.set('49', TRANSFER49.PAGEID);
+ let pagecdoe = map2.get(transfer);
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ let srcappcode = getDefData(OrderCache.OrderCardCache, 'srcappcode');
+ let urlJson = {};
+ urlJson = scene != null ? { scene: scene, appcode: srcappcode, pagecode: pagecdoe } : urlJson;
+ this.props.pushTo(_url, urlJson);
+}
+
+/*XJvye9UdUJY3/1sEg5mBx/lkH4UAjlAw960GDkz62Tk=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/bizInfoBtnClick.js b/src/pu/pu/poorder/card/btnClicks/bizInfoBtnClick.js
new file mode 100644
index 0000000..b6c2394
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/bizInfoBtnClick.js
@@ -0,0 +1,26 @@
+/*np1mDAAJpkz4U/hTZH1Yje1NBk8SxL8kic41sSbenjA=*/
+/*
+ * @Author: gaoxwu
+ * @PageInfo: 内部交易信息
+ * @Date: 2021-06-16 18:39:58
+ * @Last Modified by: gaoxwu
+ * @Last Modified time: 2021-06-18 11:33:35
+ */
+import { URL, PAGECODE } from '../../constance/index';
+import { ajax } from 'nc-lightapp-front';
+
+export default function(props) {
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_order').value;
+
+ ajax({
+ url: URL.transinfo,
+ data: pk_order,
+ success: (res) => {
+ if (res.success) {
+ this.setState({ showBusinessModal: true, pk_order: pk_order });
+ }
+ }
+ });
+}
+
+/*np1mDAAJpkz4U/hTZH1Yje1NBk8SxL8kic41sSbenjA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/cancelButton.js b/src/pu/pu/poorder/card/btnClicks/cancelButton.js
new file mode 100644
index 0000000..956cf47
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/cancelButton.js
@@ -0,0 +1,22 @@
+/*cDw43rokbrnVLIt4MHOMtaxhprJoy7Cg3S4DrQcxPzo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 取消功能
+ * @Date: 2018-04-20 10:17:37
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-03-17 11:24:14
+ */
+import { showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+
+export default function cancelButton(props, currentindex) {
+ showWarningDialog(getLangByResId(this, '4004POORDER-000019'), getLangByResId(this, '4004POORDER-000031'), {
+ /* 国际化处理: 确认要取消吗?*/
+ beSureBtnClick: () => {
+ buttonController.doCancel.call(this, this.props, null, currentindex);
+ },
+ });
+}
+
+/*cDw43rokbrnVLIt4MHOMtaxhprJoy7Cg3S4DrQcxPzo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/checkDataPermission.js b/src/pu/pu/poorder/card/btnClicks/checkDataPermission.js
new file mode 100644
index 0000000..3eea40d
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/checkDataPermission.js
@@ -0,0 +1,47 @@
+/*mLZewXa1tvB7iUHIEHrbAprRHOHCQhc9J7GaIeCcpHw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 数据权限检查
+ * @Date: 2018-08-01 19:51:18
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-08-02 09:52:36
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD } from '../../constance';
+
+/**
+*
+* @param {*} record
+* @param {*} oprcode 操作code
+* @param {*} callBack 回调
+*/
+export default function checkDataPermission(record, oprcode, callBack) {
+ let id = '';
+ if (record) {
+ id = record.pk_order.value;
+ } else {
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ id = pk_order && pk_order.value;
+ }
+ if (id == null) {
+ callBack && callBack();
+ }
+ let pks = new Array();
+ pks.push(id);
+ let data = {
+ pks: pks,
+ actionCode: oprcode
+ };
+ ajax({
+ url: URL.editdatapermission,
+ data: data,
+ method: 'post',
+ success: (res) => {
+ if (res && res.success) {
+ callBack && callBack();
+ }
+ }
+ });
+}
+
+/*mLZewXa1tvB7iUHIEHrbAprRHOHCQhc9J7GaIeCcpHw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/combineShow.js b/src/pu/pu/poorder/card/btnClicks/combineShow.js
new file mode 100644
index 0000000..a7d9c0b
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/combineShow.js
@@ -0,0 +1,141 @@
+/*mdi4JG9W01PubJgQBnGUGspDfVRQozZLEuTlGeItKD0=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 合并显示
+ * @Date: 2018-08-20 13:26:46
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-19 13:50:09
+ */
+import { URL, FIELD, PAGECODE, OrderCache } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+
+export default function combineShow(props) {
+ let _this = this;
+ this.combineData = getJsonData.call(this, props);
+ this.setState({
+ showConditionModal: !this.state.showConditionModal
+ });
+}
+
+function getJsonData(props) {
+ let letfItemKey = [];
+ props.meta.getMeta()[PAGECODE.cardbody].items.map((item) => {
+ if (item.visible) {
+ letfItemKey.push(item.attrcode);
+ }
+ });
+ letfItemKey == null ? null : letfItemKey;
+ let rightItemKey = [ FIELD.pk_material ];
+ let groupColumn = {
+ all: letfItemKey,
+ right: rightItemKey
+ };
+
+ let sumColumn = {
+ all: [
+ FIELD.ncalcostmny,
+ FIELD.ncaltaxmny,
+ FIELD.nnosubtax,
+ FIELD.nmny,
+ FIELD.ntaxmny,
+ FIELD.ngroupmny,
+ FIELD.ngrouptaxmny,
+ FIELD.nglobalmny,
+ FIELD.nglobaltaxmny,
+ FIELD.norigmny,
+ FIELD.ntax,
+ FIELD.norigtaxmny,
+ FIELD.nnum,
+ FIELD.nastnum
+ ],
+ right: [ FIELD.norigmny, FIELD.ntax, FIELD.norigtaxmny, FIELD.nnum, FIELD.nastnum ]
+ };
+
+ let averageColumn = {
+ all: [
+ FIELD.norigmny, // 金额
+ FIELD.ntax, // 税额
+ FIELD.norigtaxmny, // 价税合计
+ FIELD.nnum, // 主数量
+ FIELD.nastnum, // 数量
+ FIELD.ncalcostmny, // 计成本金额
+ FIELD.ncaltaxmny, // 计税金额
+ FIELD.nnosubtax, // 不可抵扣税额
+ FIELD.nmny, // 本币无税金额
+ FIELD.ntaxmny, // 本币价税合计
+ FIELD.ngroupmny, // 集团本币无税金额
+ FIELD.ngrouptaxmny, // 集团本币价税合计
+ FIELD.nglobalmny, // 全局本币无税金额
+ FIELD.nglobaltaxmny
+ ],
+ right: []
+ };
+
+ let weightAverageColumn = {
+ all: [
+ FIELD.norigmny, // 金额
+ FIELD.ntax, // 税额
+ FIELD.norigtaxmny, // 价税合计
+ FIELD.nnum, // 主数量
+ FIELD.nastnum, // 数量
+ FIELD.ncalcostmny, // 计成本金额
+ FIELD.ncaltaxmny, // 计税金额
+ FIELD.nnosubtax, // 不可抵扣税额
+ FIELD.nmny, // 本币无税金额
+ FIELD.ntaxmny, // 本币价税合计
+ FIELD.ngroupmny, // 集团本币无税金额
+ FIELD.ngrouptaxmny, // 集团本币价税合计
+ FIELD.nglobalmny, // 全局本币无税金额
+ FIELD.nglobaltaxmny,
+ FIELD.nqtorigprice,
+ FIELD.nqtorignetprice
+ ],
+ right: [ FIELD.nqtorigprice, FIELD.nqtorignetprice ]
+ };
+ let funcode = null;
+ let nodekey = '400400801';
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ if (scene == 'approvesce') {
+ // 审批的合并显示打印模板
+ funcode = '400400808';
+ nodekey = '4004008008';
+ } else if (scene == 'freeze' || scene == 'ADD') {
+ funcode = '400400800';
+ }
+ let newMeta = {};
+ let attrNames = Object.keys(this.meta);
+ attrNames.forEach((attrName) => {
+ newMeta[attrName] = this.meta[attrName];
+ if (attrName == 'card_fee' || attrName == 'card_fee_detail') {
+ newMeta[attrName].areaVisible = false;
+ }
+ });
+ return {
+ title: getLangByResId(this, '4004POORDER-000033') /* 国际化处理: 合并显示*/,
+ materialClassification: true,
+ billPk: props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value, // 主键值
+ pk_org: [ props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value ], // 主组织
+ materialPKColumn: FIELD.pk_material,
+ numKey: FIELD.nnum,
+ billTitle:
+ getLangByResId(this, '4004POORDER-000034') +
+ props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vbillcode).value /* 国际化处理: 采购订单合并打印:*/,
+ headCode: PAGECODE.cardhead, //页面头区域
+ bodyCode: PAGECODE.cardbody, //页面子区域
+ columnArea: PAGECODE.cardbody, //参数字段所在区域(根据字段翻译名称使用,一般为子表区域)
+ groupColumn: groupColumn,
+ sumColumn: sumColumn,
+ averageColumn: averageColumn,
+ weightAverageColumn: weightAverageColumn,
+ meta: newMeta, // 当前卡片页面meta
+ funcode: funcode, //小应用编码
+ nodekey: nodekey, //模板节点标识
+ combineUrl: URL.combine, //合并action
+ printUrl: URL.combintPrint, //打印action
+ appcode: funcode,
+ billtype: PAGECODE.billType
+ };
+}
+
+/*mdi4JG9W01PubJgQBnGUGspDfVRQozZLEuTlGeItKD0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/commit.js b/src/pu/pu/poorder/card/btnClicks/commit.js
new file mode 100644
index 0000000..417ee3d
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/commit.js
@@ -0,0 +1,148 @@
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片提交
+ * @Date: 2018-06-20 18:23:03
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-01 14:59:13
+ */
+import { URL, FIELD, PAGECODE, TRANSFER, OrderCache, STATUS } from '../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+import { updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo, showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { changeUrlParam, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { buttonController } from '../viewController/index';
+
+export default function commit(props, skipCodes, assign, Tran_S_C) {
+ let _this = this;
+ let forderstatus = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.forderstatus);
+ if (forderstatus.value != FIELD.free && forderstatus.value != FIELD.unapproved) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000035') /* 国际化处理: 请选择状态为自由或者审批不通过的数据!*/
+ });
+ return;
+ }
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ pk_order = pk_order == null || pk_order == '' || pk_order == 'undefined' ? props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ let ts = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.ts).value;
+ let allrows = _this.props.cardTable.getAllRows(PAGECODE.cardbody);
+ let bodys = [];
+ allrows.forEach((row) => {
+ bodys.push({
+ pks: row.values[FIELD.pk_order_b].value,
+ ts: row.values[FIELD.ts].value
+ });
+ });
+ let rows = [];
+ let info = {
+ pks: pk_order,
+ ts: ts,
+ bodys: bodys
+ };
+ rows.push(info);
+ skipCodes = skipCodes ? skipCodes : new Array();
+ let templetid = getDefData(OrderCache.OrderCardCache, 'templetid');
+ // 拼装json
+ let data = {
+ skipCodes: skipCodes,
+ closedto: rows,
+ pagecode: PAGECODE.cardcode,
+ templetid: templetid
+ };
+ //指派
+ if (assign) {
+ data['assign'] = JSON.stringify(assign);
+ }
+ // 发送请求
+ ajax({
+ url: URL.commit,
+ data: data,
+ success: (res) => {
+ // 卡片界面,在浏览态时勾选行,点修改后去掉勾选,付款协议和物料
+ // props.cardTable.selectAllRows(PAGECODE.head_payment, false);
+ // props.cardTable.selectAllRows(PAGECODE.cardbody, false);
+ // props.cardTable.selectAllRows(PAGECODE.card_fee, false);
+ // props.cardTable.selectAllRows(PAGECODE.card_fee_detail, false);
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ _this.setState({
+ compositedata: res.data,
+ compositedisplay: true
+ });
+ return;
+ }
+ if (res.data && res.data.isResume && res.data.isResume == true) {
+ showResumeModal.bind(this)(
+ props,
+ 'ResumeMessageDlg',
+ skipCodes,
+ res.data,
+ commit.bind(this, props, skipCodes, assign, Tran_S_C),
+ props
+ );
+ return;
+ } else if (res.data) {
+ let map = new Map();
+ map.set('pk_payment', PAGECODE.head_payment);
+ map.set('pk_order_b', PAGECODE.cardbody);
+ let config = {
+ headAreaId: PAGECODE.cardhead,
+ bodyIdAndPkMap: map
+ };
+ updateExtBillDataForCompareByPk(_this.props, res.data, config);
+ buttonController.cachedata.call(_this);
+ let datasource = OrderCache.OrderCacheKey;
+ let transfer = _this.props.getUrlParam(TRANSFER.transfer);
+ let channelType = _this.props.getUrlParam(TRANSFER.channelType);
+ if (transfer || channelType) {
+ //转单
+ datasource = OrderCache.OrderTransferCache;
+ let datass = {};
+ datass.head = res.data.head;
+ datass.body = res.data.bodys;
+ datass.pageid = res.data.pageid;
+ _this.props.transferTable.setTransformFormStatus(PAGECODE.leftarea, {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = 'browse';
+ // _this.props.transferTable.setTransferListValueByIndex(
+ // PAGECODE.leftarea,
+ // datass,
+ // currentIndex
+ // );
+ }
+ });
+ }
+ updateCacheData(_this.props, FIELD.pk_order, pk_order, res.data, PAGECODE.cardhead, datasource);
+ _this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+ let resultMessage = getLangByResId(this, '4004POORDER-000037'); /* 国际化处理: 提交成功!*/
+ // if (Tran_S_C != null) {
+ // //2018-11-1;需求(刘兰娇、王丽平)再次变更保存提交给两个提示
+ // resultMessage = getLangByResId(this, '4004POORDER-000036'); /* 国际化处理: 保存提交成功!*/
+ // }
+ showSuccessInfo(resultMessage);
+ }
+ setTimeout(() => {
+ buttonController.togglePageShow.call(_this, _this.props, null);
+ }, 0);
+ }
+ // error: (error) => {
+ // if (Tran_S_C) {
+ // showErrorInfo(null, getLangByResId(this, '4004POORDER-000038')); /* 国际化处理: 保存成功提交失败!*/
+ // } else {
+ // showErrorInfo(getLangByResId(this, '4004POORDER-000039'), error.message); /* 国际化处理: 注意*/
+ // }
+ // }
+ });
+}
+
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/commonCheckData.js b/src/pu/pu/poorder/card/btnClicks/commonCheckData.js
new file mode 100644
index 0000000..8210951
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/commonCheckData.js
@@ -0,0 +1,25 @@
+/*1builUODACw21M0y83UR65htDRwREgV2Uow32UG5nAA=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 判断数据是否可用
+ * @Date: 2018-09-11 14:46:54
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-12-17 15:37:08
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+
+export default function commonCheckData(url, checkData, callBack) {
+ ajax({
+ url: url,
+ data: checkData,
+ method: 'post',
+ success: (res) => {
+ if (res && res.success) {
+ callBack && callBack();
+ }
+ }
+ });
+}
+
+/*1builUODACw21M0y83UR65htDRwREgV2Uow32UG5nAA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/coopPriceQuery.js b/src/pu/pu/poorder/card/btnClicks/coopPriceQuery.js
new file mode 100644
index 0000000..296bf02
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/coopPriceQuery.js
@@ -0,0 +1,104 @@
+/*fIVqxGCasj4Zv6CZyUZjCAyQoW3c2GJvRbfu1ajSduw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 询协同售价
+ * @Date: 2018-04-19 10:24:43
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2022-12-01 17:27:30
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE, BUTTON, STATUS, FIELD, TRANSFER } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+import { createExtBillHeadAfterEventData } from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { processExtBillCardBodyEditResult } from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+let bodyids = [ PAGECODE.cardbody ];
+let _this;
+
+export default function coopPriceQuery(modelIndex) {
+ _this = this;
+ let rows = [];
+ let checkedRows = this.props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let newcheckedRows = [];
+ if (modelIndex != undefined) {
+ rows.push(modelIndex);
+ } else if (!checkedRows || checkedRows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000040') /* 国际化处理: 请选择需要询价的表体数据!*/
+ });
+ return;
+ }
+ if (checkedRows != null) {
+ for (let i = 0; i < checkedRows.length; i++) {
+ if (checkedRows[i].data.values.pk_material.value && checkedRows[i].data.values.pk_material.value != '') {
+ newcheckedRows.push(checkedRows[i]);
+ }
+ }
+ }
+
+ let noopenrow = new Array(); // 非侧拉勾选的行重新排序
+ if (modelIndex == undefined) {
+ for (let i = 0; i < newcheckedRows.length; i++) {
+ rows.push(newcheckedRows[i].index);
+ }
+ }
+ //过滤空行
+ this.props.cardTable.filterEmptyRows(PAGECODE.cardbody);
+ this.props.cardTable.filterEmptyRows(PAGECODE.head_payment);
+ let aggvo = createExtBillHeadAfterEventData(
+ this.props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ [ PAGECODE.cardbody ],
+ null,
+ null
+ );
+ let allRows = aggvo && aggvo.card && aggvo.card.bodys && aggvo.card.bodys[PAGECODE.cardbody].rows;
+ let newRows = [];
+ rows.forEach((i) => {
+ newRows.push(allRows[i]);
+ });
+ // 因为侧拉有询价按钮,所以不直接取勾选行数据
+ //aggvo.card.bodys[PAGECODE.cardbody].rows = newRows;
+ // 因为侧拉有询价按钮,所以不直接取勾选行数据
+ // if (modelIndex != undefined) {
+ // //编辑侧拉只取当前值
+ // aggvo.card.bodys[PAGECODE.cardbody].rows = rows;
+ // rows = [ ];
+ // } else {
+ // // 非侧拉勾选的行重新排序
+ // aggvo.card.bodys[PAGECODE.cardbody].rows = newRows;
+ // }
+ aggvo.card.bodys[PAGECODE.cardbody].rows = newRows;
+ let datas = {
+ rows: rows,
+ cardEvent: aggvo
+ };
+ getAfterData(this.props, datas);
+}
+
+/**
+ * 询价
+ * @param {*} props
+ * @param {*} url
+ * @param {*} aggvo
+ */
+function getAfterData(props, datas) {
+ ajax({
+ url: URL.cooppricequery,
+ data: datas,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ let extCard = {
+ extbillcard: res.data
+ };
+ processExtBillCardBodyEditResult(props, PAGECODE.cardbody, extCard);
+ }
+ }
+ });
+}
+
+/*fIVqxGCasj4Zv6CZyUZjCAyQoW3c2GJvRbfu1ajSduw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/copyAddBtn.js b/src/pu/pu/poorder/card/btnClicks/copyAddBtn.js
new file mode 100644
index 0000000..4addf09
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/copyAddBtn.js
@@ -0,0 +1,338 @@
+/*qPh/b/jqAMnQs2eTu40xpGRp0tTdDD6TG7v9cG6b2rI=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 复制(列表态-行、浏览态-顶)
+ * @Date: 2018-06-27 19:22:42
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-12-04 14:48:27
+ */
+import { ajax, toast, promptBox } from 'nc-lightapp-front';
+import RelateCTDLG from '../../relateCT/list';
+import { URL, STATUS, FIELD, PAGECODE, BUTTON, TRANSFER, OrderCache } from '../../constance';
+import { changeUrlParam, deleteCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { buttonController } from '../viewController/index';
+import {
+ createExtBillHeadAfterEventData,
+ processExtBillCardHeadEditResult
+} from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { creatGrandsonDataForAfterEditHead } from '../../../pub/utils/grandsonUtils';
+import referFeeCTGrid from '../../../pub/referFeeCTGrid';
+import feeAfterEvent from '../afterEvents/feeAfterEvent';
+import feeDetailAfterEvent from '../afterEvents/feeDetailAfterEvent';
+
+let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment, PAGECODE.card_fee ];
+
+export default function copyAddBtn() {
+ changeUrlParam(this.props, { status: STATUS.edit, copyType: 'Y', tempstatus: STATUS.add });
+ this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.edit);
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { [FIELD.pk_org_v]: true });
+ let pk_org_v = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org_v);
+ // let aggvo = createExtBillHeadAfterEventData(
+ // this.props,
+ // PAGECODE.cardcode,
+ // PAGECODE.cardhead,
+ // bodyids,
+ // 'card_head',
+ // 'pk_org_v',
+ // pk_org_v
+ // );
+ let aggvo = creatGrandsonDataForAfterEditHead(
+ this.props,
+ PAGECODE.cardhead,
+ 'pk_org_v',
+ pk_org_v,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ PAGECODE.card_fee_detail,
+ bodyids,
+ PAGECODE.cardbody
+ );
+ //补充主键数据避免加载时机问题导致数据丢失
+ let pk_order = this.props.getUrlParam(FIELD.id);
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ if (pk_order) {
+ setDefData(OrderCache.OrderCardCache, 'copypk', pk_order);
+ changeUrlParam(this.props, { id: null });
+ aggvo.card.head.card_head.rows[0].values.pk_order = { value: pk_order };
+ aggvo.card.bodys[PAGECODE.cardbody].rows = new Array();
+ aggvo.card.bodys[PAGECODE.head_payment].rows = new Array();
+ if (aggvo.card.bodys[PAGECODE.card_fee]) {
+ aggvo.card.bodys[PAGECODE.card_fee].rows = new Array();
+ }
+ if (aggvo.card.grandSons[PAGECODE.card_fee_detail]) {
+ aggvo.card.grandSons[PAGECODE.card_fee_detail].rows = new Array();
+ }
+ this.props.button.hideButtonsByAreas([ PAGECODE.cardhead ]);
+ getAfterData(this, aggvo);
+ }
+}
+
+function getAfterData(_this, aggvo) {
+ ajax({
+ url: URL.interceptor,
+ data: aggvo,
+ method: 'POST',
+ success: (res) => {
+ let transtypeflag = true;
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ }
+ );
+ }
+ if (res.data.extbillcard) {
+ let data = res.data.extbillcard;
+ if (data.head) {
+ _this.props.form.setAllFormValue({ [PAGECODE.cardhead]: data.head[PAGECODE.cardhead] });
+ }
+ if (data.bodys) {
+ let cards = data.bodys;
+ if (cards.card_payment) {
+ _this.props.cardTable.setTableData(PAGECODE.head_payment, cards[PAGECODE.head_payment]);
+ }
+ if (cards.card_material) {
+ //应该加到setTableData的回调函数中
+ _this.props.cardTable.setTableData(PAGECODE.cardbody, cards[PAGECODE.cardbody]);
+ }
+ if (cards[PAGECODE.card_fee]) {
+ //应该加到setTableData的回调函数中
+ _this.props.cardTable.setTableData(PAGECODE.card_fee, cards[PAGECODE.card_fee]);
+ } else {
+ _this.props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] });
+ }
+ if (data.grandSons[PAGECODE.card_fee_detail]) {
+ //应该加到setTableData的回调函数中
+ _this.props.cardTable.setTableData(
+ PAGECODE.card_fee_detail,
+ data.grandSons[PAGECODE.card_fee_detail]
+ );
+ } else {
+ _this.props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] });
+ }
+ // 重新建立物料多选增出来的行和费用明细关系
+ let dataitem = _this.props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let datafee = _this.props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ if (dataitem && datafee) {
+ dataitem.forEach((item) => {
+ if (!item.values[FIELD.pseudocolumn]) {
+ return;
+ }
+ let pseudocolumn = item.values[FIELD.pseudocolumn].value;
+ datafee.forEach((itemfee) => {
+ if (pseudocolumn == itemfee.values[FIELD.pk_order_b].value) {
+ itemfee.values[FIELD.pk_order_b].value = item.rowid;
+ }
+ });
+ });
+ }
+ }
+ }
+ // 通过激活状态判断当前点击的是哪个页签
+ let active = _this.props.cardTable.getTabsTableActive(PAGECODE.cardbody);
+ if (PAGECODE.cardbody == active) {
+ if (res.data.userObject.relateCTVO && res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 提示*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 是否关联合同?*/
+ beSureBtnName: getLangByResId(_this, '4004POORDER-000015') /* 国际化处理: 是*/,
+ cancelBtnName: getLangByResId(_this, '4004POORDER-000016') /* 国际化处理: 否*/,
+ beSureBtnClick: relateCTOKBtnClick.bind(_this, _this.props, event, res.data.userObject, aggvo), //点击确定按钮事件
+ cancelBtnClick: transtypeAfterEvent.bind(_this, _this, event, res.data.userObject) //点击确定按钮事件
+ });
+ transtypeflag = false;
+ }
+ } else if (PAGECODE.card_fee == active) {
+ // 费用项
+ if (res.data.userObject && res.data.userObject.CTGrid) {
+ let rowlength = _this.props.cardTable.getNumberOfRows(active);
+ referFeeCTGrid.call(
+ _this,
+ _this.props,
+ PAGECODE.card_fee,
+ null,
+ rowlength,
+ feeAfterEvent,
+ res.data.userObject
+ );
+ }
+ } else if (PAGECODE.card_fee_detail == active) {
+ // 费用明细
+ if (res.data.userObject && res.data.userObject.CTGrid) {
+ let rowlength = _this.props.cardTable.getNumberOfRows(active);
+ referFeeCTGrid.call(
+ _this,
+ _this.props,
+ PAGECODE.card_fee_detail,
+ null,
+ rowlength,
+ feeDetailAfterEvent,
+ res.data.userObject
+ );
+ }
+ }
+ if (transtypeflag && _this.transtypeData && _this.transtypeData.transtype != undefined) {
+ transtypeAfterEvent.call(_this, _this);
+ } else {
+ _this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { pk_org_v: true });
+ }
+ buttonController.togglePageShow.call(_this, _this.props, BUTTON.Copy);
+ },
+ error: (error) => {
+ setDefData(OrderCache.OrderCardCache, 'copypk', null);
+ buttonController.doCancel.call(_this, _this.props, 'error');
+ buttonController.showEmptyBrowsePage.call(_this);
+ showErrorInfo(getLangByResId(_this, '4004POORDER-000039'), error.message); /* 国际化处理: 注意*/
+ }
+ });
+}
+
+function transtypeAfterEvent(_this) {
+ // 复制时调用交易类型默认值设置方法
+ transtypeUtils.setValue.call(_this, PAGECODE.cardhead, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ let moduleId = PAGECODE.cardbody;
+ let key = 'ctrantypeid';
+ let value = _this.props.form.getFormItemsValue(PAGECODE.cardhead, key);
+ let aggvo = createExtBillHeadAfterEventData(
+ _this.props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ PAGECODE.cardhead,
+ key,
+ value
+ );
+ gettransferAfterData(_this, aggvo);
+}
+
+function gettransferAfterData(_this, aggvo) {
+ ajax({
+ url: URL.cardHeadAfterEvent,
+ data: aggvo,
+ method: 'POST',
+ success: (res) => {
+ let transtypeflag = true;
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ }
+ );
+ }
+ if (res.data.userObject.relateCTVO && res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 关联合同*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 确定要关联合同吗?*/
+ beSureBtnName: getLangByResId(_this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ cancelBtnName: getLangByResId(_this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: relateCTOKBtnClick.bind(_this, _this.props, event, res.data.userObject, aggvo), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(_this, _this.props, event, res.data.userObject) //点击确定按钮事件
+ });
+ transtypeflag = false;
+ }
+ if (res.data.extbillcard) {
+ processExtBillCardHeadEditResult(_this.props, PAGECODE.cardhead, bodyids, res.data);
+ }
+ setTimeout(() => {
+ buttonController.togglePageShow.call(_this, _this.props, BUTTON.Copy);
+ _this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { pk_org_v: true });
+ }, 0);
+ }
+ });
+}
+
+/**
+ * 是否关联合同确定处理
+ * @param {*} props
+ * @param {*} userObject
+ */
+function relateCTOKBtnClick(props, event, userObject, aggvo) {
+ let ctsalevos = userObject.relateCTVO;
+ if (ctsalevos.pk_ct_pu.rows.length > 1) {
+ let getSelectRows = (data) => {
+ this.selCTViews = data;
+ };
+ this.props.modal.show('MessageDlg', {
+ zIndex: 350,
+ title: getLangByResId(this, '4004POORDER-000017'), // 弹框表头信息/* 国际化处理: 采购订单关联合同*/
+ content: , //弹框内容,可以是字符串或dom
+ leftBtnName: getLangByResId(this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: selectCTOKBtnClick.bind(this, this.props, event, userObject, aggvo), //点击确定按钮事件
+ cancelBtnClick: relateCTCancelBtnClick.bind(this, this.props, event, userObject)
+ });
+ } else if ((ctsalevos.pk_ct_pu.rows.length = 1)) {
+ let head = props.form.getAllFormValue(PAGECODE.cardhead);
+ let material = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let pay = props.cardTable.getVisibleRows(PAGECODE.head_payment);
+ let card_fee = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ let card_fee_detail = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ aggvo.card.head.card_head.rows = head.rows;
+ aggvo.card.bodys.card_material.rows = material;
+ aggvo.card.bodys.card_payment.rows = pay;
+ if (aggvo.card.bodys.card_fee) {
+ aggvo.card.bodys.card_fee.rows = card_fee;
+ }
+ if (aggvo.card.grandSons.card_fee_detail) {
+ aggvo.card.grandSons.card_fee_detail.rows = card_fee_detail;
+ }
+ aggvo['userObject'] = {
+ relateCTVO: JSON.stringify(ctsalevos),
+ relateCTROWS: [ 0 + '' ] //[ userObject.relateCTVO.pk_ct_pu.rows[0].values.crowno.value ]
+ };
+ getAfterData(this, aggvo);
+ }
+}
+
+function selectCTOKBtnClick(props, event, userObject, aggvo) {
+ let selCTViews = this.selCTViews;
+ let indexrows = new Array();
+ let rows = [];
+ this.selCTViews.forEach((row) => {
+ rows.push(row.data);
+ indexrows.push(row.index + '');
+ });
+ let table = {
+ areaType: 'table',
+ pageinfo: null,
+ rows: rows
+ };
+ let ctrows = {
+ pageid: '400400800_ct', //pk_ct_pu
+ table: table
+ };
+ let head = props.form.getAllFormValue(PAGECODE.cardhead);
+ let material = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let pay = props.cardTable.getVisibleRows(PAGECODE.head_payment);
+ let card_fee = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ let card_fee_detail = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ aggvo.card.head.card_head.rows = head.rows;
+ aggvo.card.bodys.card_material.rows = material;
+ aggvo.card.bodys.card_payment.rows = pay;
+ if (aggvo.card.bodys.card_fee) {
+ aggvo.card.bodys.card_fee.rows = card_fee;
+ }
+ if (aggvo.card.grandSons.card_fee_detail) {
+ aggvo.card.grandSons.card_fee_detail.rows = card_fee_detail;
+ }
+ aggvo.userObject = aggvo['userobject'] || {};
+ aggvo.userObject.relateCTVO = JSON.stringify(ctrows);
+ aggvo.userObject.relateCTROWS = indexrows;
+ getAfterData(this, aggvo);
+}
+
+function relateCTCancelBtnClick(props, event, userObject) {}
+
+/*qPh/b/jqAMnQs2eTu40xpGRp0tTdDD6TG7v9cG6b2rI=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/deleteBtnClick.js b/src/pu/pu/poorder/card/btnClicks/deleteBtnClick.js
new file mode 100644
index 0000000..afe7038
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/deleteBtnClick.js
@@ -0,0 +1,127 @@
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-05-02 15:53:07
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-04-11 16:28:05
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import {
+ URL,
+ PAGECODE,
+ FIELD,
+ OrderCache,
+ STATUS,
+ TRANSFER,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ TRANSFER49
+} from '../../constance';
+import { changeUrlParam, deleteCacheData, getNextId, getCurrentLastId } from '../../../../../scmpub/scmpub/pub/cache';
+import { pageInfoClick, refresh } from './index';
+import { showSuccessInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function deleteBtnClick(props) {
+ let _this = this;
+ showWarningDialog(getLangByResId(this, '4004POORDER-000041'), getLangByResId(this, '4004POORDER-000042'), {
+ /* 国际化处理: 删除,确定要删除吗?*/
+ beSureBtnClick: doDelete.bind(this, props)
+ });
+}
+
+function doDelete(props) {
+ let _this = this;
+ let ts = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.ts);
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ pk_order = pk_order == null || pk_order == '' || pk_order == 'undefined' ? props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ if (ts) {
+ ts = ts.value;
+ }
+ let allrows = _this.props.cardTable.getAllRows(PAGECODE.cardbody);
+ let bodys = [];
+ allrows.forEach((row) => {
+ bodys.push({
+ pks: row.values[FIELD.pk_order_b].value,
+ ts: row.values[FIELD.ts].value
+ });
+ });
+ let delinfos = { deleteInfo: [] };
+ delinfos.deleteInfo.push({ ts: ts, pks: pk_order, bodys: bodys });
+ ajax({
+ url: URL.delete,
+ data: delinfos,
+ success: (res) => {
+ let transfer = props.getUrlParam(TRANSFER.transfer);
+ let channelType = props.getUrlParam(TRANSFER.channelType);
+ props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+ let nextId = getNextId(props, pk_order, OrderCache.OrderCacheKey);
+ deleteCacheData(props, FIELD.pk_order, pk_order, OrderCache.OrderCacheKey);
+ if (transfer || channelType) {
+ _this.indexstatus = {};
+ if (props.transferTable.getTransformFormAmount(PAGECODE.leftarea) == 1) {
+ if (channelType) {
+ // add by CongKe 推单取消需求变更
+ _this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.cardcode });
+ // props.pushTo(_this.state.returnURL, {
+ // type: _this.state.returnType,
+ // appcode: _this.state.appcode,
+ // });
+ } else {
+ let map = new Map();
+ map.set('20', TRANSFER20.GOTO20);
+ map.set('Z2', TRANSFERZ2.GOTOZ2);
+ map.set('30TO21', TRANSFER30TO21.GOTO30SALE);
+ map.set('30TO21COOP', TRANSFER30TO21COOP.GOTO30COOP);
+ map.set('MULTI', TRANSFERMULTI.GOTOMULTI);
+ map.set('49', TRANSFER49.GOTO49);
+ let _url = map.get(transfer);
+
+ let map2 = new Map();
+ map2.set('20', TRANSFER20.PAGEID);
+ map2.set('Z2', TRANSFERZ2.PAGEID);
+ map2.set('30TO21', TRANSFER30TO21.PAGEID);
+ map2.set('30TO21COOP', TRANSFER30TO21COOP.PAGEID);
+ map2.set('MULTI', TRANSFERMULTI.PAGEID);
+ map2.set('49', TRANSFER49.PAGEID);
+ let pagecode = map2.get(transfer);
+ props.pushTo(_url, {
+ type: transfer,
+ pagecode: pagecode
+ });
+ }
+ } else {
+ props.transferTable.setTransformFormStatus(PAGECODE.leftarea, {
+ status: false,
+ onChange: (current, next) => {
+ showSuccessInfo(getLangByResId(_this, '4004POORDER-000043')); /* 国际化处理: 删除成功!*/
+ }
+ });
+ }
+ } else {
+ showSuccessInfo(getLangByResId(_this, '4004POORDER-000043')); /* 国际化处理: 删除成功!*/
+ nextId = nextId == null ? getCurrentLastId(OrderCache.OrderCacheKey) : nextId;
+ changeUrlParam(props, { status: STATUS.browse, id: nextId });
+ if (nextId == null) {
+ props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ buttonController.togglePageShow.call(this, this.props);
+ } else {
+ refresh.call(this, props, nextId, false);
+ }
+ }
+ }
+ });
+}
+
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/editButton.js b/src/pu/pu/poorder/card/btnClicks/editButton.js
new file mode 100644
index 0000000..62ebc0f
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/editButton.js
@@ -0,0 +1,52 @@
+/*6IaizxRgNRWLpR3j0kkUmKweEQ49jUrJ2AxJCcXQbzQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片编辑按钮
+ * @Date: 2018-04-19 14:39:42
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-08 10:40:28
+ */
+import { FIELD, STATUS, URL, PAGECODE, TRANSFER, OrderCache, BUTTON } from '../../constance';
+import { buttonController } from '../viewController/index';
+import { getDefData, changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache';
+
+export default function editButton() {
+ // 卡片界面,在浏览态时勾选行,点修改后去掉勾选,付款协议和物料
+ this.props.cardTable.selectAllRows(PAGECODE.head_payment, false);
+ this.props.cardTable.selectAllRows(PAGECODE.cardbody, false);
+ buttonController.materialPasteCancel.call(this, this.props);
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ if (transfer == null) {
+ transfer = this.props.getUrlParam(TRANSFER.channelType);
+ }
+ if (transfer == null) {
+ let pk_order = this.props.getUrlParam(FIELD.id);
+ if (pk_order == null || pk_order == 'undefined') {
+ pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ }
+ if (getDefData(OrderCache.OrderCardCache, 'scene') == null) {
+ //应用场景
+ changeUrlParam(this.props, {
+ status: STATUS.edit,
+ id: pk_order,
+ tempstatus: STATUS.edit
+ });
+ } else if (getDefData(OrderCache.OrderCardCache, 'scene') == 'approvesce') {
+ //应用场景
+ changeUrlParam(this.props, {
+ status: STATUS.edit,
+ id: pk_order
+ });
+ }
+ } else {
+ this.indexstatus[this.curindex] = 'edit';
+ }
+ this.setState({ status: STATUS.edit });
+ this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.edit);
+ buttonController.togglePageShow.call(this, this.props, STATUS.edit);
+ //add by zhaochyu 暂存功能
+ //this.props.button.setDisabled({ [BUTTON.TemporaryStorage]: true });
+}
+
+/*6IaizxRgNRWLpR3j0kkUmKweEQ49jUrJ2AxJCcXQbzQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/grossProfitQuery.js b/src/pu/pu/poorder/card/btnClicks/grossProfitQuery.js
new file mode 100644
index 0000000..4341735
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/grossProfitQuery.js
@@ -0,0 +1,125 @@
+/*WgoOoYEu7CWCvkqYZ+ieVZmIK9MS8OdAFaaYA7NH8w4=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 毛利预估
+ * @Date: 2019-04-15 14:28:11
+ * @Last Modified by: zhaochyu
+ * @Last Modified time: 2019-07-16 09:30:16
+ */
+import { toast } from 'nc-lightapp-front';
+import { PAGECODE, GROSSPROFITQUEYR } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function grossProfitQuery(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let headvo = {};
+ let bodyvo = [];
+ let rowparam = [];
+ let map = new Map();
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_order').value;
+ let vbillcode = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'vbillcode').value;
+ let dbilldate = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'dbilldate').value;
+ let corigcurrencyid = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'corigcurrencyid').value;
+ headvo.pk_order = pk_order;
+ headvo.vbillcode = vbillcode;
+ headvo.dbilldate = dbilldate;
+ headvo.corigcurrencyid = corigcurrencyid;
+ // let frontHeadData = {};
+ // let frontBodyData = {};
+ // let frontdata = {
+ // head: { grossprofit_head: { areacode: 'grossprofit_head', rows: [{ status: '0', values: {} }] } },
+ // body: { grossprofit_body: { areacode: 'grossprofit_body', rows: [{ status: '0', values: {} }] } }
+ // };
+ // if (pk_order == null) {
+ // frontHeadData.dbilldate = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'dbilldate');
+ // frontHeadData.vbillcode = {};
+ // selectedRow.map(item => {
+ // if (item.data.values.pk_material.value) {
+ // frontBodyData.cunitid = item.data.values.cunitid;
+ // frontBodyData.ngrossprofit = item.data.values.ngrossprofit;
+ // frontBodyData.ngrossprofitrate = item.data.values.ngrossprofitrate;
+ // frontBodyData.nitemdiscountrate = item.data.values.nitemdiscountrate;
+ // frontBodyData.norigmny = item.data.values.norigmny;
+ // frontBodyData.norignetprice = item.data.values.norignetprice;
+ // frontBodyData.norigprice = item.data.values.norigprice;
+ // frontBodyData.nsalemny = item.data.values.nsalemny;
+ // frontBodyData.nsaleprice = item.data.values.nsaleprice;
+ // frontBodyData.pk_material = item.data.values.pk_material;
+ // frontBodyData.matname = { display: item.data.values['pk_material.name'].display };
+ // frontBodyData.matspec = { display: item.data.values['pk_material.materialspec'].display };
+ // frontBodyData.mattype = { display: item.data.values['pk_material.materialtype'].display };
+ // frontBodyData.pk_order = {};
+ // frontBodyData.pk_order_b = {};
+ // frontBodyData.pk_material = item.data.values.pk_material;
+ // frontBodyData.nnum = item.data.values.nnum;
+ // }
+ // });
+ // frontdata.head.grossprofit_head.rows[0].values = frontHeadData;
+ // frontdata.body.grossprofit_body.rows[0].values = frontBodyData;
+ // this.setState({
+ // showGrossProfitQuery: true,
+ // grossflag: true,
+ // grossprofitdata: frontdata
+ // });
+ // } else
+ // {
+ selectedRow.map((item, index) => {
+ index = index + '';
+ if (item.data.values.pk_material.value) {
+ if (!item.data.values.blargess.value) {
+ let rowid = item.data.rowid;
+ let pk_material = item.data.values.pk_material.value;
+ let pk_order_b = item.data.values.pk_order_b.value;
+ rowparam.push(pk_material);
+ let data = {
+ matname: item.data.values['pk_material.name'].display,
+ matspec: item.data.values['pk_material.materialspec'].display,
+ mattype: item.data.values['pk_material.materialtype'].display
+ };
+ map.set(rowid, data);
+ let body = {
+ pk_order: pk_order,
+ pk_order_b: pk_order_b,
+ pk_psfinanceorg: item.data.values.pk_psfinanceorg.value,
+ pk_material: pk_material,
+ crowno: item.data.values.crowno.value,
+ ccurrencyid: item.data.values.ccurrencyid.value,
+ cunitid: item.data.values.cunitid.value,
+ nitemdiscountrate: item.data.values.nitemdiscountrate.value,
+ nnum: item.data.values.nnum.value,
+ nmny: item.data.values.nmny.value,
+ nnetprice: item.data.values.nnetprice.value,
+ nprice: item.data.values.nprice.value,
+ rowid: rowid
+ };
+ bodyvo.push(body);
+ }
+ }
+ });
+ let grossprofitdata = {
+ grosshead: headvo,
+ grossitems: bodyvo,
+ pk_material: rowparam,
+ materialinfo: map,
+ pagecode: GROSSPROFITQUEYR.PAGECODE
+ };
+ if (rowparam.length == 0) {
+ this.setState({
+ showGrossProfitQuery: false,
+ grossprofitdata: grossprofitdata
+ });
+ } else {
+ this.setState({
+ showGrossProfitQuery: true,
+ grossprofitdata: grossprofitdata
+ });
+ }
+}
+
+/*WgoOoYEu7CWCvkqYZ+ieVZmIK9MS8OdAFaaYA7NH8w4=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/handleOrderBtn.js b/src/pu/pu/poorder/card/btnClicks/handleOrderBtn.js
new file mode 100644
index 0000000..7ef3974
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/handleOrderBtn.js
@@ -0,0 +1,186 @@
+/*uWSI08+ziUXk1+YnZ6ddObYgyMhzjgszs1Ub+K3T/B8=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片整单打开/关闭、冻结/解冻
+ * @Date: 2018-06-20 18:23:03
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-02 13:27:50
+ */
+import { FIELD, PAGECODE, TRANSFER, OrderCache } from '../../constance';
+import { ajax, base } from 'nc-lightapp-front';
+import { updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import ScriptActionDlg from '../../../pub/ScriptActionDlg';
+
+let reason = '';
+let pk = '';
+
+export default function handleOrderBtn(_url, contents, extstr, skipCodes) {
+ // 采购订单卡片整单打开/关闭、行关闭/行打开、冻结/解冻、生成协同销售订单
+ extstr = extstr == null || extstr == undefined ? '' : extstr;
+ let _this = this;
+ pk = _this.props.getUrlParam(FIELD.id);
+ let transfer = _this.props.getUrlParam(TRANSFER.transfer);
+ if (transfer == null) {
+ transfer = _this.props.getUrlParam(TRANSFER.channelType);
+ }
+ if (pk == null || transfer != null) {
+ // 转单已保存的数据有主键
+ let pk_orders = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk = pk_orders && pk_orders.value;
+ }
+ let ts = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.ts).value;
+ let allrows = _this.props.cardTable.getAllRows(PAGECODE.cardbody);
+ let bodys = [];
+ allrows.forEach((row) => {
+ bodys.push({
+ pks: row.values[FIELD.pk_order_b].value,
+ ts: row.values[FIELD.ts].value
+ });
+ });
+ let rows = [];
+ let info = {
+ pks: pk,
+ ts: ts,
+ bodys: bodys
+ };
+ rows.push(info);
+ skipCodes = skipCodes ? skipCodes : new Array();
+ // 拼装json
+ let data = {
+ skipCodes: skipCodes,
+ closedto: rows,
+ pagecode: PAGECODE.cardcode,
+ extstr: extstr
+ };
+ if (contents == getLangByResId(this, '4004POORDER-000023')) {
+ /* 国际化处理: 冻结*/
+ let getFreezeReason = (val) => {
+ reason = val;
+ };
+ //冻结原因
+ this.props.modal.show('MessageDlg', {
+ title: getLangByResId(this, '4004POORDER-000044') /* 国际化处理: 冻结原因*/,
+ content: (
+ {
+ reason = value;
+ }}
+ title={getLangByResId(this, '4004POORDER-000130')}
+ max={33}
+ showMax={true}
+ />
+ ),
+ size: 'sm',
+ beSureBtnClick: beSureBtnClick.bind(this, this.props, _url, data, contents), //点击确定按钮事件
+ cancelBtnClick: () => this.props.modal.close('MessageDlg'),
+ closeModalEve: () => this.props.modal.close('MessageDlg')
+ });
+ } else if (
+ contents == getLangByResId(this, '4004POORDER-000025') ||
+ contents == getLangByResId(this, '4004POORDER-000026') ||
+ contents == getLangByResId(this, '4004POORDER-000027') ||
+ contents == getLangByResId(this, '4004POORDER-000028')
+ ) {
+ /* 国际化处理: 冻结*/
+ let getCloseReason = (val) => {
+ reason = val;
+ };
+ data.closeReason = '';
+ //data.closeReason = reason;
+ //冻结原因
+ this.props.modal.show('MessageDlg', {
+ title: getLangByResId(this, '4004POORDER-000141') /* 国际化处理: 冻结原因*/,
+ content: (
+ {
+ reason = value;
+ data.closeReason = value;
+ }}
+ title={getLangByResId(this, '4004POORDER-000142')}
+ max={100}
+ showMax={true}
+ />
+ ),
+ size: 'sm',
+ beSureBtnClick: handelBills.bind(this, this.props, _url, data, contents, extstr, skipCodes), //点击确定按钮事件
+ cancelBtnClick: () => this.props.modal.close('MessageDlg'),
+ closeModalEve: () => this.props.modal.close('MessageDlg')
+ });
+ } else {
+ handelBills.call(this, this.props, _url, data, contents, extstr, skipCodes);
+ }
+}
+
+// 弹出框点击确定事件
+function beSureBtnClick(props, _url, data, contents) {
+ reason = reason == '' ? null : reason;
+ data.extstr = reason;
+ handelBills.call(this, props, _url, data, contents);
+}
+
+function handelBills(props, _url, data, contents, extstr, skipCodes) {
+ if (data.closeReason != undefined && data.closeReason == '') {
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000143')); /* 国际化处理: 关闭/打开原因不能为空*/
+ handleOrderBtn.call(this, _url, contents, extstr, skipCodes);
+ } else if (data.closeReason != undefined && data.closeReason.length > 100) {
+ showErrorInfo(getLangByResId(this, '4004POORDER-000144')); //提示 ! 最大录入长度为300(汉字最多录入100个)
+ handleOrderBtn.call(this, _url, contents, extstr, skipCodes);
+ } else {
+ // 发送请求
+ skipCodes = skipCodes ? skipCodes : new Array();
+ (data['skipCodes'] = skipCodes),
+ ajax({
+ url: _url,
+ data: data,
+ success: (res) => {
+ if (res.data && res.data.isResume && res.data.isResume == true) {
+ showResumeModal.bind(this)(
+ this.props,
+ 'ResumeMessageDlg',
+ skipCodes,
+ res.data,
+ handelBills.bind(this, props, _url, data, contents, skipCodes),
+ this.props
+ );
+ return;
+ } else {
+ if (res.data) {
+ //开关开始
+ this.props.beforeUpdatePage();
+ let map = new Map();
+ map.set('pk_payment', PAGECODE.head_payment);
+ map.set('pk_order_b', PAGECODE.cardbody);
+ let config = {
+ headAreaId: PAGECODE.cardhead,
+ bodyIdAndPkMap: map
+ };
+ updateExtBillDataForCompareByPk(this.props, res.data, config);
+ //开关关闭
+ props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ this.forceUpdate();
+ updateCacheData(
+ this.props,
+ FIELD.pk_order,
+ pk,
+ res.data,
+ PAGECODE.cardhead,
+ OrderCache.OrderCacheKey
+ );
+ showSuccessInfo(contents + getLangByResId(this, '4004POORDER-000045')); /* 国际化处理: 成功!*/
+ setTimeout(() => {
+ buttonController.togglePageShow.call(this, this.props, null);
+ }, 0);
+ }
+ }
+ }
+ });
+ }
+}
+
+/*uWSI08+ziUXk1+YnZ6ddObYgyMhzjgszs1Ub+K3T/B8=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/index.js b/src/pu/pu/poorder/card/btnClicks/index.js
new file mode 100644
index 0000000..c7784c6
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/index.js
@@ -0,0 +1,91 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单按钮事件统一规范入口
+ * @Date: 2018-04-19 10:39:52
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-06 10:05:28
+ */
+import cancelButton from './cancelButton';
+import editButton from './editButton';
+import saveBtnClick from './saveButton';
+import backButton from './backButton';
+import deleteBtnClick from './deleteBtnClick';
+import pageInfoClick from './pageInfoClick';
+import commit from './commit';
+import uncommit from './uncommit';
+import copyAddBtn from './copyAddBtn';
+import print_BtnClick from './print_BtnClick';
+import quitTransferButton from './quitTransferButton';
+import stockQuery from './stockQuery';
+import salesQuery from './salesQuery';
+import grossProfitQuery from './grossProfitQuery';
+import supplierApQuery from './supplierApQuery';
+import savecommit from './savecommit';
+import pricequery from './pricequery';
+import checkDataPermission from './checkDataPermission';
+import printOut from './printOut';
+import combineShow from './combineShow';
+import coopPriceQuery from './coopPriceQuery';
+import handleOrderBtn from './handleOrderBtn';
+import payPlan from './payPlan';
+import requestCheckData from './requestCheckData';
+import refresh from './refresh';
+import transportstatusquery from './transportstatusquery';
+import commonCheckData from './commonCheckData';
+import payExecStatBtnClick from './payExecStatBtnClick';
+import tempStorageBtnClick from './tempStorageBtnClick';
+import supplmentaryinfoBtnClick from './supplmentaryinfoBtnClick';
+import addBtnClick from './addBtnClick';
+import saveAndCommit from './saveAndCommit';
+import linkPoPlanBtnClick from './linkPoPlanBtnClick';
+import bizInfoBtnClick from './bizInfoBtnClick';
+import pricedetailBtnClick from './pricedetailBtnClick';
+import addFeeDetailBtnClick from './addFeeDetailBtnClick';
+import pasteLineBtn from './pasteLineBtn';
+import onCellKeyDown from './onCellKeyDown';
+import onRowClick from './onRowClick';
+
+export {
+ backButton,
+ cancelButton,
+ editButton,
+ saveBtnClick,
+ deleteBtnClick,
+ pageInfoClick,
+ commit,
+ uncommit,
+ copyAddBtn,
+ print_BtnClick,
+ quitTransferButton,
+ stockQuery,
+ salesQuery,
+ grossProfitQuery,
+ supplierApQuery,
+ savecommit,
+ pricequery,
+ checkDataPermission,
+ printOut,
+ combineShow,
+ coopPriceQuery,
+ handleOrderBtn,
+ payPlan,
+ requestCheckData,
+ refresh,
+ transportstatusquery,
+ commonCheckData,
+ payExecStatBtnClick,
+ tempStorageBtnClick,
+ addBtnClick,
+ supplmentaryinfoBtnClick,
+ saveAndCommit,
+ linkPoPlanBtnClick,
+ bizInfoBtnClick,
+ pricedetailBtnClick,
+ addFeeDetailBtnClick,
+ pasteLineBtn,
+ onRowClick,
+ onCellKeyDown
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/linkPoPlanBtnClick.js b/src/pu/pu/poorder/card/btnClicks/linkPoPlanBtnClick.js
new file mode 100644
index 0000000..b7649fe
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/linkPoPlanBtnClick.js
@@ -0,0 +1,50 @@
+/*+ysJHoDYoDx5ydze45LdSge0VHaL2qyBjpzAsqhXHm0=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 联查采购计划
+ * @Date: 2020-02-27 12:23:31
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2022-05-26 16:26:12
+ */
+import { toast, ajax } from 'nc-lightapp-front';
+import { PAGECODE, URL, FIELD } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function linkPoPlanBtnClick(props) {
+ let selectedRow = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value;
+ if (pk_order == undefined) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000138') /* 国际化处理:订单未保存,无法联查采购计划! */
+ });
+ return;
+ }
+ if (pk_order) {
+ let conditionData = {
+ pks: [ pk_order ],
+ pageid: PAGECODE.cardcode
+ };
+ ajax({
+ url: URL.linpayplay,
+ data: conditionData,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ this.setState({
+ showNtbDetail: true,
+ ntbdata: res.data
+ });
+ }
+ }
+ });
+ }
+}
+
+/*+ysJHoDYoDx5ydze45LdSge0VHaL2qyBjpzAsqhXHm0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/onCellKeyDown.js b/src/pu/pu/poorder/card/btnClicks/onCellKeyDown.js
new file mode 100644
index 0000000..e5d1a05
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/onCellKeyDown.js
@@ -0,0 +1,32 @@
+/*jCWbSAY8bPld2xOkMxKsWk1xjW/MZwPeq9zq5wBWLAQ=*/
+import { PAGECODE, FIELD, INTELLAREA } from '../../constance';
+export default function onCellKeyDown(props, activeTab, row, rowIndex, colKey, col, e) {
+ let rows = this.props.cardTable.getNumberOfRows(PAGECODE.cardbody);
+ // 方向键上箭头
+ if (e.keyCode == '40') {
+ if (rowIndex == rows - 1) {
+ rowIndex = 0;
+ } else {
+ rowIndex = rowIndex + 1;
+ }
+ // 方向键下箭头
+ } else if (e.keyCode == '38') {
+ if (rowIndex == 0) {
+ rowIndex = rows - 1;
+ } else {
+ rowIndex = rowIndex - 1;
+ }
+ }
+ if (e.keyCode == '38' || e.keyCode == '40') {
+ let record = props.cardTable.getDataByIndex(PAGECODE.cardbody, rowIndex);
+ if (record.values[FIELD.pk_material].value) {
+ this.props.smartCard.setCardProps('smartCard', 'atp', { rowData: record.values });
+ this.click = record.values;
+ } else {
+ this.props.smartCard.setCardProps('smartCard', 'atp', { rowData: {} });
+ this.click = {};
+ }
+ }
+}
+
+/*jCWbSAY8bPld2xOkMxKsWk1xjW/MZwPeq9zq5wBWLAQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/onRowClick.js b/src/pu/pu/poorder/card/btnClicks/onRowClick.js
new file mode 100644
index 0000000..ac51253
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/onRowClick.js
@@ -0,0 +1,18 @@
+/*zcTcM69KAXECOoLfNkrSA5UqCcNFE0lkBAnjyr7KMm0=*/
+export default function onRowClick(props, moduleId, record) {
+ // 重复点击时不再触发
+ if (this.click && this.click.rowid) {
+ if (this.click.rowid == record.rowid) {
+ return;
+ }
+ }
+ if (record.values.pk_material.value) {
+ props.smartCard.setCardProps('smartCard', 'atp', { rowData: record.values });
+ this.click = record;
+ } else {
+ props.smartCard.setCardProps('smartCard', 'atp', { rowData: {} });
+ this.click = {};
+ }
+}
+
+/*zcTcM69KAXECOoLfNkrSA5UqCcNFE0lkBAnjyr7KMm0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/pageInfoClick.js b/src/pu/pu/poorder/card/btnClicks/pageInfoClick.js
new file mode 100644
index 0000000..a18283e
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/pageInfoClick.js
@@ -0,0 +1,476 @@
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片通用查询信息
+ * @Date: 2018-04-19 10:09:24
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-01 14:18:08
+ */
+import { ajax, promptBox } from 'nc-lightapp-front';
+import {
+ URL,
+ PAGECODE,
+ FIELD,
+ STATUS,
+ BUTTON,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ TRANSFER,
+ OrderCache,
+ TRANSFER49,
+ PUSHCONST
+} from '../../constance';
+import { PK } from '../../transfer23_45/const';
+import { copyAddBtn, backButton } from './index';
+import { changeUrlParam, getDefData, updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { relationCT } from '../afterEvents';
+import { buttonController } from '../viewController/index';
+import { createExtBillHeadAfterEventData } from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { showSagaErrorToasts } from '../../../pub/utils/sagaMsgUtils';
+
+export default function(props, pk) {
+ let _this = this;
+ props = this.props;
+ let status = this.props.getUrlParam(STATUS.status);
+ let channelType = this.props.getUrlParam(TRANSFER.channelType);
+ let srcpk = this.props.getUrlParam(FIELD.pks);
+ if (srcpk) {
+ let srcStatus = this.props.getUrlParam(STATUS.status);
+ pk = srcpk;
+ status = srcStatus;
+ }
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ // 需求(刘兰娇)变更为不处理
+ this.props.cardTable.toggleCardTable(PAGECODE.head_payment, false);
+ if (channelType) {
+ // 推单
+ arrange(_this, channelType);
+ } else if (transfer) {
+ // 拉单
+ getTransferValue(_this, _this.props, transfer);
+ } else if (status == BUTTON.Copy.toLowerCase()) {
+ // 复制
+ copyAddBtn.call(this);
+ } else {
+ if (status == 'add') {
+ pk = null;
+ emptyEditPage.call(this);
+ }
+ if (pk) {
+ //动态修改地址栏中的id的值(路径中一定要是id,否则会导致切换下一条的时候,pk取不到)
+ changeUrlParam(_this.props, { id: pk });
+ }
+ //非新增页面获取对应数据
+ pk = this.props.getUrlParam(FIELD.id);
+ pk = pk == '' || pk == 'undefined' || pk == 'null' ? null : pk;
+ if (pk) {
+ let conditionData = {
+ pks: [ pk ],
+ pageid: PAGECODE.cardcode,
+ status: _this.getPageParam(STATUS.status)
+ };
+ ajax({
+ url: URL.getCard,
+ data: conditionData,
+ method: 'POST',
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ this.props.beforeUpdatePage();
+ let data = res.data;
+ if (data.head) {
+ this.props.form.setAllFormValue({ [PAGECODE.cardhead]: data.head[PAGECODE.cardhead] });
+ //订单状态
+ let forderstatus = data.head[PAGECODE.cardhead].rows[0].values.forderstatus;
+ //冻结原因
+ let vfrozenreason = data.head[PAGECODE.cardhead].rows[0].values.vfrozenreason;
+ vfrozenreason = vfrozenreason && vfrozenreason.value;
+ forderstatus && forderstatus.value
+ ? this.setState({ forderstatus: forderstatus.value, vfrozenreason: vfrozenreason })
+ : '';
+ updateCacheData(
+ props,
+ 'pk_order',
+ data.head[PAGECODE.cardhead].rows[0].values.pk_order.value,
+ data,
+ PAGECODE.cardhead,
+ OrderCache.OrderCacheKey
+ );
+ }
+ let cards = data.bodys;
+ if (cards && cards[PAGECODE.head_payment]) {
+ this.props.cardTable.setTableData(
+ PAGECODE.head_payment,
+ cards[PAGECODE.head_payment],
+ null,
+ true,
+ true
+ );
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] });
+ }
+ if (cards && cards[PAGECODE.cardbody]) {
+ //解决NCCLOUD-94561:表体分页时点击翻页
+ this.props.cardTable.setTableData(
+ PAGECODE.cardbody,
+ cards[PAGECODE.cardbody],
+ null,
+ true,
+ true
+ );
+ }
+ // 处理费用项
+ if (cards && cards[PAGECODE.card_fee]) {
+ this.props.cardTable.setTableData(
+ PAGECODE.card_fee,
+ cards[PAGECODE.card_fee],
+ null,
+ true,
+ true
+ );
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] });
+ }
+ // 处理费用明细
+ if (data.grandSons[PAGECODE.card_fee_detail]) {
+ this.props.cardTable.setTableData(
+ PAGECODE.card_fee_detail,
+ data.grandSons[PAGECODE.card_fee_detail],
+ null,
+ true,
+ true
+ );
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] });
+ }
+ this.props.cardTable.setStatus(PAGECODE.cardbody, STATUS.edit);
+ this.props.cardTable.setStatus(PAGECODE.head_payment, STATUS.edit);
+ this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.edit);
+ this.props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+
+ buttonController.togglePageShow.call(this, this.props, null);
+ showSagaErrorToasts(props, PAGECODE.cardhead, FIELD.pk_order);
+ }
+ },
+ error: (error) => {
+ buttonController.showEmptyBrowsePage.call(this);
+ showErrorInfo(getLangByResId(_this, '4004POORDER-000039'), error.message); /* 国际化处理: 注意*/
+ }
+ });
+ }
+ }
+}
+
+function emptyEditPage() {
+ changeUrlParam(this.props, { status: STATUS.edit });
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, { [FIELD.pk_order]: { value: null, display: null } });
+ this.props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ //执行跳出堆栈
+ this.props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ this.props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ this.props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ this.props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ this.props.initMetaByPkorg(FIELD.pk_org_v);
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.forderstatus]: {
+ value: '0',
+ display: getLangByResId(this, '4004POORDER-000020')
+ } /* 国际化处理: 自由*/
+ });
+ buttonController.togglePageShow.call(this, this.props, null);
+}
+
+function getTransferValue(_this, props, transfer) {
+ let ids = _this.props.transferTable.getTransferTableSelectedId(PAGECODE.cardhead);
+ if (transfer == 'MULTI') {
+ ids = props.transferTable.getTransferTableMultiSelectedId();
+ if (ids) {
+ ids.map((v) => {
+ v.bodys.map((body) => {
+ if (body[PK.body23]) {
+ body['pk'] = body[PK.body23];
+ body['ts'] = body.ts;
+ body['vo'] = PK.body23;
+ }
+ if (body[PK.body45]) {
+ body['pk'] = body[PK.body45];
+ body['ts'] = body.ts;
+ body['vo'] = PK.body45;
+ }
+ });
+ if (v.head[PK.head23]) {
+ v.head['pk'] = v.head[PK.head23];
+ v.head['ts'] = v.head.ts;
+ v.head['vo'] = PK.head23;
+ }
+ if (v.head[PK.head45]) {
+ v.head['pk'] = v.head[PK.head45];
+ v.head['ts'] = v.head.ts;
+ v.head['vo'] = PK.head45;
+ }
+ });
+ }
+ }
+ let map = new Map();
+ map.set('TRANSFER20', TRANSFER20);
+ map.set('TRANSFERZ2', TRANSFERZ2);
+ map.set('TRANSFER30TO21', TRANSFER30TO21);
+ map.set('TRANSFER30TO21COOP', TRANSFER30TO21COOP);
+ map.set('TRANSFERMULTI', TRANSFERMULTI);
+ map.set('TRANSFER49', TRANSFER49);
+ let org = null;
+ let ref20data = null;
+ if (
+ transfer == TRANSFER30TO21.CSOURCETYPECODE ||
+ transfer == TRANSFER30TO21COOP.CSOURCETYPECODE ||
+ transfer == TRANSFERZ2.CSOURCETYPECODE
+ ) {
+ org = props.getUrlParam('org');
+ } else if (transfer == TRANSFER20.CSOURCETYPECODE) {
+ ref20data = getDefData(OrderCache.OrderTransferCache, '20to21');
+ }
+ let TRANSFER = map.get('TRANSFER' + transfer);
+ let queryAreaCode = TRANSFER.SEARCHID;
+ let oid = org;
+ let userObject = { pk_org: org };
+ let key = TRANSFER.KEY;
+ let _url = TRANSFER.TRANSFERXTO21ACTION;
+ let templetid = getDefData(OrderCache.OrderTransferCache, 'templetid');
+ if (ids) {
+ buttonController.togglePageShow.call(_this, _this.props, STATUS.edit);
+ // let id = new Set();
+ // ids.map((v) => {
+ // v.bodys.map((body) => {
+ // id.add(body.pk);
+ // });
+ // });
+ ids = transfer == '20' ? ref20data : ids;
+ let data = {
+ pagecode: PAGECODE.cardcode,
+ templetid: templetid,
+ queryAreaCode: queryAreaCode,
+ oid: oid,
+ userObject: userObject,
+ queryType: PAGECODE.tree,
+ key: key,
+ data: ids
+ };
+ _this.refsourcdata = data;
+ ajax({
+ method: 'POST',
+ url: _url,
+ data: data,
+ // async: false,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ props.beforeUpdatePage();
+ if (res && res.data) {
+ let array = new Array();
+ res.data.extBillCards.map((o) => {
+ if (!o.bodys[PAGECODE.head_payment]) {
+ o.bodys[PAGECODE.head_payment] = { areacode: PAGECODE.head_payment, rows: [] };
+ }
+ if (!o.bodys[PAGECODE.card_fee]) {
+ o.bodys[PAGECODE.card_fee] = { areacode: PAGECODE.card_fee, rows: [] };
+ }
+ if (!o.bodys[PAGECODE.card_fee_detail]) {
+ o.bodys[PAGECODE.card_fee_detail] = { areacode: PAGECODE.card_fee_detail, rows: [] };
+ }
+ let datass = {};
+ datass.head = o.head;
+ datass.body = o.bodys;
+ datass.pageid = o.pageid;
+ array.push(datass);
+ });
+ props.transferTable.setTransferListValue(PAGECODE.leftarea, array);
+ props.form.setFormStatus(PAGECODE.cardhead, STATUS.edit);
+ }
+ setTimeout(() => {
+ if (res.data && res.data.userObject.relateCTVO && transfer != 'MULTI') {
+ if (res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment ];
+ let moduleId = PAGECODE.cardbody;
+ let key = 'dbilldate';
+ let value = props.form.getFormItemsValue(PAGECODE.cardhead, key);
+ let aggvo = createExtBillHeadAfterEventData(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ value
+ );
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 关联合同*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 确定要关联合同吗?*/
+ leftBtnName: getLangByResId(_this, '4004POORDER-000018') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(_this, '4004POORDER-000019') /* 国际化处理: 取消*/,
+ beSureBtnClick: relationCT.relateCTOKBtnClick.bind(
+ _this,
+ _this.props,
+ res.data.userObject,
+ aggvo
+ ), //点击确定按钮事件
+ cancelBtnClick: relationCT.relateCTCancelBtnClick.bind(
+ _this,
+ _this.props,
+ res.data.userObject
+ )
+ });
+ }
+ }
+ }, 0);
+ props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+ },
+ error: (error) => {
+ backButton.call(_this, error);
+ showErrorInfo(getLangByResId(_this, '4004POORDER-000039'), error.message); /* 国际化处理: 注意*/
+ }
+ });
+ } else {
+ props.transferTable.setTransferListValue(PAGECODE.leftarea, []);
+ }
+}
+
+function arrange(_this, channelType) {
+ let ids;
+ let appcode = _this.props.getUrlParam(PUSHCONST.vsrcAppcode);
+ if (channelType == TRANSFER.replenishmentarrange) {
+ // 补货
+ // ids = getDefData('scm.so.replenishmentarrange.main', 'replenishmentArrangeIds');
+ ids = JSON.parse(_this.props.getUrlParam('replenishmentArrangeIds'));
+ } else if (channelType == TRANSFER.directarrange) {
+ // 直运
+ // ids = getDefData('scm.so.directarrange.main', 'directArrangeIds');directArrangeIds
+ ids = JSON.parse(_this.props.getUrlParam('directArrangeIds'));
+ } else if (channelType == 'priceaudit') {
+ // 价格审批单
+ // ids = getDefData('purp.pp.priceaudit.pushDataSource', 'pushId');
+ ids = JSON.parse(_this.props.getUrlParam(PUSHCONST.pushId));
+ } else if (channelType == 'poplan') {
+ ids = JSON.parse(_this.props.getUrlParam(PUSHCONST.pushId));
+ }
+ let orgid = _this.props.getUrlParam('orgid');
+ let vsrctype = _this.props.getUrlParam('vsrctype'); //上游单据类型,用来判断调用哪个接口
+ let url = _this.props.getUrlParam('channelAddress');
+ _this.setState({
+ returnURL: '/' + url,
+ appcode: appcode,
+ returnType: ''
+ });
+ if (ids) {
+ let data = {
+ pks: ids,
+ pagecode: PAGECODE.cardcode,
+ pk_org: orgid,
+ vsrctype: vsrctype,
+ channelType: channelType
+ };
+ ajax({
+ method: 'POST',
+ url: URL.sotoorder,
+ data: data,
+ success: (res) => {
+ _this.props.beforeUpdatePage();
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ let array = new Array();
+ res.data.extBillCards.map((o) => {
+ let datass = {};
+ if (!o.bodys[PAGECODE.head_payment]) {
+ o.bodys[PAGECODE.head_payment] = { areacode: PAGECODE.head_payment, rows: [] };
+ }
+ if (!o.bodys[PAGECODE.card_fee]) {
+ o.bodys[PAGECODE.card_fee] = { areacode: PAGECODE.card_fee, rows: [] };
+ }
+ if (!o.bodys[PAGECODE.card_fee_detail]) {
+ o.bodys[PAGECODE.card_fee_detail] = { areacode: PAGECODE.card_fee_detail, rows: [] };
+ }
+ datass.head = o.head;
+ datass.body = o.bodys;
+ datass.pageid = o.pageid;
+ array.push(datass);
+ });
+ _this.props.transferTable.setTransferListValue(PAGECODE.leftarea, array);
+ _this.props.cardTable.setStatus(PAGECODE.cardbody, STATUS.edit);
+ _this.props.cardTable.setStatus(PAGECODE.head_payment, STATUS.edit);
+ _this.props.cardTable.setStatus(PAGECODE.card_fee, STATUS.edit);
+ _this.props.cardTable.setStatus(PAGECODE.card_fee_detail, STATUS.edit);
+ _this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.edit);
+ _this.setState({ listdata: array });
+ setTimeout(() => {
+ if (res.data && res.data.userObject.relateCTVO && res.data.userObject.relateCTVO.pk_ct_pu) {
+ if (res.data.userObject.relateCTVO.pk_ct_pu.rows.length > 0) {
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment ];
+ let moduleId = PAGECODE.cardbody;
+ let key = 'dbilldate';
+ let value = _this.props.form.getFormItemsValue(PAGECODE.cardhead, key);
+ let aggvo = createExtBillHeadAfterEventData(
+ _this.props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ moduleId,
+ key,
+ value
+ );
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(_this, '4004POORDER-000139'), // 弹框表头信息/* 国际化处理: 提示*/
+ content: getLangByResId(_this, '4004POORDER-000140'), //弹框内容,可以是字符串或dom/* 国际化处理: 是否关联合同?*/
+ leftBtnName: getLangByResId(_this, '4004POORDER-000015') /* 国际化处理: 是*/,
+ rightBtnName: getLangByResId(_this, '4004POORDER-000016') /* 国际化处理: 否*/,
+ beSureBtnClick: relationCT.relateCTOKBtnClick.bind(
+ _this,
+ _this.props,
+ res.data.userObject,
+ aggvo
+ ), //点击确定按钮事件
+ cancelBtnClick: relationCT.relateCTCancelBtnClick.bind(
+ _this,
+ _this.props,
+ res.data.userObject
+ )
+ });
+ }
+ }
+ }, 0);
+ }
+ _this.props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ }
+ });
+ } else {
+ _this.props.transferTable.setTransferListValue(PAGECODE.leftarea, []);
+ }
+}
+
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/pasteLineBtn.js b/src/pu/pu/poorder/card/btnClicks/pasteLineBtn.js
new file mode 100644
index 0000000..e50ae4e
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/pasteLineBtn.js
@@ -0,0 +1,137 @@
+/*4wj7+msOkDtlKP8HqY1CI8zIVma2j2G+SKayldzidh4=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 页面功能描述
+ * @Date: 2023-05-22 17:24:49
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-07-03 17:00:48
+ */
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { URL, PAGECODE, BUTTON, FIELD } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+export default function(props, record, index) {
+ pasteLine.call(this, props, record, index).then((indexs) => {
+ updateDetail.call(this, props, record, index, indexs);
+ });
+}
+async function pasteLine(props, record, index) {
+ // 效率优化开启
+ props.beforeUpdatePage();
+ let indexs = [];
+ let copydata = [];
+ if (record) {
+ // copydata = JSON.parse(JSON.stringify(this.copyRowDatas));
+ copydata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (copydata instanceof Array) {
+ for (let i = 0; i < copydata.length; i++) {
+ indexs.push(index + i);
+ }
+ } else {
+ indexs.push(index);
+ }
+ // 粘贴至此
+ rowCopyPasteUtils.pasteRowsToIndex.call(
+ this,
+ props,
+ PAGECODE.cardbody,
+ index,
+ BUTTON.materialCardInitBtn,
+ BUTTON.materialCardPastBtn,
+ [ FIELD.crowno, FIELD.pk_order_b, FIELD.vclosereason, FIELD.vcloseperson, FIELD.vclosetime ]
+ );
+ } else {
+ copydata = JSON.parse(JSON.stringify(this.copyRowDatas));
+ let rowCount = props.cardTable.getNumberOfRows(PAGECODE.cardbody);
+ if (copydata instanceof Array) {
+ for (let i = 0; i < copydata.length; i++) {
+ indexs.push(rowCount + i);
+ }
+ } else {
+ indexs.push(rowCount);
+ }
+ // 粘贴至末行
+ rowCopyPasteUtils.pasteRowsToTail.call(
+ this,
+ props,
+ PAGECODE.cardbody,
+ BUTTON.materialCardInitBtn,
+ BUTTON.materialCardPastBtn,
+ [ FIELD.crowno, FIELD.pk_order_b, FIELD.vclosereason, FIELD.vcloseperson, FIELD.vclosetime ]
+ );
+ }
+ // 设置行号和显隐性
+ pasteBtnClick.call(this, props);
+ this.forceUpdate();
+ // 效率优化关闭
+ return indexs;
+}
+
+function updateDetail(props, record, index, indexs) {
+ let feedata = props.cardTable.getVisibleRows(PAGECODE.card_fee);
+ if (feedata == null || feedata.length == 0) {
+ return;
+ }
+ let copydatas = props.cardTable.getRowsByIndexs(PAGECODE.cardbody, indexs);
+ let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment, PAGECODE.card_fee ];
+ let data = props.createExtCardDataSimple(PAGECODE.cardcode, PAGECODE.cardhead, bodyids);
+ data.bodys[PAGECODE.cardbody].rows = copydatas;
+ ajax({
+ url: URL.copybodyInsertFeeDetail,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ let card = res.data;
+ if (card.grandSons[PAGECODE.card_fee_detail]) {
+ let addrows = [];
+ card.grandSons[PAGECODE.card_fee_detail].rows.map((item) => {
+ addrows.push(item);
+ });
+ if (addrows.length > 0) {
+ let rowCount = props.cardTable.getNumberOfRows(PAGECODE.card_fee_detail);
+ for (let i = 0; i < addrows.length; i++) {
+ props.cardTable.addRow(PAGECODE.card_fee_detail, rowCount + i, addrows[i].values, true);
+ }
+ RownoUtils.setRowNo(props, PAGECODE.card_fee_detail, FIELD.crowno);
+ }
+ }
+ }
+ }
+ });
+}
+
+function pasteBtnClick(props) {
+ RownoUtils.setRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ props.button.setButtonVisible(
+ [
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ // BUTTON.Correct,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.StockQuery,
+ BUTTON.SalesQuery,
+ BUTTON.GrossProfit
+ ],
+ true
+ );
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/*4wj7+msOkDtlKP8HqY1CI8zIVma2j2G+SKayldzidh4=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/payExecStatBtnClick.js b/src/pu/pu/poorder/card/btnClicks/payExecStatBtnClick.js
new file mode 100644
index 0000000..e5447cc
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/payExecStatBtnClick.js
@@ -0,0 +1,61 @@
+/*jrcP7nyTP+YYLELV+HhS7IYIYwrjPA4RcukEqQeCTRk=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 付款执行情况
+ * @Date: 2019-04-22 14:01:15
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2022-05-16 21:47:37
+ */
+import { pageTo, viewModel } from 'nc-lightapp-front';
+let { setGlobalStorage, getGlobalStorage, removeGlobalStorage } = viewModel;
+
+import { PAGECODE } from '../../constance';
+export default function payExecStatBtnClick(props) {
+ let str = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org').value;
+ let strname = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org').display;
+ let vbillcode = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'vbillcode').value;
+ let LinkReport = {
+ logic: 'and',
+ conditions: [
+ {
+ field: 'po_order.pk_org',
+ value: {
+ firstvalue: str,
+ secondvalue: ''
+ },
+ oprtype: '=',
+ display: strname,
+ isIncludeSub: false,
+ refurl: '',
+ datatype: '204'
+ },
+ {
+ field: 'po_order.vbillcode',
+ value: { firstvalue: vbillcode, secondvalue: '' },
+ oprtype: '=',
+ display: vbillcode,
+ isIncludeSub: false,
+ refurl: '',
+ datatype: '1'
+ }
+ ]
+ };
+ setGlobalStorage('localStorage', 'LinkReport', JSON.stringify(LinkReport));
+ let params = {
+ 'po_order.pk_org': this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org'),
+ 'po_order.vbillcode': this.props.form.getFormItemsValue(PAGECODE.cardhead, 'vbillcode'),
+ 'po_order.dbilldate': this.props.form.getFormItemsValue(PAGECODE.cardhead, 'dbilldate').value.substr(0, 10)
+ };
+ // pageTo.openTo('/pu/pu/report/orderprayexecquery/index.html', {
+ // appcode: '400413208',
+ // pageCode: '400413208_report',
+ // params: JSON.stringify(params)
+ // });
+ this.props.openTo(null, {
+ appcode: '400413208',
+ pageCode: '400413208_report',
+ params: JSON.stringify(params)
+ });
+}
+
+/*jrcP7nyTP+YYLELV+HhS7IYIYwrjPA4RcukEqQeCTRk=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/payPlan.js b/src/pu/pu/poorder/card/btnClicks/payPlan.js
new file mode 100644
index 0000000..04d702f
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/payPlan.js
@@ -0,0 +1,36 @@
+/*BPGvkVhwiTt3SZoflOvBTqWH6CvcyeAkEjgEcwiw7Cs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 生成付款计划
+ * @Date: 2018-08-30 19:34:11
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-04-06 15:00:42
+ */
+import { URL, STATUS, FIELD, PAGECODE, APPCODE } from '../../constance';
+import { toast } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function payPlan(props) {
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ let forderstatus = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.forderstatus); // 单据状态
+ pk_order = pk_order && pk_order.value;
+ forderstatus = forderstatus && forderstatus.value;
+ //单选且审批过的单据可用openTO付款计划
+ if (forderstatus == FIELD.approved) {
+ props.openTo(URL.payplan, {
+ id: pk_order,
+ appcode: APPCODE.payplanAppCode,
+ pagecode: '400400806_list',
+ pk_org: JSON.stringify(props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org)),
+ vbillcode: props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vbillcode).value,
+ dbilldate: props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.dbilldate).value
+ });
+ } else {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000047') /* 国际化处理: 请选择审批通过的数据!*/
+ });
+ }
+}
+
+/*BPGvkVhwiTt3SZoflOvBTqWH6CvcyeAkEjgEcwiw7Cs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/pricedetailBtnClick.js b/src/pu/pu/poorder/card/btnClicks/pricedetailBtnClick.js
new file mode 100644
index 0000000..699926b
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/pricedetailBtnClick.js
@@ -0,0 +1,82 @@
+/*ErSrjhrhsW6HvwZKBjO8rZb1Is6+BCYLTrs+DAn7RPI=*/
+/*
+ * @Author: tianzhyw
+ * @PageInfo: 采购订单表体行价格详情
+ * @Date: 2022-12-21 14:08:21
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2022-12-21 14:08:21
+ */
+// import PriceForm from '../../../../../so/so/components/priceform';
+import PriceForm from 'so/so/components/priceform';
+
+import { URL, PAGECODE, BILLTYPE } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+export default function pricedetailBtnClick(props, record, index) {
+ if (BILLTYPE.sources == record.values.fpricesourceflag.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000153')); /* 国际化处理: 价格来源于上游单据,请通过单据追溯查看价格详情*/
+ return;
+ }
+ let priceData = null;
+ if (!record || !record.values.pk_srcmaterial || !record.values.pk_srcmaterial.value) {
+ this.setState({
+ showPricedetail: true
+ });
+ priceData = {
+ // 价格来源
+ fpricesourceflag: null,
+ // 价格线索
+ cpricesourceid: null,
+ // 币种
+ corigcurrencyid: null
+ };
+ } else {
+ let corigcurrencyid = props.form.getFormItemsValue(PAGECODE.cardhead, 'corigcurrencyid').value;
+ priceData = {
+ // 价格来源
+ fpricesourceflag: record.values.fpricesourceflag.value,
+ // 价格线索
+ cpricesourceid: record.values.cpricesourceid.value,
+ // 币种
+ corigcurrencyid: corigcurrencyid
+ };
+ }
+
+ /**
+ * 销售协同询价
+ */
+ if (priceData.fpricesourceflag && priceData.fpricesourceflag == 11) {
+ ajax({
+ url: URL.pricedetail,
+ data: priceData,
+ success: (res) => {
+ if (res.success) {
+ let { success, data } = res;
+ if (success && data) {
+ this.setState({
+ showPricedetail: false
+ });
+ props.modal.show('MessageDlg', {
+ size: 'xlg',
+ title: getLangByResId(this, '4004POORDER-000154') /* 国际化处理: 价格组成信息*/,
+ noFooter: true,
+ content: (
+
+ )
+ });
+ }
+ }
+ }
+ });
+ } else {
+ this.setState({
+ showPricedetail: true,
+ priceData
+ });
+ }
+}
+
+/*ErSrjhrhsW6HvwZKBjO8rZb1Is6+BCYLTrs+DAn7RPI=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/pricequery.js b/src/pu/pu/poorder/card/btnClicks/pricequery.js
new file mode 100644
index 0000000..c1b69cd
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/pricequery.js
@@ -0,0 +1,95 @@
+/*zj4ZF3oBS5PrIh/HbTveUbd4rlKOrmfykk5LaIRq0o0=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购询价
+ * @Date: 2018-04-19 10:24:43
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2022-12-01 17:27:06
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE, BUTTON, STATUS, FIELD, TRANSFER } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+import { createExtBillHeadAfterEventData } from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+import { processExtBillCardBodyEditResult } from '../../../../../scmpub/scmpub/pub/tool/afterEditUtil';
+let bodyids = [ PAGECODE.cardbody ];
+let _this;
+
+export default function pricequery(modelIndex) {
+ _this = this;
+ let rows = [];
+ let checkedRows = _this.props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (modelIndex != undefined) {
+ //编辑侧拉只取当前值
+ rows.push(modelIndex);
+ } else if (!checkedRows || checkedRows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000040') /* 国际化处理: 请选择需要询价的表体数据!*/
+ });
+ return;
+ }
+ let noopenrow = new Array(); // 非侧拉勾选的行重新排序
+ if (modelIndex == undefined) {
+ checkedRows.map((item, index) => {
+ rows.push(item.index);
+ noopenrow.push(index);
+ });
+ }
+ //过滤空行
+ this.props.cardTable.filterEmptyRows(PAGECODE.cardbody);
+ this.props.cardTable.filterEmptyRows(PAGECODE.head_payment);
+ let aggvo = createExtBillHeadAfterEventData(
+ this.props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ [ PAGECODE.cardbody ],
+ null,
+ null
+ );
+ let allRows = aggvo && aggvo.card && aggvo.card.bodys && aggvo.card.bodys[PAGECODE.cardbody].rows;
+ let newRows = [];
+ rows.forEach((i) => {
+ newRows.push(allRows[i]);
+ });
+ // 因为侧拉有询价按钮,所以不直接取勾选行数据
+ if (modelIndex != undefined) {
+ //编辑侧拉只取当前值
+ rows = [ 0 ];
+ } else {
+ // 非侧拉勾选的行重新排序
+ rows = noopenrow;
+ }
+ aggvo.card.bodys[PAGECODE.cardbody].rows = newRows;
+ let datas = {
+ rows: rows,
+ cardEvent: aggvo
+ };
+ getAfterData(this.props, datas);
+}
+
+/**
+ * 询价
+ * @param {*} props
+ * @param {*} url
+ * @param {*} aggvo
+ */
+function getAfterData(props, datas) {
+ ajax({
+ url: URL.pricequery,
+ data: datas,
+ method: 'POST',
+ success: (res) => {
+ if (res.data) {
+ let extCard = {
+ extbillcard: res.data
+ };
+ processExtBillCardBodyEditResult(props, PAGECODE.cardbody, extCard);
+ // buttonController.materialButtonInit(props);
+ }
+ }
+ });
+}
+
+/*zj4ZF3oBS5PrIh/HbTveUbd4rlKOrmfykk5LaIRq0o0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/printOut.js b/src/pu/pu/poorder/card/btnClicks/printOut.js
new file mode 100644
index 0000000..c345ca3
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/printOut.js
@@ -0,0 +1,41 @@
+/*OvOenXda7hAGBBFFduhXiMxMvCb2b350kLuNLzqbMVw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 输出
+ * @Date: 2018-07-05 10:25:42
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-04-27 09:40:01
+ */
+import { output } from 'nc-lightapp-front';
+import { PAGECODE, FIELD, URL, OrderCache } from '../../constance';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import remoteCheck from '../../../pub/remoteCall/remoteCheck';
+
+export default function printOut(props) {
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ let funcode = null;
+ let nodekey = '400400800';
+ if (scene == 'approvesce') {
+ // 审批的打印模板
+ nodekey = '4004008006';
+ } else if (scene == 'freeze' || scene == 'ADD') {
+ funcode = '400400800';
+ }
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ pk_order = pk_order == null || pk_order == '' || pk_order == 'undefined' ? props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ let pks = [];
+ pks.push(pk_order);
+ let queryInfo = {
+ pks: pks,
+ };
+ remoteCheck.call(this, URL.printvalidate, queryInfo, () => {
+ output({
+ url: URL.print,
+ data: { oids: pks, funcode: funcode, nodekey: nodekey, outputType: 'output' },
+ });
+ });
+}
+
+/*OvOenXda7hAGBBFFduhXiMxMvCb2b350kLuNLzqbMVw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/print_BtnClick.js b/src/pu/pu/poorder/card/btnClicks/print_BtnClick.js
new file mode 100644
index 0000000..8b7d116
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/print_BtnClick.js
@@ -0,0 +1,75 @@
+/*9a1eTd5yO0nmu7639LcU5tOG+wP56TJsHNNZOreV3vs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 订单卡片打印
+ * @Date: 2018-07-05 10:25:42
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-07-19 14:11:20
+ */
+import { PAGECODE, FIELD, URL, OrderCache, BILLTYPE } from '../../constance';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import remoteCheck from '../../../pub/remoteCall/remoteCheck';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+
+export default function print_BtnClick(props) {
+ let scene = getDefData(OrderCache.OrderCardCache, FIELD.scene);
+ let funcode = props.getAppCode();
+ let billtype = null;
+ let nodekey = '400400800';
+ if (scene == FIELD.approvesce || scene == FIELD.notice) {
+ // 审批的打印模板
+ nodekey = '4004008006';
+ funcode = '400400808';
+ billtype = PAGECODE.billType;
+ } else if (scene == 'freeze' || scene == 'ADD') {
+ funcode = '400400800';
+ }
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value;
+ pk_order =
+ pk_order == null || pk_order == '' || pk_order == 'undefined' || pk_order == 'null'
+ ? props.getUrlParam(FIELD.id)
+ : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' || pk_order == 'null' ? null : pk_order;
+ let pks = [];
+ pks.push(pk_order);
+ let queryInfo = {
+ pks: pks
+ };
+ let pk_org = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ remoteCheck.call(this, URL.printvalidate, queryInfo, () => {
+ let printParams = {
+ appcode: funcode,
+ nodekey: nodekey,
+ oids: pks,
+ pk_org: [ pk_org ],
+ billtype: BILLTYPE.type21,
+ printType: true,
+ realData: true,
+ controlPrintNum: true
+ };
+
+ // 审批场景再传这个参数(transactiontype-交易类型编码, billtype-单据类型,这两个参数每次只能传一个)
+ if (
+ props.getAppCode() == '400400812' ||
+ FIELD.approvesce == getDefData(OrderCache.OrderCardCache, FIELD.scene)
+ ) {
+ // 其他情况,需要根据单据类型找维护应用
+ printParams.istransbilltype = true;
+ printParams.userjson = JSON.stringify({ istransbilltype: true });
+ }
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ * transactiontype 交易类型编码
+ * billtype 单据类型
+ */
+ printPreview(props, URL.print, printParams);
+ });
+}
+
+/*9a1eTd5yO0nmu7639LcU5tOG+wP56TJsHNNZOreV3vs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/quitTransferButton.js b/src/pu/pu/poorder/card/btnClicks/quitTransferButton.js
new file mode 100644
index 0000000..fe179e3
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/quitTransferButton.js
@@ -0,0 +1,60 @@
+/*73aJE1qugI2w/lnlaW8RmBZiRkUT3CcB8SPSSdP1fkE=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 退出转单
+ * @Date: 2018-07-05 13:49:11
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-04-26 10:21:51
+ */
+import {
+ URL,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ TRANSFER,
+ PAGECODE,
+ OrderCache,
+ TRANSFER49,
+} from '../../constance';
+import { showQuitTransferWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { buttonController } from '../viewController/index';
+
+export default function quitTransferButton(props) {
+ let allprocess = this.props.transferTable.getTransformFormStatus(PAGECODE.leftarea);
+ if (allprocess === false) {
+ showQuitTransferWarningDialog({
+ /* 国际化处理: 退出转单,有未保存的单据,确定要退出转单吗?*/
+ beSureBtnClick: () => {
+ quitTransfer.call(this);
+ },
+ });
+ } else {
+ quitTransfer.call(this);
+ }
+}
+
+function quitTransfer() {
+ // 退出转单时移除浏览器监听提示
+ window.removeEventListener('beforeunload', this.onMove);
+ // 场景
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ //推单标识
+ let channelType = this.props.getUrlParam(TRANSFER.channelType);
+ //如果是推单过来的直接返回到
+ if (channelType) {
+ this.props.pushTo(this.state.returnURL, {
+ type: this.state.returnType,
+ appcode: this.state.appcode,
+ });
+ } else if (transfer && scene != null) {
+ buttonController.gobackTransferPage.call(this, this.props, transfer);
+ } else {
+ this.props.pushTo(URL.gotoList);
+ }
+}
+
+/*73aJE1qugI2w/lnlaW8RmBZiRkUT3CcB8SPSSdP1fkE=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/refAddLineComfirmBtnClick.js b/src/pu/pu/poorder/card/btnClicks/refAddLineComfirmBtnClick.js
new file mode 100644
index 0000000..ff5927b
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/refAddLineComfirmBtnClick.js
@@ -0,0 +1,132 @@
+/*9SXo2dIjtemLH9shhv1q/CrT4CFFKH7o0Sgq9P6kdrM3EDb/t6lLbStGORzkDnfR*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 参照增行确认按钮
+ * @Date: 2018-07-30 14:03:49
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-10-09 13:51:47
+ */
+import { ajax, toast, promptBox } from 'nc-lightapp-front';
+import { PAGECODE, TRANSFER20, FIELD, OrderCache, TRANSFER } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { changeUrlParam, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { relationCT } from '../afterEvents';
+import { buttonController } from '../viewController/index';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import { deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+let materialFilterColumn = [
+ 'numberindex', //非元数据字段平台业务字段
+ 'pseudocolumn',
+ 'crowno',
+ 'dbilldate',
+ 'dr',
+ 'pk_org',
+ 'pk_org_v',
+ 'fbuysellflag',
+ 'casscustid',
+ 'btriatradeflag',
+ 'btransclosed',
+ 'bstockclose',
+ 'breceiveplan',
+ 'bpayclose',
+ 'blargess',
+ 'binvoiceclose',
+ 'bborrowpur',
+ 'barriveclose',
+ 'nitemdiscountrate'
+];
+
+export default function refAddLineComfirmBtnClick(array) {
+ let _this = this;
+ _this.props.modal.close('RefAdd20Modal');
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ let _url = TRANSFER20.TRANSFERXTO21ACTION;
+ let refsourcdata = _this.refsourcdata; //参照增行要过滤当前页面的数据
+ let existRefData = deepClone(refsourcdata);
+ array = getDefData(OrderCache.OrderTransferCache, '20to21');
+ let templetid = getDefData(OrderCache.OrderTransferCache, 'templetid');
+ let org = _this.props.getUrlParam('org');
+ let userObject = { pk_org: org };
+ let key = TRANSFER20.KEY;
+ let data = {
+ pagecode: PAGECODE.cardcode,
+ templetid: templetid,
+ queryAreaCode: null,
+ oid: null,
+ userObject: userObject,
+ queryType: PAGECODE.tree,
+ key: key,
+ data: array
+ };
+
+ if (array) {
+ let cacheArray = array;
+ ajax({
+ url: _url,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg, //参数一:返回的公式对象
+ {
+ //参数二:界面使用的表格类型
+ [PAGECODE.head_payment]: 'cardTable',
+ [PAGECODE.cardbody]: 'cardTable'
+ }
+ );
+ }
+ let octrantypeid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.ctrantypeid).value;
+ let opk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ let opk_org = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ octrantypeid = octrantypeid == null ? '' : octrantypeid;
+ opk_supplier = opk_supplier == null ? '' : opk_supplier;
+ opk_org = opk_org == null ? '' : opk_org;
+ let refdata = res.data && res.data.extBillCards;
+ let existDiffer = true;
+ let array = new Array();
+ // 先过滤再增行
+ _this.props.cardTable.filterEmptyRows(PAGECODE.cardbody, materialFilterColumn);
+ // 有效行
+ let rows = _this.props.cardTable.getNumberOfRows(PAGECODE.cardbody, false);
+ refdata &&
+ refdata.map((element) => {
+ let head = element.head[PAGECODE.cardhead];
+ let cards = element.bodys;
+ let nctrantypeid = head.rows[0].values.ctrantypeid && head.rows[0].values.ctrantypeid.value;
+ let npk_supplier = head.rows[0].values.pk_supplier && head.rows[0].values.pk_supplier.value;
+ let npk_org = head.rows[0].values.pk_org && head.rows[0].values.pk_org.value;
+ nctrantypeid = nctrantypeid == null ? '' : nctrantypeid;
+ npk_supplier = npk_supplier == null ? '' : npk_supplier;
+ npk_org = npk_org == null || npk_org == '' ? null : npk_org;
+ // 先判断表头的 业务交易类型、供应商、采购组织 三个是否一致 不一致不能追加
+ if (octrantypeid == nctrantypeid && opk_supplier == npk_supplier && opk_org == npk_org) {
+ cards[PAGECODE.cardbody].rows.map((o) => {
+ o.values.crowno = { display: null, value: null };
+ array.push({ index: rows++, data: o });
+ });
+ } else {
+ //为否代表不能增行
+ existDiffer = false;
+ }
+ });
+ if (existDiffer) {
+ if (refsourcdata) {
+ refsourcdata.data = [ ...cacheArray, ...refsourcdata.data ];
+ _this.refsourcdata = refsourcdata;
+ }
+ this.props.cardTable.insertDataByIndexs(PAGECODE.cardbody, array, true);
+ RownoUtils.setRowNo(this.props, PAGECODE.cardbody, FIELD.crowno);
+ //缓存
+ buttonController.cachedata.call(this);
+ relationCT.relationCT.call(this, this.props, null, existRefData);
+ } else {
+ // 追加信息表头字段业务类型,供应商,采购组织和当前订单表头有不相同的值,不能追加到当前表体
+ /* 国际化处理: 追加信息表头字段业务类型,供应商,采购组织和当前订单表头有不相同的值,不能追加到当前表体!*/
+ toast({ color: 'warning', content: getLangByResId(this, '4004POORDER-000049') });
+ }
+ }
+ });
+ }
+}
+
+/*9SXo2dIjtemLH9shhv1q/CrT4CFFKH7o0Sgq9P6kdrM3EDb/t6lLbStGORzkDnfR*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/refresh.js b/src/pu/pu/poorder/card/btnClicks/refresh.js
new file mode 100644
index 0000000..fbca43f
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/refresh.js
@@ -0,0 +1,125 @@
+/*sN/zrFvZt8g5czcCIAOaEstj3pV/lf4H4VmIkwFjf9s=*/
+import { ajax } from 'nc-lightapp-front';
+import { buttonController } from '../viewController/index';
+import { URL, PAGECODE, FIELD, STATUS, BUTTON, TRANSFER, OrderCache } from '../../constance';
+import { copyAddBtn } from './index';
+import { changeUrlParam, getNextId, updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSagaErrorToasts } from '../../../pub/utils/sagaMsgUtils';
+
+export default function refresh(props, pk_order, isshow) {
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ transfer = transfer == null ? this.props.getUrlParam(TRANSFER.channelType) : transfer;
+ if (pk_order && transfer == null) {
+ changeUrlParam(props, { id: pk_order, status: STATUS.browse });
+ }
+ //非新增页面获取对应数据
+ pk_order = pk_order == null ? props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value : pk_order;
+ pk_order = pk_order == null || pk_order == 'undefined' ? props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == 'undefined' ? getNextId(props, pk_order, OrderCache.OrderCacheKey) : pk_order;
+ if (pk_order) {
+ let conditionData = {
+ pks: [ pk_order ],
+ pageid: PAGECODE.cardcode
+ };
+ ajax({
+ url: URL.getCard,
+ data: conditionData,
+ method: 'POST',
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res.data) {
+ this.props.beforeUpdatePage();
+ let copy = this.props.getUrlParam(STATUS.status);
+ let data = res.data;
+ if (data.head) {
+ // 单据状态 改为自由
+ if (copy == BUTTON.Copy.toLowerCase()) {
+ res.data.head[PAGECODE.cardhead].rows[0].values.forderstatus.value = '0';
+ }
+ this.props.form.setAllFormValue({ [PAGECODE.cardhead]: data.head[PAGECODE.cardhead] });
+ //订单状态
+ let forderstatus = data.head[PAGECODE.cardhead].rows[0].values.forderstatus;
+ //冻结原因
+ let vfrozenreason = data.head[PAGECODE.cardhead].rows[0].values.vfrozenreason;
+ vfrozenreason = vfrozenreason && vfrozenreason.value;
+ forderstatus && forderstatus.value
+ ? this.setState({ forderstatus: forderstatus.value, vfrozenreason: vfrozenreason })
+ : '';
+ this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+ updateCacheData(
+ this.props,
+ FIELD.pk_order,
+ data.head[PAGECODE.cardhead].rows[0].values.pk_order.value,
+ data,
+ PAGECODE.cardhead,
+ OrderCache.OrderCacheKey
+ );
+ }
+ let cards = data.bodys;
+ if (cards && cards[PAGECODE.head_payment]) {
+ this.props.cardTable.setTableData(PAGECODE.head_payment, cards[PAGECODE.head_payment]);
+ buttonController.paymentShow.call(this, this.props);
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] });
+ }
+ if (cards && cards[PAGECODE.cardbody]) {
+ this.props.cardTable.setTableData(PAGECODE.cardbody, cards[PAGECODE.cardbody]);
+ }
+ // 费用项
+ if (cards && cards[PAGECODE.card_fee]) {
+ this.props.cardTable.setTableData(PAGECODE.card_fee, cards[PAGECODE.card_fee]);
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] });
+ }
+ // 费用明细
+ if (data && data.grandSons[PAGECODE.card_fee_detail]) {
+ this.props.cardTable.setTableData(
+ PAGECODE.card_fee_detail,
+ data.grandSons[PAGECODE.card_fee_detail]
+ );
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] });
+ }
+ let flag = copy == BUTTON.Copy.toLowerCase() ? BUTTON.Copy : STATUS.browse;
+ this.props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+ buttonController.togglePageShow.call(this, this.props, flag);
+ showSagaErrorToasts(props, PAGECODE.cardhead, FIELD.pk_order);
+ if (copy == BUTTON.Copy.toLowerCase()) {
+ copyAddBtn.call(this);
+ }
+ }
+ },
+ error: (res) => {
+ props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ buttonController.showEmptyBrowsePage.call(this);
+ }
+ });
+ } else {
+ props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //费用项
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //费用明细
+ buttonController.togglePageShow.call(this, this.props);
+ }
+ if (isshow != false) {
+ showSuccessInfo(getLangByResId(this, '4004POORDER-000096')); /* 国际化处理: 刷新成功!*/
+ }
+}
+
+/*sN/zrFvZt8g5czcCIAOaEstj3pV/lf4H4VmIkwFjf9s=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/requestCheckData.js b/src/pu/pu/poorder/card/btnClicks/requestCheckData.js
new file mode 100644
index 0000000..970bc91
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/requestCheckData.js
@@ -0,0 +1,29 @@
+/*oXQr1XIeTuZXW9CzNlWbHmoanzfqtx0WIpezemTsj4U=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 判断模块是否启用
+ * @Date: 2018-09-11 14:46:54
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-12-07 11:27:49
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+import { showWarningInfo, showErrorDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function requestCheckData(data, content, callBack) {
+ ajax({
+ url: URL.sysinitgroup,
+ data: [ data ],
+ method: 'post',
+ success: (res) => {
+ if (res && res.data && res.data[data]) {
+ callBack && callBack();
+ } else {
+ showErrorDialog(null, content); /* 国际化处理: 合同模块未启用!*/
+ }
+ }
+ });
+}
+
+/*oXQr1XIeTuZXW9CzNlWbHmoanzfqtx0WIpezemTsj4U=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/salesQuery.js b/src/pu/pu/poorder/card/btnClicks/salesQuery.js
new file mode 100644
index 0000000..96e79ad
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/salesQuery.js
@@ -0,0 +1,69 @@
+/*9da0iDMkq6QSALLf5w3U+Fesfc+u6ZRE3pS8wOQMzfM=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 销量查询
+ * @Date: 2019-04-09 14:32:01
+ * @Last Modified by: zhaochyu
+ * @Last Modified time: 2019-04-12 10:53:28
+ */
+import { toast, ajax } from 'nc-lightapp-front';
+import { PAGECODE, SALESQUERY, URL } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+export default function salesQuery(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let rowparam = [];
+ selectedRow.map((item) => {
+ if (item.data.values.pk_material.value) {
+ let data = {
+ pk_org: this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org').value,
+ iqueryday: 7,
+ cunitid: item.data.values.cunitid.value,
+ pk_srcmaterial: item.data.values.pk_srcmaterial.value,
+ pk_material: item.data.values.pk_material.value,
+ matname: item.data.values['pk_material.name'].display,
+ matspec: item.data.values['pk_material.materialspec'].value,
+ mattype: item.data.values['pk_material.materialtype'].value
+ };
+ rowparam.push(data);
+ }
+ });
+ let salesquerydata = {
+ infos: rowparam,
+ advo: rowparam,
+ pagecode: SALESQUERY.PAGECODE
+ };
+ this.setState({
+ salesquerydata: salesquerydata
+ });
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org').value;
+ ajax({
+ url: URL.checkorg,
+ data: { pk_org: pk_org },
+ success: (res) => {
+ let { data } = res;
+ if (data) {
+ if (data.issaleorg == 'false') {
+ this.setState({
+ showSalesQuery: false
+ });
+ showErrorInfo(data.errmess);
+ }
+ if (data.issaleorg == 'true') {
+ this.setState({
+ showSalesQuery: true
+ });
+ }
+ }
+ }
+ });
+}
+
+/*9da0iDMkq6QSALLf5w3U+Fesfc+u6ZRE3pS8wOQMzfM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/saveAndCommit.js b/src/pu/pu/poorder/card/btnClicks/saveAndCommit.js
new file mode 100644
index 0000000..7830af1
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/saveAndCommit.js
@@ -0,0 +1,300 @@
+/*BAghTQDCDj+1ZKHAvfYbzC599qxZsZP49+Rl1zvK43w=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 保存提交
+ * @Date: 2018-04-20 10:11:59
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-16 10:42:36
+ */
+import { ajax, broadcast } from 'nc-lightapp-front';
+import { buttonController } from '../viewController/index';
+import { URL, PAGECODE, FIELD, STATUS, TRANSFER, OrderCache, PUSHCONST } from '../../constance';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+import {
+ getDefData,
+ addCacheData,
+ updateCacheData,
+ setDefData,
+ rewriteTransferSrcBids
+} from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showWarningInfo, showSaveAndCommitInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { creatGrandsonDataForSave } from '../../../pub/utils/grandsonUtils';
+let materialFilterColumn = [
+ 'numberindex', //非元数据字段平台业务字段
+ 'pseudocolumn',
+ 'crowno',
+ 'dbilldate',
+ 'dr',
+ 'pk_org',
+ 'pk_org_v',
+ 'fbuysellflag',
+ 'casscustid',
+ 'btriatradeflag',
+ 'btransclosed',
+ 'bstockclose',
+ 'breceiveplan',
+ 'bpayclose',
+ 'blargess',
+ 'binvoiceclose',
+ 'bborrowpur',
+ 'barriveclose',
+ 'nitemdiscountrate'
+];
+let paymentFilterColumn = [ 'isdeposit', 'numberindex', 'prepayment', 'pseudocolumn', 'showorder' ];
+let tableId = PAGECODE.cardbody; //body
+let _this;
+
+export default function saveAndCommit(skipCodes, assign) {
+ if (this) {
+ _this = this;
+ }
+ let props = _this.props;
+ props.cardTable.filterEmptyRows(PAGECODE.head_payment, paymentFilterColumn);
+ //暂存保存
+ let tempsave = getDefData(OrderCache.OrderCardCache, 'tempsave');
+ // 物料表体必须这么过滤,以为当数据来源为采购合同时物料可以为空,此时提示输入物料,而不能直接过滤掉
+ // props.cardTable.filterEmptyRows(PAGECODE.cardbody, materialFilterColumn);
+ // 只有物料和来源信息同时为空,才认为是空行,来源为采购合同时物料可以为空,此时提示输入物料,而不能直接过滤掉 NCC-157475
+ props.cardTable.filterEmptyRows(PAGECODE.cardbody, [ 'csourceid', 'pk_material' ], 'include');
+ props.cardTable.filterEmptyRows(PAGECODE.card_fee, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ props.cardTable.filterEmptyRows(PAGECODE.card_fee_detail, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ if (!props.cardTable.getAllRows(tableId).length) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000128')); /* 国际化处理: 表体为空*/
+ return;
+ }
+ let flag = props.validatePageToToast([
+ {
+ // creteForm 使用的areaCode
+ name: [ PAGECODE.cardhead ],
+ type: 'form'
+ },
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: PAGECODE.cardbody,
+ type: 'cardTable'
+ }
+ ]);
+ if (!flag.allPassed) {
+ return;
+ }
+ if (props.cardTable.getAllRows(PAGECODE.head_payment).length > 0) {
+ let tablepay = props.validatePageToToast([
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: PAGECODE.head_payment,
+ type: 'cardTable'
+ }
+ ]); //表格必输项校验
+ if (!tablepay.allPassed) {
+ return;
+ }
+ }
+ // let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment ];
+ let bodyids = {
+ card_material: FIELD.pk_order,
+ card_payment: FIELD.pk_payterm,
+ card_fee: FIELD.pk_order_f
+ };
+ //创建保存的聚合VO createExtCardDataSimple
+ // let data = props.createExtCardDataSimple(PAGECODE.cardcode, PAGECODE.cardhead, bodyids);
+ let data = creatGrandsonDataForSave(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ PAGECODE.card_fee_detail,
+ true,
+ FIELD.pk_order_bf
+ );
+ //判断页面状态是新增还是编辑
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ let rows = data.bodys[PAGECODE.cardbody].rows;
+ rows.forEach((row, index) => {
+ if (row.values && row.values.pseudocolumn) {
+ row.values.pseudocolumn.value = index + '';
+ }
+ });
+ let isAdd = true; //是否新增,缓存使用
+ if (pk_order && !tempsave) {
+ isAdd = false;
+ } else {
+ // 新增保存设置为2
+ data.head.card_head.rows[0].status = '2';
+ }
+ if (skipCodes) {
+ data['skipCodes'] = skipCodes;
+ }
+ skipCodes = skipCodes ? skipCodes : new Array();
+ if (assign) {
+ data['assign'] = JSON.stringify(assign);
+ }
+ //公式
+ props.validateToSave(data, () => {
+ ajax({
+ method: 'post',
+ url: URL.saveandcommit,
+ data: data,
+ success: function(res) {
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ _this.skipCodes = data['skipCodes'];
+ _this.setState({
+ compositedata: res.data,
+ compositedisplay: true,
+ saveAndCommit: true
+ });
+ return;
+ }
+ // 卡片界面,在浏览态时勾选行,点修改后去掉勾选,付款协议和物料
+ props.cardTable.selectAllRows(PAGECODE.head_payment, false);
+ props.cardTable.selectAllRows(PAGECODE.cardbody, false);
+
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ //参数一:返回的公式对象
+ props.dealFormulamsg(res.formulamsg);
+ }
+ // 交互式异常处理
+ if (res.data && res.data.isResume && res.data.isResume == true) {
+ showResumeModal.call(
+ _this,
+ props,
+ 'MessageDlg',
+ skipCodes,
+ res.data,
+ saveAndCommit.bind(_this, skipCodes, assign),
+ props
+ );
+ return;
+ }
+ if (res.data) {
+ //开关开始
+ props.beforeUpdatePage();
+ //暂存成功后复位false
+ setDefData(OrderCache.OrderCardCache, 'tempsave', false);
+ let datas = res.data;
+ let map = new Map();
+ map.set('pk_payment', PAGECODE.head_payment);
+ map.set('pk_order_b', PAGECODE.cardbody);
+ map.set('pk_order_f', PAGECODE.card_fee);
+ let config = {
+ headAreaId: PAGECODE.cardhead,
+ bodyIdAndPkMap: map,
+ isHaveRowid: true
+ };
+ datas = updateExtBillDataForCompareByPk(_this.props, datas, config);
+ // 处理费用明细
+ if (res.data.grandSons[PAGECODE.card_fee_detail]) {
+ let card_mater = props.cardTable.updateDataByRowId(
+ PAGECODE.card_fee_detail,
+ res.data.grandSons[PAGECODE.card_fee_detail],
+ true
+ );
+ card_mater.areacode = PAGECODE.card_fee_detail;
+ res.data.grandSons[PAGECODE.card_fee_detail] = card_mater;
+ }
+ datas.head[PAGECODE.cardhead].rows = props.form.getAllFormValue(PAGECODE.cardhead).rows;
+ let pkCache = pk_order;
+ if (isAdd) {
+ pkCache = datas.head.card_head.rows[0].values.pk_order.value;
+ }
+ props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+ //开关关闭
+ props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ let transfer = props.getUrlParam(TRANSFER.transfer);
+ let channelType = props.getUrlParam(TRANSFER.channelType);
+ if (transfer || channelType) {
+ if (channelType) {
+ // 推单回写
+ pushSaveWriteBack.call(this, res, channelType);
+ } else {
+ // 下游单据,通过拉单进入编辑态,保存的时候使用
+ // 转单界面,通知上游转单界面处理了哪些来源id
+ //单独处理请购单
+ if (transfer == '20') {
+ //伪列处理
+ let bids = getDefData(OrderCache.OrderTransferCache, '20to21bids');
+ props.transferTable.setSavedTransferTableDataPk(bids);
+ }
+ rewriteTransferSrcBids(props, 'csourcebid', datas.bodys[PAGECODE.cardbody].rows);
+ }
+ // 转单编辑界面保存
+ let DS_KEY = OrderCache.OrderCacheKey;
+ //转单--多单编辑情况要注意保存提交进入就不走缓存
+ let datass = {};
+ datass.head = res.data.head;
+ datass.body = res.data.bodys;
+ datass.pageid = res.data.pageid;
+ let cachedata = datass;
+ props.setUrlParam({ status: 'browse' });
+ props.transferTable.setTransformFormStatus('leftarea', {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = 'browse';
+ }
+ });
+ refreshcache(props, isAdd, cachedata, pkCache, DS_KEY);
+ } else {
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ props.setUrlParam({ status: 'browse' });
+ if (scene == null || scene == 'ADD' || scene == 'linksce' || scene == 'workbench') {
+ //应用场景
+ props.setUrlParam({ id: pkCache });
+ refreshcache(props, isAdd, datas, pkCache, OrderCache.OrderCacheKey);
+ }
+ }
+ }
+ if (res.success) {
+ _this.skipCodes = [];
+ buttonController.materialPasteCancel.call(_this, props);
+ buttonController.togglePageShow.call(_this, props, props.getUrlParam(TRANSFER.transfer));
+ showSaveAndCommitInfo(); /* 国际化处理: 保存提交成功*/
+ }
+ }
+ });
+ });
+}
+
+function refreshcache(props, isAdd, cachedata, pkCache, DS_KEY) {
+ if (isAdd) {
+ addCacheData(props, FIELD.pk_order, pkCache, cachedata, PAGECODE.cardhead, DS_KEY);
+ // 更新翻页组件当前pk值
+ props.cardPagination.setCardPaginationId({ id: pkCache, status: 1 });
+ } else {
+ updateCacheData(props, FIELD.pk_order, pkCache, cachedata, PAGECODE.cardhead, DS_KEY);
+ }
+}
+
+/**
+ * 推单回写
+ * @param {*} res
+ */
+function pushSaveWriteBack(res, channelType) {
+ let srcbids = [];
+ res.data.bodys[PAGECODE.cardbody].rows.forEach((row) => {
+ srcbids.push(row.values.csourcebid.value);
+ });
+ let data = {
+ srcbids: srcbids,
+ ts: new Date()
+ };
+ let key;
+ if (channelType == TRANSFER.replenishmentarrange) {
+ // 补货
+ key = PUSHCONST.replenishmentArrangeIds;
+ } else if (channelType == TRANSFER.directarrange) {
+ // 直运
+ key = PUSHCONST.directArrangeIds;
+ } else if (channelType == TRANSFER.priceaudit) {
+ // 价格审批单
+ key = PUSHCONST.pushId;
+ }
+ broadcast.broadcast(key, data);
+}
+
+/*BAghTQDCDj+1ZKHAvfYbzC599qxZsZP49+Rl1zvK43w=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/saveButton.js b/src/pu/pu/poorder/card/btnClicks/saveButton.js
new file mode 100644
index 0000000..9300c56
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/saveButton.js
@@ -0,0 +1,309 @@
+/*qx4laBTLfLnQEEUBY8FVZL5i80r/AAsBvCNp1/DGkq0=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-04-20 10:11:59
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2023-11-04 15:30:47
+ */
+import { ajax, broadcast } from 'nc-lightapp-front';
+import { buttonController } from '../viewController/index';
+import { URL, PAGECODE, FIELD, STATUS, TRANSFER, OrderCache, PUSHCONST } from '../../constance';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+import {
+ getDefData,
+ addCacheData,
+ updateCacheData,
+ setDefData,
+ rewriteTransferSrcBids
+} from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo, showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { creatGrandsonDataForSave } from '../../../pub/utils/grandsonUtils';
+
+let _this;
+let materialFilterColumn = [
+ 'numberindex', //非元数据字段平台业务字段
+ 'pseudocolumn',
+ 'crowno',
+ 'dbilldate',
+ 'dr',
+ 'pk_org',
+ 'pk_org_v',
+ 'fbuysellflag',
+ 'casscustid',
+ 'btriatradeflag',
+ 'btransclosed',
+ 'bstockclose',
+ 'breceiveplan',
+ 'bpayclose',
+ 'blargess',
+ 'binvoiceclose',
+ 'bborrowpur',
+ 'barriveclose',
+ 'nitemdiscountrate'
+];
+let paymentFilterColumn = [ 'isdeposit', 'numberindex', 'prepayment', 'pseudocolumn', 'showorder' ];
+let tableId = PAGECODE.cardbody; //body
+export default function saveButton(props, skipCodes, callback) {
+ if (this) {
+ _this = this;
+ }
+ props.cardTable.filterEmptyRows(PAGECODE.head_payment, paymentFilterColumn);
+ //暂存保存
+ let tempsave = getDefData(OrderCache.OrderCardCache, 'tempsave');
+ // 物料表体必须这么过滤,以为当数据来源为采购合同时物料可以为空,此时提示输入物料,而不能直接过滤掉
+ // props.cardTable.filterEmptyRows(PAGECODE.cardbody, materialFilterColumn);
+ // 只有物料和来源信息同时为空,才认为是空行,来源为采购合同时物料可以为空,此时提示输入物料,而不能直接过滤掉 NCC-157475
+ props.cardTable.filterEmptyRows(PAGECODE.cardbody, [ 'csourceid', 'pk_material' ], 'include');
+ props.cardTable.filterEmptyRows(PAGECODE.card_fee, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ props.cardTable.filterEmptyRows(PAGECODE.card_fee_detail, [ 'cfeematerialvid', 'cfeesuppliervid' ], 'include');
+ if (!props.cardTable.getAllRows(tableId).length) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000128')); /* 国际化处理: 表体为空*/
+ return;
+ }
+ let flag = props.validatePageToToast([
+ {
+ // creteForm 使用的areaCode
+ name: [ PAGECODE.cardhead ],
+ type: 'form'
+ },
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: PAGECODE.cardbody,
+ type: 'cardTable'
+ }
+ ]);
+ if (!flag.allPassed) {
+ return;
+ }
+ if (props.cardTable.getAllRows(PAGECODE.head_payment).length > 0) {
+ let tablepay = props.validatePageToToast([
+ {
+ // createCardTable的areaCode,多页签区域填主表就行
+ name: PAGECODE.head_payment,
+ type: 'cardTable'
+ }
+ ]); //表格必输项校验
+ if (!tablepay.allPassed) {
+ return;
+ }
+ }
+ // let bodyids = [ PAGECODE.cardbody, PAGECODE.head_payment, PAGECODE.card_fee ];
+ let bodyids = {
+ card_material: FIELD.pk_order,
+ card_payment: FIELD.pk_payment,
+ card_fee: FIELD.pk_order_f
+ };
+ //创建保存的聚合VO createExtCardDataSimple
+ // let data = props.createExtCardDataSimple(PAGECODE.cardcode, PAGECODE.cardhead, bodyids);
+ let data = creatGrandsonDataForSave(
+ props,
+ PAGECODE.cardcode,
+ PAGECODE.cardhead,
+ bodyids,
+ PAGECODE.card_fee_detail,
+ true,
+ FIELD.pk_order_bf
+ );
+ //判断页面状态是新增还是编辑
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value;
+ pk_order = pk_order == '' || pk_order == 'undefined' || pk_order == 'null' ? null : pk_order;
+ let rows = data.bodys[PAGECODE.cardbody].rows;
+ rows.forEach((row, index) => {
+ if (row.values && row.values.pseudocolumn) {
+ row.values.pseudocolumn.value = index + '';
+ }
+ });
+ let isAdd = true; //是否新增,缓存使用
+ if (pk_order && !tempsave) {
+ isAdd = false;
+ } else {
+ // 新增保存设置为2,包含新增后直接点暂存
+ data.head.card_head.rows[0].status = '2';
+ }
+ if (skipCodes) {
+ data['skipCodes'] = skipCodes;
+ }
+ skipCodes = skipCodes ? skipCodes : new Array();
+ //公式
+ props.validateToSave(data, () => {
+ ajax({
+ method: 'post',
+ url: URL.save,
+ data: data,
+ success: function(res) {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ //参数一:返回的公式对象
+ props.dealFormulamsg(res.formulamsg);
+ }
+ // 交互式异常处理
+ if (res.data && res.data.isResume && res.data.isResume == true) {
+ showResumeModal.call(
+ _this,
+ props,
+ 'MessageDlg',
+ skipCodes,
+ res.data,
+ saveButton.bind(this, props, skipCodes, callback),
+ props
+ );
+ return;
+ }
+ if (res.data) {
+ //开关开始
+ props.beforeUpdatePage();
+ // 卡片界面,在浏览态时勾选行,点修改后去掉勾选,付款协议和物料
+ props.cardTable.selectAllRows(PAGECODE.head_payment, false);
+ props.cardTable.selectAllRows(PAGECODE.cardbody, false);
+ // 恢复粘贴行取消状态
+ buttonController.materialPasteCancel.call(_this, props);
+ //暂存成功后复位false
+ setDefData(OrderCache.OrderCardCache, 'tempsave', false);
+ let datas = res.data;
+ let pkCache = datas.head.card_head.rows[0].values.pk_order.value;
+ if (datas.head) {
+ props.form.setAllFormValue({
+ [PAGECODE.cardhead]: datas.head[PAGECODE.cardhead]
+ });
+ }
+ let cards = datas.bodys;
+ if (cards && cards[PAGECODE.head_payment]) {
+ let card_pay = props.cardTable.updateDataByRowId(
+ PAGECODE.head_payment,
+ cards[PAGECODE.head_payment],
+ true
+ );
+ card_pay.areacode = PAGECODE.head_payment;
+ res.data.bodys[PAGECODE.head_payment] = card_pay;
+ }
+ if (cards && cards[PAGECODE.cardbody]) {
+ let card_mater = props.cardTable.updateDataByRowId(
+ PAGECODE.cardbody,
+ cards[PAGECODE.cardbody],
+ true
+ );
+ card_mater.areacode = PAGECODE.cardbody;
+ res.data.bodys[PAGECODE.cardbody] = card_mater;
+ }
+ if (cards && cards[PAGECODE.card_fee]) {
+ let card_f = props.cardTable.updateDataByRowId(
+ PAGECODE.card_fee,
+ cards[PAGECODE.card_fee],
+ true
+ );
+ card_f.areacode = PAGECODE.card_fee;
+ res.data.bodys[PAGECODE.card_fee] = card_f;
+ }
+ // 处理费用明细
+ if (res.data.grandSons[PAGECODE.card_fee_detail]) {
+ let card_fee_d = props.cardTable.updateDataByRowId(
+ PAGECODE.card_fee_detail,
+ res.data.grandSons[PAGECODE.card_fee_detail],
+ true
+ );
+ card_fee_d.areacode = PAGECODE.card_fee_detail;
+ res.data.grandSons[PAGECODE.card_fee_detail] = card_fee_d;
+ }
+ props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+
+ //开关关闭
+ props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ let transfer = props.getUrlParam(TRANSFER.transfer);
+ let channelType = props.getUrlParam(TRANSFER.channelType);
+ if (transfer || channelType) {
+ if (channelType) {
+ // 推单回写
+ pushSaveWriteBack.call(this, res, channelType);
+ } else {
+ if (transfer == '20') {
+ //单独处理请购单 伪列处理
+ let bids = getDefData(OrderCache.OrderTransferCache, '20to21bids');
+ props.transferTable.setSavedTransferTableDataPk(bids);
+ }
+ rewriteTransferSrcBids(props, 'csourcebid', datas.bodys[PAGECODE.cardbody].rows);
+ }
+ // 转单编辑界面保存
+ let DS_KEY = OrderCache.OrderCacheKey;
+ //转单--多单编辑情况要注意保存提交进入就不走缓存
+ let datass = {};
+ datass.head = res.data.head;
+ datass.body = res.data.bodys;
+ datass.pageid = res.data.pageid;
+ let cachedata = datass;
+ if (callback == null) {
+ props.setUrlParam({ status: STATUS.browse });
+ props.transferTable.setTransformFormStatus('leftarea', {
+ status: true,
+ onChange: (current, next, currentIndex) => {
+ _this.indexstatus[currentIndex] = STATUS.browse;
+ cachedata = props.transferTable.updateTransferListValueByIndex(
+ 'leftarea',
+ datass,
+ currentIndex
+ );
+ }
+ });
+ }
+ refreshcache(props, isAdd, cachedata, pkCache, DS_KEY);
+ } else {
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ props.setUrlParam({ status: STATUS.browse });
+ if (scene == null || scene == 'ADD' || scene == 'linksce' || scene == 'workbench') {
+ //应用场景
+ props.setUrlParam({ id: pkCache });
+ refreshcache(props, isAdd, datas, pkCache, OrderCache.OrderCacheKey);
+ }
+ }
+ }
+ if (res.success) {
+ buttonController.togglePageShow.call(_this, props, props.getUrlParam(TRANSFER.transfer));
+ //2018-11-1;需求(刘兰娇、王丽平)再次变更保存提交给两个提示
+ showSuccessInfo(getLangByResId(_this, '4004POORDER-000005')); /* 国际化处理: 保存成功!*/
+ if (callback) {
+ callback.call(this, skipCodes);
+ }
+ }
+ }
+ });
+ });
+}
+
+function refreshcache(props, isAdd, cachedata, pkCache, DS_KEY) {
+ if (isAdd) {
+ addCacheData(props, FIELD.pk_order, pkCache, cachedata, PAGECODE.cardhead, DS_KEY);
+ // 更新翻页组件当前pk值
+ props.cardPagination.setCardPaginationId({ id: pkCache, status: 1 });
+ } else {
+ updateCacheData(props, FIELD.pk_order, pkCache, cachedata, PAGECODE.cardhead, DS_KEY);
+ }
+}
+
+/**
+ * 推单回写
+ * @param {*} res
+ */
+function pushSaveWriteBack(res, channelType) {
+ let srcbids = [];
+ res.data.bodys[PAGECODE.cardbody].rows.forEach((row) => {
+ srcbids.push(row.values.csourcebid.value);
+ });
+ let data = {
+ srcbids: srcbids,
+ ts: new Date()
+ };
+ let key;
+ if (channelType == TRANSFER.replenishmentarrange) {
+ // 补货
+ key = PUSHCONST.replenishmentArrangeIds;
+ } else if (channelType == TRANSFER.directarrange) {
+ // 直运
+ key = PUSHCONST.directArrangeIds;
+ } else if (channelType == TRANSFER.priceaudit) {
+ // 价格审批单
+ key = PUSHCONST.pushId;
+ }
+ broadcast.broadcast(key, data);
+}
+
+/*qx4laBTLfLnQEEUBY8FVZL5i80r/AAsBvCNp1/DGkq0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/savecommit.js b/src/pu/pu/poorder/card/btnClicks/savecommit.js
new file mode 100644
index 0000000..70c43d9
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/savecommit.js
@@ -0,0 +1,20 @@
+/*M30+rAPpk/z648m+4mh43OPO74CynGZ1Z6lKhThn8+g=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片保存提交
+ * @Date: 2018-07-20 22:39:39
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-12 20:43:56
+ */
+import { saveBtnClick, commit } from './index';
+import { URL, PAGECODE, FIELD, STATUS, TRANSFER, OrderCache } from '../../constance';
+
+export default function savecommit(skipCodes) {
+ saveBtnClick.call(this, this.props, skipCodes, () => {
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ let channelType = this.props.getUrlParam(TRANSFER.channelType);
+ commit.call(this, this.props, null, null, 'Tran_S_C');
+ });
+}
+
+/*M30+rAPpk/z648m+4mh43OPO74CynGZ1Z6lKhThn8+g=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/setPieceBtnClick.js b/src/pu/pu/poorder/card/btnClicks/setPieceBtnClick.js
new file mode 100644
index 0000000..1946e85
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/setPieceBtnClick.js
@@ -0,0 +1,34 @@
+/*MJcV5g1bYVOVo9i1P/yXs/CEcx1ibil+TfWKYbNdxHI=*/
+/*
+ * @Author: 李浩
+ * @PageInfo:按钮处理方法
+ * @Date: 2018-04-19 10:33:09
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2023-04-25 17:16:16
+ */
+
+import { ajax, toast } from 'nc-lightapp-front';
+import { AREA, PAGECODE, URL } from '../../constance';
+
+export default function setPieceBtnClick(props, record, index) {
+ // 拼接主子表json方法,参数分别为:pageid(模板id),form区id,table区id,调用此方法即可自动拼接向后台传的json(data)
+ let cmaterialoids = [ record.values.pk_srcmaterial.value ];
+ let pk_corp = record.values.pk_arrvstoorg.value;
+ let data = {
+ cmaterialoids: cmaterialoids,
+ pk_corp: pk_corp
+ };
+
+ ajax({
+ url: URL.generalSetpiece,
+ data: data,
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ this.setState({ showSetPiece: true, setPieceData: data });
+ }
+ }
+ });
+}
+
+/*MJcV5g1bYVOVo9i1P/yXs/CEcx1ibil+TfWKYbNdxHI=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/stockQuery.js b/src/pu/pu/poorder/card/btnClicks/stockQuery.js
new file mode 100644
index 0000000..df3e699
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/stockQuery.js
@@ -0,0 +1,53 @@
+/*vgQC/rcyAzmF363iWlQVcKEOoUtRglO4384p2xNteT4=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 存量查询
+ * @Date: 2018-06-27 13:13:14
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-10-11 14:41:29
+ */
+import { toast } from 'nc-lightapp-front';
+import { PAGECODE, STOCKQUERY } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function stockQuery(props) {
+ let selectedRow = this.props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let rowparam = [];
+ let dplanarrvdate;
+ selectedRow.map((item) => {
+ if (item.data.values.pk_material.value && item.data.values.pk_arrvstoorg.value) {
+ if (item.data.values.dplanarrvdate.value == '') {
+ dplanarrvdate = null;
+ } else {
+ dplanarrvdate = item.data.values.dplanarrvdate.value;
+ }
+ let data = {
+ pk_stockorgs: item.data.values.pk_arrvstoorg.value,
+ crowno: item.data.values.crowno.value,
+ cunitid: item.data.values.cunitid.value,
+ pk_material: item.data.values.pk_srcmaterial.value,
+ materialCode: item.data.values.pk_material.display,
+ materialName: item.data.values['pk_material.name'].display,
+ end_date: dplanarrvdate
+ };
+ rowparam.push(data);
+ }
+ });
+ let stockquerydata = {
+ infos: rowparam,
+ pagecode: STOCKQUERY.PAGECODE
+ };
+ this.setState({
+ showStockQuery: true,
+ stockquerydata: stockquerydata
+ });
+}
+
+/*vgQC/rcyAzmF363iWlQVcKEOoUtRglO4384p2xNteT4=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/supplierApQuery.js b/src/pu/pu/poorder/card/btnClicks/supplierApQuery.js
new file mode 100644
index 0000000..90d29cd
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/supplierApQuery.js
@@ -0,0 +1,36 @@
+/*nVFn6YUHQwqiQafSnDu34zk1qUwzdUFu5nGD4lLaf+A=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 供应商应付
+ * @Date: 2019-04-16 14:48:18
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2021-02-21 14:41:59
+ */
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { PAGECODE, SUPPLIERAP } from '../../constance';
+export default function grossProfitQuery(props) {
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org').value;
+ let pk_supplier = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_supplier').value;
+ if (!pk_org) {
+ showWarningInfo(getLangByResId(this, '4004POORDER-000135')); /** 请选择采购组织! */
+ return;
+ }
+ if (!pk_supplier) {
+ showWarningInfo(getLangByResId(this, '4004POORDER-000136')); /** 请选择供应商! */
+ return;
+ }
+ let supplierapdata = {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier,
+ pagecode: SUPPLIERAP.PAGECODE
+ };
+ if (pk_org != null && pk_supplier != null) {
+ this.setState({
+ showSupplierApQuery: true,
+ supplierapdata: supplierapdata
+ });
+ }
+}
+
+/*nVFn6YUHQwqiQafSnDu34zk1qUwzdUFu5nGD4lLaf+A=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/supplmentaryinfoBtnClick.js b/src/pu/pu/poorder/card/btnClicks/supplmentaryinfoBtnClick.js
new file mode 100644
index 0000000..81f1ed1
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/supplmentaryinfoBtnClick.js
@@ -0,0 +1,70 @@
+/*vGl+48YLNCktNlsxql/XYkKsxF1rO8jJyzRXsmItAT5l4hGcRjZJnxXjyZjT1Siq*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo:侧拉显示当前存量和价格
+ * @Date: 2019-05-16 14:09:55
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2021-01-18 16:51:26
+ */
+import { PAGECODE } from '../../constance';
+export default function supplementaryinfo(props, record, index) {
+ let data = null;
+ let querypricedata = null;
+ let supplementCunit = null;
+ if (!record || !record.values.pk_srcmaterial || !record.values.pk_srcmaterial.value) {
+ this.setState({
+ showSupplementinfo: true,
+ supplementinfoData: null
+ });
+ return;
+ }
+ data = {
+ pk_group: record.values.pk_group.value,
+ pk_org: record.values.pk_org.value,
+ // 如果是空字符串传到后台会日期转换报错
+ dplandate: record.values.dplanarrvdate.value ? record.values.dplanarrvdate.value : null,
+ cmaterialoid: record.values.pk_srcmaterial.value,
+ cwarehouseid: record.values.pk_recvstordoc.value,
+ vbatchcode: record.values.vbatchcode.value,
+ vfree1: record.values.vfree1.value,
+ vfree2: record.values.vfree2.value,
+ vfree3: record.values.vfree3.value,
+ vfree4: record.values.vfree4.value,
+ vfree5: record.values.vfree5.value,
+ vfree6: record.values.vfree6.value,
+ vfree7: record.values.vfree7.value,
+ vfree8: record.values.vfree8.value,
+ vfree9: record.values.vfree9.value,
+ vfree10: record.values.vfree10.value,
+ cprojectid: record.values.cprojectid.value,
+ cproductorid: record.values.cproductorid.value,
+ casscustid: record.values.casscustid.value,
+ cvendorid: record.values.pk_supplier.value
+ };
+ querypricedata = {
+ pk_org: this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_org').value,
+ corigcurrencyid: this.props.form.getFormItemsValue(PAGECODE.cardhead, 'corigcurrencyid').value,
+ pk_supplier: this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_supplier').value,
+ dbilldate: this.props.form.getFormItemsValue(PAGECODE.cardhead, 'dbilldate').value,
+ pk_transporttype: this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_transporttype').value,
+ pk_material: record.values.pk_material.value,
+ cdevareaid: record.values.cdevareaid.value,
+ crowno: record.values.crowno.value,
+ cproductorid: record.values.cproductorid.value,
+ cqualitylevelid: record.values.cqualitylevelid.value,
+ pk_srcmaterial: record.values.pk_srcmaterial.value,
+ pk_psfinanceorg: record.values.pk_psfinanceorg.value,
+ ccontractrowid: record.values.ccontractrowid.value,
+ csourcetypecode: record.values.csourcetypecode.value,
+ csourcebid: record.values.csourcebid.value,
+ castunitid: record.values.castunitid.value
+ };
+ supplementCunit = record.values.castunitid.display;
+ this.setState({
+ showSupplementinfo: true,
+ supplementinfoData: { atosuppdto: data, querypricedata: querypricedata },
+ supplementCunit: supplementCunit
+ });
+}
+
+/*vGl+48YLNCktNlsxql/XYkKsxF1rO8jJyzRXsmItAT5l4hGcRjZJnxXjyZjT1Siq*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/tempStorageBtnClick.js b/src/pu/pu/poorder/card/btnClicks/tempStorageBtnClick.js
new file mode 100644
index 0000000..30b6108
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/tempStorageBtnClick.js
@@ -0,0 +1,36 @@
+/*HNMCc1joYd2y+PzAFeGZrrZfmv2aSXDzE0sbXaWZniU=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 暂存
+ * @Date: 2019-05-08 11:03:36
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2022-06-07 16:10:06
+ */
+import { ACTIONS } from 'scmpub/scmpub/components/TempSave';
+import { getDefData, setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { PAGECODE, STATUS, OrderCache, FIELD } from '../../constance';
+export default function temporaryStorage(props) {
+ let config = {
+ pagecode: PAGECODE.cardcode,
+ formId: PAGECODE.cardhead,
+ tableId: [ PAGECODE.cardbody, PAGECODE.head_payment ],
+ type: 'card',
+ param: FIELD.pk_material,
+ area: PAGECODE.cardbody
+ };
+ setDefData(OrderCache.OrderCardCache, 'tempsave', true);
+ ACTIONS.SAVE.call(this, props, config, checkTempSave.bind(this));
+}
+function checkTempSave() {
+ let status = this.props.getUrlParam(STATUS.tempstatus);
+ let add = getDefData(OrderCache.OrderCardCache, 'scene');
+ if (status == undefined && add == undefined) {
+ return true;
+ }
+ if (status == STATUS.add || add == 'ADD') {
+ return true;
+ }
+ return false;
+}
+
+/*HNMCc1joYd2y+PzAFeGZrrZfmv2aSXDzE0sbXaWZniU=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/transportstatusquery.js b/src/pu/pu/poorder/card/btnClicks/transportstatusquery.js
new file mode 100644
index 0000000..1be721b
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/transportstatusquery.js
@@ -0,0 +1,35 @@
+/*ofp6tqzx0oKglvIairZx4/k4YXknttxzuy+ZEgvwpsw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单运输状态
+ * @Date: 2018-10-09 15:29:05
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-10 15:31:31
+ */
+
+import { URL, PAGECODE, FIELD } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+
+export default function transportstatusquery() {
+ let _this = this;
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ pk_order =
+ pk_order == null || pk_order == '' || pk_order == 'undefined' ? this.props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ let conditionData = {
+ pks: [ pk_order ],
+ pageid: PAGECODE.cardcode
+ };
+ ajax({
+ url: URL.transportstatusquery,
+ data: conditionData,
+ success: (res) => {
+ if (res.success) {
+ _this.setState({ transStateData: res.data, transStateShowFlag: true });
+ }
+ }
+ });
+}
+
+/*ofp6tqzx0oKglvIairZx4/k4YXknttxzuy+ZEgvwpsw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/btnClicks/uncommit.js b/src/pu/pu/poorder/card/btnClicks/uncommit.js
new file mode 100644
index 0000000..5e0e4ef
--- /dev/null
+++ b/src/pu/pu/poorder/card/btnClicks/uncommit.js
@@ -0,0 +1,106 @@
+/*VDo0utFkHv8IrbqntUKDRR8Qu9eyJq4wurh/FuMwIwc=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单收回
+ * @Date: 2018-06-20 18:23:03
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-11-11 16:28:42
+ */
+import { URL, FIELD, PAGECODE, TRANSFER, OrderCache, STATUS } from '../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal';
+import { updateCacheData } from '../../../../../scmpub/scmpub/pub/cache';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo, showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateExtBillDataForCompareByPk } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/compareUtils';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+
+export default function commit() {
+ let _this = this;
+ // 获取选中行
+ let forderstatus = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.forderstatus);
+ // if (forderstatus != FIELD.approve && forderstatus != FIELD.commit) {
+ // toast({
+ // color: 'warning',
+ // content: '请选择审批中或是执行中的数据!'
+ // });
+ // return;
+ // }
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ pk_order = pk_order == null || pk_order == '' || pk_order == 'undefined' ? props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ let ts = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.ts).value;
+ let allrows = this.props.cardTable.getAllRows(PAGECODE.cardbody);
+ let bodys = [];
+ allrows.forEach((row) => {
+ bodys.push({
+ pks: row.values[FIELD.pk_order_b].value,
+ ts: row.values[FIELD.ts].value
+ });
+ });
+ // 执行删除操作
+ let delRows = [];
+ let info = {
+ pks: pk_order,
+ ts: ts,
+ bodys: bodys
+ };
+ delRows.push(info);
+ let templetid = getDefData(OrderCache.OrderCardCache, 'templetid');
+ // 拼装json
+ let data = {
+ closedto: delRows,
+ pagecode: PAGECODE.cardcode,
+ templetid: templetid
+ };
+ // 发送请求
+ ajax({
+ url: URL.uncommit,
+ data: data,
+ success: (res) => {
+ if (res.data.isResume && res.data.isResume == true) {
+ showResumeModal.bind(this)(
+ _this.props,
+ 'ResumeMessageDlg',
+ skipCodes,
+ res.data,
+ saveButton,
+ _this.props
+ );
+ return;
+ } else {
+ if (res.data) {
+ let map = new Map();
+ map.set('pk_payment', PAGECODE.head_payment);
+ map.set('pk_order_b', PAGECODE.cardbody);
+ let config = {
+ headAreaId: PAGECODE.cardhead,
+ bodyIdAndPkMap: map
+ };
+ updateExtBillDataForCompareByPk(_this.props, res.data, config);
+ buttonController.cachedata.call(_this);
+ let datasource = OrderCache.OrderCacheKey;
+ let transfer = _this.props.getUrlParam(TRANSFER.transfer);
+ let channelType = _this.props.getUrlParam(TRANSFER.channelType);
+ if (transfer || channelType) {
+ datasource = OrderCache.OrderTransferCache;
+ }
+ updateCacheData(_this.props, FIELD.pk_order, pk_order, res.data, PAGECODE.cardhead, datasource);
+ _this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+ }
+ }
+ setTimeout(() => {
+ buttonController.togglePageShow.call(_this, _this.props, null);
+ }, 0);
+ if (res.success) {
+ showSuccessInfo(getLangByResId(this, '4004POORDER-000052')); /* 国际化处理: 收回成功!*/
+ } else {
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000053')); /* 国际化处理:收回失败!*/
+ }
+ }
+ });
+}
+
+/*VDo0utFkHv8IrbqntUKDRR8Qu9eyJq4wurh/FuMwIwc=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/index.js b/src/pu/pu/poorder/card/index.js
new file mode 100644
index 0000000..d58227d
--- /dev/null
+++ b/src/pu/pu/poorder/card/index.js
@@ -0,0 +1,1472 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片态页面
+ * @Date: 2018-04-19 10:44:54
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-11-29 10:27:47
+ */
+import React, { Component } from 'react';
+import { createPage, high, base, DragLayoutCom } from 'nc-lightapp-front';
+import {
+ pageInfoClick,
+ commit,
+ addBtnClick,
+ saveAndCommit,
+ addFeeDetailBtnClick,
+ onCellKeyDown,
+ onRowClick,
+ refresh
+} from './btnClicks';
+import { batchEvents, batchFeeEvents, batchFeeDetailEvents } from './batchEvents';
+import { relationCT } from './afterEvents';
+import afterEvents from './afterEvents/afterEvents';
+import { beforeEvent } from './beforeEvents';
+import initTemplate from './init/initTemplate';
+import {
+ PAGECODE,
+ BUTTON,
+ STATUS,
+ FIELD,
+ TRANSFER,
+ OrderCache,
+ TRANSFER30TO21COOP,
+ URL,
+ TRANSFERZ2
+} from '../constance';
+import Inspection from 'epmp/exports/components/Inspection';
+import ApproveDetail from 'uap/common/components/ApproveDetail';
+import NCUploader from 'uap/common/components/NCUploader';
+const { BillTrack } = high;
+const { NCAffix, NCDiv, NCModal, NCButton, NCHotKeys, NCTooltip } = base;
+import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import StockQuery from '../atpquery';
+import SetPiece from '../../pub/setPiece';
+import SalesQuery from '../salesquery';
+import GrossProfitQuery from '../grossprofitquery';
+import SupplierApQuery from '../supplierapquery';
+import SupplementaryInfo from './supplementaryinfo';
+import Pricedetail from './pricedetail';
+import ArrivePlan from '../arriveplan';
+import Transfer20Table from '../transfer20';
+import refAddLineComfirmBtnClick from './btnClicks/refAddLineComfirmBtnClick';
+import MergePrinting from 'scmpub/scmpub/components/MergePrinting';
+import ApprovalTrans from 'uap/common/components/approvalTrans';
+import TransportStatusDlg from 'scmpub/scmpub/components/TransportStatus';
+import { getDefData } from '../../../../scmpub/scmpub/pub/cache';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { transtypeUtils } from '../../../../scmpub/scmpub/pub/tool';
+import { buttonClickController, buttonController } from './viewController/index';
+import { showWarningDialog } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getCardDisableHotKeyBtn } from '../../../../scmpub/scmpub/pub/tool/hotKeysUtil.js';
+import { TempDataList } from 'scmpub/scmpub/components/TempSave';
+import inputChange from '../../../../scmpub/scmpub/pub/tool/rownoInputUtil';
+import { createCardTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+import Businessinfo from 'to/to/businessinfo/list';
+import ExcelOutput from 'uap/common/components/ExcelOutput';
+import './index.less';
+import { showWarningInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+class OrderCard extends Component {
+ constructor(props) {
+ super(props);
+ props.use.form(PAGECODE.cardhead);
+ props.use.cardTable(PAGECODE.head_payment);
+ props.use.cardTable(PAGECODE.cardbody);
+ props.use.table(PAGECODE.card_bodyModal);
+ this.curindex = 0;
+ this.combineData; //合并显示
+ this.selCTViews;
+ this.meta;
+ this.skipCodes = [];
+ this.tabKey = PAGECODE.cardbody;
+ this.refsourcdata = ''; //拉单来源数据暂存
+ (this.copyRowDatas = null), // 复制行数据
+ (this.state = {
+ status: this.getPageParam(STATUS.status),
+ forderstatus: '', //单据状态
+ vbillcode: '', //订单编号
+ pk_order: '', //主键
+ showTrack: false, //单据追溯
+ target: null, //弹出上传控件位置
+ showUploader: false, //附件
+ show: false, //审批详情
+ vtrantypecode: null,
+ listdata: '', //转单后编辑数据缓存
+ currentindex: 0, //转单后编辑数据缓存
+ showStockQuery: false, //存量查询
+ showSalesQuery: false, //销量查询
+ showGrossProfitQuery: false, //毛利预估
+ showSupplierApQuery: false, //供应商应付
+ stockquerydata: null, //存量查询参数
+ salesquerydata: null, //销量查询参数
+ grossprofitdata: null, //毛利预估参数
+ supplierapdata: null, //供应商应付参数
+ showConditionModal: false, // 合并显示
+ compositedisplay: false, //提交指派
+ compositedata: null, //提交指派
+ showModal: false, //模态框
+ returnURL: null, //推单
+ appcode: null, //推单
+ returnType: null, //推单
+ transStateShowFlag: false, //运输状态
+ vfrozenreason: null,
+ showSetPiece: false, //是否显示成套件
+ setPieceData: null, //成套件数据
+ showSupplementinfo: false, //是否显示辅助信息
+ supplementinfoData: null, //辅助信息数据
+ supplementCunit: null, //辅助信息图标单位记录
+ tempDataList: [], // 暂存数据
+ showTemp: false,
+ saveAndCommit: false, //是否保存提交
+ showNtbDetail: false, //;联查采购计划
+ ntbdata: null, //联查采购计划数据
+ showBusinessModal: false, // 内部交易信息用,
+ showPricedetail: false, //是否显示价格详情
+ showFeedetail: false, //是否显示费用明细参照增行
+ showSmart: true
+ });
+ this.appcode = ''; // 获取平台返回的appcode,交易类型发布的小应用appcode发生变化
+ this.pk_org = null;
+ this.pk_customer = null;
+ this.pk_supplier = null;
+ this.indexstatus = {}; //多单编辑状态索引
+ this.isFirstTransfer = true; //多单编辑是否第一单
+ this.showDragCom = false;
+ this.click = {};
+ initLang(this, [ '4004poorder', '4004pub' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillMount() {
+ // 关闭浏览器
+ window.addEventListener('beforeunload', this.onMove);
+ }
+
+ componentWillUnmount() {
+ // 组件卸载时移除事件监听, 防止内存泄漏
+ window.removeEventListener('beforeunload', this.onMove);
+ }
+
+ onMove = (event) => {
+ let status = this.props.cardTable.getStatus(PAGECODE.cardbody);
+ if (status == STATUS.edit) {
+ /* 国际化处理: 当前单据未保存,您确认离开此页面?*/
+ event.returnValue = getLangByResId(this, '4004POORDER-000054');
+ }
+ };
+
+ //点击转单缩略图的钩子函数
+ onTransferSelect = (record, status, index) => {
+ let isEdit = status ? STATUS.browse : STATUS.edit;
+ if (this.indexstatus[index]) {
+ if (this.indexstatus[index] == STATUS.browse) {
+ isEdit = STATUS.browse;
+ } else if (this.indexstatus[index] == STATUS.edit) {
+ isEdit = STATUS.edit;
+ }
+ }
+ if (record.head.card_head.rows[0].values.brefwhenreturn.value == false) {
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { ['breturn']: false });
+ } else {
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { ['breturn']: true });
+ }
+ if (record.head.card_head.rows[0].values.breturn.value == false) {
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { ['brefwhenreturn']: false });
+ } else {
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { ['brefwhenreturn']: true });
+ }
+ this.indexstatus[index] = isEdit;
+ this.props.beforeUpdatePage();
+ this.curindex = parseInt(index);
+ let head = record && record.head && record.head[PAGECODE.cardhead];
+ this.props.form.setAllFormValue({ [PAGECODE.cardhead]: head });
+ //拉单初始化数据时调用交易类型默认值设置方法
+ transtypeUtils.setValue.call(this, PAGECODE.cardhead, FIELD.ctrantypeid, FIELD.vtrantypecode);
+ let payment = record && record.body && record.body[PAGECODE.head_payment];
+ payment = payment != null ? payment : { rows: [] };
+ this.props.cardTable.setTableData(PAGECODE.head_payment, payment, null, true, true);
+ this.props.cardTable.setTableData(PAGECODE.cardbody, record.body[PAGECODE.cardbody], null, true, true);
+
+ let fee = record && record.body && record.body[PAGECODE.card_fee];
+ fee = fee != null ? fee : { rows: [] };
+ this.props.cardTable.setTableData(PAGECODE.card_fee, fee, null, true, true);
+ let fee_detail = record && record.body && record.body[PAGECODE.card_fee_detail];
+ fee_detail = fee_detail != null ? fee_detail : { rows: [] };
+ this.props.cardTable.setTableData(PAGECODE.card_fee_detail, fee_detail, null, true, true);
+
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { [FIELD.pk_org_v]: true });
+ this.props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+ buttonController.togglePageShow.call(this, this.props, isEdit);
+ let flagctall = false;
+ if (record.body[PAGECODE.cardbody] && record.body[PAGECODE.cardbody].rows) {
+ record.body[PAGECODE.cardbody].rows;
+ record.body[PAGECODE.cardbody].rows.forEach((row, index) => {
+ if (row.values.ccontractrowid && row.values.ccontractrowid.value) {
+ flagctall = true;
+ }
+ });
+ }
+ if (!this.isFirstTransfer && !flagctall) {
+ // 第一条数据不关联,初始化之前已经关联
+ relationCT.relationCT.call(this, this.props, record);
+ }
+ this.isFirstTransfer = false;
+ };
+ //获取url的参数
+ getPageParam = (key) => {
+ return this.props.getUrlParam(key);
+ };
+ //到货计划关闭事件
+ arrivePlanClose = (status) => {
+ if (status == STATUS.edit) {
+ showWarningDialog(getLangByResId(this, '4004POORDER-000060'), getLangByResId(this, '4004POORDER-000104'), {
+ beSureBtnClick: () => {
+ this.setState({ showModal: false });
+ },
+ cancelBtnClick: () => {
+ this.setState({ showModal: true });
+ }
+ });
+ } else {
+ this.setState({ showModal: false }, () => {
+ // NCC-301125 采购管理-采购订单维护:采购订单维护,维护到货计划后,点击提交提示并发提示
+ refresh.call(this, this.props, null, false);
+ });
+ }
+ };
+
+ // 付款协议按钮
+ getPayMentBtn = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: PAGECODE.head_payment,
+ onButtonClick: buttonClickController.bind(this)
+ })}
+
+ );
+ };
+ //获取物料列表肩部信息
+ getMaterialBtn = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: PAGECODE.cardbody,
+ ignoreHotkeyCode: getCardDisableHotKeyBtn(),
+ onButtonClick: buttonClickController.bind(this)
+ })}
+
+ );
+ };
+
+ //获取物料列表肩部信息
+ getFeeBtn = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: PAGECODE.card_fee,
+ onButtonClick: buttonClickController.bind(this)
+ })}
+
+ );
+ };
+
+ getFeeDetailBtn = () => {
+ return (
+
+ {this.props.button.createButtonApp({
+ area: PAGECODE.card_fee_detail,
+ onButtonClick: buttonClickController.bind(this)
+ })}
+
+ );
+ };
+
+ //页签切换回调函数
+ tabChange = (props, moduleId, key) => {
+ this.tabKey = key;
+ buttonController.tabChange.call(this, props, moduleId, key);
+ };
+ // 审批详情关闭
+ closeApprove = () => {
+ this.setState({ show: false });
+ };
+ // 附件管理关闭
+ onHideUploader = () => {
+ this.setState({ showUploader: false });
+ };
+
+ // 提交指派
+ getAssginUsedr = (value) => {
+ //重新执行提交操作重新执行提交操作
+ if (this.state.saveAndCommit == true) {
+ saveAndCommit.call(this, this.skipCodes, value);
+ } else {
+ commit.call(this, this.props, null, value);
+ }
+ this.setState({ compositedisplay: false, saveAndCommit: false });
+ };
+
+ showBack = () => {
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ scene = scene == '' || scene == 'undefined' ? null : scene;
+ scene = scene == null ? this.props.getUrlParam('scene') : scene;
+ return scene == null;
+ };
+
+ hideTransState = () => {
+ this.setState({ transStateShowFlag: false });
+ };
+
+ getDatasource = (transfer, channelType) => {
+ if (transfer) {
+ return OrderCache.OrderTransferCache;
+ } else if (channelType) {
+ if (channelType == TRANSFER.replenishmentarrange) {
+ return 'scm.so.replenishmentarrange.main';
+ } else if (channelType == TRANSFER.directarrange) {
+ return 'scm.so.directarrange.main';
+ }
+ }
+ };
+
+ //侧拉编辑展开按钮
+ editOpenButton = (props, moduleId, modelIndex, record) => {
+ return (
+
+
+ {this.props.button.createButtonApp({
+ area: 'card_edit',
+ onButtonClick: buttonClickController.bind(
+ this,
+ this.props,
+ 'Pu_Inquirys',
+ null,
+ record,
+ modelIndex
+ )
+ })}
+
+
+ {this.props.button.createButtonApp({
+ area: 'card_edits',
+ onButtonClick: buttonClickController.bind(
+ this,
+ this.props,
+ 'CheckPuInquirys',
+ null,
+ record,
+ modelIndex
+ )
+ })}
+
+
+ );
+ };
+ hidePayTable = () => {
+ return false;
+ };
+
+ /**
+ * 到货计划
+ */
+ createArrivePlan = () => {
+ return this.state.showModal ? (
+
+
{
+ this.arrivePlanClose(status);
+ }}
+ />
+
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 单据追溯
+ */
+ createBillTrack = () => {
+ return this.state.showTrack ? (
+ {
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk_order}
+ type="21"
+ />
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 附件管理
+ */
+ createNCUploader = (newpk) => {
+ return (
+ this.state.showUploader && (
+
+
+
+ )
+ );
+ };
+
+ /**
+ * 审批详情
+ */
+ createApproveDetail = () => {
+ return this.state.show ? (
+
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 供应商应付
+ */
+ createSupplierApQuery = () => {
+ return this.state.showSupplierApQuery ? (
+ {
+ this.setState({ showSupplierApQuery: false });
+ }}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 指派
+ */
+ createApprovalTrans = () => {
+ return (
+
+ {this.state.compositedisplay && (
+
{
+ this.setState({ compositedisplay: false });
+ }}
+ />
+ )}
+
+ );
+ };
+
+ /**
+ * 存量查询
+ */
+ createStockQuery = () => {
+ return this.state.showStockQuery ? (
+ {
+ this.setState({ showStockQuery: false });
+ }}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 销量查询
+ */
+ createSalesQuery = () => {
+ return this.state.salesquerydata ? (
+ {
+ this.setState({ showSalesQuery: false });
+ }}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 毛利预估
+ */
+ createGrossProfitQuery = () => {
+ return this.state.showGrossProfitQuery ? (
+ {
+ this.setState({ showGrossProfitQuery: false });
+ }}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 成套件
+ */
+ createSetPiece = () => {
+ return this.state.showSetPiece ? (
+ {
+ this.setState({ showSetPiece: false });
+ }}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ maskClose = () => {
+ this.setState({ showSupplementinfo: false });
+ };
+
+ maskClosePrice = () => {
+ this.setState({ showPricedetail: false });
+ };
+
+ /**
+ * 辅助信息
+ */
+ createSupplementaryInfo = () => {
+ return (
+ {
+ this.setState({ showSupplementinfo: false });
+ }}
+ />
+ );
+ };
+
+ /**
+ * 价格详情
+ */
+ createPricedetail = () => {
+ return (
+ {
+ this.setState({ showPricedetail: false });
+ }}
+ />
+ );
+ };
+
+ /**
+ * 暂存
+ */
+ creatTempDataList = () => {
+ return this.state.showTemp ? (
+ {
+ this.setState({ showTemp: false });
+ }}
+ clickTemporary={addBtnClick.bind(this)}
+ />
+ ) : (
+ ''
+ );
+ };
+
+ /**
+ * 创建云原生错误异常界面
+ */
+ creatSocketErrorShow = (socket) => {
+ return (
+
+ {socket.connectMesg({
+ headBtnAreaCode: PAGECODE.cardhead, // 表头按钮区域ID
+ formAreaCode: PAGECODE.cardhead, // 表头Form区域ID
+ billpkname: FIELD.pk_order,
+ billtype: PAGECODE.billType,
+ dataSource: OrderCache.OrderCacheKey
+ })}
+
+ );
+ };
+
+ /**
+ * 联查运输状态
+ */
+ createtransport = (NCModal) => {
+ return this.state.transStateShowFlag ? (
+
+
+ {getLangByResId(this, '4004POORDER-000059')}
+ {/* 国际化处理:
+ 运输状态*/}
+
+
+
+
+
+ ) : (
+ ''
+ );
+ };
+ /**
+ * 内部交易信息
+ *
+ */
+ createTransInfo = () => {
+ return (
+
+ {
+ this.setState({ showBusinessModal: false });
+ }}
+ />
+
+ );
+ };
+
+ onFeeClose = () => {
+ this.setState({ showFeedetail: false });
+ };
+
+ createTransferModal = () => {
+ // todo 自动化标记
+ const { createSimpleTable } = this.props.table;
+ return this.state.showFeedetail ? (
+
+
+ {getLangByResId(this, '4004POORDER-000163')}
+
+
+ {createSimpleTable(PAGECODE.card_bodyModal, {
+ showCheck: true,
+ showIndex: true,
+ adaptionHeight: true
+ })}
+
+
+ {
+ addFeeDetailBtnClick.call(this, this.props);
+ }
+ }}
+ // 是否启用组件
+ enabled={true}
+ // 是否为聚焦触发
+ focused={true}
+ // 默认display 可以设置 inline-block 等dispaly属性
+ display="inline-block"
+ >
+
+
+ {getLangByResId(this, '4004POORDER-000164')}
+ (Y)
+
+
+
+
+ {
+ this.onFeeClose.call(this);
+ }
+ }}
+ // 是否启用组件
+ enabled={true}
+ // 是否为聚焦触发
+ focused={true}
+ // 默认display 可以设置 inline-block 等dispaly属性
+ display="inline-block"
+ >
+
+
+ {getLangByResId(this, '4004POORDER-000019')}
+ (N)
+
+
+
+
+
+ ) : (
+ ''
+ );
+ };
+
+ render() {
+ const { cardTable, form, button, modal, cardPagination, transferTable, socket, smartCard } = this.props;
+ const { createCardPagination } = cardPagination;
+ const { createTransferList } = transferTable;
+ const { createCardTable } = cardTable;
+ const { createModal } = modal;
+ const { createForm } = form;
+ const { NCModal } = base;
+ let { createSmartCard } = smartCard;
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ let channelType = this.props.getUrlParam(TRANSFER.channelType);
+ let transferDatasource = this.getDatasource(transfer, channelType);
+ let newpk = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order).value; // 主键
+ const MergePrintingProps = {
+ jsonData: this.combineData,
+ toggleConditionModal: () => {
+ this.setState({ showConditionModal: !this.state.showConditionModal });
+ },
+ showConditionModal: this.state.showConditionModal
+ };
+ let ishideAdd = transfer == TRANSFER30TO21COOP.CSOURCETYPECODE ? true : false;
+ //光标默认聚焦关闭
+ this.props.controlAutoFocus(true);
+ if (transfer || channelType) {
+ return (
+
+ {/* 创建云原生错误异常界面 */}
+ {this.creatSocketErrorShow(socket)}
+
+
+
+ {createCardTitle(this, {
+ billCode: '', //单据号
+ backBtnClick: buttonClickController.bind(this, this.props, BUTTON.Back)
+ })}
+
+ {/* 表头按钮区 */}
+
+ {button.createErrorFlag({
+ headBtnAreaCode: PAGECODE.cardhead
+ })}
+ {button.createButtonApp({
+ area: PAGECODE.cardhead,
+ onButtonClick: buttonClickController.bind(this)
+ })}
+ {/* 到货计划 */}
+ {this.createArrivePlan()}
+ {/* 单据追溯 */}
+ {/* {this.createBillTrack()} */}
+ {
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk_order}
+ type="21"
+ />
+
+
+
+
+
+ {/* 转单 */}
+ {createTransferList({
+ dataSource: transferDatasource,
+ headcode: PAGECODE.cardhead, //表格组件id
+ bodycode: PAGECODE.bodys,
+ transferListId: PAGECODE.leftarea, //转单列表id
+ onTransferItemSelected: (record, status, index) => {
+ this.onTransferSelect(record, status, index);
+ }
+ })}
+
+
+
+ {createForm(PAGECODE.cardhead, {
+ expandArr: [ PAGECODE.cardhead ],
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this)
+ })}
+
+
+
+ {createCardTable(PAGECODE.head_payment, {
+ tableHead: this.getPayMentBtn, //付款协议按钮
+ onBeforeEvent: beforeEvent.bind(this),
+ showIndex: true,
+ hideModelSave: true,
+ hideSwitch: this.hidePayTable,
+ onAfterEvent: afterEvents.bind(this),
+ inputChange: inputChange.bind(this, FIELD.crowno),
+ showSelectedNum: false
+ // adaptionHeight: true
+ // isAddRow: true,
+ // addRowCallback: () => {
+ // RownoUtils.setRowNo(this.props, PAGECODE.head_payment, 'showorder');
+ // }
+ })}
+
+
+ {createCardTable(PAGECODE.cardbody, {
+ multiConfig: {
+ [PAGECODE.cardbody]: {
+ tableHead: this.getMaterialBtn, //订单详情按钮
+ showindex: true,
+ showCheck: true,
+ hideModelSave: true,
+ onSelected: buttonController.metarialSelected.bind(this, this.props),
+ onSelectedAll: buttonController.metarialAllSelected.bind(
+ this,
+ this.props
+ ),
+ onBatchSelected: buttonController.metarialAllSelected.bind(
+ this,
+ this.props
+ ),
+ onTabChange: this.tabChange.bind(this),
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ inputChange: inputChange.bind(this, FIELD.crowno),
+ // allowTotalRows: buttonController.onCheckRows.bind(this, this.props),
+ // isAddRow: true,
+ // addRowCallback: () => {
+ // RownoUtils.setRowNo(this.props, PAGECODE.cardbody, FIELD.crowno);
+ // },
+ adaptionHeight: true,
+ maxZIndex: 210,
+ onRowClick: onRowClick.bind(this),
+ onCellKeyDown: onCellKeyDown.bind(this),
+ modelAddRowBefore: () => {
+ let wbs = this.props.cardTable.getValByKeyAndIndex(
+ PAGECODE.cardbody,
+ 0,
+ FIELD.wbs
+ );
+ if (wbs && wbs.value) {
+ showWarningInfo(
+ null,
+ getLangByResId(this, '4004POORDER-000156')
+ ); /* 国际化处理: 计划编制生成的采购订单,不允许增行*/
+ return false;
+ }
+ return true;
+ },
+ modelAddRow: () => {
+ RownoUtils.setRowNo(this.props, PAGECODE.cardbody, FIELD.crowno);
+ },
+ modelDelRowBefore: () => {
+ let wbs = this.props.cardTable.getValByKeyAndIndex(
+ PAGECODE.cardbody,
+ 0,
+ FIELD.wbs
+ );
+ if (wbs && wbs.value) {
+ showWarningInfo(
+ null,
+ getLangByResId(this, '4004POORDER-000157')
+ ); /* 国际化处理: 计划编制生成的采购订单,不允许删行*/
+ return false;
+ }
+ return true;
+ },
+ modelDelRow: (props, moduleId, rowId) => {
+ if (this.showDragCom) {
+ let click = this.click;
+ if (click.rowId == rowId.beforeDelRowid) {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ }
+ }
+ let pk_order_b = props.cardTable.getValByKeyAndRowId(
+ moduleId,
+ rowId.beforeDelRowid,
+ FIELD.pk_order_b
+ );
+ let data = [];
+ data = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0 && pk_order_b) {
+ data.forEach((item) => {
+ if (
+ (pk_order_b &&
+ pk_order_b.value == item.values.pk_order_b.value) ||
+ rowId.beforeDelRowid == item.values.pk_order_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(
+ PAGECODE.card_fee_detail,
+ indexs
+ );
+ }
+ },
+ modelFooter: this.editOpenButton,
+ hideAdd: ishideAdd
+ },
+ [PAGECODE.card_fee]: {
+ tableHead: this.getFeeBtn, //费用项肩部按钮
+ showindex: true,
+ showCheck: true,
+ hideModelSave: true,
+ onTabChange: this.tabChange.bind(this),
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ onBatchChange: batchFeeEvents.bind(this),
+ onSelected: buttonController.feeSelected.bind(this, this.props),
+ onSelectedAll: buttonController.feeSelected.bind(this, this.props),
+ onBatchSelected: buttonController.feeSelected.bind(this, this.props),
+ inputChange: inputChange.bind(this, FIELD.crowno),
+ adaptionHeight: true
+ },
+ [PAGECODE.card_fee_detail]: {
+ // 费用明细区域
+ tableHead: this.getFeeDetailBtn, //费用明细肩部按钮
+ showindex: true,
+ showCheck: true,
+ hideModelSave: true,
+ onTabChange: this.tabChange.bind(this),
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ onSelected: buttonController.feeDetailSelected.bind(this, this.props),
+ onSelectedAll: buttonController.feeDetailSelected.bind(
+ this,
+ this.props
+ ),
+ onBatchSelected: buttonController.feeDetailSelected.bind(
+ this,
+ this.props
+ ),
+ onBatchChange: batchFeeDetailEvents.bind(this),
+ inputChange: inputChange.bind(this, FIELD.crowno),
+ adaptionHeight: true
+ }
+ }
+ })}
+
+ {createModal(BUTTON.Delete, {
+ title: getLangByResId(this, '4004POORDER-000039') /* 国际化处理: 注意*/,
+ content: getLangByResId(this, '4004POORDER-000056') /* 国际化处理: 确定要删除吗?*/
+ })}
+ {createModal(BUTTON.orgChange)}
+ {createModal('MessageDlg', { zIndex: 350 })}
+ {/* 附件管理 */}
+ {this.createNCUploader(newpk)}
+ {/* 审批详情 */}
+ {this.createApproveDetail()}
+ {/* 供应商应付 */}
+ {this.createSupplierApQuery()}
+ {/* 提交指派 */}
+ {this.createApprovalTrans()}
+ {/* 存量查询 */}
+ {this.createStockQuery()}
+ {/* 销量查询 */}
+ {this.createSalesQuery()}
+ {/* 毛利预估 */}
+ {this.createGrossProfitQuery()}
+ {/** 联查采购计划 **/}
+
+ {
+ this.setState({ showNtbDetail: false });
+ }}
+ affirm={() => {
+ this.setState({ showNtbDetail: false });
+ }}
+ />
+
+ {/* 合并显示 */}
+ {this.combineData &&
}
+ {/* 交互式异常 */}
+ {createModal('ResumeMessageDlg', {
+ className: 'iframe-modal',
+ size: 'xlg'
+ })}
+ {/* 参照增行 模态框 */}
+ {createModal('RefAdd20Modal', {
+ size: 'xlg',
+ zIndex: 220,
+ title: getLangByResId(this, '4004POORDER-000058') /* 国际化处理: 参照增行*/,
+ className: 'ref-addline-modal',
+ noFooter: true,
+ content: (
+
+ )
+ })}
+ {/* 联查运输状态 */}
+ {this.createtransport(NCModal)}
+ {/* 成套件 2019-04-12*/}
+ {this.createSetPiece()}
+ {/* 辅助信息*/}
+ {this.createSupplementaryInfo()}
+ {/* 价格详情*/}
+ {this.createPricedetail()}
+ {/* 内部交易信息*/}
+ {this.createTransInfo()}
+ {/* 物料行参照*/}
+ {this.createTransferModal()}
+
+
+
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+
+ );
+ } else {
+ return (
+
+ {/* 创建云原生错误异常界面 */}
+ {this.creatSocketErrorShow(socket)}
+
+ {/* 标题+按钮 */}
+
+
+ {createCardTitle(this, {
+ billCode: '', //单据号
+ backBtnClick: buttonClickController.bind(this, this.props, BUTTON.Back)
+ })}
+
+ {/* 表头按钮区 */}
+
+ {button.createErrorFlag({
+ headBtnAreaCode: PAGECODE.cardhead
+ })}
+ {button.createButtonApp({
+ area: PAGECODE.cardhead,
+ onButtonClick: buttonClickController.bind(this)
+ })}
+ {/* 到货计划 */}
+ {this.createArrivePlan()}
+ {/* 单据追溯 */}
+ {/* {this.createBillTrack()} */}
+ {
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk_order}
+ type="21"
+ />
+
+ {/* 上一页/下一页 */}
+
+ {createCardPagination({
+ handlePageInfoChange: pageInfoClick.bind(this),
+ dataSource: OrderCache.OrderCacheKey
+ })}
+
+
+
+
+ {/* 表头区 采购订单+操作信息*/}
+
+
+ {createForm(PAGECODE.cardhead, {
+ expandArr: [ PAGECODE.cardhead ],
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this)
+ })}
+
+
+
+ {createCardTable(PAGECODE.head_payment, {
+ tableHead: this.getPayMentBtn, //付款协议按钮
+ onBeforeEvent: beforeEvent.bind(this),
+ showIndex: true,
+ hideModelSave: true,
+ hideSwitch: this.hidePayTable,
+ onAfterEvent: afterEvents.bind(this),
+ inputChange: inputChange.bind(this, FIELD.crowno),
+ showSelectedNum: false
+
+ // adaptionHeight: true
+ // isAddRow: true,
+ // addRowCallback: () => {
+ // RownoUtils.setRowNo(this.props, PAGECODE.head_payment, 'showorder');
+ // }
+ })}
+
+ {/* */}
+
+ {/*
*/}
+ {createCardTable(PAGECODE.cardbody, {
+ multiConfig: {
+ [PAGECODE.cardbody]: {
+ tableHead: this.getMaterialBtn, //订单详情按钮
+ showindex: true,
+ showCheck: true,
+ hideModelSave: true,
+ onSelected: buttonController.metarialSelected.bind(this, this.props),
+ onSelectedAll: buttonController.metarialAllSelected.bind(this, this.props),
+ onBatchSelected: buttonController.metarialAllSelected.bind(this, this.props),
+ onTabChange: this.tabChange.bind(this),
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ onBatchChange: batchEvents.bind(this),
+ inputChange: inputChange.bind(this, FIELD.crowno),
+ // allowTotalRows: buttonController.onCheckRows.bind(this, this.props),
+ // isAddRow: true,
+ // addRowCallback: () => {
+ // RownoUtils.setRowNo(this.props, PAGECODE.cardbody, FIELD.crowno);
+ // },
+ adaptionHeight: true,
+ maxZIndex: 210,
+ onRowClick: onRowClick.bind(this),
+ onCellKeyDown: onCellKeyDown.bind(this),
+ modelAddRowBefore: () => {
+ let wbs = this.props.cardTable.getValByKeyAndIndex(
+ PAGECODE.cardbody,
+ 0,
+ FIELD.wbs
+ );
+ if (wbs && wbs.value) {
+ showWarningInfo(
+ null,
+ getLangByResId(this, '4004POORDER-000156')
+ ); /* 国际化处理: 计划编制生成的采购订单,不允许增行*/
+ return false;
+ }
+ return true;
+ },
+ modelAddRow: () => {
+ RownoUtils.setRowNo(this.props, PAGECODE.cardbody, FIELD.crowno);
+ },
+ modelDelRowBefore: () => {
+ let wbs = this.props.cardTable.getValByKeyAndIndex(
+ PAGECODE.cardbody,
+ 0,
+ FIELD.wbs
+ );
+ if (wbs && wbs.value) {
+ showWarningInfo(
+ null,
+ getLangByResId(this, '4004POORDER-000157')
+ ); /* 国际化处理: 计划编制生成的采购订单,不允许删行*/
+ return false;
+ }
+ return true;
+ },
+ modelDelRow: (props, moduleId, rowId) => {
+ if (this.showDragCom) {
+ let click = this.click;
+ if (click.rowId == rowId.beforeDelRowid) {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ }
+ }
+ let pk_order_b = props.cardTable.getValByKeyAndRowId(
+ moduleId,
+ rowId.beforeDelRowid,
+ FIELD.pk_order_b
+ );
+ let data = [];
+ data = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0) {
+ data.forEach((item) => {
+ if (
+ (pk_order_b &&
+ pk_order_b.value == item.values.pk_order_b.value) ||
+ rowId.beforeDelRowid == item.values.pk_order_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee_detail, indexs);
+ }
+ },
+ modelFooter: this.editOpenButton
+ },
+ [PAGECODE.card_fee]: {
+ tableHead: this.getFeeBtn, //费用项肩部按钮
+ showindex: true,
+ showCheck: true,
+ onTabChange: this.tabChange.bind(this),
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ onSelected: buttonController.feeSelected.bind(this, this.props),
+ onSelectedAll: buttonController.feeSelected.bind(this, this.props),
+ onBatchSelected: buttonController.feeSelected.bind(this, this.props),
+ onBatchChange: batchFeeEvents.bind(this),
+ adaptionHeight: true
+ },
+ [PAGECODE.card_fee_detail]: {
+ // 费用明细区域
+ tableHead: this.getFeeDetailBtn, //费用明细肩部按钮
+ showindex: true,
+ showCheck: true,
+ onTabChange: this.tabChange.bind(this),
+ onAfterEvent: afterEvents.bind(this),
+ onBeforeEvent: beforeEvent.bind(this),
+ onSelected: buttonController.feeDetailSelected.bind(this, this.props),
+ onSelectedAll: buttonController.feeDetailSelected.bind(this, this.props),
+ onBatchSelected: buttonController.feeDetailSelected.bind(this, this.props),
+ onBatchChange: batchFeeDetailEvents.bind(this),
+ adaptionHeight: true
+ }
+ }
+ })}
+
+ {/* 订单详情 */}
+ {createModal(BUTTON.Delete, {
+ title: getLangByResId(this, '4004POORDER-000039') /* 国际化处理: 注意*/,
+ content: getLangByResId(this, '4004POORDER-000056') /* 国际化处理: 确定要删除吗?*/
+ })}
+ {createModal('MessageDlg', { zIndex: 350 })}
+ {createModal(BUTTON.orgChange)}
+ {/* 附件管理 */}
+ {this.createNCUploader(newpk)}
+ {/* 审批详情 */}
+ {this.createApproveDetail()}
+ {/* 供应商应付 */}
+ {this.createSupplierApQuery()}
+ {/* 提交指派 */}
+ {this.createApprovalTrans()}
+ {/* 存量查询 */}
+ {this.createStockQuery()}
+ {/* 销量查询 */}
+ {this.createSalesQuery()}
+ {/* 毛利预估 */}
+ {this.createGrossProfitQuery()}
+ {/* 暂存数据 */}
+ {this.creatTempDataList()}
+ {/* 合并显示 */}
+ {this.combineData &&
}
+ {/* 交互式异常 */}
+
{createModal('ResumeMessageDlg', { className: 'iframe-modal', size: 'xlg' })}
+ {createModal('RefAdd20Modal', {
+ size: 'xlg',
+ zIndex: 220,
+ title: getLangByResId(this, '4004POORDER-000058') /* 国际化处理: 参照增行*/,
+ className: 'ref-addline-modal',
+ noFooter: true,
+ content: (
+
+ )
+ })}
+ {/** 联查采购计划 **/}
+
+ {
+ this.setState({ showNtbDetail: false });
+ }}
+ affirm={() => {
+ this.setState({ showNtbDetail: false });
+ }}
+ />
+
+
+ {/* 联查运输状态 */}
+ {this.createtransport(NCModal)}
+ {/* 成套件 2019-04-12*/}
+ {this.createSetPiece()}
+ {/* 辅助信息*/}
+ {this.createSupplementaryInfo()}
+ {/* 价格详情*/}
+ {this.createPricedetail()}
+ {/* 物料行参照*/}
+ {this.createTransferModal()}
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+ {/* 内部交易信息*/}
+ {this.createTransInfo()}
+
+
+
+ );
+ }
+ }
+}
+
+OrderCard = createPage({
+ //编辑公式
+ billinfo: {
+ billtype: 'extcard', //一主多子
+ pagecode: PAGECODE.cardcode,
+ headcode: PAGECODE.cardhead,
+ bodycode: [ PAGECODE.cardbody, PAGECODE.head_payment, PAGECODE.card_fee, PAGECODE.card_fee_detail ]
+ },
+ //tab
+ orderOfHotKey: [
+ PAGECODE.cardhead,
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]
+})(OrderCard);
+
+// ReactDOM.render(, document.querySelector('#app'));
+
+export default OrderCard;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/index.less b/src/pu/pu/poorder/card/index.less
new file mode 100644
index 0000000..c4932ab
--- /dev/null
+++ b/src/pu/pu/poorder/card/index.less
@@ -0,0 +1,24 @@
+.ref-addline-modal {
+ // z-index: 200 !important;
+ // .u-modal-body {
+ // padding: 0;
+ // padding-bottom: 48px;
+ // }
+ .transfertable-main {
+ .fixed-bottom-outer {
+ width: 100%;
+ }
+ }
+}
+.table-head-btns {
+ display: flex;
+ align-items: center;
+}
+.card-table-modal-header-customer {
+ .card_edit_open_btn {
+ display: inline-block;
+ }
+}
+.table-next-body-inner-wrapper {
+ // max-height: none !important; // 根据平台文档适配弹窗内表格不自适应问题
+}
diff --git a/src/pu/pu/poorder/card/init/initTemplate.js b/src/pu/pu/poorder/card/init/initTemplate.js
new file mode 100644
index 0000000..7f6c182
--- /dev/null
+++ b/src/pu/pu/poorder/card/init/initTemplate.js
@@ -0,0 +1,506 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片态初始化事件
+ * @Date: 2018-04-19 10:42:26
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2023-11-07 16:44:44
+ */
+import { URL, PAGECODE, FIELD, STATUS, OrderCache, LIST_BUTTON, INTELLAREA } from '../../constance';
+import { copyAddBtn, pageInfoClick } from '../btnClicks';
+import { setDefData, changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache';
+import { afterEvents } from '../afterEvents';
+import { transtypeUtils, deepClone } from '../../../../../scmpub/scmpub/pub/tool';
+import { refBillQueryCache } from '../../../pub/refBillQueryCache/refBillQueryCache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonClickController, buttonController } from '../viewController/index';
+import { columnSortUtils } from '../../../../../scmpub/scmpub/pub/tool/columnSortUtils';
+import { yycBtnInit } from '../../../yyc/ext/yycBtnInit';
+import excelImportconfig from 'uap/common/components/excelImportconfig';
+import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function() {
+ //设置导入url 常量
+ let excelimportconfig = excelImportconfig(
+ this.props,
+ FIELD.PURCHASEORG, //模块名称
+ PAGECODE.billType, //单据类型
+ true,
+ URL.importUrl,
+ {
+ noTips: true,
+ isSelfDefineImport: true
+ }
+ );
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.cardcode
+ },
+ (templedata) => {
+ transtypeUtils.init.call(this, templedata.context);
+ let templetid = templedata.template.pageid;
+ setDefData(OrderCache.OrderCardCache, 'templetid', templetid);
+ if (templedata.button) {
+ let button = templedata.button;
+ this.props.button.hideButtonsByAreas([ PAGECODE.cardhead ]);
+ // this.props.button.setOprationBtnsRenderStatus([ PAGECODE.material_table_row ], false);
+ buttonController.setOprationBtnsRenderStatus(this.props);
+ this.props.button.setButtons(button);
+ // 友云采按钮初始化
+ yycBtnInit(this.props);
+ //将导入组件注册到按钮中
+ this.props.button.setUploadConfig(LIST_BUTTON.Import, excelimportconfig);
+ }
+ if (templedata.template) {
+ if (templedata.template.layout) {
+ let layout = JSON.parse(templedata.template.layout);
+ layout.forEach((module) => {
+ if (module.name == 'DragLayoutCom') {
+ if (module.name && module.props && module.props.moduleId == 'splitLayout') {
+ this.showDragCom = true;
+ }
+ }
+ if (module.name == 'SmartCardWallet') {
+ if (module.name && module.props && module.props.moduleId == 'wallet_atp') {
+ // 设置业务卡片显隐性
+ this.props.smartCard.setCardWalletProps(INTELLAREA.INTELLAREA, INTELLAREA.WALLET_ATP, {
+ visible: true
+ });
+ }
+ }
+ });
+ }
+ this.meta = deepClone(templedata.template);
+ let scene =
+ templedata.context && templedata.context.paramMap && templedata.context.paramMap.SCM_ORDER_SCENE;
+ //场景有新增小应用、拉单小应用
+ scene = scene == null ? this.props.getUrlParam('scene') : scene;
+ if (!scene) {
+ scene = null;
+ }
+
+ let srcappcode = this.props.getUrlParam('srcappcode'); //拉单界面单独发布成小应用时使用的参数
+ setDefData(OrderCache.OrderCardCache, 'scene', scene);
+ setDefData(OrderCache.OrderCardCache, 'srcappcode', srcappcode);
+ let meta = templedata.template;
+ // 冻结不要费用
+ let scenefee = this.props.getUrlParam('scene');
+ if (scenefee != 'freeze') {
+ // if (!templedata.template[PAGECODE.card_fee] && !templedata.template[PAGECODE.card_fee_detail]) {
+ // showWarningInfo(
+ // null,
+ // getLangByResId(this, '4004POORDER-000166')
+ // ); /* 国际化处理: 模板中不存在【费用项】【费用明细】页签,请重新复制预制模板*/
+ // return;
+ // }
+ }
+ modifierMeta.call(this, meta, this.props);
+ this.props.meta.setMeta(meta, toggleShow.bind(this, templedata));
+ }
+ // 获取appcode
+ if (templedata.template && templedata.template.card_material) {
+ this.appcode = templedata.template.card_material.appcode;
+ }
+ let refBillQueryData = { billType: '21' };
+ if (templedata.context.paramMap && templedata.context.paramMap.transtype) {
+ refBillQueryData.transType = templedata.context.paramMap.transtype;
+ setDefData(OrderCache.OrderCardCache, 'transtype', templedata.context.paramMap.transtype);
+ }
+ refBillQueryCache(refBillQueryData, OrderCache.refBillDataCach, 'refBillDataCach');
+ }
+ );
+}
+
+function modifierMeta(meta, props) {
+ let linkmap = new Map([
+ [
+ 'cpraybillcode',
+ {
+ billtype: '20',
+ pkField: 'cpraybillhid'
+ }
+ ],
+ [
+ 'vsourcecode',
+ {
+ billtypeField: 'csourcetypecode',
+ pkField: 'csourceid'
+ }
+ ],
+ [
+ 'vfirstcode',
+ {
+ billtypeField: 'cfirsttypecode',
+ pkField: 'cfirstid'
+ }
+ ],
+ [
+ 'vcontractcode',
+ {
+ billtype: 'Z2',
+ pkField: 'ccontractid'
+ }
+ ]
+ ]);
+ let linkConfig = {
+ moduleId: PAGECODE.cardbody,
+ linkmap: linkmap
+ };
+ batchSetHyperlinkForTableFields.call(this, props, meta, linkConfig);
+ let _this = this;
+ let status = this.props.getUrlParam(STATUS.status);
+
+ if (status == STATUS.add) {
+ changeUrlParam(this.props, { status: STATUS.edit });
+ } else if (status == null) {
+ changeUrlParam(this.props, { status: STATUS.browse });
+ }
+ // 采购订单新增节点用
+ let sceneAdd = this.props.getUrlParam('scene');
+ if (sceneAdd == 'ADD') {
+ changeUrlParam(this.props, { status: null });
+ }
+ meta[PAGECODE.cardhead].status = status;
+ meta[PAGECODE.cardbody].status = status;
+ //编辑前 参照过滤
+ meta[PAGECODE.cardhead].items.map((item) => {
+ if (item.attrcode != FIELD.pk_org_v && item.attrcode != FIELD.pk_org && item.attrcode != FIELD.pk_dept_v) {
+ item.isShowUnit = false;
+ // item.queryCondition = () => {
+ // let data = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ // return { pk_org: data }; // 根据pk_org过滤
+ // };
+ }
+ if (item.attrcode == FIELD.pk_org_v) {
+ item.queryCondition = () => {
+ //主组织权限过滤
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgVidRefFilter' };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ //订单类型过滤交易类型
+ let filter = () => {
+ let direct = _this.props.form.getFormItemsValue(PAGECODE.cardhead, 'bdirect').value;
+ direct = JSON.stringify(direct) == '{}' ? false : direct;
+ // 3.无来源时视为自制,可以参照所有交易类型
+ let hasSource = false;
+ let table = _this.props.cardTable.getAllData(PAGECODE.cardbody);
+ if (!table || table.rows.length == 0) {
+ hasSource = false;
+ }
+ table.rows.map((o) => {
+ let sourceid = o.values.csourceid.value;
+ let sourceTypeCode = o.values.csourcetypecode.value;
+ let sourcebid = o.values.csourcebid.value;
+ sourceid = sourceid == '' ? null : sourceid;
+ sourceTypeCode = sourceTypeCode == '' ? null : sourceTypeCode;
+ sourcebid = sourcebid == '' ? null : sourcebid;
+ if (sourceid != null || sourceTypeCode != null || sourcebid != null) {
+ hasSource = true;
+ }
+ });
+ let pk_org = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let pk_group = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_group).value;
+ if (hasSource) {
+ //有来源时要根据直运过滤
+ return {
+ istransaction: 'Y',
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ pk_group: pk_group,
+ bdirect: direct,
+ SCM_BUSIORG: pk_org,
+ GridRefActionExt:
+ 'nccloud.web.pu.order.ref.Vtrantypecode,nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ };
+ } else {
+ //订单类型过滤交易类型
+ return {
+ istransaction: 'Y',
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ pk_org: pk_org,
+ SCM_BUSIORG: pk_org,
+ GridRefActionExt:
+ 'nccloud.web.pu.order.ref.Vtrantypecode,nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ };
+ }
+ };
+ item.queryCondition = filter;
+ } else if (item.attrcode == FIELD.pk_dept_v) {
+ item.queryCondition = () => {
+ let orgs = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: orgs,
+ busifuncode: FIELD.PURCHASEORG
+ };
+ };
+ } else if (item.attrcode == FIELD.pk_dept) {
+ item.queryCondition = () => {
+ let orgs = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: orgs,
+ busifuncode: FIELD.PURCHASEORG
+ };
+ };
+ } else if (item.attrcode == FIELD.cemployeeid) {
+ // 原nc的业务员的编辑前事件是根据采购组织和采购部门参照过滤的
+ item.queryCondition = () => {
+ let orgs = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let pk_dept = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_dept).value;
+ return {
+ pk_org: orgs,
+ pk_dept: pk_dept,
+ busifuncode: FIELD.PURCHASEORG
+ };
+ };
+ } else if (item.attrcode == FIELD.pk_bankdoc) {
+ // 银行账户根据开票供应商和币种参照过滤,完全采用平台过滤,客户传供应商
+ item.queryCondition = () => {
+ item.label = getLangByResId(this, '4004POORDER-000061'); /* 国际化处理: 供应商银行账户*/
+ item.itemtype = 'refer';
+ item.refcode = 'uapbd/refer/pub/CustBankAccGridRef/index';
+ let pk_bankdoc = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_bankdoc).value;
+ let pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ let corigcurrencyid = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.corigcurrencyid)
+ .value;
+ return {
+ accclass: '3',
+ pk_cust: pk_supplier,
+ pk_supplier: pk_supplier //,
+ //pk_currtype: corigcurrencyid
+ // GridRefActionExt: 'nccloud.web.pu.order.ref.AccountBankRefFilter'
+ };
+ };
+ } else if (item.attrcode == FIELD.pk_deliveradd) {
+ //供应商发货地址,供应商为空时不允许编辑
+ item.queryCondition = () => {
+ let pk_supplier = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ let pk_org = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ if (pk_supplier != null) {
+ return {
+ pk_org: pk_org,
+ pk_supplier: pk_supplier
+ //GridRefActionExt: 'nccloud.web.pu.order.ref.DeliveraddRefFilter'
+ };
+ }
+ };
+ } else {
+ item.queryCondition = () => {
+ let data = _this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return { pk_org: data }; // 根据pk_org过滤
+ };
+ }
+ });
+ meta[PAGECODE.cardbody].items.map((item) => {
+ if (item.attrcode == FIELD.pk_material) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode != FIELD.pk_org_v && item.attrcode != FIELD.pk_org) {
+ item.queryCondition = () => {
+ let org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return { pk_org: org };
+ };
+ }
+ if (item.attrcode == 'pk_reqdept_v') {
+ item.queryCondition = () => {
+ let org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: org,
+ busifuncode: FIELD.STOCKORG
+ };
+ };
+ }
+ });
+ // 冻结不要费用
+ let scene1 = _this.props.getUrlParam('scene');
+ if (scene1 != 'freeze') {
+ // 费用项
+ meta[PAGECODE.card_fee] &&
+ meta[PAGECODE.card_fee].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode != FIELD.pk_org_v && item.attrcode != FIELD.pk_org) {
+ item.queryCondition = () => {
+ let org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return { pk_org: org };
+ };
+ }
+ });
+ // 费用明细
+ meta[PAGECODE.card_fee_detail] &&
+ meta[PAGECODE.card_fee_detail].items.map((item) => {
+ if (item.attrcode == FIELD.cfeematerialvid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode == FIELD.cfeesuppliervid) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode != FIELD.pk_org_v && item.attrcode != FIELD.pk_org) {
+ item.queryCondition = () => {
+ let org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return { pk_org: org };
+ };
+ }
+ });
+ }
+ meta[PAGECODE.childform2].items.map((item) => {
+ if (item.attrcode == FIELD.pk_material) {
+ item.isMultiSelectedEnabled = true;
+ }
+ if (item.attrcode != FIELD.pk_org_v && item.attrcode != FIELD.pk_org) {
+ item.queryCondition = () => {
+ let org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return { pk_org: org };
+ };
+ }
+ if (item.attrcode == 'pk_reqdept_v') {
+ item.queryCondition = () => {
+ let org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ return {
+ pk_org: org,
+ busifuncode: FIELD.STOCKORG
+ };
+ };
+ }
+ });
+ // 冻结不要操作列
+ let scene = _this.props.getUrlParam('scene');
+ if (scene != 'freeze') {
+ //付款协议操作列
+ let pay_event = {
+ label: getLangByResId(this, '4004POORDER-000008') /* 国际化处理: 操作*/,
+ attrcode: 'opr',
+ width: '200px',
+ itemtype: 'customer', //默认必输
+ visible: true,
+ fixed: 'right', //右侧锁定操作列
+ render: (text, record, index) => {
+ let buttonAryp = buttonController.getPayMentOprButton(this.props);
+ return this.props.button.createOprationButton(buttonAryp, {
+ area: PAGECODE.payment_table_row,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => buttonClickController.call(this, props, key, text, record, index)
+ });
+ }
+ };
+ //物料操作列
+ let material_event = {
+ label: getLangByResId(this, '4004POORDER-000008') /* 国际化处理: 操作*/,
+ itemtype: 'customer',
+ attrcode: 'opr',
+ width: '200px',
+ visible: true,
+ fixed: 'right',
+ render: (text, record, mindex) => {
+ let buttonAry = buttonController.getMaterialOprButtons.call(this, this.props, record);
+ return this.props.button.createOprationButton(buttonAry, {
+ area: PAGECODE.material_table_row,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => buttonClickController.call(this, props, key, text, record, mindex)
+ });
+ }
+ };
+ //费用项操作列
+ let fee_event = {
+ label: getLangByResId(this, '4004POORDER-000008') /* 国际化处理: 操作*/,
+ itemtype: 'customer',
+ attrcode: 'opr',
+ width: '200px',
+ visible: true,
+ fixed: 'right',
+ render: (text, record, mindex) => {
+ let buttonAry = buttonController.getFeeMentOprButton.call(this, this.props, record);
+ return this.props.button.createOprationButton(buttonAry, {
+ area: PAGECODE.card_fee_inner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => buttonClickController.call(this, props, key, text, record, mindex)
+ });
+ }
+ };
+ //费用明细操作列
+ let feedetail_event = {
+ label: getLangByResId(this, '4004POORDER-000008') /* 国际化处理: 操作*/,
+ itemtype: 'customer',
+ attrcode: 'opr',
+ width: '200px',
+ visible: true,
+ fixed: 'right',
+ render: (text, record, mindex) => {
+ let buttonAry = buttonController.getFeeDetailMentOprButton.call(this, this.props, record);
+ return this.props.button.createOprationButton(buttonAry, {
+ area: PAGECODE.card_fee_detail_inner,
+ buttonLimit: 3,
+ onButtonClick: (props, key) => buttonClickController.call(this, props, key, text, record, mindex)
+ });
+ }
+ };
+ meta[PAGECODE.cardbody].items.push(material_event);
+ meta[PAGECODE.head_payment].items.push(pay_event);
+ meta[PAGECODE.card_fee] && meta[PAGECODE.card_fee].items.push(fee_event);
+ meta[PAGECODE.card_fee_detail] && meta[PAGECODE.card_fee_detail].items.push(feedetail_event);
+ }
+ // 行号排序:付款协议表体和物料表体
+ columnSortUtils.numberSort(meta, PAGECODE.head_payment, 'showorder');
+ columnSortUtils.numberSort(meta, PAGECODE.cardbody, FIELD.crowno);
+ // NCC-307117 执行情况这个共享页签会影响重排行号的逻辑,这里把比较器也传给执行情况这个页签
+ columnSortUtils.numberSort(meta, PAGECODE.material1, FIELD.crowno);
+ return meta;
+}
+
+function toggleShow(data) {
+ // 修改页面状态
+ let status = this.props.getUrlParam(STATUS.status);
+ let scene = this.props.getUrlParam('scene');
+ let pk = this.props.getUrlParam(FIELD.id);
+ let vsrctype = this.props.getUrlParam('vsrctype');
+ if (vsrctype == null) {
+ vsrctype = this.props.getUrlParam('transfer');
+ }
+ vsrctype = vsrctype == 'undefined' ? null : vsrctype; //推单
+ let id = pk == null || pk.length == 0 ? false : pk;
+ // 新增
+ let pk_org_v = data.context.pk_org_v;
+ let org_v_Name = data.context.org_v_Name;
+ // 缓存为了处理卡片的自制
+ setDefData(OrderCache.OrderCardCache, FIELD.pk_org_v, pk_org_v);
+ setDefData(OrderCache.OrderCardCache, 'pk_org_v_name', org_v_Name);
+ if ((!status || status == 'edit') && !id && vsrctype == null) {
+ if (pk_org_v) {
+ let changeRow = { refpk: pk_org_v, refname: org_v_Name };
+ let obj_pk_org_v = { value: pk_org_v, display: org_v_Name, scale: '-1' };
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, { [FIELD.pk_org_v]: obj_pk_org_v });
+ afterEvents.call(this, this.props, PAGECODE.cardhead, FIELD.pk_org_v, obj_pk_org_v, changeRow);
+ }
+ buttonController.togglePageShow.call(this, this.props, null, pk_org_v);
+ this.props.form.setFormItemsDisabled(PAGECODE.cardhead, { pk_org_v: false });
+ } else if (status == 'copy') {
+ copyAddBtn.call(this);
+ } else {
+ if (vsrctype == null) {
+ if (pk_org_v && vsrctype != undefined) {
+ let changeRow = { refpk: pk_org_v, refname: org_v_Name };
+ let obj_pk_org_v = { value: pk_org_v, display: org_v_Name, scale: '-1' };
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, { [FIELD.pk_org_v]: obj_pk_org_v });
+ afterEvents.call(this, this.props, PAGECODE.cardhead, FIELD.pk_org_v, obj_pk_org_v, changeRow);
+ }
+ // 采购订单新增进入
+ if (pk_org_v && scene == 'ADD') {
+ let changeRow = { refpk: pk_org_v, refname: org_v_Name };
+ let obj_pk_org_v = { value: pk_org_v, display: org_v_Name, scale: '-1' };
+ this.props.form.setFormItemsValue(PAGECODE.cardhead, { [FIELD.pk_org_v]: obj_pk_org_v });
+ afterEvents.call(this, this.props, PAGECODE.cardhead, FIELD.pk_org_v, obj_pk_org_v, changeRow);
+ }
+ buttonController.togglePageShow.call(this, this.props, null);
+ } else {
+ this.props.button.hideButtonsByAreas([ PAGECODE.cardhead ]);
+ }
+ }
+ pageInfoClick.call(this);
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/pricedetail/index.js b/src/pu/pu/poorder/card/pricedetail/index.js
new file mode 100644
index 0000000..ba3ab03
--- /dev/null
+++ b/src/pu/pu/poorder/card/pricedetail/index.js
@@ -0,0 +1,203 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 辅助信息组件
+ * @Date: 2019-05-16 14:31:04
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-03-29 14:17:41
+ */
+import React, { Component } from 'react';
+import { base, ajax, formatDatetime, formatNumber } from 'nc-lightapp-front';
+import './index.less';
+const { NCSidebox } = base;
+import { URL, BILLTYPE } from '../../constance';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class Pricedetail extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ data: {},
+ sources: 'other',
+ billtype: ''
+ };
+ initLang(this, [ '4004poorder' ], 'pu');
+ }
+ componentWillReceiveProps(nextProps) {
+ this.setState({
+ sources: 'other',
+ billtype: ''
+ });
+ if (nextProps && nextProps.priceData != null && nextProps.showModal) {
+ if (nextProps.priceData.fpricesourceflag) {
+ if (BILLTYPE.praybill == nextProps.priceData.fpricesourceflag) {
+ //请购单
+ this.setState({
+ billtype: BILLTYPE.type20
+ });
+ } else if (
+ BILLTYPE.orderNew == nextProps.priceData.fpricesourceflag ||
+ BILLTYPE.orderLow == nextProps.priceData.fpricesourceflag
+ ) {
+ //采购订单
+ this.setState({
+ billtype: BILLTYPE.type21
+ });
+ } else if (BILLTYPE.purdaily == nextProps.priceData.fpricesourceflag) {
+ //采购合同
+ this.setState({
+ billtype: BILLTYPE.typeZ2
+ });
+ } else if (BILLTYPE.priceaudit == nextProps.priceData.fpricesourceflag) {
+ //价格审批单
+ this.setState({
+ billtype: BILLTYPE.type28
+ });
+ } else if (BILLTYPE.supplierprice == nextProps.priceData.fpricesourceflag) {
+ //供应商价目表
+ this.setState({
+ billtype: BILLTYPE.type4221
+ });
+ } else if (BILLTYPE.sources == nextProps.priceData.fpricesourceflag) {
+ // 上游单据带入时,展示单据追溯
+ this.setState({
+ sources: 'sources'
+ });
+ }
+ }
+
+ this.queryData(nextProps.priceData);
+ } else {
+ this.setState({});
+ }
+ }
+ /**
+ * 查询数据
+ */
+ queryData = (param) => {
+ ajax({
+ url: URL.pricedetail,
+ data: param,
+ success: (res) => {
+ if (res.data) {
+ this.setState({
+ data: res.data
+ });
+ }
+ }
+ });
+ };
+
+ render() {
+ let { showModal, onClose, maskClose } = this.props;
+ return (
+
+
+
+
+
{getLangByResId(this, '4004POORDER-000146')}
+ {/* 单据号: */}
+ {this.state.data.vbillcode == 'null' && this.state.billtype == BILLTYPE.type4221 ? (
+
+ {
+ e.stopPropagation();
+ this.props.cardProps.openTo(
+ '/purp/pp/supplierprice/list/index.html#/list',
+ {
+ appcode: '400500000',
+ pagecode: '400500000_list',
+ id: this.state.data.pk_source,
+ pk_org: this.state.data.pk_org,
+ pk_orgName: this.state.data.pk_orgName,
+ status: 'browse'
+ }
+ );
+ }}
+ >
+ {getLangByResId(this, '4004POORDER-000155')}
+
+
+ ) : (
+
+ {this.state.data.vbillcode && (
+ {
+ e.stopPropagation();
+ this.props.cardProps.openTo(null, {
+ billtype: this.state.billtype,
+ sence: 4,
+ status: 'browse',
+ id: this.state.data.pk_source
+ });
+ }}
+ >
+ {this.state.data.vbillcode}
+
+ )}
+ {/* 价格详情,如果没有单据号,不应该给超链接标签 */}
+ {!this.state.data.vbillcode && '-'}
+
+ )}
+
+
+ {getLangByResId(this, '4004POORDER-000147')}
+ {/* 行号: */}
+ {this.state.data.crowno}
+
+
+ {getLangByResId(this, '4004POORDER-000148')}
+ {/* 供应商: */}
+ {this.state.data.pk_supplier_v}
+
+
+ {getLangByResId(this, '4004POORDER-000149')}
+ {/* 币种: */}
+ {this.state.data.corigcurrencyid}
+
+
+ {getLangByResId(this, '4004POORDER-000150')}
+ {/* 含税单价: */}
+ {formatNumber(this.state.data.nqtorigtaxprice)}
+
+
+ {getLangByResId(this, '4004POORDER-000151')}
+ {/* 价格生效日期: */}
+
+ {formatDatetime(
+ this.state.data.dqtvaliddate == undefined
+ ? null
+ : this.state.data.dqtvaliddate.substring(0, 10)
+ )}
+
+
+
+ {getLangByResId(this, '4004POORDER-000152')}
+ {/* 价格失效日期: */}
+
+ {formatDatetime(
+ this.state.data.dqtinvaliddate == undefined
+ ? null
+ : this.state.data.dqtinvaliddate.substring(0, 10)
+ )}
+
+
+
+
+
+ );
+ }
+}
+export default Pricedetail;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/pricedetail/index.less b/src/pu/pu/poorder/card/pricedetail/index.less
new file mode 100644
index 0000000..9f200fb
--- /dev/null
+++ b/src/pu/pu/poorder/card/pricedetail/index.less
@@ -0,0 +1,17 @@
+.price-detail-content {
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ & > div {
+ margin-bottom: 18px;
+ .field-title {
+ color: var(--pui-black-font-color-1, #767b83);
+ }
+ .field-value {
+ color: var(--pui-black-font-color-1, #333);
+ &:empty::after {
+ content: '-';
+ }
+ }
+ }
+}
diff --git a/src/pu/pu/poorder/card/supplementaryinfo/chart.js b/src/pu/pu/poorder/card/supplementaryinfo/chart.js
new file mode 100644
index 0000000..90dd907
--- /dev/null
+++ b/src/pu/pu/poorder/card/supplementaryinfo/chart.js
@@ -0,0 +1,125 @@
+/*yj4IcOiYnx5Qg5A5tckDga2dqYzIT0kLr2vll36x/wM=*/
+import React, { Component } from 'react';
+import { getTheme } from 'nc-lightapp-front';
+import echarts from 'echarts';
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+let getOption = async () => {
+ let theme = await getTheme();
+ let option = {
+ grid: {
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: [ '', '' ],
+ axisLabel: {
+ color: function(value) {
+ return theme == 'black' ? '#fff' : 'black';
+ }
+ },
+ axisLine: {
+ lineStyle: {
+ color: theme == 'black' ? '#fff' : 'black'
+ }
+ }
+ },
+ yAxis: {
+ name: '', //个
+ type: 'value',
+ nameTextStyle: {
+ color: theme == 'black' ? '#fff' : 'black'
+ },
+ lineStyle: {
+ normal: {
+ width: 2
+ }
+ },
+ axisLabel: {
+ color: function(value) {
+ return theme == 'black' ? '#fff' : 'black';
+ }
+ },
+ axisLine: {
+ lineStyle: {
+ color: theme == 'black' ? '#fff' : 'black'
+ }
+ }
+ },
+ // 图例
+ legend: {
+ itemGap: 30,
+ bottom: 10,
+ data: [ '', '' ] //['现存量', '可用量']
+ },
+ // 悬浮提示
+ tooltip: {
+ trigger: 'axis'
+ },
+ series: [
+ {
+ data: [],
+ type: 'bar',
+ barWidth: 40, //柱图宽度
+ // color: 'green', // 如果每个柱子的颜色相同可以在这里统一配置
+ itemStyle: {
+ //通常情况下:
+ normal: {
+ //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
+ color: function(params) {
+ var colorList = [ '#4C73FF', '#FFB647', '#00C67E', '#FF7F4C', '#8A48FF', '#22D4D1' ];
+ return colorList[params.dataIndex];
+ }
+ },
+ //鼠标悬停时:
+ emphasis: {
+ shadowBlur: 5,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.2)'
+ }
+ }
+ }
+ ]
+ };
+ return option;
+};
+export default class LineChart extends Component {
+ constructor(props) {
+ super(props);
+ this.myChart = null;
+ initLang(this, [ '4004poorder' ], 'pu');
+ }
+
+ componentDidMount() {
+ this.initEChart();
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.data !== this.props.data) {
+ this.option.series[0].data = nextProps.data;
+ this.option.yAxis.name = nextProps.supplementCunit;
+ this.myChart.setOption(this.option);
+ }
+ }
+ initEChart = async () => {
+ this.myChart = echarts.init(document.getElementById('chart'));
+ this.option = await getOption();
+ // option多语处理
+ this.option.legend.data = [
+ getLangByResId(this, '4004POORDER-000126'),
+ getLangByResId(this, '4004POORDER-000127')
+ ]; /* 国际化处理:现存量, 可用量*/
+ this.option.xAxis.data = [
+ getLangByResId(this, '4004POORDER-000126'),
+ getLangByResId(this, '4004POORDER-000127')
+ ]; /* 国际化处理:现存量, 可用量*/
+ //option.yAxis.name = '个'; /* 国际化处理:个*/
+ this.option.series[0].data = this.props.data;
+ this.myChart.setOption(this.option);
+ };
+ render() {
+ return ;
+ }
+}
+
+/*yj4IcOiYnx5Qg5A5tckDga2dqYzIT0kLr2vll36x/wM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/supplementaryinfo/index.js b/src/pu/pu/poorder/card/supplementaryinfo/index.js
new file mode 100644
index 0000000..cbc932b
--- /dev/null
+++ b/src/pu/pu/poorder/card/supplementaryinfo/index.js
@@ -0,0 +1,127 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 辅助信息组件
+ * @Date: 2019-05-16 14:31:04
+ * @Last Modified by: hufeim
+ * @Last Modified time: 2023-03-13 14:57:56
+ */
+import React, { Component } from 'react';
+import { base, ajax, formatNumber } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+import './index.less';
+import Chart from './chart';
+const { NCSidebox } = base;
+import { initLang, getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class SupplementaryInfo extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ data: {
+ atpdata: {},
+ price: {
+ contractPrc: null,
+ lowestPrice: null,
+ newPrice: null,
+ supplerPrc: null
+ }
+ },
+ castunitid: null
+ };
+ initLang(this, [ '4004poorder' ], 'pu');
+ }
+ componentWillReceiveProps(nextProps) {
+ if (nextProps && nextProps.supplementinfoData != null && nextProps.showModal) {
+ this.setState({
+ castunitid: nextProps.supplementCunit
+ });
+ this.queryData(nextProps.supplementinfoData);
+ } else {
+ this.setState({
+ data: {
+ atpdata: {},
+ price: {
+ contractPrc: null,
+ lowestPrice: null,
+ newPrice: null,
+ supplerPrc: null
+ }
+ },
+ castunitid: null
+ });
+ }
+ }
+ /**
+ * 查询数据
+ */
+ queryData = (param) => {
+ ajax({
+ url: URL.supplementinfo,
+ data: param,
+ success: (res) => {
+ if (res.data) {
+ this.setState({
+ data: res.data
+ });
+ }
+ }
+ });
+ };
+ render() {
+ let { showModal, supplementinfoData, onClose, maskClose } = this.props;
+ return (
+
+
+
+
{getLangByResId(this, '4004POORDER-000120')}
+ {/*价格 */}
+
+ {getLangByResId(this, '4004POORDER-000121')}
+ {/* 合同价: */}
+ {formatNumber(this.state.data.price.contractPrc)}
+
+
+ {getLangByResId(this, '4004POORDER-000122')}
+ {/* 供应商价目表: */}
+
+ {formatNumber(this.state.data.price.supplerPrc)}
+
+
+
+ {getLangByResId(this, '4004POORDER-000123')}
+ {/* 订单最新价: */}
+
+ {formatNumber(this.state.data.price.newPrice)}
+
+
+
+ {getLangByResId(this, '4004POORDER-000124')}
+ {/* 订单最低价: */}
+
+ {formatNumber(this.state.data.price.lowestPrice)}
+
+
+
{getLangByResId(this, '4004POORDER-000125')}
+ {/* 存量 */}
+
+
+
+
+ );
+ }
+}
+export default SupplementaryInfo;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/supplementaryinfo/index.less b/src/pu/pu/poorder/card/supplementaryinfo/index.less
new file mode 100644
index 0000000..f7b4d8b
--- /dev/null
+++ b/src/pu/pu/poorder/card/supplementaryinfo/index.less
@@ -0,0 +1,36 @@
+.supplementary-info-content {
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ & > div {
+ margin-bottom: 18px;
+ margin-left: 12px;
+ .field-title {
+ color: var(--pui-black-font-color-1, #767b83);
+ }
+ .field-value {
+ color: var(--pui-black-font-color-1, #333);
+ &:empty::after {
+ content: '-';
+ }
+ }
+ }
+
+ .group-title {
+ font-size: 14px;
+ margin-bottom: 20px;
+ display: flex;
+ align-items: center;
+ &:not(:first-of-type) {
+ margin-top: 20px;
+ }
+ &::before {
+ content: '';
+ background: #e14c46;
+ width: 5px;
+ margin-right: 8px;
+ display: inline-block;
+ height: 13px;
+ }
+ }
+}
diff --git a/src/pu/pu/poorder/card/viewController/btnClickController.js b/src/pu/pu/poorder/card/viewController/btnClickController.js
new file mode 100644
index 0000000..38a3b38
--- /dev/null
+++ b/src/pu/pu/poorder/card/viewController/btnClickController.js
@@ -0,0 +1,793 @@
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单卡片页面按钮事件
+ * @Date: 2018-05-03 20:28:55
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-06 10:27:06
+ */
+import { toast } from 'nc-lightapp-front';
+import {
+ BUTTON,
+ TRANSFER,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ TRANSFER49,
+ LIST_BUTTON
+} from '../../constance';
+import { PAGECODE, URL, STATUS, FIELD, OrderCache } from '../../constance';
+import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/RownoUtil';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+import { clearTransferCache, changeUrlParam, getDefData, setDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import {
+ backButton,
+ cancelButton,
+ deleteBtnClick,
+ editButton,
+ saveBtnClick,
+ addBtnClick,
+ commit,
+ uncommit,
+ copyAddBtn,
+ pageInfoClick,
+ print_BtnClick,
+ quitTransferButton,
+ stockQuery,
+ salesQuery,
+ grossProfitQuery,
+ supplierApQuery,
+ savecommit,
+ pricequery,
+ checkDataPermission,
+ printOut,
+ combineShow,
+ coopPriceQuery,
+ handleOrderBtn,
+ payPlan,
+ requestCheckData,
+ refresh,
+ transportstatusquery,
+ commonCheckData,
+ payExecStatBtnClick,
+ tempStorageBtnClick,
+ supplmentaryinfoBtnClick,
+ saveAndCommit,
+ linkPoPlanBtnClick,
+ bizInfoBtnClick,
+ pricedetailBtnClick,
+ pasteLineBtn
+} from '../btnClicks/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from './index';
+import setPieceBtnClick from '../btnClicks/setPieceBtnClick';
+
+import { YYC_BUTTON_ARRAY } from '../../../yyc/constance';
+import { orderYYCBtnClick } from '../../../yyc/ext/yycBtnClick';
+import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
+import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function(props, key, text, record, index) {
+ let pk = null;
+ let _this = this;
+ let _url = null;
+ let pk_order_b = null;
+ let pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ pk_order =
+ pk_order == null || pk_order == '' || pk_order == 'undefined' ? this.props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'undefined' ? null : pk_order;
+ let pk_src = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_srcorder).value;
+ if (pk_src != null) {
+ pk_order = pk_src;
+ }
+ //wbs推单生成的采购订单不允许增行删行复制行,而且推单生成的采购订单表体wbs一定优值,且是唯一值
+ //所以在此取订单表体第一行的wbs的值,作为判断
+ let wbs = this.props.cardTable.getValByKeyAndIndex(PAGECODE.cardbody, 0, FIELD.wbs);
+ let ts = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.ts);
+ ts = ts && ts.value;
+ switch (key) {
+ case BUTTON.Back: // 返回
+ backButton.bind(this)();
+ break;
+ case BUTTON.Edit: // 修改
+ checkDataPermission.call(this, record, 'edit', () => {
+ editButton.call(this);
+ });
+ break;
+ case BUTTON.Delete: // 删除
+ deleteBtnClick.call(this, this.props);
+ break;
+ case BUTTON.Cancel: // 取消
+ cancelButton.call(this, this.props, this.curindex);
+ break;
+ case BUTTON.Save: // 保存
+ saveBtnClick.call(this, this.props);
+ break;
+ case BUTTON.TemporaryStorage: //暂存
+ tempStorageBtnClick.call(this, this.props);
+ break;
+ case BUTTON.Commit: // 提交
+ commit.call(this, this.props);
+ break;
+ case BUTTON.SaveCommit: // 保存提交
+ saveAndCommit.call(this, this.skipCodes);
+ // savecommit.call(this);
+ break;
+ case BUTTON.UnCommit: // 收回
+ uncommit.call(this);
+ break;
+ case BUTTON.Copy: // 复制
+ copyAddBtn.call(this);
+ break;
+ case BUTTON.QuitTransferBill: // 退出转单
+ quitTransferButton.call(this, this.props);
+ break;
+ case BUTTON.QueryAboutBusiness: // 单据追溯
+ this.setState({ pk_order: pk_order, showTrack: true });
+ break;
+ case BUTTON.annex_management: // 附件
+ this.setState({
+ pk_order: pk_order,
+ showUploader: true
+ // target: event.target //确定弹窗位置,不传则默认为正中央
+ });
+ break;
+ case BUTTON.ApproveInfo: // 审批详情
+ let vtrantypecode = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.vtrantypecode).value;
+ this.setState({ show: true, pk_order: pk_order, vtrantypecode: vtrantypecode });
+ break;
+ case BUTTON.SupplierAp: // 供应商应付
+ supplierApQuery.call(this, this.props);
+ break;
+ case BUTTON.LinkPoPlan: // 联查采购计划
+ linkPoPlanBtnClick.call(this, this.props);
+ break;
+ case BUTTON.print: //打印
+ print_BtnClick.call(this, this.props);
+ break;
+ case BUTTON.PrintOut: //输出
+ printOut.call(this, this.props);
+ break;
+ case BUTTON.CombineShow: // 合并显示
+ combineShow.call(this, this.props);
+ break;
+ case BUTTON.Pay_Addline: // 付款协议增行
+ props.cardTable.addRow(PAGECODE.head_payment);
+ let allrow = props.cardTable.getAllRows(PAGECODE.head_payment);
+ for (let i = 0; i < allrow.length; i++) {
+ let value = allrow[i].values.numberindex.value;
+ props.cardTable.setValByKeyAndIndex(PAGECODE.head_payment, i, 'showorder', {
+ value: value,
+ display: value
+ });
+ }
+
+ break;
+ case BUTTON.selfmake: // 自制
+ //清空页面
+ addBtnClick.call(this);
+ break;
+ case BUTTON.Add: // 新增
+ //清空页面
+ addBtnClick.call(this);
+ break;
+ case BUTTON.Freeze: //冻结
+ handleOrderBtn.call(this, URL.freeze, getLangByResId(this, '4004POORDER-000023'), ''); /* 国际化处理: 冻结*/
+ break;
+ case BUTTON.UnFreeze: //解冻
+ handleOrderBtn.call(this, URL.unfreeze, getLangByResId(this, '4004POORDER-000024'), ''); /* 国际化处理: 解冻*/
+ break;
+ case BUTTON.OpenBill: //整单打开
+ handleOrderBtn.call(this, URL.finalopen, getLangByResId(this, '4004POORDER-000025'), ''); /* 国际化处理: 整单打开*/
+ break;
+ case BUTTON.CloseBill: //整单关闭
+ handleOrderBtn.call(this, URL.finalClose, getLangByResId(this, '4004POORDER-000026'), ''); /* 国际化处理: 整单关闭*/
+ break;
+ case BUTTON.RowOpen: //行打开
+ pk_order_b = record && record.values && record.values.pk_order_b && record.values.pk_order_b.value;
+ let btso = record && record.values && record.values.ts && record.values.ts.value;
+ let extstro = pk_order_b + ',' + btso;
+ handleOrderBtn.call(this, URL.rowopen, getLangByResId(this, '4004POORDER-000027'), extstro); /* 国际化处理: 行打开*/
+ break;
+ case BUTTON.RowClose: //行关闭
+ pk_order_b = record && record.values && record.values.pk_order_b && record.values.pk_order_b.value;
+ let btsc = record && record.values && record.values.ts && record.values.ts.value;
+ let extstrc = pk_order_b + ',' + btsc;
+ handleOrderBtn.call(
+ this,
+ URL.rowclose,
+ getLangByResId(this, '4004POORDER-000028'),
+ extstrc
+ ); /* 国际化处理: 行关闭*/
+ break;
+ case BUTTON.StockQuery: //存量查询
+ stockQuery.call(this, this.props);
+ break;
+ case BUTTON.SalesQuery: //销量查询
+ salesQuery.call(this, this.props);
+ break;
+ case BUTTON.GrossProfit: //毛利预估
+ grossProfitQuery.call(this, this.props);
+ break;
+ case BUTTON.Pay_DeleteLine: // 付款协议删行
+ props.cardTable.delRowsByIndex(PAGECODE.head_payment, index);
+ break;
+ case BUTTON.openbrowse: //展开物料浏览行
+ props.cardTable.toggleRowView(PAGECODE.cardbody, record);
+ break;
+ case BUTTON.openedit: //侧拉物料信息
+ props.cardTable.openModel(PAGECODE.cardbody, STATUS.edit, record, index);
+ break;
+ case BUTTON.Material_AddLine: //物料肩部 增行
+ // props.cardTable.addRow(PAGECODE.cardbody);
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000156')); /* 国际化处理: 计划编制生成的采购订单,不允许增行*/
+ return;
+ }
+ let rowCount = props.cardTable.getNumberOfRows(PAGECODE.cardbody);
+ props.cardTable.addRow(
+ PAGECODE.cardbody,
+ rowCount,
+ { nitemdiscountrate: { display: '100.00', value: '100.00' } },
+ true
+ );
+ RownoUtils.setRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ break;
+ case BUTTON.materialDeleteLine: //物料肩部 删行
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000157')); /* 国际化处理: 计划编制生成的采购订单,不允许删行*/
+ return;
+ }
+ if (record) {
+ props.cardTable.delRowsByIndex(PAGECODE.cardbody, index);
+ materialSelected(props);
+ if (_this.refsourcdata) {
+ _this.refsourcdata.data.forEach((e) => {
+ if (e.bodys && e.bodys.length > 0) {
+ for (let i = 0; i < e.bodys.length; i++) {
+ if (record.values.cfirstbid.value == e.bodys[i].pk.substr(0, 20)) {
+ e.bodys.splice(i, 1);
+ }
+ }
+ }
+ });
+ }
+ // 删除对应的费用明细
+ delFeeDetailByBody.call(_this, props, [ record ]);
+ if (_this.showDragCom) {
+ if (_this.click.rowId == record.rowid) {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ _this.click = {};
+ }
+ }
+ } else {
+ let selectedRow = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000029') /* 国际化处理: 请选择数据!*/
+ });
+ return;
+ }
+ let rowparam = [];
+ let datas = [];
+ selectedRow.forEach((item) => {
+ rowparam.push(item.index);
+ datas.push(item.data);
+ });
+ props.cardTable.delRowsByIndex(PAGECODE.cardbody, rowparam);
+ materialSelected(props);
+ let map = new Map();
+ selectedRow.forEach((e) => {
+ if (e.data && e.data.values && e.data.values.cfirstbid) {
+ map.set(e.data.values.cfirstbid.value, e.data.values.cfirstbid.value);
+ }
+ });
+
+ if (_this.refsourcdata) {
+ _this.refsourcdata.data.forEach((e) => {
+ if (e.bodys && e.bodys.length > 0) {
+ for (let i = e.bodys.length - 1; i >= 0; i--) {
+ if (
+ map.get(e.bodys[i].pk.substr(0, 20)) != null ||
+ map.get(e.bodys[i].pk.substr(0, 20)) != undefined
+ ) {
+ e.bodys.splice(i, 1);
+ }
+ }
+ }
+ });
+ }
+ // 删除对应的费用明细
+ delFeeDetailByBody.call(this, props, datas);
+ if (_this.showDragCom) {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ _this.click = {};
+ }
+ }
+ break;
+ case BUTTON.Resetno: //物料肩部 重排行号
+ // 效率优化开启
+ props.beforeUpdatePage();
+ RownoUtils.resetRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ let bodys = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let grandsons = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ grandsons.forEach((item) => {
+ for (let i = 0; i < bodys.length; i++) {
+ if (
+ (bodys[i].values.pk_order_b &&
+ item.values.pk_order_b.value &&
+ item.values.pk_order_b.value == bodys[i].values.pk_order_b.value) ||
+ item.values.pk_order_b.value == bodys[i].rowid
+ ) {
+ props.cardTable.setValByKeyAndRowId(
+ PAGECODE.card_fee_detail,
+ item.rowid,
+ FIELD.cmatrowno,
+ bodys[i].values.crowno
+ );
+ break;
+ }
+ }
+ });
+ this.forceUpdate();
+ // 效率优化关闭
+ props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ break;
+ // case BUTTON.Material_DeleteLine: //物料行 删行
+ // props.cardTable.delRowsByIndex(PAGECODE.cardbody, index);
+ // materialSelected(props);
+ // break;
+ case BUTTON.copyline: //物料 肩部复制行
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000158')); /* 国际化处理: 计划编制生成的采购订单,不允许复制行*/
+ return;
+ }
+ props.button.setButtonVisible(
+ [
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.StockQuery,
+ BUTTON.SalesQuery,
+ BUTTON.GrossProfit
+ ],
+ false
+ );
+ props.button.setButtonVisible(
+ [ BUTTON.Material_PastLast, BUTTON.PasteThis, BUTTON.PasteLast, BUTTON.PasteCancel ],
+ true
+ );
+ rowCopyPasteUtils.copyRows.call(
+ _this,
+ props,
+ PAGECODE.cardbody,
+ BUTTON.materialCardInitBtn,
+ BUTTON.materialCardPastBtn
+ );
+ break;
+ case BUTTON.PasteLast: // 物料 粘贴至末行
+ pasteLineBtn.call(this, props, record, index);
+ // 效率优化关闭
+ props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ break;
+ case BUTTON.PasteThis: // 物料 粘贴至此
+ pasteLineBtn.call(this, props, record, index);
+ // 效率优化关闭
+ props.updatePage(PAGECODE.cardhead, [ PAGECODE.head_payment, PAGECODE.cardbody ]);
+ break;
+ case BUTTON.PasteCancel: // 物料 复制取消
+ buttonController.materialPasteCancel.call(this, this.props);
+ materialSelected(props);
+ break;
+ case BUTTON.Correct: //物料 批改
+ props.cardTable.batchChangeTableData(PAGECODE.cardbody);
+ break;
+ case BUTTON.CopyLine_row: //物料 复制行
+ props.cardTable.pasteRow(PAGECODE.cardbody, index, [ 'pk_order_b', 'crowno' ]);
+ setPKempty(props, index + 1);
+ RownoUtils.setRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ break;
+ case BUTTON.Refresh: //刷新
+ refresh.call(this, this.props);
+ // pageInfoClick.bind(this)();
+ break;
+ case BUTTON.ShowDraft: //显示草稿
+ this.setState({ showTemp: true });
+ break;
+ case BUTTON.showDraft: // 不同于上一个按钮此处不能删除
+ this.setState({ showTemp: true });
+ break;
+ case BUTTON.InsertLine: //物料插行
+ if (wbs && wbs.value) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000149')); /* 国际化处理: 计划编制生成的采购订单,不允许插行*/
+ return;
+ }
+ // props.cardTable.addRow(PAGECODE.cardbody, index);
+ props.cardTable.addRow(
+ PAGECODE.cardbody,
+ index,
+ { nitemdiscountrate: { display: '100.00', value: '100.00' } },
+ true
+ );
+ RownoUtils.setRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ break;
+ case BUTTON.Req_GenerateOrder: // 请购生成订单
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER20.GOTO20, { pagecode: TRANSFER20.PAGEID });
+ break;
+ case BUTTON.Pu_GenerateOrder: // 采购合同生成订单
+ requestCheckData.call(this, '4020', getLangByResId(this, '4004POORDER-000050'), () => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFERZ2.GOTOZ2, { pagecode: TRANSFERZ2.PAGEID });
+ });
+ break;
+ case BUTTON.D_Sale_GenerateOrder: // 直运销售生成订单
+ requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER30TO21.GOTO30SALE, { pagecode: TRANSFER30TO21.PAGEID });
+ });
+ break;
+ case BUTTON.Pu_co_GenerateOrder: // 销售协同生成订单
+ requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER30TO21COOP.GOTO30COOP, { pagecode: TRANSFER30TO21COOP.PAGEID });
+ });
+ break;
+ case BUTTON.replenishment: // 补货
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFERMULTI.GOTOMULTI, { pagecode: TRANSFERMULTI.PAGEID });
+ break;
+ case BUTTON.puinquiry: // 采购询价
+ pricequery.call(this);
+ break;
+ case BUTTON.checkpuinquiry: // 询协同售价
+ coopPriceQuery.call(this);
+ break;
+ case BUTTON.puinquirys: // 采购询价-侧拉
+ pricequery.call(this, index);
+ break;
+ case BUTTON.checkpuinquirys: // 询协同售价-侧拉
+ coopPriceQuery.call(this, index);
+ break;
+ case BUTTON.RefAddLind: // 参照增行
+ // clearTransferCache(this.props, OrderCache.OrderTransferCache);
+ clearTransferCache(this.props, OrderCache.OrderRefAdd20);
+ let initData = { pk_org: props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org) };
+ setDefData(OrderCache.OrderRefAdd20, 'initData', initData);
+ this.props.modal.show('RefAdd20Modal');
+ break;
+ case BUTTON.Payment_Plan: // 付款计划
+ payPlan.call(this, this.props);
+ break;
+ case BUTTON.arrival_plan: // 到货计划
+ let arriveRows = new Array();
+ let arriveInfo = {
+ pks: pk_order,
+ ts: ts
+ };
+ arriveRows.push(arriveInfo);
+ let arriveData = {
+ closedto: arriveRows,
+ pagecode: null,
+ extstr: null
+ };
+ commonCheckData.call(this, URL.arrivalplancheck, arriveData, () => {
+ let pk_org = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org).value;
+ let pk_customer = this.props.form.getFormItemsValue(PAGECODE.cardhead, 'pk_recvcustomer').value;
+ let pk_supplier = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_supplier).value;
+ this.pk_org = pk_org;
+ this.pk_customer = pk_customer;
+ this.pk_supplier = pk_supplier;
+ this.setState({ pk_order: pk_order, showModal: true });
+ });
+ break;
+ case BUTTON.OrderTOSaleBill: // 生成协同销售订单
+ requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
+ handleOrderBtn.call(
+ this,
+ URL.pushcoopsale,
+ getLangByResId(this, '4004POORDER-000030'),
+ ''
+ ); /* 国际化处理: 生成销售协同订单*/
+ });
+ break;
+ case BUTTON.Transport_State: // 运输状态
+ transportstatusquery.call(this);
+ break;
+ case BUTTON.PayExecStat: //付款执行情况
+ payExecStatBtnClick.call(this, this, props);
+ break;
+ case BUTTON.SetPiece: //成套件
+ setPieceBtnClick.call(this, props, record, index);
+ break;
+ case BUTTON.SupplementaryInfo: //辅助信息
+ supplmentaryinfoBtnClick.call(this, this.props, record, index);
+ break;
+ case BUTTON.Pricedetail: //价格详情
+ pricedetailBtnClick.call(this, this.props, record, index);
+ break;
+ case BUTTON.Bi_GenerateOrder: // 借入
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER49.GOTO49, { pagecode: TRANSFER49.PAGEID });
+ break;
+ case BUTTON.ToInformation: // 内部交易信息
+ bizInfoBtnClick.call(this, props);
+ break;
+ case LIST_BUTTON.printCountQuery: // 打印次数查询
+ let CONST = { hid: FIELD.pk_order, area: PAGECODE.cardhead };
+ printCountQuery.call(this, props, { type: 2, CONST, modal: 'code-config' });
+ break;
+ //导出
+ case LIST_BUTTON.Export:
+ this.props.modal.show('exportFileModal');
+ break;
+ case BUTTON.Fee_Addline: // 费用项肩部增行
+ let feerowCount = props.cardTable.getNumberOfRows(PAGECODE.card_fee);
+ props.cardTable.addRow(PAGECODE.card_fee, feerowCount, null, true);
+ RownoUtils.setRowNo(props, PAGECODE.card_fee, FIELD.crowno);
+ break;
+ case BUTTON.Fee_Deleteline: // 费用项肩部删行
+ let selectedRow = props.cardTable.getCheckedRows(PAGECODE.card_fee);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000029') /* 国际化处理: 请选择数据!*/
+ });
+ return;
+ }
+
+ let rowparam = [];
+ let datas = [];
+ selectedRow.forEach((item) => {
+ rowparam.push(item.index);
+ datas.push(item.data);
+ });
+ // 删除对应的费用明细
+ delFeeDetailByFee.call(this, props, datas);
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee, rowparam);
+ feeSelected(props);
+ break;
+ case BUTTON.Fee_Deleteline_row: // 费用项表体删行
+ // 删除对应的费用明细
+ delFeeDetailByFee.call(this, props, [ record ]);
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee, index);
+ feeSelected(props);
+ break;
+ case BUTTON.Fee_Resetno: // 费用项肩部重排行号
+ // 效率优化开启
+ props.beforeUpdatePage();
+ RownoUtils.resetRowNo(props, PAGECODE.card_fee, FIELD.crowno);
+ // 效率优化关闭
+ props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+ break;
+ case BUTTON.Fee_Detail_Addline: // 费用明细肩部增行
+ let bodyData = this.props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let tableData = [];
+ bodyData.forEach((item) => {
+ if (
+ item.values[FIELD.crowno] &&
+ item.values[FIELD.crowno].value &&
+ item.values[FIELD.pk_material] &&
+ item.values[FIELD.pk_material].value &&
+ item.values[FIELD.pk_materialfee] &&
+ item.values[FIELD.pk_materialdiscountflag] &&
+ !item.values[FIELD.pk_materialfee].value &&
+ !item.values[FIELD.pk_materialdiscountflag].value
+ ) {
+ tableData.push(item);
+ }
+ });
+ this.props.table.setAllTableData(PAGECODE.card_bodyModal, { rows: tableData });
+ this.setState({ showFeedetail: true });
+ break;
+ case BUTTON.Fee_Detail_Deleteline: // 费用明细肩部删行
+ let selectedRowde = props.cardTable.getCheckedRows(PAGECODE.card_fee_detail);
+ if (selectedRowde == null || selectedRowde.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000029') /* 国际化处理: 请选择数据!*/
+ });
+ return;
+ }
+ let derowparam = [];
+ selectedRowde.forEach((item) => {
+ derowparam.push(item.index);
+ });
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee_detail, derowparam);
+ feeDetailSelected(props);
+ break;
+ case BUTTON.Fee_Detail_Deleteline_row: // 费用明细表体删行
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee_detail, index);
+ feeDetailSelected(props);
+ break;
+ case BUTTON.Fee_Detail_Resetno: // 费用明细肩部重排行号
+ // 效率优化开启
+ props.beforeUpdatePage();
+ RownoUtils.resetRowNo(props, PAGECODE.card_fee_detail, FIELD.crowno);
+ // 效率优化关闭
+ props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+ break;
+ default:
+ break;
+ }
+ // 友云采按钮扩展 add by guozhq
+ if (YYC_BUTTON_ARRAY.includes(key)) {
+ orderYYCBtnClick.call(this, props, key, {
+ isCard: true,
+ cardheadarea: PAGECODE.cardhead,
+ billidField: FIELD.pk_order,
+ pageCode: PAGECODE.cardcode
+ });
+ }
+}
+
+function setPKempty(props, index) {
+ let empty = {
+ value: null,
+ display: null,
+ scale: '-1'
+ };
+ props.cardTable.setValByKeyAndIndex(PAGECODE.cardbody, index, 'pk_order_b', empty);
+}
+
+function materialSelected(props) {
+ let rowsflag = true;
+ let table = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ if (table && table.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.LinkPoPlan]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeSelected(props) {
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.card_fee);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.Fee_Deleteline]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeDetailSelected(props) {
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.card_fee_detail);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.Fee_Detail_Deleteline]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+function pasteBtnClick(props) {
+ RownoUtils.setRowNo(props, PAGECODE.cardbody, FIELD.crowno);
+ props.button.setButtonVisible(
+ [
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ // BUTTON.Correct,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.StockQuery,
+ BUTTON.SalesQuery,
+ BUTTON.GrossProfit
+ ],
+ true
+ );
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+function addOneNowRow(props, tableId) {
+ props.cardTable.addRow(tableId, 0, { crowno: { display: '10', value: '10' } }, false);
+}
+
+function delFeeDetailByBody(props, record) {
+ let data = [];
+ data = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0 && record && record.length > 0) {
+ record.forEach((reco) => {
+ data.forEach((item) => {
+ if (
+ (reco.values.pk_order_b && reco.values.pk_order_b.value == item.values.pk_order_b.value) ||
+ reco.rowid == item.values.pk_order_b.value
+ ) {
+ indexs.push(item.dataIndex);
+ }
+ });
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee_detail, indexs);
+ }
+}
+
+function delFeeDetailByFee(props, record) {
+ let data = [];
+ data = props.cardTable.getVisibleRows(PAGECODE.card_fee_detail);
+ let indexs = [];
+ if (data && data.length > 0 && record && record.length > 0) {
+ // foreach没有返回值
+ record.forEach((reco) => {
+ if (
+ reco.values.cfeematerialvid.value != null &&
+ reco.values.cfeematerialvid.value != '' &&
+ reco.values.cfeesuppliervid.value != null &&
+ reco.values.cfeesuppliervid.value != ''
+ ) {
+ let key = reco.values.cfeematerialvid.value + reco.values.cfeesuppliervid.value;
+ data.forEach((item) => {
+ if (
+ item.values.cfeematerialvid.value != null &&
+ item.values.cfeematerialvid.value != '' &&
+ item.values.cfeesuppliervid.value != null &&
+ item.values.cfeesuppliervid.value != ''
+ ) {
+ if (key == item.values.cfeematerialvid.value + item.values.cfeesuppliervid.value) {
+ indexs.push(item.dataIndex);
+ }
+ }
+ });
+ }
+ });
+ }
+ if (indexs.length > 0) {
+ props.cardTable.delRowsByIndex(PAGECODE.card_fee_detail, indexs);
+ }
+}
+
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/viewController/buttonController.js b/src/pu/pu/poorder/card/viewController/buttonController.js
new file mode 100644
index 0000000..cd750ac
--- /dev/null
+++ b/src/pu/pu/poorder/card/viewController/buttonController.js
@@ -0,0 +1,1053 @@
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 根据页面状态,修改页面及按钮状态
+ * @Date: 2018-05-25 17:29:25
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-12-05 18:59:39
+ */
+import {
+ URL,
+ PAGECODE,
+ BUTTON,
+ STATUS,
+ FIELD,
+ TRANSFER20,
+ TRANSFER,
+ TRANSFER30TO21COOP,
+ OrderCache,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFERMULTI,
+ TRANSFER49
+} from '../../constance';
+import {
+ getDefData,
+ getCurrentLastId,
+ getCacheDataByPk,
+ changeUrlParam,
+ setDefData
+} from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils';
+import { pageInfoClick, refresh } from '../btnClicks/index';
+import { showSuccessInfo, showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { orderBtnControl } from '../../../yyc/ext/yycBtnControl';
+
+function setOprationBtnsRenderStatus(props) {
+ props.button.setOprationBtnsRenderStatus([ PAGECODE.material_table_row ], false);
+}
+
+/**
+ * 获取付款协议表格行操作按钮
+ * @param {*} props
+ */
+function getPayMentOprButton(props) {
+ let paymentStatus = props.cardTable.getStatus(PAGECODE.head_payment);
+ let buttonAryp = paymentStatus != STATUS.browse ? [ BUTTON.Pay_DeleteLine ] : [];
+ return buttonAryp;
+}
+
+/**
+ * 获取费用项表格行操作按钮
+ * @param {*} props
+ */
+function getFeeMentOprButton(props) {
+ let paymentStatus = props.cardTable.getStatus(PAGECODE.card_fee);
+ let buttonAryp = paymentStatus != STATUS.browse ? [ BUTTON.Fee_Deleteline_row ] : [];
+ return buttonAryp;
+}
+
+/**
+ * 获取费用明细表格行操作按钮
+ * @param {*} props
+ */
+function getFeeDetailMentOprButton(props) {
+ let paymentStatus = props.cardTable.getStatus(PAGECODE.card_fee_detail);
+ let buttonAryp = paymentStatus != STATUS.browse ? [ BUTTON.Fee_Detail_Deleteline_row ] : [];
+ return buttonAryp;
+}
+
+/**
+ * 获取物料表格行操作按钮
+ * @param {*} props
+ * @param {*} record
+ */
+function getMaterialOprButtons(props, record) {
+ let buttonAry = [];
+ let forderstatus = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.forderstatus); //单据状态
+ let barriveclose = record.values.barriveclose.value; // 到货关闭
+ let bstockclose = record.values.bstockclose.value; // 入库关闭
+ let binvoiceclose = record.values.binvoiceclose.value; // 收票关闭
+ let bpayclose = record.values.bpayclose.value; // 付款关闭
+ if (this.props.cardTable.getStatus(PAGECODE.cardbody) === STATUS.browse) {
+ buttonAry = [ BUTTON.openbrowse, BUTTON.SetPiece, BUTTON.SupplementaryInfo, BUTTON.Pricedetail ];
+ if (forderstatus && forderstatus.value == FIELD.approved) {
+ if (barriveclose && bstockclose && binvoiceclose && bpayclose) {
+ buttonAry = [
+ BUTTON.openbrowse,
+ BUTTON.RowOpen,
+ BUTTON.SetPiece,
+ BUTTON.SupplementaryInfo,
+ BUTTON.Pricedetail
+ ];
+ } else {
+ buttonAry = [
+ BUTTON.openbrowse,
+ BUTTON.RowClose,
+ BUTTON.SetPiece,
+ BUTTON.SupplementaryInfo,
+ BUTTON.Pricedetail
+ ];
+ }
+ }
+ } else {
+ if (this.copyRowDatas == null) {
+ // 协同生成订单不显示插行
+ if (this.props.getUrlParam(TRANSFER.transfer) == TRANSFER30TO21COOP.CSOURCETYPECODE) {
+ buttonAry = [
+ BUTTON.openedit,
+ BUTTON.Material_DeleteLine,
+ BUTTON.SetPiece,
+ BUTTON.SupplementaryInfo,
+ BUTTON.Pricedetail
+ ];
+ } else {
+ buttonAry = [
+ BUTTON.openedit,
+ BUTTON.Material_DeleteLine,
+ BUTTON.CopyLine_row,
+ BUTTON.InsertLine,
+ BUTTON.SetPiece,
+ BUTTON.SupplementaryInfo,
+ BUTTON.Pricedetail
+ ];
+ }
+ } else {
+ buttonAry = [ BUTTON.PasteThis ];
+ }
+ }
+ return buttonAry;
+}
+
+/**
+ * 订单页面按钮主控方法
+ * @param {*} props
+ * @param {*} type
+ * @param {*} pk_org_v
+ */
+function togglePageShow(props, type, pk_org_v) {
+ props.beforeUpdatePage();
+ props.button.setButtonVisible([ BUTTON.ShowDraft ], true);
+ //add by zhaochyu 修改状态暂存按钮不可用
+ let tempstatus = props.getUrlParam(STATUS.tempstatus);
+ if (tempstatus == STATUS.edit) {
+ props.button.setDisabled({ [BUTTON.TemporaryStorage]: true });
+ }
+ //转单或推单标识
+ let transfer = props.getUrlParam(TRANSFER.transfer);
+ let channelType = props.getUrlParam(TRANSFER.channelType);
+ transfer = transfer == null ? channelType : transfer;
+ let pk_order = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ // 已保存过的数据有主键,如果没有取url中的id
+ pk_order = pk_order == null ? props.getUrlParam(FIELD.id) : pk_order;
+ pk_order = pk_order == '' || pk_order == 'null' ? null : pk_order;
+ //场景参数
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ let status = props.getUrlParam(STATUS.status); //拉单或是推单时参数没有status
+ status = status == null || transfer != null ? props.form.getFormStatus(PAGECODE.cardhead) : status;
+ // 转单已保存的显示为浏览态
+ status = transfer && pk_order ? STATUS.browse : transfer ? STATUS.edit : status;
+ // 转单已经保存过的数据点击修改触发
+ status = type == STATUS.edit ? STATUS.edit : status;
+ // 采购订单新增页面默认进入即编辑
+ status = scene == 'ADD' && !pk_order && !props.getUrlParam(STATUS.status) ? STATUS.edit : status;
+ // status = scene == 'ADD' && !pk_order ? STATUS.edit : status;
+ let bodyVals = props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ //只有参照请购单且非浏览态时显示参照增行按钮
+ let refAddLindShow = false;
+ if (props.getUrlParam(TRANSFER.transfer) == TRANSFER20.CSOURCETYPECODE && status != STATUS.browse) {
+ refAddLindShow = true;
+ // props.button.setButtonVisible([ BUTTON.RefAddLind ], true);
+ } else {
+ // 编辑态且表体来源是请购单的显示参照增行
+ if (status == STATUS.edit && bodyVals) {
+ bodyVals.map((item) => {
+ if (!refAddLindShow) {
+ let csourcetypecode =
+ item.values && item.values.csourcetypecode && item.values.csourcetypecode.value;
+ if (csourcetypecode == '20') {
+ refAddLindShow = true;
+ }
+ }
+ });
+ }
+ }
+ props.button.setButtonVisible([ BUTTON.RefAddLind ], refAddLindShow);
+ if (transfer != null && type != BUTTON.Copy && !channelType) {
+ // 退出转单需求变更,推单不需要这个按钮 add By CongKe
+ props.button.setButtonVisible([ BUTTON.QuitTransferBill ], true);
+ } else {
+ // 转单的按钮-->退出转单
+ props.button.setButtonVisible([ BUTTON.QuitTransferBill ], false);
+ }
+ let flag = false;
+ let org_flag = true;
+ if (status != STATUS.browse) {
+ status = STATUS.edit;
+ //表格改为编辑态
+ flag = true;
+ org_flag = pk_order != null || transfer != null ? true : false;
+ pk_org_v = pk_org_v == null ? getDefData(OrderCache.OrderCardCache, FIELD.pk_org_v) : pk_org_v;
+ if (type == null && transfer == null && pk_org_v == null && pk_order == null) {
+ props.initMetaByPkorg(FIELD.pk_org_v);
+ props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.forderstatus]: {
+ value: '0',
+ display: getLangByResId(this, '4004POORDER-000020')
+ } /* 国际化处理: 自由*/
+ });
+ }
+ }
+ if (pk_order == null && status == STATUS.edit) {
+ //当页面为编辑态且主键为空时释放主组织的编辑性
+ props.form.setFormItemsDisabled(PAGECODE.cardhead, { pk_org_v: false });
+ }
+ props.button.setButtonVisible([ BUTTON.SupplierAp ], true);
+
+ if (pk_order == null && status == STATUS.browse) {
+ //当页面为浏览态且没有主键时不显示联查供应商应付
+ props.button.setButtonVisible([ BUTTON.SupplierAp ], false);
+ }
+ if (!transfer && type == BUTTON.Copy && !channelType) {
+ // 显示暂存
+ props.button.setDisabled({ [BUTTON.TemporaryStorage]: false });
+ }
+ // if (pk_order != null && status == STATUS.edit) {
+ // // 保存后 再点修改 暂存不可用
+ // props.button.setDisabled({ [BUTTON.TemporaryStorage]: true });
+ // }
+ //edit
+ props.button.setButtonVisible(
+ [
+ BUTTON.Save,
+ BUTTON.TemporaryStorage,
+ BUTTON.SaveCommit,
+ BUTTON.Cancel,
+ BUTTON.Pay_Addline,
+ BUTTON.Pay_DeleteLine,
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ // BUTTON.Correct,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.CopyLine_row,
+ BUTTON.InsertLine,
+ BUTTON.Card_Fee_Group,
+ BUTTON.Card_Fee_Detail_Group,
+ BUTTON.Fee_Detail_Resetno,
+ BUTTON.Fee_Resetno
+ // BUTTON.ShowDraft,
+ ],
+ flag
+ );
+ props.button.setButtonVisible(
+ [
+ BUTTON.PasteLast,
+ BUTTON.PasteCancel,
+ BUTTON.LinkPoPlan,
+ BUTTON.Fee_PasteLast,
+ BUTTON.Fee_PasteCancel,
+ BUTTON.Fee_Detail_PasteLast,
+ BUTTON.Fee_Detail_PasteCancel
+ ],
+ false
+ );
+ //browse
+ if (!transfer) {
+ //正常页面
+ let new_pk_order = pk_order || getCurrentLastId(OrderCache.OrderCacheKey);
+ let commonflag = !flag;
+ if (new_pk_order == null) {
+ //当前卡片和列表均无数据
+ commonflag = false;
+ }
+ props.button.setButtonVisible(
+ [
+ BUTTON.Edit,
+ BUTTON.Delete,
+ BUTTON.Copy,
+ BUTTON.Commit,
+ BUTTON.print,
+ BUTTON.printCountQuery,
+ BUTTON.Refresh,
+ BUTTON.LinkPoPlan
+ ],
+ commonflag
+ );
+ let refBillDataCach = getDefData(OrderCache.refBillDataCach, 'refBillDataCach');
+ let isshowselfmake = !flag;
+ refBillDataCach &&
+ refBillDataCach.forEach((element) => {
+ if (element && element.makeflag) {
+ // 可自制
+ isshowselfmake = true;
+ }
+ });
+ props.button.setButtonVisible([ BUTTON.selfmake ], isshowselfmake);
+ props.button.setButtonVisible([ BUTTON.Add ], !flag);
+ } else {
+ //拉单推单
+ props.button.setButtonVisible(
+ [
+ BUTTON.Edit,
+ BUTTON.Delete,
+ BUTTON.Commit,
+ BUTTON.print,
+ BUTTON.printCountQuery,
+ BUTTON.Refresh,
+ BUTTON.LinkPoPlan
+ ],
+ !flag
+ );
+ //add by zhaochyu 退单拉单没有暂存按钮
+ props.button.setButtonVisible([ BUTTON.TemporaryStorage, BUTTON.ShowDraft ], false);
+ // 转单的数据不显示新增下拉组和复制
+ props.button.setButtonVisible([ BUTTON.Add, BUTTON.Copy ], false);
+ //平台现在还有问题,需手动激活按钮组
+ props.button.setButtonVisible([ BUTTON.Head_Group2 ], !flag);
+ }
+ let bfrozen = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.bfrozen); //冻结
+ bfrozen = bfrozen && bfrozen.value == true ? true : false;
+ if (bfrozen) {
+ props.button.setButtonVisible([ BUTTON.Freeze ], false);
+ props.button.setButtonVisible([ BUTTON.UnFreeze ], true);
+ // props.button.setButtonVisible([ BUTTON.print ], true);
+ // props.button.setButtonVisible([ BUTTON.printCountQuery ], true);
+ } else {
+ props.button.setButtonVisible([ BUTTON.Freeze ], true);
+ props.button.setButtonVisible([ BUTTON.UnFreeze ], false);
+ }
+ let printdisable = {
+ [BUTTON.print]: bfrozen == true ? true : false,
+ [BUTTON.PrintOut]: bfrozen == true ? true : false,
+ [BUTTON.printCountQuery]: bfrozen == true ? true : false,
+ [BUTTON.CombineShow]: bfrozen == true ? true : false
+ };
+ // 冻结不显示打印
+ props.button.setDisabled(printdisable);
+ // free: '0', //单据状态 自由 commit: '1', //提交 approve: '2', //审批中 approved: '3',审批通过
+ // unapproved: '4', //审批不通过
+ let forderstatus = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.forderstatus); //单据状态
+ let revisionstatus = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.revisionstatus); //单据状态
+ let approver = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.approver); //审批人
+ //最终关闭
+ let bfinalclose = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.bfinalclose);
+ let close_f = false;
+ let open_f = false;
+ if (forderstatus) {
+ if (forderstatus.value == FIELD.unapproved) {
+ props.button.setButtonVisible([ BUTTON.Delete, BUTTON.Commit ], false);
+ }
+ let f_flag = false;
+ if (forderstatus.value == FIELD.approved) {
+ f_flag = true;
+ if (bfinalclose && bfinalclose.value == true) {
+ open_f = true;
+ } else {
+ close_f = true;
+ }
+ }
+ if (forderstatus.value == FIELD.approve || forderstatus.value == FIELD.approved) {
+ props.button.setButtonVisible([ BUTTON.Edit, BUTTON.Delete, BUTTON.Commit ], false);
+ //审批中+浏览态+在审批中心才可修改( scene=approvesce)
+ if (status == STATUS.browse && scene == 'approvesce' && forderstatus.value == FIELD.approve) {
+ if (revisionstatus.value == '0') {
+ props.button.setButtonVisible([ BUTTON.Edit ], false);
+ } else {
+ props.button.setButtonVisible([ BUTTON.Edit ], true);
+ }
+ }
+ if (approver || approver.value == null) {
+ props.button.setButtonVisible([ BUTTON.UnCommit ], true);
+ } else {
+ props.button.setButtonVisible([ BUTTON.UnCommit ], false);
+ }
+ } else {
+ props.button.setButtonVisible([ BUTTON.UnCommit ], false);
+ }
+ //付款计划、生成协同销售订单、运输状态、付款执行情况
+ props.button.setButtonVisible(
+ [ BUTTON.Payment_Plan, BUTTON.OrderTOSaleBill, BUTTON.Transport_State, BUTTON.PayExecStat ],
+ f_flag
+ );
+ // props.button.setButtonVisible(
+ // [BUTTON.PayExecStat ],
+ // f_flag
+ // );
+ }
+ props.button.setButtonVisible([ BUTTON.OpenBill ], open_f);
+ props.button.setButtonVisible([ BUTTON.CloseBill ], close_f);
+ let flag1;
+ if (status == STATUS.edit || !pk_order) {
+ flag1 = false;
+ } else {
+ flag1 = true;
+ }
+ props.button.setButtonVisible([ BUTTON.QueryAboutBusiness, BUTTON.ApproveInfo, BUTTON.Auxiliary ], flag1);
+ props.cardTable.setStatus(PAGECODE.cardbody, status);
+ props.cardTable.setStatus(PAGECODE.head_payment, status);
+ props.cardTable.setStatus(PAGECODE.card_fee, status);
+ props.cardTable.setStatus(PAGECODE.card_fee_detail, status);
+ props.form.setFormStatus(PAGECODE.cardhead, status);
+ //修改组织的可编辑状态
+ props.form.setFormItemsDisabled(PAGECODE.cardhead, { [FIELD.pk_org_v]: org_flag });
+ //设置看片翻页的显隐性
+ let isshow = pk_order == null ? false : !flag;
+ isshow = scene == 'ADD' || scene == 'approvesce' ? false : isshow;
+ props.cardPagination.setCardPaginationVisible('cardPaginationBtn', isshow);
+ //物料按钮
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let linkPlanFlag = true;
+ if (rowsdata.length > 0 && status == STATUS.browse) {
+ linkPlanFlag = false;
+ }
+ let pk_org_v_v = props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_org_v);
+ pk_org_v_v = pk_org_v_v && pk_org_v_v.value;
+ let disableArr = {
+ [BUTTON.Material_AddLine]: pk_org_v_v == null ? true : !flag,
+ [BUTTON.Pay_Addline]: pk_org_v_v == null ? true : !flag,
+ [BUTTON.Resetno]: pk_org_v_v == null ? true : !flag,
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag,
+ [BUTTON.LinkPoPlan]: linkPlanFlag
+ };
+ let disableFeeArr = {
+ [BUTTON.Fee_Deleteline]: true,
+ [BUTTON.Fee_Detail_Deleteline]: true
+ };
+ props.button.setDisabled(disableArr);
+ props.button.setDisabled(disableFeeArr);
+ // 协同生成订单不显示增行和复制行
+ props.button.setButtonVisible(
+ [ BUTTON.Material_AddLine, BUTTON.copyline ],
+ transfer == TRANSFER30TO21COOP.CSOURCETYPECODE ? false : flag
+ );
+ // linksce 单据追溯 freeze 冻结小应用
+ scene = scene == 'linksce' || scene == 'freeze' ? null : scene;
+ let isBackBtnEnable = status == STATUS.browse && scene == null;
+ isBackBtnEnable = scene == 'ADD' ? false : isBackBtnEnable;
+ isBackBtnEnable = scene == 'workbench' ? true : isBackBtnEnable;
+ isBackBtnEnable = transfer != null ? true : isBackBtnEnable; //拉单推单任何情况都要返回
+ props.BillHeadInfo.setBillHeadInfoVisible({
+ showBackBtn: scene == 'ADD' || scene == 'approvesce' ? false : isBackBtnEnable,
+ showBillCode: true,
+ billCode: props.form.getFormItemsValue([ PAGECODE.cardhead ], FIELD.vbillcode).value //修改单据号---非必传
+ });
+ // 付款协议为空时收起
+ //add by zhaochyu
+ // props.button.setButtonVisible([BUTTON.ShowDraft], true);
+ //----START 友云采按钮控制 add by guozhq-------
+ orderBtnControl(props, {
+ isCard: true,
+ cardHeadArea: PAGECODE.cardhead,
+ billStatusField: FIELD.forderstatus,
+ pk_orderField: FIELD.pk_order,
+ status: status
+ });
+ //----END-------------------------------
+ //-----新增时,执行光标聚焦---------------------
+ if (pk_order == null && status != STATUS.browse) {
+ props.executeAutoFocus();
+ }
+ //设置saga相关按钮状态
+ setSagaBtnState(props, status);
+ let _this = this;
+ let tabkey = _this.tabKey;
+ //表体肩部按钮显隐控制
+ tabChange.call(_this, props, null, tabkey, { channelType, status });
+ props.button.setButtonVisible([ BUTTON.Correct ], false);
+ // 复制时设置主组织编辑性,前边逻辑太乱,无法捋清楚,在这里通过type==copy统一处理
+ if (type == BUTTON.Copy) {
+ props.form.setFormItemsDisabled(PAGECODE.cardhead, { [FIELD.pk_org_v]: true });
+ }
+ props.updatePage(PAGECODE.cardhead, [
+ PAGECODE.head_payment,
+ PAGECODE.cardbody,
+ PAGECODE.card_fee,
+ PAGECODE.card_fee_detail
+ ]);
+}
+
+/**
+ * 卡片共享页签切换事件
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} key
+ */
+function tabChange(props, moduleId, key, params = { channelType: '', status: '' }) {
+ let { channelType, status } = params;
+ let status1 = props.getUrlParam(STATUS.status);
+ if (status == '') {
+ status = status1;
+ }
+ let flag = false;
+ if (channelType == TRANSFER.priceaudit && PAGECODE.cardbody == key && STATUS.browse != status) {
+ // 价格审批单走这里
+ flag = true;
+ } else if (PAGECODE.cardbody == key && STATUS.browse != status) {
+ flag = true;
+ }
+ if (PAGECODE.cardbody != key) {
+ props.button.setButtonVisible([ BUTTON.StockQuery ], false);
+ props.button.setButtonVisible([ BUTTON.SalesQuery ], false);
+ props.button.setButtonVisible([ BUTTON.GrossProfit ], false);
+ props.button.setButtonVisible([ BUTTON.LinkPoPlan ], false);
+ } else {
+ props.button.setButtonVisible([ BUTTON.StockQuery ], true);
+ props.button.setButtonVisible([ BUTTON.SalesQuery ], true);
+ props.button.setButtonVisible([ BUTTON.GrossProfit ], true);
+ if (status == STATUS.browse) {
+ props.button.setButtonVisible([ BUTTON.LinkPoPlan ], true);
+ } else {
+ props.button.setButtonVisible([ BUTTON.LinkPoPlan ], false);
+ }
+ }
+ if (key == PAGECODE.card_fee) {
+ let pk_org_v = props.form.getFormItemsValue([ PAGECODE.cardhead ], FIELD.pk_org_v).value;
+ if (!pk_org_v) {
+ props.button.setDisabled({ [BUTTON.Fee_Resetno]: true });
+ props.button.setDisabled({ [BUTTON.Fee_Addline]: true });
+ } else {
+ props.button.setDisabled({ [BUTTON.Fee_Resetno]: false });
+ props.button.setDisabled({ [BUTTON.Fee_Addline]: false });
+ }
+ }
+ if (key == PAGECODE.card_fee_detail) {
+ let pk_org_v = props.form.getFormItemsValue([ PAGECODE.cardhead ], FIELD.pk_org_v).value;
+ if (!pk_org_v) {
+ props.button.setDisabled({ [BUTTON.Fee_Detail_Resetno]: true });
+ props.button.setDisabled({ [BUTTON.Fee_Detail_Addline]: true });
+ } else {
+ props.button.setDisabled({ [BUTTON.Fee_Detail_Resetno]: false });
+ props.button.setDisabled({ [BUTTON.Fee_Detail_Addline]: false });
+ }
+ }
+ props.button.setButtonVisible([ BUTTON.Card_Body_Group1, BUTTON.Card_Body_Group2, BUTTON.Resetno ], flag);
+ metarialSelected.call(this, props);
+ metarialAllSelected.call(this, props);
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function metarialSelected(props) {
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag,
+ [BUTTON.LinkPoPlan]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+ // 设置现存量组件数据,单选时取当前行数据,多选时默认取第一行数据
+ let index = props.cardTable.getCurrentIndex(PAGECODE.cardbody);
+ let checkrows = [];
+ for (let i = 0; i < rowsdata.length; i++) {
+ checkrows.push(rowsdata[i].data.rowId);
+ }
+ if (this.showDragCom) {
+ // 选中行的情况
+ if (index == 0 || index) {
+ let record = props.cardTable.getDataByIndex(PAGECODE.cardbody, index);
+ if (checkrows.indexOf(record.rowId) != -1) {
+ if (!record.values[FIELD.pk_material].value) {
+ this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ } else {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: record.values
+ });
+ this.click = record;
+ }
+ }
+ // 取消选中的情况
+ } else {
+ // 全部取消选中
+ if (!checkrows || checkrows.length < 1) {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ // 否则取第一行的数据
+ } else {
+ if (!rowsdata[0].data.values[FIELD.pk_material].value) {
+ this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ } else {
+ props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: rowsdata[0].data.values
+ });
+ this.click = rowsdata[0].data;
+ }
+ }
+ }
+ }
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function metarialAllSelected(props) {
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag,
+ [BUTTON.LinkPoPlan]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+ // 设置现存量组件数据,单选时取当前行数据,多选时默认取第一行数据
+ if (!rowsdata || rowsdata.length < 1) {
+ if (this.showDragCom) {
+ this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ }
+ } else {
+ if (this.showDragCom) {
+ if (!rowsdata[0].data.values[FIELD.pk_material].value) {
+ this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: {}
+ });
+ this.click = {};
+ } else {
+ this.props.smartCard.setCardProps('smartCard', 'atp', {
+ rowData: rowsdata[0].data.values
+ });
+ this.click = rowsdata[0].data;
+ }
+ }
+ }
+}
+
+function onCheckRows(props) {
+ let checkedRows = props.cardTable.getCheckedRows(PAGECODE.cardbody);
+ let checkedIndex = [];
+ if (checkedRows && checkedRows.length > 0) {
+ checkedRows.forEach((item) => {
+ if (item.data.values.blargess && item.data.values.blargess.value == false) {
+ checkedIndex.push(item.index);
+ }
+ });
+ }
+ return checkedIndex;
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeSelected(props) {
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.card_fee);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.Fee_Deleteline]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/**
+ * 物料表格勾选事件
+ * @param {*} props
+ */
+function feeDetailSelected(props) {
+ let rowsdata = props.cardTable.getCheckedRows(PAGECODE.card_fee_detail);
+ let rowsflag = true;
+ if (rowsdata.length > 0) {
+ rowsflag = false;
+ }
+ let disableArr = {
+ [BUTTON.Fee_Detail_Deleteline]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/**
+ * 物料肩部按钮初始化
+ * @param {*} props
+ */
+function materialButtonInit(props) {
+ let rowsflag = true;
+ let disableArr = {
+ [BUTTON.materialDeleteLine]: rowsflag,
+ [BUTTON.copyline]: rowsflag,
+ [BUTTON.puinquiry]: rowsflag,
+ [BUTTON.checkpuinquiry]: rowsflag,
+ [BUTTON.StockQuery]: rowsflag,
+ [BUTTON.SalesQuery]: rowsflag,
+ [BUTTON.GrossProfit]: rowsflag,
+ [BUTTON.LinkPoPlan]: rowsflag
+ };
+ props.button.setDisabled(disableArr);
+}
+
+/**
+ * 判断付款协议是否展开
+ * @param {*} props
+ */
+function paymentShow(props) {
+ // 需求(刘兰娇)变更为不处理
+ return;
+ let payShow = false;
+ let payTable = props.cardTable.getVisibleRows(PAGECODE.head_payment);
+ if (payTable && payTable.length > 0) {
+ payShow = true;
+ }
+ props.cardTable.toggleCardTable(PAGECODE.head_payment, payShow);
+}
+
+function cachedata() {
+ this.props.form.setFormStatus(PAGECODE.cardhead, STATUS.edit);
+ return;
+ // 转单标识
+ let transfer = this.props.getUrlParam(TRANSFER.transfer);
+ if (transfer == null) {
+ transfer = this.props.getUrlParam(TRANSFER.channelType);
+ }
+ if (transfer) {
+ let headVals = this.props.form.getAllFormValue(PAGECODE.cardhead);
+ let bodyVals = this.props.cardTable.getVisibleRows(PAGECODE.cardbody);
+ let pay = this.props.cardTable.getVisibleRows(PAGECODE.head_payment);
+ let curindex = parseInt(this.curindex);
+ let transferData = {};
+ let head = { card_head: { rows: headVals.rows } };
+ let body = { card_material: { rows: bodyVals } };
+ if (pay && pay.length > 0) {
+ body.card_payment = { rows: pay };
+ } else {
+ body.card_payment = { rows: [], areacode: PAGECODE.head_payment };
+ }
+ transferData.head = head;
+ transferData.body = body;
+ this.props.transferTable.setTransferListValueByIndex(PAGECODE.leftarea, transferData, curindex);
+ }
+}
+
+/**
+ * 物料表体复制取消
+ * @param {*} props
+ */
+function materialPasteCancel(props) {
+ props.button.setButtonVisible(
+ [
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ // BUTTON.Correct,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.CopyLine_row,
+ BUTTON.InsertLine,
+ BUTTON.Material_DeleteLine,
+ BUTTON.StockQuery,
+ BUTTON.SalesQuery,
+ BUTTON.GrossProfit,
+ BUTTON.Card_Fee_Group,
+ BUTTON.Card_Fee_Detail_Group,
+ BUTTON.Fee_Detail_Resetno,
+ BUTTON.Fee_Resetno
+ ],
+ true
+ );
+ props.button.setButtonVisible(
+ [
+ BUTTON.PasteThis,
+ BUTTON.PasteLast,
+ BUTTON.PasteCancel,
+ BUTTON.Fee_PasteThis,
+ BUTTON.Fee_PasteLast,
+ BUTTON.Fee_PasteCancel,
+ BUTTON.Fee_Detail_PasteThis,
+ BUTTON.Fee_Detail_PasteLast,
+ BUTTON.Fee_Detail_PasteCancel
+ ],
+ false
+ );
+ rowCopyPasteUtils.cancel.call(
+ this,
+ props,
+ PAGECODE.cardbody,
+ BUTTON.materialCardInitBtn,
+ BUTTON.materialCardPastBtn
+ );
+}
+
+function doCancel(props, flag, currentindex) {
+ const { setStatus } = this.props.cardTable;
+ const { setFormStatus } = this.props.form;
+ // 卡片界面,在浏览态时勾选行,点修改后去掉勾选,付款协议和物料
+ setDefData(OrderCache.OrderCardCache, 'tempsave', false);
+ props.cardTable.selectAllRows(PAGECODE.head_payment, false);
+ props.cardTable.selectAllRows(PAGECODE.cardbody, false);
+ //回到页面上次状态
+ let type = this.props.getUrlParam(TRANSFER.transfer);
+ let channelType = this.props.getUrlParam(TRANSFER.channelType);
+ type = type == null ? channelType : type;
+ let pk_order = this.props.getUrlParam(FIELD.id);
+ if (pk_order == null || pk_order == 'undefined' || pk_order == 'null') {
+ pk_order = this.props.form.getFormItemsValue(PAGECODE.cardhead, FIELD.pk_order);
+ pk_order = pk_order && pk_order.value;
+ }
+ materialPasteCancel.call(this, this.props);
+ pk_order = pk_order == 'undefined' ? null : pk_order;
+ pk_order = flag == 'error' ? null : pk_order;
+ if (type) {
+ this.indexstatus[currentindex] = 'browse';
+ if (props.transferTable.getTransformFormCompleteStatus(PAGECODE.leftarea, parseInt(currentindex)) == true) {
+ changeUrlParam(this.props, { status: STATUS.browse, id: pk_order });
+ refresh.call(this, this.props, pk_order, false);
+ } else {
+ if (props.transferTable.getTransformFormAmount(PAGECODE.leftarea) == 1) {
+ // 移除浏览器监听提示
+ window.removeEventListener('beforeunload', this.onMove);
+ if (channelType) {
+ // add by CongKe 推单取消需求变更
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ } else {
+ //页面回退 处理拉单
+ gobackTransferPage.call(this, props, type);
+ }
+ } else {
+ props.transferTable.setTransformFormStatus(PAGECODE.leftarea, {
+ status: false,
+ onChange: (current, next) => {
+ showSuccessInfo(null, getLangByResId(this, '4004POORDER-000032')); /* 国际化处理: 取消成功*/
+ }
+ });
+ }
+ }
+ } else {
+ this.props.resMetaAfterPkorgEdit();
+ this.props.form.cancel(PAGECODE.cardhead);
+ this.props.cardTable.resetTableData(PAGECODE.cardbody);
+ this.props.cardTable.resetTableData(PAGECODE.head_payment);
+ this.props.cardTable.resetTableData(PAGECODE.card_fee);
+ this.props.cardTable.resetTableData(PAGECODE.card_fee_detail);
+ // 缓存处理 begin
+ pk_order = this.props.getUrlParam(FIELD.id);
+ pk_order = pk_order == 'null' ? null : pk_order;
+ let copy = this.props.getUrlParam('copyType');
+ if (copy == 'Y') {
+ pk_order = pk_order == null ? getDefData(OrderCache.OrderCardCache, 'copypk') : pk_order;
+ } else {
+ pk_order = pk_order == null ? getCurrentLastId(OrderCache.OrderCacheKey) : pk_order;
+ }
+ pk_order = flag == 'error' ? null : pk_order;
+ if (pk_order != null && pk_order != 'null') {
+ let cardData = getCacheDataByPk(props, OrderCache.OrderCacheKey, pk_order);
+ // 先从缓存中获取,缓存中有,使用缓存中的,缓存中没有,发请求查询
+ if (cardData) {
+ this.props.form.setAllFormValue({ [PAGECODE.cardhead]: cardData.head[PAGECODE.cardhead] });
+ this.props.cardTable.setTableData(PAGECODE.head_payment, cardData.bodys[PAGECODE.head_payment]);
+ this.props.cardTable.setTableData(PAGECODE.cardbody, cardData.bodys[PAGECODE.cardbody]);
+ if (cardData.bodys && cardData.bodys[PAGECODE.card_fee]) {
+ this.props.cardTable.setTableData(PAGECODE.card_fee, cardData.bodys[PAGECODE.card_fee]);
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] });
+ }
+ if (cardData.grandSons && cardData.grandSons[PAGECODE.card_fee_detail]) {
+ this.props.cardTable.setTableData(
+ PAGECODE.card_fee_detail,
+ cardData.grandSons[PAGECODE.card_fee_detail]
+ );
+ } else {
+ this.props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] });
+ }
+ } else {
+ changeUrlParam(this.props, { status: STATUS.browse });
+ pageInfoClick.call(this, this.props, pk_order);
+ }
+ } else {
+ props.form.EmptyAllFormValue(PAGECODE.cardhead); //订单
+ //执行跳出堆栈
+ props.cardTable.setTableData(PAGECODE.head_payment, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.cardbody, { rows: [] }); //物料
+ props.cardTable.setTableData(PAGECODE.card_fee, { rows: [] }); //付款
+ props.cardTable.setTableData(PAGECODE.card_fee_detail, { rows: [] }); //物料
+ props.form.setFormItemsValue(PAGECODE.cardhead, {
+ [FIELD.forderstatus]: {
+ value: '0',
+ display: getLangByResId(this, '4004POORDER-000020')
+ } /* 国际化处理: 自由*/
+ });
+ }
+ // 缓存处理 end
+ // 取消时,放开对组织的控制,
+ props.form.setFormItemsDisabled(PAGECODE.cardhead, { pk_org_v: false });
+ // 将页面状态置为浏览态
+ props.form.setFormStatus(PAGECODE.cardhead, STATUS.browse);
+ // this.props.pushTo(URL.gotoCard, { status: STATUS.browse, id: pk_order, pagecode: PAGECODE.cardcode });
+ changeUrlParam(this.props, { status: STATUS.browse, id: pk_order, pagecode: PAGECODE.cardcode });
+ togglePageShow.call(this, this.props, null);
+ }
+}
+
+function showEmptyBrowsePage() {
+ this.props.button.setButtonVisible(
+ [
+ BUTTON.Save,
+ BUTTON.TemporaryStorage,
+ BUTTON.Commit,
+ BUTTON.SaveCommit,
+ BUTTON.Cancel,
+ BUTTON.Edit,
+ BUTTON.Delete,
+ BUTTON.Copy,
+ BUTTON.Auxiliary,
+ BUTTON.LinkQuery,
+ BUTTON.print,
+ BUTTON.printCountQuery,
+ BUTTON.Refresh,
+ BUTTON.ShowDraft,
+ BUTTON.Pay_Addline,
+ BUTTON.Pay_DeleteLine,
+ BUTTON.Card_Body_Group1,
+ BUTTON.Card_Body_Group2,
+ // BUTTON.Correct,
+ BUTTON.Resetno,
+ BUTTON.openedit,
+ BUTTON.materialDeleteLine,
+ BUTTON.CopyLine_row,
+ BUTTON.InsertLine,
+ BUTTON.ShowDraft,
+ BUTTON.LinkPoPlan,
+ BUTTON.Card_Fee_Group,
+ BUTTON.Card_Fee_Detail_Group,
+ BUTTON.Fee_Detail_Resetno,
+ BUTTON.Fee_Resetno
+ ],
+ false
+ );
+ this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);
+ //场景参数
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ this.props.BillHeadInfo.setBillHeadInfoVisible({
+ showBackBtn: scene == 'ADD' ? false : true,
+ showBillCode: false,
+ billCode: ''
+ });
+}
+
+function setSagaBtnState(props, status) {
+ //冻结交互
+ let sagaStatus = props.form.getFormItemsValue([ PAGECODE.cardhead ], FIELD.sagaStatus);
+ // 第一次进入卡片页,frozen为空,取界面sags_statue的值判断冻结状态
+ let frozen = sagaStatus && sagaStatus.value == '1' ? true : false;
+ // 设置回退、重试按钮状态,用来是否显示
+ if (status == STATUS.browse && frozen) {
+ props.button.toggleErrorStatus(PAGECODE.cardhead, {
+ isError: true
+ });
+ } else {
+ props.button.toggleErrorStatus(PAGECODE.cardhead, {
+ isError: false
+ });
+ }
+}
+
+/**
+ * 返回转单界面
+ * @param {*} props
+ * @param {*} transferType
+ */
+function gobackTransferPage(props, transferType) {
+ let map = new Map();
+ map.set('20', TRANSFER20.GOTO20);
+ map.set('Z2', TRANSFERZ2.GOTOZ2);
+ map.set('30TO21', TRANSFER30TO21.GOTO30SALE);
+ map.set('30TO21COOP', TRANSFER30TO21COOP.GOTO30COOP);
+ map.set('MULTI', TRANSFERMULTI.GOTOMULTI);
+ map.set('49', TRANSFER49.GOTO49);
+ let _url = map.get(transferType);
+ if ('Z2' == transferType) {
+ //合同无小应用
+ _url = URL.gotoList;
+ }
+ let map2 = new Map();
+ map2.set('20', TRANSFER20.PAGEID);
+ map2.set('Z2', TRANSFERZ2.PAGEID);
+ map2.set('30TO21', TRANSFER30TO21.PAGEID);
+ map2.set('30TO21COOP', TRANSFER30TO21COOP.PAGEID);
+ map2.set('MULTI', TRANSFERMULTI.PAGEID);
+ map2.set('49', TRANSFER49.PAGEID);
+ let pagecode = map2.get(transferType);
+ let scene = getDefData(OrderCache.OrderCardCache, 'scene');
+ let srcappcode = getDefData(OrderCache.OrderCardCache, 'srcappcode');
+ let userJson = { scene: scene, pagecode: pagecode };
+ if (srcappcode && srcappcode != 'null') {
+ userJson['appcode'] = srcappcode;
+ }
+ props.pushTo(_url, userJson);
+}
+
+export default {
+ setOprationBtnsRenderStatus,
+ getPayMentOprButton,
+ getMaterialOprButtons,
+ togglePageShow,
+ tabChange,
+ metarialSelected,
+ materialButtonInit,
+ paymentShow,
+ cachedata,
+ materialPasteCancel,
+ doCancel,
+ showEmptyBrowsePage,
+ gobackTransferPage,
+ getFeeMentOprButton,
+ getFeeDetailMentOprButton,
+ feeSelected,
+ feeDetailSelected,
+ metarialAllSelected,
+ onCheckRows
+};
+
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/card/viewController/index.js b/src/pu/pu/poorder/card/viewController/index.js
new file mode 100644
index 0000000..b46b0a0
--- /dev/null
+++ b/src/pu/pu/poorder/card/viewController/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import buttonClickController from './btnClickController';
+import buttonController from './buttonController';
+
+export { buttonClickController, buttonController };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/constance/index.js b/src/pu/pu/poorder/constance/index.js
new file mode 100644
index 0000000..896fea5
--- /dev/null
+++ b/src/pu/pu/poorder/constance/index.js
@@ -0,0 +1,797 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单常量
+ * @Date: 2018-04-17 14:00:27
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-12-04 10:32:17
+ */
+const URL = {
+ getList: '/nccloud/pu/poorder/query.do', //列表态数据查询
+ currentpage: '/nccloud/pu/poorder/currentpage.do', //列表当前分页查询
+ save: '/nccloud/pu/poordercard/save.do', //卡片态编辑保存链接
+ afterEvent: '/nccloud/pu/poordercard/afterevent.do', //编辑后事件处理
+ getCard: '/nccloud/pu/poordercard/query.do', //卡片态数据查询
+ delete: '/nccloud/pu/poordercard/delete.do', //卡片态删除
+ griddelete: '/nccloud/pu/poordercard/gridorderdeleteaction.do', //卡片态删除
+ cardHeadAfterEvent: '/nccloud/pu/poordercard/cardheadafterevent.do', //卡片表头编辑后事件
+ cardBodyAfterEvent: '/nccloud/pu/poordercard/cardbodyafterevent.do', //卡片表体编辑后事件
+ cardFeeAfterEvent: '/nccloud/pu/poordercardfee/cardfeeafterevent.do', //卡片表体费用项编辑后事件
+ cardFeeDetailAfterEvent: '/nccloud/pu/poordercardfeedetail/cardfeedetailafterevent.do', //卡片费用明细编辑后事件
+ finalopen: '/nccloud/pu/poorder/finalopenaction.do', //整单打开
+ finalClose: '/nccloud/pu/poorder/finalcloseaction.do', //最终关闭
+ gridfinalopen: '/nccloud/pu/poorder/gridfinalopenaction.do', //批量打开
+ gridfinalClose: '/nccloud/pu/poorder/gridfinalcloseaction.do', //批量关闭
+ commit: '/nccloud/pu/poordercard/commitaction.do', //提交
+ gridcommit: '/nccloud/pu/poorder/gridordercommitaction.do', //批量提交
+ uncommit: '/nccloud/pu/poordercard/uncommitaction.do', //收回
+ griduncommit: '/nccloud/pu/poordercard/gridorderuncommitaction.do', //批量收回
+ freeze: '/nccloud/pu/poordercard/poorderfreezeaction.do', // 冻结
+ unfreeze: '/nccloud/pu/poordercard/poorderunfreezeaction.do', // 解冻
+ gridfreeze: '/nccloud/pu/poorder/gridorderfreezeaction.do', // 批量冻结
+ gridunfreeze: '/nccloud/pu/poorder/gridorderunfreezeaction.do', // 批量冻结
+ transportstatusquery: '/nccloud/pu/poorder/transportstatusqueryaction.do', // 联查运输状态
+ print: '/nccloud/pu/poorder/orderprintaction.do', // 打印
+ receiveplanprint: '/nccloud/pu/poorder/receiveplanprintaction.do', // 到货计划打印
+ arriveplanquery: '/nccloud/pu/poordercard/arriveplanqueryaction.do', //到货计划查询
+ arriveplansave: '/nccloud/pu/poordercard/arriveplansaveaction.do', //到货计划保存
+ arriveplanafterevent: '/nccloud/pu/poorder/arriveplanaftereventaction.do', //到货计划编辑后事件
+ arrivalplancheck: '/nccloud/pu/poorder/arrivalplancheckaction.do', //到货计划权限校验
+ porprownomodel: '/nccloud/pu/poorder/porprownomodel.do', //到货计划参照采购订单表体
+ arrivedeletecheckaction: '/nccloud/pu/poorder/arriveplandeletecheckaction.do', //到货计划删行校验
+ interceptor: '/nccloud/pu/poorder/cardinterceptoraction.do', //卡片拦截-主要处理关联合同
+ stockquery: '/nccloud/pu/poordercard/orderatpqueryaction.do', //卡片存量查询
+ salesquery: '/nccloud/pu/poordercard/ordersalesqueryaction.do', //卡片销量查询
+ grossprofit: '/nccloud/pu/poordercard/ordergrossprofitaction.do', //卡片毛利预估
+ supplierap: '/nccloud/pu/poordercard/ordersupplierapaction.do', //卡片供应商应付
+ checkorg: '/nccloud/pu/poordercard/issaleorgaction.do', //卡片销量查询检查是否销售组织
+ pricequery: '/nccloud/pu/poordercard/querydefaultpriceaction.do', //卡片采购询价
+ cooppricequery: '/nccloud/pu/poordercard/querycooppriceaction.do', //卡片询协同售价
+ headbeforeedit: '/nccloud/pu/poordercard/ordercardheadbeforeeditaction.do', //卡片表头编辑前
+ bodybeforeedit: '/nccloud/pu/poordercard/ordercardbodybeforeeditaction.do', //卡片表体编辑前
+ savecommit: '/nccloud/pu/poorder/ordersavecommit.do', // 保存提交
+ editdatapermission: '/nccloud/pu/poordercard/poordercardeditdatapermissionaction.do', // 修改权限检查
+ refz2check: '/nccloud/pu/poorder/refz2fromcheckaction.do', // 合同模块启用权限校验
+ sysinitgroup: '/nccloud/scmpub/pub/sysinitgroup.do', //公共模块启用判断
+ combine: '/nccloud/pu/poordercard/combineshowaction.do', //合并显示
+ combintPrint: '/nccloud/pu/poordercard/combineprintaction.do', //合并打印
+ rowclose: '/nccloud/pu/poordercard/rowclose.do', //卡片行关闭
+ rowopen: '/nccloud/pu/poordercard/rowopen.do', //卡片行打开
+ supplierquotas: '/nccloud/pu/poorder/supplierquotasaction.do', // 配额分配
+ defaultsupplier: '/nccloud/pu/poorder/defaultsupplieraction.do', // 确认供应商
+ //推单
+ sotoorder: '/nccloud/pu/poorder/sotoordercardqueryaction.do', // 销售推采购订单
+ pushcoopsale: '/nccloud/pu/poorder/pushcoopsaleorderaction.do', // 生成协同销售订单
+ //小部件
+ widget20to21: '/nccloud/pu/poorder/widgetquery20for21action.do', //请购生成订单
+ flowquery20for21: '/nccloud/pu/poorder/flowquery20for21action.do', //请购生成订单
+ refbillqueryaction: '/nccloud/pu/pub/refbillqueryaction.do', //来源单据查询
+ payplan: '/pu/pu/orderpayplan/list/', //生成付款计划
+ generalSetpiece: '/nccloud/pu/pub/generalSetpiece.do', //成套件信息
+ supplementinfo: '/nccloud/pu/poordercard/ordersupplementinfo.do', //辅助信息
+ pricedetail: '/nccloud/pu/poordercard/orderpricedetail.do', //价格详情
+ saveandcommit: '/nccloud/pu/poorder/saveandcommit.do', //同一个事务的保存提交For NCCnative
+ linpayplay: '/nccloud/pu/poorder/linpayplay.do', //联查采购计划
+ printvalidate: '/nccloud/pu/poorder/orderprintvalidate.do', // 打印前校验
+ gotoCard: '/card', //跳转到卡片页
+ gotoList: '/list', //列表跳转
+ transinfo: '/nccloud/pu/poordercard/transinfo.do', //内部交易信息
+ exportUrl: '/nccloud/pu/poorder/export.do', //导出模板
+ importUrl: '/nccloud/pu/poorder/import.do', //导出模板
+ praybillToHandlePOorder: '/nccloud/pu/workbench/praybillToHandlePOorder.do', // 采购待下单小部件跳转后查询数据
+ copybodyInsertFeeDetail: '/nccloud/pu/poorder/copybodyinsertfeedetail.do', // 采购订单复制行生成费用明细
+ financeorgChangeFee: '/nccloud/pu/poorder/financeorgchangefee.do', // 采购订单切换结算财务组织清空费用项
+ cardBodyBatch: '/nccloud/pu/poorder/cardbodybatch.do', // 复制粘贴物料或者数量时联动费用明细
+ headafterdbillddate: '/nccloud/pu/poorder/headafterdbillddateforfee.do', // 表头制单日期切换后费用项,费用明细重新询税,寻汇率
+ insertfeedetail: '/nccloud/pu/poorder/insertfeedetail.do', // 费用明细参照物料增行
+ feeDetailBeforeEvent: '/nccloud/pu/poorder/feeDetailBeforeEvent.do' // 费用明细编辑前
+};
+
+//页面编码
+const PAGECODE = {
+ billType: '21',
+ dbilldateVal: '',
+ searchId: '400400800_query',
+ tableId: 'list_head',
+ listcode: '400400800_list', // pu_poorder_list
+ list_inner: 'list_inner', //列表表格行
+ //卡片态常量
+ cardcode: '400400800_card', // pu_poorder_card
+ cardhead: 'card_head', //表头采购信息
+ head_tailinfo: 'card_tailinfo', //审计+人员信息
+ head_payment: 'card_payment', //付款协议
+ cardbody: 'card_material', //表体采购物料详情
+ material1: 'material1', //物料执行情况
+ material_table_row: 'card_material_inner', //物料表格区域
+ payment_table_row: 'card_payment_inner', //付款协议表格区域
+ childform1: 'childform1',
+ childform2: 'childform2',
+ queryType: 'simple', //查询类型
+ tree: 'tree',
+ leftarea: 'leftarea',
+ title_card: 'title_card', // 卡片标题区域
+ bodyIds: [ 'card_payment', 'card_material' ],
+ bodys: [ 'card_payment', 'card_material', 'card_fee', 'card_fee_detail' ],
+ card_fee: 'card_fee', // 费用项
+ card_fee_detail: 'card_fee_detail', // 费用明细
+ card_fee_detail_inner: 'card_fee_detail_inner', // 费用项表格
+ card_fee_inner: 'card_fee_inner', // 费用明细表格
+ card_bodyModal: 'card_bodyModal'
+};
+
+const OrderCache = {
+ OrderCacheKey: 'scm.pu.poorder.datasource', //数据缓存
+ Searchval: 'PoOrderList_serachVal', //查询条件
+ OrderListTabCode: 'OrderListTabCode', //订单列表页签缓存
+ OrderCardCache: 'scm.pu.poorder.ordercard', //卡片缓存
+ OrderTransferCache: 'scm.pu.poorder.ordertransfercache', //拉单缓存
+ OrderRefAdd20: 'scm.pu.poorder.orderrefadd20', //
+ refBillDataCach: 'scm.pu.poorder.refBillDataCach'
+};
+
+// 标准单据区域字段
+const INTELLAREA = {
+ // 业务助手
+ INTELLAREA: 'smartCard',
+ // 现存量组件外层
+ WALLET_ATP: 'wallet_atp',
+ // 现存量组件
+ ATP: 'atp'
+};
+
+const BATCHITEM = [
+ 'pk_material',
+ 'nastnum',
+ 'nnum',
+ 'nqtorigtaxprice',
+ 'nqtorigprice',
+ 'ntaxrate',
+ 'ctaxcodeid',
+ 'nitemdiscountrate',
+ 'nexchangerate',
+ 'ftaxtypeflag',
+ 'pk_apliabcenter_v',
+ 'dplanarrvdate',
+ 'pk_reqstoorg_v',
+ 'pk_arrvstoorg_v',
+ 'pk_psfinanceorg_v',
+ 'pk_apfinanceorg_v',
+ 'pk_flowstockorg_v',
+ 'pk_reqstordoc',
+ 'cprojectid',
+ 'vbmemo',
+ 'ctaxcodeid',
+ 'pk_apliabcenter_v',
+ 'norigtaxmny',
+ 'pk_recvstordoc',
+ 'norigtaxprice',
+ 'norigmny',
+ 'cffileid',
+ 'nqtunitnum'
+];
+
+const BATCHITEMPRCE = [
+ 'nqtorigprice',
+ 'nqtorigtaxprice',
+ 'norigtaxmny',
+ 'norigmny',
+ 'ntax',
+ 'nqtorignetprice',
+ 'nqtorigtaxnetprc',
+ 'norigprice',
+ 'norigtaxprice',
+ 'norignetprice',
+ 'norigtaxnetprice'
+];
+// 费用明细可编辑单价金额相关字段
+const FEEPRICE = [
+ 'ntaxrate',
+ 'nqtorigprice',
+ 'nqtorigtaxprice',
+ 'norigtaxmny',
+ 'norigmny',
+ 'ntax',
+ 'norigtaxprice',
+ 'norigprice',
+ 'ncaltaxmny',
+ 'nnosubtax',
+ 'ngroupexchgrate',
+ 'nglobalexchgrate',
+ 'ftaxtypeflag',
+ 'nexchangerate'
+];
+
+// 物料行编辑字段对费用明细的影响,单位,数量,主单位,主数量,换算率,报价单位,报价数量,报价换算率;还有数量为空单价有值时改变金额会改变数量的字段:计成本金额,计税金额,折本汇率,全局本位币汇率,全局本币无税金额
+// 全局本币价税合计,集团本位币汇率,集团本币无税金额,集团本币价税合计,本币无税金额,不可抵扣税额,不可抵扣税率,无税金额,价税合计,本币税额,本币价税合计
+const ITEMFEEPRICE = [
+ 'castunitid',
+ 'cqtunitid',
+ 'nqtunitnum',
+ 'nnum',
+ 'vchangerate',
+ 'vqtunitrate',
+ 'ncalcostmny',
+ 'ncaltaxmny',
+ 'nexchangerate',
+ 'nglobalexchgrate',
+ 'nglobalmny',
+ 'nglobaltaxmny',
+ 'ngroupexchgrate',
+ 'ngroupmny',
+ 'ngrouptaxmny',
+ 'nmny',
+ 'nnosubtax',
+ 'nnosubtaxrate',
+ 'norigmny',
+ 'norigtaxmny',
+ 'ntax',
+ 'ntaxmny'
+];
+
+const NUMS = [
+ 'nnum', //主数量
+ 'nastnum', //数量
+ 'nqtunitnum' //报价数量
+];
+
+const BILLTYPE = {
+ priceaudit: '10', // 价格审批单
+ praybill: '8', // 请购单
+ purdaily: '9', // 采购合同
+ orderNew: '6', // 采购订单
+ orderLow: '7', // 采购订单
+ supplierprice: '3', // 供应商价目表
+ sources: '2', // 上游单据带入
+ input: '1', // 手工输入
+ reference: '4', // 参考成本
+ plan: '5', // 计划价
+ type20: '20', // 请购单
+ type21: '21', // 采购订单
+ typeZ2: 'Z2', // 采购合同
+ type28: '28', // 价格审批单
+ type4221: '4221' // 供应商价目表
+};
+
+const FIELD = {
+ PURCHASEORG: 'pu', // 采购 业务场景
+ STOCKORG: 'st', // 库存
+ pk_dept_v: 'pk_dept_v', //采购部门
+ pk_dept: 'pk_dept', //采购部门
+ pk_order_b: 'pk_order_b',
+ cemployeeid: 'cemployeeid', //采购员
+ id: 'id',
+ ts: 'ts', //时间戳
+ pks: 'pks',
+ crowno: 'crowno', // 行号
+ vbillcode: 'vbillcode', //订单编号
+ pk_org: 'pk_org', //组织参照--列表使用
+ pk_org_v: 'pk_org_v', //组织版本--卡片使用
+ pk_order: 'pk_order', //主键
+ pk_group: 'pk_group', //集团
+ pk_freecust: 'pk_freecust', //散户
+ pk_bankdoc: 'pk_bankdoc', //银行账户
+ corigcurrencyid: 'corigcurrencyid', //币种 原币
+ pk_deliveradd: 'pk_deliveradd', //供应商发货地址
+ bisreplenish: 'bisreplenish', //补货
+ pk_material: 'pk_material', //物料参照
+ pk_materialfee: 'pk_material.fee', //物料参照
+ pk_materialdiscountflag: 'pk_material.discountflag', //物料参照
+ pk_reqstoorg_v: 'pk_reqstoorg_v', //需求库存组织
+ pk_arrvstoorg_v: 'pk_arrvstoorg_v', //收货库存组织
+ pk_psfinanceorg_v: 'pk_psfinanceorg_v', // 结算财务组织
+ ctrantypeid: 'ctrantypeid', //订单类型
+ approver: 'approver', //审批人
+ pk_busitype: 'pk_busitype', //业务流程
+ bcooptoso: 'bcooptoso', //已协同生成销售订单
+ bsocooptome: 'bsocooptome', //由销售订单协同生成
+ vcoopordercode: 'vcoopordercode', //对方订单号
+ dbilldate: 'dbilldate', //订单日期
+ bfrozen: 'bfrozen', //冻结
+ forderstatus: 'forderstatus', //单据状态
+ bfinalclose: 'bfinalclose', //最终关闭
+ pk_supplier: 'pk_supplier', //供应商
+ pk_invcsupllier: 'pk_invcsupllier', //开票供应商
+ pk_payterm: 'pk_payterm', //付款协议
+ castunitid: 'castunitid', //计量单位
+ cqtunitid: 'cqtunitid', //报价单位
+ pk_reqstordoc: 'pk_reqstordoc', //需求仓库
+ pk_reqdept_v: 'pk_reqdept_v', //需求部门
+ pk_recvstordoc: 'pk_recvstordoc', //收货仓库
+ nastnum: 'nastnum', //数量
+ nqtorigtaxprice: 'nqtorigtaxprice', //含税单价
+ norigtaxmny: 'norigtaxmny', //价税合计
+ nqtorigprice: 'nqtorigprice', //无税单价
+ nqtorignetprice: 'nqtorignetprice', //无税净价
+ nnum: 'nnum', // 主数量
+ ntax: 'ntax', // 税额
+ norigmny: 'norigmny', // 金额
+ ntaxrate: 'ntaxrate', //税率
+ vtrantypecode: 'vtrantypecode', //订单类型
+ csourcebid: 'csourcebid', //来源单据明细
+ csourceid: 'csourceid', //来源单据
+ csourcetypecode: 'csourcetypecode', //来源单据类型
+ nsourcenum: 'nsourcenum', //来源单据主数量
+ pk_srcorder_b: 'pk_srcorder_b', //修订来源订单明细
+ sourcebts: 'sourcebts', //来源单据行TS
+ sourcets: 'sourcets', //来源单据TS
+ vsourcecode: 'vsourcecode', //来源单据号
+ vsourcerowno: 'vsourcerowno', //来源单据行号
+ vsourcetrantype: 'vsourcetrantype', //来源交易类型
+ vbatchcode: 'vbatchcode', //批次号
+ ccontractid: 'ccontractid', //合同信息
+ ccontractrowid: 'ccontractrowid', //合同明细
+ vcontractcode: 'vcontractcode', //合同号
+ ncalcostmny: 'ncalcostmny', // 计成本金额
+ ncaltaxmny: 'ncaltaxmny', // 计税金额
+ nnosubtax: 'nnosubtax', // 不可抵扣税额
+ nmny: 'nmny', // 本币无税金额
+ ntaxmny: 'ntaxmny', // 本币价税合计
+ ngroupmny: 'ngroupmny', // 集团本币无税金额
+ ngrouptaxmny: 'ngrouptaxmny', // 集团本币价税合计
+ nglobalmny: 'nglobalmny', // 全局本币无税金额
+ nglobaltaxmny: 'nglobaltaxmny', //全局本币价税合计
+ materialname: 'pk_order_b.pk_srcmaterial', //表头物料ID
+ form: 'form', //form表单类型
+ search: 'search', // search搜索类型
+ table: 'table', // table表格类型
+ pagecode: 'pagecode',
+ formArea: 'formArea', // form表单区
+ searchArea: 'searchArea', // search搜索区
+ tableArea: 'tableArea', // table表格区
+ tocommit: 'toCommit',
+ approving: 'approving',
+ executing: 'executing',
+ all: 'all',
+ PrayBill: '20', //请购单
+ PurDaily: 'Z2', //采购合同
+ SoOrder: '30', //销售订单
+ EXPORTATION: '3', //出口
+ IMPORTATION: '4', //进口
+ free: '0', //单据状态 自由
+ commit: '1', //提交
+ approve: '2', //审批中
+ approved: '3', //审批通过
+ unapproved: '4', //审批不通过
+ other: '5', //输出
+ sagaStatus: 'saga_status', //事务状态
+ pk_supplier_v: 'pk_supplier_v', //供应商版本
+ pk_recvcustomer_v: 'pk_recvcustomer_v', //收货客户版本
+ pk_invcsupllier_v: 'pk_invcsupllier_v', //开票供应商版本
+ casscustvid: 'casscustvid', //客户版本
+ cratetype: 'cratetype', //组织汇率类型
+ fratecategory: 'fratecategory', //组织汇率类别
+ dratedate: 'dratedate', //组织汇率来源日期
+ revisionstatus: 'revisionstatus',
+ scene: 'scene',
+ pk_srcorder: 'pk_srcorder',
+ approvesce: 'approvesce',
+ notice: 'notice', // 通知中心
+ pks: 'pks', // 里程碑看板跳转过来用
+ nhtaxrate: 'nhtaxrate', // 整单税率
+ vclosereason: 'vclosereason', //关闭/打开原因
+ vcloseperson: 'vcloseperson', //关闭/打开人
+ vclosetime: 'vclosetime', //关闭/打开时间
+ fpricesourceflag: 'fpricesourceflag', // 价格来源
+ wbs: 'wbs', //wbs任务
+ pk_order_f: 'pk_order_f', // 费用项主键
+ cfeematerialvid: 'cfeematerialvid', // 费用项
+ cfeematerialoid: 'cfeematerialoid', // 费用项版本
+ cfeesuppliervid: 'cfeesuppliervid', // 费用服务商
+ cfeesupplieroid: 'cfeesupplieroid', // 费用服务商_版本
+ cctid: 'cctid', // 费用合同
+ cctbid: 'cctbid', // 费用合同明细
+ pk_order_bf: 'pk_order_bf', // 物料费用明细主键
+ cmatrowno: 'cmatrowno', // 订单物料行号
+ cmaterialvid: 'cmaterialvid', // 物料
+ cmaterialoid: 'cmaterialoid', // 物料_版本
+ nqtunitnum: 'nqtunitnum', // 报价单位
+ vchangerate: 'vchangerate', // 换算率
+ vqtunitrate: 'vqtunitrate', // 报价换算率
+ cmaterialvidName: 'cmaterialvid.name', // 物料名称
+ cmaterialvidMaterialspec: 'cmaterialvid.materialspec', // 规格
+ cmaterialvidMaterialtype: 'cmaterialvid.materialtype', // 型号
+ pk_materialName: 'pk_material.name', // 物料名称
+ pk_materialMaterialspec: 'pk_material.materialspec', // 规格
+ pk_materialMaterialtype: 'pk_material.materialtype', // 型号
+ ftaxtypeflag: 'ftaxtypeflag', // 扣税类别
+ crececountryid: 'crececountryid', //收货国
+ csendcountryid: 'csendcountryid', // 发货国
+ ctaxcountryid: 'ctaxcountryid', //报税国
+ ctaxcodeid: 'ctaxcodeid', //税码
+ nexchangerate: 'nexchangerate', //折本汇率
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ nnosubtaxrate: 'nnosubtaxrate', //不可抵扣税率
+ cunitid: 'cunitid', // 主单位
+ pk_psfinanceorg: 'pk_psfinanceorg', // 结算财务组织
+ vfmemo: 'vfmemo',
+ pseudocolumn: 'pseudocolumn',
+ nglobalexchgrate: 'nglobalexchgrate',
+ ngroupexchgrate: 'ngroupexchgrate',
+ fbuysellflag: 'fbuysellflag',
+ cprojectid: 'cprojectid',
+ pk_payment: 'pk_payment',
+ dplanarrvdate: 'dplanarrvdate',
+ nfeetaxmny: 'nfeetaxmny',
+ nfeetaxmnysum: 'nfeetaxmnysum'
+};
+const LIST_BUTTON = {
+ search: 'search', //查询
+ Add: 'Add', //新增
+ selfmake: 'SelfMake', //自制
+ Pu_GenerateOrder: 'Pu_GenerateOrder', //采购合同生成订单
+ Req_GenerateOrder: 'Req_GenerateOrder', //请购生成订单
+ D_Sale_GenerateOrder: 'D_Sale_GenerateOrder', //直运销售生成订单
+ Pu_co_GenerateOrder: 'Pu_co_GenerateOrder', //销售协同生成订单
+ OrderTOSaleBill: 'OrderTOSaleBill', //生成协同销售订单
+ Replenishment: 'Replenishment', //补货
+ Delete: 'Delete', //删除
+ Commit: 'Commit', //按钮名称-提交
+ ToCommit: 'ToCommit', //功能-提交
+ UnCommit: 'UnCommit', //收回
+ ApproveInfo: 'ApproveInfo', //查看审批意见
+ SupplierAp: 'SupplierAp', //供应商应付
+ Auxiliary: 'Auxiliary', //辅助功能
+ Freeze: 'Freeze', //冻结
+ UnFreeze: 'UnFreeze', //解冻
+ OpenBill: 'OpenBill', //整单打开
+ CloseBill: 'CloseBill', //整单关闭
+ Annex_Management: 'Annex_Management', //附件管理
+ FileBatch: 'FileBatch', //附件批量下载
+ QueryAboutBusiness: 'QueryAboutBusiness', //单据追溯
+ LinkQuery: 'LinkQuery', //联查
+ Arrival_Plan: 'Arrival_Plan', //到货计划
+ Payment_Plan: 'Payment_Plan', //付款计划
+ Transport_State: 'Transport_State', //运输状态
+ PayExecStat: 'PayExecStat', //运输状态
+ Refresh: 'Refresh', //刷新
+ Print: 'Print', //打印
+ Print_list: 'Print_list', //打印清单
+ PrintOut: 'PrintOut', //输出
+ List_Inner_Commit: 'Commit', //行提交
+ Copy: 'Copy', //行复制
+ List_Inner_UnCommit: 'List_Inner_UnCommit', //行收回
+ SMS_CIRCULAR: 'SMS_CIRCULAR', //短信通知 --到货计划使用
+ Edit: 'Edit',
+ Save: 'Save', // 保存
+ Cancel: 'Cancel', //取消
+ DelLine: 'DelLine', //删行
+ CopyLine: 'CopyLine', //复制行
+ Bi_GenerateOrder: 'Bi_GenerateOrder', // 借入生成订单
+ ToInformation: 'ToInformation', //内部交易信息
+ printCountQuery: 'PrintCountQuery', //打印次数查询
+ Import: 'Import', //导入
+ Export: 'Export' //导出
+};
+const BUTTON = {
+ Back: 'Back', //返回
+ Head_Group1: 'Head_Group1', //保存+保存提交
+ Head_Group2: 'Head_Group2', //修改+删除+复制
+ Save: 'Save', //保存
+ TemporaryStorage: 'TemporaryStorage', //暂存
+ SaveCommit: 'SaveCommit', //保存并提交
+ Cancel: 'Cancel', //取消
+ Add: 'Add', //新增
+ Add_Group1: 'Add_Group1', //新增下拉=自制
+ Add_Group2: 'Add_Group2', //新增下拉=请购生成订单+直运销售生成订单+购销协同生成订单+采购合同生成订单
+ selfmake: 'SelfMake', //自制
+ Pu_GenerateOrder: 'Pu_GenerateOrder', //采购合同生成订单
+ Req_GenerateOrder: 'Req_GenerateOrder', //请购生成订单
+ D_Sale_GenerateOrder: 'D_Sale_GenerateOrder', //直运销售生成订单
+ Pu_co_GenerateOrder: 'Pu_co_GenerateOrder', //购销协同生成订单
+ replenishment: 'Replenishment', //补货
+ Edit: 'Edit', //修改
+ Delete: 'Delete', //删除
+ Copy: 'Copy', // 复制
+ Commit: 'Commit', //提交
+ UnCommit: 'UnCommit', //收回
+ Auxiliary: 'Auxiliary', //辅助功能
+ aux_g1: 'aux_g1', //辅助下拉1
+ arrival_plan: 'Arrival_Plan', //到货计划
+ Payment_Plan: 'Payment_Plan', //付款计划
+ OrderTOSaleBill: 'OrderTOSaleBill', //生成协同销售订单
+ Freeze: 'Freeze', //冻结
+ UnFreeze: 'UnFreeze', //解冻
+ OpenBill: 'OpenBill', //整单打开
+ CloseBill: 'CloseBill', //整单关闭
+ aux_g2: 'aux_g2', //辅助下拉2
+ QueryAboutBusiness: 'QueryAboutBusiness', //单据追溯
+ ApproveInfo: 'ApproveInfo', //查看审批意见
+ SupplierAp: 'SupplierAp', //供应商应付
+ LinkPoPlan: 'LinkPoPlan', //联查采购计划
+ aux_g3: 'aux_g3', //辅助下拉3
+ annex_management: 'Annex_Management', //附件管理
+ LinkQuery: 'LinkQuery', //联查
+ LinkQuery_g1: 'LinkQuery_g1', //联查下拉
+ Transport_State: 'Transport_State', //运输状态
+ PayExecStat: 'PayExecStat', //付款执行情况
+ print: 'Print', //打印
+ PrintOut: 'PrintOut', //输出
+ printCountQuery: 'PrintCountQuery', //打印次数查询
+ CombineShow: 'CombineShow', //合并显示
+ Refresh: 'Refresh', //刷新
+ ShowDraft: 'ShowDraft', //显示草稿
+ showDraft: 'showDraft', //新增小应用显示草稿
+ Pay_Addline: 'Pay_AddLine', //付款协议增行
+ Card_Body_Group1: 'Card_Body_Group1', //物料表格肩部按钮组
+ Material_AddLine: 'Material_AddLine', //物料信息增行
+ materialDeleteLine: 'DeleteLine', //物料删行
+ copyline: 'CopyLine', //复制行
+ Card_Body_Group2: 'Card_Body_Group2',
+ puinquiry: 'Pu_Inquiry', //采购询价
+ checkpuinquiry: 'CheckPuInquiry', //询协同售价
+ puinquirys: 'Pu_Inquirys', //采购询价
+ checkpuinquirys: 'CheckPuInquirys', //询协同售价
+ Correct: 'Correct', // 批改 material
+ StockQuery: 'StockQuery', //存量查询
+ SalesQuery: 'SalesQuery', //销量查询
+ GrossProfit: 'GrossProfit', //毛利预估
+ Resetno: 'Resetno', //重排行号
+ Material_PastLast: 'Material_PastLast', //复制至末行+复制取消
+ PasteLast: 'PasteLast', //复制至末行
+ PasteCancel: 'PasteCancel', //复制取消
+ PasteThis: 'PasteThis', //粘贴至此
+ Pay_DeleteLine: 'Pay_DeleteLine', //付款协议删行 payment_table_row
+ openbrowse: 'OpenBrowse', //浏览态行操作展开 material_table_row
+ openedit: 'OpenEdit', //编辑态行操作展开
+ Material_DeleteLine: 'DeleteLine', //物料表格内删行
+ CopyLine_row: 'CopyLine_row', //复制行
+ InsertLine: 'InsertLine', //插行
+ RefAddLind: 'RefAddLind', //参照增行
+ QuitTransferBill: 'QuitTransferBill', //退出转单
+ RowOpen: 'RowOpen', //行打开
+ RowClose: 'RowClose', //行关闭
+ orgChange: 'orgChange', // 组织切换
+ SetPiece: 'SetPiece', //成套件
+ SupplementaryInfo: 'SupplementaryInfo', //辅助信息
+ Pricedetail: 'Pricedetail', //价格详情
+ Bi_GenerateOrder: 'Bi_GenerateOrder', // 借入生成订单
+ materialCardInitBtn: [
+ 'MaterialDeleteLine',
+ 'Material_AddLine',
+ 'CopyLine',
+ // 'Correct',
+ 'CheckPuInquiry',
+ 'Pu_Inquiry',
+ 'Resetno'
+ ],
+ materialCardPastBtn: [ 'Material_PastLast', 'PasteLast', 'PasteCancel' ],
+ ToInformation: 'ToInformation', //内部交易信息
+ Card_Fee_Group: 'Card_Fee_Group', //费用项肩部按钮组
+ Card_Fee_Detail_Group: 'Card_Fee_Detail_Group', //费用明细肩部按钮组
+ Fee_PasteLast: 'Fee_PasteLast', // 费用项粘贴至末行
+ Fee_PasteThis: 'Fee_PasteThis', //费用项粘贴至此
+ Fee_PasteCancel: 'Fee_PasteCancel', //费用项取消
+ Fee_Detail_PasteLast: 'Fee_Detail_PasteLast', //费用明细粘贴至末行
+ Fee_Detail_PasteThis: 'Fee_Detail_PasteThis', //费用明细粘贴至此
+ Fee_Detail_PasteCancel: 'Fee_Detail_PasteCancel', //费用明细取消
+ Fee_Resetno: 'Fee_Resetno', //费用项重排行号
+ Fee_Detail_Resetno: 'Fee_Detail_Resetno', //费用明细重排行号
+ Fee_Copyline: 'Fee_Copyline', //费用项复制行
+ Fee_Detail_Copyline: 'Fee_Detail_Copyline', // 费用明细复制行
+ Fee_Deleteline_row: 'Fee_Deleteline_row', // 费用项表体删行
+ Fee_Detail_Deleteline_row: 'Fee_Detail_Deleteline_row', // 费用明细表体删行
+ Fee_Deleteline: 'Fee_Deleteline', // 费用项删行
+ Fee_Detail_Deleteline: 'Fee_Detail_Deleteline', // 费用明细删行
+ Fee_Addline: 'Fee_Addline', //费用项增行
+ Fee_Detail_Addline: 'Fee_Detail_Addline' // 费用明细增行
+};
+const STATUS = {
+ status: 'status', //状态标志
+ edit: 'edit', //编辑态
+ browse: 'browse', //浏览
+ copy: 'copy',
+ tempstatus: 'tempstatus', //暂存标志
+ add: 'add' //新增
+};
+const BUTTON_DISABLED = true;
+const TRANSFER = {
+ transfer: 'transfer', //转单类型参数
+ channelType: 'channelType', //推单参数
+ replenishmentarrange: 'replenishmentarrange', //补货安排
+ directarrange: 'directarrange', //直运安排
+ priceaudit: 'priceaudit' // 价格审批单
+};
+
+const TRANSFER20 = {
+ appcode: '400400400',
+ CSOURCETYPECODE: '20', // 单据类型
+ GOTO20: '/transfer20', //拉请购单
+ PAGEID: '400400400_20to21', //'400400400_transfer', //页面标识
+ SEARCHID: '400400400_tranfer_query', //查询区域
+ LIST_TABLE: 'po_praybill', //请购单主表
+ LIST_TABLE_CHILD: 'pk_praybill_b', //请购单子表
+ VIEW: 'view', //视图vo
+ GETQUERYDATA: '/nccloud/pu/poorder/query20for21action.do', //请购单查询
+ TRANSFERXTO21ACTION: '/nccloud/pu/poorder/transfer20to21action.do',
+ KEY: 'pk_praybill_b',
+ Quota_Allocation: 'Quota_Allocation',
+ ScanTransfer: 'ScanTransfer',
+ Supplier: 'Supplier',
+ Refresh: 'Refresh',
+ billtype: '20',
+ vbillcode: 'vbillcode',
+ pk_praybill: 'pk_praybill'
+};
+
+const TRANSFERZ2 = {
+ appcode: '400400800',
+ CSOURCETYPECODE: 'Z2', // 单据类型
+ GOTOZ2: '/transferz2', // 拉采购合同
+ PAGEID: '400200301_transfer', //页面标识
+ SEARCHID: '40203001_tranfer_query', //查询区域
+ LIST_TABLE: 'ct_pu', //主表
+ LIST_TABLE_CHILD: 'ct_pu_b', //子表
+ VIEW: 'view', //视图vo
+ GETQUERYDATA: '/nccloud/pu/poorder/queryz2for21action.do', //采购合同查询
+ TRANSFERXTO21ACTION: '/nccloud/pu/poorder/transferz2to21action.do',
+ KEY: 'pk_ct_pu_b',
+ Refresh: 'Refresh',
+ billtype: 'Z2', // 传入后台的单据类型都必须是大写
+ vbillcode: 'vbillcode',
+ pk_ct_pu: 'pk_ct_pu'
+};
+const TRANSFER30TO21 = {
+ appcode: '400600400',
+ CSOURCETYPECODE: '30TO21', // 单据类型 直运
+ GOTO30SALE: '/transfer30sale', // 拉直运销售
+ PAGEID: '400600400_30to21sale', //页面标识
+ SEARCHID: '400600301_list_query', //查询区域
+ LIST_TABLE: 'so_saleorder', //主表
+ LIST_TABLE_CHILD: 'so_saleorder_b', //子表
+ VIEW: 'view', //视图vo
+ GETQUERYDATA: '/nccloud/pu/poorder/query30salefor21action.do', //直运销售查询
+ TRANSFERXTO21ACTION: '/nccloud/pu/poorder/transfer30saleto21action.do',
+ KEY: 'csaleorderbid', //csaleorderid csaleorderbid
+ Refresh: 'Refresh',
+ billtype: '30',
+ vbillcode: 'vbillcode',
+ csaleorderid: 'csaleorderid'
+};
+const TRANSFER30TO21COOP = {
+ appcode: '400600400',
+ CSOURCETYPECODE: '30TO21COOP', // 单据类型 销售协同
+ GOTO30COOP: '/transfer30coop', // 拉协同销售
+ PAGEID: '400600400_30to21coop', //页面标识
+ SEARCHID: '400600301_list_query', //查询区域
+ LIST_TABLE: 'so_saleorder', //主表
+ LIST_TABLE_CHILD: 'so_saleorder_b', //子表
+ VIEW: 'view', //视图vo
+ GETQUERYDATA: '/nccloud/pu/poorder/query30coopfor21action.do', //协同销售订单查询
+ TRANSFERXTO21ACTION: '/nccloud/pu/poorder/transfer30coopto21action.do',
+ KEY: 'csaleorderbid',
+ Refresh: 'Refresh',
+ billtype: '30',
+ vbillcode: 'vbillcode',
+ csaleorderid: 'csaleorderid'
+};
+const TRANSFERMULTI = {
+ CSOURCETYPECODE: 'MULTI', // 单据类型 多来源
+ GOTOMULTI: '/transfer23_45', // 拉协同销售
+ PAGEID: '400600301_list_transfercoop', //页面标识
+ SEARCHID: '', //查询区域
+ LIST_TABLE: '', //主表
+ LIST_TABLE_CHILD: '', //子表
+ TRANSFERXTO21ACTION: '/nccloud/pu/poorder/transfermultito21action.do',
+ KEY: 'csaleorderbid',
+ Refresh: 'Refresh',
+ APPCODE23: '400401200',
+ APPCODE45: '400800800',
+ billtype23: '23',
+ billtype45: '45',
+ pk_arriveorder: 'pk_arriveorder',
+ cgeneralhid: 'cgeneralhid',
+ vbillcode: 'vbillcode'
+};
+
+const ARRIVEPLAN = {
+ PAGECODE: '400400416_arriveplan', //页面标识
+ TABLEID: 'po_order_bb1', //表格ID
+ LIST_TITLE: 'LIST_TITLE',
+ TABLEINNER: 'TABLEINNER'
+};
+
+const STOCKQUERY = {
+ PAGECODE: '400400800_atpparamvo', //页面标识
+ TABLEID: 'atpforonematerialitemvo' //表格ID
+};
+//销量查询
+const SALESQUERY = {
+ PAGECODE: '400400800_salesquery', //页面标识
+ TABLEID: 'salesquerymaterialitemvo', //表格ID
+ LIST_TITLE: 'LIST_TITLE' //模板按钮区域
+};
+//毛利预估
+const GROSSPROFITQUEYR = {
+ PAGECODE: '400400800_grossprofitestimate', //页面标识
+ GROSS_HEAD: 'grossprofit_head', //表头
+ GROSS_BODY: 'grossprofit_body' //表体
+};
+//供应商应付
+const SUPPLIERAP = {
+ PAGECODE: '400400800_supplierap', //页面标识
+ TABLEID: 'supplierapitemvo' //表格ID
+};
+const APPFLAG = 'APPFLAG'; //小应用进入界面的标识
+
+const APPCODE = {
+ orderAppCode: '400400800',
+ payplanAppCode: '400400806' //付款计划appcode
+};
+
+const TRANSFER49 = {
+ appcode: '400800832',
+ CSOURCETYPECODE: '49', // 介入单单据类型
+ GOTO49: '/transfer49', // 参照介入单
+ PAGEID: '400800832_49to21', // 页面编码
+ SEARCHID: '400800832_query', // 查询区编码
+ LIST_TABLE: 'head', // 表头
+ LIST_TABLE_CHILD: 'body', // 表体
+ VIEW: 'view49', // 主子展示编码
+ GETQUERYDATA: '/nccloud/pu/poorder/query49for21action.do', // 查询请求
+ TRANSFERXTO21ACTION: '/nccloud/pu/poorder/transfer49to21action.do',
+ KEY: 'cgeneralhid',
+ Refresh: 'Refresh',
+ billtype: '49',
+ vbillcode: 'vbillcode',
+ cgeneralhid: 'cgeneralhid'
+};
+
+const COMMON = {
+ LINK_KEY: 'pulinkkey' //共享联查key
+};
+
+const PUSHCONST = {
+ vsrcAppcode: 'vsrcAppcode',
+ replenishmentArrangeIds: 'replenishmentarrange', // 补货刘奇参数变更 replenishmentArrangeIds
+ directArrangeIds: 'directarrange', // 直运 directArrangeIds
+ pushId: 'pushId' // 价格审批单
+};
+/**
+ * 自由辅助属性
+ */
+const FREEFIELD = {
+ ccustomerid: 'casscustid',
+ ccustomervid: 'casscustvid',
+ cvendorid: 'pk_supplier',
+ cvendorvid: 'pk_supplier_v'
+};
+
+const RELATECTFIELDS = [ FIELD.cfeematerialvid, FIELD.cfeesuppliervid, FIELD.corigcurrencyid ];
+export {
+ URL,
+ PAGECODE,
+ FIELD,
+ BUTTON,
+ STATUS,
+ LIST_BUTTON,
+ ARRIVEPLAN,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ TRANSFER,
+ BUTTON_DISABLED,
+ APPFLAG,
+ STOCKQUERY,
+ SALESQUERY,
+ GROSSPROFITQUEYR,
+ SUPPLIERAP,
+ OrderCache,
+ APPCODE,
+ TRANSFER49,
+ COMMON,
+ PUSHCONST,
+ BATCHITEM,
+ FREEFIELD,
+ BATCHITEMPRCE,
+ BILLTYPE,
+ NUMS,
+ FEEPRICE,
+ ITEMFEEPRICE,
+ RELATECTFIELDS,
+ INTELLAREA
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/freezeReason/index.js b/src/pu/pu/poorder/freezeReason/index.js
new file mode 100644
index 0000000..129033a
--- /dev/null
+++ b/src/pu/pu/poorder/freezeReason/index.js
@@ -0,0 +1,41 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 冻结原因
+ * @Date: 2018-09-10 10:15:01
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-09-10 10:23:45
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base } from 'nc-lightapp-front';
+const { NCFormControl } = base;
+
+export class FreezeReason extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ value: ''
+ };
+ }
+ onChange = (val) => {
+ this.setState({ value: val });
+ this.props.getFreezeReason(val);
+ };
+
+ render() {
+ return (
+
+ /* 国际化处理: 请输入冻结原因*/
+ this.onChange(val)}
+ size="sm"
+ />
+
+ );
+ }
+}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/grossprofitquery/index.js b/src/pu/pu/poorder/grossprofitquery/index.js
new file mode 100644
index 0000000..1a2cf55
--- /dev/null
+++ b/src/pu/pu/poorder/grossprofitquery/index.js
@@ -0,0 +1,109 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 采购订单毛利预估
+ * @Date: 2019-04-15 13:13:19
+ * @Last Modified by: hufeim
+ * @Last Modified time: 2023-03-30 14:06:12
+ */
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal } = base;
+import { initTemplate } from './init';
+import { URL, GROSSPROFITQUEYR } from '../constance';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import './index.less';
+class GrossProfitQuery extends Component {
+ constructor(props) {
+ super(props);
+ props.use.form(GROSSPROFITQUEYR.GROSS_HEAD);
+ props.use.table(GROSSPROFITQUEYR.GROSS_BODY);
+ this.state = {
+ pk: null,
+ queryDataFlag: false,
+ value: 7
+ };
+ //前端模型
+ this.model = {
+ context: null,
+ param: null,
+ currentIndex: 0
+ };
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (this.state.queryDataFlag) {
+ this.setState({
+ queryDataFlag: false
+ });
+ return;
+ }
+ if (nextProps && nextProps.grossprofitdata != null && nextProps.showModal) {
+ this.model.param = nextProps.grossprofitdata;
+ this.queryData(this.model.param);
+ }
+ }
+
+ /**
+ * 查询数据
+ */
+ queryData = (param) => {
+ ajax({
+ url: URL.grossprofit,
+ data: param,
+ success: (res) => {
+ let { data } = res;
+ // let rowsData = { rows: [] };
+ if (data) {
+ //初始化模型
+ //rowsData = data[GROSSPROFITQUEYR.GROSS_BODY];
+ this.props.form.setAllFormValue({
+ [GROSSPROFITQUEYR.GROSS_HEAD]: data.head[GROSSPROFITQUEYR.GROSS_HEAD]
+ });
+ this.props.table.setAllTableData(
+ GROSSPROFITQUEYR.GROSS_BODY,
+ data.body[GROSSPROFITQUEYR.GROSS_BODY]
+ );
+ }
+ }
+ });
+ };
+ onChange = (e) => {
+ this.setState({ value: e });
+ };
+
+ render() {
+ const { createSimpleTable } = this.props.table;
+ const { createForm } = this.props.form;
+ return (
+
+
+
+ {getLangByResId(this, '4004POORDER-000113')}
+ {/* 国际化处理: 毛利预估*/}
+
+
+ {createForm(GROSSPROFITQUEYR.GROSS_HEAD, {})}
+
+ {/* 列表区域 */}
+ {createSimpleTable(GROSSPROFITQUEYR.GROSS_BODY, {
+ showIndex: true
+ })}
+
+
+
+
+ );
+ }
+}
+export default (GrossProfitQuery = createPage({})(GrossProfitQuery));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/grossprofitquery/index.less b/src/pu/pu/poorder/grossprofitquery/index.less
new file mode 100644
index 0000000..61f5b9a
--- /dev/null
+++ b/src/pu/pu/poorder/grossprofitquery/index.less
@@ -0,0 +1,5 @@
+.gross-profit-modal {
+ // .u-modal-body {
+ // padding-top: 0;
+ // }
+}
diff --git a/src/pu/pu/poorder/grossprofitquery/init/index.js b/src/pu/pu/poorder/grossprofitquery/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/poorder/grossprofitquery/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/grossprofitquery/init/initTemplate.js b/src/pu/pu/poorder/grossprofitquery/init/initTemplate.js
new file mode 100644
index 0000000..dddcb0a
--- /dev/null
+++ b/src/pu/pu/poorder/grossprofitquery/init/initTemplate.js
@@ -0,0 +1,26 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 采购订单毛利预估
+ * @Date: 2019-04-15 13:13:52
+ * @Last Modified by: zhaochyu
+ * @Last Modified time: 2019-04-15 14:02:00
+ */
+import { GROSSPROFITQUEYR } from '../../constance';
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: GROSSPROFITQUEYR.PAGECODE
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta);
+ }
+ }
+ }
+ );
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/addBtnClick.js b/src/pu/pu/poorder/list/btnClicks/addBtnClick.js
new file mode 100644
index 0000000..8ea1e01
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/addBtnClick.js
@@ -0,0 +1,15 @@
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-05-09 11:25:32
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-10 21:20:58
+ */
+import { URL, STATUS, PAGECODE } from '../../constance';
+
+export default function addBtnClick(props, searchVal) {
+ props.pushTo(URL.gotoCard, { status: STATUS.add, tempstatus: STATUS.add, pagecode: PAGECODE.listcode });
+}
+
+/*QwCcdu/06Kz5BGRJW8BXmF88+yjF/3vogZJMmYM94Fo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/arrivePlanBtn.js b/src/pu/pu/poorder/list/btnClicks/arrivePlanBtn.js
new file mode 100644
index 0000000..d4f880d
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/arrivePlanBtn.js
@@ -0,0 +1,29 @@
+/*5kkVUz+KJcHLrvOOopWFDhSGddl68flw+5rFIC3SgMg=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 到货计划
+ * @Date: 2018-06-27 13:13:14
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-22 16:44:48
+ */
+import { toast } from 'nc-lightapp-front';
+import { FIELD, PAGECODE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+export default function arrivePlanBtn(props) {
+ props = this.props;
+ let selectedRow = this.props.table.getCheckedRows(PAGECODE.tableId);
+ if (selectedRow.length != 1) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000065') /* 国际化处理: 请选择一行数据!*/
+ });
+ return;
+ }
+ let pk_order = selectedRow[0].data.values.pk_order.value;
+ this.setState({
+ showModal: true,
+ pk_order: pk_order
+ });
+}
+
+/*5kkVUz+KJcHLrvOOopWFDhSGddl68flw+5rFIC3SgMg=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/bizInfoBtnClick.js b/src/pu/pu/poorder/list/btnClicks/bizInfoBtnClick.js
new file mode 100644
index 0000000..d9c2744
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/bizInfoBtnClick.js
@@ -0,0 +1,32 @@
+/*np1mDAAJpkz4U/hTZH1Yje1NBk8SxL8kic41sSbenjA=*/
+/*
+ * @Author: gaoxwu
+ * @PageInfo: 内部交易信息
+ * @Date: 2021-06-16 18:39:58
+ * @Last Modified by: gaoxwu
+ * @Last Modified time: 2021-06-18 16:40:31
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE } from '../../constance/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props) {
+ let seldatas = props.table.getCheckedRows(PAGECODE.tableId);
+ //seldatas = seldatas.map((item) => item.data);
+ if (seldatas.length == 0) {
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000137')); /* 国际化处理: 请选择数据行!*/
+ return;
+ }
+ let pk_order = seldatas[0].data.values.pk_order.value;
+ ajax({
+ url: URL.transinfo,
+ data: pk_order,
+ success: (res) => {
+ if (res.success) {
+ this.setState({ showBusinessModal: true, pk_order: pk_order });
+ }
+ }
+ });
+}
+
+/*np1mDAAJpkz4U/hTZH1Yje1NBk8SxL8kic41sSbenjA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/checkDataPermission.js b/src/pu/pu/poorder/list/btnClicks/checkDataPermission.js
new file mode 100644
index 0000000..f60dead
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/checkDataPermission.js
@@ -0,0 +1,50 @@
+/*mLZewXa1tvB7iUHIEHrbAprRHOHCQhc9J7GaIeCcpHw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 数据权限检查
+ * @Date: 2018-08-01 19:51:18
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-31 10:11:47
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+/**
+*
+* @param {*} record
+* @param {*} oprcode 操作code
+* @param {*} callBack 回调
+*/
+export default function checkDataPermission(record, oprcode, callBack) {
+ let id = '';
+ if (record) {
+ id = record.pk_order.value;
+ } else {
+ let checkeddatas = this.props.table.getCheckedRows(PAGECODE.listcode);
+ if (checkeddatas == null || checkeddatas.length == 0) {
+ toast({ color: 'warning', content: getLangByResId(this, '4004POORDER-000066') }); /* 国际化处理: 请选择单据!*/
+ return;
+ }
+ id = checkeddatas[0].data.values.pk_order.value;
+ }
+ let pks = new Array();
+ pks.push(id);
+ let data = {
+ pks: pks,
+ actionCode: oprcode,
+ ts: record.ts.value
+ };
+ ajax({
+ url: URL.editdatapermission,
+ data: data,
+ method: 'post',
+ success: (res) => {
+ if (res && res.success) {
+ callBack && callBack();
+ }
+ }
+ });
+}
+
+/*mLZewXa1tvB7iUHIEHrbAprRHOHCQhc9J7GaIeCcpHw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/commit.js b/src/pu/pu/poorder/list/btnClicks/commit.js
new file mode 100644
index 0000000..56d0c52
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/commit.js
@@ -0,0 +1,101 @@
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单提交
+ * @Date: 2018-06-20 18:23:03
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-01-03 15:27:44
+ */
+import { URL, FIELD, PAGECODE } from '../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+import { showBatchOprMessage, showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { updateCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+
+export default function commit(props, record, index, assign) {
+ // 获取选中行
+ // 执行提交操作
+ let _this = this;
+ let dataRows = [];
+ let indexs = [];
+ if (record && record.pk_order) {
+ let info = {
+ pks: record.pk_order.value,
+ ts: record.ts.value
+ };
+ dataRows.push(info);
+ indexs.push(record.numberindex && record.numberindex.value - 1);
+ } else {
+ let rows = props.table.getCheckedRows(PAGECODE.tableId);
+ // 如果没有选中行,则提示并返回,不进行任何操作
+ if (rows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000067') /* 国际化处理: 请选择需要提交的数据!*/
+ });
+ return;
+ }
+ rows.map((item) => {
+ let info = {
+ pks: item.data.values.pk_order.value,
+ ts: item.data.values.ts.value
+ };
+ dataRows.push(info);
+ indexs.push(item.index);
+ });
+ //批量处理需把索引号置空
+ indexs = null;
+ }
+
+ // 拼装json
+ let data = {
+ closedto: dataRows,
+ pagecode: PAGECODE.listcode,
+ extstr: ''
+ };
+ //指派
+ if (assign) {
+ data['assign'] = JSON.stringify(assign);
+ }
+ // 发送请求
+ ajax({
+ url: URL.gridcommit,
+ data: data,
+ success: (res) => {
+ if (
+ res.data &&
+ res.data.workflow &&
+ (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
+ ) {
+ _this.commitInfo = {
+ index: index,
+ record: record
+ };
+ _this.setState({
+ compositedata: res.data,
+ compositedisplay: true
+ });
+ return;
+ }
+ if (res.success) {
+ updateCacheDataForList(props, PAGECODE.tableId, FIELD.pk_order, res.data, indexs);
+ buttonController.initButtons.call(this, props);
+ /* 国际化处理: 提交成功!*/
+ if (record && record.pk_order) {
+ showSuccessInfo(getLangByResId(this, '4004POORDER-000037'));
+ } else {
+ //批量
+ showBatchOprMessage(
+ getLangByResId(this, '4004POORDER-000097'),
+ res.data,
+ {},
+ getLangByResId(this, '4004POORDER-000097')
+ );
+ }
+ }
+ }
+ });
+}
+
+/*k2rtYkvt2pMBGTZR7s28RfEBc6gUcTpAFOmgXXOupQM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/commonCheckData.js b/src/pu/pu/poorder/list/btnClicks/commonCheckData.js
new file mode 100644
index 0000000..8210951
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/commonCheckData.js
@@ -0,0 +1,25 @@
+/*1builUODACw21M0y83UR65htDRwREgV2Uow32UG5nAA=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 判断数据是否可用
+ * @Date: 2018-09-11 14:46:54
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-12-17 15:37:08
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+
+export default function commonCheckData(url, checkData, callBack) {
+ ajax({
+ url: url,
+ data: checkData,
+ method: 'post',
+ success: (res) => {
+ if (res && res.success) {
+ callBack && callBack();
+ }
+ }
+ });
+}
+
+/*1builUODACw21M0y83UR65htDRwREgV2Uow32UG5nAA=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/commonClose.js b/src/pu/pu/poorder/list/btnClicks/commonClose.js
new file mode 100644
index 0000000..5f5ee9a
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/commonClose.js
@@ -0,0 +1,86 @@
+/*NcOoh+tB960iQlDT1k4qToAtUPMY+QDTsgfFV2SI+7Y=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单关闭请求处理
+ * @Date: 2018-05-09 11:25:32
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-04-03 17:15:35
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, FIELD, PAGECODE } from '../../constance';
+import { updateCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { showBatchOprMessage, showSuccessInfo, showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import ScriptActionDlg from '../../../pub/ScriptActionDlg';
+
+/**
+ * @param {*} props
+ * @param {*} url 请求链接
+ * @param {*} closedata 数据
+ */
+export default function commonClose(url, closedata, rowindex, contents) {
+ let _this = this;
+ if (
+ contents == getLangByResId(this, '4004POORDER-000025') ||
+ contents == getLangByResId(this, '4004POORDER-000026') ||
+ contents == getLangByResId(this, '4004POORDER-000027') ||
+ contents == getLangByResId(this, '4004POORDER-000028')
+ ) {
+ //冻结原因
+ this.props.modal.show('MessageDlg', {
+ title: getLangByResId(this, '4004POORDER-000141') /* 国际化处理: 冻结原因*/,
+ content: (
+ {
+ //reason = value;
+ closedata.closeReason = value;
+ }}
+ title={getLangByResId(this, '4004POORDER-000142')}
+ max={100}
+ showMax={true}
+ />
+ ),
+ size: 'sm',
+ beSureBtnClick: handelBills.bind(this, this.props, url, closedata, contents), //点击确定按钮事件
+ cancelBtnClick: () => this.props.modal.close('MessageDlg'),
+ closeModalEve: () => this.props.modal.close('MessageDlg')
+ });
+ } else if (contents == getLangByResId(this, '4004POORDER-000030')) {
+ handelBills.call(this, this.props, url, closedata, contents); // 销售协同订单
+ }
+}
+
+function handelBills(props, url, closedata, contents, skipCodes) {
+ if (closedata.closeReason != undefined && closedata.closeReason == '') {
+ showErrorInfo(null, getLangByResId(this, '4004POORDER-000143')); /* 国际化处理: 关闭/打开原因不能为空*/
+ commonClose.call(this, url, closedata, null, contents);
+ } else if (closedata.closeReason != undefined && closedata.closeReason.length > 100) {
+ showErrorInfo(getLangByResId(this, '4004POORDER-000144')); //提示 ! 最大录入长度为300(汉字最多录入100个)
+ commonClose.call(this, url, closedata, null, contents);
+ } else {
+ ajax({
+ url: url,
+ data: closedata,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ updateCacheDataForList(this.props, PAGECODE.tableId, FIELD.pk_order, res.data, null);
+ buttonController.initButtons.call(this, this.props, null);
+ showBatchOprMessage(contents, res.data, {}, contents);
+ /**
+ * 变成编辑态时,不保留勾选
+ * selectAllRows(moduleId, checked)
+ * moduleId 区域ID
+ * checked为true 全选
+ * checked为false 全不选
+ */
+ // this.props.table.selectAllRows(PAGECODE.tableId, false);
+ }
+ }
+ });
+ }
+}
+
+/*NcOoh+tB960iQlDT1k4qToAtUPMY+QDTsgfFV2SI+7Y=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/commonSearch.js b/src/pu/pu/poorder/list/btnClicks/commonSearch.js
new file mode 100644
index 0000000..78f5478
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/commonSearch.js
@@ -0,0 +1,103 @@
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-05-22 16:54:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-29 11:30:39
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, OrderCache } from '../../constance';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { transtypeUtils } from '../../../../../scmpub/scmpub/pub/tool';
+import { showSuccessInfo, showQuerySuccess, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+
+export default function commonSerach(tabCode, queryInfo, noshow) {
+ let _this = this;
+ let searchflag = this.searchflag;
+ let pageInfo = this.props.table.getTablePageInfo(PAGECODE.tableId); //分页信息
+ if (!searchflag) {
+ queryInfo = this.props.search.getQueryInfo(PAGECODE.searchId, false);
+ } else if (queryInfo == null) {
+ queryInfo = this.props.search.getQueryInfo(PAGECODE.searchId, true);
+ }
+ queryInfo = transtypeUtils.beforeSearch.call(this, queryInfo, FIELD.ctrantypeid);
+ queryInfo = queryInfo || {};
+ if (queryInfo.querycondition) {
+ setDefData(OrderCache.OrderCacheKey, 'queryInfo', queryInfo);
+ queryInfo.pageInfo = pageInfo;
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: PAGECODE.listcode, //页面编码
+ currentTab: tabCode //当前页签编码
+ };
+ ajax({
+ url: URL.getList,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success) {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (data == null) {
+ _this.props.table.setAllTableData(PAGECODE.tableId, { rows: [] });
+ _this.setState({
+ uncommitNum: '0',
+ approvingNum: '0',
+ executNum: '0'
+ });
+ } else {
+ let uncommitNum; // 未提交数量
+ let approvingNum; // 审批中数量
+ let executNum; //执行中
+ if (data.tabNum) {
+ uncommitNum = data.tabNum.toCommit == undefined ? 0 : data.tabNum.toCommit;
+ approvingNum = data.tabNum.approving == undefined ? 0 : data.tabNum.approving;
+ executNum = data.tabNum.executing == undefined ? 0 : data.tabNum.executing;
+ }
+ _this.setState(
+ {
+ uncommitNum: uncommitNum,
+ approvingNum: approvingNum,
+ executNum: executNum
+ },
+ () => {
+ let currentTab = data.currentTab;
+ let rowsData = { rows: [] };
+ if (data.currentGrid && data.currentGrid[PAGECODE.tableId]) {
+ rowsData = data.currentGrid[PAGECODE.tableId];
+ }
+ _this.props.table.setAllTableData(PAGECODE.tableId, rowsData);
+ }
+ );
+ setDefData.call(_this, OrderCache.OrderCacheKey, 'totalNum', {
+ uncommitNum: uncommitNum,
+ approvingNum: approvingNum,
+ executNum: executNum,
+ currentTab: tabCode
+ });
+ }
+ //'查询成功!'
+ if (noshow == 'isRefresh') {
+ showRefreshInfo();
+ } else if (noshow == undefined) {
+ if (data && data.currentGrid && data.currentGrid[PAGECODE.tableId]) {
+ showSuccessInfo(getLangByResId(_this, '4004POORDER-000006'));
+ } else {
+ showQuerySuccess();
+ }
+ }
+ buttonController.initButtons.call(_this, _this.props);
+ }
+ }
+ });
+ }
+}
+
+/*wxBtVHTjruFsGR5nLWPsoPId2W9Q5N1rWJytN33z/Gs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/deleteBtnClick.js b/src/pu/pu/poorder/list/btnClicks/deleteBtnClick.js
new file mode 100644
index 0000000..b2bc316
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/deleteBtnClick.js
@@ -0,0 +1,94 @@
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-05-02 15:53:07
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-07-26 13:04:32
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, LIST_BUTTON } from '../../constance';
+import { deleteCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+import { showBatchOprMessage, showDeleteDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { deleteLine } from './index';
+let _this;
+
+export default function deleteBtnClick(props, record) {
+ _this = this;
+ if (record && record.pk_order) {
+ deleteLine.call(this, props, record);
+ } else {
+ let rows = props.table.getCheckedRows(PAGECODE.tableId);
+ // 如果没有选中行,则提示并返回,不进行任何操作
+ if (rows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000068') /* 国际化处理: 请选择需要删除的数据!*/,
+ });
+ return;
+ }
+ showDeleteDialog({
+ /* 国际化处理: 删除,确定要删除吗?*/
+ beSureBtnClick: doDelete.bind(this, props, rows),
+ });
+ }
+}
+
+function doDelete(props, rows) {
+ // 获取待删除表格行的行号
+ let pkarr = new Array();
+ let indexs = [];
+ rows.map(item => {
+ indexs.push(item.index);
+ });
+ // 执行删除操作
+ let delRows = [];
+ rows.map(item => {
+ let data = {
+ pks: item.data.values.pk_order.value,
+ ts: item.data.values.ts.value,
+ };
+ pkarr.push(data.pks);
+ delRows.push(data);
+ }); // 拼装json
+ let data = {
+ deleteInfo: delRows,
+ pagecode: PAGECODE.listcode,
+ };
+ ajax({
+ url: URL.griddelete,
+ data: data,
+ success: res => {
+ if (JSON.stringify(res.data.errorMessageMap || {}) != '{}') {
+ // 成功的index
+ let sucIndex = [];
+ rows.forEach((element, index) => {
+ if (!res.data.errorMessageMap[index]) {
+ sucIndex.push(element.index);
+ }
+ deleteCacheDataForList(props, PAGECODE.tableId, element.data.values.pk_order.value);
+ });
+ props.table.deleteTableRowsByIndex(PAGECODE.tableId, sucIndex);
+ } else {
+ let succIndex = [];
+ rows.forEach((element, index) => {
+ deleteCacheDataForList(props, PAGECODE.tableId, element.data.values.pk_order.value);
+ succIndex.push(element.index);
+ });
+ props.table.deleteTableRowsByIndex(PAGECODE.tableId, succIndex);
+ }
+ showBatchOprMessage(null, res.data, {}, getLangByResId(_this, '4004POORDER-000041'));
+ buttonController.initButtons.call(_this, _this.props);
+ },
+ error: ress => {
+ toast({
+ color: 'danger',
+ content: ress.message,
+ });
+ },
+ });
+}
+
+/*D6qijQE+tseVhRgdMUhc8J+Cx8pdLTe4UtjRVT0g8/Q=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/deleteLine.js b/src/pu/pu/poorder/list/btnClicks/deleteLine.js
new file mode 100644
index 0000000..4c2c8da
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/deleteLine.js
@@ -0,0 +1,57 @@
+/*n9ZwLHcUmWTB9VWvh6e2qx6NA1c7IdonXyxV6m0obn4=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-05-02 15:53:07
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-07-26 13:04:16
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, LIST_BUTTON } from '../../constance';
+import { deleteCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController } from '../viewController/index';
+
+export default function deleteLine(props, record) {
+ // props.button.setPopContent(LIST_BUTTON.Delete, '确认删除?');
+ // showWarningDialog(null, '确认要删除所选数据吗?', {
+ // beSureBtnClick: doDelete.bind(this, props, record)
+ // });
+ doDelete.call(this, props, record);
+}
+
+function doDelete(props, record) {
+ let delRows = [];
+ let datas = {
+ pks: record.pk_order.value,
+ ts: record.ts.value
+ };
+ delRows.push(datas);
+ let data = {
+ deleteInfo: delRows,
+ pagecode: PAGECODE.listcode
+ };
+ ajax({
+ url: URL.delete,
+ data: data,
+ success: (res) => {
+ if (res.success) {
+ deleteCacheDataForList(props, PAGECODE.tableId, record.pk_order.value);
+ props.table.deleteTableRowsByIndex(PAGECODE.tableId, record.numberindex.value - 1);
+ // toast({content: getLangByResId(this, '4004POORDER-000043')});
+ /* 国际化处理: 删除成功!*/
+ showSuccessInfo(getLangByResId(this, '4004POORDER-000043'));
+ buttonController.initButtons.call(this, this.props);
+ } else {
+ toast({
+ color: 'success',
+ content: getLangByResId(this, '4004POORDER-000069') /* 国际化处理: 删除失败!*/
+ });
+ // showErrorInfo
+ }
+ }
+ });
+}
+
+/*n9ZwLHcUmWTB9VWvh6e2qx6NA1c7IdonXyxV6m0obn4=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/freezeBtn.js b/src/pu/pu/poorder/list/btnClicks/freezeBtn.js
new file mode 100644
index 0000000..825e82e
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/freezeBtn.js
@@ -0,0 +1,99 @@
+/*UV5WUKfhEWyzFqQmA8mQXC7+hcbPwFpioPcinfp2Nfc=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 冻结/解冻
+ * @Date: 2018-05-22 16:54:44
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-02 13:24:57
+ */
+import { ajax, toast, base } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD, LIST_BUTTON } from '../../constance';
+import { updateCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { showBatchOprMessage } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { FreezeReason } from '../../freezeReason/index';
+import { buttonController } from '../viewController/index';
+const { NCInput, NCTextArea } = base;
+let reason = '';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import ScriptActionDlg from '../../../pub/ScriptActionDlg';
+
+export default function freezeBtn(props, record, _url, contents) {
+ let _this = this;
+ let rows = props.table.getCheckedRows(PAGECODE.tableId);
+ // 如果没有选中行,则提示并返回,不进行任何操作
+ if (rows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000070') /* 国际化处理: 请至少选择一行数据!*/
+ });
+ return;
+ }
+ // 获取待表格行的行号
+ let indexs = rows.map((item) => {
+ return item.index;
+ });
+ let delRows = [];
+ let rowindex = [];
+ rows.map((item) => {
+ let data = {
+ pks: item.data.values.pk_order.value,
+ ts: item.data.values.ts.value
+ };
+ delRows.push(data);
+ rowindex.push(item.index);
+ }); // 拼装json
+ let data = {
+ closedto: delRows,
+ pagecode: PAGECODE.listcode,
+ extstr: reason
+ };
+ if (contents == getLangByResId(this, '4004POORDER-000023')) {
+ /* 国际化处理: 冻结*/
+ let getFreezeReason = (val) => {
+ reason = val;
+ };
+
+ this.props.modal.show('MessageDlg', {
+ title: getLangByResId(this, '4004POORDER-000044') /* 国际化处理: 冻结原因*/,
+ content: (
+ {
+ reason = value;
+ }}
+ title={getLangByResId(this, '4004POORDER-000130')}
+ max={33}
+ showMax={true}
+ />
+ ),
+ size: 'sm',
+ beSureBtnClick: beSureBtnClick.bind(this, this.props, _url, data, contents, rowindex),
+ // beSureBtnClick: beSureBtnClick.bind(this, this.props, _url, data, contents), //点击确定按钮事件
+ cancelBtnClick: () => this.props.modal.close('MessageDlg'),
+ closeModalEve: () => this.props.modal.close('MessageDlg')
+ });
+ } else {
+ freezeBills.call(this, this.props, _url, data, contents, rowindex);
+ }
+}
+
+// 弹出框点击确定事件
+function beSureBtnClick(props, _url, data, contents, rowindex) {
+ reason = reason == '' ? null : reason;
+ data.extstr = reason;
+ freezeBills.call(this, props, _url, data, contents);
+}
+
+function freezeBills(props, _url, data, contents, rowindex) {
+ ajax({
+ url: _url,
+ data: data,
+ method: 'POST',
+ success: (res) => {
+ updateCacheDataForList(props, PAGECODE.tableId, FIELD.pk_order, res.data, null);
+ buttonController.initButtons.call(this, this.props);
+ showBatchOprMessage(contents, res.data, {}, contents);
+ }
+ });
+}
+
+/*UV5WUKfhEWyzFqQmA8mQXC7+hcbPwFpioPcinfp2Nfc=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/index.js b/src/pu/pu/poorder/list/btnClicks/index.js
new file mode 100644
index 0000000..00d5f61
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/index.js
@@ -0,0 +1,55 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 按钮事件统一入口
+ * @Date: 2018-04-19 10:09:37
+ * @Last Modified by: gaoxwu
+ * @Last Modified time: 2021-06-16 19:10:06
+ */
+import searchBtnClick from './searchBtnClick';
+import pageInfoClick from './pageInfoClick';
+import deleteBtnClick from './deleteBtnClick';
+import addBtnClick from './addBtnClick';
+import commonClose from './commonClose';
+import commit from './commit';
+import uncommit from './uncommit';
+import freezeBtn from './freezeBtn';
+import arrivePlanBtn from './arrivePlanBtn';
+import print_BtnClick from './print_BtnClick';
+import printList_BtnClick from './printList_BtnClick';
+import checkDataPermission from './checkDataPermission';
+import deleteLine from './deleteLine';
+import printOut from './printOut';
+import payPlan from './payPlan';
+import requestCheckData from './requestCheckData';
+import transportstatusquery from './transportstatusquery';
+import commonSearch from './commonSearch';
+import commonCheckData from './commonCheckData';
+import payExecStatBtnClick from './payExecStatBtnClick';
+import bizInfoBtnClick from './bizInfoBtnClick';
+
+export {
+ searchBtnClick,
+ pageInfoClick,
+ addBtnClick,
+ deleteBtnClick,
+ commonClose,
+ commit,
+ uncommit,
+ freezeBtn,
+ arrivePlanBtn,
+ print_BtnClick,
+ printList_BtnClick,
+ checkDataPermission,
+ deleteLine,
+ printOut,
+ payPlan,
+ requestCheckData,
+ transportstatusquery,
+ commonSearch,
+ commonCheckData,
+ payExecStatBtnClick,
+ bizInfoBtnClick
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/pageInfoClick.js b/src/pu/pu/poorder/list/btnClicks/pageInfoClick.js
new file mode 100644
index 0000000..b2aff97
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/pageInfoClick.js
@@ -0,0 +1,37 @@
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面预留功能 --展示分页信息
+ * @Date: 2018-04-19 10:09:24
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-07-26 10:21:52
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL, PAGECODE, FIELD } from '../../constance';
+import buttonController from '../viewController/buttonController';
+
+export default function(props, config, pks) {
+ let _this = this;
+ let data = {
+ pks: pks,
+ pageid: PAGECODE.listcode,
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: URL.currentpage,
+ data: data,
+ success: function(res) {
+ let { success, data } = res;
+ if (success) {
+ if (data) {
+ _this.props.table.setAllTableData(PAGECODE.tableId, data[PAGECODE.tableId]);
+ } else {
+ _this.props.table.setAllTableData(PAGECODE.tableId, { rows: [] });
+ }
+ buttonController.initButtons.call(_this, _this.props, null);
+ }
+ },
+ });
+}
+
+/*j07c8riwYnz20MYibuDbtOMs/qp2LpQNiiP0wG/10HE=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/payExecStatBtnClick.js b/src/pu/pu/poorder/list/btnClicks/payExecStatBtnClick.js
new file mode 100644
index 0000000..21cf5a1
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/payExecStatBtnClick.js
@@ -0,0 +1,86 @@
+/*jrcP7nyTP+YYLELV+HhS7IYIYwrjPA4RcukEqQeCTRk=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 付款执行情况
+ * @Date: 2019-04-22 14:01:15
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2022-07-22 10:32:21
+ */
+import { toast } from 'nc-lightapp-front';
+import { PAGECODE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { viewModel } from 'nc-lightapp-front';
+let { setGlobalStorage } = viewModel;
+export default function payExecStatBtnClick(props) {
+ let selectedRow = props.table.getCheckedRows(PAGECODE.tableId);
+ if (selectedRow == null || selectedRow.length == 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let arrstr = [];
+ let str = '';
+ let vbillcode = '';
+ selectedRow.map((item) => {
+ if (item.data.values.pk_org.value) {
+ arrstr.push(item.data.values.pk_org.value);
+ }
+ if (item.data.values.vbillcode.value) {
+ vbillcode += item.data.values.vbillcode.value + ',';
+ }
+ });
+ let strSet = [ ...new Set(arrstr) ];
+ for (let i = 0; i < strSet.length; i++) {
+ str += strSet[i] + ',';
+ }
+ let LinkReport = {
+ logic: 'and',
+ conditions: [
+ {
+ field: 'po_order.pk_org',
+ value: {
+ firstvalue: str,
+ secondvalue: ''
+ },
+ oprtype: '=',
+ display: null,
+ isIncludeSub: false,
+ refurl: '',
+ datatype: '204'
+ },
+ {
+ field: 'po_order.vbillcode',
+ value: { firstvalue: vbillcode, secondvalue: '' },
+ oprtype: '=',
+ display: vbillcode,
+ isIncludeSub: false,
+ refurl: '',
+ datatype: '1'
+ }
+ ]
+ };
+ // localStorage.setItem('LinkReport', JSON.stringify(LinkReport));
+ setGlobalStorage('localStorage', 'LinkReport', JSON.stringify(LinkReport));
+ // pageTo.openTo('/pu/pu/report/orderprayexecquery/index.html', {
+ // appcode: '400413208',
+ // pageCode: '400413208_report'
+ // });
+ let params;
+ if (selectedRow && selectedRow.length == 1) {
+ params = {
+ 'po_order.pk_org': selectedRow[0].data.values['pk_org'],
+ 'po_order.vbillcode': selectedRow[0].data.values['vbillcode'],
+ 'po_order.dbilldate': selectedRow[0].data.values['dbilldate'].value.substr(0, 10)
+ };
+ }
+
+ this.props.openTo(null, {
+ appcode: '400413208',
+ pageCode: '400413208_report',
+ params: JSON.stringify(params)
+ });
+}
+
+/*jrcP7nyTP+YYLELV+HhS7IYIYwrjPA4RcukEqQeCTRk=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/payPlan.js b/src/pu/pu/poorder/list/btnClicks/payPlan.js
new file mode 100644
index 0000000..778fcf5
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/payPlan.js
@@ -0,0 +1,39 @@
+/*BPGvkVhwiTt3SZoflOvBTqWH6CvcyeAkEjgEcwiw7Cs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 生成付款计划
+ * @Date: 2018-08-30 19:34:11
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-04-06 15:34:13
+ */
+import { URL, STATUS, FIELD, PAGECODE, APPCODE } from '../../constance';
+import { toast } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function payPlan(props) {
+ let rows = props.table.getCheckedRows(PAGECODE.tableId);
+ // 2018-10-23 常伟提bug http://172.16.50.197:8080/browse/NCCLOUD-85550?filter=29818,说明如下:
+ //采购订单付款计划按钮可用性-单选单据时:当单据状态为:审批通过时,按钮可用;当单据状态为:自由、审批中、审批不通过时,按钮不可用;多选单据时:按钮是否可用,按所选的第一条单据去判断;
+
+ //单选且审批过的单据可用openTO付款计划
+ if (rows.length > 0) {
+ let forderstatus = rows[0].data.values.forderstatus.value; // 单据状态
+ if (forderstatus == FIELD.approved) {
+ let pk = rows[0].data.values.pk_order.value;
+ props.openTo(URL.payplan, {
+ id: pk,
+ appcode: APPCODE.payplanAppCode,
+ pk_org: JSON.stringify(rows[0].data.values[FIELD.pk_org]),
+ vbillcode: rows[0].data.values[FIELD.vbillcode].value,
+ dbilldate: rows[0].data.values[FIELD.dbilldate].value
+ });
+ } else {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000047') /* 国际化处理: 请选择审批通过的数据!*/
+ });
+ }
+ }
+}
+
+/*BPGvkVhwiTt3SZoflOvBTqWH6CvcyeAkEjgEcwiw7Cs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/printList_BtnClick.js b/src/pu/pu/poorder/list/btnClicks/printList_BtnClick.js
new file mode 100644
index 0000000..86a5173
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/printList_BtnClick.js
@@ -0,0 +1,60 @@
+/*2TvFirVRtbomvMU/B0saFx0b2z8l8Bs89taRTbKphGU=*/
+/*
+ * @Author: zhengylr
+ * @PageInfo: 打印清单
+ * @Date: 2021-12-27
+ */
+import { toast, ajax } from 'nc-lightapp-front';
+import { PAGECODE, URL } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import remoteCheck from '../../../pub/remoteCall/remoteCheck';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+
+export default function printList_BtnClick(props) {
+ let pks = [];
+ let selrows = props.table.getCheckedRows(PAGECODE.tableId);
+ if (selrows.length == 0) {
+ toast({
+ color: 'danger',
+ content: getLangByResId(this, '4004POORDER-000071') /* 国际化处理: 请选择要打印的订单!*/
+ });
+ return;
+ }
+ let funcode = null;
+ let scene = props.getUrlParam('scene');
+ if (scene == 'freeze') {
+ funcode = '400400800';
+ }
+ selrows.forEach((row) => {
+ let pk = row.data.values.pk_order.value;
+ if (pk) {
+ pks.push(pk);
+ }
+ });
+ let queryInfo = {
+ pks: pks
+ };
+ remoteCheck.call(this, URL.printvalidate, queryInfo, () => {
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ * transactiontype 交易类型编码
+ * billtype 单据类型
+ */
+ printPreview(props, URL.print, {
+ appcode: props.getAppCode(),
+ nodekey: 'listing_print', //默认模板设置的应用标识
+ oids: pks,
+ printType: true,
+ realData: true,
+ controlPrintNum: true
+ });
+ });
+}
+
+/*2TvFirVRtbomvMU/B0saFx0b2z8l8Bs89taRTbKphGU=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/printOut.js b/src/pu/pu/poorder/list/btnClicks/printOut.js
new file mode 100644
index 0000000..821ab6c
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/printOut.js
@@ -0,0 +1,45 @@
+/*OvOenXda7hAGBBFFduhXiMxMvCb2b350kLuNLzqbMVw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 输出
+ * @Date: 2018-08-09 13:46:46
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-04-27 09:50:59
+ */
+import { output, toast } from 'nc-lightapp-front';
+import { PAGECODE, URL } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import remoteCheck from '../../../pub/remoteCall/remoteCheck';
+
+export default function printOut(props) {
+ let pks = [];
+ let selrows = props.table.getCheckedRows(PAGECODE.tableId);
+ if (selrows.length == 0) {
+ toast({
+ color: 'danger',
+ content: getLangByResId(this, '4004POORDER-000071') /* 国际化处理: 请选择要打印的订单!*/,
+ });
+ return;
+ }
+ selrows.forEach(row => {
+ let pk = row.data.values.pk_order.value;
+ if (pk) {
+ pks.push(pk);
+ }
+ });
+ let queryInfo = {
+ pks: pks,
+ };
+ remoteCheck.call(this, URL.printvalidate, queryInfo, () => {
+ output({
+ url: URL.print,
+ data: {
+ oids: pks,
+ nodekey: '400400800',
+ outputType: 'output',
+ },
+ });
+ });
+}
+
+/*OvOenXda7hAGBBFFduhXiMxMvCb2b350kLuNLzqbMVw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/print_BtnClick.js b/src/pu/pu/poorder/list/btnClicks/print_BtnClick.js
new file mode 100644
index 0000000..fafa2b2
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/print_BtnClick.js
@@ -0,0 +1,67 @@
+/*9a1eTd5yO0nmu7639LcU5tOG+wP56TJsHNNZOreV3vs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 打印
+ * @Date: 2018-07-04 14:50:40
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-07-07 10:24:44
+ */
+import { toast } from 'nc-lightapp-front';
+import { PAGECODE, URL, BILLTYPE } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import remoteCheck from '../../../pub/remoteCall/remoteCheck';
+import poc from 'uap/common/components/printOnClient';
+const { printPreview } = poc;
+
+export default function print_BtnClick(props) {
+ let pks = [];
+ let selrows = props.table.getCheckedRows(PAGECODE.tableId);
+ if (selrows.length == 0) {
+ toast({
+ color: 'danger',
+ content: getLangByResId(this, '4004POORDER-000071') /* 国际化处理: 请选择要打印的订单!*/
+ });
+ return;
+ }
+ let funcode = props.getAppCode();
+ let scene = props.getUrlParam('scene');
+ if (scene == 'freeze') {
+ funcode = '400400800';
+ }
+ let pk_orgs = new Set();
+ selrows.forEach((row) => {
+ let pk = row.data.values.pk_order.value;
+ if (pk) {
+ pks.push(pk);
+ }
+ pk_orgs.add(row.data.values.pk_org.value);
+ });
+ let queryInfo = {
+ pks: pks
+ };
+ remoteCheck.call(this, URL.printvalidate, queryInfo, () => {
+ let printParams = {
+ appcode: funcode,
+ nodekey: '400400800',
+ oids: pks,
+ pk_org: pk_orgs,
+ billtype: BILLTYPE.type21,
+ printType: true,
+ realData: true,
+ controlPrintNum: true
+ };
+ /**
+ * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下)
+ * nodekey 模板节点标识
+ * oids 单据主键
+ * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印
+ * realData 传true表示打印真数据,传false表示打印假数据
+ * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询
+ * transactiontype 交易类型编码
+ * billtype 单据类型
+ */
+ printPreview(props, URL.print, printParams);
+ });
+}
+
+/*9a1eTd5yO0nmu7639LcU5tOG+wP56TJsHNNZOreV3vs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/requestCheckData.js b/src/pu/pu/poorder/list/btnClicks/requestCheckData.js
new file mode 100644
index 0000000..5aac63a
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/requestCheckData.js
@@ -0,0 +1,29 @@
+/*oXQr1XIeTuZXW9CzNlWbHmoanzfqtx0WIpezemTsj4U=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-09-11 14:14:05
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-12-07 11:27:59
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL } from '../../constance';
+import { showWarningInfo, showErrorDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function requestCheckData(data, content, callBack) {
+ ajax({
+ url: URL.sysinitgroup,
+ data: [ data ],
+ method: 'post',
+ success: (res) => {
+ if (res && res.data && res.data[data]) {
+ callBack && callBack();
+ } else {
+ showErrorDialog(null, content); /* 国际化处理: 合同模块未启用!*/
+ }
+ }
+ });
+}
+
+/*oXQr1XIeTuZXW9CzNlWbHmoanzfqtx0WIpezemTsj4U=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/searchBtnClick.js b/src/pu/pu/poorder/list/btnClicks/searchBtnClick.js
new file mode 100644
index 0000000..06d977f
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/searchBtnClick.js
@@ -0,0 +1,38 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单页面查询功能
+ * @Date: 2018-04-17 19:06:54
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-09-18 16:15:12
+ */
+import { PAGECODE, OrderCache, FIELD } from '../../constance';
+import commonSerach from './commonSearch';
+import { ajax, toast, cacheTools } from 'nc-lightapp-front';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+const { set } = cacheTools;
+
+export default function searchBtnClick(props, searchVal) {
+ let queryInfo = this.props.search.getQueryInfo(PAGECODE.searchId, true);
+ if (queryInfo != false) {
+ this.searchflag = true;
+ }
+ // 将查询条件缓存
+ this.setState({ searchVal: queryInfo });
+ let tabCode = getDefData.call(this, OrderCache.OrderCacheKey, OrderCache.OrderListTabCode);
+ let currentTab = tabCode && tabCode.tabCode != null ? tabCode.tabCode : '0';
+ if (0 == currentTab) {
+ currentTab = FIELD.tocommit;
+ } else if (1 == currentTab) {
+ currentTab = FIELD.approving;
+ } else if (2 == currentTab) {
+ currentTab = FIELD.executing;
+ } else if (3 == currentTab) {
+ currentTab = FIELD.all;
+ }
+ // 查询
+ set(OrderCache.Searchval, queryInfo);
+ commonSerach.call(this, currentTab, queryInfo);
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/transportstatusquery.js b/src/pu/pu/poorder/list/btnClicks/transportstatusquery.js
new file mode 100644
index 0000000..dbc5e72
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/transportstatusquery.js
@@ -0,0 +1,40 @@
+/*ofp6tqzx0oKglvIairZx4/k4YXknttxzuy+ZEgvwpsw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单运输状态
+ * @Date: 2018-10-09 15:29:05
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-22 16:50:18
+ */
+
+import { URL, PAGECODE } from '../../constance';
+import { ajax } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function transportstatusquery() {
+ let _this = this;
+ let selectedRow = this.props.table.getCheckedRows(PAGECODE.tableId);
+ if (selectedRow.length != 1) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+ let pk_order = selectedRow[0].data.values.pk_order.value;
+ let conditionData = {
+ pks: [ pk_order ],
+ pageid: PAGECODE.cardcode
+ };
+ ajax({
+ url: URL.transportstatusquery,
+ data: conditionData,
+ success: (res) => {
+ if (res.success) {
+ _this.setState({ transStateData: res.data, transStateShowFlag: true });
+ }
+ }
+ });
+}
+
+/*ofp6tqzx0oKglvIairZx4/k4YXknttxzuy+ZEgvwpsw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/btnClicks/uncommit.js b/src/pu/pu/poorder/list/btnClicks/uncommit.js
new file mode 100644
index 0000000..91066d1
--- /dev/null
+++ b/src/pu/pu/poorder/list/btnClicks/uncommit.js
@@ -0,0 +1,71 @@
+/*VDo0utFkHv8IrbqntUKDRR8Qu9eyJq4wurh/FuMwIwc=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单收回
+ * @Date: 2018-06-20 18:23:03
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-01-03 15:34:13
+ */
+import { URL, FIELD, PAGECODE } from '../../constance';
+import { ajax, toast } from 'nc-lightapp-front';
+import { updateCacheDataForList } from '../../../../../scmpub/scmpub/pub/cache';
+import { showBatchOprMessage } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { buttonController } from '../viewController/index';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function commit() {
+ let _this = this;
+ let indexs = [];
+ let rows = _this.props.table.getCheckedRows(PAGECODE.tableId);
+ // 如果没有选中行,则提示并返回,不进行任何操作
+ if (rows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000072') /* 国际化处理: 请选择需要收回的数据!*/
+ });
+ return;
+ }
+ // for (let j = 0; j < rows.length; j++) {
+ // let forderstatus = rows[j].data.values.forderstatus.value;
+ // if (forderstatus == FIELD.approve || forderstatus == FIELD.commit) {
+ // } else {
+ // toast({
+ // color: 'warning',
+ // content: '请选择审批中或是已提交的数据!'
+ // });
+ // return;
+ // }
+ // }
+
+ let delRows = [];
+ rows.map((item) => {
+ let info = {
+ pks: item.data.values.pk_order.value,
+ ts: item.data.values.ts.value
+ };
+ delRows.push(info);
+ // indexs.push(item.index);
+ });
+ // 拼装json
+ let data = {
+ closedto: delRows,
+ pagecode: PAGECODE.listcode,
+ extstr: ''
+ };
+ // 发送请求
+ ajax({
+ url: URL.griduncommit,
+ data: data,
+ success: (res) => {
+ if (res.success) {
+ let title = getLangByResId(_this, '4004POORDER-000052');
+ let btnName = getLangByResId(_this, '4004POORDER-000102');
+ showBatchOprMessage(title, res.data, {}, btnName);
+ updateCacheDataForList(_this.props, PAGECODE.tableId, FIELD.pk_order, res.data, null);
+ buttonController.initButtons.call(this, _this.props);
+ }
+ }
+ });
+}
+
+/*VDo0utFkHv8IrbqntUKDRR8Qu9eyJq4wurh/FuMwIwc=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/index.js b/src/pu/pu/poorder/list/index.js
new file mode 100644
index 0000000..59775ce
--- /dev/null
+++ b/src/pu/pu/poorder/list/index.js
@@ -0,0 +1,458 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单列表态页面
+ * @Date: 2018-04-19 10:21:07
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2023-06-20 14:42:00
+ */
+import React, { Component } from 'react';
+import { createPage, base, high } from 'nc-lightapp-front';
+const { NCTabsControl, NCDiv } = base;
+import initTemplate from './init/initTemplate';
+import searchBtnClick from './btnClicks/searchBtnClick';
+import { pageInfoClick, commit } from './btnClicks';
+import { URL, PAGECODE, FIELD, LIST_BUTTON, STATUS, OrderCache, TRANSFERZ2 } from '../constance';
+import commonSerach from './btnClicks/commonSearch';
+import ArrivePlan from '../arriveplan';
+import ApproveDetail from 'uap/common/components/ApproveDetail';
+import NCUploader from 'uap/common/components/NCUploader';
+const { BillTrack } = high;
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { getDefData, setDefData } from '../../../../scmpub/scmpub/pub/cache';
+import ApprovalTrans from 'uap/common/components/approvalTrans';
+import { transtypeUtils } from '../../../../scmpub/scmpub/pub/tool';
+import TransportStatusDlg from 'scmpub/scmpub/components/TransportStatus';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController, buttonClickController } from './viewController/index';
+import { showWarningDialog } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { createListTitle } from '../../../../scmpub/scmpub/pub/tool/titleUtil.js';
+import Businessinfo from 'to/to/businessinfo/list';
+import ExcelOutput from 'uap/common/components/ExcelOutput';
+import { dateFormat } from '../../../../scmpub/scmpub/pub/tool';
+
+class OrderList extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(PAGECODE.searchId);
+ props.use.table(PAGECODE.tableId);
+ this.state = {
+ uncommitNum: '0', //待提交
+ approvingNum: '0', //审批中
+ executNum: '0', //执行中
+ searchVal: null, //查询条件缓存
+ currentTab: 0, //默认显示待提交
+ showModal: false, //模态框
+ pk_order: '', //pk
+ showTrack: false, //单据追溯
+ target: null, //弹出上传控件位置
+ showUploader: false, //
+ vbillcode: '',
+ show: false, //审批详情
+ vtrantypecode: null,
+ compositedisplay: false, //指派参数
+ compositedata: null, //指派
+ transStateShowFlag: false, //运输状态
+ showBusinessModal: false, // 内部交易信息用
+ exportPK: []
+ // currentLocale: 'en-US'
+ };
+ this.appcode = ''; // 获取平台返回的appcode,交易类型发布的小应用appcode发生变化
+ this.searchflag = false;
+ this.commitInfo = {
+ index: null,
+ record: null
+ };
+ this.pk_org = null;
+ this.pk_customer = null;
+ this.pk_supplier = null;
+ initLang(this, [ '4004poorder', '4004pub' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ //页面数据初始化
+ componentDidMount() {
+ dateFormat();
+ }
+
+ // 待提交、审批中、执行中、全部页签,tab页签切换回调函数
+ tabChange = (tabCode) => {
+ setDefData.call(this, OrderCache.OrderCacheKey, OrderCache.OrderListTabCode, {
+ tabCode: tabCode
+ });
+ let queryInfo = getDefData(OrderCache.OrderCacheKey, 'queryInfo');
+ if (queryInfo != false) {
+ this.searchflag = true;
+ }
+ // if (3 == tabCode) {
+ // if (this.state.searchVal == null) {
+ // // 点击全部页签时,若未输入查询条件,就不查
+ // let rowsData = { rows: [] };
+ // this.props.table.setAllTableData(PAGECODE.tableId, rowsData);
+ // return;
+ // }
+ // }
+ this.setState({ currentTab: tabCode }, () => {
+ let tab = FIELD.tocommit;
+ if (0 == tabCode) {
+ tab = FIELD.tocommit;
+ } else if (1 == tabCode) {
+ tab = FIELD.approving;
+ } else if (2 == tabCode) {
+ tab = FIELD.executing;
+ } else if (3 == tabCode) {
+ tab = FIELD.all;
+ }
+ commonSerach.call(this, tab, queryInfo, true); // 调用查询方法
+ });
+ // 页签切换时重置按钮
+ buttonController.initButtons.call(this, this.props, tabCode);
+ };
+ // 查询区编辑后
+ onAfterEvent(props, field, val) {
+ if (field == FIELD.pk_org) {
+ multiCorpRefHandler(props, val, PAGECODE.searchId, [
+ 'pk_payterm',
+ 'pk_supplier',
+ 'cemployeeid',
+ 'pk_dept',
+ 'pk_invcsupllier',
+ 'approver',
+ 'billmaker',
+ 'pk_recvcustomer',
+ 'pk_order_b.pk_srcmaterial',
+ 'pk_order_b.pk_srcmaterial.code',
+ 'pk_order_b.pk_srcmaterial.name',
+ 'pk_order_b.vvendinventorycode',
+ 'pk_order_b.vvendinventoryname',
+ 'pk_order_b.pk_srcmaterial',
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass',
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20',
+ 'pk_order_b.vfree1',
+ 'pk_order_b.vfree2',
+ 'pk_order_b.vfree3',
+ 'pk_order_b.vfree4',
+ 'pk_order_b.vfree5',
+ 'pk_order_b.vfree6',
+ 'pk_order_b.vfree7',
+ 'pk_order_b.vfree8',
+ 'pk_order_b.vfree9',
+ 'pk_order_b.vfree10',
+ 'pk_order_b.vbdef1',
+ 'pk_order_b.vbdef2',
+ 'pk_order_b.vbdef3',
+ 'pk_order_b.vbdef4',
+ 'pk_order_b.vbdef5',
+ 'pk_order_b.vbdef6',
+ 'pk_order_b.vbdef7',
+ 'pk_order_b.vbdef8',
+ 'pk_order_b.vbdef9',
+ 'pk_order_b.vbdef10',
+ 'pk_order_b.vbdef11',
+ 'pk_order_b.vbdef12',
+ 'pk_order_b.vbdef13',
+ 'pk_order_b.vbdef14',
+ 'pk_order_b.vbdef15',
+ 'pk_order_b.vbdef16',
+ 'pk_order_b.vbdef17',
+ 'pk_order_b.vbdef18',
+ 'pk_order_b.vbdef19',
+ 'pk_order_b.vbdef20'
+ ]);
+ } else if (field == 'pk_order_b.pk_reqstoorg') {
+ multiCorpRefHandler(props, val, PAGECODE.searchId, [ 'pk_order_b.pk_reqstordoc' ]);
+ } else if (field == 'pk_order_b.pk_arrvstoorg') {
+ multiCorpRefHandler(props, val, PAGECODE.searchId, [ 'pk_order_b.pk_recvstordoc' ]);
+ }
+ }
+
+ renderCompleteEvent = () => {
+ transtypeUtils.setQueryDefaultValue.call(this, this.props, PAGECODE.searchId, FIELD.ctrantypeid);
+ let pk_org = this.props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_org);
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent(this.props, FIELD.pk_org, arr);
+ }
+ };
+
+ //双击事件
+ doubleClick = (record, index) => {
+ let pk_order = record.pk_order.value;
+ let scene = this.props.getUrlParam('scene');
+ this.props.pushTo(URL.gotoCard, {
+ status: STATUS.browse,
+ id: pk_order,
+ scene: scene,
+ pagecode: PAGECODE.cardcode
+ });
+ };
+ // 审批详情关闭
+ closeApprove = () => {
+ this.setState({
+ show: false
+ });
+ };
+ // 附件管理关闭
+ onHideUploader = () => {
+ this.setState({
+ showUploader: false
+ });
+ };
+ // 提交指派
+ getAssginUsedr = (value) => {
+ //重新执行提交操作重新执行提交操作
+ if (this.commitInfo.record) {
+ commit.call(this, this.props, this.commitInfo.record, this.commitInfo.index, value);
+ } else {
+ commit.call(this, this.props, null, null, value);
+ }
+ this.setState({ compositedisplay: false });
+ };
+
+ getdefaultTab = () => {
+ let tabCode = getDefData.call(this, OrderCache.OrderCacheKey, OrderCache.OrderListTabCode);
+ // 里程碑看板跳转过来,直接跳转全部页签
+ let srcpk = this.props.getUrlParam(FIELD.pk);
+ if (srcpk) {
+ tabCode = { tabCode: 3 };
+ }
+ let currentTab = tabCode && tabCode.tabCode != null ? tabCode.tabCode : 0;
+ setDefData.call(this, OrderCache.OrderCacheKey, OrderCache.OrderListTabCode, {
+ tabCode: currentTab
+ });
+ return currentTab;
+ };
+ //到货计划关闭事件
+ arrivePlanClose = (status) => {
+ if (status == STATUS.edit) {
+ showWarningDialog(getLangByResId(this, '4004POORDER-000060'), getLangByResId(this, '4004POORDER-000104'), {
+ beSureBtnClick: () => {
+ this.setState({ showModal: false });
+ },
+ cancelBtnClick: () => {}
+ });
+ } else {
+ this.setState({ showModal: false });
+ }
+ };
+
+ hideTransState = () => {
+ this.setState({ transStateShowFlag: false });
+ };
+
+ render() {
+ const { table, button, search, modal } = this.props;
+ const { createSimpleTable } = table; //引入表格
+ const { NCCreateSearch } = search; //引入创建查询方法
+ const { createModal } = modal;
+ const { NCModal, NCTabs, NCButton, NCBackBtn } = base;
+ const { socket } = this.props;
+ let rows = this.props.table.getCheckedRows(PAGECODE.tableId);
+ let newpk = '';
+ if (rows && rows[0] && rows[0].data) {
+ newpk = rows[0].data.values.pk_order.value; // 主键
+ }
+ return (
+
+ {socket.connectMesg({
+ tableAreaCode: PAGECODE.tableId,
+ billpkname: FIELD.pk_order,
+ billtype: PAGECODE.billType
+ })}
+
+
+ {createListTitle(this)}
+ {/* 国际化处理: 采购订单/采购订单冻结*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: PAGECODE.tableId,
+ onButtonClick: buttonClickController.bind(this)
+ })}
+
+
+ {/* 查询展示区域 */}
+
+ {NCCreateSearch(PAGECODE.searchId, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this, this.props),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent,
+ dataSource: OrderCache.OrderCacheKey,
+ pkname: FIELD.pk_order
+ })}
+
+ {/* 页签区 */}
+
+
+
+ {getLangByResId(this, '4004POORDER-000073') + ' (' + this.state.uncommitNum + ')'}
+ {/* 国际化处理: 待提交*/}
+
+
+ {getLangByResId(this, '4004POORDER-000074') + ' (' + this.state.approvingNum + ')'}
+ {/* 国际化处理: 审批中*/}
+
+
+ {getLangByResId(this, '4004POORDER-000075') + ' (' + this.state.executNum + ')'}
+ {/* 国际化处理: 执行中*/}
+
+
+ {getLangByResId(this, '4004POORDER-000076')}
+ {/* 国际化处理: 全部*/}
+
+
+
+
+ {/* 列表区域 */}
+ {createSimpleTable(PAGECODE.tableId, {
+ showIndex: true, //显示序号
+ showCheck: true,
+ handlePageInfoChange: pageInfoClick.bind(this),
+ onRowDoubleClick: this.doubleClick.bind(this),
+ onSelected: buttonController.initButtons.bind(this, this.props, null),
+ onBatchSelected: buttonController.initButtons.bind(this, this.props, null),
+ onSelectedAll: buttonController.initButtons.bind(this, this.props, null),
+ dataSource: OrderCache.OrderCacheKey,
+ pkname: FIELD.pk_order,
+ componentInitFinished: buttonController.initButtons.bind(this, this.props, null)
+ })}
+
+ {/* 到货计划 {createModal(LIST_BUTTON.Arrival_Plan)} */}
+
+ {this.state.showModal && (
+
{
+ this.arrivePlanClose(status);
+ }}
+ />
+ )}
+
+ {/* 单据追溯 */}
+
{
+ this.setState({ showTrack: false });
+ }}
+ pk={this.state.pk_order}
+ type="21"
+ />
+ {/* 附件管理 */}
+ {this.state.showUploader && (
+
+ )}
+ {/* 内部交易信息 */}
+
+ {
+ this.setState({ showBusinessModal: false });
+ }}
+ />
+
+ {/* 审批详情 */}
+
+ {/* 指派 */}
+ {this.state.compositedisplay && (
+ {
+ this.setState({ compositedisplay: false });
+ }}
+ />
+ )}
+
+
+ {getLangByResId(this, '4004POORDER-000059')}
+ {/* 国际化处理: 运输状态*/}
+
+
+
+
+ {/*
+ {getLangByResId(this, '4004POORDER-000060')}
+ 国际化处理: 关闭
+ */}
+
+
+ {createModal(LIST_BUTTON.Delete)}
+ {createModal('MessageDlg')}
+ {createModal('code-config')}
+ {createModal('printService', {
+ className: 'print-service'
+ })}
+
+
+ );
+ }
+}
+
+OrderList = createPage({
+ billinfo: {
+ billtype: 'grid',
+ pagecode: PAGECODE.listcode,
+ bodycode: PAGECODE.tableId
+ }
+})(OrderList);
+
+// ReactDOM.render(, document.querySelector('#app'));
+
+export default OrderList;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/init/initTemplate.js b/src/pu/pu/poorder/list/init/initTemplate.js
new file mode 100644
index 0000000..c80a06f
--- /dev/null
+++ b/src/pu/pu/poorder/list/init/initTemplate.js
@@ -0,0 +1,339 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单列表态初始化
+ * @Date: 2018-04-19 10:12:36
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-09-01 09:44:55
+ */
+import { URL, PAGECODE, FIELD, STATUS, LIST_BUTTON, OrderCache, COMMON } from '../../constance';
+import commonSerach from '../btnClicks/commonSearch';
+import { ajax, cacheTools } from 'nc-lightapp-front';
+import { setDefData, getDefData, hasListCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { buttonController, buttonClickController } from '../viewController/index';
+import { getListDisableHotKeyBtn } from '../../../../../scmpub/scmpub/pub/tool/hotKeysUtil.js';
+import { yycBtnInit } from '../../../yyc/ext/yycBtnInit';
+import { listLinkQuery } from './linkInitData';
+import BillCodeHyperLink from 'scmpub/scmpub/components/BillCodeStyle';
+import ntpLinkList from '../../../pub/linkQuery/ntpLinkList';
+import { pageInfoClick } from '../btnClicks';
+import excelImportconfig from 'uap/common/components/excelImportconfig';
+
+export default function() {
+ //设置导入url 常量
+ let excelimportconfig = excelImportconfig(
+ this.props,
+ FIELD.PURCHASEORG, //模块名称
+ PAGECODE.billType, //单据类型
+ true,
+ URL.importUrl,
+ {
+ noTips: true,
+ isSelfDefineImport: true
+ }
+ );
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.listcode
+ },
+ (templedata) => {
+ if (templedata) {
+ transtypeUtils.init.call(this, templedata.context);
+ if (templedata.template) {
+ let meta = templedata.template;
+ meta = modifier.call(this, meta, this.props);
+ transtypeUtils.initQuery.call(this, this.props, meta, PAGECODE.searchId, FIELD.ctrantypeid);
+ this.props.meta.setMeta(meta);
+ }
+ if (templedata.button) {
+ let button = templedata.button;
+ // this.props.button.hideButtonsByAreas([ PAGECODE.tableId ]);
+ this.props.button.setButtons(button);
+ this.props.button.setPopContent(
+ LIST_BUTTON.Delete,
+ getLangByResId(this, '4004POORDER-000077')
+ ); /* 国际化处理: 确认删除?*/
+ // 友云采按钮初始化
+ yycBtnInit(this.props);
+ //将导入组件注册到按钮中
+ this.props.button.setUploadConfig(LIST_BUTTON.Import, excelimportconfig);
+ }
+ let refBillQueryData = { billType: '21' };
+ if (templedata.context.paramMap && templedata.context.paramMap.transtype) {
+ refBillQueryData.transType = templedata.context.paramMap.transtype;
+ setDefData(OrderCache.OrderCardCache, 'transtype', templedata.context.paramMap.transtype);
+ }
+ // 获取appcode
+ if (templedata.template && templedata.template.list_head) {
+ this.appcode = templedata.template.list_head.appcode;
+ }
+ toggleShow.call(this);
+ ajax({
+ url: URL.refbillqueryaction,
+ data: refBillQueryData,
+ success: (res) => {
+ if (res.success) {
+ let isshowselfmake = false;
+ res.data &&
+ res.data.forEach((element) => {
+ if (element && element.makeflag) {
+ // 可自制
+ isshowselfmake = true;
+ }
+ });
+ this.props.button.setButtonVisible([ LIST_BUTTON.selfmake ], isshowselfmake);
+ }
+ }
+ });
+ }
+ }
+ );
+}
+/**
+ * 列表数据后处理修饰
+ * @param meta
+ * @param {*} props
+ */
+function modifier(meta, props) {
+ let listTableMeta = meta[PAGECODE.tableId];
+ //修改编辑前参照过滤
+ meta[PAGECODE.searchId].items.map((item) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ if (item.attrcode == FIELD.pk_org) {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode != 'pk_order_b.pk_reqstordoc' && item.attrcode != 'pk_order_b.pk_recvstordoc') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_org);
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+
+ if (item.attrcode == 'pk_reqdept_v') {
+ //需求部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_org);
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: FIELD.STOCKORG
+ };
+ };
+ } else if (item.attrcode == FIELD.ctrantypeid) {
+ //订单类型过滤交易类型
+ item.isShowUnit = false;
+ item.queryCondition = () => {
+ let pk_org = props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_org);
+ pk_org =
+ pk_org != null ? (pk_org.value.firstvalue.includes(',') ? null : pk_org.value.firstvalue) : null;
+ //订单类型过滤交易类型
+ return {
+ istransaction: 'Y',
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ pk_org: pk_org,
+ SCM_BUSIORG: pk_org,
+ // GridRefActionExt: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ UsualGridRefActionExt: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ };
+ };
+ } else if (item.attrcode == FIELD.pk_dept) {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_org);
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: FIELD.PURCHASEORG
+ };
+ };
+ } else if (item.attrcode == FIELD.cemployeeid) {
+ // 采购员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_org);
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(PAGECODE.searchId, FIELD.pk_dept);
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: FIELD.PURCHASEORG
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_reqstoorg') {
+ //需求库存组织
+ item.isShowUnit = false;
+ } else if (item.attrcode == 'pk_order_b.pk_arrvstoorg') {
+ //收货库存组织
+ item.isShowUnit = false;
+ } else if (item.attrcode == 'pk_order_b.pk_reqstordoc') {
+ //需求仓库
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let reqstoorg = props.search.getSearchValByField(PAGECODE.searchId, 'pk_order_b.pk_reqstoorg');
+ reqstoorg =
+ reqstoorg != null
+ ? reqstoorg.value.firstvalue.includes(',') ? null : reqstoorg.value.firstvalue
+ : null;
+ return {
+ pk_org: reqstoorg,
+ busifuncode: FIELD.STOCKORG
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.pk_recvstordoc') {
+ //收货仓库
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let arrvstoorg = props.search.getSearchValByField(PAGECODE.searchId, 'pk_order_b.pk_arrvstoorg');
+ arrvstoorg =
+ arrvstoorg != null
+ ? arrvstoorg.value.firstvalue.includes(',') ? null : arrvstoorg.value.firstvalue
+ : null;
+ return {
+ pk_org: arrvstoorg,
+ busifuncode: FIELD.STOCKORG
+ };
+ };
+ } else if (item.attrcode == 'pk_order_b.cffileid') {
+ //配置码
+ item.queryCondition = () => {
+ let pk_srcmaterial = props.search.getSearchValByField(PAGECODE.searchId, 'pk_order_b.pk_srcmaterial'); // 调用相应组件的取值API
+ return {
+ cmaterialid: pk_srcmaterial && pk_srcmaterial.value ? pk_srcmaterial.value.firstvalue : null
+ };
+ };
+ } else if (item.attrcode == FIELD.forderstatus) {
+ let options = item.options;
+ let resultOptions = [];
+ let billflag = [ '0', '2', '3', '4' ];
+ options.map((param) => {
+ if (billflag.includes(param.value)) {
+ resultOptions.push(param);
+ }
+ });
+ item.options = resultOptions;
+ }
+ });
+ //模板table的订单编号列加超链接
+ listTableMeta.items = listTableMeta.items.map((item, key) => {
+ if (item.attrcode == FIELD.vbillcode) {
+ item.render = (text, record, index) => {
+ //取值前需先判断record是否为空,避免没有数据的情况报错
+ let pk_order = record && record.pk_order && record.pk_order.value;
+ let scene = this.props.getUrlParam('scene');
+ return (
+ {
+ this.props.pushTo(URL.gotoCard, {
+ status: STATUS.browse,
+ id: pk_order,
+ scene: scene,
+ pagecode: PAGECODE.cardcode
+ });
+ }}
+ />
+ );
+ };
+ }
+ return item;
+ });
+ // 冻结不要操作列
+ let scene = props.getUrlParam('scene');
+ if (scene != 'freeze') {
+ //添加表格操作列
+ let event = {
+ label: getLangByResId(this, '4004POORDER-000008') /* 国际化处理: 操作*/,
+ attrcode: 'opr',
+ itemtype: 'customer',
+ fixed: 'right',
+ width: '200px',
+ visible: true,
+ render: (text, record, index) => {
+ let buttonAry = buttonController.getListOprRowButtons.call(this, record);
+ return props.button.createErrorButton({
+ record: record,
+ showBack: false, // 是否显示回退按钮
+ sucessCallBack: () => {
+ return props.button.createOprationButton(buttonAry, {
+ area: PAGECODE.list_inner,
+ ignoreHotkeyCode: getListDisableHotKeyBtn(),
+ buttonLimit: 3,
+ onButtonClick: (props, key) =>
+ buttonClickController.call(this, props, key, text, record, index)
+ });
+ }
+ });
+ }
+ };
+ meta[PAGECODE.tableId].items.push(event);
+ }
+ return meta;
+}
+
+function toggleShow() {
+ let _this = this;
+ // 初始化按钮状态
+ // buttonController.initButtons.call(this, this.props, null);
+ let linkkey = _this.props.getUrlParam(COMMON.LINK_KEY);
+ if (_this.props.getUrlParam('pk_ntbparadimvo')) {
+ // 采购计划联查过来的
+ ntpLinkList.call(
+ _this,
+ _this.props,
+ { cardUrl: URL.gotoCard, listFormId: PAGECODE.tableId },
+ buttonController.initButtons.bind(_this)
+ );
+ } else if (_this.props.getUrlParam('ntpLinkIds')) {
+ pageInfoClick.call(_this, _this.props, null, _this.props.getUrlParam('ntpLinkIds').split(','));
+ } else {
+ if (linkkey) {
+ //更新当前页签编码
+ this.setState({ currentTab: 3 });
+ setDefData.call(this, OrderCache.OrderCacheKey, OrderCache.OrderListTabCode, {
+ tabCode: 3
+ });
+ let config = { areacode: PAGECODE.tableId, pagecode: PAGECODE.listcode, url: URL.currentpage };
+ listLinkQuery.call(this, this.props, config);
+ } else if (!hasListCache(this.props, OrderCache.OrderCacheKey)) {
+ // 看板跳转过来
+ let srcpks = this.props.getUrlParam(FIELD.pks);
+ if (srcpks) {
+ let pksrc = srcpks.split(',');
+ let pks = new Array();
+ pksrc.map((item) => {
+ if (item) {
+ pks.push(item);
+ }
+ });
+ //更新当前页签编码
+ pageInfoClick.call(this, this.props, null, pks);
+ } else {
+ let queryInfo = cacheTools.get(OrderCache.Searchval);
+ let tablaData = getDefData.call(this, OrderCache.OrderCacheKey, 'totalNum');
+ let tab = tablaData && tablaData.currentTab ? tablaData.currentTab : FIELD.tocommit;
+ commonSerach.call(this, tab, queryInfo, true); // 调用查询方法
+ }
+ } else {
+ let totalnum = getDefData.call(this, OrderCache.OrderCacheKey, 'totalNum');
+ if (totalnum) {
+ this.setState({
+ uncommitNum: totalnum.uncommitNum,
+ approvingNum: totalnum.approvingNum,
+ executNum: totalnum.executNum
+ });
+ }
+ }
+ }
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/init/linkInitData.js b/src/pu/pu/poorder/list/init/linkInitData.js
new file mode 100644
index 0000000..89004dd
--- /dev/null
+++ b/src/pu/pu/poorder/list/init/linkInitData.js
@@ -0,0 +1,58 @@
+/*LZyxu0E0NIxXKBEk7IVNX54JiIP510GP6mtuA0zxvu0=*/
+/*
+ * 存活核算外领域联查处理工具类
+ * @Author: guozhq
+ * @Date: 2019-04-25 08:39:15
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-07-12 11:03:06
+ */
+import { ajax, cacheTools } from 'nc-lightapp-front';
+
+const LINK_KEY = 'pulinkkey';
+
+/**
+ * 列表态联查处理
+ * @param {*} props
+ * @param {*} config {areacode:区域编码,pagecode:页面编码,tabletype:表格类型(table/editTable),url:后台地址,deflinkquery:自定义处理逻辑}
+ */
+function listLinkQuery(props, config) {
+ let { deflinkquery, areacode, pagecode, tabletype = 'table', url } = config;
+
+ // 1、获取link参数
+ let linkkey = props.getUrlParam(LINK_KEY);
+ if (linkkey) {
+ let linkdata = cacheTools.get(linkkey);
+ // linkdata:{linktype:'30',linkids:['','']}
+ if (linkdata) {
+ let linktype = linkdata.linktype;
+ let linkids = linkdata.linkids;
+ if (deflinkquery && deflinkquery.hasOwnProperty(linktype)) {
+ let deflinkqueryAction = deflinkquery[linktype];
+ deflinkqueryAction(linkids);
+ } else {
+ ajax({
+ url: url,
+ data: {
+ pageid: pagecode, // 采购订单此处使用pageid作为key
+ pks: linkids,
+ },
+ success: res => {
+ let data = res.data;
+ if (data) {
+ if ('table' === tabletype) {
+ props.table.setAllTableData(areacode, res.data[areacode]);
+ }
+ if ('editTable' === tabletype) {
+ props.editTable.setTableData(areacode, res.data[areacode]);
+ }
+ }
+ },
+ });
+ }
+ cacheTools.remove(linkkey);
+ }
+ }
+}
+export { listLinkQuery };
+
+/*LZyxu0E0NIxXKBEk7IVNX54JiIP510GP6mtuA0zxvu0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/viewController/btnClickController.js b/src/pu/pu/poorder/list/viewController/btnClickController.js
new file mode 100644
index 0000000..3c559be
--- /dev/null
+++ b/src/pu/pu/poorder/list/viewController/btnClickController.js
@@ -0,0 +1,326 @@
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-05-09 11:29:02
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2023-06-20 14:48:28
+ */
+import {
+ LIST_BUTTON,
+ PAGECODE,
+ FIELD,
+ STATUS,
+ URL,
+ TRANSFER20,
+ TRANSFERZ2,
+ TRANSFER30TO21,
+ TRANSFER30TO21COOP,
+ TRANSFERMULTI,
+ OrderCache,
+ TRANSFER49
+} from '../../constance';
+import {
+ commonSearch,
+ searchBtnClick,
+ pageInfoClick,
+ addBtnClick,
+ deleteBtnClick,
+ commonClose,
+ commit,
+ uncommit,
+ freezeBtn,
+ arrivePlanBtn,
+ print_BtnClick,
+ printList_BtnClick,
+ printOut,
+ checkDataPermission,
+ deleteLine,
+ payPlan,
+ requestCheckData,
+ transportstatusquery,
+ commonCheckData,
+ payExecStatBtnClick,
+ bizInfoBtnClick
+} from '../btnClicks/index';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+
+import { YYC_BUTTON_ARRAY } from '../../../yyc/constance';
+import { orderYYCBtnClick } from '../../../yyc/ext/yycBtnClick';
+import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
+import fileBatchDownLoadBtnClick from '../../../pub/btnClicks/fileBatchDownLoadBtnClick';
+
+export default function(props, key, text, record, index) {
+ let pk = null;
+ let _this = this;
+ let rows = props.table.getCheckedRows(PAGECODE.tableId);
+ let rowsdata = [];
+ let rowindex = [];
+ if (rows.length > 0) {
+ rows.map((item) => {
+ let data = {
+ [FIELD.pks]: item.data.values.pk_order.value,
+ [FIELD.ts]: item.data.values.ts.value
+ };
+ rowsdata.push(data);
+ rowindex.push(item.index);
+ });
+ }
+ let _url = null;
+ switch (key) {
+ case LIST_BUTTON.search: // 查询
+ searchBtnClick.call(this);
+ break;
+ case LIST_BUTTON.selfmake: // 自制
+ addBtnClick.bind(this, props)();
+ break;
+ case LIST_BUTTON.Req_GenerateOrder: // 请购生成订单
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER20.GOTO20, { pagecode: TRANSFER20.PAGEID });
+ break;
+ case LIST_BUTTON.Pu_GenerateOrder: // 采购合同生成订单
+ //合同模块校验
+ requestCheckData.call(this, '4020', getLangByResId(this, '4004POORDER-000050'), () => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFERZ2.GOTOZ2, { pagecode: TRANSFERZ2.PAGEID });
+ });
+ break;
+ case LIST_BUTTON.OpenBill: // 整单打开
+ // 拼装json
+ let openedata = {
+ closedto: rowsdata,
+ [FIELD.pagecode]: PAGECODE.listcode,
+ closeReason: ''
+ };
+ if (openedata != '' && !(openedata instanceof Array) && Object.keys(openedata).length != 0) {
+ _url = URL.gridfinalopen;
+ commonClose.call(
+ this,
+ _url,
+ openedata,
+ rowindex,
+ getLangByResId(this, '4004POORDER-000025')
+ ); /* 国际化处理: 整单打开*/
+ }
+ break;
+ case LIST_BUTTON.CloseBill: // 整单关闭
+ // 拼装json
+ let closedata = {
+ closedto: rowsdata,
+ [FIELD.pagecode]: PAGECODE.listcode,
+ closeReason: ''
+ };
+ if (closedata != '' && !(closedata instanceof Array) && Object.keys(closedata).length != 0) {
+ _url = URL.gridfinalClose;
+ commonClose.call(
+ this,
+ _url,
+ closedata,
+ rowindex,
+ getLangByResId(this, '4004POORDER-000026')
+ ); /* 国际化处理: 整单关闭*/
+ }
+ break;
+ case LIST_BUTTON.D_Sale_GenerateOrder: // 直运销售生成订单
+ requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER30TO21.GOTO30SALE, { pagecode: TRANSFER30TO21.PAGEID });
+ });
+ break;
+ case LIST_BUTTON.Pu_co_GenerateOrder: // 销售协同生成订单
+ requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER30TO21COOP.GOTO30COOP, { pagecode: TRANSFER30TO21COOP.PAGEID });
+ });
+ break;
+ case LIST_BUTTON.Replenishment: // 补货
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFERMULTI.GOTOMULTI, { pagecode: TRANSFERMULTI.PAGEID });
+ break;
+ case LIST_BUTTON.Delete: // 删除
+ deleteBtnClick.call(this, props, record);
+ break;
+ case LIST_BUTTON.Commit: // 提交
+ commit.call(this, this.props, record);
+ break;
+ case LIST_BUTTON.UnCommit: // 收回
+ uncommit.call(this);
+ break;
+ case LIST_BUTTON.Freeze: // 冻结
+ _url = URL.gridfreeze;
+ freezeBtn.call(this, props, record, _url, getLangByResId(this, '4004POORDER-000023')); /* 国际化处理: 冻结*/
+ break;
+ case LIST_BUTTON.UnFreeze: // 解冻
+ _url = URL.gridunfreeze;
+ freezeBtn.call(this, props, record, _url, getLangByResId(this, '4004POORDER-000024')); /* 国际化处理: 解冻*/
+ break;
+ case LIST_BUTTON.Annex_Management: // 附件管理
+ pk = this.props.table.getCheckedRows(PAGECODE.tableId)[0].data.values.pk_order.value;
+ let vbillcode = this.props.table.getCheckedRows(PAGECODE.tableId)[0].data.values.vbillcode.value;
+ let fileManage = {
+ pk_order: pk,
+ showUploader: true,
+ // target: event.target, //确定弹窗位置,不传则默认为正中央
+ vbillcode: vbillcode
+ };
+ this.setState(fileManage);
+ break;
+ case LIST_BUTTON.FileBatch: // 附件批量下载
+ fileBatchDownLoadBtnClick.call(
+ this,
+ props,
+ PAGECODE.tableId,
+ getLangByResId(this, '4004POORDER-000055') /* 国际化处理: 采购订单*/,
+ FIELD.pk_order
+ );
+ break;
+ case LIST_BUTTON.QueryAboutBusiness: // 单据追溯
+ pk = this.props.table.getCheckedRows(PAGECODE.tableId)[0].data.values.pk_order.value;
+ this.setState({ pk_order: pk, showTrack: true });
+ break;
+ case LIST_BUTTON.Arrival_Plan: // 到货计划
+ pk = this.props.table.getCheckedRows(PAGECODE.tableId)[0].data.values.pk_order.value;
+ let arriveRows = new Array();
+ let arriveInfo = {
+ pks: pk,
+ ts: null
+ };
+ arriveRows.push(arriveInfo);
+ let arriveData = {
+ closedto: arriveRows,
+ pagecode: null,
+ extstr: null
+ };
+ commonCheckData.call(this, URL.arrivalplancheck, arriveData, () => {
+ let avalues = this.props.table.getCheckedRows(PAGECODE.tableId)[0].data.values;
+ let pk_org = avalues.pk_org.value;
+ let pk_customer = avalues.pk_recvcustomer.value;
+ let pk_supplier = avalues.pk_supplier.value;
+ this.pk_org = pk_org;
+ this.pk_customer = pk_customer;
+ this.pk_supplier = pk_supplier;
+ this.setState({ pk_order: pk, showModal: true });
+ });
+ break;
+ case LIST_BUTTON.Payment_Plan: // 付款计划
+ //单选且审批过的单据可用openTO付款计划
+ payPlan.call(this, this.props);
+ break;
+ case LIST_BUTTON.Refresh: // 刷新
+ let tabCode = getDefData.call(this, OrderCache.OrderCacheKey, OrderCache.OrderListTabCode);
+ let currentTab = tabCode && tabCode.tabCode != null ? tabCode.tabCode : '0';
+ if (0 == currentTab) {
+ currentTab = FIELD.tocommit;
+ } else if (1 == currentTab) {
+ currentTab = FIELD.approving;
+ } else if (2 == currentTab) {
+ currentTab = FIELD.executing;
+ } else if (3 == currentTab) {
+ currentTab = FIELD.all;
+ }
+ let queryInfo = getDefData(OrderCache.OrderCacheKey, 'queryInfo');
+ commonSearch.call(this, currentTab, queryInfo, 'isRefresh');
+ break;
+ case LIST_BUTTON.Print: // 打印
+ print_BtnClick.call(this, this.props);
+ break;
+ case LIST_BUTTON.Print_list: // 打印清单
+ printList_BtnClick.call(this, this.props);
+ break;
+ case LIST_BUTTON.PrintOut: // 输出
+ printOut.call(this, this.props);
+ break;
+ case LIST_BUTTON.List_Inner_Commit: // 行提交
+ commit.call(this, this.props, record);
+ break;
+ case LIST_BUTTON.Edit: // 行
+ checkDataPermission.call(this, record, 'edit', () => {
+ let scene = this.props.getUrlParam('scene');
+ pk = record && record.pk_order && record.pk_order.value;
+ props.pushTo(URL.gotoCard, {
+ status: STATUS.edit,
+ id: pk,
+ scene: scene,
+ tempstatus: STATUS.edit,
+ pagecode: PAGECODE.cardcode
+ });
+ });
+ break;
+ case LIST_BUTTON.Delete: // 行删除
+ deleteLine.call(this, this.props, record);
+ break;
+ case LIST_BUTTON.Copy: // 行复制
+ pk = record && record.pk_order && record.pk_order.value;
+ props.pushTo(URL.gotoCard, {
+ status: STATUS.copy,
+ id: pk,
+ tempstatus: STATUS.add,
+ pagecode: PAGECODE.cardcode
+ });
+ break;
+ case LIST_BUTTON.List_Inner_UnCommit: // 行收回
+ uncommit.bind(props, record);
+ break;
+ case LIST_BUTTON.ApproveInfo: // 行查看审批意见
+ pk = record && record.pk_order && record.pk_order.value;
+ let vtrantypecode = record && record.vtrantypecode && record.vtrantypecode.value;
+ this.setState({ show: true, pk_order: pk, vtrantypecode: vtrantypecode });
+ break;
+ case LIST_BUTTON.OrderTOSaleBill: // 生成协同销售订单
+ requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
+ // 拼装json
+ let pushdata = {
+ closedto: rowsdata,
+ [FIELD.pagecode]: PAGECODE.listcode,
+ extstr: 'grid' //列表标识
+ };
+ if (pushdata != '' && !(pushdata instanceof Array) && Object.keys(pushdata).length != 0) {
+ _url = URL.pushcoopsale;
+ commonClose.call(
+ this,
+ _url,
+ pushdata,
+ rowindex,
+ getLangByResId(this, '4004POORDER-000030')
+ ); /* 国际化处理: 生成销售协同订单*/
+ }
+ });
+ break;
+ case LIST_BUTTON.Transport_State: // 运输状态
+ transportstatusquery.call(this);
+ break;
+ case LIST_BUTTON.PayExecStat: // 付款执行情况
+ payExecStatBtnClick.call(this, this.props);
+ break;
+ case LIST_BUTTON.Bi_GenerateOrder: // 借入
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ props.pushTo(TRANSFER49.GOTO49, { pagecode: TRANSFER49.PAGEID });
+ break;
+ case LIST_BUTTON.ToInformation: // 内部交易信息
+ bizInfoBtnClick.call(this, props);
+ break;
+ case LIST_BUTTON.printCountQuery: // 打印次数查询
+ let CONST = { hid: FIELD.pk_order, area: PAGECODE.tableId };
+ printCountQuery.call(this, props, { type: 1, CONST, modal: 'code-config' });
+ break;
+ //导出
+ case LIST_BUTTON.Export:
+ this.props.modal.show('exportFileModal');
+ break;
+ default:
+ break;
+ }
+ // 友云采扩展 add by guozhq
+ if (YYC_BUTTON_ARRAY.includes(key)) {
+ orderYYCBtnClick.call(this, props, key, {
+ isList: true,
+ listArea: PAGECODE.tableId,
+ billidField: FIELD.pk_order,
+ pageCode: PAGECODE.listcode
+ });
+ }
+}
+
+/*h84Q5eMmSJsRENxS4eEsJnD6GM/6ZnhW80wHl+5zINw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/viewController/buttonController.js b/src/pu/pu/poorder/list/viewController/buttonController.js
new file mode 100644
index 0000000..3a6dcc3
--- /dev/null
+++ b/src/pu/pu/poorder/list/viewController/buttonController.js
@@ -0,0 +1,162 @@
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
+import { PAGECODE, LIST_BUTTON, FIELD, BUTTON_DISABLED } from '../../constance';
+import { orderBtnControl } from '../../../yyc/ext/yycBtnControl';
+
+/**
+ * 采购订单关闭行选择设置按钮的禁用状态
+ * @param {*} props
+ * @param {*} tabCode
+ */
+function initButtons(props, tabCode) {
+ let rows = props.table.getCheckedRows(PAGECODE.tableId);
+ if (tabCode != null) {
+ rows.length = 0;
+ }
+ // 初始化全部不可见
+ let Delete = BUTTON_DISABLED;
+ let Commit = BUTTON_DISABLED;
+ let UnCommit = !BUTTON_DISABLED;
+ let ApproveInfo = BUTTON_DISABLED;
+ let SupplierAp = BUTTON_DISABLED;
+ let Freeze = BUTTON_DISABLED;
+ let UnFreeze = BUTTON_DISABLED;
+ let OpenBill = BUTTON_DISABLED;
+ let CloseBill = BUTTON_DISABLED;
+ let Annex_Management = BUTTON_DISABLED;
+ let QueryAboutBusiness = BUTTON_DISABLED;
+ let Arrival_Plan = BUTTON_DISABLED;
+ let Payment_Plan = BUTTON_DISABLED;
+ let OrderTOSaleBill = BUTTON_DISABLED;
+ let Transport_State = BUTTON_DISABLED;
+ let PayExecStat = BUTTON_DISABLED;
+ let Print = BUTTON_DISABLED;
+ let Print_list = BUTTON_DISABLED;
+ let PrintOut = BUTTON_DISABLED;
+ let PrintOutQuery = BUTTON_DISABLED;
+ let ToInformation = BUTTON_DISABLED;
+ if (rows.length > 0) {
+ let printdis = false;
+ if (rows.length == 1) {
+ rows.forEach((item) => {
+ let forderstatus = item.data.values.forderstatus.value; // 单据状态
+ let bfinalclose = item.data.values.bfinalclose.value; // 最终关闭
+ let bfrozen = item.data.values.bfrozen.value; // 冻结
+ if (forderstatus == FIELD.free) {
+ Delete = false;
+ Commit = false;
+ UnCommit = true;
+ } else if (forderstatus == FIELD.free || forderstatus == FIELD.unapproved) {
+ UnCommit = true;
+ } else if (forderstatus == FIELD.approved) {
+ Payment_Plan = false;
+ OrderTOSaleBill = false;
+ Transport_State = false;
+ PayExecStat = false;
+ }
+ if (bfrozen) {
+ UnFreeze = false;
+ printdis = true;
+ } else {
+ Freeze = false;
+ }
+ if (bfinalclose && forderstatus == FIELD.approved) {
+ OpenBill = false;
+ } else if (!bfinalclose && forderstatus == FIELD.approved) {
+ CloseBill = false;
+ }
+ });
+ Arrival_Plan = false; //单选才可用
+ } else {
+ Delete = false; //多选不控制
+ Commit = false;
+ UnCommit = false;
+ Freeze = false;
+ UnFreeze = false;
+ OpenBill = false;
+ CloseBill = false;
+ Payment_Plan = false; //modify by zhaoypm @2018-10-23 多选时按照第一条数据判断,因此无论多选还是单选“付款计划”按钮都应该可用
+ PayExecStat = false;
+ }
+ ApproveInfo = false; //单选多选都可用
+ SupplierAp = false;
+ Annex_Management = false;
+ QueryAboutBusiness = false;
+ Print = printdis;
+ PrintOut = printdis;
+ Print_list = printdis;
+ PrintOutQuery = printdis;
+ ToInformation = false;
+ } else {
+ Delete = true;
+ Commit = true;
+ UnCommit = true;
+ ApproveInfo = true;
+ SupplierAp = true;
+ Freeze = true;
+ UnFreeze = true;
+ OpenBill = true;
+ CloseBill = true;
+ Annex_Management = true;
+ QueryAboutBusiness = true;
+ Arrival_Plan = true;
+ Payment_Plan = true;
+ OrderTOSaleBill = true;
+ Transport_State = true;
+ PayExecStat = true;
+ Print = true;
+ Print_list = true;
+ PrintOut = true;
+ PrintOutQuery = true;
+ }
+ let disableArr = {
+ [LIST_BUTTON.Delete]: Delete, //删除
+ [LIST_BUTTON.Commit]: Commit, //提交
+ [LIST_BUTTON.UnCommit]: UnCommit, //收回
+ [LIST_BUTTON.ApproveInfo]: ApproveInfo, //审批
+ [LIST_BUTTON.SupplierAp]: SupplierAp, //供应商应付
+ [LIST_BUTTON.Freeze]: Freeze, //冻结
+ [LIST_BUTTON.UnFreeze]: UnFreeze, //解冻
+ [LIST_BUTTON.OpenBill]: OpenBill, //整单打开
+ [LIST_BUTTON.CloseBill]: CloseBill, //整单关闭
+ [LIST_BUTTON.Annex_Management]: Annex_Management, //附件批量下载
+ [LIST_BUTTON.FileBatch]: Annex_Management, //附件
+ [LIST_BUTTON.QueryAboutBusiness]: QueryAboutBusiness, //单据追溯
+ [LIST_BUTTON.Arrival_Plan]: Arrival_Plan, //到货计划
+ [LIST_BUTTON.Payment_Plan]: Payment_Plan, //付款计划
+ [LIST_BUTTON.OrderTOSaleBill]: OrderTOSaleBill, //生成协同销售订单
+ [LIST_BUTTON.Transport_State]: Transport_State, //运输状态
+ [LIST_BUTTON.PayExecStat]: PayExecStat, //付款执行情况
+ [LIST_BUTTON.Print]: Print, //打印
+ [LIST_BUTTON.Print_list]: Print_list, //打印清单
+ [LIST_BUTTON.PrintOut]: PrintOut, //输出
+ [LIST_BUTTON.printCountQuery]: PrintOut, //输出
+ [LIST_BUTTON.ToInformation]: ToInformation //内部交易信息
+ };
+ props.button.setDisabled(disableArr);
+ // --------START---友云采按钮控制--------------
+ orderBtnControl(props, { isList: true, listArea: PAGECODE.tableId });
+ // --------END--------------------------------
+}
+
+function getListOprRowButtons(record) {
+ let forderstatus = record && record.forderstatus && record.forderstatus.value;
+ let buttonAry = [
+ LIST_BUTTON.List_Inner_Commit,
+ LIST_BUTTON.Edit,
+ LIST_BUTTON.Delete,
+ LIST_BUTTON.Copy,
+ LIST_BUTTON.ApproveInfo
+ ];
+ if (FIELD.commit == forderstatus || FIELD.approve == forderstatus || FIELD.approved == forderstatus) {
+ //提交、正在审批、审批-->复制、收回、查看审批意见
+ buttonAry = [ LIST_BUTTON.Copy, LIST_BUTTON.List_Inner_UnCommit, LIST_BUTTON.ApproveInfo ];
+ } else if (FIELD.unapproved == forderstatus) {
+ //审批不通过-->修改、复制、查看审批意见
+ buttonAry = [ LIST_BUTTON.Edit, LIST_BUTTON.Copy, LIST_BUTTON.ApproveInfo ];
+ }
+ return buttonAry;
+}
+
+export default { initButtons, getListOprRowButtons };
+
+/*kmMeNHXPpdljPj98yiqeQdGZJLck9DT+W+9hf8KByms=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/list/viewController/index.js b/src/pu/pu/poorder/list/viewController/index.js
new file mode 100644
index 0000000..b46b0a0
--- /dev/null
+++ b/src/pu/pu/poorder/list/viewController/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import buttonClickController from './btnClickController';
+import buttonController from './buttonController';
+
+export { buttonClickController, buttonController };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/main/config.json b/src/pu/pu/poorder/main/config.json
new file mode 100644
index 0000000..8d177a9
--- /dev/null
+++ b/src/pu/pu/poorder/main/config.json
@@ -0,0 +1,40 @@
+{
+ "dependModuleName": [
+ "epmp/exports/components/Inspection",
+ "uap/common/components/ApproveDetail",
+ "uap/common/components/NCUploader",
+ "uap/common/components/approvalTrans",
+ "uap/common/components/scanCodeView",
+ "scmpub/scmpub/components/MergePrinting",
+ "scmpub/scmpub/components/TransportStatus",
+ "scmpub/scmpub/components/TempSave",
+ "scmpub/scmpub/components/BillCodeStyle",
+ "scmpub/scmpub/components/ResumeModal",
+ "uap/common/components/printOnClient",
+ "to/to/businessinfo/list",
+ "uap/common/components/printlimitModal",
+ "uap/common/components/ExcelOutput",
+ "uap/common/components/excelImportconfig",
+ "uap/common/components/getAttachmentInfo",
+ "so/so/components/priceform"
+ ],
+ "dependjs": [
+ "../../../../epmp/exports/components/Inspection/index.js",
+ "../../../../uap/common/components/ApproveDetail/index.js",
+ "../../../../uap/common/components/NCUploader/index.js",
+ "../../../../uap/common/components/approvalTrans/index.js",
+ "../../../../uap/common/components/scanCodeView/index.js",
+ "../../../../uap/common/components/printOnClient/index.js",
+ "../../../../scmpub/scmpub/components/MergePrinting/index.js",
+ "../../../../scmpub/scmpub/components/TransportStatus/index.js",
+ "../../../../scmpub/scmpub/components/TempSave/index.js",
+ "../../../../scmpub/scmpub/components/BillCodeStyle/index.js",
+ "../../../../scmpub/scmpub/components/ResumeModal/index.js",
+ "../../../../to/to/businessinfo/list/index.js",
+ "../../../../uap/common/components/ExcelOutput/index.js",
+ "../../../../uap/common/components/excelImportconfig/index.js",
+ "../../../../uap/common/components/printlimitModal/index.js",
+ "../../../../uap/common/components/getAttachmentInfo/index.js",
+ "../../../../so/so/components/priceform/index.js"
+ ]
+}
diff --git a/src/pu/pu/poorder/main/index.js b/src/pu/pu/poorder/main/index.js
new file mode 100644
index 0000000..0cebdfa
--- /dev/null
+++ b/src/pu/pu/poorder/main/index.js
@@ -0,0 +1,9 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import { RenderRouter } from 'nc-lightapp-front';
+import routes from './router';
+
+(function main(routers, htmlTagid) {
+ RenderRouter(routers, htmlTagid);
+})(routes, 'app');
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/main/router.js b/src/pu/pu/poorder/main/router.js
new file mode 100644
index 0000000..4d23357
--- /dev/null
+++ b/src/pu/pu/poorder/main/router.js
@@ -0,0 +1,75 @@
+/*/Zy544GA7/bUaK4rYRYJBGq/9Gtfns910rXLm2JFwtM=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 路由映射
+ * @Date: 2018-08-08 14:34:30
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-04-10 10:25:06
+ */
+import { asyncComponent } from 'nc-lightapp-front';
+import OrderList from '../list';
+const card = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/card/card"*/ /* webpackMode: "eager" */ '../card')
+);
+const transfer20 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/transfer20/transfer20"*/ /* webpackMode: "eager" */ '../transfer20')
+);
+const transferz2 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/transferz2/transferz2"*/ /* webpackMode: "eager" */ '../transferz2')
+);
+const transfer30sale = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/transfer30sale/transfer30sale"*/ /* webpackMode: "eager" */ '../transfer30sale')
+);
+const transfer30coop = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/transfer30coop/transfer30coop"*/ /* webpackMode: "eager" */ '../transfer30coop')
+);
+const transfer23_45 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/transfer23_45/transfer23_45"*/ /* webpackMode: "eager" */ '../transfer23_45')
+);
+const transfer49 = asyncComponent(() =>
+ import(/*webpackChunkName: "pu/pu/poorder/transfer49/transfer49"*/ /* webpackMode: "eager" */ '../transfer49')
+);
+
+const routes = [
+ {
+ path: '/',
+ component: OrderList,
+ exact: true
+ },
+ {
+ path: '/list',
+ component: OrderList
+ },
+ {
+ path: '/card',
+ component: card
+ },
+ {
+ path: '/transfer20',
+ component: transfer20
+ },
+ {
+ path: '/transferz2',
+ component: transferz2
+ },
+ {
+ path: '/transfer30sale',
+ component: transfer30sale
+ },
+ {
+ path: '/transfer30coop',
+ component: transfer30coop
+ },
+ {
+ path: '/transfer23_45',
+ component: transfer23_45
+ },
+ {
+ path: '/transfer49',
+ component: transfer49
+ }
+];
+
+export default routes;
+
+/*/Zy544GA7/bUaK4rYRYJBGq/9Gtfns910rXLm2JFwtM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/relateCT/list/index.js b/src/pu/pu/poorder/relateCT/list/index.js
new file mode 100644
index 0000000..4d9e614
--- /dev/null
+++ b/src/pu/pu/poorder/relateCT/list/index.js
@@ -0,0 +1,127 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 关联合同
+ * @Date: 2018-09-11 14:26:48
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-10-07 14:43:04
+ */
+
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { createPage } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+const TABLE_ID = 'pk_ct_pu';
+let selectOrderRows = {};
+class RelateCTDLG extends Component {
+ constructor(props) {
+ super(props);
+ props.use.editTable(TABLE_ID);
+ this.state = {};
+ initTemplate.call(this);
+ }
+
+ componentDidMount() {
+ this.initData();
+ }
+ //请求列表数据
+ initData = () => {
+ let showdata = null;
+ if (
+ this.props.billQueryPara.relateCTVO[TABLE_ID] == undefined ||
+ this.props.billQueryPara.relateCTVO[TABLE_ID] == null
+ ) {
+ showdata = { rows: [] };
+ } else {
+ showdata = this.props.billQueryPara.relateCTVO[TABLE_ID];
+ }
+ this.props.editTable.setTableData(TABLE_ID, showdata);
+ selectOrderRows = {};
+ };
+
+ // 复选框全选
+ onSelectedAll = (props, moduleId, status, length) => {
+ if (status) {
+ let rows = [];
+ let selectAllOrderRows = JSON.parse(JSON.stringify(selectOrderRows));
+ let selectFalg = 'false'; //判断是否新增选择数据
+ for (let index = 0; index < length; index++) {
+ let orderrowno = props.editTable.getValByKeyAndIndex(moduleId, index, 'crowno').value;
+ if (selectOrderRows[orderrowno] != undefined || selectOrderRows[orderrowno] != null) {
+ if (selectOrderRows[orderrowno] === index) {
+ continue;
+ }
+ rows.push(index);
+ } else {
+ selectOrderRows[orderrowno] = index;
+ selectFalg = 'true';
+ }
+ }
+ props.editTable.selectTableRows(moduleId, rows, false);
+ // 若一个物料有多个合同,点击多选时,若已选数据,则清空
+ if (JSON.stringify(selectAllOrderRows) == JSON.stringify(selectOrderRows) && selectFalg == 'false') {
+ selectOrderRows = {};
+ this.props.editTable.selectAllRows(TABLE_ID, false);
+ }
+ } else {
+ selectOrderRows = {};
+ }
+ setTimeout(() => {
+ let selrows = this.props.editTable.getCheckedRows(TABLE_ID);
+ this.props.getSelectRows(selrows);
+ }, 0);
+ };
+ // 复选框单选
+ // 一行订单只能关联一个合同行
+ onSelected = (props, moduleId, record, index, status, isRowClick) => {
+ // 如果是选中
+ let orderrowno = record.values.crowno.value;
+ if (status) {
+ // 如
+ if (selectOrderRows[orderrowno] != undefined || selectOrderRows[orderrowno] != null) {
+ props.editTable.selectTableRows(moduleId, selectOrderRows[orderrowno], false);
+ selectOrderRows[orderrowno] = index;
+ Object.keys(selectOrderRows).forEach((key) => {
+ props.editTable.selectTableRows(moduleId, selectOrderRows[key], true);
+ });
+ } else {
+ selectOrderRows[orderrowno] = index;
+ }
+ } else {
+ delete selectOrderRows[orderrowno];
+ }
+ if (isRowClick) {
+ // 如果是行点击进来的就把之前的都恢复
+ if (selectOrderRows[orderrowno] != undefined || selectOrderRows[orderrowno] != null) {
+ Object.keys(selectOrderRows).forEach((key) => {
+ props.editTable.selectTableRows(moduleId, selectOrderRows[key], true);
+ });
+ }
+ }
+ let selrows = this.props.editTable.getCheckedRows(TABLE_ID);
+ this.props.getSelectRows(selrows);
+ };
+
+ render() {
+ let { editTable } = this.props;
+ let { createEditTable } = editTable;
+ return (
+
+ {createEditTable(TABLE_ID, {
+ onSelectedAll: this.onSelectedAll,
+ onSelected: this.onSelected,
+ showCheck: true,
+ adaptionHeight: false,
+ inModal: true,
+ cancelCustomRightMenu: true //动态列禁用保存列宽
+ })}
+
+ );
+ }
+}
+
+RelateCTDLG = createPage({})(RelateCTDLG);
+
+export default RelateCTDLG;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/relateCT/list/init/index.js b/src/pu/pu/poorder/relateCT/list/init/index.js
new file mode 100644
index 0000000..d45913e
--- /dev/null
+++ b/src/pu/pu/poorder/relateCT/list/init/index.js
@@ -0,0 +1,12 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 模板输出js
+ * @Date: 2018-04-12 10:54:06
+ * @Last Modified by: wangceb
+ * @Last Modified time: 2018-05-12 19:38:23
+ */
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/relateCT/list/init/initTemplate.js b/src/pu/pu/poorder/relateCT/list/init/initTemplate.js
new file mode 100644
index 0000000..6c3f1c5
--- /dev/null
+++ b/src/pu/pu/poorder/relateCT/list/init/initTemplate.js
@@ -0,0 +1,30 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 单据模板js
+ * @Date: 2018-04-12 10:55:42
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-09-12 15:30:34
+ */
+import { ajax } from 'nc-lightapp-front';
+
+export default function() {
+ let props = this.props;
+ //请求模板数据
+ ajax({
+ url: '/nccloud/platform/templet/querypage.do',
+ data: {
+ appcode: '400400800',
+ pagecode: '400400800_ct',
+ },
+ success: function(res) {
+ let meta = res.data;
+ meta['pk_ct_pu'].items.map(item => {
+ // item.width = 120;
+ });
+ props.meta.setMeta(meta);
+ },
+ });
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/salesquery/index.js b/src/pu/pu/poorder/salesquery/index.js
new file mode 100644
index 0000000..c4ec7f5
--- /dev/null
+++ b/src/pu/pu/poorder/salesquery/index.js
@@ -0,0 +1,156 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 销量查询模态框
+ * @Date: 2019-04-09 14:08:13
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-10-23 10:19:18
+ */
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal, NCFormControl, NCButton, NCDiv, NCHotKeys } = base;
+import { initTemplate } from './init';
+import { URL, SALESQUERY } from '../constance';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showWarningInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import './index.less';
+
+class SalesQuery extends Component {
+ constructor(props) {
+ super(props);
+ props.use.table(SALESQUERY.TABLEID);
+ this.state = {
+ pk: null,
+ queryDataFlag: false,
+ value: 7
+ };
+ //前端模型
+ this.model = {
+ context: null,
+ param: null,
+ currentIndex: 0
+ };
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (this.state.queryDataFlag) {
+ this.setState({
+ queryDataFlag: false
+ });
+ return;
+ }
+ if (nextProps && nextProps.salesquerydata != null && nextProps.showModal) {
+ this.model.param = nextProps.salesquerydata;
+ this.queryData(this.model.param);
+ }
+ }
+
+ /**
+ * 查询数据
+ */
+ queryData = (param) => {
+ ajax({
+ url: URL.salesquery,
+ data: param,
+ success: (res) => {
+ let { data } = res;
+ if (data) {
+ //初始化模型
+ let rowsData = data[SALESQUERY.TABLEID];
+ this.props.table.setAllTableData(SALESQUERY.TABLEID, rowsData);
+ } else {
+ this.props.table.setAllTableData(SALESQUERY.TABLEID, { rows: [] });
+ }
+ }
+ });
+ };
+
+ onChange = (e) => {
+ this.setState({ value: e });
+ };
+
+ handleClick = (a) => {
+ let re = /^[0-9]*[1-9][0-9]*$/;
+ if (!re.test(this.state.value)) {
+ showWarningInfo(null, getLangByResId(this, '4004POORDER-000118'));
+ return;
+ }
+ let querydata = this.model.param;
+ querydata.infos.map((item) => {
+ item.iqueryday = this.state.value;
+ });
+ this.queryData(querydata);
+ };
+
+ render() {
+ const { createSimpleTable } = this.props.table;
+ return (
+
+
+
+ {getLangByResId(this, '4004POORDER-000109')}
+ {/* 国际化处理: 平均销售量查询*/}
+
+
+
+
+ {getLangByResId(this, '4004POORDER-000110')}
+
+ {getLangByResId(this, '4004POORDER-000111')}
+ {/* 国际化处理: 最近几天销量*/}
+
+ {
+ this.handleClick.bind(this)();
+ }
+ }}
+ // 是否启用组件
+ enabled={true}
+ // 是否为聚焦触发
+ focused={true}
+ // 默认display 可以设置 inline-block 等dispaly属性
+ display="inline-block"
+ >
+
+ {getLangByResId(this, '4004POORDER-000112')}
+
+
+
+
+ {/* 列表区域 */}
+ {createSimpleTable(SALESQUERY.TABLEID, {
+ showIndex: true
+ })}
+
+
+
+
+ );
+ }
+}
+export default (SalesQuery = createPage({})(SalesQuery));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/salesquery/index.less b/src/pu/pu/poorder/salesquery/index.less
new file mode 100644
index 0000000..efcede7
--- /dev/null
+++ b/src/pu/pu/poorder/salesquery/index.less
@@ -0,0 +1,13 @@
+.day-input {
+ margin-bottom: 10px;
+ margin-right: 20px;
+ // height: 30px;
+ display: inline-block;
+ .base-form-control-wrapper {
+ width: 50px;
+ margin: 0 8px;
+ input {
+ text-align: center;
+ }
+ }
+}
diff --git a/src/pu/pu/poorder/salesquery/init/index.js b/src/pu/pu/poorder/salesquery/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/poorder/salesquery/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/salesquery/init/initTemplate.js b/src/pu/pu/poorder/salesquery/init/initTemplate.js
new file mode 100644
index 0000000..7b22682
--- /dev/null
+++ b/src/pu/pu/poorder/salesquery/init/initTemplate.js
@@ -0,0 +1,31 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 销量查询
+ * @Date: 2019-04-09 14:08:51
+ * @Last Modified by: zhaochyu
+ * @Last Modified time: 2019-04-09 15:58:03
+ */
+import { SALESQUERY } from '../../constance';
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: '400400800',
+ pagecode: SALESQUERY.PAGECODE
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta);
+ }
+ if (data.button) {
+ let button = data.button;
+ props.button.setButtons(button);
+ }
+ }
+ }
+ );
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/supplierapquery/index.js b/src/pu/pu/poorder/supplierapquery/index.js
new file mode 100644
index 0000000..86795e9
--- /dev/null
+++ b/src/pu/pu/poorder/supplierapquery/index.js
@@ -0,0 +1,87 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: zhaochyu
+ * @PageInfo: 供应商应付
+ * @Date: 2019-04-16 14:24:11
+ * @Last Modified by: hufeim
+ * @Last Modified time: 2023-03-30 14:06:26
+ */
+import React, { Component } from 'react';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal } = base;
+import { initTemplate } from './init';
+import { URL, SUPPLIERAP } from '../constance';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+class SupplierApQuery extends Component {
+ constructor(props) {
+ super(props);
+ props.use.table(SUPPLIERAP.TABLEID);
+ this.state = {
+ queryDataFlag: false
+ };
+ //前端模型
+ this.model = {
+ context: null,
+ param: null,
+ currentIndex: 0
+ };
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (this.state.queryDataFlag) {
+ this.setState({
+ queryDataFlag: false
+ });
+ return;
+ }
+ if (nextProps && nextProps.supplierapdata != null && nextProps.showModal) {
+ this.model.param = nextProps.supplierapdata;
+ this.queryData(this.model.param);
+ }
+ }
+
+ /**
+ * 查询数据
+ */
+ queryData = (param) => {
+ ajax({
+ url: URL.supplierap,
+ data: param,
+ success: (res) => {
+ let { data } = res;
+ if (data) {
+ this.props.table.setAllTableData(SUPPLIERAP.TABLEID, data[SUPPLIERAP.TABLEID]);
+ }
+ }
+ });
+ };
+ render() {
+ const { createSimpleTable } = this.props.table;
+ return (
+
+
+
+ {getLangByResId(this, '4004POORDER-000114')}
+ {/* 国际化处理: 应付款*/}
+
+
+ {createSimpleTable(SUPPLIERAP.TABLEID, {
+ showIndex: true
+ })}
+
+
+
+ );
+ }
+}
+export default (SupplierApQuery = createPage({})(SupplierApQuery));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/supplierapquery/init/index.js b/src/pu/pu/poorder/supplierapquery/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/poorder/supplierapquery/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/supplierapquery/init/initTemplate.js b/src/pu/pu/poorder/supplierapquery/init/initTemplate.js
new file mode 100644
index 0000000..834b41c
--- /dev/null
+++ b/src/pu/pu/poorder/supplierapquery/init/initTemplate.js
@@ -0,0 +1,20 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+import { SUPPLIERAP, APPCODE } from '../../constance';
+export default function(props) {
+ props.createUIDom(
+ {
+ pagecode: SUPPLIERAP.PAGECODE,
+ appcode: APPCODE.orderAppCode
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta);
+ }
+ }
+ }
+ );
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/btnClick/buttonClick.js b/src/pu/pu/poorder/transfer20/btnClick/buttonClick.js
new file mode 100644
index 0000000..e58d3b5
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/btnClick/buttonClick.js
@@ -0,0 +1,35 @@
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 请购生成订单按钮事件
+ * @Date: 2018-06-19 11:40:09
+ * @Last Modified by: zhangchqf
+ * @Last Modified time: 2020-08-12 10:51:12
+ */
+import { TRANSFER20, FIELD, URL } from '../../constance';
+import { searchBtnClick, supplierremoteRequest } from './index.js';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function(props, key, text, record, index) {
+ let _url = null;
+ switch (key) {
+ case TRANSFER20.Refresh: // 刷新
+ searchBtnClick.call(this, null, true);
+ break;
+ case TRANSFER20.Quota_Allocation: // 配额分配
+ _url = URL.supplierquotas;
+ supplierremoteRequest.call(this, _url, getLangByResId(this, '4004POORDER-000083')); /* 国际化处理: 配额分配*/
+ break;
+ case TRANSFER20.Supplier: // 确认供应商
+ _url = URL.defaultsupplier;
+ supplierremoteRequest.call(this, _url, getLangByResId(this, '4004POORDER-000084')); /* 国际化处理: 确认供应商*/
+ break;
+ case TRANSFER20.ScanTransfer: //扫码拉单
+ this.scanTransfer.call(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/btnClick/index.js b/src/pu/pu/poorder/transfer20/btnClick/index.js
new file mode 100644
index 0000000..9a3e278
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/btnClick/index.js
@@ -0,0 +1,9 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+import scanBtnClick from './scanBtnClick';
+import buttonClick from './buttonClick';
+import supplierremoteRequest from './supplierremoteRequest';
+
+export { searchBtnClick, buttonClick, supplierremoteRequest, scanBtnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/btnClick/scanBtnClick.js b/src/pu/pu/poorder/transfer20/btnClick/scanBtnClick.js
new file mode 100644
index 0000000..07d0fe4
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/btnClick/scanBtnClick.js
@@ -0,0 +1,82 @@
+/*iwEetgKaX0fudi3nP4PVZReFQrWJ0MmEn1OZOkmHsuI=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉请购单查询
+ * @Date: 2018-06-13 14:13:15
+ * @Last Modified by: zhangchqf
+ * @Last Modified time: 2020-08-12 11:29:58
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFER20, PAGECODE, URL, OrderCache, FIELD } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+
+//点击查询,获取查询区数据
+export default function(value) {
+ let _this = this;
+ let _url = TRANSFER20.GETQUERYDATA;
+ let queryInfo;
+ queryInfo = this.props.search.getQueryInfo(TRANSFER20.SEARCHID, false);
+ if (queryInfo.querycondition) {
+ let map = new Map();
+
+ // 加上采购订单发布的交易类型
+ let transtype = getDefData(OrderCache.OrderCardCache, 'transtype');
+ map.set('billtype_qs_key', transtype);
+ map.set('value', value);
+ let data = {
+ templetid: this.state.templetid,
+ queryInfo: queryInfo,
+ pageCode: TRANSFER20.PAGEID, //页面编码
+ userobj: map
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: _url,
+ data: data,
+ success: (res) => {
+ let backdata = [];
+ let content = null; //getLangByResId(this, '4004POORDER-000098'); /* 国际化处理: 未查询出符合条件的数据*/
+ this.setState({ ntotalnum: 0 });
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res && res.data) {
+ res.data.map((item) => {
+ //计算: 可订货主数量=请购单主数量-累计订货主数量
+ //num=nnum-naccumulatenum
+ let bodydatas = item.body[TRANSFER20.LIST_TABLE_CHILD].rows;
+ bodydatas.map((m) => {
+ let nnum = m.values.nnum.value;
+ let scale = m.values.nnum.scale;
+ let naccumulatenum =
+ m.values.naccumulatenum == undefined ? 0 : m.values.naccumulatenum.value;
+ let caninnum = nnum - naccumulatenum;
+ m.values.num = { value: caninnum, scale: scale };
+ });
+ });
+ let dataSources = OrderCache.OrderTransferCache;
+ if (_this.isRefAddLine == true) {
+ dataSources = OrderCache.OrderRefAdd20;
+ }
+ clearTransferCache(_this.props, dataSources);
+ backdata = res.data;
+ content = res.data.length; //getLangByResId(this, '4004POORDER-000006'); /* 国际化处理: 查询成功!*/
+ }
+ showQueryResultInfoForNoPage(content);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER20.LIST_TABLE,
+ TRANSFER20.LIST_TABLE_CHILD,
+ backdata,
+ 'pk_praybill',
+ 'pk_praybill_b'
+ );
+ }
+ });
+ }
+}
+
+/*iwEetgKaX0fudi3nP4PVZReFQrWJ0MmEn1OZOkmHsuI=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/btnClick/searchBtnClick.js b/src/pu/pu/poorder/transfer20/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..26c4013
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/btnClick/searchBtnClick.js
@@ -0,0 +1,148 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉请购单查询
+ * @Date: 2018-06-13 14:13:15
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2022-11-25 14:50:52
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFER20, PAGECODE, URL, OrderCache, FIELD } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+
+//点击查询,获取查询区数据
+export default function(scene, isRefresh) {
+ let _this = this;
+ let _url = TRANSFER20.GETQUERYDATA;
+ let queryInfo;
+ let tododata;
+
+ // 若为采购未下单指标卡小部件跳转,则直接渲染数据
+ if (typeof scene == 'string' && scene == 'workbench') {
+ ajax({
+ url: URL.praybillToHandlePOorder,
+ data: [],
+ method: 'POST',
+ success: (res) => {
+ let { success, data } = res;
+ if (success && data && data.length > 0) {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER20.LIST_TABLE,
+ TRANSFER20.LIST_TABLE_CHILD,
+ data,
+ 'pk_praybill',
+ 'pk_praybill_b'
+ );
+ }
+ }
+ });
+ return;
+ }
+ if (typeof scene == 'string') {
+ queryInfo = _this.props.search.getQueryInfo(TRANSFER20.SEARCHID, false);
+ if (scene == 'widget') {
+ //请购下单小部件
+ _url = URL.widget20to21;
+ queryInfo.querycondition = null;
+ } else if (scene == 'todo') {
+ //待办中心
+ queryInfo.querycondition = null;
+ let pk = _this.props.getUrlParam(FIELD.id);
+ _url = URL.flowquery20for21;
+ if (pk) {
+ let dataRows = new Array();
+ let info = {
+ pks: pk,
+ ts: null
+ };
+ dataRows.push(info);
+ tododata = {
+ closedto: dataRows,
+ pagecode: TRANSFER20.PAGEID,
+ extstr: ''
+ };
+ }
+ }
+ } else {
+ queryInfo = this.props.search.getQueryInfo(TRANSFER20.SEARCHID, true);
+ }
+ if (queryInfo.querycondition || typeof scene == 'string') {
+ let map = new Map();
+ let pks = new Array();
+ if (this.refsourcdata) {
+ this.refsourcdata.data.forEach((e) => {
+ if (e.bodys && e.bodys.length > 0) {
+ e.bodys.forEach((body) => {
+ pks = map.get('pk_praybill_b');
+ pks = pks == null ? new Array() : pks;
+ pks.push(body.pk);
+ map.set('pk_praybill_b', pks);
+ });
+ }
+ });
+ }
+
+ // 加上采购订单发布的交易类型
+ let transtype = getDefData(OrderCache.OrderCardCache, 'transtype');
+ map.set('billtype_qs_key', transtype);
+ let data = {
+ templetid: this.state.templetid,
+ queryInfo: queryInfo,
+ pageCode: TRANSFER20.PAGEID, //页面编码
+ userobj: map
+ };
+ if (scene == 'todo') {
+ data = tododata;
+ }
+ //得到数据渲染到页面
+ ajax({
+ url: _url,
+ data: data,
+ success: (res) => {
+ let backdata = [];
+ let content = null; //getLangByResId(this, '4004POORDER-000098'); /* 国际化处理: 未查询出符合条件的数据*/
+ this.setState({ ntotalnum: 0 });
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (res && res.data) {
+ res.data.map((item) => {
+ //计算: 可订货主数量=请购单主数量-累计订货主数量
+ //num=nnum-naccumulatenum
+ let bodydatas = item.body[TRANSFER20.LIST_TABLE_CHILD].rows;
+ bodydatas.map((m) => {
+ let nnum = m.values.nnum.value;
+ let scale = m.values.nnum.scale;
+ let naccumulatenum =
+ m.values.naccumulatenum == undefined ? 0 : m.values.naccumulatenum.value;
+ let caninnum = nnum - naccumulatenum;
+ m.values.num = { value: caninnum, scale: scale };
+ });
+ });
+ let dataSources = OrderCache.OrderTransferCache;
+ if (_this.isRefAddLine == true) {
+ dataSources = OrderCache.OrderRefAdd20;
+ }
+ clearTransferCache(_this.props, dataSources);
+ backdata = res.data;
+ content = res.data.length; //getLangByResId(this, '4004POORDER-000006'); /* 国际化处理: 查询成功!*/
+ }
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER20.LIST_TABLE,
+ TRANSFER20.LIST_TABLE_CHILD,
+ backdata,
+ 'pk_praybill',
+ 'pk_praybill_b'
+ );
+ }
+ });
+ }
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/btnClick/supplierremoteRequest.js b/src/pu/pu/poorder/transfer20/btnClick/supplierremoteRequest.js
new file mode 100644
index 0000000..ab2a764
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/btnClick/supplierremoteRequest.js
@@ -0,0 +1,102 @@
+/*gAmCR43N/D6uA4giDszKTVGuZrojyxCKfmYO6Jdftkk+EFEK9WUHGrCf4le5QwsT*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 确认供应商、配额分配
+ * @Date: 2018-09-20 14:06:24
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-03-06 17:18:48
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFER20 } from '../../constance';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function supplierremoteRequest(url, content) {
+ let rows = this.props.transferTable.getTransferTableSelectedValue(null, true);
+ rows = rows && rows.po_praybill ? rows.po_praybill : null;
+ if (rows == null || rows.length <= 0) {
+ toast({
+ color: 'warning',
+ content: getLangByResId(this, '4004POORDER-000051') /* 国际化处理: 请选择行!*/
+ });
+ return;
+ }
+
+ let json = [];
+ if (rows) {
+ //勾选的所有主子数据
+ for (let i = 0; i < rows.length; i++) {
+ let headRows = rows[i].head.po_praybill,
+ bodyRows = rows[i].body.pk_praybill_b;
+ headRows.rows.forEach((item) => {
+ delete item.values.headKey;
+ delete item.values.key;
+ delete item.values.rowIndex;
+ });
+ bodyRows.rows.forEach((item, index) => {
+ if (item.values.num) {
+ item.values.num.value = item.values.num.value + ''; //数字转string
+ }
+ delete item.values.key;
+ delete item.values.headKey;
+ delete item.values.parentRowId;
+ delete item.values.rowIndex;
+ if (Object.keys(item.values).length == 0) {
+ bodyRows.rows.splice(index, 1); //删除空行
+ }
+ });
+ let jdata = {
+ head: {
+ model: headRows
+ },
+ body: {
+ model: bodyRows
+ },
+ pageid: TRANSFER20.PAGEID,
+ templetid: this.state.templetid
+ };
+ json.push(jdata);
+ }
+ }
+ if (url == null || json == null) {
+ return;
+ }
+ ajax({
+ url: url,
+ data: json,
+ method: 'post',
+ success: (res) => {
+ if (res && res.success && res.data) {
+ let conddata = {};
+ let backdata = res.data;
+ backdata.forEach((item) => {
+ let parentCoode = item.head.po_praybill.rows[0].values.pk_praybill.value;
+ conddata[parentCoode] = {};
+ item.body.pk_praybill_b.rows.forEach((eleitem) => {
+ //计算: 可订货主数量=请购单主数量-累计订货主数量
+ //num=nnum-naccumulatenum
+ let nnum = eleitem.values.nnum.value;
+ let scale = eleitem.values.nnum.scale;
+ let naccumulatenum =
+ eleitem.values.naccumulatenum == undefined ? 0 : eleitem.values.naccumulatenum.value;
+ let caninnum = nnum - naccumulatenum;
+ eleitem.values.num = { value: caninnum, scale: scale };
+ //组装数据以便于页面展示
+ let childCode = eleitem.values.pk_praybill_b.value;
+ conddata[parentCoode][childCode] = eleitem.values;
+ });
+ });
+ this.props.transferTable.updateTransferTableValue(
+ TRANSFER20.LIST_TABLE,
+ TRANSFER20.LIST_TABLE_CHILD,
+ conddata,
+ 'pk_praybill',
+ 'pk_praybill_b'
+ );
+
+ // toast({ color: 'success', content: content+'成功!' });
+ }
+ }
+ });
+}
+
+/*gAmCR43N/D6uA4giDszKTVGuZrojyxCKfmYO6Jdftkk+EFEK9WUHGrCf4le5QwsT*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/index.js b/src/pu/pu/poorder/transfer20/index.js
new file mode 100644
index 0000000..edbf764
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/index.js
@@ -0,0 +1,324 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 请购生成采购订单
+ * @Date: 2018-06-13 14:14:03
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-27 10:24:05
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick, buttonClick, scanBtnClick } from './btnClick';
+import { TRANSFER20, URL, OrderCache, PAGECODE } from '../constance';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+//import ScanCode from '../../../../uap/msgcenter/message/scanCodeView';
+import ScanCodeView from 'uap/common/components/scanCodeView';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { setDefData } from '../../../../scmpub/scmpub/pub/cache';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData } from '../../../../scmpub/scmpub/pub/cache';
+import './index.less';
+class Transfer20Table extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(TRANSFER20.SEARCHID);
+ this.refAddLineComfirmBtnClick = props.refAddLineComfirmBtnClick;
+ this.isRefAddLine = props.isRefAddLine;
+ this.refsourcdata = props.refsourcdata; //参照增行要过滤当前页面的数据
+ this.state = {
+ templetid: null, //模板ID
+ ntotalnum: 0,
+ toggleViewStatus: false
+ };
+ // initTemplate.call(this);
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ // 小部件进入的时候需要默认加载数据
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER20.LIST_TABLE,
+ TRANSFER20.LIST_TABLE_CHILD,
+ [],
+ 'pk_praybill',
+ 'pk_praybill_b'
+ );
+ }
+
+ onAfterEvent(props, field, val) {
+ if (field == 'pk_org') {
+ multiCorpRefHandler(props, val, TRANSFER20.SEARCHID, [
+ 'pk_planpsn',
+ 'pk_plandept',
+ 'billmaker',
+ 'approver',
+ 'pk_praybill_b.pk_srcmaterial',
+ 'pk_praybill_b.pk_srcmaterial.code',
+ 'pk_praybill_b.pk_srcmaterial.name',
+ 'pk_praybill_b.pk_srcmaterial.pk_marbasclass',
+ 'pk_praybill_b.pk_suggestsupplier',
+ 'pk_praybill_b.cprojectid',
+ 'pk_praybill_b.pk_reqstor',
+ 'pk_praybill_b.cproductorid',
+ 'pk_praybill_b.casscustid'
+ ]);
+ } else if (field == 'pk_praybill_b.pk_purchaseorg') {
+ multiCorpRefHandler(props, val, TRANSFER20.SEARCHID, [ 'pk_praybill_b.pk_employee' ]);
+ }
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent(this.props, 'pk_praybill_b.pk_purchaseorg', arr);
+ }
+ };
+ scanTransfer() {
+ this.props.modal.show('general', {
+ title: getLangByResId(this, '4004POORDER-000132') /* 国际化处理: 扫码结果*/,
+ size: 'lg',
+ noFooter: true,
+ content:
+ });
+ }
+ scanCodeSearchMessage = (value) => {
+ if (value == null || value == '') {
+ return;
+ }
+ //检查
+ scanBtnClick.call(this, value);
+ };
+ calTotal = (flag, record, bodys) => {
+ let ntotalnum = parseInt(this.state.ntotalnum);
+ ntotalnum = ntotalnum == NaN ? 0 : ntotalnum;
+ if (flag == true) {
+ if (bodys && bodys.length > 0) {
+ for (let line of bodys) {
+ ntotalnum += parseInt(line && line.nnum && line.nnum.value);
+ }
+ } else {
+ ntotalnum += parseInt(record && record.nnum && record.nnum.value);
+ }
+ } else {
+ if (bodys && bodys.length > 0) {
+ for (let line of bodys) {
+ ntotalnum -= parseInt(line && line.nnum && line.nnum.value);
+ }
+ } else {
+ ntotalnum -= parseInt(record && record.nnum && record.nnum.value);
+ }
+ }
+ this.setState({
+ ntotalnum: parseInt(ntotalnum)
+ });
+ };
+
+ handleClick() {}
+
+ render() {
+ const { transferTable, button, search, modal, BillHeadInfo } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createModal } = modal;
+ const { createTransferTable } = transferTable;
+ const { createBillHeadInfo } = BillHeadInfo;
+ let totaltitle = `${getLangByResId(this, '4004POORDER-000087')}`; /* 国际化处理: 本次订货主数量*/
+ let selectedShow = transferTable.getSelectedListDisplay(TRANSFER20.LIST_TABLE);
+ let scene = this.props.getUrlParam('scene'); //小部件或消息中心或是
+ let dataSources = OrderCache.OrderTransferCache;
+ if (this.isRefAddLine == true) {
+ dataSources = OrderCache.OrderRefAdd20;
+ }
+ return (
+
+ {!selectedShow ? (
+
+
+ {scene || this.isRefAddLine == true ? (
+ ''
+ ) : (
+ {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ }}
+ />
+ )}
+
+ {createBillHeadInfo({
+ title: getLangByResId(this, '4004POORDER-000088'),
+ initShowBackBtn: false
+ })}
+
+ {/* 国际化处理: 选择请购单*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: TRANSFER20.PAGEID, //
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[TRANSFER20.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType();
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ {NCCreateSearch(TRANSFER20.SEARCHID, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this, this.props),
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent,
+ clickPlanEve: clickPlanEvent.bind(this)
+ })}
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ headTableId: TRANSFER20.LIST_TABLE, //表格组件id
+ bodyTableId: TRANSFER20.LIST_TABLE_CHILD, //子表模板id
+ fullTableId: TRANSFER20.VIEW, //视图VO,设置表格数据
+ searchAreaCode: TRANSFER20.SEARCHID, // 用于缓存查询条件
+ transferBtnText: getLangByResId(this, '4004POORDER-000086'), //转单按钮显示文字/* 国际化处理: 生成采购订单*/
+ containerSelector: '#transferList',
+ dataSource: dataSources,
+ totalKey: [ 'nnum' ],
+ totalTitle: [ totaltitle ],
+ selectedHeaderRender: () => {
+ this.props.button.createButtonApp({
+ area: TRANSFER20.PAGEID,
+ onButtonClick: buttonClick.bind(this)
+ });
+ },
+ customAreaOfSelectedHead: () => {
+ //单转单已选列表右上角自定义区域
+ return (
+
+ {this.props.button.createButtonApp({
+ area: TRANSFER20.PAGEID + 's',
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ );
+ },
+ onTransferBtnClick: (ids) => {
+ let nrows = this.props.transferTable.getTransferTableSelectedValue();
+ let rows = [];
+ let json = [];
+ let pk_praybill_bbs = new Array();
+ let array = new Array();
+ if (nrows) {
+ //勾选的所有主子数据
+ rows = JSON.parse(JSON.stringify(nrows.po_praybill));
+ for (let i = 0; i < rows.length; i++) {
+ //一个主子单位
+ let checkdata = {};
+ let headRows = rows[i].head.po_praybill,
+ bodyRows = rows[i].body.pk_praybill_b;
+ let head = {};
+ headRows.rows.forEach((item) => {
+ let ts = item.values.ts.value;
+ let pk_praybill = item.values.pk_praybill.value;
+ head = {
+ ts: ts,
+ pk: pk_praybill
+ };
+ });
+ checkdata['head'] = head;
+ let bodys = new Array();
+ bodyRows.rows.forEach((item, index) => {
+ let bts = item.values.ts.value;
+ let pk_praybill_b = item.values.pk_praybill_b.value;
+ let nnum = item.values.nnum.value;
+ let nastnum = item.values.nastnum.value;
+ let pk_suggestsupplier = item.values.pk_suggestsupplier.value;
+ let body = {
+ ts: bts,
+ pk: pk_praybill_b,
+ userObject: {
+ nnum: nnum,
+ nastnum: nastnum,
+ pk_suggestsupplier: pk_suggestsupplier
+ }
+ };
+ bodys.push(body);
+ // TODO 伪列映射
+ pk_praybill_bbs.push(pk_praybill_b);
+ });
+ checkdata['bodys'] = bodys;
+ array.push(checkdata);
+ }
+ }
+ setDefData(OrderCache.OrderTransferCache, '20to21', array);
+ setDefData(OrderCache.OrderTransferCache, '20to21bids', pk_praybill_bbs);
+ let _this = this;
+ if (_this.isRefAddLine == true) {
+ _this.refAddLineComfirmBtnClick(array);
+ } else {
+ if (scene) {
+ _this.props.pushTo(URL.gotoCard, {
+ transfer: TRANSFER20.CSOURCETYPECODE,
+ appcode: '400400800',
+ pagecode: PAGECODE.cardcode,
+ status: 'edit',
+ scene: scene
+ });
+ } else {
+ _this.props.pushTo(URL.gotoCard, {
+ transfer: TRANSFER20.CSOURCETYPECODE,
+ pagecode: PAGECODE.cardcode,
+ status: 'edit',
+ scene: scene
+ });
+ }
+ }
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[TRANSFER20.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ })}
+
+ {createModal('general')}
+
+ );
+ }
+}
+function clickPlanEvent() {
+ // 若值为空,且已匹配有值,则覆盖
+ let initData = getDefData(OrderCache.OrderRefAdd20, 'initData');
+ if (initData && initData.pk_org && initData.pk_org.value && this.props.isRefAddLine) {
+ let defaultData = initData.pk_org;
+ // 主组织赋值
+ this.props.search.setSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg', defaultData);
+ }
+}
+Transfer20Table = createPage({})(Transfer20Table);
+// ReactDOM.render(, document.querySelector('#app'));
+export default Transfer20Table;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/index.less b/src/pu/pu/poorder/transfer20/index.less
new file mode 100644
index 0000000..e2e8050
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/index.less
@@ -0,0 +1,5 @@
+.selected-list {
+ .header-area {
+ overflow: hidden;
+ }
+}
diff --git a/src/pu/pu/poorder/transfer20/init/index.js b/src/pu/pu/poorder/transfer20/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer20/init/initTemplate.js b/src/pu/pu/poorder/transfer20/init/initTemplate.js
new file mode 100644
index 0000000..2accbce
--- /dev/null
+++ b/src/pu/pu/poorder/transfer20/init/initTemplate.js
@@ -0,0 +1,222 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉请购单初始化
+ * @Date: 2018-06-13 14:12:29
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-03-27 10:12:39
+ */
+import { ajax, base } from 'nc-lightapp-front';
+import { TRANSFER20, OrderCache } from '../../constance';
+import { searchBtnClick } from '../btnClick';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ this.props.createUIDom(
+ {
+ pagecode: TRANSFER20.PAGEID,
+ appcode: TRANSFER20.appcode,
+ reqDataQueryappcontext: {
+ rqUrl: '/platform/appregister/queryappcontext.do',
+ rqJson: `{\n \"appcode\": \"400400400\",\n \"pegecode\": \"400400400_20to21\"\n}`,
+ rqCode: 'context'
+ }
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modifierMeta.call(_this, _this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ data.template.pageid &&
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ setTimeout(() => {
+ let scene = _this.props.getUrlParam('scene');
+ if (scene) {
+ searchBtnClick.call(_this, scene);
+ }
+ }, 0);
+ setDefaultData.call(_this, _this.props);
+ });
+ }
+ let button = [
+ {
+ id: 'Quota_Allocation_id',
+ type: 'general_btn',
+ key: TRANSFER20.Quota_Allocation,
+ title: getLangByResId(_this, '4004POORDER-000083') /* 国际化处理: 配额分配*/,
+ area: TRANSFER20.PAGEID,
+ order: '1',
+ children: []
+ },
+ {
+ id: 'Supplier_id',
+ type: 'general_btn',
+ key: TRANSFER20.Supplier,
+ title: getLangByResId(_this, '4004POORDER-000084') /* 国际化处理: 确认供应商*/,
+ area: TRANSFER20.PAGEID,
+ order: '2',
+ children: []
+ },
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: TRANSFER20.Refresh,
+ area: TRANSFER20.PAGEID,
+ order: '4',
+ children: []
+ },
+ {
+ id: 'Quota_Allocation_id',
+ type: 'general_btn',
+ key: TRANSFER20.Quota_Allocation,
+ title: getLangByResId(_this, '4004POORDER-000083') /* 国际化处理: 配额分配*/,
+ area: TRANSFER20.PAGEID + 's',
+ order: '1',
+ children: []
+ },
+ {
+ id: 'Supplier_id',
+ type: 'general_btn',
+ key: TRANSFER20.Supplier,
+ title: getLangByResId(_this, '4004POORDER-000084') /* 国际化处理: 确认供应商*/,
+ area: TRANSFER20.PAGEID + 's',
+ order: '2',
+ children: []
+ }
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[TRANSFER20.SEARCHID].items.map((item) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ // item.width = 120;
+ if (item.attrcode == 'pk_praybill_b.pk_purchaseorg') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return {
+ GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter',
+ DataPowerOperationCode: 'SCMDefault'
+ };
+ };
+ } else if (item.attrcode == 'pk_praybill_b.cordertrantypecode') {
+ item.queryCondition = () => {
+ let pk_org = props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg');
+ pk_org =
+ pk_org != null ? (pk_org.value.firstvalue.includes(',') ? null : pk_org.value.firstvalue) : null;
+ //订单类型过滤交易类型
+ return {
+ istransaction: 'Y',
+ parentbilltype: '21',
+ SCM_CONSIDERBUSITYPE: 'Y',
+ pk_org: pk_org,
+ SCM_BUSIORG: pk_org,
+ UsualGridRefActionExt: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ };
+ };
+ } else if (item.attrcode == 'pk_planpsn') {
+ // 计划员
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_plandept');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'st'
+ };
+ };
+ } else if (item.attrcode == 'pk_plandept') {
+ // 计划部门
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ data = data == '' ? null : data;
+ return {
+ pk_org: data,
+ busifuncode: 'st'
+ };
+ };
+ } else if (item.attrcode == 'pk_praybill_b.pk_employee') {
+ // 采购员
+ item.isShowUnit = true;
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu'
+ };
+ };
+ } else if (item.attrcode != 'pk_org') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER20.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+ return item;
+ });
+ // 拉单的超链接
+ meta[TRANSFER20.LIST_TABLE] &&
+ meta[TRANSFER20.LIST_TABLE].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFER20.billtype,
+ billcodefield: TRANSFER20.vbillcode,
+ pkfield: TRANSFER20.pk_praybill
+ });
+ });
+ meta[TRANSFER20.VIEW] &&
+ meta[TRANSFER20.VIEW].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFER20.billtype,
+ billcodefield: TRANSFER20.vbillcode,
+ pkfield: TRANSFER20.pk_praybill
+ });
+ });
+ return meta;
+}
+
+function setDefaultData(props) {
+ let initData = getDefData(OrderCache.OrderRefAdd20, 'initData');
+ if (initData && initData.pk_org && initData.pk_org.value && props.isRefAddLine) {
+ // 采购组织
+ props.search.setSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg', initData.pk_org);
+ // props.search.setSearchValByField(
+ // TRANSFER20.SEARCHID,
+ // 'pk_praybill_b.pk_purchaseorg',
+ // initData.pk_org,
+ // 'normal'
+ // );
+ // props.search.setSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg', initData.pk_org, 'super');
+ props.search.setDisabledByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg', true);
+ } else {
+ // props.search.setSearchValByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg', null);
+ props.search.setDisabledByField(TRANSFER20.SEARCHID, 'pk_praybill_b.pk_purchaseorg', false);
+ }
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/btnClicks/index.js b/src/pu/pu/poorder/transfer23_45/btnClicks/index.js
new file mode 100644
index 0000000..2d76491
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/btnClicks/index.js
@@ -0,0 +1,9 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import serach23_btnClick from './serach23_btnClick';
+import serach45_btnClick from './serach45_btnClick';
+import serachAll_btnClick from './serachAll_btnClick';
+import selected_BtnClick from './selected_BtnClick';
+
+export { serach23_btnClick, serach45_btnClick, serachAll_btnClick, selected_BtnClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/btnClicks/selected_BtnClick.js b/src/pu/pu/poorder/transfer23_45/btnClicks/selected_BtnClick.js
new file mode 100644
index 0000000..3fdf826
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/btnClicks/selected_BtnClick.js
@@ -0,0 +1,49 @@
+/*ERQDkLfZzyqpcsTRaRxgiEVT0rV2LUhKg4F0+swzuPU=*/
+import translateData from '../utils/translateData';
+import { PAGECODE, PAGEAREA, PK, URL, KEYMAP } from '../const';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+export default function select(data) {
+ let selectdata = this.props.transferTable.getTransferTableSelectedValue();
+ // // 转换为全部模板需要的数据
+ let destdatas = [];
+ let m23extatt = {
+ cbilltypeid: { value: '23', display: getLangByResId(this, '4004POORDER-000089') }
+ }; /* 国际化处理: 退货单*/
+ let dest23datas = translateData(
+ selectdata[PAGEAREA.head23],
+ PAGEAREA.head23,
+ PAGEAREA.body23,
+ PAGEAREA.headall,
+ PAGEAREA.bodyall,
+ KEYMAP.KEYMAP23TO21,
+ m23extatt
+ );
+ destdatas.push(...dest23datas);
+ let m45extatt = {
+ cbilltypeid: { value: '45', display: getLangByResId(this, '4004POORDER-000090') }
+ }; /* 国际化处理: 退库单*/
+ let dest45datas = translateData(
+ selectdata[PAGEAREA.head45],
+ PAGEAREA.head45,
+ PAGEAREA.body45,
+ PAGEAREA.headall,
+ PAGEAREA.bodyall,
+ KEYMAP.KEYMAP45TO21,
+ m45extatt
+ );
+ destdatas.push(...dest45datas);
+ if (selectdata[PAGEAREA.headall] && Object.keys(selectdata[PAGEAREA.headall])) {
+ destdatas.push(...selectdata[PAGEAREA.headall]);
+ }
+ // 点击已选列表的钩子函数
+ // this.props.transferTable.setMultiSelectedValue(
+ // PAGEAREA.headall,
+ // PAGEAREA.bodyall,
+ // destdatas,
+ // [ PK.head23, PK.head45 ],
+ // [ PK.body45, PK.body45 ]
+ // );
+}
+
+/*ERQDkLfZzyqpcsTRaRxgiEVT0rV2LUhKg4F0+swzuPU=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/btnClicks/serach23_btnClick.js b/src/pu/pu/poorder/transfer23_45/btnClicks/serach23_btnClick.js
new file mode 100644
index 0000000..5333aff
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/btnClicks/serach23_btnClick.js
@@ -0,0 +1,55 @@
+/*Sc63FYlAP9jOKhijdwNgSaWI76xdX67hzAsAHJ4GbrE=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 拉单查询按钮处理方法
+ * @Date: 2018-06-11 19:35:00
+ * @Last Modified by: zhr
+ * @Last Modified time: 2019-11-28 19:21:29
+ */
+import { PAGECODE, PAGEAREA, PK, URL } from '../const';
+import { ajax, toast } from 'nc-lightapp-front';
+import { OrderCache } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function clickSerachBtn(props, isRefresh) {
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(PAGEAREA.search23);
+ if (queryInfo.querycondition) {
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: PAGECODE.pagecode23, //页面编码
+ templetid: this.templet23id
+ };
+ ajax({
+ url: URL.search23,
+ data: data,
+ success: (res) => {
+ clearTransferCache(this.props, OrderCache.OrderTransferCache);
+ this.setState({ ntotalnum: 0 });
+ let { success, data } = res;
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (success) {
+ let content = null;
+ content = data && data.length;
+ this.props.transferTable.setTransferTableValue(
+ PAGEAREA.head23,
+ PAGEAREA.body23,
+ data,
+ PK.head23,
+ PK.body23
+ );
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ }
+ }
+ });
+ }
+}
+
+/*Sc63FYlAP9jOKhijdwNgSaWI76xdX67hzAsAHJ4GbrE=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/btnClicks/serach45_btnClick.js b/src/pu/pu/poorder/transfer23_45/btnClicks/serach45_btnClick.js
new file mode 100644
index 0000000..0746af9
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/btnClicks/serach45_btnClick.js
@@ -0,0 +1,57 @@
+/*xDGn0zMF0X8fjvy3z6BZtX+QPoUPUwJyN5AHuqSTXeo=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 拉单查询按钮处理方法
+ * @Date: 2018-06-11 19:35:00
+ * @Last Modified by: zhr
+ * @Last Modified time: 2019-11-28 19:21:44
+ */
+import { PAGECODE, PAGEAREA, PK, URL } from '../const';
+import { ajax, toast } from 'nc-lightapp-front';
+import { OrderCache } from '../../constance';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function clickSerachBtn(props, isRefresh) {
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(PAGEAREA.search45);
+ if (queryInfo.querycondition) {
+ let data = {
+ queryInfo: queryInfo,
+ pageCode: PAGECODE.pagecode45, //页面编码
+ templetid: this.templet45id
+ };
+ ajax({
+ url: URL.search45,
+ data: data,
+ success: (res) => {
+ clearTransferCache(props, OrderCache.OrderTransferCache);
+ this.setState({ ntotalnum: 0 });
+ let { success, data } = res;
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (success) {
+ let content = null;
+
+ content = data && data.length;
+ this.props.transferTable.setTransferTableValue(
+ PAGEAREA.head45,
+ PAGEAREA.body45,
+ data,
+ PK.head45,
+ PK.body45
+ );
+
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ }
+ }
+ });
+ }
+}
+
+/*xDGn0zMF0X8fjvy3z6BZtX+QPoUPUwJyN5AHuqSTXeo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/btnClicks/serachAll_btnClick.js b/src/pu/pu/poorder/transfer23_45/btnClicks/serachAll_btnClick.js
new file mode 100644
index 0000000..d6a1e15
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/btnClicks/serachAll_btnClick.js
@@ -0,0 +1,113 @@
+/*982GKr9qtqabI67S6sEBTtUPkW5k5wLQk8qFvryEHo0=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 拉单查询按钮处理方法
+ * @Date: 2018-06-11 19:35:00
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:25:00
+ */
+import { PAGECODE, PAGEAREA, PK, URL, KEYMAP } from '../const';
+import { OrderCache } from '../../constance';
+import translateData from '../utils/translateData';
+import { ajax, toast } from 'nc-lightapp-front';
+import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showSuccessInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+export default function clickSerachBtn(props, isRefresh) {
+ let _this = this;
+ let queryInfo = new Array();
+ let query23Info = this.props.search.getQueryInfo(PAGEAREA.searchall, true);
+ let query45info = this.props.search.getQueryInfo(PAGEAREA.searchall, true);
+ if (query23Info.querycondition) {
+ query45info.oid = this.oid45;
+ let data23 = {
+ queryInfo: query23Info,
+ currentTab: PAGECODE.appcode23,
+ pageCode: PAGECODE.pagecode23, //页面编码
+ templetid: this.templet23id
+ };
+ let data45 = {
+ queryInfo: query45info,
+ currentTab: PAGECODE.appcode45,
+ pageCode: PAGECODE.pagecode45, //页面编码
+ templetid: this.templet45id
+ };
+ queryInfo.push(data23);
+ queryInfo.push(data45);
+ let multidata = {
+ queryInfo: queryInfo
+ };
+ ajax({
+ url: URL.searchall,
+ data: multidata,
+ success: (res) => {
+ clearTransferCache(_this.props, OrderCache.OrderTransferCache);
+ this.setState({ ntotalnum: 0 });
+ let { success, data } = res;
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ if (success) {
+ let content = null;
+ if (data) {
+ let destdatas = [];
+ let data23 = [];
+ let data45 = [];
+ for (let d of data) {
+ if (PAGECODE.pagecode23 == d.pageid) {
+ data23.push(d);
+ } else if (PAGECODE.pagecode45 == d.pageid) {
+ data45.push(d);
+ }
+ }
+ let m23extatt = {
+ cbilltypeid: { value: '23', display: getLangByResId(this, '4004POORDER-000089') }
+ }; /* 国际化处理: 退货单*/
+ let dest23datas = translateData(
+ data23,
+ PAGEAREA.head23,
+ PAGEAREA.body23,
+ PAGEAREA.headall,
+ PAGEAREA.bodyall,
+ KEYMAP.KEYMAP23TO21,
+ m23extatt
+ );
+ // 表头取表体的值,biao'ti
+ destdatas.push(...dest23datas);
+ let m45extatt = {
+ cbilltypeid: { value: '45', display: getLangByResId(this, '4004POORDER-000090') }
+ }; /* 国际化处理: 退库单*/
+ let dest45datas = translateData(
+ data45,
+ PAGEAREA.head45,
+ PAGEAREA.body45,
+ PAGEAREA.headall,
+ PAGEAREA.bodyall,
+ KEYMAP.KEYMAP45TO21,
+ m45extatt
+ );
+ destdatas.push(...dest45datas);
+ content = destdatas.length;
+ this.props.transferTable.setTransferTableValue(
+ PAGEAREA.headall,
+ PAGEAREA.bodyall,
+ destdatas,
+ [ PK.head23, PK.head45 ],
+ [ PK.body23, PK.body45 ]
+ );
+ }
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ // toast({color: 'success',content: getLangByResId(this, '4004POORDER-000006')});
+ /* 国际化处理: 查询成功!*/
+ // showSuccessInfo(getLangByResId(this, '4004POORDER-000006'));
+ }
+ }
+ });
+ }
+}
+
+/*982GKr9qtqabI67S6sEBTtUPkW5k5wLQk8qFvryEHo0=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/const/index.js b/src/pu/pu/poorder/transfer23_45/const/index.js
new file mode 100644
index 0000000..3172935
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/const/index.js
@@ -0,0 +1,183 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+const PAGECODE = {
+ pagecode23: '400401200_23to21',
+ pagecode45: '40080602_list_transfer',
+ pagecodeall: 'multi_list_transfer',
+ appcode23: '400401200',
+ appcode45: '400800800',
+ appcodeall: '400400800',
+ tree: 'tree'
+};
+const PAGEAREA = {
+ head23: 'po_arriveorder',
+ search23: '40040800_list_query',
+ body23: 'po_arriveorder_b',
+ oid23: '1002Z810000000008DV9',
+ head45: 'ic_purchasein_h',
+ search45: '40080602_list_query',
+ body45: 'ic_purchasein_b',
+ oid45: '1003Z810000000000ZHW',
+ headall: 'multi_arriveorder',
+ searchall: 'multi_list_query',
+ bodyall: 'multi_arriveorder_b',
+ VIEWALL: 'viewall',
+ VIEW45: 'view45',
+ VIEW23: 'view23'
+};
+const PK = {
+ head23: 'pk_arriveorder',
+ body23: 'pk_arriveorder_b',
+ head45: 'cgeneralhid',
+ body45: 'cgeneralbid'
+};
+const URL = {
+ search23: '/nccloud/pu/poorder/query23for21action.do', // 退货单
+ search45: '/nccloud/pu/poorder/query45for21action.do', //退库单
+ searchall: '/nccloud/pu/poorder/querymultifor21action.do' // 全部
+};
+
+const KEYMAP = {
+ KEYMAP23TO21: {
+ multi_arriveorder: {
+ pk_arriveorder: 'pk_arriveorder',
+ pk: 'pk_arriveorder', //主键
+ ts: 'ts', //时间
+ billtype: 'ctrantypeid', //单据类型
+ pk_org_v: 'pk_org_v', //库存组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //单据日期
+ pk_supplier: 'pk_supplier', //供应商
+ receiveman: 'pk_receivepsndoc', // 收货人
+ cemployeeid: 'pk_pupsndoc', // 采购员
+ pk_dept_v: 'pk_dept_v', // 采购部门
+ ntotalastnum: 'ntotalastnum', //总数量
+ breturn: 'vsupbackreason', //退货/库理由
+ vbmemo: 'vmemo' //备注
+ },
+ multi_arriveorder_b: {
+ crowno: 'crowno', // 行号
+ pk_arriveorder_b: 'pk_arriveorder_b',
+ pk_b: 'pk_arriveorder_b', // 表体主键
+ pk_material: 'pk_material', // 物料编码
+ 'pk_material.name': 'pk_material.name', // 物料名称
+ 'pk_material.materialspec': 'pk_material.materialspec', // 规格
+ 'pk_material.materialtype': 'pk_material.materialtype', // 型号
+ customer: 'casscustid', //客户
+ cprojectid: 'cprojectid', //项目
+ cqualitylevelid: 'cqualitylevelid', //质量等级
+ cproductorid: 'cproductorid', //生产厂商
+ vfree1: 'vfree1', //自由辅助属性1
+ vfree2: 'vfree2', //自由辅助属性2
+ vfree3: 'vfree3', //自由辅助属性3
+ vfree4: 'vfree4', //自由辅助属性4
+ vfree5: 'vfree5', //自由辅助属性5
+ vfree6: 'vfree6', //自由辅助属性6
+ vfree7: 'vfree7', //自由辅助属性7
+ vfree8: 'vfree8', //自由辅助属性8
+ vfree9: 'vfree9', //自由辅助属性9
+ vfree10: 'vfree10', //自由辅助属性10
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ vchangerate: 'vchangerate', //换算率
+ nplanastnum: 'nplanastnum', //应到数量
+ nplannum: 'nplannum', //应到主数量
+ nastnum: 'nastnum', //数量
+ nnum: 'nnum', //主数量
+ currencyid: 'corigcurrencyid', //币种
+ nexchangerate: 'nexchangerate', //折本汇率
+ ccurrencyid: 'ccurrencyid', //本位币
+ nqtorigprice: 'norigprice', //无税单价
+ nqtorigtaxprice: 'norigtaxprice', //含税单价
+ nqtorignetprice: '', //无税净价
+ nqtorigtaxnetprc: '', //含税净价
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ norignetprice: '', //主无税净价
+ norigtaxnetprice: '', //主含税净价
+ norigmny: 'norigmny', //无税金额
+ ntaxrate: 'ntaxrate', //税率
+ ntax: 'ntax', //税额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ctaxcodeid: '', //税码
+ ncanreplnum: 'ncanreplnum', //可补货主数量
+ vemo: 'vmemob', //备注
+ pk_order_b: 'pk_order_b', //采购订单明细
+ ts: 'ts'
+ }
+ },
+ KEYMAP45TO21: {
+ multi_arriveorder: {
+ pk: 'cgeneralhid', //主键
+ cgeneralhid: 'cgeneralhid',
+ ts: 'ts', //时间
+ billtype: 'ctrantypeid', //, //单据类型
+ pk_org_v: 'pk_org_v', //库存组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //单据日期
+ pk_supplier: 'cvendorid', //供应商
+ receiveman: 'ccustomerid', // 收货人
+ cemployeeid: 'cbizid', // 采购员
+ pk_dept_v: 'cdptvid', // 采购部门
+ ntotalastnum: 'ntotalnum', //总数量
+ breturn: 'vreturnreason', //退货/库理由
+ vbmemo: 'vnote' //备注
+ },
+ multi_arriveorder_b: {
+ crowno: 'crowno', // 行号
+ cgeneralbid: 'cgeneralbid',
+ pk_b: 'cgeneralbid', // 表体主键
+ pk_material: 'cmaterialvid', // 物料编码
+ 'pk_material.name': 'cmaterialvid.name', // 物料名称
+ 'pk_material.materialspec': 'cmaterialvid.materialspec', // 规格
+ 'pk_material.materialtype': 'cmaterialvid.materialtype', // 型号
+ customer: 'casscustid', //客户
+ cprojectid: 'cprojectid', //项目
+ cqualitylevelid: 'cqualitylevelid', //质量等级
+ cproductorid: 'cproductorid', //生产厂商
+ vfree1: 'vfree1', //自由辅助属性1
+ vfree2: 'vfree2', //自由辅助属性2
+ vfree3: 'vfree3', //自由辅助属性3
+ vfree4: 'vfree4', //自由辅助属性4
+ vfree5: 'vfree5', //自由辅助属性5
+ vfree6: 'vfree6', //自由辅助属性6
+ vfree7: 'vfree7', //自由辅助属性7
+ vfree8: 'vfree8', //自由辅助属性8
+ vfree9: 'vfree9', //自由辅助属性9
+ vfree10: 'vfree10', //自由辅助属性10
+ castunitid: 'castunitid', //单位
+ cunitid: 'cunitid', //主单位
+ vchangerate: 'vchangerate', //换算率
+ nplanastnum: 'nshouldassistnum', //应到数量
+ nplannum: 'nshouldnum', //应到主数量
+ nastnum: 'nassistnum', //数量
+ nnum: 'nnum', //主数量
+ currencyid: 'corigcurrencyid', //币种
+ nexchangerate: 'nchangestdrate', //折本汇率
+ ccurrencyid: 'ccurrencyid', //本位币
+ nqtorigprice: 'nqtorigprice', //无税单价
+ nqtorigtaxprice: 'nqtorigtaxprice', //含税单价
+ nqtorignetprice: 'nqtorignetprice', //无税净价
+ nqtorigtaxnetprc: 'nqtorigtaxnetprice', //含税净价
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ norignetprice: 'norignetprice', //主无税净价
+ norigtaxnetprice: 'norigtaxnetprice', //主含税净价
+ norigmny: 'norigmny', //无税金额
+ ntaxrate: 'ntaxrate', //税率
+ ntax: 'ntaxrate', //税额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ctaxcodeid: 'ctaxcodeid', //税码
+ // num: 'ncanreplnum', //可补货主数量
+ ncanreplnum: 'ncanreplnum', //可补货主数量
+ vemo: 'vnotebody', //备注
+ pk_order_b: '', //采购订单明细
+ ts: 'ts'
+ }
+ }
+};
+
+export { PAGECODE, PAGEAREA, PK, URL, KEYMAP };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/index.js b/src/pu/pu/poorder/transfer23_45/index.js
new file mode 100644
index 0000000..e0dc0df
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/index.js
@@ -0,0 +1,442 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单多来源拉单
+ * @Date: 2018-06-29 14:09:08
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-11 23:11:38
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { createPage, base, createPageIcon } from 'nc-lightapp-front';
+const { NCButton, NCDiv } = base;
+import { PAGEAREA, PK } from './const';
+import { URL, OrderCache, PAGECODE } from '../constance';
+import getNumber from './utils/getNumber';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn } = base;
+import { init23Template, init45Template, initAllTemplate } from './init';
+import { serach23_btnClick, serach45_btnClick, serachAll_btnClick, selected_BtnClick } from './btnClicks';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class MultiTransferTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(PAGEAREA.searchall);
+ props.use.search(PAGEAREA.search23);
+ props.use.search(PAGEAREA.search45);
+ this.curheadTableId = PK.head23; //当前页签的主表id
+ this.state = {
+ ntotalnum: 0,
+ scene: '', //应用场景
+ showHeader: true,
+ toggleViewStatus: false
+ };
+ this.srcappcode = null;
+ this.tableId = PAGEAREA.headall;
+ this.fullTableId = PAGEAREA.VIEWALL;
+ this.templet23id = '';
+ this.templet45id = '';
+ this.templetallid = '';
+ this.oid23 = '';
+ this.oid45 = '';
+ // initAllTemplate.call(this, this.props);
+ initLang(this, [ '4004poorder' ], 'pu', initAllTemplate.bind(this, this.props));
+ }
+
+ componentDidMount() {
+ // initAllTemplate(this.props); //进页面后必须加载全部页签模板,不然点已选列表没有反应
+ }
+
+ onAllAfterEvent(props, field, val) {
+ if (field == 'pk_purchaseorg') {
+ multiCorpRefHandler(props, val, PAGEAREA.searchall, [
+ 'pk_supplier',
+ 'pk_pupsndoc',
+ 'pk_dept',
+ 'pk_arriveorder_b.pk_srcmaterial',
+ 'pk_arriveorder_b.pk_srcmaterial.code',
+ 'pk_arriveorder_b.pk_srcmaterial.name',
+ 'pk_arriveorder_b.pk_srcmaterial.pk_marbasclass',
+ 'billmaker',
+ 'approver'
+ ]);
+ }
+ }
+
+ on23AfterEvent(props, field, val) {
+ if (field == 'pk_purchaseorg') {
+ multiCorpRefHandler(props, val, PAGEAREA.search23, [
+ 'pk_supplier',
+ 'pk_pupsndoc',
+ 'pk_dept',
+ 'billmaker',
+ 'approver',
+ 'pk_arriveorder_b.pk_srcmaterial',
+ 'pk_arriveorder_b.pk_srcmaterial.code',
+ 'pk_arriveorder_b.pk_srcmaterial.name',
+ 'pk_arriveorder_b.pk_srcmaterial.pk_marbasclass'
+ ]);
+ }
+ }
+
+ on45AfterEvent(props, field, val) {
+ if (field == 'cpurorgoid') {
+ multiCorpRefHandler(props, val, PAGEAREA.search45, [
+ 'cbizid',
+ 'cdptid',
+ 'billmaker',
+ 'approver',
+ 'cgeneralbid.cmaterialoid',
+ 'cgeneralbid.cmaterialoid.code',
+ 'cgeneralbid.cmaterialoid.name',
+ 'cgeneralbid.cmaterialoid.pk_marbasclass',
+ 'cgeneralbid.cvendorid'
+ ]);
+ }
+ }
+
+ renderAllCompleteEvent = () => {
+ let pk_purchaseorg = this.props.search.getSearchValByField(PAGEAREA.searchall, 'pk_purchaseorg');
+ if (pk_purchaseorg && pk_purchaseorg.value && pk_purchaseorg.value.firstvalue) {
+ let value = pk_purchaseorg.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAllAfterEvent(this.props, 'pk_purchaseorg', arr);
+ }
+ };
+
+ render23CompleteEvent = () => {
+ let pk_purchaseorg = this.props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ if (pk_purchaseorg && pk_purchaseorg.value && pk_purchaseorg.value.firstvalue) {
+ let value = pk_purchaseorg.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.on23AfterEvent(this.props, 'pk_purchaseorg', arr);
+ }
+ };
+
+ render45CompleteEvent = () => {
+ let cpurorgoid = this.props.search.getSearchValByField(PAGEAREA.search45, 'cpurorgoid');
+ if (cpurorgoid && cpurorgoid.value && cpurorgoid.value.firstvalue) {
+ let value = cpurorgoid.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.on45AfterEvent(this.props, 'cpurorgoid', arr);
+ }
+ };
+
+ // 计算合计 num
+ calTotal = (flag, record, bodys, numkey) => {
+ let ntotalnum = this.state.ntotalnum;
+ if (flag == true) {
+ if (bodys && bodys.length > 0) {
+ for (let line of bodys) {
+ ntotalnum += getNumber(line[numkey]);
+ }
+ } else {
+ ntotalnum += getNumber(record[numkey]);
+ }
+ } else {
+ if (bodys && bodys.length > 0) {
+ for (let line of bodys) {
+ ntotalnum -= getNumber(line[numkey]);
+ }
+ } else {
+ ntotalnum -= getNumber(record[numkey]);
+ }
+ }
+ this.setState({
+ ntotalnum: ntotalnum
+ });
+ };
+
+ // 刷新查询
+ searchBtnClick = () => {
+ let tableId = this.tableId;
+ if (tableId == PAGEAREA.headall) {
+ serachAll_btnClick.call(this, this.props, true);
+ } else if (tableId == PAGEAREA.head23) {
+ serach23_btnClick.call(this, this.props, true);
+ } else {
+ serach45_btnClick.call(this, this.props, true);
+ }
+ };
+
+ handleClick() {}
+
+ render() {
+ const { transferTable, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createMultiTransferTable } = transferTable;
+ const { NCButton } = base;
+ // let totalstr = `${getLangByResId(this, '4004POORDER-000087')}:${this.state.ntotalnum}`; /* 国际化处理: 本次订货主数量*/
+ let totalTitle = `${getLangByResId(this, '4004POORDER-000087')}`; /* 国际化处理: 本次订货主数量*/
+ let selectedShow = transferTable.getSelectedListDisplay('all');
+ let scene = this.props.getUrlParam('scene');
+ let _this = this;
+ return (
+
+ {/* // TODO 样式调整 */}
+ {!selectedShow && (
+
+
+ {scene != 'Y' ? (
+ {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ }}
+ />
+ ) : (
+ ''
+ )}
+
+ {createPageIcon()}
+
+ {getLangByResId(this, '4004POORDER-000091')}/
+ {getLangByResId(this, '4004POORDER-000090')}
+
+ {/* 国际化处理: 选择退货单,退库单*/}
+
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: PAGEAREA.headall,
+ onButtonClick: this.searchBtnClick
+ })}
+
+ {/* */}
+ {
+ if (
+ _this.fullTableId == PAGEAREA.VIEWALL &&
+ !_this.props.meta.getMeta()[PAGEAREA.VIEWALL]
+ ) {
+ initAllTemplate.call(_this); //加载主子拉平模板
+ }
+ if (
+ _this.fullTableId == PAGEAREA.VIEW23 &&
+ !_this.props.meta.getMeta()[PAGEAREA.VIEW23]
+ ) {
+ init23Template.call(_this); //加载主子拉平模板
+ }
+ if (
+ _this.fullTableId == PAGEAREA.VIEW45 &&
+ !_this.props.meta.getMeta()[PAGEAREA.VIEW45]
+ ) {
+ init45Template.call(_this); //加载主子拉平模板
+ }
+ _this.props.transferTable.changeViewType(this.fullTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ )}
+
+ {/* 创建多来源转单 */}
+ {createMultiTransferTable(
+ {
+ totalKey: [ [ 'ncanreplnum' ] ],
+ totalTitle: [ totalTitle ],
+ onTabClick: (key) => {
+ //点击页签的钩子函数
+ //拿到当前页签的headTableId给转单页面使用
+ switch (key) {
+ case '1':
+ this.tableId = PAGEAREA.head23;
+ this.fullTableId = PAGEAREA.VIEW23;
+ this.curheadTableId = PAGEAREA.head23; //记录主表id,供下游转单使用
+ if (!this.props.meta.getMeta()[PAGEAREA.head23]) {
+ init23Template.call(this, this.props);
+ }
+ break;
+ case '2':
+ this.tableId = PAGEAREA.head45;
+ this.fullTableId = PAGEAREA.VIEW45;
+ this.curheadTableId = PAGEAREA.head45; //记录主表id,供下游转单使用
+ if (!this.props.meta.getMeta()[PAGEAREA.head45]) {
+ init45Template.call(this, this.props);
+ }
+ break;
+ default:
+ this.tableId = PAGEAREA.headall;
+ this.fullTableId = PAGEAREA.VIEWALL;
+ this.curheadTableId = PAGEAREA.headall;
+ if (!this.props.meta.getMeta()[PAGEAREA.headall]) {
+ initAllTemplate.call(this, this.props);
+ }
+ break;
+ }
+ },
+ dataSource: OrderCache.OrderTransferCache,
+ showAll: true, //是否显示全部页签,不显示全部页签时不需要设置 默认为false
+ //==========以下参数必须设置showAll为true时才生效==========
+ allHeadId: PAGEAREA.headall, //全部页签的主表id
+ allBodyId: PAGEAREA.bodyall, //全部页签的子表id
+ allFullTableId: this.fullTableId, //主子拉平模板id
+ transferBtnText: getLangByResId(this, '4004POORDER-000086'), //转单按钮显示文字/* 国际化处理: 生成采购订单*/
+ containerSelector: '#MultiTransfer', //容器的选择器 必须唯一,用于设置底部已选区域宽度
+ headPkIds: [ PK.head23, PK.head45 ],
+ bodyPkIds: [ PK.body23, PK.body45 ],
+ onTransferBtnClick: () => {
+ //点击转单按钮钩子函数
+ if (scene) {
+ this.props.pushTo(URL.gotoCard, {
+ appcode: '400400800',
+ srcappcode: this.srcappcode,
+ status: 'edit',
+ scene: scene,
+ transfer: 'MULTI',
+ pagecode: PAGECODE.cardcode
+ });
+ } else {
+ this.props.pushTo(URL.gotoCard, {
+ status: 'edit',
+ scene: scene,
+ transfer: 'MULTI',
+ pagecode: PAGECODE.cardcode
+ });
+ }
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (
+ _this.fullTableId == PAGEAREA.VIEWALL &&
+ !_this.props.meta.getMeta()[PAGEAREA.VIEWALL]
+ ) {
+ initAllTemplate.call(_this); //加载主子拉平模板
+ }
+ if (
+ _this.fullTableId == PAGEAREA.VIEW23 &&
+ !_this.props.meta.getMeta()[PAGEAREA.VIEW23]
+ ) {
+ init23Template.call(_this); //加载主子拉平模板
+ }
+ if (
+ _this.fullTableId == PAGEAREA.VIEW45 &&
+ !_this.props.meta.getMeta()[PAGEAREA.VIEW45]
+ ) {
+ init45Template.call(_this); //加载主子拉平模板
+ }
+ _this.props.transferTable.changeViewType(_this.fullTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ // onSelectedBtnClick: selected_BtnClick.bind(this),
+ // selectArea: () => {
+ // //已选列表个性化区域
+ // return {totalstr};
+ // },
+ // onClearAll: () => {
+ // this.setState({
+ // ntotalnum: 0
+ // });
+ // },
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys);
+ // },
+ // onSelectedItemRemove: (record, bodys) => {
+ // // 计算下方合计
+ // this.calTotal(false, record, bodys, 'ncanreplnum');
+ // }
+ },
+ [
+ {
+ tabName: getLangByResId(this, '4004POORDER-000076'), //tab页签显示文字/* 国际化处理: 全部*/
+ headTableId: PAGEAREA.headall, //表格组件id
+ bodyTableId: PAGEAREA.bodyall, //子表模板id
+ fullTableId: PAGEAREA.VIEWALL, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(PAGEAREA.searchall, {
+ clickSearchBtn: serachAll_btnClick.bind(this),
+ onAfterEvent: this.onAllAfterEvent.bind(this, this.props),
+ renderCompleteEvent: this.renderAllCompleteEvent,
+ statusChangeEvent: this.renderAllCompleteEvent,
+ currentSearch: this.tableId == PAGEAREA.headall,
+ fieldid: PAGEAREA.searchall
+ });
+ }
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys, 'ncanreplnum');
+ // },
+ // onClearAll: () => {
+ // this.setState({
+ // ntotalnum: 0
+ // });
+ // }
+ },
+ {
+ tabName: getLangByResId(this, '4004POORDER-000089'), //tab页签显示文字/* 国际化处理: 退货单*/
+ headTableId: PAGEAREA.head23, //表格组件id
+ bodyTableId: PAGEAREA.body23, //子表模板id
+ fullTableId: PAGEAREA.VIEW23, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(PAGEAREA.search23, {
+ clickSearchBtn: serach23_btnClick.bind(this),
+ onAfterEvent: this.on23AfterEvent.bind(this, this.props),
+ renderCompleteEvent: this.render23CompleteEvent,
+ statusChangeEvent: this.render23CompleteEvent,
+ currentSearch: this.tableId == PAGEAREA.head23,
+ fieldid: PAGEAREA.search23
+ });
+ }
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys, 'ncanreplnum');
+ // },
+ // onClearAll: () => {
+ // this.setState({
+ // ntotalnum: 0
+ // });
+ // }
+ },
+ {
+ tabName: getLangByResId(this, '4004POORDER-000090'), //tab页签显示文字/* 国际化处理: 退库单*/
+ headTableId: PAGEAREA.head45, //表格组件id
+ bodyTableId: PAGEAREA.body45, //子表模板id
+ fullTableId: PAGEAREA.VIEW45, //主子拉平模板id
+ searchArea: () => {
+ //查询区域render
+ return NCCreateSearch(PAGEAREA.search45, {
+ clickSearchBtn: serach45_btnClick.bind(this),
+ onAfterEvent: this.on45AfterEvent.bind(this, this.props),
+ renderCompleteEvent: this.render45CompleteEvent,
+ statusChangeEvent: this.render45CompleteEvent,
+ currentSearch: this.tableId == PAGEAREA.head45,
+ fieldid: PAGEAREA.search45
+ });
+ }
+ // onCheckedChange: (flag, record, index, bodys) => {
+ // // 计算下方合计
+ // this.calTotal(flag, record, bodys, 'ncanreplnum');
+ // },
+ // onClearAll: () => {
+ // this.setState({
+ // ntotalnum: 0
+ // });
+ // }
+ }
+ ]
+ )}
+
+
+ );
+ }
+}
+MultiTransferTable = createPage({})(MultiTransferTable);
+export default MultiTransferTable;
+// ReactDOM.render(, document.querySelector('#app'));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/init/index.js b/src/pu/pu/poorder/transfer23_45/init/index.js
new file mode 100644
index 0000000..2c81455
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/init/index.js
@@ -0,0 +1,8 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import init23Template from './init23Template';
+import init45Template from './init45Template';
+import initAllTemplate from './initAllTemplate';
+
+export { init23Template, init45Template, initAllTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/init/init23Template.js b/src/pu/pu/poorder/transfer23_45/init/init23Template.js
new file mode 100644
index 0000000..f67c8c6
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/init/init23Template.js
@@ -0,0 +1,113 @@
+/*/r26lV6jDz/Z/4p1bXrqa0zCRWrlTPgDk+WhundHW54=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 初始化到货订单模板
+ * @Date: 2018-06-13 14:17:31
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-08-22 11:21:41
+ */
+import { PAGECODE, PAGEAREA } from '../const';
+import { TRANSFERMULTI } from '../../constance/index';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.pagecode23,
+ appcode: PAGECODE.appcode23,
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modify.call(_this, _this.props, meta);
+ _this.templet23id = data.template.pageid;
+ _this.oid23 = data.template[PAGEAREA.search23].oid;
+ _this.props.meta.addMeta(meta);
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: 'refresh',
+ area: PAGEAREA.headall,
+ order: '1',
+ children: [],
+ },
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+function modify(props, meta) {
+ meta[PAGEAREA.search23].items.map((item, index) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ if (item.attrcode == 'cunitid') {
+ let outIndex23 = index;
+ }
+ if (item.attrcode == 'pk_purchaseorg') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ }
+ if (item.attrcode != 'pk_org' && item.attrcode != 'pk_purchaseorg') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ } else if (item.attrcode == 'pk_pupsndoc') {
+ // 采购员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(PAGEAREA.search23, 'pk_dept');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ }
+ });
+ // 拉单的超链接
+ meta[PAGEAREA.head23] &&
+ meta[PAGEAREA.head23].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFERMULTI.billtype23,
+ billcodefield: TRANSFERMULTI.vbillcode,
+ pkfield: TRANSFERMULTI.pk_arriveorder,
+ });
+ });
+ meta[PAGEAREA.VIEW23] &&
+ meta[PAGEAREA.VIEW23].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFERMULTI.billtype23,
+ billcodefield: TRANSFERMULTI.vbillcode,
+ pkfield: TRANSFERMULTI.pk_arriveorder,
+ });
+ });
+ return meta;
+}
+
+/*/r26lV6jDz/Z/4p1bXrqa0zCRWrlTPgDk+WhundHW54=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/init/init45Template.js b/src/pu/pu/poorder/transfer23_45/init/init45Template.js
new file mode 100644
index 0000000..369ecc4
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/init/init45Template.js
@@ -0,0 +1,190 @@
+/*y1GQGyMdTR2Xlu2VzPXPy6CQx9pfZLi5Cw201dXk1yw=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 初始化入库订单模板
+ * @Date: 2018-06-13 14:17:31
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-08-22 11:22:14
+ */
+import { PAGECODE, PAGEAREA } from '../const';
+import { TRANSFERMULTI } from '../../constance/index';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import {batchSetHyperlinkForTableFields} from "../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil";
+
+export default function() {
+ let _this = this;
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.pagecode45,
+ appcode: PAGECODE.appcode45,
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modify.call(_this, _this.props, meta);
+ _this.templet45id = data.template.pageid;
+ _this.oid45 = data.template[PAGEAREA.search45].oid;
+ _this.props.meta.addMeta(meta);
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: 'refresh',
+ area: PAGEAREA.headall,
+ order: '1',
+ children: [],
+ },
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+function modify(props, meta) {
+ let ic_purchasein_hlinkmap = new Map([
+ [
+ 'vbillcode', {
+ billtype: TRANSFERMULTI.billtype45,
+ pkField: 'cgeneralhid'
+ }
+ ]
+ ]);
+ let ic_purchasein_hlinkConfig = {
+ moduleId: PAGEAREA.head45,
+ linkmap: ic_purchasein_hlinkmap
+ }
+ batchSetHyperlinkForTableFields.call(this, props, meta, ic_purchasein_hlinkConfig);
+ let ic_purchasein_blinkmap = new Map([
+ [
+ 'vexigencycode', {
+ billtype: 'C005',
+ pkField: 'vexigencyhid'
+ }
+ ],
+ [
+ 'ccorrespondcode', {
+ billtypeField: 'ccorrespondtype',
+ pkField: 'ccorrespondhid'
+ }
+ ],
+ [
+ 'vsourcebillcode', {
+ billtypeField: 'csourcetype',
+ pkField: 'csourcebillhid'
+ }
+ ],
+ [
+ 'vfirstbillcode', {
+ billtypeField: 'cfirsttype',
+ pkField: 'cfirstbillhid'
+ }
+ ],
+ [
+ 'vsrc2billcode', {
+ billtypeField: 'csrc2billtype',
+ pkField: 'csrc2billhid'
+ }
+ ]
+ ]);
+ let ic_purchasein_blinkConfig = {
+ moduleId: PAGEAREA.body45,
+ linkmap: ic_purchasein_blinkmap
+ }
+ batchSetHyperlinkForTableFields.call(this, props, meta, ic_purchasein_blinkConfig);
+ let view45linkmap = new Map([
+ [
+ 'vbillcode', {
+ billtype: TRANSFERMULTI.billtype45,
+ pkField: 'cgeneralhid'
+ }
+ ],
+ [
+ 'vexigencycode', {
+ billtype: 'C005',
+ pkField: 'vexigencyhid'
+ }
+ ],
+ [
+ 'ccorrespondcode', {
+ billtypeField: 'ccorrespondtype',
+ pkField: 'ccorrespondhid'
+ }
+ ],
+ [
+ 'vsourcebillcode', {
+ billtypeField: 'csourcetype',
+ pkField: 'csourcebillhid'
+ }
+ ],
+ [
+ 'vfirstbillcode', {
+ billtypeField: 'cfirsttype',
+ pkField: 'cfirstbillhid'
+ }
+ ],
+ [
+ 'vsrc2billcode', {
+ billtypeField: 'csrc2billtype',
+ pkField: 'csrc2billhid'
+ }
+ ]
+ ]);
+ let view45linkConfig = {
+ moduleId: PAGEAREA.VIEW45,
+ linkmap: view45linkmap
+ }
+ batchSetHyperlinkForTableFields.call(this, props, meta, view45linkConfig);
+
+ meta[PAGEAREA.search45].items.map((item, index) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ if (item.attrcode == 'cunitid') {
+ let outIndex45 = index;
+ }
+ if (item.attrcode == 'cpurorgoid') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ }
+ if (item.attrcode != 'pk_org' && item.attrcode != 'cpurorgoid') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGEAREA.search45, 'cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ } else if (item.attrcode == 'cbizid') {
+ // 采购员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGEAREA.search23, 'cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(PAGEAREA.search23, 'cdptid');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'cdptid') {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(PAGEAREA.search23, 'cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ }
+ });
+ return meta;
+}
+
+/*y1GQGyMdTR2Xlu2VzPXPy6CQx9pfZLi5Cw201dXk1yw=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/init/initAllTemplate.js b/src/pu/pu/poorder/transfer23_45/init/initAllTemplate.js
new file mode 100644
index 0000000..1b1c4ff
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/init/initAllTemplate.js
@@ -0,0 +1,294 @@
+/*sNCPoGBR/r2IMB3zBzxxVCTMop6JH/Hz0VZBH33qxys=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 初始化全部模板
+ * @Date: 2018-06-13 14:17:31
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-04-26 10:28:20
+ */
+import { PAGECODE, PAGEAREA } from '../const';
+import { TRANSFERMULTI } from '../../constance/index';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ this.props.createUIDom(
+ {
+ pagecode: PAGECODE.pagecodeall,
+ appcode: PAGECODE.appcodeall,
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let appcode = _this.props.getSearchParam('c');
+ _this.srcappcode = appcode;
+ let meta = data.template;
+ modify.call(_this, meta);
+ _this.templetallid = data.template.pageid;
+ _this.props.meta.addMeta(meta);
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: 'refresh',
+ area: PAGEAREA.headall,
+ order: '1',
+ children: [],
+ },
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+
+ // ajax({
+ // url: '/nccloud/platform/pub/mergerequest.do',
+ // data: [
+ // {
+ // rqUrl: '/platform/templet/querypage.do', //list
+ // rqJson: `{ pagecode:${PAGECODE.pagecodeall},appcode:${PAGECODE.appcodeall}}`,
+ // rqCode: 'all'
+ // }
+ // // {
+ // // rqUrl: '/platform/templet/querypage.do', //23
+ // // rqJson: `{ pagecode:${PAGECODE.pagecode23} , appcode: ${PAGECODE.appcode23}}`,
+ // // rqCode: 'arrive'
+ // // },
+ // // {
+ // // rqUrl: '/platform/templet/querypage.do', //45
+ // // rqJson: `{ pagecode:${PAGECODE.pagecode45} , appcode: ${PAGECODE.appcode45}}`,
+ // // rqCode: 'purchasein'
+ // // }
+ // ],
+ // success: (res) => {
+ // if (res && res.success) {
+ // // this.templet23id = res.data.arrive.pageid;
+ // // this.templet45id = res.data.purchasein.pageid;
+ // // this.oid23 = res.data.arrive[PAGEAREA.search23].oid;
+ // // this.oid45 = res.data.purchasein[PAGEAREA.search45].oid;
+ // let nmeta = res.data;
+ // let scene = this.props.getUrlParam('scene');
+ // this.setState({ scene: scene });
+ // nmeta = modify.call(this, nmeta); // 这个顺序
+ // meta.setMeta(nmeta.all);
+ // meta.addMeta(nmeta.arrive);
+ // meta.addMeta(nmeta.purchasein);
+ // let button = [
+ // {
+ // id: 'Refresh_id',
+ // type: 'button_secondary',
+ // key: 'refresh',
+ // area: PAGEAREA.headall,
+ // order: '1',
+ // children: []
+ // }
+ // ];
+ // _this.props.button.setButtons(button);
+ // }
+ // }
+ // });
+}
+
+function modify(meta) {
+ let _this = this;
+ meta[PAGEAREA.searchall] &&
+ meta[PAGEAREA.searchall].items.map((item, index) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ if (item.attrcode != 'pk_org' && item.attrcode != 'pk_purchaseorg') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.searchall, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+ if (item.attrcode == 'pk_purchaseorg') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode == 'pk_pupsndoc') {
+ // 采购员
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.searchall, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = _this.props.search.getSearchValByField(PAGEAREA.searchall, 'pk_dept');
+ pk_dept =
+ pk_dept != null
+ ? pk_dept.value.firstvalue.includes(',')
+ ? null
+ : pk_dept.value.firstvalue
+ : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ // 部门
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.searchall, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'cunitid') {
+ let outIndexall = index;
+ }
+ });
+ meta.arrive &&
+ meta.arrive[PAGEAREA.search23].items.map((item, index) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ if (item.attrcode == 'cunitid') {
+ let outIndex23 = index;
+ }
+ if (item.attrcode == 'pk_purchaseorg') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ }
+ if (item.attrcode != 'pk_org' && item.attrcode != 'pk_purchaseorg') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ } else if (item.attrcode == 'pk_pupsndoc') {
+ // 采购员
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = _this.props.search.getSearchValByField(PAGEAREA.search23, 'pk_dept');
+ pk_dept =
+ pk_dept != null
+ ? pk_dept.value.firstvalue.includes(',')
+ ? null
+ : pk_dept.value.firstvalue
+ : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'pk_dept') {
+ // 部门
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.search23, 'pk_purchaseorg');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ }
+ });
+ meta.purchasein &&
+ meta.purchasein[PAGEAREA.search45].items.map((item, index) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ if (item.attrcode == 'cunitid') {
+ let outIndex45 = index;
+ }
+ if (item.attrcode == 'cpurorgoid') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ }
+ if (item.attrcode != 'pk_org' && item.attrcode != 'cpurorgoid') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.search45, 'cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ } else if (item.attrcode == 'cbizid') {
+ // 采购员
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.search23, 'cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = _this.props.search.getSearchValByField(PAGEAREA.search23, 'cdptid');
+ pk_dept =
+ pk_dept != null
+ ? pk_dept.value.firstvalue.includes(',')
+ ? null
+ : pk_dept.value.firstvalue
+ : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'cdptid') {
+ // 部门
+ item.queryCondition = () => {
+ let data = _this.props.search.getSearchValByField(PAGEAREA.search23, 'cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ }
+ });
+ // 超链接
+ meta[PAGEAREA.headall] &&
+ meta[PAGEAREA.headall].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(
+ _this,
+ _this.props,
+ item,
+ {
+ billtypefield: 'cbilltypeid',
+ billcodefield: 'vbillcode',
+ },
+ true
+ );
+ });
+ meta[PAGEAREA.VIEWALL] &&
+ meta[PAGEAREA.VIEWALL].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(
+ _this,
+ _this.props,
+ item,
+ {
+ billtypefield: 'cbilltypeid',
+ billcodefield: 'vbillcode',
+ },
+ true
+ );
+ });
+ meta.arrive &&
+ meta.arrive[PAGEAREA.head23].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(_this, _this.props, item, {
+ billtype: TRANSFERMULTI.billtype23,
+ billcodefield: TRANSFERMULTI.vbillcode,
+ pkfield: TRANSFERMULTI.pk_arriveorder,
+ });
+ });
+ meta.purchasein &&
+ meta.purchasein[PAGEAREA.head45].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(_this, _this.props, item, {
+ billtype: TRANSFERMULTI.billtype45,
+ billcodefield: TRANSFERMULTI.vbillcode,
+ pkfield: TRANSFERMULTI.cgeneralhid,
+ });
+ });
+ return meta;
+}
+
+/*sNCPoGBR/r2IMB3zBzxxVCTMop6JH/Hz0VZBH33qxys=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/utils/getNumber.js b/src/pu/pu/poorder/transfer23_45/utils/getNumber.js
new file mode 100644
index 0000000..3e1e485
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/utils/getNumber.js
@@ -0,0 +1,10 @@
+/*vKU0t1Ld65IZrR7OBpmi2ke1RTtsUoZCwAXsliRkJFM=*/
+export default function(data) {
+ if (data) {
+ return +data.value;
+ } else {
+ return 0;
+ }
+}
+
+/*vKU0t1Ld65IZrR7OBpmi2ke1RTtsUoZCwAXsliRkJFM=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer23_45/utils/translateData.js b/src/pu/pu/poorder/transfer23_45/utils/translateData.js
new file mode 100644
index 0000000..4df8f9f
--- /dev/null
+++ b/src/pu/pu/poorder/transfer23_45/utils/translateData.js
@@ -0,0 +1,41 @@
+/*nCFzbA2KIKM3FmjcFQABRv9p6ksVRO1qb9Mzm4TyDQ4=*/
+export default function(datas, srchead, srcbody, head, body, itemmap, extatt) {
+ let destdatas = [];
+ for (let data of datas) {
+ let destdata = {};
+ // 转换表头
+ let headrows = data.head[srchead].rows;
+ let headmap = itemmap[head];
+ let destHeadData = translate(head, headrows, headmap, extatt);
+ destdata.head = destHeadData;
+ // 转换表体
+ let bodyrows = data.body[srcbody].rows;
+ let bodydmap = itemmap[body];
+ let destBodyData = translate(body, bodyrows, bodydmap);
+ destdata.body = destBodyData;
+ destdatas.push(destdata);
+ }
+ return destdatas;
+}
+export function translate(tab, tabrows, tabmap, extatt) {
+ let rows = [];
+ for (let row of tabrows) {
+ let values = {};
+ for (let destkey of Object.keys(tabmap)) {
+ let srcValue = row.values[tabmap[destkey]];
+ values[destkey] = srcValue;
+ }
+ if (extatt) {
+ for (let extkey of Object.keys(extatt)) {
+ values[extkey] = extatt[extkey];
+ }
+ }
+ rows.push({ values: values });
+ }
+ let desttabdata = {
+ [tab]: { rows: rows }
+ };
+ return desttabdata;
+}
+
+/*nCFzbA2KIKM3FmjcFQABRv9p6ksVRO1qb9Mzm4TyDQ4=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30coop/btnClick/buttonClick.js b/src/pu/pu/poorder/transfer30coop/btnClick/buttonClick.js
new file mode 100644
index 0000000..b782eec
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30coop/btnClick/buttonClick.js
@@ -0,0 +1,22 @@
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 协同销售生成采购订单按钮事件
+ * @Date: 2018-06-19 11:40:09
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:55:23
+ */
+import { TRANSFER30TO21COOP } from '../../constance';
+import { searchBtnClick } from './index.js';
+
+export default function(props, key, text, record, index) {
+ switch (key) {
+ case TRANSFER30TO21COOP.Refresh: // 刷新
+ searchBtnClick.call(this, this.props, true);
+ break;
+ default:
+ break;
+ }
+}
+
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30coop/btnClick/index.js b/src/pu/pu/poorder/transfer30coop/btnClick/index.js
new file mode 100644
index 0000000..4938b42
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30coop/btnClick/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+import buttonClick from './buttonClick';
+
+export { searchBtnClick, buttonClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30coop/btnClick/searchBtnClick.js b/src/pu/pu/poorder/transfer30coop/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..f52fa83
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30coop/btnClick/searchBtnClick.js
@@ -0,0 +1,62 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉协同销售单查询
+ * @Date: 2018-06-13 14:13:15
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:55:19
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFER30TO21COOP, PAGECODE, OrderCache } from '../../constance';
+import { clearTransferCache, setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+//点击查询,获取查询区数据
+export default function(props, isRefresh) {
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(TRANSFER30TO21COOP.SEARCHID);
+ if (queryInfo.querycondition) {
+ let org = queryInfo.querycondition.conditions[0] && queryInfo.querycondition.conditions[0].value.firstvalue;
+ setDefData.call(this, OrderCache.OrderCacheKey, 'coop', {
+ org: org
+ });
+ let transtype = getDefData(OrderCache.OrderCardCache, 'transtype');
+ let data = {
+ templetid: this.state.templetid,
+ queryInfo: queryInfo,
+ pageCode: TRANSFER30TO21COOP.PAGEID, //页面编码
+ userobj: { billtype_qs_key: transtype }
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: TRANSFER30TO21COOP.GETQUERYDATA,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ let backdata = [];
+ let content = null; // getLangByResId(this, '4004POORDER-000085'); /* 国际化处理: 查询结果为空!*/
+ if (res.data) {
+ clearTransferCache(_this.props, OrderCache.OrderTransferCache);
+ backdata = res.data;
+ content = backdata.length; // getLangByResId(this, '4004POORDER-000006'); /* 国际化处理: 查询成功!*/
+ }
+ _this.props.transferTable.setTransferTableValue(
+ TRANSFER30TO21COOP.LIST_TABLE,
+ TRANSFER30TO21COOP.LIST_TABLE_CHILD,
+ backdata,
+ 'csaleorderid',
+ 'csaleorderbid'
+ );
+ // toast({ color: 'success', content: content });
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ }
+ });
+ }
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30coop/index.js b/src/pu/pu/poorder/transfer30coop/index.js
new file mode 100644
index 0000000..eb76733
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30coop/index.js
@@ -0,0 +1,189 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 协同销售生成采购订单
+ * @Date: 2018-06-13 14:14:03
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-11 23:10:36
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax, createPageIcon } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick, buttonClick } from './btnClick';
+import { TRANSFER30TO21COOP, URL, OrderCache, PAGECODE } from '../constance';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+import { getDefData } from '../../../../scmpub/scmpub/pub/cache';
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class Transfer30CoopTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(TRANSFER30TO21COOP.SEARCHID);
+ this.state = {
+ templetid: null, //模板ID
+ toggleViewStatus: false
+ };
+ this.srcappcode = null;
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER30TO21COOP.LIST_TABLE,
+ TRANSFER30TO21COOP.LIST_TABLE_CHILD,
+ [],
+ 'csaleorderid',
+ 'csaleorderbid'
+ );
+ }
+
+ getorg = () => {
+ let org = getDefData.call(this, OrderCache.OrderCacheKey, 'coop');
+ if (org == null || org.org == null) {
+ return null;
+ } else {
+ return org.org;
+ }
+ };
+
+ onAfterEvent(props, field, val) {
+ if (field == 'pk_org') {
+ multiCorpRefHandler(props, val, TRANSFER30TO21COOP.SEARCHID, [
+ 'ccustomerid',
+ 'cemployeeid',
+ 'cdeptid',
+ 'billmaker',
+ 'approver',
+ 'so_saleorder_b.csettleorgid',
+ 'so_saleorder_b.cmaterialid',
+ 'so_saleorder_b.cmaterialid.code',
+ 'so_saleorder_b.cmaterialid.name',
+ 'so_saleorder_b.cmaterialid.pk_marbasclass'
+ ]);
+ }
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(TRANSFER30TO21COOP.SEARCHID, 'pk_org');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent(this.props, 'pk_org', arr);
+ }
+ };
+
+ handleClick() {}
+
+ render() {
+ const { transferTable, button, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createTransferTable } = transferTable;
+ let scene = this.props.getUrlParam('scene');
+ let selectedShow = transferTable.getSelectedListDisplay(TRANSFER30TO21COOP.LIST_TABLE);
+ return (
+
+ {!selectedShow ? (
+
+
+ {scene != 'Y' ? (
+ {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ }}
+ />
+ ) : (
+ ''
+ )}
+
+ {createPageIcon()}
+
{getLangByResId(this, '4004POORDER-000092')}
+ {/* 国际化处理: 选择协同销售订单*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: TRANSFER30TO21COOP.PAGEID,
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[TRANSFER30TO21COOP.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType();
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ {NCCreateSearch(TRANSFER30TO21COOP.SEARCHID, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this, this.props),
+ dataSource: OrderCache.OrderTransferCache,
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })}
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ headTableId: TRANSFER30TO21COOP.LIST_TABLE, //表格组件id
+ bodyTableId: TRANSFER30TO21COOP.LIST_TABLE_CHILD, //子表模板id
+ fullTableId: TRANSFER30TO21COOP.VIEW, //点击加号展开,设置表格数据
+ searchAreaCode: TRANSFER30TO21COOP.SEARCHID, // 用于缓存查询条件
+ transferBtnText: getLangByResId(this, '4004POORDER-000086'), //转单按钮显示文字/* 国际化处理: 生成采购订单*/
+ containerSelector: '#transferList',
+ dataSource: OrderCache.OrderTransferCache,
+ onTransferBtnClick: (ids) => {
+ if (scene == 'Y') {
+ this.props.pushTo(URL.gotoCard, {
+ appcode: '400400800',
+ srcappcode: this.srcappcode,
+ transfer: TRANSFER30TO21COOP.CSOURCETYPECODE,
+ scene: scene,
+ org: this.getorg(),
+ pagecode: PAGECODE.cardcode
+ });
+ } else {
+ this.props.pushTo(URL.gotoCard, {
+ transfer: TRANSFER30TO21COOP.CSOURCETYPECODE,
+ scene: scene,
+ org: this.getorg(),
+ pagecode: PAGECODE.cardcode
+ });
+ }
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[TRANSFER30TO21COOP.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ })}
+
+
+ );
+ }
+}
+Transfer30CoopTable = createPage({})(Transfer30CoopTable);
+// ReactDOM.render(, document.querySelector('#app'));
+export default Transfer30CoopTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30coop/init/index.js b/src/pu/pu/poorder/transfer30coop/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30coop/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30coop/init/initTemplate.js b/src/pu/pu/poorder/transfer30coop/init/initTemplate.js
new file mode 100644
index 0000000..acf5bde
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30coop/init/initTemplate.js
@@ -0,0 +1,156 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉协同销售订单初始化
+ * @Date: 2018-06-13 14:12:29
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-10-18 11:27:12
+ */
+import { ajax, base } from 'nc-lightapp-front';
+import { TRANSFER30TO21COOP } from '../../constance';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ let scene = _this.props.getUrlParam('scene');
+ let appcode = '';
+ if (scene == 'Y') {
+ appcode = '400400820';
+ } else {
+ appcode = TRANSFER30TO21COOP.appcode;
+ }
+ _this.props.createUIDom(
+ {
+ pagecode: TRANSFER30TO21COOP.PAGEID,
+ appcode: appcode
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ let appcode = _this.props.getSearchParam('c');
+ _this.srcappcode = appcode;
+ modifierMeta.call(_this, _this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ data.template.pageid &&
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ });
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: TRANSFER30TO21COOP.Refresh,
+ area: TRANSFER30TO21COOP.PAGEID,
+ order: '1',
+ children: []
+ }
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[TRANSFER30TO21COOP.SEARCHID].items.map((item) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ // item.width = 120;
+ if (item.attrcode == 'pk_org') {
+ //主组织权限过滤
+ }
+ if (item.attrcode == 'pk_org_dest') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return {
+ GridRefActionExt:
+ 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter,nccloud.web.pu.order.ref.CoopPurOrgRefFilter'
+ // UsualGridRefActionExt: 'nccloud.web.pu.order.ref.CoopPurOrgRefFilter' //购销协同过滤
+ };
+ };
+ }
+ if (item.attrcode != 'pk_org' && item.attrcode != 'pk_org_dest') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21COOP.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+ if (item.attrcode == 'cemployeeid') {
+ // 业务员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21COOP.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(TRANSFER30TO21COOP.SEARCHID, 'cdeptid');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'st'
+ };
+ };
+ } else if (item.attrcode == 'cdeptid') {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21COOP.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'st'
+ };
+ };
+ } else if (item.attrcode == 'ctrantypeid') {
+ //订单类型
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21COOP.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ parentbilltype: '30'
+ };
+ // return {
+ // istransaction: 'Y',
+ // parentbilltype: '30',
+ // SCM_CONSIDERBUSITYPE: 'Y',
+ // pk_org: data,
+ // SCM_BUSIORG: data,
+ // UsualGridRefActionExt: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ // };
+ };
+ }
+ return item;
+ });
+ // 拉单的超链接
+ meta[TRANSFER30TO21COOP.LIST_TABLE] &&
+ meta[TRANSFER30TO21COOP.LIST_TABLE].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFER30TO21COOP.billtype,
+ billcodefield: TRANSFER30TO21COOP.vbillcode,
+ pkfield: TRANSFER30TO21COOP.csaleorderid
+ });
+ });
+ meta[TRANSFER30TO21COOP.VIEW] &&
+ meta[TRANSFER30TO21COOP.VIEW].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFER30TO21COOP.billtype,
+ billcodefield: TRANSFER30TO21COOP.vbillcode,
+ pkfield: TRANSFER30TO21COOP.csaleorderid
+ });
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30sale/btnClick/buttonClick.js b/src/pu/pu/poorder/transfer30sale/btnClick/buttonClick.js
new file mode 100644
index 0000000..c8b8bad
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30sale/btnClick/buttonClick.js
@@ -0,0 +1,22 @@
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 直运销售生成采购订单按钮事件
+ * @Date: 2018-06-19 11:40:09
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:55:50
+ */
+import { TRANSFER30TO21 } from '../../constance';
+import { searchBtnClick } from './index.js';
+
+export default function(props, key, text, record, index) {
+ switch (key) {
+ case TRANSFER30TO21.Refresh: // 刷新
+ searchBtnClick.call(this, this.props, true);
+ break;
+ default:
+ break;
+ }
+}
+
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30sale/btnClick/index.js b/src/pu/pu/poorder/transfer30sale/btnClick/index.js
new file mode 100644
index 0000000..4938b42
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30sale/btnClick/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+import buttonClick from './buttonClick';
+
+export { searchBtnClick, buttonClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30sale/btnClick/searchBtnClick.js b/src/pu/pu/poorder/transfer30sale/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..8fc1335
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30sale/btnClick/searchBtnClick.js
@@ -0,0 +1,63 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉直运销售订单查询
+ * @Date: 2018-06-13 14:13:15
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:57:05
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFER30TO21, PAGECODE, OrderCache } from '../../constance';
+import { clearTransferCache, setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+//点击查询,获取查询区数据
+export default function(props, isRefresh) {
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(TRANSFER30TO21.SEARCHID);
+ if (queryInfo.querycondition) {
+ // 记录采购组织
+ let org = queryInfo.querycondition.conditions[0] && queryInfo.querycondition.conditions[0].value.firstvalue;
+ setDefData.call(this, OrderCache.OrderCacheKey, 'sale', {
+ org: org
+ });
+ let transtype = getDefData(OrderCache.OrderCardCache, 'transtype');
+ let data = {
+ templetid: this.state.templetid,
+ queryInfo: queryInfo,
+ pageCode: TRANSFER30TO21.PAGEID, //页面编码
+ userobj: { billtype_qs_key: transtype }
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: TRANSFER30TO21.GETQUERYDATA,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ let backdata = [];
+ let content = null; // getLangByResId(this, '4004POORDER-000085'); /* 国际化处理: 查询结果为空!*/
+ if (res.data) {
+ clearTransferCache(_this.props, OrderCache.OrderTransferCache);
+ backdata = res.data;
+ content = backdata.length; // getLangByResId(this, '4004POORDER-000006'); /* 国际化处理: 查询成功!*/
+ }
+ _this.props.transferTable.setTransferTableValue(
+ TRANSFER30TO21.LIST_TABLE,
+ TRANSFER30TO21.LIST_TABLE_CHILD,
+ backdata,
+ 'csaleorderid',
+ 'csaleorderbid'
+ );
+ // toast({color: 'success',content: content});
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ }
+ });
+ }
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30sale/index.js b/src/pu/pu/poorder/transfer30sale/index.js
new file mode 100644
index 0000000..79b1132
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30sale/index.js
@@ -0,0 +1,188 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 直运销售订单生成采购订单
+ * @Date: 2018-06-13 14:14:03
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-09-11 23:08:57
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax, createPageIcon } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick, buttonClick } from './btnClick';
+import { TRANSFER30TO21, URL, OrderCache, PAGECODE } from '../constance';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { getDefData } from '../../../../scmpub/scmpub/pub/cache';
+import Transfer20Table from '../transfer20';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+
+class Transfer30SaleTable extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(TRANSFER30TO21.SEARCHID);
+ this.state = {
+ templetid: null, //模板ID
+ toggleViewStatus: false
+ };
+ this.srcappcode = null;
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER30TO21.LIST_TABLE,
+ TRANSFER30TO21.LIST_TABLE_CHILD,
+ [],
+ 'csaleorderid',
+ 'csaleorderbid'
+ );
+ }
+
+ getorg = () => {
+ let org = getDefData.call(this, OrderCache.OrderCacheKey, 'sale');
+ if (org == null || org.org == null) {
+ return null;
+ } else {
+ return org.org;
+ }
+ };
+
+ onAfterEvent(props, field, val) {
+ if (field == 'pk_org') {
+ multiCorpRefHandler(props, val, TRANSFER30TO21.SEARCHID, [
+ 'ccustomerid',
+ 'cemployeeid',
+ 'billmaker',
+ 'approver',
+ 'so_saleorder_b.cmaterialid',
+ 'so_saleorder_b.cmaterialid.code',
+ 'so_saleorder_b.cmaterialid.name',
+ 'so_saleorder_b.cmaterialid.pk_marbasclass',
+ 'so_saleorder_b.creceivecustid'
+ ]);
+ }
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(TRANSFER30TO21.SEARCHID, 'pk_org');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent(this.props, 'pk_org', arr);
+ }
+ };
+
+ render() {
+ const { transferTable, button, search } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createTransferTable } = transferTable;
+ let scene = this.props.getUrlParam('scene');
+ let selectedShow = transferTable.getSelectedListDisplay(TRANSFER30TO21.LIST_TABLE);
+ return (
+
+ {!selectedShow ? (
+
+
+ {scene != 'Y' ? (
+ {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ }}
+ />
+ ) : (
+ ''
+ )}
+
+ {createPageIcon()}
+
{getLangByResId(this, '4004POORDER-000093')}
+ {/* 国际化处理: 选择直运销售订单*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: TRANSFER30TO21.PAGEID,
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[TRANSFER30TO21.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType();
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ {NCCreateSearch(TRANSFER30TO21.SEARCHID, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this, this.props),
+ dataSource: OrderCache.OrderTransferCache,
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })}
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ headTableId: TRANSFER30TO21.LIST_TABLE, //表格组件id
+ bodyTableId: TRANSFER30TO21.LIST_TABLE_CHILD, //子表模板id
+ fullTableId: TRANSFER30TO21.VIEW, //点击加号展开,设置表格数据
+ searchAreaCode: TRANSFER30TO21.SEARCHID, // 用于缓存查询条件
+ transferBtnText: getLangByResId(this, '4004POORDER-000086'), //转单按钮显示文字/* 国际化处理: 生成采购订单*/
+ containerSelector: '#transferList',
+ dataSource: OrderCache.OrderTransferCache,
+ onTransferBtnClick: (ids) => {
+ if (scene == 'Y') {
+ this.props.pushTo(URL.gotoCard, {
+ appcode: '400400800',
+ srcappcode: this.srcappcode,
+ scene: scene,
+ transfer: TRANSFER30TO21.CSOURCETYPECODE,
+ org: this.getorg(),
+ pagecode: PAGECODE.cardcode
+ });
+ } else {
+ this.props.pushTo(URL.gotoCard, {
+ scene: scene,
+ transfer: TRANSFER30TO21.CSOURCETYPECODE,
+ org: this.getorg(),
+ pagecode: PAGECODE.cardcode
+ });
+ }
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[TRANSFER30TO21.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ })}
+
+
+ );
+ }
+}
+Transfer30SaleTable = createPage({})(Transfer30SaleTable);
+// ReactDOM.render(, document.querySelector('#app'));
+
+export default Transfer30SaleTable;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30sale/init/index.js b/src/pu/pu/poorder/transfer30sale/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30sale/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer30sale/init/initTemplate.js b/src/pu/pu/poorder/transfer30sale/init/initTemplate.js
new file mode 100644
index 0000000..ca0088d
--- /dev/null
+++ b/src/pu/pu/poorder/transfer30sale/init/initTemplate.js
@@ -0,0 +1,151 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉直运销售订单初始化
+ * @Date: 2018-06-13 14:12:29
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-10-18 14:23:40
+ */
+import { ajax, base } from 'nc-lightapp-front';
+import { TRANSFER30TO21 } from '../../constance';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ let scene = _this.props.getUrlParam('scene');
+ let appcode = '';
+ if (scene == 'Y') {
+ appcode = '400400818';
+ } else {
+ appcode = TRANSFER30TO21.appcode;
+ }
+ _this.props.createUIDom(
+ {
+ pagecode: TRANSFER30TO21.PAGEID,
+ appcode: appcode
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ let appcode = _this.props.getSearchParam('c');
+ _this.srcappcode = appcode;
+ modifierMeta.call(_this, _this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ data.template.pageid &&
+ _this.setState({
+ templetid: data.template.pageid
+ });
+ });
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: TRANSFER30TO21.Refresh,
+ area: TRANSFER30TO21.PAGEID,
+ order: '1',
+ children: []
+ }
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[TRANSFER30TO21.SEARCHID].items.map((item) => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ // item.width = 120;
+ if (item.attrcode == 'dest_pk_org') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ }
+ if (item.attrcode != 'pk_org' && item.attrcode != 'dest_pk_org') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+ if (item.attrcode == 'ctrantypeid') {
+ //订单类型
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ // billtype: '30',
+ parentbilltype: '30',
+ GridRefActionExt: 'nccloud.web.pu.order.ref.TransTypeRefFilter'
+ };
+ // return {
+ // istransaction: 'Y',
+ // parentbilltype: '30',
+ // SCM_CONSIDERBUSITYPE: 'Y',
+ // pk_org: data,
+ // SCM_BUSIORG: data,
+ // UsualGridRefActionExt: 'nccloud.web.scmpub.ref.TransTypeRefFilterUtils'
+ // };
+ };
+ } else if (item.attrcode == 'cemployeeid') {
+ // 计划员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(TRANSFER30TO21.SEARCHID, 'cdeptid');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'st'
+ };
+ };
+ } else if (item.attrcode == 'cdeptid') {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER30TO21.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'st'
+ };
+ };
+ }
+ return item;
+ });
+ // 拉单的超链接
+ meta[TRANSFER30TO21.LIST_TABLE] &&
+ meta[TRANSFER30TO21.LIST_TABLE].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFER30TO21.billtype,
+ billcodefield: TRANSFER30TO21.vbillcode,
+ pkfield: TRANSFER30TO21.csaleorderid
+ });
+ });
+ meta[TRANSFER30TO21.VIEW] &&
+ meta[TRANSFER30TO21.VIEW].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFER30TO21.billtype,
+ billcodefield: TRANSFER30TO21.vbillcode,
+ pkfield: TRANSFER30TO21.csaleorderid
+ });
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer49/btnClick/buttonClick.js b/src/pu/pu/poorder/transfer49/btnClick/buttonClick.js
new file mode 100644
index 0000000..cac9ea1
--- /dev/null
+++ b/src/pu/pu/poorder/transfer49/btnClick/buttonClick.js
@@ -0,0 +1,22 @@
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 借入生成订单按钮事件
+ * @Date: 2018-06-19 11:40:09
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-04-10 10:54:46
+ */
+import { TRANSFER49 } from '../../constance';
+import { searchBtnClick } from './index.js';
+
+export default function(props, key, text, record, index) {
+ switch (key) {
+ case TRANSFER49.Refresh: // 刷新
+ searchBtnClick.call(this, true);
+ break;
+ default:
+ break;
+ }
+}
+
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer49/btnClick/index.js b/src/pu/pu/poorder/transfer49/btnClick/index.js
new file mode 100644
index 0000000..4938b42
--- /dev/null
+++ b/src/pu/pu/poorder/transfer49/btnClick/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+import buttonClick from './buttonClick';
+
+export { searchBtnClick, buttonClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer49/btnClick/searchBtnClick.js b/src/pu/pu/poorder/transfer49/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..dbf8da6
--- /dev/null
+++ b/src/pu/pu/poorder/transfer49/btnClick/searchBtnClick.js
@@ -0,0 +1,58 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉借入查询
+ * @Date: 2018-06-13 14:13:15
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:59:13
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFER49, PAGECODE, OrderCache } from '../../constance';
+import { clearTransferCache, setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+//点击查询,获取查询区数据
+export default function(isRefresh) {
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(TRANSFER49.SEARCHID);
+ if (queryInfo.querycondition) {
+ let org = queryInfo.querycondition.conditions[0] && queryInfo.querycondition.conditions[0].value.firstvalue;
+ let transtype = getDefData(OrderCache.OrderCardCache, 'transtype');
+ let data = {
+ templetid: this.state.templetid,
+ queryInfo: queryInfo,
+ pageCode: TRANSFER49.PAGEID, //页面编码
+ userobj: { billtype_qs_key: transtype }
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: TRANSFER49.GETQUERYDATA,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ let backdata = [];
+ let content = null;
+ if (res.data) {
+ backdata = res.data;
+ content = backdata.length;
+ clearTransferCache(_this.props, OrderCache.OrderTransferCache);
+ }
+ _this.props.transferTable.setTransferTableValue(
+ TRANSFER49.LIST_TABLE,
+ TRANSFER49.LIST_TABLE_CHILD,
+ backdata,
+ 'cgeneralhid',
+ 'cgeneralbid'
+ );
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ }
+ });
+ }
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer49/index.js b/src/pu/pu/poorder/transfer49/index.js
new file mode 100644
index 0000000..cc0db0d
--- /dev/null
+++ b/src/pu/pu/poorder/transfer49/index.js
@@ -0,0 +1,170 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购合同生成订单
+ * @Date: 2018-06-13 14:14:03
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2022-05-12 13:55:03
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick, buttonClick } from './btnClick';
+import { TRANSFER49, URL, OrderCache, PAGECODE } from '../constance';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData } from '../../../../scmpub/scmpub/pub/cache';
+
+class Transfer49Table extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(TRANSFER49.SEARCHID);
+ this.headTableId = TRANSFER49.LIST_TABLE;
+ this.state = {
+ templetid: null, //模板ID
+ toggleViewStatus: false
+ };
+ // initTemplate.call(this);
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFER49.LIST_TABLE,
+ TRANSFER49.LIST_TABLE_CHILD,
+ [],
+ 'cgeneralhid',
+ 'cgeneralbid'
+ );
+ }
+
+ onAfterEvent(props, field, val) {
+ if (field == 'cgeneralbid.cpurorgoid') {
+ multiCorpRefHandler(props, val, TRANSFER49.SEARCHID, [
+ 'cbizid',
+ 'cdptid',
+ 'depid',
+ 'billmaker',
+ 'approver',
+ 'cgeneralbid.cmaterialoid',
+ 'cgeneralbid.cmaterialoid.code',
+ 'cgeneralbid.cmaterialoid.name',
+ 'cgeneralbid.cmaterialoid.pk_marbasclass',
+ 'cgeneralbid.cvendorid'
+ ]);
+ } else if (field == 'pk_org') {
+ multiCorpRefHandler(props, val, TRANSFER49.SEARCHID, [ 'cwarehouseid' ]);
+ }
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(TRANSFER49.SEARCHID, 'cgeneralbid.cpurorgoid');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent(this.props, 'cgeneralbid.cpurorgoid', arr);
+ }
+ };
+
+ handleClick() {}
+
+ render() {
+ const { transferTable, button, search, BillHeadInfo } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createTransferTable } = transferTable;
+ const { createBillHeadInfo } = BillHeadInfo;
+ let selectedShow = transferTable.getSelectedListDisplay(TRANSFER49.LIST_TABLE);
+ return (
+
+ {!selectedShow ? (
+
+
+ {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ }}
+ />
+
+ {createBillHeadInfo({
+ title: getLangByResId(this, '4004POORDER-000108'),
+ initShowBackBtn: false
+ })}
+
+ {/* 国际化处理: 选择借入单*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: TRANSFER49.PAGEID,
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[TRANSFER49.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ {NCCreateSearch(TRANSFER49.SEARCHID, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this, this.props),
+ // dataSource: OrderCache.OrderTransferCache,
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })}
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ headTableId: TRANSFER49.LIST_TABLE, //表格组件id
+ bodyTableId: TRANSFER49.LIST_TABLE_CHILD, //子表模板id
+ fullTableId: TRANSFER49.VIEW, //视图VO,设置表格数据
+ searchAreaCode: TRANSFER49.SEARCHID, // 用于缓存查询条件
+ transferBtnText: getLangByResId(this, '4004POORDER-000086'), //转单按钮显示文字/* 国际化处理: 生成采购订单*/
+ containerSelector: '#transferList',
+ dataSource: OrderCache.OrderTransferCache,
+ onTransferBtnClick: (ids) => {
+ this.props.pushTo(URL.gotoCard, {
+ // appcode: '400400800',
+ transfer: TRANSFER49.CSOURCETYPECODE,
+ pagecode: PAGECODE.cardcode
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[TRANSFER49.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ })}
+
+
+ );
+ }
+}
+Transfer49Table = createPage({})(Transfer49Table);
+export default Transfer49Table;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer49/init/index.js b/src/pu/pu/poorder/transfer49/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/poorder/transfer49/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transfer49/init/initTemplate.js b/src/pu/pu/poorder/transfer49/init/initTemplate.js
new file mode 100644
index 0000000..fe9fcb2
--- /dev/null
+++ b/src/pu/pu/poorder/transfer49/init/initTemplate.js
@@ -0,0 +1,207 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉采购合同初始化
+ * @Date: 2018-06-13 14:12:29
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-04-04 13:02:12
+ */
+import {batchSetHyperlinkForTableFields} from "../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil";
+import { TRANSFER49 } from '../../constance';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import {AREA} from "../../../puinvoice/constance";
+
+export default function() {
+ let _this = this;
+ _this.props.createUIDom(
+ {
+ pagecode: TRANSFER49.PAGEID,
+ appcode: TRANSFER49.appcode,
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modifierMeta.call(_this, _this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ data.template.pageid &&
+ _this.setState({
+ templetid: data.template.pageid,
+ });
+ });
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: TRANSFER49.Refresh,
+ area: TRANSFER49.PAGEID,
+ order: '1',
+ children: [],
+ },
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ let headlinkmap = new Map([
+ [
+ 'vbillcode', {
+ billtype: '49',
+ pkField: 'cgeneralhid'
+ }
+ ]
+ ]);
+ let headlinkConfig = {
+ moduleId: AREA.head,
+ linkmap: headlinkmap
+ }
+ batchSetHyperlinkForTableFields.call(this, props, meta, headlinkConfig);
+ let bodylinkmap = new Map([
+ [
+ 'ccorrespondcode', {
+ billtypeField: 'ccorrespondtype',
+ pkField: 'ccorrespondhid'
+ }
+ ],
+ [
+ 'vsourcebillcode', {
+ billtypeField: 'csourcetype',
+ pkField: 'csourcebillhid'
+ }
+ ],
+ [
+ 'vfirstbillcode', {
+ billtypeField: 'cfirsttype',
+ pkField: 'cfirstbillhid'
+ }
+ ],
+ [
+ 'vsrc2billcode', {
+ billtypeField: 'csrc2billtype',
+ pkField: 'csrc2billhid'
+ }
+ ]
+ ]);
+ let bodylinkConfig = {
+ moduleId: AREA.body,
+ linkmap: bodylinkmap
+ }
+ batchSetHyperlinkForTableFields.call(this, props, meta, bodylinkConfig);
+ let viewlinkmap = new Map([
+ [
+ 'vbillcode', {
+ billtype: '49',
+ pkField: 'cgeneralhid'
+ }
+ ],
+ [
+ 'ccorrespondcode', {
+ billtypeField: 'ccorrespondtype',
+ pkField: 'ccorrespondhid'
+ }
+ ],
+ [
+ 'vsourcebillcode', {
+ billtypeField: 'csourcetype',
+ pkField: 'csourcebillhid'
+ }
+ ],
+ [
+ 'vfirstbillcode', {
+ billtypeField: 'cfirsttype',
+ pkField: 'cfirstbillhid'
+ }
+ ],
+ [
+ 'vsrc2billcode', {
+ billtypeField: 'csrc2billtype',
+ pkField: 'csrc2billhid'
+ }
+ ]
+ ]);
+ let viewlinkConfig = {
+ moduleId: 'view49',
+ linkmap: viewlinkmap
+ }
+ batchSetHyperlinkForTableFields.call(this, props, meta, viewlinkConfig);
+ // 设置固定宽度 撑开子表
+ meta[TRANSFER49.SEARCHID].items.map(item => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ // item.width = 120;
+ if (item.attrcode == 'pk_org') {
+ // 库存组织多选
+ item.isMultiSelectedEnabled = true;
+ } else if (item.attrcode == 'cgeneralbid.cpurorgoid') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ } else if (item.attrcode != 'pk_org' && item.attrcode != 'cwarehouseid') {
+ item.isShowUnit = true;
+ // 根据采购过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER49.SEARCHID, 'cgeneralbid.cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+ if (item.attrcode == 'ctrantypeid') {
+ //订单类型
+ item.queryCondition = () => {
+ return {
+ parentbilltype: '49',
+ };
+ };
+ } else if (item.attrcode == 'cbizid') {
+ // 业务员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER49.SEARCHID, 'cgeneralbid.cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(TRANSFER49.SEARCHID, 'cdptid');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'cdptid') {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER49.SEARCHID, 'cgeneralbid.cpurorgoid');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'cwarehouseid') {
+ // 仓库 根据库存组织过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFER49.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'st',
+ isdirectstore: 'N', //非直运
+ gubflag: 'N',
+ };
+ };
+ }
+ return item;
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transferz2/btnClick/buttonClick.js b/src/pu/pu/poorder/transferz2/btnClick/buttonClick.js
new file mode 100644
index 0000000..c58b5c9
--- /dev/null
+++ b/src/pu/pu/poorder/transferz2/btnClick/buttonClick.js
@@ -0,0 +1,22 @@
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 请购生成订单按钮事件
+ * @Date: 2018-06-19 11:40:09
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 14:59:35
+ */
+import { TRANSFERZ2 } from '../../constance';
+import { searchBtnClick } from './index.js';
+
+export default function(props, key, text, record, index) {
+ switch (key) {
+ case TRANSFERZ2.Refresh: // 刷新
+ searchBtnClick.call(this, this.props, true);
+ break;
+ default:
+ break;
+ }
+}
+
+/*q2LCmxM8POvl78IL0LiyduN+EoNKIL2fIaNi1VZNESo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transferz2/btnClick/index.js b/src/pu/pu/poorder/transferz2/btnClick/index.js
new file mode 100644
index 0000000..4938b42
--- /dev/null
+++ b/src/pu/pu/poorder/transferz2/btnClick/index.js
@@ -0,0 +1,7 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import searchBtnClick from './searchBtnClick';
+import buttonClick from './buttonClick';
+
+export { searchBtnClick, buttonClick };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transferz2/btnClick/searchBtnClick.js b/src/pu/pu/poorder/transferz2/btnClick/searchBtnClick.js
new file mode 100644
index 0000000..f6cf158
--- /dev/null
+++ b/src/pu/pu/poorder/transferz2/btnClick/searchBtnClick.js
@@ -0,0 +1,62 @@
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉采购合同查询
+ * @Date: 2018-06-13 14:13:15
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-06-13 15:00:07
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+import { TRANSFERZ2, PAGECODE, OrderCache } from '../../constance';
+import { clearTransferCache, setDefData, getDefData } from '../../../../../scmpub/scmpub/pub/cache';
+import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { showQueryResultInfoForNoPage, showRefreshInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+//点击查询,获取查询区数据
+export default function(props, isRefresh) {
+ let _this = this;
+ let queryInfo = this.props.search.getQueryInfo(TRANSFERZ2.SEARCHID);
+ if (queryInfo.querycondition) {
+ let org = queryInfo.querycondition.conditions[0] && queryInfo.querycondition.conditions[0].value.firstvalue;
+ setDefData(OrderCache.OrderCacheKey, 'z2org', {
+ org: org
+ });
+ let transtype = getDefData(OrderCache.OrderCardCache, 'transtype');
+ let data = {
+ templetid: this.state.templetid,
+ queryInfo: queryInfo,
+ pageCode: TRANSFERZ2.PAGEID, //页面编码
+ userobj: { billtype_qs_key: transtype }
+ };
+ //得到数据渲染到页面
+ ajax({
+ url: TRANSFERZ2.GETQUERYDATA,
+ data: data,
+ success: (res) => {
+ if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) {
+ _this.props.dealFormulamsg(
+ res.formulamsg //参数一:返回的公式对象
+ );
+ }
+ let backdata = [];
+ let content = null; // getLangByResId(_this, '4004POORDER-000085'); /* 国际化处理: 查询结果为空!*/
+ if (res.data) {
+ backdata = res.data;
+ content = backdata.length; //getLangByResId(_this, '4004POORDER-000006'); /* 国际化处理: 查询成功!*/
+ clearTransferCache(_this.props, OrderCache.OrderTransferCache);
+ }
+ _this.props.transferTable.setTransferTableValue(
+ TRANSFERZ2.LIST_TABLE,
+ TRANSFERZ2.LIST_TABLE_CHILD,
+ backdata,
+ 'pk_ct_pu',
+ 'pk_ct_pu_b'
+ );
+ // toast({color: 'success',content: content});
+ isRefresh == true ? showRefreshInfo() : showQueryResultInfoForNoPage(content);
+ }
+ });
+ }
+}
+
+/*YuO8szH0cVixePu/Bt+mG478E2BU9Vk0jomkndMRnfs=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transferz2/index.js b/src/pu/pu/poorder/transferz2/index.js
new file mode 100644
index 0000000..9986626
--- /dev/null
+++ b/src/pu/pu/poorder/transferz2/index.js
@@ -0,0 +1,179 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购合同生成订单
+ * @Date: 2018-06-13 14:14:03
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-20 15:54:45
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+import { initTemplate } from './init';
+import { searchBtnClick, buttonClick } from './btnClick';
+import { TRANSFERZ2, URL, OrderCache, PAGECODE } from '../constance';
+const { NCToggleViewBtn, NCBackBtn, NCSetColBtn, NCDiv } = base;
+import multiCorpRefHandler from '../../../../scmpub/scmpub/pub/tool/MultiCorpRefHandler';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { getDefData } from '../../../../scmpub/scmpub/pub/cache';
+
+class Transferz2Table extends Component {
+ constructor(props) {
+ super(props);
+ props.use.search(TRANSFERZ2.SEARCHID);
+ this.headTableId = TRANSFERZ2.LIST_TABLE;
+ this.state = {
+ templetid: null, //模板ID
+ toggleViewStatus: false
+ };
+ // initTemplate.call(this);
+ initLang(this, [ '4004poorder' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentDidMount() {
+ this.props.transferTable.setTransferTableValue(
+ TRANSFERZ2.LIST_TABLE,
+ TRANSFERZ2.LIST_TABLE_CHILD,
+ [],
+ 'pk_ct_pu',
+ 'pk_ct_pu_b'
+ );
+ }
+
+ onAfterEvent(props, field, val) {
+ if (field == 'pk_org') {
+ multiCorpRefHandler(props, val, TRANSFERZ2.SEARCHID, [
+ 'cvendorid',
+ 'personnelid',
+ 'depid',
+ 'billmaker',
+ 'approver',
+ 'pk_ct_pu_b.cbprojectid',
+ 'pk_ct_pu_b.casscustid',
+ 'pk_ct_pu_b.pk_srcmaterial',
+ 'pk_ct_pu_b.pk_srcmaterial.code',
+ 'pk_ct_pu_b.pk_srcmaterial.name',
+ 'pk_ct_pu_b.pk_srcmaterial.pk_marbasclass'
+ ]);
+ }
+ }
+
+ renderCompleteEvent = () => {
+ let pk_org = this.props.search.getSearchValByField(TRANSFERZ2.SEARCHID, 'pk_org');
+ if (pk_org && pk_org.value && pk_org.value.firstvalue) {
+ let value = pk_org.value.firstvalue;
+ let arr = value.split(',');
+ arr = arr.map((item) => {
+ return { refpk: item };
+ });
+ this.onAfterEvent(this.props, 'pk_org', arr);
+ }
+ };
+
+ handleClick() {}
+
+ getorg = () => {
+ let org = this.props.search.getSearchValByField(TRANSFERZ2.SEARCHID, 'pk_org');
+ if (org && org.value && org.value.firstvalue) {
+ return org.value.firstvalue;
+ } else {
+ return null;
+ }
+ };
+
+ render() {
+ const { transferTable, button, search, BillHeadInfo } = this.props;
+ const { NCCreateSearch } = search;
+ const { createButton } = button;
+ const { createTransferTable } = transferTable;
+ const { createBillHeadInfo } = BillHeadInfo;
+ let selectedShow = transferTable.getSelectedListDisplay(TRANSFERZ2.LIST_TABLE);
+ return (
+
+ {!selectedShow ? (
+
+
+ {
+ this.props.pushTo(URL.gotoList, { pagecode: PAGECODE.listcode });
+ }}
+ />
+
+ {createBillHeadInfo({
+ title: getLangByResId(this, '4004POORDER-000094'),
+ initShowBackBtn: false
+ })}
+ {/* 国际化处理: 选择采购合同*/}
+
+ {/* 按钮区 */}
+
+ {this.props.button.createButtonApp({
+ area: TRANSFERZ2.PAGEID,
+ onButtonClick: buttonClick.bind(this)
+ })}
+
+ {/* {
+ this.handleClick;
+ }}
+ /> */}
+ {
+ if (!this.props.meta.getMeta()[TRANSFERZ2.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }}
+ />
+
+
+ {NCCreateSearch(TRANSFERZ2.SEARCHID, {
+ clickSearchBtn: searchBtnClick.bind(this),
+ onAfterEvent: this.onAfterEvent.bind(this, this.props),
+ // dataSource: OrderCache.OrderTransferCache,
+ renderCompleteEvent: this.renderCompleteEvent,
+ statusChangeEvent: this.renderCompleteEvent
+ })}
+
+
+ ) : (
+ ''
+ )}
+
+ {createTransferTable({
+ headTableId: TRANSFERZ2.LIST_TABLE, //表格组件id
+ bodyTableId: TRANSFERZ2.LIST_TABLE_CHILD, //子表模板id
+ fullTableId: TRANSFERZ2.VIEW, //视图VO,设置表格数据
+ searchAreaCode: TRANSFERZ2.SEARCHID, // 用于缓存查询条件
+ transferBtnText: getLangByResId(this, '4004POORDER-000086'), //转单按钮显示文字/* 国际化处理: 生成采购订单*/
+ containerSelector: '#transferList',
+ dataSource: OrderCache.OrderTransferCache,
+ onTransferBtnClick: (ids) => {
+ this.props.pushTo(URL.gotoCard, {
+ // appcode: '400400800',
+ transfer: TRANSFERZ2.CSOURCETYPECODE,
+ org: this.getorg(),
+ pagecode: PAGECODE.cardcode
+ });
+ },
+ onChangeViewClick: () => {
+ //点击切换视图钩子函数
+ if (!this.props.meta.getMeta()[TRANSFERZ2.VIEW]) {
+ initTemplate.call(this); //加载主子拉平模板
+ }
+ this.props.transferTable.changeViewType(this.headTableId);
+ this.setState({ toggleViewStatus: !this.state.toggleViewStatus });
+ }
+ })}
+
+
+ );
+ }
+}
+Transferz2Table = createPage({})(Transferz2Table);
+// ReactDOM.render(, document.querySelector('#app'));
+export default Transferz2Table;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transferz2/init/index.js b/src/pu/pu/poorder/transferz2/init/index.js
new file mode 100644
index 0000000..43d19a3
--- /dev/null
+++ b/src/pu/pu/poorder/transferz2/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export {initTemplate}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/poorder/transferz2/init/initTemplate.js b/src/pu/pu/poorder/transferz2/init/initTemplate.js
new file mode 100644
index 0000000..4731df0
--- /dev/null
+++ b/src/pu/pu/poorder/transferz2/init/initTemplate.js
@@ -0,0 +1,129 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 采购订单拉采购合同初始化
+ * @Date: 2018-06-13 14:12:29
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-09-12 15:33:40
+ */
+import { ajax, base } from 'nc-lightapp-front';
+import { TRANSFERZ2 } from '../../constance';
+import { transtypeUtils, setPsndocShowLeavePower, setRefShowDisabledData } from '../../../../../scmpub/scmpub/pub/tool';
+import { transferSkipToSrcBillUtil } from '../../../../../scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil';
+
+export default function() {
+ let _this = this;
+ _this.props.createUIDom(
+ {
+ pagecode: TRANSFERZ2.PAGEID,
+ appcode: TRANSFERZ2.appcode,
+ },
+ function(data) {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ modifierMeta.call(_this, _this.props, meta);
+ _this.props.meta.setMeta(meta, () => {
+ data.template.pageid &&
+ _this.setState({
+ templetid: data.template.pageid,
+ });
+ });
+ }
+ let button = [
+ {
+ id: 'Refresh_id',
+ type: 'general_btn',
+ key: TRANSFERZ2.Refresh,
+ area: TRANSFERZ2.PAGEID,
+ order: '1',
+ children: [],
+ },
+ ];
+ _this.props.button.setButtons(button);
+ }
+ }
+ );
+}
+
+/**
+ * 自定义元数据样式
+ * @param {*} props
+ * @param {*} meta
+ */
+function modifierMeta(props, meta) {
+ // 设置固定宽度 撑开子表
+ meta[TRANSFERZ2.SEARCHID].items.map(item => {
+ setRefShowDisabledData(item);
+ setPsndocShowLeavePower(item);
+ // item.width = 120;
+ if (item.attrcode == 'pk_org') {
+ //主组织权限过滤
+ item.queryCondition = () => {
+ return { GridRefActionExt: 'nccloud.web.scmpub.ref.AppPermissionOrgRefFilter' };
+ };
+ }
+ if (item.attrcode != 'pk_org') {
+ item.isShowUnit = true;
+ // 根据pk_org过滤
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFERZ2.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return { pk_org: data };
+ };
+ }
+ if (item.attrcode == 'ctrantypeid') {
+ //订单类型
+ item.queryCondition = () => {
+ return {
+ parentbilltype: 'Z2',
+ };
+ };
+ } else if (item.attrcode == 'personnelid') {
+ // 计划员
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFERZ2.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ let pk_dept = props.search.getSearchValByField(TRANSFERZ2.SEARCHID, 'depid');
+ pk_dept =
+ pk_dept != null ? (pk_dept.value.firstvalue.includes(',') ? null : pk_dept.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ pk_dept: pk_dept,
+ busifuncode: 'pu',
+ };
+ };
+ } else if (item.attrcode == 'depid') {
+ // 部门
+ item.queryCondition = () => {
+ let data = props.search.getSearchValByField(TRANSFERZ2.SEARCHID, 'pk_org');
+ data = data != null ? (data.value.firstvalue.includes(',') ? null : data.value.firstvalue) : null;
+ return {
+ pk_org: data,
+ busifuncode: 'pu',
+ };
+ };
+ }
+ return item;
+ });
+ // 拉单的超链接
+ meta[TRANSFERZ2.LIST_TABLE] &&
+ meta[TRANSFERZ2.LIST_TABLE].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFERZ2.billtype,
+ billcodefield: TRANSFERZ2.vbillcode,
+ pkfield: TRANSFERZ2.pk_ct_pu,
+ });
+ });
+ meta[TRANSFERZ2.VIEW] &&
+ meta[TRANSFERZ2.VIEW].items.map((item, index) => {
+ transferSkipToSrcBillUtil.call(this, this.props, item, {
+ billtype: TRANSFERZ2.billtype,
+ billcodefield: TRANSFERZ2.vbillcode,
+ pkfield: TRANSFERZ2.pk_ct_pu,
+ });
+ });
+ return meta;
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/ScriptActionDlg/index.js b/src/pu/pu/pub/ScriptActionDlg/index.js
new file mode 100644
index 0000000..79ab936
--- /dev/null
+++ b/src/pu/pu/pub/ScriptActionDlg/index.js
@@ -0,0 +1,46 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: xiahui
+ * @PageInfo: 脚本操作对话框
+ * @Date: 2019-03-14 16:22:31
+ * @Last Modified by: guoylei
+ * @Last Modified time: 2022-10-27 10:05:10
+ */
+import React, { Component } from 'react';
+import { base } from 'nc-lightapp-front';
+import './index.less';
+
+const { NCTextArea } = base;
+
+class ScriptActionDlg extends Component {
+ constructor() {
+ super();
+ this.state = {
+ reason: null // 执行原因
+ };
+ }
+
+ onChangeReason = (reason) => {
+ this.setState({
+ reason: reason
+ });
+ this.props.changeData(reason);
+ };
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default ScriptActionDlg;
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/ScriptActionDlg/index.less b/src/pu/pu/pub/ScriptActionDlg/index.less
new file mode 100644
index 0000000..4f2364b
--- /dev/null
+++ b/src/pu/pu/pub/ScriptActionDlg/index.less
@@ -0,0 +1,33 @@
+// .ScriptActionDlg.nc-modal.u-modal.simpleModal {
+// .u-modal-dialog {
+// width: 410px;
+// height: 200px;
+// .u-modal-content {
+// width: auto;
+// height: auto;
+// min-height: auto;
+// .msg-title {
+// display: flex;
+// align-items: center;
+// margin-bottom: 20px;
+// .iconfont {
+// color: #e14c46;
+// font-size: 18px;
+// margin-right: 6px;
+// }
+// .msg-title {
+// color: #333;
+// }
+// }
+// .msg-input {
+// width: 220px;
+// margin-left: 50px;
+// }
+// }
+// }
+// }
+.base-modal-body {
+ textarea {
+ width: 100%;
+ }
+}
diff --git a/src/pu/pu/pub/beforeevent/index.js b/src/pu/pu/pub/beforeevent/index.js
new file mode 100644
index 0000000..59cd0f6
--- /dev/null
+++ b/src/pu/pu/pub/beforeevent/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import vfreeBeforeEvent from './vfreeBeforeEvent';
+export { vfreeBeforeEvent };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/beforeevent/vfreeBeforeEvent.js b/src/pu/pu/pub/beforeevent/vfreeBeforeEvent.js
new file mode 100644
index 0000000..f6cda15
--- /dev/null
+++ b/src/pu/pu/pub/beforeevent/vfreeBeforeEvent.js
@@ -0,0 +1,50 @@
+/*VN6N61ClU/zPuqLSyAXrv/eGDVilyv4Ro7xQwZ88yi8=*/
+/**
+ * 物料自由辅助属性编辑前处理,需要物料的固定辅助属性库存状态启用
+ * 这类方法必须有返回值,返回true为可编辑,false为不可编辑
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+
+export default function(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let pk_org = constance && constance.params && constance.params.pk_org;
+ let materialvid = constance && constance.params && constance.params.materialvid;
+ if (pk_org != null && materialvid != null) {
+ let data = {
+ key: constance.key,
+ params: constance.params
+ };
+ ajax({
+ url: '/nccloud/pu/pub/beforeevent.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);
+ }
+ });
+}
+
+/*VN6N61ClU/zPuqLSyAXrv/eGDVilyv4Ro7xQwZ88yi8=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/btnClicks/fileBatchDownLoadBtnClick.js b/src/pu/pu/pub/btnClicks/fileBatchDownLoadBtnClick.js
new file mode 100644
index 0000000..443abc9
--- /dev/null
+++ b/src/pu/pu/pub/btnClicks/fileBatchDownLoadBtnClick.js
@@ -0,0 +1,44 @@
+/*QcLSJcLBIfi1P6u/kyYYQm1/ZimxEJq99gE17fMMmbVvwZRPywLNhokJ+vfJUIwD*/
+/*
+ * @Author: heyfn
+ * @PageInfo: 附件批量下载
+ * @Date: 2023-06-13 10:17:12
+ * @Last Modified by: heyfn
+ * @Last Modified time: 2023-06-20 14:12:26
+ */
+import { showWarningInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import attachments from 'uap/common/components/getAttachmentInfo';
+
+/**
+ *
+ * @param {*} props
+ * @param {*} tableArea
+ * @param {*} billType
+ * @param {*} pkstr 各单据的主键信息
+ * @returns
+ */
+export default function(props, tableArea, billType, pkstr) {
+ const { batchDownloadAttachments } = attachments;
+ let checkdatas = props.table.getCheckedRows(tableArea);
+ if (!checkdatas || Object.keys(checkdatas).length == 0) {
+ showWarningInfo('', getLangByResId(this, '4004pub-000006')); /* 国际化处理: 请先选择数据*/
+ return;
+ }
+ let params = [];
+ checkdatas.forEach((element) => {
+ let param = {
+ billId: element.data.values[pkstr].value,
+ folderName: element.data.values.vbillcode.value
+ };
+ params.push(param);
+ });
+ let datetime = new Date().Format('yyyyMMddhhmmss');
+ let additionParams = {
+ // zip包名称:单据类型(多语)+客户端时间(其它出库20230619110324)
+ zipFileName: billType + datetime
+ };
+ batchDownloadAttachments(params, additionParams);
+}
+
+/*QcLSJcLBIfi1P6u/kyYYQm1/ZimxEJq99gE17fMMmbVvwZRPywLNhokJ+vfJUIwD*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/constance/index.js b/src/pu/pu/pub/constance/index.js
new file mode 100644
index 0000000..3551de0
--- /dev/null
+++ b/src/pu/pu/pub/constance/index.js
@@ -0,0 +1,16 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: NC模块的枚举类
+ * @Date: 2019-12-10 09:57:36
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-03-18 08:38:09
+ */
+const NCModule = {
+ RUM: '4580', //易耗品管理
+ SSCIVM: '1058', //共享发票管理
+};
+
+export { NCModule };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/enum/index.js b/src/pu/pu/pub/enum/index.js
new file mode 100644
index 0000000..e645e36
--- /dev/null
+++ b/src/pu/pu/pub/enum/index.js
@@ -0,0 +1,79 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/**
+ * 购销类型枚举
+ */
+const BuySellFlagEnum = {
+ IMPORT: '4', //进口
+ NATIONAL_BUY: '2', // 国内采购
+ NATIONAL_SELL: '1', // 国内销售
+ NO_DISTINCT: '5', //不区分
+ OUTPUT: '3' //出口
+};
+/**
+ * 采购管理单据类型
+ */
+const TOBillType = {
+ storereq: '422X', //物资需求申请单
+ praybill: '20', //请购单
+ pooder: '21', //采购订单
+ arrive: '23', //到货单
+ puinvoice: '25', //采购发票
+ initialest: '4T' //期初暂估单
+};
+
+const TOItemKey = {
+ vbatchcode: 'vbatchcode',
+ pk_batchcode: 'pk_batchcode',
+ cproductorid: 'cproductorid',
+ cvmivenderid: 'cvmivenderid',
+ ctplcustomerid: 'ctplcustomerid',
+ cprojectid: 'cprojectid',
+ casscustid: 'casscustid',
+ cwarehouseid: 'cwarehouseid',
+ ctoutstordocid: 'ctoutstordocid',
+ cinstordocid: 'cinstordocid',
+ coutstordocid: 'coutstordocid',
+ cvendorid: 'cvendorid',
+ blargessflag: 'blargessflag',
+ castunitid: 'castunitid',
+ cunitid: 'cunitid',
+ cbiztypeid: 'cbiztypeid',
+ cmaterialoid: 'cmaterialoid',
+ cinventoryid: 'cinventoryid',
+ cinventoryvid: 'cinventoryvid',
+ corigcurrencyid: 'corigcurrencyid',
+ cqtunitid: 'cqtunitid',
+ crowno: 'crowno',
+ dbilldate: 'dbilldate',
+ fstatusflag: 'fstatusflag',
+ pk_group: 'pk_group',
+ pk_org: 'pk_org',
+ coutstockorgid: 'coutstockorgid',
+ ctoutstockorgid: 'ctoutstockorgid',
+ cinstockorgid: 'cinstockorgid',
+ vbillcode: 'vbillcode',
+ vchangerate: 'vchangerate',
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ vqtunitrate: 'vqtunitrate',
+ vtrantypecode: 'vtrantypecode',
+ nnum: 'nnum',
+ nastnum: 'nastnum',
+ cffileid: 'cffileid',
+ nqtunitnum: 'nqtunitnum',
+ countryid: 'countryid',
+ csrcid: 'csrcid',
+ vsrctype: 'vsrctype'
+};
+
+export { BuySellFlagEnum, TOBillType };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/linkQuery/ntpLinkList.js b/src/pu/pu/pub/linkQuery/ntpLinkList.js
new file mode 100644
index 0000000..c409e05
--- /dev/null
+++ b/src/pu/pu/pub/linkQuery/ntpLinkList.js
@@ -0,0 +1,42 @@
+/*LvKZGJUPu9AdP82RRvXHl+FG2swVAA70Wntb9bm/eLA=*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 单据联查采购计划联查到本单据的数据加载
+ * @Date: 2020-03-09 14:31:35
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-03-11 14:36:38
+ */
+import { ajax } from 'nc-lightapp-front';
+export default function ntpLinkList(props, config, callback) {
+ let pk_ntbparadimvo = props.getUrlParam('pk_ntbparadimvo');
+ let { cardUrl, listFormId } = config;
+ ajax({
+ url: '/nccloud/pu/buyingreq/ntpLinkList.do',
+ data: pk_ntbparadimvo,
+ success: (res) => {
+ let { success, data } = res;
+ if (!success) {
+ return;
+ }
+ if (typeof data == 'string') {
+ // 联查出来一条,跳到卡片
+ props.pushTo(cardUrl, {
+ status: 'browse',
+ id: data
+ });
+ } else {
+ // 联查出来多条,列表加载
+ let rowsData = { rows: [] };
+ if (res.data && res.data.currentGrid && res.data.currentGrid[listFormId]) {
+ rowsData = res.data.currentGrid[listFormId];
+ }
+ this.props.table.setAllTableData(listFormId, rowsData);
+ if (typeof callback == 'function') {
+ callback.call(this, props);
+ }
+ }
+ }
+ });
+}
+
+/*LvKZGJUPu9AdP82RRvXHl+FG2swVAA70Wntb9bm/eLA=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/refBillQueryCache/refBillQueryCache.js b/src/pu/pu/pub/refBillQueryCache/refBillQueryCache.js
new file mode 100644
index 0000000..3084996
--- /dev/null
+++ b/src/pu/pu/pub/refBillQueryCache/refBillQueryCache.js
@@ -0,0 +1,26 @@
+/*Q9h2lEPSi9uOyiicpriIz1dAnoyWxWJofzuUoMCwIPY=*/
+/*
+ * @Author: CongKe
+ * @PageInfo:来源单据查询缓存
+ * @Date: 2018-10-17 11:01:16
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2018-10-17 11:13:33
+ */
+import { ajax } from 'nc-lightapp-front';
+import { setDefData } from '../../../../scmpub/scmpub/pub/cache';
+
+export function refBillQueryCache(refBillQueryData, dataSource, cacheKey) {
+ ajax({
+ url: '/nccloud/pu/pub/refbillqueryaction.do',
+ data: refBillQueryData,
+ success: (res) => {
+ if (res.success) {
+ if (res.data) {
+ setDefData(dataSource, cacheKey, res.data);
+ }
+ }
+ }
+ });
+}
+
+/*Q9h2lEPSi9uOyiicpriIz1dAnoyWxWJofzuUoMCwIPY=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/referFeeCTGrid/ctGrid.js b/src/pu/pu/pub/referFeeCTGrid/ctGrid.js
new file mode 100644
index 0000000..190e31c
--- /dev/null
+++ b/src/pu/pu/pub/referFeeCTGrid/ctGrid.js
@@ -0,0 +1,142 @@
+/*NPzdLkkgounwjb/v/E6woGOUGRdBhygGRdHAk89Gvk8=*/
+/*
+ * @Author: hechenk
+ * @PageInfo: 页面功能描述
+ * @Date: 2023-06-13 16:47:05
+ * @Last Modified by: hechenk
+ * @Last Modified time: 2023-08-30 14:36:33
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { createPage } from 'nc-lightapp-front';
+import { ajax, promptBox } from 'nc-lightapp-front';
+const TABLE_ID = 'pk_ct_pu';
+
+class RelateCTDLG extends Component {
+ constructor(props) {
+ super(props);
+ props.use.editTable(TABLE_ID);
+ this.state = { indexs: {} };
+ props.getInstance(this);
+ this.initTemplate();
+ }
+
+ initTemplate = () => {
+ ajax({
+ url: '/nccloud/platform/templet/querypage.do',
+ data: {
+ appcode: '400400800',
+ pagecode: '400400800_ct',
+ },
+ success: (res) => {
+ let meta = res.data;
+ this.props.meta.setMeta(meta);
+ this.initData();
+ },
+ });
+ };
+
+
+ getCheckRows = ()=>{
+ let data = {};
+ let checkRows = this.props.editTable.getCheckedRows(TABLE_ID);
+ if(checkRows == null){
+ return null;
+ }
+ for(let i = 0; i < checkRows.length; i ++){
+ data[checkRows[i].data.values.srcrowid.value] = checkRows[i].data.values.pk_ct_pu_b.value;
+ }
+ return data;
+ }
+
+ //请求列表数据
+ initData = () => {
+ let showdata = null;
+ if (this.props.tableRows == undefined && this.props.tableRows == null) {
+ showdata = { rows: [] };
+ } else {
+ for(let i = 0; i < this.props.tableRows.length - 1; i += 1) {
+ for(let j = 0; j < this.props.tableRows.length - 1 - i; j += 1) {
+ if(this.props.tableRows[j].values.crowno.value > this.props.tableRows[j+1].values.crowno.value) {
+ const temp = this.props.tableRows[j];
+ this.props.tableRows[j] = this.props.tableRows[j+1];
+ this.props.tableRows[j+1] = temp;
+ }
+ }
+ }
+ showdata = { rows: this.props.tableRows };
+ }
+ this.props.editTable.setTableData(TABLE_ID, showdata);
+ };
+
+ // 复选框全选
+ onSelectedAll = (props, moduleId, status, length) => {
+ if (status) {
+ let rows = [];
+ let selectFalg = 'false'; //判断是否新增选择数据
+ for (let index = 0; index < length; index++) {
+ let srcrowid = props.editTable.getValByKeyAndIndex(moduleId, index, 'srcrowid').value;
+ if (this.state.indexs[srcrowid] != undefined && this.state.indexs[srcrowid] != null) {
+ if (this.state.indexs[srcrowid] === index) {
+ continue;
+ }
+ rows.push(index);
+ } else {
+ this.state.indexs[srcrowid] = index;
+ selectFalg = 'true';
+ }
+ }
+ this.props.editTable.selectTableRows(moduleId, rows, false);
+ // 若一个物料有多个合同,点击多选时,若已选数据,则清空
+ if (selectFalg == 'false') {
+ this.state.indexs = {};
+ this.props.editTable.selectAllRows(TABLE_ID, false);
+ }
+ }else{
+ this.state.indexs = {};
+ }
+ };
+ // 复选框单选
+ // 一行订单只能关联一个合同行
+ onSelected = (props, moduleId, record, index, status) => {
+ // 如果是选中
+ let srcrowid = record.values.srcrowid.value;
+ if (status) {
+ // 如
+ if (this.state.indexs[srcrowid] != undefined && this.state.indexs[srcrowid] != null) {
+ this.props.editTable.selectTableRows(moduleId, this.state.indexs[srcrowid], false);
+ this.state.indexs[srcrowid] = index;
+ Object.keys(this.state.indexs).forEach((key) => {
+ this.props.editTable.selectTableRows(moduleId, this.state.indexs[key], true);
+ });
+ } else {
+ this.state.indexs[srcrowid] = index;
+ }
+ } else {
+ this.state.indexs[srcrowid] = null;
+ }
+ };
+
+ render() {
+ let { editTable } = this.props;
+ let { createEditTable } = editTable;
+ return (
+
+ {createEditTable(TABLE_ID, {
+ onSelectedAll: this.onSelectedAll.bind(this),
+ onSelected: this.onSelected.bind(this),
+ showCheck: true,
+ adaptionHeight: false,
+ inModal: true,
+ cancelCustomRightMenu: true, //动态列禁用保存列宽
+ })}
+
+ );
+ }
+}
+
+RelateCTDLG = createPage({})(RelateCTDLG);
+
+export default RelateCTDLG;
+
+/*NPzdLkkgounwjb/v/E6woGOUGRdBhygGRdHAk89Gvk8=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/referFeeCTGrid/index.js b/src/pu/pu/pub/referFeeCTGrid/index.js
new file mode 100644
index 0000000..0c2c59e
--- /dev/null
+++ b/src/pu/pu/pub/referFeeCTGrid/index.js
@@ -0,0 +1,152 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: hechenk
+ * @PageInfo: 关联费用合同
+ * @Date: 2023-06-12 13:44:26
+ * @Last Modified by: hechenk
+ * @Last Modified time: 2023-09-27 13:36:01
+ */
+
+import React from 'react';
+import { promptBox,deepClone } from 'nc-lightapp-front';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import RelateCTDLG from './ctGrid';
+export default function (props = {}, areaCode, index, length, ctAfterEvent, userObject) {
+ showBox.call(this, props, areaCode, index, length, ctAfterEvent, userObject)
+}
+
+function showBox(props, areaCode, index, length, ctAfterEvent, userObject){
+ let ctgrid = userObject.CTGrid;
+ if (ctgrid == null) {
+ return;
+ }
+ let indexs = [];
+ index = index != null ? index : props.cardTable.getNumberOfRows(areaCode) - length;
+ index = index < 0 ? 0 : index;
+ if (indexs.length == 0) {
+ for (let i = 0; i < length; i++) {
+ indexs.push(index + i);
+ }
+ }
+ let rows = [];
+ props.cardTable.getRowsByIndexs(areaCode, indexs).forEach((row) => {
+ if(row.values.cfeematerialvid &&
+ row.values.cfeematerialvid.value && row.values.corigcurrencyid &&
+ row.values.corigcurrencyid.value && row.values.cfeesupplieroid &&
+ row.values.cfeesupplieroid.value){
+ rows.push(row);
+ }
+ });
+ promptBox({
+ color: 'warning', // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: getLangByResId(this, '4004pub-000011'), // 弹框表头信息/* 国际化处理: 关联合同*/
+ content: getLangByResId(this, '4004pub-000012'), //弹框内容,可以是字符串或dom/* 国际化处理: 确定要关联合同吗?*/
+ leftBtnName: getLangByResId(this, '4004pub-000013') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(this, '4004pub-000014') /* 国际化处理: 取消*/,
+ beSureBtnClick: buSureClick.bind(this, props, rows, ctAfterEvent, areaCode, ctgrid), //点击确定按钮事件
+ cancelBtnClick: () => {
+ return;
+ },
+ });
+}
+
+function buSureClick(props, rows, ctAfterEvent, areaCode, ctgrid) {
+ let tableData = [];
+ for (let j = 0; j < ctgrid.pk_ct_pu.rows.length; j++) {
+ let gRow = ctgrid.pk_ct_pu.rows[j];
+ for (let i = 0; i < rows.length; i++){
+ let row = rows[i];
+ if (
+ row.values.cfeematerialvid &&
+ row.values.cfeematerialvid.value == gRow.values.pk_material.value &&
+ row.values.corigcurrencyid &&
+ row.values.corigcurrencyid.value == gRow.values.corigcurrencyid.value &&
+ row.values.cfeesupplieroid &&
+ row.values.cfeesupplieroid.value == gRow.values.cvendorid.value
+ ) {
+ let cloneRow = deepClone(ctgrid.pk_ct_pu.rows[j]);
+ cloneRow.values.srcrowid = { value: row.rowid };
+ cloneRow.values.crowno = { display: row.values.crowno.value, value: row.values.crowno.value };
+ //克隆
+ tableData.push(cloneRow);
+ }
+ }
+ }
+ if (tableData.length == 1) {
+ let ctrow = tableData[0];
+ for (let i = 0; i < rows.length; i++) {
+ let row = rows[i];
+ if (
+ row.values.cfeematerialvid &&
+ row.values.cfeematerialvid.value == ctrow.values.pk_material.value &&
+ row.values.corigcurrencyid &&
+ row.values.corigcurrencyid.value == ctrow.values.corigcurrencyid.value &&
+ row.values.cfeesupplieroid &&
+ row.values.cfeesupplieroid.value == ctrow.values.cvendorid.value
+ ) {
+ props.cardTable.setValByKeyAndRowId(areaCode, row.rowid, 'cctid', {
+ value: ctrow.values.pk_ct_pu_b.value,
+ });
+ let changedrows = [
+ { oldvalue: { value: '' }, newvalue: { value: ctrow.values.pk_ct_pu_b.value }, rowid: row.rowid },
+ ];
+ row.values.cctid = { value: ctrow.values.pk_ct_pu_b.value };
+ ctAfterEvent.call(this, props, areaCode, 'cctid', row, changedrows, row.dataIndex, row);
+ break;
+ }
+ }
+ return;
+ }
+
+ props.modal.show('MessageDlg', {
+ zIndex: 350,
+ title: getLangByResId(this, '4004pub-000011'), // 弹框表头信息/* 国际化处理: 采购订单关联合同*/
+ content: (
+ (this.CTDLG = com)}
+ tableRows={tableData}
+ />
+ ), //弹框内容,可以是字符串或dom
+ leftBtnName: getLangByResId(this, '4004pub-000013') /* 国际化处理: 确定*/,
+ rightBtnName: getLangByResId(this, '4004pub-000014') /* 国际化处理: 取消*/,
+ beSureBtnClick: relateCT.bind(this, props, rows, areaCode, ctAfterEvent), //点击确定按钮事件
+ cancelBtnClick: () => {
+ return;
+ },
+ });
+}
+
+function relateCT(props, rows, areaCode, ctAfterEvent) {
+ let ctRows = this.CTDLG.getCheckRows();
+ if(ctRows == null){
+ return;
+ }
+ let newRows = [];
+ let changedrows = [];
+ let indexs = [];
+ Object.keys(ctRows).forEach((key) => {
+ if (ctRows[key] != null) {
+ for (let i = 0; i < rows.length; i++) {
+ let row = rows[i];
+ if (key == row.rowid) {
+ props.cardTable.setValByKeyAndRowId(areaCode, key, 'cctid', { value: ctRows[key] });
+ row.values.cctid = { value: ctRows[key] };
+ newRows.push(row);
+ indexs.push(row.dataIndex);
+ changedrows.push({
+ oldvalue: { value: '' },
+ newvalue: { value: ctRows[key] },
+ rowid: key,
+ });
+ break;
+ }
+ }
+ }
+ });
+ if (newRows.length > 0) {
+ ctAfterEvent.call(this, props, areaCode, 'cctid', newRows, changedrows, indexs, newRows);
+ }
+}
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/remoteCall/remoteCheck.js b/src/pu/pu/pub/remoteCall/remoteCheck.js
new file mode 100644
index 0000000..064f913
--- /dev/null
+++ b/src/pu/pu/pub/remoteCall/remoteCheck.js
@@ -0,0 +1,24 @@
+/*tPoDUQm6O2WSjaOrwRkECcVxHneumMENSLx+e+bJJks=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 远程校验
+ * @Date: 2018-04-25 20:46:23
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-04-27 09:18:33
+ */
+import { ajax } from 'nc-lightapp-front';
+
+export default function remoteSagasCheck(url, data, callBack) {
+ ajax({
+ url: url,
+ data: data,
+ method: 'post',
+ success: res => {
+ if (res && res.success) {
+ callBack && callBack();
+ }
+ },
+ });
+}
+
+/*tPoDUQm6O2WSjaOrwRkECcVxHneumMENSLx+e+bJJks=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/remoteCall/remoteSagasCheck.js b/src/pu/pu/pub/remoteCall/remoteSagasCheck.js
new file mode 100644
index 0000000..5c68519
--- /dev/null
+++ b/src/pu/pu/pub/remoteCall/remoteSagasCheck.js
@@ -0,0 +1,24 @@
+/*6qpAkcISpqHRuSGEj/9ETDzz8+PCx8tDjPOuOBbCkts=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 单据sagas事务状态校验
+ * @Date: 2018-04-25 20:46:23
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-12-27 10:58:38
+ */
+import { ajax } from 'nc-lightapp-front';
+
+export default function remoteSagasCheck(url, data, callBack) {
+ ajax({
+ url: url,
+ data: data,
+ method: 'post',
+ success: res => {
+ if (res && res.success) {
+ callBack && callBack();
+ }
+ },
+ });
+}
+
+/*6qpAkcISpqHRuSGEj/9ETDzz8+PCx8tDjPOuOBbCkts=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/remoteCall/sysModuleCheck.js b/src/pu/pu/pub/remoteCall/sysModuleCheck.js
new file mode 100644
index 0000000..001125f
--- /dev/null
+++ b/src/pu/pu/pub/remoteCall/sysModuleCheck.js
@@ -0,0 +1,27 @@
+/*w+L4tHQ/H/4dnNMz6cvk4DuSoBpxZje7kmta6SnwTlc=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: 公共模块启用判断
+ * @Date: 2018-09-11 14:14:05
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-03-20 10:03:07
+ */
+import { ajax } from 'nc-lightapp-front';
+import { showErrorInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil.js';
+
+export default function sysModuleCheck(data, content, callBack) {
+ ajax({
+ url: '/nccloud/scmpub/pub/sysinitgroup.do', //公共模块启用判断
+ data: [data],
+ method: 'post',
+ success: res => {
+ if (res && res.data && res.data[data]) {
+ callBack && callBack();
+ } else {
+ showErrorInfo(null, content); /* 国际化处理: 模块未启用!*/
+ }
+ },
+ });
+}
+
+/*w+L4tHQ/H/4dnNMz6cvk4DuSoBpxZje7kmta6SnwTlc=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/setPiece/constance/constance.js b/src/pu/pu/pub/setPiece/constance/constance.js
new file mode 100644
index 0000000..7ef3edc
--- /dev/null
+++ b/src/pu/pu/pub/setPiece/constance/constance.js
@@ -0,0 +1,28 @@
+/*vIEF5TBuhnpXm+4696Go4KlaPC7E5RdyMvobcMwOSds=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 成套件常量
+ * @Date: 2018-04-17 14:00:27
+ * @Last Modified by: jiangfw
+ * @Last Modified time: 2019-04-11 13:51:43
+*/
+
+//应用编码
+const APPCODE = {
+ setPiece: '400403204'
+};
+
+//页面编码
+const PAGECODE = {
+ setPieceCard: '400403204_SetPiece'
+};
+
+//区域编码
+const AREA = {
+ headSetPiece: 'headSetPiece',
+ bodySetPiece: 'bodySetPiece'
+};
+
+export { APPCODE, PAGECODE, AREA };
+
+/*vIEF5TBuhnpXm+4696Go4KlaPC7E5RdyMvobcMwOSds=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/setPiece/index.js b/src/pu/pu/pub/setPiece/index.js
new file mode 100644
index 0000000..d38732c
--- /dev/null
+++ b/src/pu/pu/pub/setPiece/index.js
@@ -0,0 +1,67 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 成套件
+ * @Date: 2018-06-28 09:15:54
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-08-12 16:42:05
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal } = base;
+import { initTemplate } from './init';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { AREA } from './constance/constance';
+import './index.less';
+
+class SetPiece extends Component {
+ constructor(props) {
+ super(props);
+ props.use.table(AREA.headSetPiece);
+ props.use.table(AREA.bodySetPiece);
+ initLang(this, [ '4004setpiece' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (nextProps && nextProps.showModal && nextProps.setPieceData) {
+ this.showSetPiece(nextProps.setPieceData);
+ } else {
+ nextProps.showModal = false;
+ }
+ }
+
+ //展示数据
+ showSetPiece(setPieceData) {
+ this.props.table.setAllTableData(AREA.headSetPiece, setPieceData[0].head.headSetPiece);
+ this.props.table.setAllTableData(AREA.bodySetPiece, setPieceData[0].body.bodySetPiece);
+ }
+
+ render() {
+ const { createSimpleTable } = this.props.table;
+ return (
+
+
+
+ {getLangByResId(this, '4004SETPIECE-000001') /* 国际化处理: 成套件信息*/}
+
+
+ {createSimpleTable(AREA.headSetPiece)}
+
+ {createSimpleTable(AREA.bodySetPiece, { showIndex: true })}
+
+
+
+
+ );
+ }
+}
+export default (SetPiece = createPage({})(SetPiece));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/setPiece/index.less b/src/pu/pu/pub/setPiece/index.less
new file mode 100644
index 0000000..0292148
--- /dev/null
+++ b/src/pu/pu/pub/setPiece/index.less
@@ -0,0 +1,10 @@
+// 根据平台的上下表格,上表格高度固定,下表格高度自适应适配方案适配
+.top-table {
+ height: 120px;
+}
+
+.bottom-table {
+ .table-next-body-inner-wrapper {
+ // max-height: none !important;
+ }
+}
diff --git a/src/pu/pu/pub/setPiece/init/index.js b/src/pu/pu/pub/setPiece/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/pub/setPiece/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/setPiece/init/initTemplate.js b/src/pu/pu/pub/setPiece/init/initTemplate.js
new file mode 100644
index 0000000..451e34e
--- /dev/null
+++ b/src/pu/pu/pub/setPiece/init/initTemplate.js
@@ -0,0 +1,28 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 成套件
+ * @Date: 2018-06-28 09:15:54
+ * @Last Modified by: jiangfw
+ * @Last Modified time: 2018-12-10 13:59:23
+ */
+import { APPCODE, PAGECODE } from '../constance/constance';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: APPCODE.setPiece, //应用编码
+ pagecode: PAGECODE.setPieceCard //页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta);
+ }
+ }
+ }
+ );
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/stockQuery/constance/constance.js b/src/pu/pu/pub/stockQuery/constance/constance.js
new file mode 100644
index 0000000..62923f5
--- /dev/null
+++ b/src/pu/pu/pub/stockQuery/constance/constance.js
@@ -0,0 +1,32 @@
+/*vIEF5TBuhnpXm+4696Go4KlaPC7E5RdyMvobcMwOSds=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 存量查询常量
+ * @Date: 2018-04-17 14:00:27
+ * @Last Modified by: jiangfw
+ * @Last Modified time: 2019-04-11 13:51:43
+*/
+
+//应用编码
+const APPCODE = {
+ stockquery: '400403206'
+};
+
+//页面编码
+const PAGECODE = {
+ stockquery: '400403206_stockquery'
+};
+
+//区域编码
+const AREA = {
+ head: 'head'
+};
+
+// url
+const URL = {
+ stockquery: '/nccloud/pu/pub/stockQuery.do' //卡片存量查询
+};
+
+export { APPCODE, PAGECODE, AREA, URL };
+
+/*vIEF5TBuhnpXm+4696Go4KlaPC7E5RdyMvobcMwOSds=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/stockQuery/index.js b/src/pu/pu/pub/stockQuery/index.js
new file mode 100644
index 0000000..96b3055
--- /dev/null
+++ b/src/pu/pu/pub/stockQuery/index.js
@@ -0,0 +1,92 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 存量查询
+ * @Date: 2018-06-28 09:15:54
+ * @Last Modified by: hufeim
+ * @Last Modified time: 2023-03-30 14:06:27
+ */
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+import { base, createPage, ajax } from 'nc-lightapp-front';
+const { NCModal } = base;
+import { initTemplate } from './init';
+import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { AREA, URL } from './constance/constance';
+
+class StockQuery extends Component {
+ constructor(props) {
+ super(props);
+ props.use.table(AREA.head);
+ this.state = {
+ queryDataFlag: false
+ };
+ initLang(this, [ '4004stockquery' ], 'pu', initTemplate.bind(this, this.props));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (this.state.queryDataFlag) {
+ this.setState({
+ queryDataFlag: false
+ });
+ return;
+ }
+ if (nextProps && nextProps.stockquerydata != null && nextProps.showModal) {
+ this.queryData(nextProps.stockquerydata);
+ }
+ }
+
+ //查询数据
+ queryData = (param) => {
+ ajax({
+ url: URL.stockquery,
+ data: param,
+ success: (res) => {
+ let { success, data } = res;
+ let rowsData = { rows: [] };
+ if (data) {
+ //初始化模型
+ rowsData = data[AREA.head];
+ }
+ this.setState(
+ {
+ queryDataFlag: true
+ },
+ () => {
+ this.props.table.setAllTableData(AREA.head, rowsData);
+ }
+ );
+ }
+ });
+ };
+
+ render() {
+ const { createSimpleTable } = this.props.table;
+ return (
+
+
+
+ {getLangByResId(this, '4004STOCKQUERY-000001') /* 国际化处理: 存量查询*/}
+
+
+ {/* 列表区域 */}
+ {createSimpleTable(AREA.head, {
+ adaptionHeight: true,
+ showIndex: true
+ })}
+
+
+
+ );
+ }
+}
+export default (StockQuery = createPage({})(StockQuery));
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/stockQuery/init/index.js b/src/pu/pu/pub/stockQuery/init/index.js
new file mode 100644
index 0000000..fea49ae
--- /dev/null
+++ b/src/pu/pu/pub/stockQuery/init/index.js
@@ -0,0 +1,5 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import initTemplate from './initTemplate';
+export { initTemplate };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/stockQuery/init/initTemplate.js b/src/pu/pu/pub/stockQuery/init/initTemplate.js
new file mode 100644
index 0000000..78e125e
--- /dev/null
+++ b/src/pu/pu/pub/stockQuery/init/initTemplate.js
@@ -0,0 +1,28 @@
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 存量查询
+ * @Date: 2018-06-28 09:15:54
+ * @Last Modified by: jiangfw
+ * @Last Modified time: 2018-12-10 13:59:23
+ */
+import { APPCODE, PAGECODE } from '../constance/constance';
+
+export default function(props) {
+ props.createUIDom(
+ {
+ appcode: APPCODE.stockquery, //应用编码
+ pagecode: PAGECODE.stockquery //页面编码
+ },
+ (data) => {
+ if (data) {
+ if (data.template) {
+ let meta = data.template;
+ props.meta.setMeta(meta);
+ }
+ }
+ }
+ );
+}
+
+/*pmFWCFu5nhKkBzYmrkBakbni3xp+L8XBbd4TFSSy2cQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/utils/batchCodeUtil.js b/src/pu/pu/pub/utils/batchCodeUtil.js
new file mode 100644
index 0000000..9ddfe7f
--- /dev/null
+++ b/src/pu/pu/pub/utils/batchCodeUtil.js
@@ -0,0 +1,360 @@
+/*4VoJIv61OY1El5T1vinMVPUNAyJEYO5+FVKu/IvLzow=*/
+import { TOBillType } from '../enum';
+import { deepClone } from 'nc-lightapp-front';
+
+// ---------------------------------批次号编辑后处理------------------------------------------------
+/**
+ * 处理批次号返回值
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} rows
+ * @param {*} clearfields 需要清空字段的数组
+ */
+
+function processBatchCodeValue(props, moduleId, rows, clearfields) {
+ if (!rows) {
+ return;
+ }
+
+ if (rows.length == 0) {
+ return;
+ }
+ // add by chaiwx,row.values中存在一个refpk='xxxx'的字段,暂时无用,但会导致后台报错。这里清空一下。
+ rows.forEach((row) => {
+ if (row && row.values && row.values.refpk) {
+ row.values.refpk = {};
+ }
+ });
+ // 构建批次号后台结构
+ let grid = {
+ model: {
+ rows: rows
+ }
+ };
+ return {
+ scm_vbatchcode: JSON.stringify(grid),
+ scm_clearfields: clearfields
+ };
+}
+
+function processBatchCodeAfterEdit(props, moduleId, record, index, rows, clearFields) {
+ if (!record && !rows) {
+ return;
+ }
+ let returnRows = rows[0]
+ ? rows[0].preStore ? rows[0].preStore : rows[0].usable ? rows[0].usable : rows[0].addBatch
+ : [];
+ let newRow = processBatchCodeReturnData(record, returnRows, clearFields);
+ if (newRow) {
+ let indexArray = [ index + '' ];
+ //第一个元素更新,剩余的元素插入
+ props.cardTable.updateDataByIndexs(moduleId, newRow[0]);
+ if (newRow.length > 0) {
+ //从第二个元素开始循环,构建数组用来新增
+ let insertRows = [];
+ for (let i = 1; i < newRow.length; i++) {
+ let insertRow = { index: index + i, data: newRow[i] };
+ insertRows.push(insertRow);
+ indexArray.push(index + i + '');
+ }
+ props.cardTable.insertDataByIndexs(moduleId, insertRows);
+ }
+ return indexArray;
+ }
+}
+
+/**
+ * 处理批次号返回值
+ * @param {*} oldRow
+ * @param {*} newRows
+ * @param {*} clearFields
+ */
+function processBatchCodeReturnData(oldRow, newRows, clearFields) {
+ if (!oldRow || !newRows || !newRows[0]) {
+ return oldRow;
+ }
+ let realRows = [];
+ if (newRows.length == 1) {
+ realRows.push(processCurRow(oldRow, newRows[0]));
+ } else {
+ realRows.push(processCurRow(oldRow, newRows[0]));
+ for (let i = 1; i < newRows.length; i++) {
+ let tempRow = deepClone(oldRow);
+ tempRow.status = 2;
+ // 清空行号
+ clearRowFields(tempRow, clearFields);
+ realRows.push(processCurRow(tempRow, newRows[i]));
+ }
+ }
+ return realRows;
+}
+
+/**
+ * 清空复制的行的相关字段
+ * @param {*} row
+ * @param {*} clearFields
+ */
+function clearRowFields(row, clearFields) {
+ row.values['crowno'] = { value: null, display: null };
+ if (clearFields) {
+ clearFields.forEach((field) => {
+ let scale = row.values[field].scale;
+ row.values[field] = { value: null, scale: scale, display: null };
+ });
+ }
+}
+
+/**
+ * 处理单行数据
+ * @param {*} oldRow
+ * @param {*} newRow
+ */
+function processCurRow(oldRow, newRow) {
+ if (!oldRow || !newRow) {
+ return [ oldRow ];
+ }
+ oldRow.values['pk_batchcode'] = newRow.values['pk_batchcode'];
+ //单据上批次号是参照类型,参照框中是字符串类型,参照类型不许要有display才能显示
+ oldRow.values['vbatchcode'] = newRow.values['vbatchcode']
+ ? { value: newRow.values['vbatchcode'].value, display: newRow.values['vbatchcode'].value }
+ : null;
+ return oldRow;
+}
+
+//----------------------------------批次号编辑前处理---------------------------------------------
+/**
+ * 处理批次号字段
+ * @param {*} props
+ * @param {*} moduleId 区域ID
+ * @param {*} key item字段
+ * @param {*} headData 当前行数据
+ * @param {*} billtype 单据类型
+ */
+function processBatchCodeItem(props, moduleIds, key, headData, billtype) {
+ // 预处理数据
+ let headRows = processBatchCodeHeadData(headData, billtype);
+ this.setState({
+ headRows: headRows
+ });
+ // 渲染对应的批次号
+ let meta = props.meta.getMeta();
+
+ if (moduleIds instanceof Array) {
+ moduleIds.forEach((moduleId) => {
+ let item = meta[moduleId].items.find((item) => item.attrcode == key);
+ item.itemtype = 'refer';
+ item.refcode = 'ic/refer/onhand/onhandRef/index.js';
+ item.headRows = headRows;
+ item.appcode = '400403200';
+ item.headTemplateCode = '400403200_batchcodeH';
+ item.bodyTemplateCode = '400403200_batchcodeB';
+ });
+ } else {
+ let item = meta[moduleIds].items.find((item) => item.attrcode == key);
+ item.itemtype = 'refer';
+ item.refcode = 'ic/refer/onhand/onhandRef/index.js';
+ item.headRows = headRows;
+ item.appcode = '400403200';
+ item.headTemplateCode = '400403200_batchcodeH';
+ item.bodyTemplateCode = '400403200_batchcodeB';
+ }
+
+ //item.undealNumCode = 'onhandshouldnum';
+ //item.thisNumCode = 'onhandcurrentnum';
+ //item.isSatisfyCode = 'fulfiltype';
+ // props.renderItem(meta[moduleId].moduletype, moduleId, key, null);
+ props.meta.setMeta(meta);
+}
+
+/**
+ * 处理批次号表头数据
+ * @param {*} headData
+ * @param {*} billtype
+ */
+function processBatchCodeHeadData(headData, billtype) {
+ let row = { values: {} };
+ Object.keys(BATCHCODEHEAD).forEach((key) => {
+ let field = BATCHCODEHEAD[key];
+ if (field == BATCHCODEHEAD.pk_group) {
+ //集团
+ } else if (field == BATCHCODEHEAD.cwarehouseid) {
+ //仓库
+ setWareHouseId(row, headData, field, billtype);
+ } else if (field == BATCHCODEHEAD.pk_org) {
+ //组织
+ setPkOrg(row, headData, field, billtype);
+ } else if (field == BATCHCODEHEAD.cmaterialvid) {
+ //物料版本
+ row.values[field] = headData.values['pk_material'];
+ } else if (field == BATCHCODEHEAD.cmaterialvid_name) {
+ //物料名称
+ row.values[field] = headData.values['pk_material.name'];
+ } else if (field == BATCHCODEHEAD.cmaterialvid_materialspec) {
+ //物料规格
+ row.values[field] = headData.values['pk_material.materialspec'];
+ } else if (field == BATCHCODEHEAD.cmaterialvid_materialtype) {
+ //物料型号
+ row.values[field] = headData.values['pk_material.materialtype'];
+ } else if (field == BATCHCODEHEAD.cmaterialoid) {
+ //物料
+ row.values[field] = headData.values['pk_srcmaterial'];
+ } else if (field == BATCHCODEHEAD.onhandshouldassnum) {
+ //待处理辅数量
+ row.values[field] = headData.values['nastnum'];
+ } else if (field == BATCHCODEHEAD.onhandshouldnum) {
+ //待处理主数量
+ row.values[field] = headData.values['nnum'];
+ } else if (field == BATCHCODEHEAD.cvmivenderid) {
+ //物权供应商(VMI)
+ setVmivenderId(row, headData, field, billtype);
+ } else if (field == BATCHCODEHEAD.cvendorid) {
+ //供应商
+ setCvendoridId(row, headData, field, billtype);
+ } else {
+ row.values[field] = headData.values[field];
+ }
+ });
+ return { rows: [ row ] };
+}
+
+/**
+ * 设置组织
+ * @param {*} row
+ * @param {*} headData
+ * @param {*} field
+ * @param {*} billtype
+ */
+function setPkOrg(row, headData, field, billtype) {
+ if (TOBillType.storereq === billtype) {
+ //物资需求申请单
+ row.values[field] = headData.values['pk_org'];
+ } else if (TOBillType.praybill === billtype) {
+ //请购单
+ row.values[field] = headData.values['pk_org'];
+ } else if (TOBillType.pooder === billtype) {
+ //采购订单
+ row.values[field] = headData.values['pk_reqstoorg'];
+ } else if (TOBillType.puinvoice == billtype) {
+ // 采购发票
+ row.values[field] = headData.values['pk_stockorg'];
+ } else {
+ //主组织
+ row.values[field] = headData.values['pk_org'];
+ }
+}
+/**
+ * 设置仓库
+ * @param {*} row
+ * @param {*} headData
+ * @param {*} field
+ * @param {*} billtype
+ */
+function setWareHouseId(row, headData, field, billtype) {
+ if (TOBillType.storereq === billtype) {
+ //物资需求申请单
+ row.values[field] = headData.values['pk_reqstordoc'];
+ } else if (TOBillType.praybill === billtype) {
+ //请购单
+ row.values[field] = headData.values['pk_reqstor'];
+ } else if (TOBillType.pooder === billtype) {
+ //采购订单 收货仓库
+ row.values[field] = headData.values['pk_recvstordoc'];
+ } else if (TOBillType.puinvoice == billtype) {
+ // 采购发票
+ row.values[field] = headData.values['pk_stordoc'];
+ } else if (TOBillType.arrive == billtype) {
+ //到货单
+ row.values[field] = headData.values['pk_receivestore'];
+ } else {
+ row.values[field] = headData.values['pk_reqstordoc'];
+ }
+}
+/**
+ * 设置供应商
+ * @param {*} row
+ * @param {*} headData
+ * @param {*} field
+ * @param {*} billtype
+ */
+function setVmivenderId(row, headData, field, billtype) {
+ if (TOBillType.storereq === billtype) {
+ //row.values[field] = headData.values['cvmivenderid'];
+ } else if (TOBillType.puinvoice == billtype) {
+ // 采购发票
+ // row.values[field] = headData.values['pk_supplier'];
+ } else {
+ //row.values[field] = headData.values['cvmivenderid'];
+ }
+}
+/**
+ * 设置供应商
+ * @param {*} row
+ * @param {*} headData
+ * @param {*} field
+ * @param {*} billtype
+ */
+function setCvendoridId(row, headData, field, billtype) {
+ if (TOBillType.storereq === billtype) {
+ row.values[field] = headData.values['cvendorid'];
+ } else if (TOBillType.praybill === billtype) {
+ //请购单
+ row.values[field] = headData.values['pk_suggestsupplier'];
+ } else if (TOBillType.pooder === billtype) {
+ //采购订单 供应商
+ row.values[field] = headData.values['pk_supplier'];
+ } else if (TOBillType.puinvoice == billtype) {
+ // 采购发票
+ row.values[field] = headData.values['pk_supplier'];
+ } else if (TOBillType.arrive == billtype) {
+ //到货单
+ row.values[field] = headData.values['pk_supplier'];
+ } else {
+ row.values[field] = headData.values[field];
+ }
+}
+
+const BATCHCODEHEAD = {
+ crowno: 'crowno',
+ pk_group: 'pk_group', //集团
+ cwarehouseid: 'cwarehouseid', //仓库
+ pk_org: 'pk_org', //库存组织
+ cmaterialvid: 'cmaterialvid', //物料编码
+ cmaterialvid_name: 'cmaterialvid.name', //物料名称
+ cmaterialvid_materialspec: 'cmaterialvid.materialspec', //规格
+ cmaterialvid_materialtype: 'cmaterialvid.materialtype', //型号
+ cunitid: 'cunitid', //主单位
+ cmaterialoid: 'cmaterialoid', //物料
+ castunitid: 'castunitid', //单位
+ cffileid: 'cffileid', //特征码
+ pk_onhanddim: 'pk_onhanddim', //现存量维度主键
+ clocationid: 'clocationid', //货位
+ pk_batchcode: 'pk_batchcode', //批次
+ vbatchcode: 'vbatchcode', //批次号
+ vchangerate: 'vchangerate', //换算率
+ cvmivenderid: 'cvmivenderid', //寄存供应商
+ ctplcustomerid: 'ctplcustomerid', //货主客户
+ cstateid: 'cstateid', //库存状态
+ cvendorid: 'cvendorid', //供应商
+ cprojectid: 'cprojectid', //项目
+ cproductorid: 'cproductorid', //生产厂商
+ casscustid: 'casscustid', //客户
+ vfree1: 'vfree1', //物料自由属性1
+ vfree2: 'vfree2',
+ vfree3: 'vfree3',
+ vfree4: 'vfree4',
+ vfree5: 'vfree5',
+ vfree6: 'vfree6',
+ vfree7: 'vfree7',
+ vfree8: 'vfree8',
+ vfree9: 'vfree9',
+ vfree10: 'vfree10',
+ vhashcode: 'vhashcode', //散列码
+ vsubhashcode: 'vsubhashcode', //辅散列码
+ ts: 'ts', //时间戳
+ onhandshouldassnum: 'onhandshouldassnum', //本次数量
+ onhandshouldnum: 'onhandshouldnum' //本次主数量
+};
+
+export { processBatchCodeItem, processBatchCodeValue };
+
+/*4VoJIv61OY1El5T1vinMVPUNAyJEYO5+FVKu/IvLzow=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/utils/feeAfterUtil.js b/src/pu/pu/pub/utils/feeAfterUtil.js
new file mode 100644
index 0000000..4b66b83
--- /dev/null
+++ b/src/pu/pu/pub/utils/feeAfterUtil.js
@@ -0,0 +1,171 @@
+/*mE9e4gO8F3qT/FKqN0bnoV1lJh9hqRxLHTqXcXfOiRQ=*/
+/*
+ * @Author: hechenk
+ * @PageInfo: 费用页签编辑后同一更新数据
+ * @Date: 2023-02-20 15:59:08
+ * @Last Modified by: tianzhyw
+ * @Last Modified time: 2023-08-01 10:40:42
+ */
+import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools';
+import { processCardTableAutoAddRow } from '../../../../scmpub/scmpub/pub/tool/autoAddRowUtil';
+import referFeeCTGrid from '../referFeeCTGrid';
+/**
+ *
+ * @param {*} props
+ * @param {*} moduleId 区域编码
+ * @param {*} data 返回数据
+ * @param {*} aggvos 页签组装的数据,自动增行时使用
+ * @param {*} index 下标
+ * @param {*} crowno 行号
+ * @returns
+ */
+function processExtBillFeeEditResult(props, moduleId, data, aggvos, index, crowno) {
+ if (data) {
+ let card = data.extbillcard;
+ let addrows = [];
+ let updaterows = [];
+ if (card.bodys[moduleId]) {
+ card.bodys[moduleId].rows.forEach((item) => {
+ if (item.status == '2' && (item.rowid == null || item.rowid == '')) {
+ addrows.push(item);
+ } else if (item.rowid) {
+ updaterows.push(item);
+ }
+ });
+ }
+ if (updaterows && updaterows.length > 0) {
+ props.cardTable.updateDataByRowId(moduleId, { rows: updaterows }, false, false);
+ }
+ if (addrows && addrows.length > 0) {
+ props.cardTable.insertRowsAfterIndex(moduleId, addrows, index);
+ }
+ RownoUtils.resetRowNo(props, moduleId, crowno);
+ // 自动增行处理
+ processCardTableAutoAddRow(props, moduleId, index, {
+ isMuli: aggvos.changedrows.length > 1 ? true : false
+ });
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} moduleId 费用明细区域编码
+ * @param {*} data 返回数据
+ * @param {*} crowno 行号
+ * @returns
+ */
+function processExtBillFeeDetailsEditResult(props, moduleId, data, crowno) {
+ if (data) {
+ let card = data.extbillcard;
+ // 更新费用明细数据
+ if (card.grandSons[moduleId]) {
+ let uprows = [];
+ let addrowsfee = [];
+ let delrowid = [];
+ card.grandSons[moduleId].rows.forEach((item) => {
+ if (item.status == '1') {
+ uprows.push(item);
+ } else if (item.status == '2') {
+ if (item.rowid == null || item.rowid == '') {
+ addrowsfee.push(item);
+ } else {
+ uprows.push(item);
+ }
+ } else if (item.status == '3') {
+ delrowid.push(item.rowid);
+ }
+ });
+ if (delrowid.length > 0) {
+ delrowid.forEach((rowid) => {
+ props.cardTable.delRowByRowId(moduleId, rowid);
+ });
+ }
+ if (uprows.length > 0) {
+ props.cardTable.updateTableData(moduleId, { rows: uprows });
+ }
+ if (addrowsfee.length > 0) {
+ let rowCount = props.cardTable.getNumberOfRows(moduleId);
+ for (let i = 0; i < addrowsfee.length; i++) {
+ props.cardTable.addRow(moduleId, rowCount + i, addrowsfee[i].values, true);
+ }
+ RownoUtils.setRowNo(props, moduleId, crowno);
+ }
+ }
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} moduleId 费用明细区域编码
+ * @param {*} data 返回数据
+ * @param {*} crowno 行号
+ * @param {*} index 行号
+ * @returns
+ */
+function processExtBillFeeDetailsAfterEditResult(props, moduleId, data, crowno, index) {
+ if (data) {
+ let card = data.extbillcard;
+ if (card.grandSons[moduleId]) {
+ let uprows = [];
+ let addrows = [];
+ let delrowid = [];
+ card.grandSons[moduleId].rows.map((item) => {
+ if (item.status == '1') {
+ uprows.push(item);
+ } else if (item.status == '2') {
+ if (item.rowid == null || item.rowid == '') {
+ addrows.push(item);
+ } else {
+ uprows.push(item);
+ }
+ } else if (item.status == '3') {
+ delrowid.push(item.rowid);
+ }
+ });
+ if (delrowid.length > 0) {
+ delrowid.forEach((rowid) => {
+ props.cardTable.delRowByRowId(moduleId, rowid);
+ });
+ }
+ if (uprows.length > 0) {
+ props.cardTable.updateTableData(moduleId, { rows: uprows });
+ }
+ if (addrows.length > 0) {
+ props.cardTable.insertRowsAfterIndex(moduleId, addrows, index);
+ RownoUtils.setRowNo(props, moduleId, crowno);
+ }
+ }
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} moduleId 区域编码
+ * @param {*} index 下标
+ * @param {*} changedrows 改变的行
+ * @param {*} afterEvent 编辑后事件
+ * @param {*} userObject 自定义数据
+ * @param {*} relateCTFields 触发关联合同字段
+ * @param {*} key 编辑字段
+ * @returns
+ */
+function referFeeCT(_this, props, moduleId, index, changedrows, afterEvent, userObject, relateCTFields, key) {
+ // 费用项,费用服务商,币种编辑后关联合同
+ if (relateCTFields.includes(key)) {
+ if (!userObject) {
+ return;
+ }
+ referFeeCTGrid.call(_this, props, moduleId, index, changedrows.length, afterEvent, userObject);
+ }
+}
+export {
+ processExtBillFeeEditResult,
+ processExtBillFeeDetailsEditResult,
+ processExtBillFeeDetailsAfterEditResult,
+ referFeeCT
+};
+
+/*mE9e4gO8F3qT/FKqN0bnoV1lJh9hqRxLHTqXcXfOiRQ=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/utils/grandsonUtils.js b/src/pu/pu/pub/utils/grandsonUtils.js
new file mode 100644
index 0000000..f665c24
--- /dev/null
+++ b/src/pu/pu/pub/utils/grandsonUtils.js
@@ -0,0 +1,406 @@
+/*AP9k3qAPxYxI2N5KVmCBa5GL8Ipa/9R+2wiDZRteoZY=*/
+/*
+ * @Author: hechenk
+ * @PageInfo: 主子孙结构组装
+ * @Date: 2023-02-20 15:59:08
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2023-11-07 17:00:43
+ */
+
+/**
+ *
+ * @param {*} props
+ * @param {*} pagecode 页面编码
+ * @param {*} headAreaCode 表头区域编码
+ * @param {*} bodyAreaCodeAndKeyMap 子表区域编码与对应主键Map {区域编码: 主键},方便过滤删除行
+ * @param {*} grandsonAreaCode 孙表区域编码
+ * @param {*} isfilterDelete 是否过滤删除行,默认过滤
+ * @param {*} grandsonKey 孙表主键
+ * @returns
+ */
+function creatGrandsonDataForSave(
+ props,
+ pagecode,
+ headAreaCode,
+ bodyAreaCodeAndKeyMap = {},
+ grandsonAreaCode,
+ isfilterDelete = true,
+ grandsonKey
+) {
+ let data = null;
+ let bodyAreaCodes = Object.keys(bodyAreaCodeAndKeyMap);
+ if (bodyAreaCodes.length > 1) {
+ data = props.createExtCardDataSimple(pagecode, headAreaCode, bodyAreaCodes);
+ } else {
+ data = props.createMasterChildDataSimple(pagecode, headAreaCode, bodyAreaCodes[0]);
+ }
+ for (let index = 0; index < bodyAreaCodes.length; index++) {
+ let bodyCode = bodyAreaCodes[index];
+ let newRows = [];
+ let rows = data.bodys[bodyCode] ? data.bodys[bodyCode].rows : [];
+ rows.forEach((row) => {
+ if (
+ isfilterDelete &&
+ row.status == '3' &&
+ (row.values[bodyAreaCodeAndKeyMap[bodyCode]] == null ||
+ row.values[bodyAreaCodeAndKeyMap[bodyCode]].value == null)
+ ) {
+ // 过滤删除则不添加到数组中
+ } else {
+ newRows.push(row);
+ }
+ });
+ if (data.bodys[bodyCode]) {
+ data.bodys[bodyCode].rows = newRows;
+ }
+ }
+ let grandsonData = props.cardTable.getAllData(grandsonAreaCode);
+ let newGrandsonRows = grandsonData.rows.map((row) => {
+ if (
+ isfilterDelete &&
+ row.status == '3' &&
+ (row.values[grandsonKey] == null || row.values[grandsonKey].value == null)
+ ) {
+ // 删除行过滤
+ } else {
+ return row;
+ }
+ });
+ data.grandSons = {
+ [grandsonAreaCode]: {
+ areaType: 'table',
+ areacode: grandsonAreaCode,
+ rows: newGrandsonRows
+ }
+ };
+ return data;
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} value
+ * @param {*} changeRow
+ * @param {*} index
+ * @param {*} record
+ * @param {*} pagecode 页面编码
+ * @param {*} headAreaCode 表头区域编码
+ * @param {*} bodyAreaCode 孙表关联子表区域编码
+ * @param {*} grandsonAreaCode 孙表区域编码
+ * @param {*} bodyKey 子表主键
+ * @param {*} grandsonToBodyKey 孙表记录子表主键
+ * @param {*} bodyAreaCodes 子表区域编码
+ */
+function creatGrandsonDataForAfterEdit(
+ props,
+ moduleId,
+ key,
+ value,
+ changeRow,
+ index,
+ record,
+ pagecode,
+ headAreaCode,
+ bodyAreaCode,
+ grandsonAreaCode,
+ bodyKey,
+ grandsonToBodyKey,
+ isfilterDelete = true,
+ bodyAreaCodes = [],
+ compareFunc
+) {
+ let data = {};
+ if (moduleId != grandsonAreaCode && moduleId != headAreaCode) {
+ if (typeof value == 'string' || !(value[0] && value[0].rowid)) {
+ value = [ record ];
+ }
+ if (moduleId == bodyAreaCode) {
+ data = creatGrandsonDataForAfterEditRelationBodyArea(
+ props,
+ moduleId,
+ key,
+ value,
+ changeRow,
+ pagecode,
+ headAreaCode,
+ grandsonAreaCode,
+ bodyKey,
+ grandsonToBodyKey,
+ bodyAreaCodes,
+ compareFunc
+ );
+ } else {
+ data = creatGrandsonDataForAfterEditNoRelationBodyArea(
+ props,
+ moduleId,
+ key,
+ changeRow,
+ pagecode,
+ headAreaCode,
+ grandsonAreaCode,
+ bodyAreaCodes
+ );
+ }
+ } else if (moduleId == grandsonAreaCode) {
+ if (typeof value == 'string' || !(value[0] && value[0].rowid)) {
+ value = [ record ];
+ }
+ data = creatGrandsonDataForAfterEditGrandsonArea(
+ props,
+ moduleId,
+ key,
+ value,
+ changeRow,
+ pagecode,
+ headAreaCode,
+ bodyAreaCode,
+ grandsonAreaCode,
+ bodyKey,
+ grandsonToBodyKey,
+ bodyAreaCodes,
+ compareFunc
+ );
+ } else {
+ data = creatGrandsonDataForAfterEditHead(
+ props,
+ moduleId,
+ key,
+ value,
+ pagecode,
+ headAreaCode,
+ grandsonAreaCode,
+ bodyAreaCodes,
+ bodyAreaCode
+ );
+ }
+ return data;
+}
+
+function creatGrandsonDataForAfterEditGrandsonArea(
+ props,
+ moduleId,
+ key,
+ value,
+ changeRow,
+ pagecode,
+ headAreaCode,
+ bodyAreaCode,
+ grandsonAreaCode,
+ bodyKey,
+ grandsonToBodyKey,
+ bodyAreaCodes = [],
+ compareFunc
+) {
+ let newRows = [];
+ let newGrandsonRows = [];
+ let data = props.createBodyAfterEventData(pagecode, headAreaCode, [ bodyAreaCode ], moduleId, key, changeRow);
+ let rows = data.card.bodys[bodyAreaCode].rows;
+ rows.forEach((row) => {
+ if (row.status != '3') {
+ for (let i = 0; i < value.length; i++) {
+ if (
+ (value[i].values[grandsonToBodyKey] &&
+ value[i].values[grandsonToBodyKey].value &&
+ ((row.values[bodyKey] &&
+ row.values[bodyKey].value &&
+ row.values[bodyKey].value == value[i].values[grandsonToBodyKey].value) ||
+ row.rowid == value[i].values[grandsonToBodyKey].value)) ||
+ (compareFunc != null && compareFunc.call(this, row, value[i]))
+ ) {
+ newRows.push(row);
+ break;
+ }
+ }
+ }
+ });
+ data.card.bodys[bodyAreaCode].rows = newRows;
+ newGrandsonRows = value;
+ data.card.grandSons = {
+ [grandsonAreaCode]: {
+ areaType: 'table',
+ areacode: grandsonAreaCode,
+ rows: newGrandsonRows
+ }
+ };
+ data.index = 0;
+ data.indexs = [ 0 ];
+ return data;
+}
+
+function creatGrandsonDataForAfterEditHead(
+ props,
+ moduleId,
+ key,
+ value,
+ pagecode,
+ headAreaCode,
+ grandsonAreaCode,
+ bodyAreaCodes = [],
+ bodyAreaCode
+) {
+ let data = props.createHeadAfterEventData(pagecode, headAreaCode, bodyAreaCodes, moduleId, key, value);
+ for (let i = 0; i < bodyAreaCodes.length; i++) {
+ let bodyRows = [];
+ if (data.card.bodys[bodyAreaCodes[i]] && data.card.bodys[bodyAreaCodes[i]].rows) {
+ data.card.bodys[bodyAreaCodes[i]].rows.forEach((row) => {
+ if (row.status != '3') {
+ if (
+ bodyAreaCodes[i] != bodyAreaCode &&
+ row.values.cfeematerialvid != null &&
+ row.values.cfeesuppliervid != null &&
+ row.values.cfeematerialvid.value != null &&
+ row.values.cfeesuppliervid.value != null &&
+ row.values.cfeematerialvid.value != '' &&
+ row.values.cfeesuppliervid.value != ''
+ ) {
+ bodyRows.push(row);
+ } else if (bodyAreaCodes[i] == bodyAreaCode) {
+ bodyRows.push(row);
+ }
+ }
+ });
+ data.card.bodys[bodyAreaCodes[i]].rows = bodyRows;
+ }
+ }
+ let grandsonData = props.cardTable.getVisibleRows(grandsonAreaCode);
+ data.card.grandSons = {
+ [grandsonAreaCode]: {
+ areaType: 'table',
+ areacode: grandsonAreaCode,
+ rows: grandsonData
+ }
+ };
+ data.index = 0;
+ data.indexs = [ 0 ];
+ return data;
+}
+
+function creatGrandsonDataForAfterEditNoRelationBodyArea(
+ props,
+ moduleId,
+ key,
+ changeRow,
+ pagecode,
+ headAreaCode,
+ grandsonAreaCode,
+ bodyAreaCodes = []
+) {
+ let data = props.createBodyAfterEventData(pagecode, headAreaCode, bodyAreaCodes, moduleId, key, changeRow);
+ for (let i = 0; i < bodyAreaCodes.length; i++) {
+ let bodyRows = [];
+ if (data.card.bodys[bodyAreaCodes[i]] && data.card.bodys[bodyAreaCodes[i]].rows) {
+ data.card.bodys[bodyAreaCodes[i]].rows.forEach((row) => {
+ if (row.status != '3') {
+ bodyRows.push(row);
+ }
+ });
+ data.card.bodys[bodyAreaCodes[i]].rows = bodyRows;
+ }
+ }
+ let newRows = [];
+ let grandsonData = props.cardTable.getVisibleRows(grandsonAreaCode);
+ data.card.bodys[moduleId].rows.forEach((row) => {
+ for (let i = 0; i < changeRow.length; i++) {
+ if (row.rowid == changeRow[i].rowid) {
+ newRows.push(row);
+ break;
+ }
+ }
+ });
+ data.card.bodys[moduleId].rows = newRows;
+ data.card.grandSons = {
+ [grandsonAreaCode]: {
+ areaType: 'table',
+ areacode: grandsonAreaCode,
+ rows: grandsonData
+ }
+ };
+ data.index = 0;
+ data.indexs = [ 0 ];
+ return data;
+}
+
+function creatGrandsonDataForAfterEditRelationBodyArea(
+ props,
+ moduleId,
+ key,
+ value,
+ changeRow,
+ pagecode,
+ headAreaCode,
+ grandsonAreaCode,
+ bodyKey,
+ grandsonToBodyKey,
+ bodyAreaCodes = [],
+ compareFunc
+) {
+ let data = props.createBodyAfterEventData(pagecode, headAreaCode, bodyAreaCodes, moduleId, key, changeRow);
+ for (let i = 0; i < bodyAreaCodes.length; i++) {
+ let bodyRows = [];
+ if (data.card.bodys[bodyAreaCodes[i]] && data.card.bodys[bodyAreaCodes[i]].rows) {
+ data.card.bodys[bodyAreaCodes[i]].rows.forEach((row) => {
+ if (row.status != '3') {
+ bodyRows.push(row);
+ }
+ });
+ data.card.bodys[bodyAreaCodes[i]].rows = bodyRows;
+ }
+ }
+ let newRows = [];
+ let grandsonData = props.cardTable.getVisibleRows(grandsonAreaCode);
+ let newGrandsonRows = [];
+ data.card.bodys[moduleId].rows.forEach((row) => {
+ for (let i = 0; i < changeRow.length; i++) {
+ if (row.rowid == changeRow[i].rowid) {
+ newRows.push(row);
+ break;
+ }
+ }
+ });
+ data.card.bodys[moduleId].rows = newRows;
+ grandsonData.forEach((row) => {
+ for (let i = 0; i < value.length; i++) {
+ if (
+ (row.values[grandsonToBodyKey] &&
+ row.values[grandsonToBodyKey].value &&
+ ((value[i].values[bodyKey] &&
+ value[i].values[bodyKey].value &&
+ row.values[grandsonToBodyKey].value == value[i].values[bodyKey].value) ||
+ row.values[grandsonToBodyKey].value == value[i].rowid)) ||
+ (compareFunc != null && compareFunc.call(this, value[i], row))
+ ) {
+ row.values[grandsonToBodyKey] = {
+ value:
+ value[i].values[bodyKey] && value[i].values[bodyKey].value
+ ? value[i].values[bodyKey].value
+ : value[i].rowid
+ };
+ newGrandsonRows.push(row);
+ break;
+ }
+ }
+ });
+ data.card.grandSons = {
+ [grandsonAreaCode]: {
+ areaType: 'table',
+ areacode: grandsonAreaCode,
+ rows: newGrandsonRows
+ }
+ };
+ data.index = 0;
+ data.indexs = [ 0 ];
+ return data;
+}
+
+export {
+ creatGrandsonDataForSave,
+ creatGrandsonDataForAfterEdit,
+ creatGrandsonDataForAfterEditGrandsonArea,
+ creatGrandsonDataForAfterEditHead,
+ creatGrandsonDataForAfterEditNoRelationBodyArea,
+ creatGrandsonDataForAfterEditRelationBodyArea
+};
+
+/*AP9k3qAPxYxI2N5KVmCBa5GL8Ipa/9R+2wiDZRteoZY=*/
\ No newline at end of file
diff --git a/src/pu/pu/pub/utils/sagaMsgUtils.js b/src/pu/pu/pub/utils/sagaMsgUtils.js
new file mode 100644
index 0000000..6685ae9
--- /dev/null
+++ b/src/pu/pu/pub/utils/sagaMsgUtils.js
@@ -0,0 +1,26 @@
+/*aFE3XbPuLdBvi27E1+lDNWSzg5B+d4saXMKKhvz2mKU=*/
+/*
+ * @Author: CongKe
+ * @PageInfo: saga相关消息工具
+ * @Date: 2018-07-22 09:40:38
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2019-12-09 11:37:21
+ */
+import { showSagaErrorToast } from '../../../../scmpub/scmpub/pub/tool/sagaMessageUtils';
+
+/**
+ * 显示saga错误信息提示框
+ * @param {*} props
+ * @param {*} params
+ */
+function showSagaErrorToasts(props, formId, billpkName, params = {}) {
+ let saga_gtxid = props.form.getFormItemsValue(formId, 'saga_gtxid');
+ let billPk = props.form.getFormItemsValue(formId, billpkName);
+ params.gtxid = saga_gtxid && saga_gtxid.value;
+ params.billpk = billPk && billPk.value;
+ showSagaErrorToast(props, params);
+}
+
+export { showSagaErrorToasts };
+
+/*aFE3XbPuLdBvi27E1+lDNWSzg5B+d4saXMKKhvz2mKU=*/
\ No newline at end of file
diff --git a/src/pu/pu/puinvoice/constance/index.js b/src/pu/pu/puinvoice/constance/index.js
new file mode 100644
index 0000000..9859fa7
--- /dev/null
+++ b/src/pu/pu/puinvoice/constance/index.js
@@ -0,0 +1,1138 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: jiangfw
+ * @PageInfo: 常量
+ * @Date: 2018-04-24 15:05:00
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-10 15:29:18
+ */
+const COMMON = {
+ dataSourceMmpscCacheKey: 'scm.pu.puinvoice.Puinvoice5016CacheKey',
+ PuinvoiceCacheKey: 'scm.pu.puinvoice.PuinvoiceCacheKey', //采购发票缓存
+ TransferCacheKey: 'scm.pu.puinvoice.TransferCacheKey', //拉单缓存
+ TransferFrom2507: 'scm.pu.comparebill.compareBillTo25', //对账单退单缓存
+ CompareBillIds: 'CompareBillIds', //对账单id
+ CurrentTab: 'CurrentTab', //列表当前页签
+ BusiInfoData: 'BusiInfoData', //应用业务流相关信息
+ RefBillTypeInfo: 'RefBillTypeInfo', //参照上游单据类型信息
+ PURCHASEORG: 'pu', //业务人员来源采购场景
+ cardPageId: '400401600_card', //卡片pagecode
+ listPageId: '400401600_list', //列表pagecode
+ LINK_KEY: 'pulinkkey', //共享联查发票key
+
+ // 拉采购订单查询模板id
+ templetid_21: 'templetid_21',
+ // 拉期初暂估单查询模板id
+ templetid_4T: 'templetid_4T',
+ // 拉采购入库单查询模板id
+ templetid_45: 'templetid_45',
+
+ moduleId: '4004', //模块id
+ billCode: '25', //单据编号
+ tree: 'tree', //查询模式
+ simple: 'simple', //查询模式
+ ref50: 'ref50', //单来源拉单
+ invoice: 'invoice', //收票拉单
+ html: 'html', //html 打印模式
+ pdf: 'pdf', //pdf 打印模式
+ printTemplet: '400401600', //采购发票打印模板
+ combinePrintNodeKey: '40040160001', //采购发票合并打印模板
+
+ tempstatus: 'tempstatus', //暂存标志
+ tempCardCacheKey: 'pu.pu.puinvoice.tempCardCacheKey', //暂存缓存标识
+ vordercode: 'vordercode',
+ pk_org: 'pk_org',
+ pk_order: 'pk_order',
+ payplanlist: '/pu/pu/orderpayplan/list/',
+ payplanappcode: '400400806',
+ payplanpagecode: '400400806_list'
+};
+
+const SCENE = {
+ approvesce: 'approvesce', //审批场景
+ ssctp: 'zycl',
+ scene: 'scene'
+};
+
+const Q_TEMPLET_ID = {
+ qTempletIdIndex: 'qTempletIdIndex', //查询模板参数名称
+
+ qTempletid_21: 'qTempletid_21', // 拉采购订单查询模板id
+ qTempletid_45: 'qTempletid_45', // 拉采购入库单查询模板id
+ qTempletid_4T: 'qTempletid_4T' // 拉期初暂估单查询模板id
+};
+
+//应用编码
+const APPCODE = {
+ puinvoice: '400401600', //采购发票
+ puinvoiceAppr: '400401604', //采购发票审批
+ transfer50: '400401606', //消耗汇总收票
+ vmisum: '400802000', //消耗汇总
+ invoiceAll: '400401602', //收票
+ invoiceScAll: '400401608', //委外收票
+ poorder: '400400800', //采购订单维护
+ initialest: '400402800', //期初暂估单
+ purchaseIn: '400800800', //采购入库
+ // scorder: '', //委外订单
+ subcontIn: '400800812', //委托加工入库
+ poorder21P: '400400806',
+ settle: '50161402' //GXWW
+};
+
+const BILLTYPE = {
+ invoice: '25', //采购发票
+ po_order: '21', //采购订单
+ purchaseIn: '45', //采购入库单
+ initEstimate: '4T', //期初暂估单
+ sc_order: '61', //委外订单
+ subcontIn: '47', //委外加工入库单
+ vmiSum: '50', //消耗汇总
+ pscSettle: '55E6', //加工费结算单
+ payplan_order: '21P', // 里程碑采购
+ modulecode5016: '5016' //工序委外管理
+
+ // invoice_n: getLangByResId(this, '4004PUINVOICE-000026') /* 国际化处理: 采购发票*/,
+ // po_order_n: getLangByResId(this, '4004PUINVOICE-000033') /* 国际化处理: 采购订单*/,
+ // purchaseIn_n: getLangByResId(this, '4004PUINVOICE-000034') /* 国际化处理: 采购入库单*/,
+ // initEstimate_n: getLangByResId(this, '4004PUINVOICE-000035') /* 国际化处理: 期初暂估单*/,
+ // sc_order_n: getLangByResId(this, '4004PUINVOICE-000036') /* 国际化处理: 委外订单*/,
+ // subcontIn_n: getLangByResId(this, '4004PUINVOICE-000037') /* 国际化处理: 委外加工入库单*/,
+ // vmiSum_n: getLangByResId(this, '4004PUINVOICE-000038') /* 国际化处理: 消耗汇总*/,
+ // pscSettle_n: getLangByResId(this, '4004PUINVOICE-000039') /* 国际化处理: 加工费结算单*/
+};
+
+const PAGECODE = {
+ invoiceCard: '400401600_card', //卡片界面
+ invoiceList: '400401600_list', //列表界面
+ ref50_list: '400802000_50to25', //消耗汇总拉单列表界面
+ ref21_list: '400400800_21to25', // 采购订单
+ ref25_list: '400400806_21Pto25', // 采购发票
+ ref45_list: '400800800_45to25', // 采购入库单
+ ref4T_list: '4Tto25', // 期初暂估单
+ ref61_list: '400401600_61to25', // 委外定单
+ ref47_list: '400800812_47to25', // 委外加工入库单
+ refAll_list: 'invoiceAll', // 收票全部
+ invoiceScAll: 'invoiceScAll', // 委外收票全部
+ ref55E6_list: '50161402_55E6to25' //工序
+};
+
+const AREA = {
+ head: 'head',
+ body: 'body',
+ queryArea: 'list_query', //列表查询区
+ list_head: 'list_head', //列表表头区
+ list_inner: 'list_inner', //列表行操作
+ card_left: 'card_left', //卡片转单列表
+ card_title: 'card_title', //卡片标题区
+ card_head: 'card_head', //卡片表头区
+ card_body: 'card_body', //卡片表体区
+ card_body_inner: 'card_body_inner', //卡片表体行操作
+ childform1: 'childform1',
+ ref50_head: 'ref50_head', //消耗汇总发票拉单界面表格区
+ ref50_query: 'ref50_query', //消耗汇总发票拉单界面查询区
+ // 列表态页签,单据状态
+ toCommit: 'toCommit', // 待提交
+ approving: 'approving', //审批中
+ all: 'all', //全部
+ modelList: 'modelList', // 列表态模态框
+
+ // 采购订单
+ head21: 'head21',
+ search21: 'search21',
+ body21: 'body21',
+ view21: 'view21',
+ // 采购入库单
+ head45: 'head45',
+ body45: 'body45',
+ search45: 'search45',
+ view45: 'view45',
+ // 期初暂估单
+ head4T: 'head4T',
+ body4T: 'body4T',
+ search4T: 'search4T',
+ view4T: 'view4T',
+ // 委外订单
+ head61: 'head61',
+ body61: 'body61',
+ search61: 'search61',
+ search61refadd: 'search61refadd', // 参照增行
+ view61: 'view61',
+ // 委托加工入库单
+ head47: 'head47',
+ body47: 'body47',
+ search47: 'search47',
+ view47: 'view47',
+
+ // 全部
+ headAll: 'headAll',
+ bodyAll: 'bodyAll',
+ searchAll: 'searchAll',
+ viewAll: 'viewAll',
+
+ // 委外全部
+ // searchScAll: 'searchScAll'
+ searchScAll: 'searchAll',
+ viewScAll: 'viewScAll',
+
+ // 采购订单付款计划
+ head25: 'head25',
+ body25: 'body25',
+ search25: 'search25',
+ view25: 'view25',
+
+ //GXWW
+ head55E6: 'head55E6',
+ body55E6: 'body55E6',
+ search55E6: 'search55E6',
+ view55E6: 'view55E6'
+};
+
+// 主组织字段
+const MAIN_ORG_FIELD = {
+ searchAllOrg: 'pk_psfinanceorg', //收票主组织
+ search21Org: 'pk_order_b.pk_psfinanceorg', //采购订单
+ search45Org: 'cfanaceorgoid', //采购入库单
+ search4TOrg: 'pk_org', //期初暂估单
+ search50Org: 'cfanaceorgoid', //消耗汇总
+ search47Org: 'pk_org.pk_financeorg', //委外加工入库单
+ search61Org: 'pk_financeorg', //委外订单
+ searchScAllOrg: 'pk_financeorg', //委外全部
+ search21POrg: 'pk_org' //采购订单付款计划
+};
+
+// 主组织编辑后拉单查询界面需要添加过滤的字段
+const FILTER_FIELD = {
+ // 收票全部页签
+ searchAllFields: [
+ 'pk_supplier', //供应商
+ 'pk_srcmaterial', //物料
+ 'pk_marbasclass', //物料基本分类
+ 'billmaker', //制单人
+ 'approver' //审批人
+ ],
+ // 采购订单
+ search21Fields: [
+ 'pk_payterm', //付款协议
+ 'pk_dept', //采购部门
+ 'pk_bizpsn', //采购员
+ 'pk_supplier', //供应商
+ 'pk_invcsupllier', //开票供应商
+ 'pk_recvcustomer', //收货客户
+ 'pk_order_b.pk_srcmaterial', //物料
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass', //物料基本分类
+ 'pk_order_b.casscustid', //客户
+ 'pk_order_b.cprojectid', //项目
+ 'billmaker', //制单人
+ 'approver', //审批人
+ 'corigcurrencyid' //币种
+ // 'pk_order_b.cproductorid'//生产厂商
+ ],
+ // 采购入库单
+ search45Fields: [
+ 'ccustomerid', //收货客户
+ 'cgeneralbid.cvendorid', //供应商
+ 'cgeneralbid.cmaterialoid', //物料
+ 'cgeneralbid.cmaterialoid.pk_marbasclass', //物料基本分类
+ 'billmaker', //制单人
+ 'approver' //审批人
+ //自有辅助属性1-10
+ // 'cgeneralbid.vfree1',
+ // 'cgeneralbid.vfree2',
+ // 'cgeneralbid.vfree3',
+ // 'cgeneralbid.vfree4',
+ // 'cgeneralbid.vfree5',
+ // 'cgeneralbid.vfree6',
+ // 'cgeneralbid.vfree7',
+ // 'cgeneralbid.vfree8',
+ // 'cgeneralbid.vfree9',
+ // 'cgeneralbid.vfree10'
+ ],
+ // 期初暂估单
+ search4TFields: [
+ 'po_initialest_b.casscustid', //客户
+ 'pk_supplier', //供应商
+ 'po_initialest_b.pk_srcmaterial', //物料
+ 'po_initialest_b.pk_srcmaterial.pk_marbasclass', //物料基本分类
+ 'billmaker', //制单人
+ 'approver' //审批人
+ ],
+ // 消耗汇总单
+ search50Fields: [
+ 'cvendorid', //供应商
+ 'cmaterialoid', //物料
+ 'cmaterialoid.pk_marbasclass', //物料基本分类
+ 'billmaker', //制单人
+ 'approver', //审批人
+ 'billmaker', //制单人
+ 'approver', //审批人
+ //自由辅助属性1-10
+ 'vfree1',
+ 'vfree2',
+ 'vfree3',
+ 'vfree4',
+ 'vfree5',
+ 'vfree6',
+ 'vfree7',
+ 'vfree8',
+ 'vfree9',
+ 'vfree10'
+ ],
+ // 委托加工入库单
+ search47Fields: [
+ 'cgeneralbid.cmaterialoid', //物料
+ 'cgeneralbid.cmaterialoid.pk_marbasclass', //物料基本分类
+ 'cvendorid', //供应商
+ 'cbiztype', //业务流程
+ 'billmaker', //制单人
+ 'approver', //审批人
+ 'cbiztype' //业务流程
+ ],
+ // 委外订单
+ search61Fields: [
+ 'pk_supplier', //供应商
+ 'pk_invcsupllier', //开票供应商
+ 'pk_recvcustomer', //收货客户
+ 'pk_order_b.casscustid', //客户
+ 'pk_order_b.pk_srcmaterial', //物料
+ 'pk_order_b.pk_srcmaterial.pk_marbasclass', //物料基本分类
+ 'billmaker', //制单人
+ 'approver', //审批人
+ 'pk_transporttype', //运输方式
+ 'pk_payterm', //付款协议
+ 'pk_order_b.cprojectid' //项目
+ ],
+ // 委外全部
+ searchScAllFields: [
+ 'pk_material', //物料
+ 'pk_supplier', //供应商
+ 'pk_marbasclass', //物料基本分类
+ 'billmaker', //制单人
+ 'approver' //审批人
+ ]
+};
+
+const KEYMAP = {
+ // 采购订单
+ m21to25: {
+ headAll: {
+ pk_order: 'pk_order', //主表主键
+ pk_psfinanceorg_v: 'pk_org_v', //结算财务组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //单据日期
+ pk_supplier: 'pk_supplier', //供应商
+ pk_supplier_v: 'pk_supplier_v', //供应商
+ cemployeeid: 'cemployeeid', //采购员
+ pk_dept_v: 'pk_dept_v', //采购部门
+ ntotalastnum: 'ntotalastnum', //总数量
+ ntotalorigmny: 'ntotalorigmny', //总价税合计
+ vmemo: 'vmemo', //备注
+ ts: 'ts'
+ },
+ bodyAll: {
+ pk_order_b: 'pk_order_b', //子表主键
+ crowno: 'crowno', //行号
+ pk_material_v: 'pk_material', //物料编码
+ 'pk_material_v.name': 'pk_material.name', //物料名称
+ 'pk_material_v.materialspec': 'pk_material.materialspec', // 规格
+ 'pk_material_v.materialtype': 'pk_material.materialtype', // 型号
+ vbatchcode: 'vbatchcode', //批次号
+ pk_supplier: 'casscustid', //供应商
+ pk_supplier_v: 'casscustvid', //供应商
+ cprojectid: 'cprojectid', //项目
+ cqualitylevelid: 'cqualitylevelid', //质量等级
+ cproductorid: 'cproductorid', //生产厂商
+ castunitid: 'castunitid', //单位
+ nastnum: 'nastnum', //数量
+ cunitid: 'cunitid', //主单位
+ nnum: 'nnum', //主数量
+ vchangerate: 'vchangerate', //换算率
+ corigcurrencyid: 'corigcurrencyid', //币种
+ nexchangerate: 'nexchangerate', //折本汇率
+ ccurrencyid: 'ccurrencyid', //本位币
+ nqtorigprice: 'nqtorigprice', //无税单价
+ nqtorigtaxprice: 'nqtorigtaxprice', //含税单价
+ nqtorignetprice: 'nqtorignetprice', //无税净价
+ nqtorigtaxnetprc: 'nqtorigtaxnetprc', //含税净价
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ norignetprice: 'norignetprice', //主无税净价
+ norigtaxnetprice: 'norigtaxnetprice', //主含税净价
+ norigmny: 'norigmny', //无税金额
+ ntaxrate: 'ntaxrate', //税率
+ ntax: 'ntax', //税额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ctaxcodeid: 'ctaxcodeid', //税码
+ ncaltaxmny: 'ncaltaxmny', //计税金额
+ ncaninvoicenum: 'ncaninvoicenum', //可收票主数量
+ ncaninvoicemny: 'ncaninvoicemny', //可收票金额
+ vbmemo: 'vbmemo', //备注
+ /**自由辅助属性1-10 */
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree1: 'vfree3',
+ vfree2: 'vfree4',
+ vfree1: 'vfree5',
+ vfree2: 'vfree6',
+ vfree1: 'vfree7',
+ vfree2: 'vfree8',
+ vfree1: 'vfree9',
+ vfree2: 'vfree10',
+ ts: 'ts'
+ }
+ },
+ // 采购入库单
+ m45to25: {
+ headAll: {
+ cgeneralhid: 'cgeneralhid', //主键
+ pk_psfinanceorg_v: 'cfanaceorgvid', //结算财务组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //单据日期
+ pk_supplier: 'cvendorid', //供应商
+ pk_supplier_v: 'cvendorvid', //供应商
+ cemployeeid: 'cbizid', //采购员
+ pk_dept_v: 'cdptvid', //采购部门
+ ntotalastnum: 'ntotalnum', //总数量
+ ntotalorigmny: 'norigtaxmny', //总价税合计
+ vmemo: 'vnote', //备注
+ ts: 'ts'
+ },
+ bodyAll: {
+ cgeneralbid: 'cgeneralbid', //主键
+ crowno: 'crowno', //行号
+ pk_material_v: 'cmaterialvid', //物料编码
+ 'pk_material_v.name': 'cmaterialvid.name', //物料名称
+ 'pk_material_v.materialspec': 'cmaterialvid.materialspec', // 规格
+ 'pk_material_v.materialtype': 'cmaterialvid.materialtype', // 型号
+ vbatchcode: 'vbatchcode', //批次号
+ pk_supplier: 'cvendorid', //供应商
+ pk_supplier_v: 'cvendorvid', //供应商
+ cprojectid: 'cprojectid', //项目
+ cqualitylevelid: 'cqualitylevelid', //质量等级
+ cproductorid: 'cproductorid', //生产厂商
+ castunitid: 'castunitid', //单位
+ nastnum: 'nassistnum', //数量
+ cunitid: 'cunitid', //主单位
+ nnum: 'nnum', //主数量
+ vchangerate: 'vchangerate', //换算率
+ corigcurrencyid: 'corigcurrencyid', //币种
+ nexchangerate: 'nchangestdrate', //折本汇率
+ ccurrencyid: 'ccurrencyid', //本位币
+ nqtorigprice: 'nqtorigprice', //无税单价
+ nqtorigtaxprice: 'nqtorigtaxprice', //含税单价
+ nqtorignetprice: 'nqtorignetprice', //无税净价
+ nqtorigtaxnetprc: 'nqtorigtaxnetprice', //含税净价
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ norignetprice: 'norignetprice', //主无税净价
+ norigtaxnetprice: 'norigtaxnetprice', //主含税净价
+ norigmny: 'norigmny', //无税金额
+ ntaxrate: 'ntaxrate', //税率
+ ntax: 'ntax', //税额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ctaxcodeid: 'ctaxcodeid', //税码
+ ncaltaxmny: 'ncaltaxmny', //计税金额
+ // ninvoicenum: 'ncaninvoicenum', //可收票主数量
+ // ninvoicemny: 'ncaninvoicemny', //可收票金额
+ ncaninvoicenum: 'ninvoicenum', //可收票主数量
+ ncaninvoicemny: 'ninvoicemny', //可收票金额
+ vbmemo: 'vnotebody', //备注
+ /**自由辅助属性1-10 */
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree1: 'vfree3',
+ vfree2: 'vfree4',
+ vfree1: 'vfree5',
+ vfree2: 'vfree6',
+ vfree1: 'vfree7',
+ vfree2: 'vfree8',
+ vfree1: 'vfree9',
+ vfree2: 'vfree10',
+ ts: 'ts'
+ }
+ },
+ // 期初暂估单
+ m4Tto25: {
+ headAll: {
+ pk_initialest: 'pk_initialest', //主表主键
+ pk_psfinanceorg_v: 'pk_org_v', //结算财务组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //单据日期
+ pk_supplier: 'pk_supplier', //供应商
+ pk_supplier_v: 'pk_supplier_v', //供应商
+ cemployeeid: 'cbizid', //采购员
+ pk_dept_v: 'cdptvid', //采购部门
+ ntotalastnum: 'ntotalastnum', //总数量
+ ntotalorigmny: 'ntotalorigmny', //总价税合计
+ vmemo: 'vmemo', //备注
+ ts: 'ts'
+ },
+ bodyAll: {
+ pk_initialest_b: 'pk_initialest_b', //子表主键
+ crowno: 'crowno', //行号
+ pk_material_v: 'pk_material', //物料
+ 'pk_material_v.name': 'pk_material.name', //物料名称
+ 'pk_material_v.materialspec': 'pk_material.materialspec', // 规格
+ 'pk_material_v.materialtype': 'pk_material.materialtype', // 型号
+ castunitid: 'castunitid', //单位
+ nastnum: 'nastnum', //数量
+ vbatchcode: 'vbatchcode', //批次号
+ pk_supplier: 'pk_supplier', //供应商
+ pk_supplier_v: 'pk_supplier_v', //供应商
+ cprojectid: 'cprojectid', //项目
+ // cqualitylevelid: 'cqualitylevelid', //质量等级
+ cproductorid: 'cproductorid', //生产厂商
+ cunitid: 'cunitid', //主单位
+ nnum: 'nnum', //主数量
+ vchangerate: 'vchangerate', //换算率
+ corigcurrencyid: 'corigcurrencyid', //币种
+ nexchangerate: 'nexchangerate', //折本汇率
+ ccurrencyid: 'ccurrencyid', //本位币
+ nqtorigprice: 'nastorigprice', //无税单价
+ nqtorigtaxprice: 'nastorigtaxprice', //含税单价
+ // nqtorignetprice: 'nqtorignetprice', //无税净价
+ // nqtorigtaxnetprc: 'nqtorigtaxnetprice', //含税净价
+ norigprice: 'norigprice', //主无税单价
+ norigtaxprice: 'norigtaxprice', //主含税单价
+ // norignetprice: 'norignetprice', //主无税净价
+ // norigtaxnetprice: 'norigtaxnetprice', //主含税净价
+ norigmny: 'norigmny', //无税金额
+ ntaxrate: 'ntaxrate', //税率
+ ntax: 'ntax', //税额
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ctaxcodeid: 'ctaxcodeid', //税码
+ ncaltaxmny: 'ncaltaxmny', //计税金额
+ ncaninvoicenum: 'ncaninvoicenum', //可收票主数量
+ ncaninvoicemny: 'ncaninvoicemny', //可收票金额
+ vbmemo: 'vbmemo', //备注
+ /**自由辅助属性1-10 */
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree1: 'vfree3',
+ vfree2: 'vfree4',
+ vfree1: 'vfree5',
+ vfree2: 'vfree6',
+ vfree1: 'vfree7',
+ vfree2: 'vfree8',
+ vfree1: 'vfree9',
+ vfree2: 'vfree10',
+ ts: 'ts'
+ }
+ },
+ // 委外订单
+ m61to25: {
+ headAll: {
+ pk_order: 'pk_order', //委外订单主键
+ pk_financeorg_v: 'pk_financeorg_v', //结算财务组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //订单日期
+ pk_supplier: 'pk_supplier', //供应商
+ pk_supplier_v: 'pk_supplier_v', //供应商
+ cemployeeid: 'cemployeeid', //采购员
+ pk_dept_v: 'pk_dept_v', //采购部门
+ ntotalastnum: 'ntotalastnum', //总数量
+ vmemo: 'vmemo', //备注
+ ts: 'ts'
+ },
+ bodyAll: {
+ pk_order_b: 'pk_order_b',
+ crowno: 'crowno',
+ pk_material: 'pk_material',
+ 'pk_material.name': 'pk_material.name',
+ 'pk_material.materialspec': 'pk_material.materialspec',
+ 'pk_material.materialtype': 'pk_material.materialtype',
+ pk_batchcode: 'pk_batchcode',
+ vbatchcode: 'vbatchcode',
+ // pk_supplier: 'pk_supplier_b',
+ cprojectid: 'cprojectid',
+ cproductorid: 'cproductorid',
+ cqtunitid: 'cqtunitid',
+ nqtunitnum: 'nqtunitnum',
+ nqtunitrate: 'nqtunitrate',
+ cunitid: 'cunitid',
+ nnum: 'nnum',
+ nqtorigprice: 'nnetprice',
+ norigmny: 'norigmny',
+ ncaninvoicenum: 'ncaninvoicenum', //可收票主数量
+ vbmemo: 'vbmemo',
+ ts: 'ts',
+ /**自由辅助属性1-10 */
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree1: 'vfree3',
+ vfree2: 'vfree4',
+ vfree1: 'vfree5',
+ vfree2: 'vfree6',
+ vfree1: 'vfree7',
+ vfree2: 'vfree8',
+ vfree1: 'vfree9',
+ vfree2: 'vfree10'
+ }
+ },
+ // 委托加工入库单
+ m47to25: {
+ headAll: {
+ cgeneralhid: 'cgeneralhid',
+ pk_financeorg_v: 'pk_org.pk_financeorg', //结算财务组织
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vbillcode: 'vbillcode', //单据编号
+ dbilldate: 'dbilldate', //订单日期
+ pk_supplier: 'cvendorid', //供应商
+ pk_supplier_v: 'cvendorvid', //供应商
+ cemployeeid: 'cbizid', //采购员
+ pk_dept_v: 'cdptvid', //采购部门
+ ntotalastnum: 'ntotalnum', //总数量
+ vmemo: 'vnote', //备注
+ ts: 'ts'
+ },
+ bodyAll: {
+ cgeneralbid: 'cgeneralbid',
+ crowno: 'crowno',
+ pk_material: 'cmaterialvid',
+ 'pk_material.name': 'cmaterialvid.name',
+ 'pk_material.materialspec': 'cmaterialvid.materialspec',
+ 'pk_material.materialtype': 'cmaterialvid.materialtype',
+ pk_batchcode: 'pk_batchcode',
+ vbatchcode: 'vbatchcode',
+ // pk_supplier: 'cvendorid',
+ cprojectid: 'cprojectid',
+ cproductorid: 'cproductorid',
+ cqtunitid: 'castunitid',
+ nqtunitnum: 'nassistnum',
+ nqtunitrate: 'vchangerate',
+ cunitid: 'cunitid',
+ nnum: 'nnum',
+ nqtorigprice: 'ncostprice',
+ norigmny: 'ncostmny',
+ ncaninvoicenum: 'ninvoicenum', //可收票主数量
+ vbmemo: 'vnotebody',
+ ts: 'ts',
+ /**自由辅助属性1-10 */
+ vfree1: 'vfree1',
+ vfree2: 'vfree2',
+ vfree1: 'vfree3',
+ vfree2: 'vfree4',
+ vfree1: 'vfree5',
+ vfree2: 'vfree6',
+ vfree1: 'vfree7',
+ vfree2: 'vfree8',
+ vfree1: 'vfree9',
+ vfree2: 'vfree10'
+ }
+ }
+};
+
+const PK = {
+ // 采购订单
+ head21pk: 'pk_order',
+ body21pk: 'pk_order_b',
+ // 采购入库单
+ head45pk: 'cgeneralhid',
+ body45pk: 'cgeneralbid',
+ // 期初暂估单
+ head4Tpk: 'pk_initialest',
+ body4Tpk: 'pk_initialest_b',
+ // 委托加工入库单
+ head47pk: 'cgeneralhid',
+ body47pk: 'cgeneralbid',
+ // 委外订单
+ head61pk: 'pk_order',
+ body61pk: 'pk_order_b',
+ // 付款计划
+ head25pk: 'pk_order_payplan',
+ body25pk: 'pk_order_payplan_b',
+
+ //GXWW
+ head55E6pk: 'pk_settle',
+ body55E6ok: 'pk_settle_b'
+};
+
+const UISTATE = {
+ add: 'add',
+ edit: 'edit',
+ browse: 'browse'
+};
+
+/**
+ * 发票界面类型枚举
+ */
+const INVC_UI_STATE = {
+ fee_invc: 'fee_invc', //费用发票维护界面
+ norm_invc: 'norm_invc' //正常发票维护界面
+};
+
+const BILLSTATUS = {
+ approving: '2', //审批中
+ commit: '1', //提交
+ free: '0', //自由
+ nopass: '4', //审批未通过
+ approve: '3' //审批通过
+};
+
+// 转单类型
+const TRANSFER_TYPE = {
+ transfer21: 'transfer21', //拉采购订单
+ transfer45: 'transfer45', //拉采购入库单
+ transfer47: 'transfer47', //拉委托加工入库单
+ transfer50: 'transfer50', //消耗汇总拉单
+ transfer4T: 'transfer4T', //拉委期初暂估单
+ transfer61: 'transfer61', //拉委外订单
+ transferSc: 'transferSc', //委外收票
+ invoice: 'multitransfer', //收票
+ transfer2507: 'from2507', //对账单
+ transfer21Pto25: 'transfer21Pto25', //拉采购订单
+ transfer55E6to25: 'transfer55E6to25' //GXWW
+};
+
+const URL = {
+ mergerequest: '/nccloud/platform/pub/mergerequest.do', //合并请求
+ querypage: '/platform/templet/querypage.do', //查询模板
+ queryTemplateIdOid: '/nccloud/pu/pub/templateIdOidQry.do', //查询模板id及查询模板id
+
+ list: '/list', //列表界面
+ card: '/card', //卡片界面
+ transfer50: '/transfer50', //消耗汇总收票列表界面
+ multitransfer: '/multitransfer', //收票拉单列表界面
+ invoice: '/invoice', //收票
+ transfer21Pto25: '/transfer21Pto25', //收票
+ // sctransfer: '/sctransfer', //委外收票拉单列表界面
+ scInvoice: '/scInvoice', //委外收票拉单列表界面
+ transfer55E6to25: '/transfer55E6to25', //gxww
+
+ from2507Qry: '/nccloud/pu/puinvoice/from2507Qry.do', //从对账单跳转过来查询
+ pageQuery: '/nccloud/pu/puinvoice/pageQuery.do', //列表界面分页查询
+ pageQueryByPKs: '/nccloud/pu/puinvoice/pageQueryByPKs.do', //列表翻页查询
+ save: '/nccloud/pu/puinvoice/save.do', //保存
+ savaCommit: '/nccloud/pu/puinvoice/saveCommit.do',
+ edit: '/nccloud/pu/puinvoice/edit.do', //修改
+ batchCommit: '/nccloud/pu/puinvoice/batchCommit.do', //批量提交
+ batchUnCommit: '/nccloud/pu/puinvoice/batchUnCommit.do', //批量收回
+ commit: '/nccloud/pu/puinvoice/commit.do', //提交
+ uncommit: '/nccloud/pu/puinvoice/uncommit.do', //收回
+ batchFreeze: '/nccloud/pu/puinvoice/batchFreeze.do', //批量冻结
+ batchUnFreeze: '/nccloud/pu/puinvoice/batchUnFreeze.do', //批量解冻
+ freeze: '/nccloud/pu/puinvoice/freeze.do', //冻结
+ unFreeze: '/nccloud/pu/puinvoice/unFreeze.do', //解冻
+ apprComment: '/nccloud/pu/puinvoice/apprComment.do', //查看审批意见
+ queryCard: '/nccloud/pu/puinvoice/queryCard.do', //查询整单信息
+ delete: '/nccloud/pu/puinvoice/delete.do', //删除
+ batchDelete: '/nccloud/pu/puinvoice/batchDelete.do', //批删
+ hphq: '/nccloud/pu/puinvoice/hphq.do', //优质优价取价
+ sendAp: '/nccloud/pu/puinvoice/sendAp.do', //传应付
+ cancelSendAp: '/nccloud/pu/puinvoice/cancelSendAp.do', //取消传应付
+ batchSendAp: '/nccloud/pu/puinvoice/batchSendAp.do', //批量传应付
+ batchCancelSendAp: '/nccloud/pu/puinvoice/batchCancelSendAp.do', //批量取消传应付
+ commit: '/nccloud/pu/puinvoice/commit.do', //提价
+ uncommit: '/nccloud/pu/puinvoice/uncommit.do', //收回
+ saveCommit: '/nccloud/pu/puinvoice/saveCommit.do', //保存并提交
+ print: '/nccloud/pu/puinvoice/print.do', //打印
+ checkDataPermission: '/nccloud/pu/puinvoice/checkDataPermission.do', //数据权限校验
+ feeInvoice: '/nccloud/pu/puinvoice/feeInvoice.do', //费用发票
+ combine: '/nccloud/pu/puinvoice/combineshowaction.do', //合并显示
+ combintPrint: '/nccloud/pu/puinvoice/combineprintaction.do', //合并打印
+ linkFeeInvoice: '/nccloud/pu/puinvoice/linkFeeInvoice.do', //联查费用发票
+ copyReq: '/nccloud/pu/puinvoice/copyReq.do', //复制
+
+ //编辑前事件
+ beforeEditHead: '/nccloud/pu/puinvoice/beforeEditHead.do', //表头编辑前
+ beforeEditBody: '/nccloud/pu/puinvoice/beforeEditBody.do', //表体编辑前
+ //编辑后事件
+ afterEditHead: '/nccloud/pu/puinvoice/afterEditHead.do', //表头编辑后
+ afterEditBody: '/nccloud/pu/puinvoice/afterEditBody.do', //表体编辑后
+
+ // 拉单查询
+ // qryBusiInfo: '/nccloud/pu/puinvoice/qryBusiInfo.do', //根据下游单据类型查询业务流程
+ qryBusiInfo: '/nccloud/pu/pub/refbillqueryaction.do', //根据下游单据类型查询业务流程
+ ref50Query: '/nccloud/pu/puinvoice/ref50Query.do', //消耗汇总收票查询
+ ref61Query: '/nccloud/pu/puinvoice/ref61Query.do', //委外订单收票查询
+ ref47Query: '/nccloud/pu/puinvoice/ref47Query.do', //委外加工入库收票查询
+ ref21Query: '/nccloud/pu/puinvoice/ref21Query.do', //采购订单拉单查询
+ ref4TQuery: '/nccloud/pu/puinvoice/ref4TQuery.do', //期初暂估单拉单查询
+ ref45Query: '/nccloud/pu/puinvoice/ref45Query.do', //采购入库单拉单查询
+ refAllQuery: '/nccloud/pu/puinvoice/refAllQuery.do', //全部拉单查询
+ refScAllQuery: '/nccloud/pu/puinvoice/refScAllQuery.do', //委外收票全部查询
+ ref21Pto25Query: '/nccloud/pu/puinvoice/ref21Pto25Query.do', //采购订单付款计划拉单查询
+ ref55E6Query: '/nccloud/pu/puinvoice/ref55E6Query.do', //工序委外拉单查询
+
+ // 转单
+ transfer50to25: '/nccloud/pu/puinvoice/transfer50to25.do', //消耗汇总转采购发票
+ multiInvoice: '/nccloud/pu/puinvoice/multiInvoice.do', //收票多来源转单
+ scInvoiceT: '/nccloud/pu/puinvoice/scInvoiceT.do', //委外收票转单
+ transfer2507to25: '/nccloud/pu/puinvoice/transfer2507to25.do', //对账单推采购发票
+ scanTransfer: '/nccloud/pu/puinvoice/scanTransAll.do', //扫码拉单
+ poInvoiceTo21P: '/nccloud/pu/puinvoice/poInvoiceTo21P.do', //委外收票转单
+ poInvoiceTo55E6: '/nccloud/pu/puinvoice/poInvoiceTo55E6.do',
+
+ // 小部件跳转
+ puToHandleInvoice: '/nccloud/pu/workbench/puToHandleInvoice.do', // 采购待收票小部件
+ scToHandleInvoice: '/nccloud/pu/workbench/scorderSCToHandleInvoice.do', // 委外待收票小部件
+ bismilepostToHandleInvoice: '/nccloud/pu/workbench/bismilepostToHandleInvoice.do', // 里程碑待收票小部件
+ vimToHandleInvoice: '/nccloud/pu/workbench/vimToHandleInvoice.do', // 消耗汇总待收票小部件
+
+ //采购发票开票
+ CHECKISSUEINVOICE: '/nccloud/pu/puinvoice/checkissueInvoice.do', //采购发票开票校验
+ ISSUEINVURL: '/nccloud/pu/puinvoice/issueInvoice.do', //采购发票开票
+ CHECKSAGASTATUS: '/nccloud/pu/puinvoice/checkSagaStatus.do', //检查单据saga状态
+ ISABLEFINANCIAL: '/nccloud/pu/puinvoice/maintainandLinkInvoice.do' //校验是否启用财务共享模块
+};
+
+const BUTTONID = {
+ PrintCountQuery: 'PrintCountQuery', //打印次数查询
+ Add_G: 'Add_G', //新增按钮组
+ More_G: 'More_G', //更多按钮组
+ Refresh: 'Refresh', //刷新
+ ScanTransfer: 'ScanTransfer', //扫码拉单
+ Add: 'Add', //自制
+ Invoice: 'Invoice', //收票
+ MilestonInvoice: 'MilestonInvoice', //采购订单付款计划收票
+ Ref55E6: 'Ref55E6', //gxww
+ ScInvoice: 'ScInvoice', //委外收票
+ Ref50: 'Ref50', //消耗汇总收票
+ Ref51: 'Ref51', //委外收票
+ FeeInvoice: 'FeeInvoice', //费用发票
+ // BatchCommit: 'BatchCommit', //批提交
+ BatchUnCommit: 'BatchUnCommit', //批收回
+ Commit: 'Commit', //提交
+ UnCommit: 'UnCommit', //收回
+ SendAp: 'SendAp', //传应付
+ CancelSendAp: 'CancelSendAp', //取消传应付
+ // BatchDelete: 'BatchDelete', //批删
+ Delete: 'Delete', //删除
+ Freeze: 'Freeze', //冻结
+ UnFreeze: 'UnFreeze', //解冻
+ Print: 'Print', //打印
+ Print_list: 'Print_list', //打印清单
+ PrintOut: 'PrintOut', //输出
+ CombinePrint: 'CombinePrint', //合并显示
+ Save: 'Save', //保存
+ Cancel: 'Cancel', //取消
+ Approve: 'Approve', //审批
+ ApproveInfo: 'ApproveInfo', //审批详情
+ LinkQueryFeeInvoice: 'LinkQueryFeeInvoice', //联查费用发票
+ SaveCommit: 'SaveCommit', //保存提交
+ Edit: 'Edit', //修改
+ Copy: 'Copy', //复制
+ RefAddLine: 'RefAddLine', //参照增行
+ DocMng: 'DocMng', //附件管理
+ FileBatch: 'FileBatch', //附件批量下载
+ QueryAboutBusiness: 'QueryAboutBusiness', //单据追溯
+ LinkInvoice: 'LinkInvoice', //联查收票
+ InvoiceDzfp: 'InvoiceDzfp', //电子发票
+ Quit: 'Quit', //退出转单
+ Back: 'Back', //返回
+ Assist: 'Assist', //辅助功能
+ LinkQuery: 'LinkQuery', //联查
+ ShoulderGroup1: 'ShoulderGroup1', //表肩按钮组一
+ ShoulderGroup2: 'ShoulderGroup2', //表肩按钮组二
+ AddLine: 'AddLine', //增行
+ DeleteLine: 'DeleteLine', //删行
+ CopyLine: 'CopyLine', //复制行
+ PasteToTail: 'PasteToTail', //粘贴至末行
+ Cancel_b: 'Cancel_b', //取消
+ Hphq: 'Hphq', //优质优价取价
+ ReRankRownum: 'ReRankRownum', //重排行号
+ // BatchMdf: 'BatchMdf', //批改
+ Unfold: 'Unfold', //展开
+ // DeleteLine_i: 'DeleteLine_i', //表体行删行
+ InsertLine: 'InsertLine', //插入行
+ PasteHere: 'PasteHere', //粘贴至此
+ ImageView: 'ImageView', //影像查看
+ ImageScan: 'ImageScan', //影像扫描
+ TemporaryStorage: 'TemporaryStorage', //暂存
+ ShowDraft: 'ShowDraft', //草稿
+ ShoulderInitBtn: [ 'ShoulderGroup1', 'AddLine', 'DeleteLine', 'CopyLine', 'Hphq', 'ReRankRownum' ], //表肩按钮
+ CardPastBtn: [ 'ShoulderGroup2', 'PasteToTail', 'Cancel_b', 'PasteHere' ], //粘贴相关按钮
+ REDINVOICE: 'RedInvoice', //红字发票
+ MAINTAININVOICE: 'MaintainInvoice' //维护税务发票
+};
+
+const MODAL_ID = {
+ freezeModal: 'freezeModal', //冻结模态框
+ delModal: 'delModal', //删除确认模态框的id
+ orgChange: 'orgChange', //组织切换模态框
+ MessageDlg: 'MessageDlg', //提示信息模态框
+ RefAddRowModal: 'RefAddRowModal', //参照增行模态框
+ linkFeeModal: 'linkFeeModal' //联查费用发票模态框
+};
+
+const FIELD = {
+ sagaStatus: 'saga_status',
+ status: 'status', //界面状态
+ id: 'id', //界面常量id,记录卡片界面单据主键的属性
+ /***采购发票列表查询字段*******************************************/
+ pk_usedept: 'invoicebody.pk_usedept', //使用部门
+ // invoicebody.casscustid:'invoicebody.casscustid',//客户
+ /***采购发票表头字段***********************************************/
+ pk_invoice: 'pk_invoice', //采购发票
+ vbillcode: 'vbillcode', //发票号
+ pk_group: 'pk_group', //所属集团
+ pk_purchaseorg: 'pk_purchaseorg', //采购组织(OID)
+ pk_apfinanceorg: 'pk_apfinanceorg', //应付财务组织(OID)
+ pk_apfinanceorg_v: 'pk_apfinanceorg_v', //应付财务组织(VID)
+ pk_org_v: 'pk_org_v', //财务组织(VID)
+ pk_org: 'pk_org', //财务组织(OID)
+ fbillstatus: 'fbillstatus', //单据状态
+ pk_purchaseorg_v: 'pk_purchaseorg_v', //采购组织(VID)
+ ctrantypeid: 'ctrantypeid', //交易类型
+ vtrantypecode: 'vtrantypecode', //发票类型(交易类型)
+ pk_busitype: 'pk_busitype', //业务流程
+ csourceid: 'csourceid', //来源单据主键
+ pk_bizpsn: 'pk_bizpsn', //业务员
+ pk_dept: 'pk_dept', //采购部门(OID)
+ pk_dept_v: 'pk_dept_v', //采购部门(VID)
+ nexchangerate: 'nexchangerate', //折本汇率
+ pk_bankaccbas: 'pk_bankaccbas', //银行账户
+ pk_supplier: 'pk_supplier', //供应商
+ pk_supplier_v: 'pk_supplier_v', //供应商
+ casscustid: 'casscustid', //客户
+ casscustid: 'casscustvid', //客户
+ nexchangerate: 'nexchangerate', //折本汇率
+ cratetype: 'cratetype',
+ dratedate: 'dratedate',
+ fratecategory: 'fratecategory',
+ ccurrencyid: 'ccurrencyid', //本币币种(本位币)
+ corigcurrencyid: 'corigcurrencyid', //币种(原币)
+ nglobalexchgrate: 'nglobalexchgrate', //全局本位币汇率
+ ngroupexchgrate: 'ngroupexchgrate', //集团本位币汇率
+ pk_freecust: 'pk_freecust', //散户
+ csendcountryid: 'csendcountryid', //发货国/地区
+ crececountryid: 'crececountryid', //收货国家/地区
+ ctaxcountryid: 'ctaxcountryid', //报税国/地区
+ pk_stockorg_v: 'pk_stockorg_v', //库存组织
+ ntaxrateh: 'ntaxrateh', //整单税率
+ ftaxtypeflagh: 'ftaxtypeflagh', //整单扣税类别
+ pk_paytosupplier: 'pk_paytosupplier', //付款单位
+ pk_paytosupplier_v: 'pk_paytosupplier_v', //付款单位
+ pk_payterm: 'pk_payterm', //付款协议
+ ts: 'ts',
+ taudittime: 'taudittime', //审批日期
+ approver: 'approver', //审批人
+ modifier: 'modifier', //最后修改人
+ modifiedtime: 'modifiedtime', //最后修改时间
+ iprintcount: 'iprintcount', //打印次数
+ darrivedate: 'darrivedate', //票到日期
+ dbilldate: 'dbilldate', //发票日期
+ dmakedate: 'dmakedate', //制单日期
+ creator: 'creator', //创建人
+ billmaker: 'billmaker', //制单人
+ bapflag: 'bapflag', //已传应付标志
+ bfee: 'bfee', //费用发票
+ pk_stockorg: 'pk_stockorg', //库存组织
+ fbuysellflag: 'fbuysellflag', //购销类型
+ pk_parentinvoice: 'pk_parentinvoice', //费用发票对应货物发票
+ bfrozen: 'bfrozen', //冻结
+ vfrozenreason: 'vfrozenreason', //最后冻结原因
+ tfrozentime: 'tfrozentime', //冻结日期
+ pk_frozenuser: 'pk_frozenuser', //冻结人
+ bvirtual: 'bvirtual', //虚拟发票标志
+ binitial: 'binitial', //是否期初发票
+ csaleinvoiceid: 'csaleinvoiceid', //协同销售发票id
+ ntotalorigmny: 'ntotalorigmny', //整单价税合计
+ /***采购发票表体字段***********************************************/
+ crowno: 'crowno', //行号
+ pk_invoice_b: 'pk_invoice_b', //采购发票明细主键
+ pk_material: 'pk_material', //物料
+ pk_srcmaterial: 'pk_srcmaterial', //物料(OID)
+ pk_stordoc: 'pk_stordoc', //仓库
+ pk_usedept: 'pk_usedept', // 使用部门(OID)
+ pk_usedept_v: 'pk_usedept_v', //使用部门(VID)
+ cprojectid: 'cprojectid', //项目
+ pk_costsubj: 'pk_costsubj', //收支项目
+ castunitid: 'castunitid', //单位
+ vchangerate: 'vchangerate', //换算率
+ blastfeesettle: 'blastfeesettle', //最后一次结算
+ pk_order: 'pk_order', //采购订单主键
+ pk_order_b: 'pk_order_b', //采购订单行主键
+ vordercode: 'vordercode', //订单号
+ cfirstbid: 'cfirstbid', //源头单据行主键
+ cfirstid: 'cfirstid', //源头单据主键
+ cfirsttypecode: 'cfirsttypecode', //源头单据类型
+ vfirstcode: 'vfirstcode', //源头单据号
+ vfirstrowno: 'vfirstrowno', //源头单据行号
+ vfirsttrantype: 'vfirsttrantype', //源头交易类型
+ firstbts: 'firstbts', //源头单据行TS
+ firstts: 'firstts', //源头单据TS
+ csourcebid: 'csourcebid', //来源单据行主键
+ csourceid: 'csourceid', //来源单据主键
+ csourcetypecode: 'csourcetypecode', //来源单据类型
+ sourcebts: 'sourcebts', //来源单据行TS
+ sourcets: 'sourcets', //来源单据TS
+ vsourcecode: 'vsourcecode', //来源单据号
+ vsourcerowno: 'vsourcerowno', //来源单据行号
+ vsourcetrantype: 'vsourcetrantype', //来源交易类型
+ ts: 'ts',
+ naccumsettmny: 'naccumsettmny', //累计本币结算金额
+ naccumsettnum: 'naccumsettnum', //累计结算主数量
+ pk_order: 'pk_order', //采购订单主键
+ pk_order_b: 'pk_order_b', //采购订单行主键
+ vordercode: 'vordercode', //订单号
+ vordertrantype: 'vordertrantype', //订单交易类型
+ ntaxrate: 'ntaxrate', //税率
+ cproductorid: 'invoicebody.cproductorid', //生产厂商
+ nastnum: 'nastnum', //数量
+ nnum: 'nnum', //主数量
+ norigtaxmny: 'norigtaxmny', //价税合计
+ ncalcostmny: 'ncalcostmny', //计成本金额
+ ncaltaxmny: 'ncaltaxmny', //计税金额
+ ctaxcodeid: 'ctaxcodeid', //税码
+ pk_apliabcenter_v: 'pk_apliabcenter_v', //利润中心
+ nnosubtax: 'nnosubtax', //不可抵扣税额
+ ntax: 'ntax', //税额
+ nmny: 'nmny', //本币无税金额
+ ntaxmny: 'ntaxmny', //本币价税合计
+ ngroupmny: 'ngroupmny', //集团本币无税金额
+ ngrouptaxmny: 'ngrouptaxmny', //集团本币价税合计
+ nglobalmny: 'nglobalmny', //全局本币无税金额
+ nglobaltaxmny: 'nglobaltaxmny', //全局本币价税合计
+ norigmny: 'norigmny', // 金额
+ nastorigprice: 'nastorigprice', //无税单价
+ nastorigtaxprice: 'nastorigtaxprice', //含税单价
+ vbatchcode: 'vbatchcode', //批次号
+ pk_batchcode: 'pk_batchcode', //批次号主键
+ ftaxtypeflag: 'ftaxtypeflag', //扣税类别
+ nqtorignetprice: 'nqtorignetprice', //无税净价
+ nqtorigtaxnetprc: 'nqtorigtaxnetprc', //含税净价
+ norigtaxnetprice: 'norigtaxnetprice', //主含税净价
+ norignetprice: 'norignetprice', //主无税净价
+ norigmny: 'norigmny', //无税金额
+ /***消耗汇总表头字段 ***********************************************/
+ cvmihid: 'cvmihid', //消耗汇总表头主键
+ cvmibid: 'cvmibid', //消耗汇总表体主键
+ // ctrantypeid: 'ctrantypeid', //消耗汇总类型
+ cfanaceorgoid: 'cfanaceorgoid', //结算财务组织
+ cmaterialoid: 'cmaterialoid', //物料(OID)
+ cwarehouseid: 'cwarehouseid', //仓库
+ remainsum: 'remainsum', //可开票主数量
+ nnumsum: 'nnumsum', //汇总主数量
+ ntotalinvoicenum: 'ntotalinvoicenum', //已开票数量
+ /***收票全部字段****************************************************/
+ /***采购订单****************************************************/
+ pk_arrvstoorg: 'pk_order_b.pk_arrvstoorg', //收货库存组织最新版本
+ pks: 'pks' //里程碑看板跳转
+};
+
+// 参照增行校验来源表头数据与当前表头数据是否一致所校验的属性
+const ADD_ROW_FIELDS = [
+ 'pk_org',
+ // 'ctrantypeid',
+ 'finvoiceclass',
+ 'pk_supplier',
+ 'corigcurrencyid',
+ 'nexchangerate',
+ 'ftaxtypeflagh'
+];
+
+// 支持批量粘贴的字段
+const BATCHITEM = [
+ 'pk_material',
+ 'nastnum',
+ 'nnum',
+ 'nastorigtaxprice',
+ 'nastorigprice',
+ 'ftaxtypeflag',
+ 'ntaxrate',
+ 'pk_apfinanceorg_v',
+ 'pk_apliabcenter_v',
+ 'cprojectid',
+ 'vmemob',
+ 'norigtaxprice',
+ 'norigtaxmny',
+ 'norigmny',
+ 'ntax',
+ 'pk_costsubj',
+ 'blastfeesettle',
+ 'cffileid'
+ // 自定义项
+];
+
+// 表头自定义项
+const HEAD_VDEF = [
+ 'vdef1',
+ 'vdef2',
+ 'vdef3',
+ 'vdef4',
+ 'vdef5',
+ 'vdef6',
+ 'vdef7',
+ 'vdef8',
+ 'vdef9',
+ 'vdef10',
+ 'vdef11',
+ 'vdef12',
+ 'vdef13',
+ 'vdef14',
+ 'vdef15',
+ 'vdef16',
+ 'vdef17',
+ 'vdef18',
+ 'vdef19',
+ 'vdef20'
+];
+
+// 表体自定义项
+const BODY_VBDEF = [
+ 'vbdef1',
+ 'vbdef2',
+ 'vbdef3',
+ 'vbdef4',
+ 'vbdef5',
+ 'vbdef6',
+ 'vbdef7',
+ 'vbdef8',
+ 'vbdef9',
+ 'vbdef10',
+ 'vbdef11',
+ 'vbdef12',
+ 'vbdef13',
+ 'vbdef14',
+ 'vbdef15',
+ 'vbdef16',
+ 'vbdef17',
+ 'vbdef18',
+ 'vbdef19',
+ 'vbdef20'
+];
+
+// 自由辅助属性
+const VFREE = [ 'vfree1', 'vfree2', 'vfree3', 'vfree4', 'vfree5', 'vfree6', 'vfree7', 'vfree8', 'vfree9', 'vfree10' ];
+/**
+ * 自由辅助属性
+ */
+const FREEFIELD = {
+ ccustomerid: 'casscustid',
+ ccustomervid: 'casscustvid',
+ cvendorid: 'pk_supplier',
+ cvendorvid: 'pk_supplier_v'
+};
+export {
+ COMMON,
+ APPCODE,
+ AREA,
+ UISTATE,
+ INVC_UI_STATE,
+ BILLSTATUS,
+ URL,
+ BUTTONID,
+ FIELD,
+ PK,
+ TRANSFER_TYPE,
+ PAGECODE,
+ BILLTYPE,
+ Q_TEMPLET_ID,
+ KEYMAP,
+ MAIN_ORG_FIELD,
+ FILTER_FIELD,
+ MODAL_ID,
+ HEAD_VDEF,
+ BODY_VBDEF,
+ VFREE,
+ ADD_ROW_FIELDS,
+ SCENE,
+ BATCHITEM,
+ FREEFIELD
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/yyc/constance/index.js b/src/pu/pu/yyc/constance/index.js
new file mode 100644
index 0000000..3938b5d
--- /dev/null
+++ b/src/pu/pu/yyc/constance/index.js
@@ -0,0 +1,50 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * 友云采扩展按钮常量类
+ * @Author: guozhq
+ * @Date: 2019-05-16 16:47:13
+ * @Last Modified by: chuaijl
+ * @Last Modified time: 2023-07-21 13:36:31
+ */
+
+// 按钮
+const YYC_BUTTON_ID = {
+ SendToYC: 'SendToYC', // 发布至云采
+ CancelSendToYC: 'CancelSendToYC', // 取消发布至云采
+ LookYCQtInfo: 'LookYCQtInfo', // 查看报价信息
+ LookYCSchedule: 'LookYCSchedule' // 云采处理进度
+};
+
+// 模块号
+const YYC_PARAM = {
+ DATASOURCE: 'YYC_DATASOURCE',
+ YCPO001: '4080'
+};
+
+const YYC_BUTTON_ARRAY = [
+ YYC_BUTTON_ID.SendToYC,
+ YYC_BUTTON_ID.CancelSendToYC,
+ YYC_BUTTON_ID.LookYCQtInfo,
+ YYC_BUTTON_ID.LookYCSchedule
+];
+
+// 请购地址
+const Req_URL = {
+ SendToYC: '/nccloud/pu/buyingreq/send2yyc.do',
+ CancelSendToYC: '/nccloud/pu/buyingreq/cancel2yyc.do',
+ LookYCQtInfo: '/nccloud/pu/buyingreq/yycviewqt.do',
+ LookYCSchedule: '/nccloud/pu/buyingreq/yycschedule.do'
+};
+// 订单地址
+const Order_URL = {
+ SendToYC: '/nccloud/pu/poorder/poorderyycpubaction.do',
+ CancelSendToYC: '/nccloud/pu/poorder/poorderyyccancelpubaction.do'
+};
+// 到货计划地址
+const ArrivePlan_URL = {
+ SendToYC: '/nccloud/pu/poorder/arriveplanyycpubaction.do',
+ CancelSendToYC: '/nccloud/pu/poorder/arriveplanyyccancelpubaction.do'
+};
+export { YYC_BUTTON_ID, YYC_PARAM, YYC_BUTTON_ARRAY, Req_URL, Order_URL, ArrivePlan_URL };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/pu/pu/yyc/ext/yycBtnClick.js b/src/pu/pu/yyc/ext/yycBtnClick.js
new file mode 100644
index 0000000..c380223
--- /dev/null
+++ b/src/pu/pu/yyc/ext/yycBtnClick.js
@@ -0,0 +1,430 @@
+/*IgbazTlOjw+s76YHFgTcgLqLkrqqdZAqytZUE2J64a0=*/
+/*
+ * 友云采扩展按钮
+ * @Author: guozhq
+ * @Date: 2019-05-16 16:48:52
+ * @Last Modified by: chuaijl
+ * @Last Modified time: 2023-11-17 10:39:50
+ */
+
+import { ajax } from 'nc-lightapp-front';
+import { showErrorInfo, showSuccessInfo, showWarningInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
+import { updateCacheData } from '../../../../scmpub/scmpub/pub/cache';
+import { BUYINGREQ_LIST } from '../../buyingreq/siconst';
+import { OrderCache, STATUS } from '../../../pu/poorder/constance';
+import { YYC_BUTTON_ID, Req_URL, Order_URL, ArrivePlan_URL } from '../constance';
+/**
+ * 发送或取消YYC
+ * @param {*} props
+ * @param {*} param1
+ */
+function sendOrCancel(
+ props,
+ {
+ url,
+ msg,
+ isSingleTable,
+ isList,
+ isCard,
+ listArea,
+ cardheadarea,
+ cardbodyarea,
+ billidField,
+ billbidField,
+ pageCode,
+ needBody = true
+ }
+) {
+ let data = null;
+ if (isList) {
+ let rows = props.table.getCheckedRows(listArea);
+ if (rows && rows.length > 0) {
+ let dataArray = rows.map((row) => {
+ return { headid: row.data.values[billidField].value };
+ });
+ data = {
+ data: dataArray,
+ iscard: false,
+ pageid: pageCode
+ };
+ } else {
+ return;
+ }
+ } else if (isCard) {
+ let headid = props.form.getFormItemsValue(cardheadarea, billidField).value;
+ if (needBody) {
+ let rows = props.cardTable.getCheckedRows(cardbodyarea);
+ if (rows && rows.length > 0) {
+ let bodyids = rows.map((row) => {
+ return row.data.values[billbidField].value;
+ });
+ data = {
+ data: [
+ {
+ headid: headid,
+ bodyids: bodyids
+ }
+ ],
+ iscard: true,
+ pageid: pageCode
+ };
+ } else {
+ let message = getLangByResId(this, '4004pub-000010'); /* 国际化处理: 请选择表体数据!*/
+ showWarningInfo(null, message);
+ return;
+ }
+ } else {
+ data = {
+ data: [
+ {
+ headid: headid
+ }
+ ],
+ iscard: true,
+ pageid: pageCode
+ };
+ }
+ } else if (isSingleTable) {
+ let rows = props.editTable.getCheckedRows(listArea);
+ if (rows && rows.length > 0) {
+ let map = {};
+ rows.forEach((row) => {
+ let headid = row.data.values[billidField].value;
+ let bodyid = row.data.values[billbidField].value;
+ if (map.hasOwnProperty(headid)) {
+ let array = map[headid];
+ array.push(bodyid);
+ } else {
+ let array = [ bodyid ];
+ map[headid] = array;
+ }
+ });
+ let dataArray = [];
+ for (let headid in map) {
+ dataArray.push({ headid: headid, bodyids: map[headid] });
+ }
+ data = {
+ data: dataArray,
+ iscard: false,
+ pageid: pageCode
+ };
+ }
+ }
+ if (data) {
+ console.log(url, 'url');
+ console.log(data, 'data');
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let status = res.data.status;
+ if (status && status === 'failed') {
+ showErrorInfo(null, res.data.failedMessage);
+ } else {
+ if(isSingleTable) {
+ updateCacheDataArrange(props, listArea, billidField, res.data);
+ }else if(isCard) {
+ let pkid = res.data.head[cardheadarea].rows[0].values[billidField].value;
+ if (res.data.head) {
+ props.form.setAllFormValue({ [cardheadarea]: res.data.head[cardheadarea] });
+ }
+ if (billidField == "pk_praybill") {
+ updateCacheData(props, billidField, pkid, res.data, cardheadarea, BUYINGREQ_LIST.dataSource);
+ if (res.data.body) {
+ props.cardTable.setTableData(cardbodyarea, res.data.body[cardbodyarea]);
+ }
+ } else if (billidField == "pk_order"){
+ updateCacheData(props, billidField, pkid, res.data, cardheadarea, OrderCache.OrderCacheKey);
+ if (res.data.bodys) {
+ props.cardTable.setTableData("card_material", res.data.bodys["card_material"]);
+ }
+ props.form.setFormStatus(cardheadarea, STATUS.browse);
+ }
+ }else {
+ updateCacheDataForList(props, listArea, billidField, res.data);
+ }
+ showSuccessInfo(null, res.data.successMessage ? res.data.successMessage : msg);
+ }
+ }
+ }
+ });
+ }
+}
+
+/**
+ * 查看报价信息
+ * @param {} props
+ * @param {*} param1
+ */
+function lookYCQtInfo(
+ props,
+ { url, isSingleTable, isList, isCard, listArea, cardheadarea, cardbodyarea, billidField, billbidField }
+) {
+ if (isCard) {
+ let checkArr = props.cardTable.getCheckedRows(cardbodyarea);
+ if (checkArr && checkArr.length > 0) {
+ let param = checkArr[0].data.values[billbidField].value;
+ openOut(props, url, param);
+ }
+ } else if (isSingleTable) {
+ let rows = props.editTable.getCheckedRows(listArea);
+ if (rows && rows.length > 0) {
+ let param = rows[0].data.values[billbidField].value;
+ openOut(props, url, param);
+ }
+ }
+}
+
+/**
+ * 查看进度
+ * @param {*} props
+ * @param {*} param1
+ */
+function lookYCSchedule(
+ props,
+ { url, isSingleTable, isList, isCard, listArea, cardheadarea, cardbodyarea, billidField, billbidField }
+) {
+ let param = null;
+ if (isList) {
+ let rows = props.table.getCheckedRows(listArea);
+ if (rows && rows.length > 0) {
+ param = rows[0].data.values['vbillcode'].value;
+ }
+ } else if (isCard) {
+ param = props.form.getFormItemsValue(cardheadarea, 'vbillcode').value;
+ } else if (isSingleTable) {
+ let rows = props.editTable.getCheckedRows(listArea);
+ if (rows && rows.length > 0) {
+ param = rows[0].data.values['vbillcode'].value;
+ }
+ }
+ if (param) {
+ openOut(props, url, param);
+ }
+}
+
+/**
+ * 打开云采界面
+ * @param {*} props
+ * @param {*} url
+ * @param {*} param
+ */
+function openOut(props, url, param) {
+ console.log(url, '111');
+ console.log(param, '222');
+
+ ajax({
+ url: url,
+ data: param,
+ success: (res) => {
+ if (res.data) {
+ props.openOut(res.data);
+ }
+ }
+ });
+}
+
+/**
+ * 请购单YYC按钮点击事件
+ * @param {*} props
+ * @param {*} buttonid
+ * @param {*} param
+ */
+function reqYYCBtnClick(
+ props,
+ buttonid,
+ param = { isSingleTable, isList, isCard, listArea, cardheadarea, cardbodyarea, billidField, billbidField }
+) {
+ switch (buttonid) {
+ case YYC_BUTTON_ID.SendToYC:
+ let sendMsg = getLangByResId(this, '4004pub-000008'); /* 国际化处理: 发布至云采成功!*/
+ sendOrCancel.call(this, props, { msg: sendMsg, url: Req_URL.SendToYC, ...param });
+ break;
+ case YYC_BUTTON_ID.CancelSendToYC:
+ let cancelMsg = getLangByResId(this, '4004pub-000009'); /* 国际化处理: 取消发布至云采成功!*/
+ sendOrCancel.call(this, props, { msg: cancelMsg, url: Req_URL.CancelSendToYC, ...param });
+ break;
+ case YYC_BUTTON_ID.LookYCQtInfo:
+ lookYCQtInfo(props, { url: Req_URL.LookYCQtInfo, ...param });
+ break;
+ case YYC_BUTTON_ID.LookYCSchedule:
+ lookYCSchedule(props, { url: Req_URL.LookYCSchedule, ...param });
+ break;
+ }
+}
+
+/**
+ * 采购订单YYC按钮点击事件
+ * @param {*} props
+ * @param {*} buttonid
+ * @param {*} param
+ */
+function orderYYCBtnClick(props, buttonid, param = { isList, isCard, listArea, cardheadarea, billidField }) {
+ switch (buttonid) {
+ case YYC_BUTTON_ID.SendToYC:
+ let sendMsg = getLangByResId(this, '4004pub-000008'); /* 国际化处理: 发布至云采成功!*/
+ sendOrCancel.call(this, props, { msg: sendMsg, url: Order_URL.SendToYC, ...param, needBody: false });
+ break;
+ case YYC_BUTTON_ID.CancelSendToYC:
+ let cancelMsg = getLangByResId(this, '4004pub-000009'); /* 国际化处理: 取消发布至云采成功!*/
+ sendOrCancel.call(this, props, { msg: cancelMsg, url: Order_URL.CancelSendToYC, ...param, needBody: false });
+ break;
+ }
+}
+
+/**
+ * 采购订单到货计划YYC按钮点击事件
+ * @param {*} props
+ * @param {*} buttonid
+ * @param {*} param
+ */
+function arrivePlanYYCBtnClick(props, buttonid, param = { isList, isCard, listArea, cardheadarea, billidField }) {
+ switch (buttonid) {
+ case YYC_BUTTON_ID.SendToYC:
+ let sendMsg = getLangByResId(this, '4004pub-000008'); /* 国际化处理: 发布至云采成功!*/
+ arrivePlanSendOrCancel.call(this, props, {
+ msg: sendMsg,
+ url: ArrivePlan_URL.SendToYC,
+ ...param,
+ needBody: false
+ });
+ break;
+ case YYC_BUTTON_ID.CancelSendToYC:
+ let cancelMsg = getLangByResId(this, '4004pub-000009'); /* 国际化处理: 取消发布至云采成功!*/
+ arrivePlanSendOrCancel.call(this, props, {
+ msg: cancelMsg,
+ url: ArrivePlan_URL.CancelSendToYC,
+ ...param,
+ needBody: false
+ });
+ break;
+ }
+}
+
+/**
+ * 发送或取消到货计划YYC
+ * @param {*} props
+ * @param {*} param1
+ */
+function arrivePlanSendOrCancel(props, { url, msg, listArea, billidField, pageCode }) {
+ let data = null;
+ let rows = props.editTable.getCheckedRows(listArea);
+ if (rows && rows.length > 0) {
+ let dataArray = [];
+ rows.map((row) => {
+ dataArray.push(row.data.values[billidField].value);
+ });
+ data = {
+ pks: dataArray,
+ iscard: false,
+ pageid: pageCode
+ };
+ } else {
+ let message = getLangByResId(this, '4004pub-000010'); /* 国际化处理: 请选择表体数据!*/
+ showWarningInfo(null, message);
+ return;
+ }
+ if (data) {
+ console.log(url, 'url');
+ console.log(data, 'data');
+ ajax({
+ url: url,
+ data: data,
+ success: (res) => {
+ if (res.data) {
+ let status = res.data.status;
+ if (status && status === 'failed') {
+ showErrorInfo(null, res.data.failedMessage);
+ } else {
+ let rowsData = { rows: [] };
+ rowsData = res.data[listArea];
+ props.editTable.setTableData(listArea, rowsData);
+ showSuccessInfo(null, res.data.successMessage ? res.data.successMessage : msg);
+ }
+ }
+ }
+ });
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {区域ID} tableId
+ * @param {主键字段code} pk_field
+ * @param {批量处理后台返回的数据结构} messageInfo
+ */
+ function updateCacheDataArrange(props, tableId, pk_field, messageInfo, index) {
+ if (messageInfo == null || messageInfo[tableId] == null || messageInfo[tableId].length == 0) {
+ return;
+ }
+
+ // 组装更新数据
+ let updateDatas = [];
+ // 列表表头按钮
+ if (index == undefined) {
+ // 更新成功的数据
+ //1. 构建界面选择的信息 主键和index的对应关系
+ let selMap = {};
+ let selrows = props.editTable.getCheckedRows(tableId);
+ selrows.forEach((row) => {
+ let selpk = row.data.values[pk_field].value;
+ selMap[selpk] = row.index;
+ });
+ messageInfo[tableId].rows.forEach((sucessrow, index) => {
+ let pkvalue = sucessrow.values[pk_field].value;
+ let updateData = {
+ index: selMap[pkvalue],
+ data: { values: sucessrow.values }
+ };
+ updateDatas.push(updateData);
+ });
+ } else {
+ let updateData = {
+ index: index,
+ data: { values: messageInfo[tableId].rows[0].values }
+ };
+ updateDatas.push(updateData);
+ }
+ props.editTable.updateDataByIndexs(tableId, updateDatas);
+}
+
+function updateCacheDataForList(props, tableId, pk_field, messageInfo, index) {
+ if (messageInfo == null || messageInfo[tableId] == null || messageInfo[tableId].length == 0) {
+ return;
+ }
+
+ // 组装更新数据
+ let updateDatas = [];
+ // 列表表头按钮
+ if (index == undefined) {
+ // 更新成功的数据
+ //1. 构建界面选择的信息 主键和index的对应关系
+ let selMap = {};
+ let selrows = props.table.getCheckedRows(tableId);
+ selrows.forEach((row) => {
+ let selpk = row.data.values[pk_field].value;
+ selMap[selpk] = row.index;
+ });
+ messageInfo[tableId].rows.forEach((sucessrow, index) => {
+ let pkvalue = sucessrow.values[pk_field].value;
+ let updateData = {
+ index: selMap[pkvalue],
+ data: { values: sucessrow.values }
+ };
+ updateDatas.push(updateData);
+ });
+ } else {
+ let updateData = {
+ index: index,
+ data: { values: messageInfo[tableId].rows[0].values }
+ };
+ updateDatas.push(updateData);
+ }
+ props.table.updateDataByIndexs(tableId, updateDatas);
+}
+export { reqYYCBtnClick, orderYYCBtnClick, arrivePlanYYCBtnClick };
+
+/*IgbazTlOjw+s76YHFgTcgLqLkrqqdZAqytZUE2J64a0=*/
\ No newline at end of file
diff --git a/src/pu/pu/yyc/ext/yycBtnControl.js b/src/pu/pu/yyc/ext/yycBtnControl.js
new file mode 100644
index 0000000..9fafddf
--- /dev/null
+++ b/src/pu/pu/yyc/ext/yycBtnControl.js
@@ -0,0 +1,97 @@
+/*EoJtluWaTfMvi1AGpBiYVypDcSCRK+o/TwE1thKtHLU=*/
+/*
+ * 友云采按钮控制
+ * @Author: guozhq
+ * @Date: 2019-05-20 16:21:30
+ * @Last Modified by: chuaijl
+<<<<<<< HEAD
+ * @Last Modified time: 2023-03-07 10:26:52
+=======
+ * @Last Modified time: 2023-07-21 12:29:02
+>>>>>>> develop-fea-cf
+ */
+import { YYC_BUTTON_ARRAY } from '../constance';
+import { isYYC } from './yycBtnInit';
+
+function reqBtnControl(props, { isList, isCard, listArea, cardHeadArea, billStatusField, status }) {
+ if (isYYC()) {
+ if (isCard) {
+ // 根据状态判断是否显示按钮
+ // let status = props.getUrlParam('status');
+ let billstatus = props.form.getFormItemsValue(cardHeadArea, billStatusField).value;
+ if (status === 'browse' && billstatus == '3') {
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, true);
+ } else {
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, false);
+ }
+ }
+ if (isList) {
+ let rows = props.table.getCheckedRows(listArea);
+ if (rows.length > 0) {
+ props.button.setDisabled(YYC_BUTTON_ARRAY, false);
+ } else {
+ props.button.setDisabled(YYC_BUTTON_ARRAY, true);
+ }
+ }
+ }
+}
+
+/**
+ * 采购订单按钮状态控制
+ * @param {*} props
+ * @param {*} param
+ */
+function orderBtnControl(props, { isList, isCard, listArea, cardHeadArea, billStatusField, pk_orderField, status }) {
+ if (isYYC()) {
+ if (isCard) {
+ // 根据状态判断是否显示按钮
+ // let status = props.getUrlParam('status');
+ let billstatus = props.form.getFormItemsValue(cardHeadArea, billStatusField).value;
+ let pk_order = props.form.getFormItemsValue(cardHeadArea, pk_orderField).value;
+ // 自由状态可用
+ if (status === 'browse' && billstatus == '0' && pk_order != null) {
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, true);
+ } else {
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, false);
+ }
+ }
+ if (isList) {
+ let rows = props.table.getCheckedRows(listArea);
+ if (rows.length > 0) {
+ props.button.setDisabled(YYC_BUTTON_ARRAY, false);
+ } else {
+ props.button.setDisabled(YYC_BUTTON_ARRAY, true);
+ }
+ }
+ }
+}
+
+/**
+ * 采购订单到货计划云采按钮状态控制
+ * @param {*} props
+ * @param {*} param
+ */
+function arrivePlanBtnControl(props, { listArea, cardHeadArea, billStatusField, pk_orderField, status }) {
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, isYYC());
+}
+
+/**
+ * 请购安排按钮控制
+ * @param {*} props
+ * @param {*} param1
+ */
+function reqArrangeBtnControl(props, { tableArea }) {
+ if (isYYC()) {
+ // 根据状态判断是否显示按钮
+ let rows = props.editTable.getCheckedRows(tableArea);
+ if (rows.length > 0) {
+ props.button.setDisabled(YYC_BUTTON_ARRAY, false);
+ } else {
+ props.button.setDisabled(YYC_BUTTON_ARRAY, true);
+ }
+ }
+}
+
+export { reqBtnControl, orderBtnControl, reqArrangeBtnControl, arrivePlanBtnControl };
+
+/*EoJtluWaTfMvi1AGpBiYVypDcSCRK+o/TwE1thKtHLU=*/
\ No newline at end of file
diff --git a/src/pu/pu/yyc/ext/yycBtnInit.js b/src/pu/pu/yyc/ext/yycBtnInit.js
new file mode 100644
index 0000000..1a44394
--- /dev/null
+++ b/src/pu/pu/yyc/ext/yycBtnInit.js
@@ -0,0 +1,58 @@
+/*hUt5ea1KMJupkbN45e+r66DImFAuZfRBAmUnmJ95Up0=*/
+/*
+ * 云采按钮初始化
+ * @Author: guozhq
+ * @Date: 2019-05-16 16:51:55
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2022-04-11 16:09:09
+ */
+import { getDefData, setDefData } from '../../../../scmpub/scmpub/pub/cache';
+import { YYC_PARAM, YYC_BUTTON_ARRAY } from '../constance';
+import { ajax } from 'nc-lightapp-front';
+
+/**
+ * 友云采按钮初始化
+ * @param {*} props
+ */
+function yycBtnInit(props) {
+ // 判断当前缓存是否存在
+ let param = getDefData(YYC_PARAM.DATASOURCE, YYC_PARAM.YCPO001);
+ if (param) {
+ let isEnable = param[YYC_PARAM.YCPO001];
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, isEnable);
+ } else {
+ let data = [ YYC_PARAM.YCPO001 ];
+ ajax({
+ url: '/nccloud/scmpub/pub/sysinitgroup.do',
+ data: data,
+ async: false,
+ success: (res) => {
+ if (res.data) {
+ let isEnable = res.data[YYC_PARAM.YCPO001];
+ if (isEnable) {
+ isEnable = true;
+ } else {
+ isEnable = false;
+ }
+ setDefData(YYC_PARAM.DATASOURCE, YYC_PARAM.YCPO001, { [YYC_PARAM.YCPO001]: isEnable });
+ props.button.setButtonVisible(YYC_BUTTON_ARRAY, isEnable);
+ }
+ }
+ });
+ }
+}
+
+/**
+ * 判断是否已经启用友云采参数
+ */
+function isYYC() {
+ let param = getDefData(YYC_PARAM.DATASOURCE, YYC_PARAM.YCPO001);
+ if (param) {
+ return param[YYC_PARAM.YCPO001];
+ }
+ return null;
+}
+
+export { yycBtnInit, isYYC };
+
+/*hUt5ea1KMJupkbN45e+r66DImFAuZfRBAmUnmJ95Up0=*/
\ No newline at end of file
diff --git a/src/pu/public/lang/standard/simpchn/4004arrival.json b/src/pu/public/lang/standard/simpchn/4004arrival.json
new file mode 100644
index 0000000..5fbe32e
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004arrival.json
@@ -0,0 +1,79 @@
+{
+ "4004ARRIVAL-000000": "保存成功",
+ "4004ARRIVAL-000001": "确定要取消吗?",
+ "4004ARRIVAL-000002": "删除",
+ "4004ARRIVAL-000003": "确定要删除吗?",
+ "4004ARRIVAL-000004": "删除成功",
+ "4004ARRIVAL-000005": "保存提交成功",
+ "4004ARRIVAL-000006": "收回成功",
+ "4004ARRIVAL-000007": "请选择数据!",
+ "4004ARRIVAL-000008": "请选择数据",
+ "4004ARRIVAL-000009": "生成资产卡片成功",
+ "4004ARRIVAL-000010": "删除资产卡片成功",
+ "4004ARRIVAL-000011": "生成转固单成功",
+ "4004ARRIVAL-000012": "删除转固单片成功",
+ "4004ARRIVAL-000013": "报检成功",
+ "4004ARRIVAL-000014": "请启用委外模块!",
+ "4004ARRIVAL-000015": "合并显示",
+ "4004ARRIVAL-000016": "到货单合并打印",
+ "4004ARRIVAL-000017": "提交成功",
+ "4004ARRIVAL-000018": "检验成功",
+ "4004ARRIVAL-000019": "删除转固单成功",
+ "4004ARRIVAL-000020": "保存成功,提交失败,失败原因:",
+ "4004ARRIVAL-000021": "取消成功",
+ "4004ARRIVAL-000022": "提示",
+ "4004ARRIVAL-000023": "有未处理完的单据,是否退出转单?",
+ "4004ARRIVAL-000024": "当前单据未保存,您确认离开此页面?",
+ "4004ARRIVAL-000025": "订单号未录入!",
+ "4004ARRIVAL-000026": "快速收货成功",
+ "4004ARRIVAL-000027": "指派",
+ "4004ARRIVAL-000028": "是否确认删除?",
+ "4004ARRIVAL-000029": "到货单",
+ "4004ARRIVAL-000030": "快速收货",
+ "4004ARRIVAL-000031": "订单号",
+ "4004ARRIVAL-000032": "保存前是否浏览",
+ "4004ARRIVAL-000033": "是",
+ "4004ARRIVAL-000034": "否",
+ "4004ARRIVAL-000035": "确定",
+ "4004ARRIVAL-000036": "取消",
+ "4004ARRIVAL-000037": "物料替换件参照",
+ "4004ARRIVAL-000038": "操作",
+ "4004ARRIVAL-000039": "是否删除?",
+ "4004ARRIVAL-000040": "展开",
+ "4004ARRIVAL-000041": "请先选择数据",
+ "4004ARRIVAL-000042": "确定要删除所选数据吗?",
+ "4004ARRIVAL-000043": "请选择需要提交的数据!",
+ "4004ARRIVAL-000044": "订单号未录入!",
+ "4004ARRIVAL-000045": "该订单不满足快速收货条件,无法再进行快速收货!",
+ "4004ARRIVAL-000046": "待提交",
+ "4004ARRIVAL-000047": "审批中",
+ "4004ARRIVAL-000048": "执行中",
+ "4004ARRIVAL-000049": "全部",
+ "4004ARRIVAL-000050": "确定要删除吗?",
+ "4004ARRIVAL-000051": "查询结果为空",
+ "4004ARRIVAL-000052": "本次退货主数量",
+ "4004ARRIVAL-000053": "生成退货单",
+ "4004ARRIVAL-000054": "选择订单",
+ "4004ARRIVAL-000055": "生成到货单",
+ "4004ARRIVAL-000056": "到货",
+ "4004ARRIVAL-000057": "本次收货主数量",
+ "4004ARRIVAL-000058": "查询成功",
+ "4004ARRIVAL-000059": "刷新成功",
+ "4004ARRIVAL-000060": "提交",
+ "4004ARRIVAL-000061": "删除",
+ "4004ARRIVAL-000062": "收回",
+ "4004ARRIVAL-000063": "请选择行!",
+ "4004ARRIVAL-000064": "易耗品管理模块未启用,无法生成周转材!",
+ "4004ARRIVAL-000065": "扫码结果",
+ "4004ARRIVAL-000066": "表体为空!",
+ "4004ARRIVAL-000067": "扫码拉单",
+ "4004ARRIVAL-000068": "到货单物料行参照",
+ "4004ARRIVAL-000069": "确定",
+ "4004ARRIVAL-000070": "请选择物料行",
+ "4004ARRIVAL-000071": "确认修改",
+ "4004ARRIVAL-000072": "修改结算财务组织,会清空您费用明细页签录入的对应费用项信息,请确认是否修改?",
+ "4004ARRIVAL-000073": "模板中不存在【费用项】【费用明细】页签,请重新复制预制模板",
+ "4004ARRIVAL-000074": "有来源的单据汇率类型不支持修改为固定汇率,请知晓!",
+ "4004ARRIVAL-000075": "委外业务不支持在到货单维护费用信息,请知晓!",
+ "4004ARRIVAL-000076": "注意!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004arrivalqc.json b/src/pu/public/lang/standard/simpchn/4004arrivalqc.json
new file mode 100644
index 0000000..a0c5d96
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004arrivalqc.json
@@ -0,0 +1,18 @@
+{
+ "4004ARRIVALQC-000000": "检验成功!",
+ "4004ARRIVALQC-000001": "主组织不能为空!",
+ "4004ARRIVALQC-000002": "请先选择数据!",
+ "4004ARRIVALQC-000003": "反检成功!",
+ "4004ARRIVALQC-000004": "查询成功!",
+ "4004ARRIVALQC-000005": "查询结果为空!",
+ "4004ARRIVALQC-000006": "本次报检数量或合格主数量不能清空!",
+ "4004ARRIVALQC-000007": "报检数量和合格主数量不能为负数!",
+ "4004ARRIVALQC-000008": "数量关系错:本次报检 + 累计报检主数量 > 到货数量",
+ "4004ARRIVALQC-000009": " 数量关系错:合格主数量 > 本次报检数量",
+ "4004ARRIVALQC-000010": "到货单检验",
+ "4004ARRIVALQC-000011": "确认报检",
+ "4004ARRIVALQC-000012": "确定要报检所选数据吗?",
+ "4004ARRIVALQC-000013": "取消",
+ "4004ARRIVALQC-000014": "请注意",
+ "4004ARRIVALQC-000015": "无符合条件数据"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004buyposition.json b/src/pu/public/lang/standard/simpchn/4004buyposition.json
new file mode 100644
index 0000000..d4e0d24
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004buyposition.json
@@ -0,0 +1,25 @@
+{
+ "4004BUYPOSITION-000000": "应用",
+ "4004BUYPOSITION-000001": "时间戳",
+ "4004BUYPOSITION-000002": "主表主键",
+ "4004BUYPOSITION-000003": "子表主键",
+ "4004BUYPOSITION-000004": "采购组织",
+ "4004BUYPOSITION-000005": "删除成功!",
+ "4004BUYPOSITION-000006": "确认要删除吗?",
+ "4004BUYPOSITION-000007": "请选择数据!",
+ "4004BUYPOSITION-000008": "注意",
+ "4004BUYPOSITION-000009": "确定要删除所选数据吗",
+ "4004BUYPOSITION-000010": "保存成功!",
+ "4004BUYPOSITION-000011": "表格不能为空!",
+ "4004BUYPOSITION-000012": "保存失败!",
+ "4004BUYPOSITION-000013": "物料分类和物料不能同时为空!",
+ "4004BUYPOSITION-000014": "当前单据未保存,您确认离开此页面?",
+ "4004BUYPOSITION-000015": "确认删除",
+ "4004BUYPOSITION-000016": "是否确认删除?",
+ "4004BUYPOSITION-000017": "取消",
+ "4004BUYPOSITION-000018": "确认取消",
+ "4004BUYPOSITION-000019": "是否确认要取消?",
+ "4004BUYPOSITION-000020": "采购岗物料设置",
+ "4004BUYPOSITION-000021": "操作",
+ "4004BUYPOSITION-000022": "刷新成功!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004cancelest.json b/src/pu/public/lang/standard/simpchn/4004cancelest.json
new file mode 100644
index 0000000..09ea55c
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004cancelest.json
@@ -0,0 +1,19 @@
+{
+ "4004CANCELEST-000000": "取消费用暂估成功",
+ "4004CANCELEST-000001": "取消暂估成功",
+ "4004CANCELEST-000002": "未查询到数据!",
+ "4004CANCELEST-000003": "询问",
+ "4004CANCELEST-000004": "所选数据存在既做过货物暂估又做过费用暂估的记录,确定全部取消吗?",
+ "4004CANCELEST-000005": "否",
+ "4004CANCELEST-000006": "是",
+ "4004CANCELEST-000007": "取消暂估",
+ "4004CANCELEST-000008": "费用明细",
+ "4004CANCELEST-000009": "对应入库单行暂估的费用项及分摊的金额",
+ "4004CANCELEST-000010": "(是:仅取消费用暂估;否:货物暂估和费用暂估全部取消)",
+ "4004CANCELEST-000011": "取消",
+ "4004CANCELEST-000012": "提示信息",
+ "4004CANCELEST-000013": "全部取消",
+ "4004CANCELEST-000014": "仅取消费用",
+ "4004CANCELEST-000015": "不取消"
+
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004comarebill.json b/src/pu/public/lang/standard/simpchn/4004comarebill.json
new file mode 100644
index 0000000..4906c52
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004comarebill.json
@@ -0,0 +1,42 @@
+{
+ "4004comarebill-000000": "费用申请比例介于0到100之间",
+ "4004comarebill-000001": "扩展属性",
+ "4004comarebill-000002": "关闭成功",
+ "4004comarebill-000003": "打开成功",
+ "4004comarebill-000004": "确认修改",
+ "4004comarebill-000005": "是否修改组织,这样会清空您录入的信息?",
+ "4004comarebill-000006": "取消发送成功",
+ "4004comarebill-000007": "普通",
+ "4004comarebill-000008": "状态:",
+ "4004comarebill-000009": "确定要删除吗?",
+ "4004comarebill-000010": "待提交",
+ "4004comarebill-000011": "审批中",
+ "4004comarebill-000012": "执行中",
+ "4004comarebill-000013": "全部",
+ "4004comarebill-000014": "提示",
+ "4004comarebill-000015": "处理成功",
+ "4004comarebill-000016": "取消成功",
+ "4004comarebill-000017": "操作",
+ "4004comarebill-000018": "请选择数据",
+ "4004comarebill-000019": "发送成功",
+ "4004comarebill-000020": "删除成功",
+ "4004comarebill-000021": "开票确认单",
+ "4004comarebill-000022": "表体数据为空,不允许保存。",
+ "4004comarebill-000023": "保存成功",
+ "4004comarebill-000024": "指派",
+ "4004comarebill-000025": "没有数据",
+ "4004comarebill-000026": "联查凭证",
+ "4004comarebill-000027": "没有关联的单据!",
+ "4004comarebill-000028": "确认成功",
+ "4004comarebill-000029": "取消确认成功",
+ "4004comarebill-000030": "选择采购订单",
+ "4004comarebill-000031": "选择采购入库单",
+ "4004comarebill-000032": "生成开票确认单",
+ "4004comarebill-000033": "有未处理完的单据,是否退出转单?",
+ "4004comarebill-000034": "非确认状态单据不能生成发票",
+ "4004comarebill-000035": "所选行都不能生成发票",
+ "4004comarebill-000036": "对账结束日期不能小于对账开始日期",
+ "4004comarebill-000037": "本次确认数量",
+ "4004comarebill-000038": "本次确认金额",
+ "4004comarebill-000039": "该单据的最终确认人为供应商,是否继续?"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004costfactor.json b/src/pu/public/lang/standard/simpchn/4004costfactor.json
new file mode 100644
index 0000000..6720500
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004costfactor.json
@@ -0,0 +1,20 @@
+{
+ "4004COSTFACTOR-000000": "按数量",
+ "4004COSTFACTOR-000001": "是",
+ "4004COSTFACTOR-000002": "操作",
+ "4004COSTFACTOR-000003": "至少存在一行费用物料!",
+ "4004COSTFACTOR-000004": "增行",
+ "4004COSTFACTOR-000005": "删行",
+ "4004COSTFACTOR-000006": "确定要取消吗?",
+ "4004COSTFACTOR-000007": "确定要删除吗?",
+ "4004COSTFACTOR-000008": "修改",
+ "4004COSTFACTOR-000009": "删除",
+ "4004COSTFACTOR-000010": "数据库无数据了!",
+ "4004COSTFACTOR-000011": "删除成功!",
+ "4004COSTFACTOR-000012": "删除失败!",
+ "4004COSTFACTOR-000013": "保存成功!",
+ "4004COSTFACTOR-000014": "采购成本要素定义",
+ "4004COSTFACTOR-000015": "刷新成功!",
+ "4004COSTFACTOR-000016": "取消",
+ "4004COSTFACTOR-000017": "当前界面数据未保存,您确认离开此页面?"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004est.json b/src/pu/public/lang/standard/simpchn/4004est.json
new file mode 100644
index 0000000..5701038
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004est.json
@@ -0,0 +1,21 @@
+{
+ "4004EST-000000": "暂估成功",
+ "4004EST-000001": "没有可以分摊的费用项!",
+ "4004EST-000002": "未查询到数据!",
+ "4004EST-000003": "采购暂估",
+ "4004EST-000004": "费用分摊",
+ "4004EST-000005": "确定分摊",
+ "4004EST-000006": "取消",
+ "4004EST-000007": "暂估处理",
+ "4004EST-000008": "采购暂估处理完成",
+ "4004EST-000009": "查询结果共",
+ "4004EST-000010": "条",
+ "4004EST-000011": "暂估成功条数共",
+ "4004EST-000012": "暂估失败条数",
+ "4004EST-000013": "查看",
+ "4004EST-000014": "返回",
+ "4004EST-000015": "费用明细",
+ "4004EST-000016": "入库单行对应的费用项及费用暂估金额,可按行录入或者通过费用分摊批量录入",
+ "4004EST-000017": "的费用明细,以下字段不可以为空:",
+ "4004EST-000018": "操作"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004initialest.json b/src/pu/public/lang/standard/simpchn/4004initialest.json
new file mode 100644
index 0000000..c0ba070
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004initialest.json
@@ -0,0 +1,44 @@
+{
+ "4004INITIALEST-000000": "自由",
+ "4004INITIALEST-000001": "是否修改组织,这样会清空您录入的信息?",
+ "4004INITIALEST-000002": "审批成功",
+ "4004INITIALEST-000003": "提示",
+ "4004INITIALEST-000004": "有未处理完的单据,是否退出转单?",
+ "4004INITIALEST-000005": "确定要取消吗?",
+ "4004INITIALEST-000006": "取消成功",
+ "4004INITIALEST-000007": "删除",
+ "4004INITIALEST-000008": "确定要删除吗?",
+ "4004INITIALEST-000009": "删除成功!",
+ "4004INITIALEST-000010": "删除失败!",
+ "4004INITIALEST-000011": "请先选择要删除的行!",
+ "4004INITIALEST-000012": "表体行号不允许重复",
+ "4004INITIALEST-000013": "保存成功!",
+ "4004INITIALEST-000014": "取消审批成功!",
+ "4004INITIALEST-000015": "当前单据未保存,您确认离开此页面?",
+ "4004INITIALEST-000016": "期初暂估单维护",
+ "4004INITIALEST-000017": "期初暂估单维护",
+ "4004INITIALEST-000018": "操作",
+ "4004INITIALEST-000019": "请先选择需要提交的数据。",
+ "4004INITIALEST-000020": "审批失败",
+ "4004INITIALEST-000021": "请选择至少一行!",
+ "4004INITIALEST-000022": "请选择需要单据追溯的行!",
+ "4004INITIALEST-000023": "请选择需要删除的行!",
+ "4004INITIALEST-000024": "确定要删除所选数据吗?",
+ "4004INITIALEST-000025": "删除成功",
+ "4004INITIALEST-000026": "请选择要输出的订单!",
+ "4004INITIALEST-000027": "请选择要打印的订单!",
+ "4004INITIALEST-000028": "请先选择需要取消审批的数据。",
+ "4004INITIALEST-000029": "取消审批失败!",
+ "4004INITIALEST-000030": "期初暂估单",
+ "4004INITIALEST-000031": "处理中",
+ "4004INITIALEST-000032": "全部",
+ "4004INITIALEST-000033": "确定要删除吗?",
+ "4004INITIALEST-000034": "未查询出符合条件的数据!",
+ "4004INITIALEST-000035": "生成期初暂估单",
+ "4004INITIALEST-000036": "选择采购订单",
+ "4004INITIALEST-000037": "刷新成功!",
+ "4004INITIALEST-000038": "查询成功!",
+ "4004INITIALEST-000039": "确认修改",
+ "4004INITIALEST-000040": "取消",
+ "4004INITIALEST-000041": "导入结束"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004load.json b/src/pu/public/lang/standard/simpchn/4004load.json
new file mode 100644
index 0000000..d17790a
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004load.json
@@ -0,0 +1,8 @@
+{
+ "4004LOAD-000000": "装运",
+ "4004LOAD-000001": "当前单据未保存,您确认离开此页面?",
+ "4004LOAD-000002": "刷新成功!",
+ "4004LOAD-000003": "请选择数据",
+ "4004LOAD-000004": "装运成功!",
+ "4004LOAD-000005": "反装运成功!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004m2a01.json b/src/pu/public/lang/standard/simpchn/4004m2a01.json
new file mode 100644
index 0000000..d6983ea
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004m2a01.json
@@ -0,0 +1,30 @@
+{
+ "4004M2A01-000000": "保存成功",
+ "4004M2A01-000001": "确定要取消吗?",
+ "4004M2A01-000002": "取消",
+ "4004M2A01-000003": "费用单物料行参照",
+ "4004M2A01-000004": "确认",
+ "4004M2A01-000005": "请选择需要删除的数据!",
+ "4004M2A01-000006": "请选择物料行!",
+ "4004M2A01-000007": "删除",
+ "4004M2A01-000008": "确定要删除吗?",
+ "4004M2A01-000009": "删除成功",
+ "4004M2A01-000010": "选择采购入库单",
+ "4004M2A01-000011": "生成采购费用单",
+ "4004M2A01-000012": "当前单据未保存,您确认离开此页面?",
+ "4004M2A01-000013": "请选择需要提交的数据!",
+ "4004M2A01-000014": "提交成功",
+ "4004M2A01-000015": "提交",
+ "4004M2A01-000016": "请选择状态为自由或者审批不通过的数据!",
+ "4004M2A01-000017": "请选择要打印的采购费用单!",
+ "4004M2A01-000018": "收回成功",
+ "4004M2A01-000019": "收回",
+ "4004M2A01-000020": "请选择需要收回的数据!",
+ "4004M2A01-000021": "本次实收主数量",
+ "4004M2A01-000022": "本次应收主数量",
+ "4004M2A01-000023": "指派",
+ "4004M2A01-000024": "操作",
+ "4004M2A01-000025": "有来源的单据汇率类型不支持修改为固定汇率,请知晓!",
+ "4004M2A01-000026": "取消"
+
+}
\ No newline at end of file
diff --git a/src/pu/public/lang/standard/simpchn/4004match.json b/src/pu/public/lang/standard/simpchn/4004match.json
new file mode 100644
index 0000000..7adb6dc
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004match.json
@@ -0,0 +1,14 @@
+{
+ "4004MATCH-000000": "所选发票数据没有选全!",
+ "4004MATCH-000001": "确认匹配结果成功",
+ "4004MATCH-000002": "删除匹配结果成功",
+ "4004MATCH-000003": "未选择入库单",
+ "4004MATCH-000004": "匹配成功",
+ "4004MATCH-000005": "请选择数据",
+ "4004MATCH-000006": "匹配规则设置",
+ "4004MATCH-000007": "三单匹配",
+ "4004MATCH-000008": "未匹配",
+ "4004MATCH-000009": "已匹配",
+ "4004MATCH-000010": "当前匹配的发票主数量不能为空,请先维护发票主数量!",
+ "4004MATCH-000011": "不存在发票,无法匹配!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004milestoneboard.json b/src/pu/public/lang/standard/simpchn/4004milestoneboard.json
new file mode 100644
index 0000000..47de44b
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004milestoneboard.json
@@ -0,0 +1,50 @@
+{
+ "4004MILESTONEBOARD-000001": "里程碑采购进度看板",
+ "4004MILESTONEBOARD-000002": "进度%=累计执行数量/总数量",
+ "4004MILESTONEBOARD-000003": "显示设置",
+ "4004MILESTONEBOARD-000004": "待选",
+ "4004MILESTONEBOARD-000005": "已选",
+ "4004MILESTONEBOARD-000006": "详情",
+ "4004MILESTONEBOARD-000007": "订单编号",
+ "4004MILESTONEBOARD-000008": "供应商",
+ "4004MILESTONEBOARD-000009": "总数量",
+ "4004MILESTONEBOARD-000010": "总价税合计",
+ "4004MILESTONEBOARD-000011": "采购组织",
+ "4004MILESTONEBOARD-000012": "订单类型",
+ "4004MILESTONEBOARD-000013": "订单日期",
+ "4004MILESTONEBOARD-000014": "开票供应商",
+ "4004MILESTONEBOARD-000015": "币种",
+ "4004MILESTONEBOARD-000016": "付款协议",
+ "4004MILESTONEBOARD-000017": "采购员",
+ "4004MILESTONEBOARD-000018": "采购部门",
+ "4004MILESTONEBOARD-000019": "结算方式",
+ "4004MILESTONEBOARD-000020": "总重量",
+ "4004MILESTONEBOARD-000021": "总体积",
+ "4004MILESTONEBOARD-000022": "总件数",
+ "4004MILESTONEBOARD-000023": "项目",
+ "4004MILESTONEBOARD-000024": "暂无数据",
+ "4004MILESTONEBOARD-000025": "请注意",
+ "4004MILESTONEBOARD-000026": "无符合条件数据",
+ "4004MILESTONEBOARD-000027": "加载下一页",
+ "4004MILESTONEBOARD-000028": "未查询出符合条件的数据",
+ "4004MILESTONEBOARD-000029": "无效付款时点,无法进行跳转!",
+ "4004MILESTONEBOARD-000030": "全部",
+ "4004MILESTONEBOARD-000031": "未开始",
+ "4004MILESTONEBOARD-000032": "进行中",
+ "4004MILESTONEBOARD-000033": "已完成",
+ "4004MILESTONEBOARD-000034": "订单总金额",
+ "4004MILESTONEBOARD-000035": "累计付款金额",
+ "4004MILESTONEBOARD-000036": "执行情况",
+ "4004MILESTONEBOARD-000037": "单据数",
+ "4004MILESTONEBOARD-000038": "付款情况",
+ "4004MILESTONEBOARD-000039": "累计付款比例",
+ "4004MILESTONEBOARD-000040": "查看付款计划",
+ "4004MILESTONEBOARD-000041": "订单主数量",
+ "4004MILESTONEBOARD-000042": "累计执行主数量",
+ "4004MILESTONEBOARD-000043": "执行比例",
+ "4004MILESTONEBOARD-000044": "总金额",
+ "4004MILESTONEBOARD-000045": "累计付款金额",
+ "4004MILESTONEBOARD-000046": "付款比例",
+ "4004MILESTONEBOARD-000047": "看板主要用于里程碑采购业务执行进度查询,包括订单数量执行进度、订单付款金额执行进度、里程碑数量执行进度。",
+ "4004MILESTONEBOARD-000048": "里程碑数量执行进度=订单付款计划明细累计系统确认主数量/主数量合计。"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004orderclose.json b/src/pu/public/lang/standard/simpchn/4004orderclose.json
new file mode 100644
index 0000000..3ed6891
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004orderclose.json
@@ -0,0 +1,32 @@
+{
+ "4004ORDERCLOSE-000000": "请选择数据",
+ "4004ORDERCLOSE-000001": "最终关闭",
+ "4004ORDERCLOSE-000002": "整单打开",
+ "4004ORDERCLOSE-000003": "行关闭",
+ "4004ORDERCLOSE-000004": "行打开",
+ "4004ORDERCLOSE-000005": "到货关闭",
+ "4004ORDERCLOSE-000006": "入库关闭",
+ "4004ORDERCLOSE-000007": "开票关闭",
+ "4004ORDERCLOSE-000008": "付款关闭",
+ "4004ORDERCLOSE-000009": "到货打开",
+ "4004ORDERCLOSE-000010": "入库打开",
+ "4004ORDERCLOSE-000011": "开票打开",
+ "4004ORDERCLOSE-000012": "付款打开",
+ "4004ORDERCLOSE-000013": "收票关闭",
+ "4004ORDERCLOSE-000014": "成功",
+ "4004ORDERCLOSE-000015": "条!",
+ "4004ORDERCLOSE-000016": "失败!",
+ "4004ORDERCLOSE-000017": "请选择要打印的订单!",
+ "4004ORDERCLOSE-000018": "查询成功!",
+ "4004ORDERCLOSE-000019": "采购订单关闭",
+ "4004ORDERCLOSE-000020": "到货状态",
+ "4004ORDERCLOSE-000021": "入库状态",
+ "4004ORDERCLOSE-000022": "收票状态",
+ "4004ORDERCLOSE-000023": "请注意",
+ "4004ORDERCLOSE-000024": "无符合条件数据",
+ "4004ORDERCLOSE-000025": "付款状态",
+ "4004ORDERCLOSE-000026": "关闭/打开原因",
+ "4004ORDERCLOSE-000027": "请输入关闭/打开原因:",
+ "4004ORDERCLOSE-000028": "关闭/打开原因不能为空",
+ "4004ORDERCLOSE-000029": "提示 ! 最大录入长度为100"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004orderconfirm.json b/src/pu/public/lang/standard/simpchn/4004orderconfirm.json
new file mode 100644
index 0000000..3d5d4e4
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004orderconfirm.json
@@ -0,0 +1,7 @@
+{
+ "4004ORDERCONFIRM-000000": "请选择表体数据!",
+ "4004ORDERCONFIRM-000001": "请选择数据!",
+ "4004ORDERCONFIRM-000002": "对方确认",
+ "4004ORDERCONFIRM-000003": "确认成功",
+ "4004ORDERCONFIRM-000004": "反确认成功"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004ordercustom.json b/src/pu/public/lang/standard/simpchn/4004ordercustom.json
new file mode 100644
index 0000000..edafe80
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004ordercustom.json
@@ -0,0 +1,6 @@
+{
+ "4004ORDERCUSTOM-000000": "报关",
+ "4004ORDERCUSTOM-000001": "请选择数据",
+ "4004ORDERCUSTOM-000002": "报关成功!",
+ "4004ORDERCUSTOM-000003": "反报关成功!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004orderoutcustom.json b/src/pu/public/lang/standard/simpchn/4004orderoutcustom.json
new file mode 100644
index 0000000..295eda6
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004orderoutcustom.json
@@ -0,0 +1,6 @@
+{
+ "4004ORDEROUTCUSTOM-000000": "出关",
+ "4004ORDEROUTCUSTOM-000001": "请选择数据",
+ "4004ORDEROUTCUSTOM-000002": "出关成功!",
+ "4004ORDEROUTCUSTOM-000003": "反出关成功!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004orderoutput.json b/src/pu/public/lang/standard/simpchn/4004orderoutput.json
new file mode 100644
index 0000000..1eb9b27
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004orderoutput.json
@@ -0,0 +1,5 @@
+{
+ "4004ORDEROUTPUT-000000": "输出",
+ "4004ORDEROUTPUT-000001": "输出成功",
+ "4004ORDEROUTPUT-000002": "反输出成功"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004orderrevise.json b/src/pu/public/lang/standard/simpchn/4004orderrevise.json
new file mode 100644
index 0000000..9d465cf
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004orderrevise.json
@@ -0,0 +1,72 @@
+{
+ "4004ORDERREVISE-000000": "存量查询",
+ "4004ORDERREVISE-000001": "确认修改",
+ "4004ORDERREVISE-000002": "清空组织,这样会清空您录入的信息?",
+ "4004ORDERREVISE-000003": "是否修改组织,这样会清空您录入的信息?",
+ "4004ORDERREVISE-000004": "第",
+ "4004ORDERREVISE-000005": "第{0}行已有后续单据或做过行关闭,不能删除。\n",
+ "4004ORDERREVISE-000006": "请选择数据!",
+ "4004ORDERREVISE-000007": "确定要取消吗?",
+ "4004ORDERREVISE-000008": "删除成功!",
+ "4004ORDERREVISE-000009": "采购订单修订历史",
+ "4004ORDERREVISE-000010": "保存成功!",
+ "4004ORDERREVISE-000011": "当前单据未保存,您确认离开此页面?",
+ "4004ORDERREVISE-000012": "采购订单修订",
+ "4004ORDERREVISE-000013": "供应商银行账户",
+ "4004ORDERREVISE-000014": "操作",
+ "4004ORDERREVISE-000015": "请选择要添加附件的数据!",
+ "4004ORDERREVISE-000016": "请选择要追溯的数据!",
+ "4004ORDERREVISE-000017": "请选择单据!",
+ "4004ORDERREVISE-000018": "请选择需要删除的数据!",
+ "4004ORDERREVISE-000019": "删除成功",
+ "4004ORDERREVISE-000020": "条!",
+ "4004ORDERREVISE-000021": "删除失败",
+ "4004ORDERREVISE-000022": "请选择要打印的订单!",
+ "4004ORDERREVISE-000023": "查询成功!",
+ "4004ORDERREVISE-000024": "取消",
+ "4004ORDERREVISE-000025": "刷新成功!",
+ "4004ORDERREVISE-000026": "退货订单,数量不允许为正",
+ "4004ORDERREVISE-000027": "已生成业务对账,数量不允许改小",
+ "4004ORDERREVISE-000028": "该订单已最终关闭,如需修订,请打开",
+ "4004ORDERREVISE-000029": "提交成功",
+ "4004ORDERREVISE-000030": "收回成功",
+ "4004ORDERREVISE-000031": "收回失败",
+ "4004ORDERREVISE-000032": "删除",
+ "4004ORDERREVISE-000033": "是否确定要删除该修订?",
+ "4004ORDERREVISE-000034": "请选择需要提交的数据!",
+ "4004ORDERREVISE-000035": "提交成功!",
+ "4004ORDERREVISE-000036": "提交",
+ "4004ORDERREVISE-000037": "请选择需要收回的数据!",
+ "4004ORDERREVISE-000038": "收回成功!",
+ "4004ORDERREVISE-000039": "收回",
+ "4004ORDERREVISE-000040": "删除成功!",
+ "4004ORDERREVISE-000041": "删除失败!",
+ "4004ORDERREVISE-000042": "表体为空",
+ "4004ORDERREVISE-000043": "当前单据已被他人修改,请返回列表重新查询",
+ "4004ORDERREVISE-000044": "请选择需要询价的表体数据!",
+ "4004ORDERREVISE-000045": "价格组成",
+ "4004ORDERREVISE-000046": "价格详情",
+ "4004ORDERREVISE-000047": "单据号:",
+ "4004ORDERREVISE-000048": "行号:",
+ "4004ORDERREVISE-000049": "供应商:",
+ "4004ORDERREVISE-000050": "币种:",
+ "4004ORDERREVISE-000051": "含税单价:",
+ "4004ORDERREVISE-000052": "价格生效日期:",
+ "4004ORDERREVISE-000053": "价格失效日期:",
+ "4004ORDERREVISE-000054": "请通过单据追溯查看价格详情",
+ "4004ORDERREVISE-000055": "价格组成",
+ "4004ORDERREVISE-000056": "供应商价目表",
+ "4004ORDERREVISE-000057": "计划编制生成的采购订单,不允许增行",
+ "4004ORDERREVISE-000058": "计划编制生成的采购订单,不允许删行",
+ "4004ORDERREVISE-000059": "计划编制生成的采购订单,不允许复制行",
+ "4004ORDERREVISE-000060": "计划编制生成的采购订单,不允许插行",
+ "4004ORDERREVISE-000061": "计划编制生成的采购订单,不允许修改数量,主数量",
+ "4004ORDERREVISE-000062": "计划编制生成的采购订单,不允许编辑项目字段",
+ "4004ORDERREVISE-000063": "订单物料行参照",
+ "4004ORDERREVISE-000064": "确定",
+ "4004ORDERREVISE-000065": "模板中不存在【费用项】【费用明细】页签,请重新复制预制模板",
+ "4004ORDERREVISE-000066": "请选择物料行!",
+ "4004ORDERREVISE-000067": "指派",
+ "4004ORDERREVISE-000068": "累计付款金额或者累计付款申请金额不为空,不可修改关联合同信息!",
+ "4004ORDERREVISE-000069": "计划编制生成的采购订单,不允许修改单位,换算率!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004ordersendout.json b/src/pu/public/lang/standard/simpchn/4004ordersendout.json
new file mode 100644
index 0000000..36da3f9
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004ordersendout.json
@@ -0,0 +1,6 @@
+{
+ "4004ORDERSENDOUT-000000": "发货",
+ "4004ORDERSENDOUT-000001": "请选择数据",
+ "4004ORDERSENDOUT-000002": "发货成功!",
+ "4004ORDERSENDOUT-000003": "反发货成功!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004payplan.json b/src/pu/public/lang/standard/simpchn/4004payplan.json
new file mode 100644
index 0000000..4ba87e1
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004payplan.json
@@ -0,0 +1,26 @@
+{
+ "4004OPAYPLAN-000000": "金额不能为空!",
+ "4004OPAYPLAN-000001": "金额必须大于0!",
+ "4004OPAYPLAN-000002": "付款计划的金额不可小于累计付款金额!",
+ "4004OPAYPLAN-000003": "付款计划的金额不可小于累计付款申请金额!",
+ "4004OPAYPLAN-000004": "比率不能为空!",
+ "4004OPAYPLAN-000005": "比率必须大于等于0!",
+ "4004OPAYPLAN-000006": "已生成付款申请或付款单,只允许编辑原币金额,账期到期日字段",
+ "4004OPAYPLAN-000007": "请选择行",
+ "4004OPAYPLAN-000008": "确定要取消吗?",
+ "4004OPAYPLAN-000009": "已经生成后续单据,不能删除",
+ "4004OPAYPLAN-000010": "查询成功!",
+ "4004OPAYPLAN-000011": "请选择要打印的订单!",
+ "4004OPAYPLAN-000012": "保存失败",
+ "4004OPAYPLAN-000013": "保存成功!",
+ "4004OPAYPLAN-000014": "当前单据未保存,您确认离开此页面?",
+ "4004OPAYPLAN-000015": "采购订单付款计划",
+ "4004OPAYPLAN-000016": "操作",
+ "4004OPAYPLAN-000017": "请注意: 无符合条件数据",
+ "4004OPAYPLAN-000018": "无符合条件数据",
+ "4004OPAYPLAN-000019": "取消",
+ "4004OPAYPLAN-000020": "联查详情",
+ "4004OPAYPLAN-000021": "该付款时点对应单据已生成,请选择其他付款时点!",
+ "4004OPAYPLAN-000022": "单据",
+ "4004OPAYPLAN-000023": "已被冻结不能新增行!\n"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004planconfirm.json b/src/pu/public/lang/standard/simpchn/4004planconfirm.json
new file mode 100644
index 0000000..1d44401
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004planconfirm.json
@@ -0,0 +1,47 @@
+{
+ "4004planconfirm-000000": "操作",
+ "4004planconfirm-000001": "确定要删除吗?",
+ "4004planconfirm-000002": "生成进度确认单",
+ "4004planconfirm-000003": "选择订单付款计划",
+ "4004planconfirm-000004": "无表体行,无法保存!",
+ "4004planconfirm-000005": "保存成功!",
+ "4004planconfirm-000006": "提交成功!",
+ "4004planconfirm-000007": "请先查询数据!",
+ "4004planconfirm-000008": "刷新成功!",
+ "4004planconfirm-000009": "删除成功!",
+ "4004planconfirm-000010": "收回成功!",
+ "4004planconfirm-000011": "本次确认金额",
+ "4004planconfirm-000012": "选择采购订单付款计划",
+ "4004planconfirm-000013": "生成进度确认单",
+ "4004planconfirm-000014": "注意",
+ "4004planconfirm-000015": "本次确认主数量",
+ "4004planconfirm-000016": "请选择数据!",
+ "4004planconfirm-000017": "待提交",
+ "4004planconfirm-000018": "审批中",
+ "4004planconfirm-000019": "执行中",
+ "4004planconfirm-000020": "全部",
+ "4004planconfirm-000021": "请注意,请选择要删除的进度确认单!",
+ "4004planconfirm-000022": "删除",
+ "4004planconfirm-000023": "确定要删除所选数据吗?",
+ "4004planconfirm-000024": "请注意 请选择要提交的进度确认单!",
+ "4004planconfirm-000025": "提交",
+ "4004planconfirm-000026": "提示",
+ "4004planconfirm-000027": "删除失败",
+ "4004planconfirm-000028": "提交失败",
+ "4004planconfirm-000029": "请选择需要收回的数据!",
+ "4004planconfirm-000030": "收回",
+ "4004planconfirm-000031": "请选择要打印的进度确认单",
+ "4004planconfirm-000032": "请选择要输出的进度确认单",
+ "4004planconfirm-000033": "成功条数",
+ "4004planconfirm-000034": "失败条数:",
+ "4004planconfirm-000035": "第",
+ "4004planconfirm-000036": ",条数据操作失败。失败原因:",
+ "4004planconfirm-000037": "共处理{totalNum}条,失败{failNum}条!",
+ "4004planconfirm-000038": "共处理{totalNum}条,成功{sucNum}条,失败{failNum}条!",
+ "4004planconfirm-000039": "处理成功{sucNum}条!",
+ "4004planconfirm-000040": "出错啦",
+ "4004planconfirm-000041": "表体为空",
+ "4004planconfirm-000042": "进度确认单不允许确认主数量小于等于0!",
+ "4004planconfirm-000043": "当前单据未保存,您确认离开此页面?",
+ "4004planconfirm-000044": "指派"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004planposition.json b/src/pu/public/lang/standard/simpchn/4004planposition.json
new file mode 100644
index 0000000..0b7330a
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004planposition.json
@@ -0,0 +1,27 @@
+{
+ "4004PLANPOSITION-000000": "应用",
+ "4004PLANPOSITION-000001": "时间戳",
+ "4004PLANPOSITION-000002": "主表主键",
+ "4004PLANPOSITION-000003": "子表主键",
+ "4004PLANPOSITION-000004": "采购组织",
+ "4004PLANPOSITION-000005": "删除成功!",
+ "4004PLANPOSITION-000006": "确认要删除吗?",
+ "4004PLANPOSITION-000007": "请选择数据!",
+ "4004PLANPOSITION-000008": "注意",
+ "4004PLANPOSITION-000009": "确定要删除所选数据吗",
+ "4004PLANPOSITION-000010": "保存成功!",
+ "4004PLANPOSITION-000011": "表格不能为空!",
+ "4004PLANPOSITION-000012": "保存失败!",
+ "4004PLANPOSITION-000013": "物料分类和物料不能同时为空!",
+ "4004PLANPOSITION-000014": "当前单据未保存,您确认离开此页面?",
+ "4004PLANPOSITION-000015": "库存组织",
+ "4004PLANPOSITION-000016": "确认删除",
+ "4004PLANPOSITION-000017": "是否确认删除?",
+ "4004PLANPOSITION-000018": "取消",
+ "4004PLANPOSITION-000019": "确认取消",
+ "4004PLANPOSITION-000020": "是否确认要取消?",
+ "4004PLANPOSITION-000021": "计划岗物料设置",
+ "4004PLANPOSITION-000022": "物料采购分类",
+ "4004PLANPOSITION-000023": "操作",
+ "4004PLANPOSITION-000024": "刷新成功!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004poorder.json b/src/pu/public/lang/standard/simpchn/4004poorder.json
new file mode 100644
index 0000000..3fd05e4
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004poorder.json
@@ -0,0 +1,170 @@
+{
+ "4004POORDER-000000": "到货计划已经执行运输,不能将到货计划数量修改的比已经运输数量小!",
+ "4004POORDER-000001": "订单行号参照(可多选)",
+ "4004POORDER-000002": "地址簿",
+ "4004POORDER-000003": "客户收货地址",
+ "4004POORDER-000004": "保存成功。",
+ "4004POORDER-000005": "保存成功",
+ "4004POORDER-000006": "查询成功!",
+ "4004POORDER-000007": "到货计划",
+ "4004POORDER-000008": "操作",
+ "4004POORDER-000009": "存量查询",
+ "4004POORDER-000010": "确认修改",
+ "4004POORDER-000011": "是否修改组织,这样会清空您录入的信息?",
+ "4004POORDER-000012": "提示",
+ "4004POORDER-000013": "退货订单,数量不允许为正",
+ "4004POORDER-000014": "是否关联合同?",
+ "4004POORDER-000015": "是",
+ "4004POORDER-000016": "否",
+ "4004POORDER-000017": "采购订单关联合同",
+ "4004POORDER-000018": "确定",
+ "4004POORDER-000019": "取消",
+ "4004POORDER-000020": "自由",
+ "4004POORDER-000021": "请先填写固定结账日!",
+ "4004POORDER-000022": "有未处理完的单据,是否返回?",
+ "4004POORDER-000023": "冻结",
+ "4004POORDER-000024": "解冻",
+ "4004POORDER-000025": "整单打开",
+ "4004POORDER-000026": "整单关闭",
+ "4004POORDER-000027": "行打开",
+ "4004POORDER-000028": "行关闭",
+ "4004POORDER-000029": "请选择数据!",
+ "4004POORDER-000030": "生成销售协同订单",
+ "4004POORDER-000031": "确定要取消吗?",
+ "4004POORDER-000032": "取消成功",
+ "4004POORDER-000033": "合并显示",
+ "4004POORDER-000034": "采购订单合并打印:",
+ "4004POORDER-000035": "请选择状态为自由或者审批不通过的数据!",
+ "4004POORDER-000036": "保存提交成功!",
+ "4004POORDER-000037": "提交成功!",
+ "4004POORDER-000038": "保存成功提交失败!",
+ "4004POORDER-000039": "注意",
+ "4004POORDER-000040": "请选择需要询价的表体数据!",
+ "4004POORDER-000041": "删除",
+ "4004POORDER-000042": "确定要删除吗?",
+ "4004POORDER-000043": "删除成功!",
+ "4004POORDER-000044": "冻结原因",
+ "4004POORDER-000045": "成功!",
+ "4004POORDER-000046": "请输入冻结原因",
+ "4004POORDER-000047": "请选择审批通过的数据!",
+ "4004POORDER-000048": "有未处理完的单据,是否退出转单?",
+ "4004POORDER-000049": "追加信息表头字段业务类型,供应商,采购组织和当前订单表头有不相同的值,不能追加到当前表体!",
+ "4004POORDER-000050": "合同模块未启用!",
+ "4004POORDER-000051": "请选择行!",
+ "4004POORDER-000052": "收回成功!",
+ "4004POORDER-000053": "收回失败!",
+ "4004POORDER-000054": "当前单据未保存,您确认离开此页面?",
+ "4004POORDER-000055": "采购订单",
+ "4004POORDER-000056": "确定要删除吗?",
+ "4004POORDER-000057": "指派",
+ "4004POORDER-000058": "参照增行",
+ "4004POORDER-000059": "运输状态",
+ "4004POORDER-000060": "关闭",
+ "4004POORDER-000061": "供应商银行账户",
+ "4004POORDER-000062": "订单关联合同",
+ "4004POORDER-000063": "合同编号",
+ "4004POORDER-000064": "合同名称",
+ "4004POORDER-000065": "请选择一行数据!",
+ "4004POORDER-000066": "请选择单据!",
+ "4004POORDER-000067": "请选择需要提交的数据!",
+ "4004POORDER-000068": "请选择需要删除的数据!",
+ "4004POORDER-000069": "删除失败!",
+ "4004POORDER-000070": "请至少选择一行数据!",
+ "4004POORDER-000071": "请选择要打印的订单!",
+ "4004POORDER-000072": "请选择需要收回的数据!",
+ "4004POORDER-000073": "待提交",
+ "4004POORDER-000074": "审批中",
+ "4004POORDER-000075": "执行中",
+ "4004POORDER-000076": "全部",
+ "4004POORDER-000077": "确定要删除吗?",
+ "4004POORDER-000078": "订单行号",
+ "4004POORDER-000079": "物料编码",
+ "4004POORDER-000080": "物料名称",
+ "4004POORDER-000081": "规格",
+ "4004POORDER-000082": "型号",
+ "4004POORDER-000083": "配额分配",
+ "4004POORDER-000084": "确认供应商",
+ "4004POORDER-000085": "查询结果为空!",
+ "4004POORDER-000086": "生成采购订单",
+ "4004POORDER-000087": "本次订货主数量",
+ "4004POORDER-000088": "选择请购单",
+ "4004POORDER-000089": "退货单",
+ "4004POORDER-000090": "退库单",
+ "4004POORDER-000091": "选择退货单",
+ "4004POORDER-000092": "选择协同销售订单",
+ "4004POORDER-000093": "选择直运销售订单",
+ "4004POORDER-000094": "选择采购合同",
+ "4004POORDER-000095": "请购下单",
+ "4004POORDER-000096": "刷新成功!",
+ "4004POORDER-000097": "提交",
+ "4004POORDER-000098": "未查询出符合条件的数据",
+ "4004POORDER-000099": "共",
+ "4004POORDER-000100": "条",
+ "4004POORDER-000101": "查询成功",
+ "4004POORDER-000102": "收回",
+ "4004POORDER-000103": "销售模块未启用!",
+ "4004POORDER-000104": "有未处理完的单据,确定关闭?",
+ "4004POORDER-000105": "付款比例不允许为0,请重新输入",
+ "4004POORDER-000106": "付款比例之和不允许超过100!",
+ "4004POORDER-000107": "当月生效",
+ "4004POORDER-000108": "选择借入单",
+ "4004POORDER-000109": "平均销售量查询",
+ "4004POORDER-000110": "最近",
+ "4004POORDER-000111": "天销量",
+ "4004POORDER-000112": "查询",
+ "4004POORDER-000113": "毛利预估",
+ "4004POORDER-000114": "应付款",
+ "4004POORDER-000115": "采购",
+ "4004POORDER-000116": "委外",
+ "4004POORDER-000117": "已生成业务对账,数量不允许改小",
+ "4004POORDER-000118": "请录入正整数",
+ "4004POORDER-000119": "辅助信息",
+ "4004POORDER-000120": "价格",
+ "4004POORDER-000121": "合同价:",
+ "4004POORDER-000122": "供应商价目表:",
+ "4004POORDER-000123": "订单最新价:",
+ "4004POORDER-000124": "订单最低价:",
+ "4004POORDER-000125": "存量",
+ "4004POORDER-000126": "现存量",
+ "4004POORDER-000127": "可用量",
+ "4004POORDER-000128": "表体为空",
+ "4004POORDER-000129": "采购订单冻结",
+ "4004POORDER-000130": "请输入冻结原因,上限33个字",
+ "4004POORDER-000131": "扫码拉单",
+ "4004POORDER-000132": "扫码结果",
+ "4004POORDER-000133": "到货计划{0}存在后续单据,不能复制!",
+ "4004POORDER-000134": "到货计划{0}相关订单行已关闭,不能复制!",
+ "4004POORDER-000135": "请选择采购组织!",
+ "4004POORDER-000136": "请选择供应商!",
+ "4004POORDER-000137": "请选择数据行!",
+ "4004POORDER-000138": "订单未保存,无法联查采购计划!",
+ "4004POORDER-000139": "关联合同",
+ "4004POORDER-000140": "确定要关联合同吗?",
+ "4004POORDER-000141": "关闭/打开原因",
+ "4004POORDER-000142": "请输入关闭/打开原因:",
+ "4004POORDER-000143": "关闭/打开原因不能为空",
+ "4004POORDER-000144": "提示 ! 最大录入长度为100",
+ "4004POORDER-000145": "价格详情",
+ "4004POORDER-000146": "单据号:",
+ "4004POORDER-000147": "行号:",
+ "4004POORDER-000148": "供应商:",
+ "4004POORDER-000149": "币种:",
+ "4004POORDER-000150": "含税单价:",
+ "4004POORDER-000151": "价格生效日期:",
+ "4004POORDER-000152": "价格失效日期:",
+ "4004POORDER-000153": "价格来源于上游单据,请通过单据追溯查看价格详情",
+ "4004POORDER-000154": "价格组成",
+ "4004POORDER-000155": "供应商价目表",
+ "4004POORDER-000156": "计划编制生成的采购订单,不允许增行",
+ "4004POORDER-000157": "计划编制生成的采购订单,不允许删行",
+ "4004POORDER-000158": "计划编制生成的采购订单,不允许复制行",
+ "4004POORDER-000159": "计划编制生成的采购订单,不允许插行",
+ "4004POORDER-000160": "计划编制生成的采购订单,不允许修改数量,主数量",
+ "4004POORDER-000161": "计划编制生成的采购订单,不允许编辑项目字段",
+ "4004POORDER-000162": "请选择物料行",
+ "4004POORDER-000163": "订单物料行参照",
+ "4004POORDER-000164": "确定",
+ "4004POORDER-000165": "修改结算财务组织,可能会清空您费用项页签和费用明细页签录入的对应费用项信息,请确认是否修改?",
+ "4004POORDER-000166": "模板中不存在【费用项】【费用明细】页签,请重新复制预制模板",
+ "4004POORDER-000167": "计划编制生成的采购订单,不允许修改单位,换算率"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004position.json b/src/pu/public/lang/standard/simpchn/4004position.json
new file mode 100644
index 0000000..8a29619
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004position.json
@@ -0,0 +1,28 @@
+{
+ "4004POSITION-000000": "应用",
+ "4004POSITION-000001": "时间戳",
+ "4004POSITION-000002": "主表主键",
+ "4004POSITION-000003": "子表主键",
+ "4004POSITION-000004": "采购组织",
+ "4004POSITION-000005": "删除成功!",
+ "4004POSITION-000006": "确定要删除吗?",
+ "4004POSITION-000007": "请选择数据!",
+ "4004POSITION-000008": "注意",
+ "4004POSITION-000009": "确定要删除所选数据吗",
+ "4004POSITION-000010": "保存成功!",
+ "4004POSITION-000011": "表格不能为空!",
+ "4004POSITION-000012": "保存失败!",
+ "4004POSITION-000013": "物料分类和物料不能同时为空!",
+ "4004POSITION-000014": "当前单据未保存,您确认离开此页面?",
+ "4004POSITION-000015": "库存组织",
+ "4004POSITION-000016": "确认删除",
+ "4004POSITION-000017": "是否确认删除?",
+ "4004POSITION-000018": "取消",
+ "4004POSITION-000019": "确认取消",
+ "4004POSITION-000020": "是否确认要取消?",
+ "4004POSITION-000021": "计划岗物料设置",
+ "4004POSITION-000022": "物料采购分类",
+ "4004POSITION-000023": "操作",
+ "4004POSITION-000024": "刷新成功!",
+ "4004POSITION-000025": "采购岗物料设置"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004praybill.json b/src/pu/public/lang/standard/simpchn/4004praybill.json
new file mode 100644
index 0000000..18a2834
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004praybill.json
@@ -0,0 +1,76 @@
+{
+ "4004PRAYBILL-000000": "输入值必须为(0,∞]或者(0,∞]/(0,∞]",
+ "4004PRAYBILL-000001": "清空组织会清空您录入的信息!",
+ "4004PRAYBILL-000002": "是否修改组织,这样会清空您录入的信息?",
+ "4004PRAYBILL-000003": "提示",
+ "4004PRAYBILL-000004": "有未处理完的单据,是否退出转单",
+ "4004PRAYBILL-000005": "有未处理完的单据,是否退出转单?",
+ "4004PRAYBILL-000006": "确定要取消吗?",
+ "4004PRAYBILL-000007": "取消成功",
+ "4004PRAYBILL-000008": "操作成功!",
+ "4004PRAYBILL-000009": "行关闭失败!",
+ "4004PRAYBILL-000010": "请选择需要操作的数据!",
+ "4004PRAYBILL-000011": "行关闭成功!",
+ "4004PRAYBILL-000012": "合并显示",
+ "4004PRAYBILL-000013": "请购单合并显示: ",
+ "4004PRAYBILL-000014": "确定要删除所选数据吗?",
+ "4004PRAYBILL-000015": "删除成功!",
+ "4004PRAYBILL-000016": "第",
+ "4004PRAYBILL-000017": "行来源于资产配置申请, 不能删除\n",
+ "4004PRAYBILL-000018": "行已经关闭\n",
+ "4004PRAYBILL-000019": "行已经有后续单据\n",
+ "4004PRAYBILL-000020": "行打开失败!",
+ "4004PRAYBILL-000021": "表体为空",
+ "4004PRAYBILL-000022": "是否继续保存?",
+ "4004PRAYBILL-000023": "当前单据未保存,您确定离开此页面?",
+ "4004PRAYBILL-000024": "请购单",
+ "4004PRAYBILL-000025": "指派",
+ "4004PRAYBILL-000026": "删除",
+ "4004PRAYBILL-000027": "是否确定删除?",
+ "4004PRAYBILL-000028": "操作",
+ "4004PRAYBILL-000029": "提交成功!",
+ "4004PRAYBILL-000030": "请选择需要提交的数据!",
+ "4004PRAYBILL-000031": "设置页签数量的默认值",
+ "4004PRAYBILL-000032": "请选择需要删除的数据!",
+ "4004PRAYBILL-000033": "请选择要输出的订单!",
+ "4004PRAYBILL-000034": "请选择要打印的订单!",
+ "4004PRAYBILL-000035": "请选择需要收回的数据!",
+ "4004PRAYBILL-000036": "注意",
+ "4004PRAYBILL-000037": "确定要删除吗?",
+ "4004PRAYBILL-000038": "待提交",
+ "4004PRAYBILL-000039": "审批中",
+ "4004PRAYBILL-000040": "执行中",
+ "4004PRAYBILL-000041": "全部",
+ "4004PRAYBILL-000042": "首页",
+ "4004PRAYBILL-000043": "请购单管理",
+ "4004PRAYBILL-000044": "物资需求申请",
+ "4004PRAYBILL-000045": "查询结果为空",
+ "4004PRAYBILL-000046": "生成请购单",
+ "4004PRAYBILL-000047": "选择物资需求申请单",
+ "4004PRAYBILL-000048": "提交失败!",
+ "4004PRAYBILL-000049": "保存成功!",
+ "4004PRAYBILL-000050": "收回成功!",
+ "4004PRAYBILL-000051": "刷新成功!",
+ "4004PRAYBILL-000052": "查询成功!",
+ "4004PRAYBILL-000053": "整单打开成功!",
+ "4004PRAYBILL-000054": "整单关闭成功!",
+ "4004PRAYBILL-000055": "行打开成功!",
+ "4004PRAYBILL-000056": "提交",
+ "4004PRAYBILL-000057": "删除",
+ "4004PRAYBILL-000058": "收回",
+ "4004PRAYBILL-000059": "保存提交成功!",
+ "4004PRAYBILL-000060": "确定修改",
+ "4004PRAYBILL-000061": "取消",
+ "4004PRAYBILL-000062": "刷新失败!",
+ "4004PRAYBILL-000063": "删除失败!",
+ "4004PRAYBILL-000064": "直运和委外互斥,不能同时选择。",
+ "4004PRAYBILL-000065": "价格论证表",
+ "4004PRAYBILL-000066": "报价日期",
+ "4004PRAYBILL-000067": "打印",
+ "4004PRAYBILL-000068": "已保存单据不支持暂存!",
+ "4004PRAYBILL-000069": "单据存在来源,不能支持暂存!",
+ "4004PRAYBILL-000070": "关闭/打开原因",
+ "4004PRAYBILL-000071": "请输入关闭/打开原因:",
+ "4004PRAYBILL-000072": "关闭/打开原因不能为空",
+ "4004PRAYBILL-000073": "提示 ! 最大录入长度为100"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004praybillarrange.json b/src/pu/public/lang/standard/simpchn/4004praybillarrange.json
new file mode 100644
index 0000000..0c6d992
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004praybillarrange.json
@@ -0,0 +1,31 @@
+{
+ "4004PRAYBILLARRANGE-000000": "请选择需要处理的数据!",
+ "4004PRAYBILLARRANGE-000001": "请输入查询条件!",
+ "4004PRAYBILLARRANGE-000002": "注意",
+ "4004PRAYBILLARRANGE-000003": "确定要取消吗?",
+ "4004PRAYBILLARRANGE-000004": "请购单安排",
+ "4004PRAYBILLARRANGE-000005": "首页",
+ "4004PRAYBILLARRANGE-000006": "请购单管理",
+ "4004PRAYBILLARRANGE-000007": "物资需求申请",
+ "4004PRAYBILLARRANGE-000008": "查询结果大于500条,只展示500条数据",
+ "4004PRAYBILLARRANGE-000009": "安排成功!",
+ "4004PRAYBILLARRANGE-000010": "取消",
+ "4004PRAYBILLARRANGE-000011": "取消安排",
+ "4004PRAYBILLARRANGE-000012": "确定要取消安排吗?",
+ "4004PRAYBILLARRANGE-000013": "批量安排",
+ "4004PRAYBILLARRANGE-000014": "请选择采购组织",
+ "4004PRAYBILLARRANGE-000015": "采购员或建议供应商未填写,请确定是否清空该项信息并进行安排?",
+ "4004PRAYBILLARRANGE-000016": "采购组织",
+ "4004PRAYBILLARRANGE-000017": "采购员",
+ "4004PRAYBILLARRANGE-000018": "建议供应商",
+ "4004PRAYBILLARRANGE-000019": "取消安排成功!",
+ "4004PRAYBILLARRANGE-000020": "确定",
+ "4004PRAYBILLARRANGE-000021": "取消",
+ "4004PRAYBILLARRANGE-000022": "编码",
+ "4004PRAYBILLARRANGE-000023": "名称",
+ "4004PRAYBILLARRANGE-000024": "根节点",
+ "4004PRAYBILLARRANGE-000025": "更新采购组织,供应商,采购员后,则对应的请购物料行安排成功",
+ "4004PRAYBILLARRANGE-000026": "是",
+ "4004PRAYBILLARRANGE-000027": "否",
+ "4004PRAYBILLARRANGE-000028": "请选择要确认安排的行!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004praybillr.json b/src/pu/public/lang/standard/simpchn/4004praybillr.json
new file mode 100644
index 0000000..a82fda0
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004praybillr.json
@@ -0,0 +1,44 @@
+{
+ "4004PRAYBILLR-000000": "确定要取消吗?",
+ "4004PRAYBILLR-000001": "操作成功!",
+ "4004PRAYBILLR-000002": "行关闭成功!",
+ "4004PRAYBILLR-000003": "行关闭失败!",
+ "4004PRAYBILLR-000004": "请选择需要操作的数据!",
+ "4004PRAYBILLR-000005": "删除成功",
+ "4004PRAYBILLR-000006": "第",
+ "4004PRAYBILLR-000007": "行来源于资产配置申请, 不能删除\n",
+ "4004PRAYBILLR-000008": "行已经关闭\n",
+ "4004PRAYBILLR-000009": "行已经有后续单据\n",
+ "4004PRAYBILLR-000010": "行打开成功!",
+ "4004PRAYBILLR-000011": "行打开失败!",
+ "4004PRAYBILLR-000012": "请购单修订历史",
+ "4004PRAYBILLR-000013": "表体为空",
+ "4004PRAYBILLR-000014": "是否继续保存?",
+ "4004PRAYBILLR-000015": "当前单据未保存,您确定离开此页面?",
+ "4004PRAYBILLR-000016": "请购单修订",
+ "4004PRAYBILLR-000017": "操作",
+ "4004PRAYBILLR-000018": "请选择状态为审批的数据!",
+ "4004PRAYBILLR-000019": "请选择需要删除的数据!",
+ "4004PRAYBILLR-000020": "请选择状态为关闭的数据!",
+ "4004PRAYBILLR-000021": "请选择要输出的订单!",
+ "4004PRAYBILLR-000022": "请选择要打印的订单!",
+ "4004PRAYBILLR-000023": "注意",
+ "4004PRAYBILLR-000024": "确定要删除吗?",
+ "4004PRAYBILLR-000025": "首页",
+ "4004PRAYBILLR-000026": "请购单管理",
+ "4004PRAYBILLR-000027": "物资需求申请",
+ "4004PRAYBILLR-000028": "修订成功!",
+ "4004PRAYBILLR-000029": "刷新成功!",
+ "4004PRAYBILLR-000030": "取消",
+ "4004PRAYBILLR-000031": "提交成功!",
+ "4004PRAYBILLR-000032": "删除",
+ "4004PRAYBILLR-000033": "是否确定要删除该修订?",
+ "4004PRAYBILLR-000034": "收回成功!",
+ "4004PRAYBILLR-000035": "修订删除成功!",
+ "4004PRAYBILLR-000036": "提交",
+ "4004PRAYBILLR-000037": "收回",
+ "4004PRAYBILLR-000038": "修订删除",
+ "4004PRAYBILLR-000039": "该订单已整单关闭,如需修订,请打开",
+ "4004PRAYBILLR-000040": "当前单据已被他人修改,请返回列表重新查询",
+ "4004PRAYBILLR-000041": "提交指派"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004pricestl.json b/src/pu/public/lang/standard/simpchn/4004pricestl.json
new file mode 100644
index 0000000..48e81a7
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004pricestl.json
@@ -0,0 +1,42 @@
+{
+ "4004PRICESTL-000000": "请正确修改本币无税单价!",
+ "4004PRICESTL-000001": "取消",
+ "4004PRICESTL-000002": "确定要取消吗?",
+ "4004PRICESTL-000003": "自由",
+ "4004PRICESTL-000004": "请选择状态为自由或者审批不通过的数据!",
+ "4004PRICESTL-000005": "提交成功!",
+ "4004PRICESTL-000006": "提交失败!",
+ "4004PRICESTL-000007": "删除",
+ "4004PRICESTL-000008": "确定要删除吗?",
+ "4004PRICESTL-000009": "删除成功",
+ "4004PRICESTL-000010": "刷新成功",
+ "4004PRICESTL-000011": "供应商不能为空",
+ "4004PRICESTL-000012": "保存成功",
+ "4004PRICESTL-000013": "收回成功!",
+ "4004PRICESTL-000014": "收回失败!",
+ "4004PRICESTL-000015": "价格结算单",
+ "4004PRICESTL-000016": "指派",
+ "4004PRICESTL-000017": "操作",
+ "4004PRICESTL-000018": "生成价格结算单",
+ "4004PRICESTL-000019": "请选择单据",
+ "4004PRICESTL-000020": "请选择要提交的数据",
+ "4004PRICESTL-000021": "提交成功",
+ "4004PRICESTL-000022": "查询成功",
+ "4004PRICESTL-000023": "请选择要删除的数据",
+ "4004PRICESTL-000024": "删除失败",
+ "4004PRICESTL-000025": "请选择要输出的订单!",
+ "4004PRICESTL-000026": "请选择要打印的订单",
+ "4004PRICESTL-000027": "请选择需要收回的数据",
+ "4004PRICESTL-000028": "待提交",
+ "4004PRICESTL-000029": "审批中",
+ "4004PRICESTL-000030": "全部",
+ "4004PRICESTL-000031": "是否删除?",
+ "4004PRICESTL-000032": "请选择转单数据",
+ "4004PRICESTL-000033": "生成价格结算单成功",
+ "4004PRICESTL-000034": "生成失败",
+ "4004PRICESTL-000035": "选择采购入库单",
+ "4004PRICESTL-000036": "确定要删除所选数据吗?",
+ "4004PRICESTL-000037": "基准含税单价:",
+ "4004PRICESTL-000038": "总公式:",
+ "4004PRICESTL-000039": "总计算结果:"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004pub.json b/src/pu/public/lang/standard/simpchn/4004pub.json
new file mode 100644
index 0000000..8e9d68d
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004pub.json
@@ -0,0 +1,17 @@
+{
+ "4004pub-000000": "第",
+ "4004pub-000001": "行:请购日期大于建议订货日期或需求日期。\n",
+ "4004pub-000002": "行:建议订货日期大于需求日期。\n",
+ "4004pub-000003": "行号不能重复!",
+ "4004pub-000004": "已超出",
+ "4004pub-000005": "已满足",
+ "4004pub-000006": "请选择数据",
+ "4004pub-000007": "当前已经是明细数据,不需要联查明细。",
+ "4004pub-000008": "发布至云采成功!",
+ "4004pub-000009": "取消发布至云采成功!",
+ "4004pub-000010": "请选择表体数据!",
+ "4004pub-000011": "关联合同",
+ "4004pub-000012": "确定要关联合同吗?",
+ "4004pub-000013": "确定",
+ "4004pub-000014": "取消"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004pufeeconfirm.json b/src/pu/public/lang/standard/simpchn/4004pufeeconfirm.json
new file mode 100644
index 0000000..268e4c0
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004pufeeconfirm.json
@@ -0,0 +1,51 @@
+{
+ "4004PUFEECONFIRM-000000": "确认删除?",
+ "4004PUFEECONFIRM-000001": "操作",
+ "4004PUFEECONFIRM-000002": "请先查询数据!",
+ "4004PUFEECONFIRM-000003": "刷新成功!",
+ "4004PUFEECONFIRM-000004": "删除成功!",
+ "4004PUFEECONFIRM-000005": "请选择需要删除的数据!",
+ "4004PUFEECONFIRM-000006": "删除",
+ "4004PUFEECONFIRM-000007": "确定要删除所选数据吗?",
+ "4004PUFEECONFIRM-000008": "删除失败!",
+ "4004PUFEECONFIRM-000009": "请选择需要提交的数据!",
+ "4004PUFEECONFIRM-000010": "提交成功!",
+ "4004PUFEECONFIRM-000011": "提交",
+ "4004PUFEECONFIRM-000012": "请选择需要收回的数据!",
+ "4004PUFEECONFIRM-000013": "收回成功!",
+ "4004PUFEECONFIRM-000014": "收回",
+ "4004PUFEECONFIRM-000015": "请选择要打印的采购费用确认单!",
+ "4004PUFEECONFIRM-000016": "请选择要输出的采购费用确认单!",
+ "4004PUFEECONFIRM-000017": "处理成功",
+ "4004PUFEECONFIRM-000018": "成功条数",
+ "4004PUFEECONFIRM-000019": "失败条数",
+ "4004PUFEECONFIRM-000020": "第",
+ "4004PUFEECONFIRM-000021": ",条数据操作失败。失败原因:",
+ "4004PUFEECONFIRM-000022": "共处理{totalNum}条,失败{failNum}条!",
+ "4004PUFEECONFIRM-000023": "共处理{totalNum}条,成功{sucNum}条,失败{failNum}条!",
+ "4004PUFEECONFIRM-000024": "处理成功{sucNum}条!",
+ "4004PUFEECONFIRM-000025": "出错啦",
+ "4004PUFEECONFIRM-000026": "选择待费用确认",
+ "4004PUFEECONFIRM-000027": "生成费用确认单",
+ "4004PUFEECONFIRM-000028": "表体数据为空,不允许保存。",
+ "4004PUFEECONFIRM-000029": "保存成功",
+ "4004PUFEECONFIRM-000030": "待开票金额",
+ "4004PUFEECONFIRM-000031": "本次开票价税合计",
+ "4004PUFEECONFIRM-000032": "本次开票无税金额",
+ "4004PUFEECONFIRM-000033": "累计本币暂估金额",
+ "4004PUFEECONFIRM-000034": "累计本币结算金额",
+ "4004PUFEECONFIRM-000035": "累计费用确认金额",
+ "4004PUFEECONFIRM-000036": "税额",
+ "4004PUFEECONFIRM-000037": "数量",
+ "4004PUFEECONFIRM-000038": "主数量",
+ "4004PUFEECONFIRM-000039": "报价数量",
+ "4004PUFEECONFIRM-000040": "计成本金额",
+ "4004PUFEECONFIRM-000041": "注意",
+ "4004PUFEECONFIRM-000042": "请选择数据!",
+ "4004PUFEECONFIRM-000043": "生成发票成功",
+ "4004PUFEECONFIRM-000044": "处理成功",
+ "4004PUFEECONFIRM-000045": "取消生成发票成功",
+ "4004PUFEECONFIRM-000046": "本次开票价税合计应大于0,请检查!",
+ "4004PUFEECONFIRM-000047": "有来源的单据汇率类型不支持修改为固定汇率,请知晓!",
+ "4004PUFEECONFIRM-000048": "指派"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004puinvoice.json b/src/pu/public/lang/standard/simpchn/4004puinvoice.json
new file mode 100644
index 0000000..277eeab
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004puinvoice.json
@@ -0,0 +1,104 @@
+{
+ "4004PUINVOICE-000000": "清空组织,这样会清空您录入的信息?",
+ "4004PUINVOICE-000001": "是否修改组织,这样会清空您录入的信息?",
+ "4004PUINVOICE-000002": "提示",
+ "4004PUINVOICE-000003": "有未处理完的单据,是否返回?",
+ "4004PUINVOICE-000004": "已成功",
+ "4004PUINVOICE-000005": "冻结成功!",
+ "4004PUINVOICE-000006": "确定要取消吗?",
+ "4004PUINVOICE-000007": "取消成功",
+ "4004PUINVOICE-000008": "取消传应付成功!",
+ "4004PUINVOICE-000009": "合并显示",
+ "4004PUINVOICE-000010": "采购发票合并打印:",
+ "4004PUINVOICE-000011": "提交成功!",
+ "4004PUINVOICE-000012": "确定要删除吗?",
+ "4004PUINVOICE-000013": "删除成功",
+ "4004PUINVOICE-000014": "错误",
+ "4004PUINVOICE-000015": "未选中表体行!",
+ "4004PUINVOICE-000016": "操作失败",
+ "4004PUINVOICE-000017": "所选发票没有关联费用发票!",
+ "4004PUINVOICE-000018": "有未处理完的单据,是否退出转单?",
+ "4004PUINVOICE-000019": "来源表头数据与当前表头数据不一致,无法参照增行!",
+ "4004PUINVOICE-000020": "表体为空!",
+ "4004PUINVOICE-000021": "保存成功!",
+ "4004PUINVOICE-000022": "传应付成功!",
+ "4004PUINVOICE-000023": "收回成功!",
+ "4004PUINVOICE-000024": "解冻成功!",
+ "4004PUINVOICE-000025": "当前单据未保存,您确定离开此页面?",
+ "4004PUINVOICE-000026": "采购发票",
+ "4004PUINVOICE-000027": "参照增行",
+ "4004PUINVOICE-000028": "指派",
+ "4004PUINVOICE-000029": "冻结原因",
+ "4004PUINVOICE-000030": "请输入冻结原因",
+ "4004PUINVOICE-000031": "联查费用发票",
+ "4004PUINVOICE-000032": "操作",
+ "4004PUINVOICE-000033": "采购订单",
+ "4004PUINVOICE-000034": "采购入库单",
+ "4004PUINVOICE-000035": "期初暂估单",
+ "4004PUINVOICE-000036": "委外订单",
+ "4004PUINVOICE-000037": "委外加工入库单",
+ "4004PUINVOICE-000038": "消耗汇总",
+ "4004PUINVOICE-000039": "加工费结算单",
+ "4004PUINVOICE-000040": "请选择要取消传应付的发票!",
+ "4004PUINVOICE-000041": "请选择要提交的发票!",
+ "4004PUINVOICE-000042": "请选择要删除的发票!",
+ "4004PUINVOICE-000043": "请选择要传应付的发票!",
+ "4004PUINVOICE-000044": "请选择要解冻的发票!",
+ "4004PUINVOICE-000045": "请选择要冻结的发票!",
+ "4004PUINVOICE-000046": "请输入冻结原因!",
+ "4004PUINVOICE-000047": "请选择单据!",
+ "4004PUINVOICE-000048": "查询结果为空!",
+ "4004PUINVOICE-000049": "请选择需要操作的数据!",
+ "4004PUINVOICE-000050": "未选择发票!",
+ "4004PUINVOICE-000051": "请选择要联查的发票!",
+ "4004PUINVOICE-000052": "请选择要打印的订单!",
+ "4004PUINVOICE-000053": "待提交",
+ "4004PUINVOICE-000054": "审批中",
+ "4004PUINVOICE-000055": "全部",
+ "4004PUINVOICE-000056": "确定要删除吗?",
+ "4004PUINVOICE-000057": "已成功!",
+ "4004PUINVOICE-000058": "生成发票",
+ "4004PUINVOICE-000059": "移除",
+ "4004PUINVOICE-000060": "本次收票主数量",
+ "4004PUINVOICE-000061": "本次收票金额",
+ "4004PUINVOICE-000062": "选择订单",
+ "4004PUINVOICE-000063": "入库单",
+ "4004PUINVOICE-000064": "出错啦!",
+ "4004PUINVOICE-000065": "委外模块未启用",
+ "4004PUINVOICE-000066": "委外加工入库单",
+ "4004PUINVOICE-000067": "本次收票主数量",
+ "4004PUINVOICE-000068": "消耗汇总收票",
+ "4004PUINVOICE-000069": "确认修改",
+ "4004PUINVOICE-000070": "取消传应付",
+ "4004PUINVOICE-000071": "提交",
+ "4004PUINVOICE-000072": "删除",
+ "4004PUINVOICE-000073": "收回",
+ "4004PUINVOICE-000074": "解冻",
+ "4004PUINVOICE-000075": "冻结",
+ "4004PUINVOICE-000076": "刷新成功!",
+ "4004PUINVOICE-000077": "查询成功!",
+ "4004PUINVOICE-000078": "返回",
+ "4004PUINVOICE-000079": "取消",
+ "4004PUINVOICE-000080": "注意",
+ "4004PUINVOICE-000081": "是",
+ "4004PUINVOICE-000082": "否",
+ "4004PUINVOICE-000083": "保存提交成功",
+ "4004PUINVOICE-000084": "影像管理模块没有启用!",
+ "4004PUINVOICE-000085": "共享发票管理模块没有启用!",
+ "4004PUINVOICE-000086": "扫码结果",
+ "4004PUINVOICE-000087": "扫码拉单",
+ "4004PUINVOICE-000088": "单据编号",
+ "4004PUINVOICE-000089": "未找到相应的业务流",
+ "4004PUINVOICE-000090": "已保存单据不支持暂存!",
+ "4004PUINVOICE-000091": "单据存在来源,不能支持暂存!",
+ "4004PUINVOICE-000092": "选择采购订单付款计划",
+ "4004PUINVOICE-000093": "采购订单付款计划",
+ "4004PUINVOICE-000094": "单据名称",
+ "4004PUINVOICE-000095": "选择工序委外加工费",
+ "4004PUINVOICE-000096": "选中的第一张发票金额大于0,不能进行红字发票处理!",
+ "4004PUINVOICE-000097": "请选中数据",
+ "4004PUINVOICE-000098": "提交开票申请",
+ "4004PUINVOICE-000099": "提交开票申请成功",
+ "4004PUINVOICE-000100": "选中的第一张发票状态不是审批通过状态,不能开票!",
+ "4004PUINVOICE-000101": "选中的第一张发票状态不是审批通过状态,不能维护税务发票!"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004purefer.json b/src/pu/public/lang/standard/simpchn/4004purefer.json
new file mode 100644
index 0000000..5ee5e68
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004purefer.json
@@ -0,0 +1,25 @@
+{
+ "4004PUREFER-000000": "合同编码",
+ "4004PUREFER-000001": "合同名称",
+ "4004PUREFER-000002": "计划生效日期",
+ "4004PUREFER-000003": "计划终止日期",
+ "4004PUREFER-000004": "币种",
+ "4004PUREFER-000005": "项目",
+ "4004PUREFER-000006": "物料编码",
+ "4004PUREFER-000007": "物料名称",
+ "4004PUREFER-000008": "无税单价",
+ "4004PUREFER-000009": "含税单价",
+ "4004PUREFER-000010": "主无税单价",
+ "4004PUREFER-000011": "主含税单价",
+ "4004PUREFER-000012": "收货地区",
+ "4004PUREFER-000013": "生效合同参照",
+ "4004PUREFER-000014": "采购折扣",
+ "4004PUREFER-000015": "折扣编码",
+ "4004PUREFER-000016": "折扣名称",
+ "4004PUREFER-000017": "优质优价方案",
+ "4004PUREFER-000018": "方案编码",
+ "4004PUREFER-000019": "方案名称",
+ "4004PUREFER-000020": "岗位设置",
+ "4004PUREFER-000021": "岗位编码",
+ "4004PUREFER-000022": "岗位名称"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004setpiece.json b/src/pu/public/lang/standard/simpchn/4004setpiece.json
new file mode 100644
index 0000000..f5434ea
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004setpiece.json
@@ -0,0 +1,3 @@
+{
+ "4004SETPIECE-000001": "成套件信息"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004settlebill.json b/src/pu/public/lang/standard/simpchn/4004settlebill.json
new file mode 100644
index 0000000..1123b57
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004settlebill.json
@@ -0,0 +1,15 @@
+{
+ "4004SETTLEBILL-000000": "取消传存货成功!",
+ "4004SETTLEBILL-000001": "删除",
+ "4004SETTLEBILL-000002": "确定要删除所选数据吗?",
+ "4004SETTLEBILL-000003": "删除成功",
+ "4004SETTLEBILL-000004": "刷新成功!",
+ "4004SETTLEBILL-000005": "传存货成功!",
+ "4004SETTLEBILL-000006": "采购结算单",
+ "4004SETTLEBILL-000007": "请选择需要操作的数据!",
+ "4004SETTLEBILL-000008": "请先选择数据",
+ "4004SETTLEBILL-000009": "确定要删除吗?",
+ "4004SETTLEBILL-000010": "操作",
+ "4004SETTLEBILL-000011": "确定要删除吗?",
+ "4004SETTLEBILL-000012": "数据不存在,请确认单据是否已被删除"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004settlement.json b/src/pu/public/lang/standard/simpchn/4004settlement.json
new file mode 100644
index 0000000..8ad1720
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004settlement.json
@@ -0,0 +1,88 @@
+{
+ "4004SETTLEMENT-000000": "无任何可结算入库单和采购发票!",
+ "4004SETTLEMENT-000001": "费用结算",
+ "4004SETTLEMENT-000002": "同物料结算",
+ "4004SETTLEMENT-000003": "异物料结算",
+ "4004SETTLEMENT-000004": "无发票结算",
+ "4004SETTLEMENT-000005": "请先选择财务组织!",
+ "4004SETTLEMENT-000006": "查询结果超过500条,仅显示前500条数据,建议查询时缩小查询范围",
+ "4004SETTLEMENT-000007": "查询结果为空",
+ "4004SETTLEMENT-000008": "部门相同",
+ "4004SETTLEMENT-000009": "批次相同",
+ "4004SETTLEMENT-000010": "生产厂商相同",
+ "4004SETTLEMENT-000011": "自由辅助属性相同",
+ "4004SETTLEMENT-000012": "红蓝入库单数量绝对值相同",
+ "4004SETTLEMENT-000013": "采购员相同",
+ "4004SETTLEMENT-000014": "来源同一订单",
+ "4004SETTLEMENT-000015": "项目相同",
+ "4004SETTLEMENT-000016": "财务组织相同",
+ "4004SETTLEMENT-000017": "物料相同",
+ "4004SETTLEMENT-000018": "供应商相同",
+ "4004SETTLEMENT-000019": "发票类型相同",
+ "4004SETTLEMENT-000020": "主无税净价相同",
+ "4004SETTLEMENT-000021": "入库类型相同",
+ "4004SETTLEMENT-000022": "发票和入库单数量相同",
+ "4004SETTLEMENT-000023": "红蓝入库单结算",
+ "4004SETTLEMENT-000024": "红蓝发票结算",
+ "4004SETTLEMENT-000025": "发票与入库单结算",
+ "4004SETTLEMENT-000026": "提示信息",
+ "4004SETTLEMENT-000027": "入库单本次结算数量大于发票的本次结算数量,继续本物料的手工结算吗?",
+ "4004SETTLEMENT-000028": "取消",
+ "4004SETTLEMENT-000029": "单价超容差异常, 是否继续?",
+ "4004SETTLEMENT-000030": "费用分摊",
+ "4004SETTLEMENT-000031": "费用发票",
+ "4004SETTLEMENT-000032": "未生成结算单",
+ "4004SETTLEMENT-000033": "结算单查看",
+ "4004SETTLEMENT-000034": "自动结算规则",
+ "4004SETTLEMENT-000035": "系统内置必须匹配条件",
+ "4004SETTLEMENT-000036": "系统内置结算顺序",
+ "4004SETTLEMENT-000037": "发票与来源入库单结算",
+ "4004SETTLEMENT-000038": "发票与来源于同一订单下的入库单结算",
+ "4004SETTLEMENT-000039": "满足自动结算条件的其它发票与入库单结算",
+ "4004SETTLEMENT-000040": "采购结算",
+ "4004SETTLEMENT-000041": "操作完成",
+ "4004SETTLEMENT-000042": "操作汇总",
+ "4004SETTLEMENT-000043": "已生成结算单",
+ "4004SETTLEMENT-000044": "张",
+ "4004SETTLEMENT-000045": "查看",
+ "4004SETTLEMENT-000046": "已结算入库单",
+ "4004SETTLEMENT-000047": "条",
+ "4004SETTLEMENT-000048": "已结算发票",
+ "4004SETTLEMENT-000049": "返回",
+ "4004SETTLEMENT-000050": "发票查询",
+ "4004SETTLEMENT-000051": "入库单查询",
+ "4004SETTLEMENT-000052": "采购发票",
+ "4004SETTLEMENT-000053": "本次结算数量",
+ "4004SETTLEMENT-000054": "本次结算金额",
+ "4004SETTLEMENT-000055": "入库单",
+ "4004SETTLEMENT-000056": "本次结算总数量",
+ "4004SETTLEMENT-000057": "发票号/供应商",
+ "4004SETTLEMENT-000058": "物料",
+ "4004SETTLEMENT-000059": "入库单号/供应商",
+ "4004SETTLEMENT-000060": "未结算数量",
+ "4004SETTLEMENT-000061": "主单位",
+ "4004SETTLEMENT-000062": "未结算金额",
+ "4004SETTLEMENT-000063": "结算",
+ "4004SETTLEMENT-000064": "查询结果大于1000条,请缩小条件再试!",
+ "4004SETTLEMENT-000065": "单价超容差异常, 是否继续",
+ "4004SETTLEMENT-000066": "消耗汇总结算",
+ "4004SETTLEMENT-000067": "消耗汇总查询",
+ "4004SETTLEMENT-000068": "消耗汇总",
+ "4004SETTLEMENT-000069": "消耗汇总单号/供应商",
+ "4004SETTLEMENT-000070": "未查询出符合条件的数据",
+ "4004SETTLEMENT-000071": "查询成功,共{i}条",
+ "4004SETTLEMENT-000072": "一次勾选最多300行,建议使用自动结算或者减少勾选行!",
+ "4004SETTLEMENT-000073": "一次勾选最多300行,建议使用自动结算或者减少勾选行!",
+ "4004SETTLEMENT-000074": "一次勾选最多300行,建议使用自动结算或者减少勾选行!",
+ "4004SETTLEMENT-000075": "后台结算",
+ "4004SETTLEMENT-000076": "采购组织",
+ "4004SETTLEMENT-000077": "单据日期",
+ "4004SETTLEMENT-000078": "供应商",
+ "4004SETTLEMENT-000079": "物料基本分类",
+ "4004SETTLEMENT-000080": "库存组织",
+ "4004SETTLEMENT-000081": "您有必输项未填写",
+ "4004SETTLEMENT-000082": "本月~今日",
+ "4004SETTLEMENT-000083": "财务组织",
+ "4004SETTLEMENT-000084": "编码",
+ "4004SETTLEMENT-000085": "名称"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004stockquery.json b/src/pu/public/lang/standard/simpchn/4004stockquery.json
new file mode 100644
index 0000000..3181267
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004stockquery.json
@@ -0,0 +1,3 @@
+{
+ "4004STOCKQUERY-000001": "存量查询"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004storereq.json b/src/pu/public/lang/standard/simpchn/4004storereq.json
new file mode 100644
index 0000000..4c835d7
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004storereq.json
@@ -0,0 +1,68 @@
+{
+ "4004STOREREQ-000000": "输入值必须为(0,∞]或者(0,∞]/(0,∞]",
+ "4004STOREREQ-000001": "清空组织会清空您录入的信息!",
+ "4004STOREREQ-000002": "是否修改组织,这样会清空您录入的信息?",
+ "4004STOREREQ-000003": "确定要取消吗?",
+ "4004STOREREQ-000004": "操作成功!",
+ "4004STOREREQ-000005": "行关闭失败!",
+ "4004STOREREQ-000006": "请选择需要操作的数据!",
+ "4004STOREREQ-000007": "行关闭成功!",
+ "4004STOREREQ-000008": "合并显示",
+ "4004STOREREQ-000009": "物资需求申请单合并显示: ",
+ "4004STOREREQ-000010": "请选择状态为自由的数据!",
+ "4004STOREREQ-000011": "确定要删除所选数据吗?",
+ "4004STOREREQ-000012": "行打开失败!",
+ "4004STOREREQ-000013": "表体为空",
+ "4004STOREREQ-000014": "当前单据未保存,您确定离开此页面?",
+ "4004STOREREQ-000015": "物资需求申请单",
+ "4004STOREREQ-000016": "指派",
+ "4004STOREREQ-000017": "操作",
+ "4004STOREREQ-000018": "关闭成功",
+ "4004STOREREQ-000019": "请选择需要提交的数据!",
+ "4004STOREREQ-000020": "提交成功!",
+ "4004STOREREQ-000021": "设置页签数量的默认值",
+ "4004STOREREQ-000022": "请选择需要删除的数据!",
+ "4004STOREREQ-000023": "提示",
+ "4004STOREREQ-000024": "请选择要输出的订单!",
+ "4004STOREREQ-000025": "请选择要打印的订单!",
+ "4004STOREREQ-000026": "请选择需要收回的数据!",
+ "4004STOREREQ-000027": "注意",
+ "4004STOREREQ-000028": "确定要删除吗?",
+ "4004STOREREQ-000029": "待提交",
+ "4004STOREREQ-000030": "审批中",
+ "4004STOREREQ-000031": "执行中",
+ "4004STOREREQ-000032": "全部",
+ "4004STOREREQ-000033": "首页",
+ "4004STOREREQ-000034": "物资需求申请单管理",
+ "4004STOREREQ-000035": "物资需求申请",
+ "4004STOREREQ-000036": "提交失败!",
+ "4004STOREREQ-000037": "删除成功!",
+ "4004STOREREQ-000038": "收回成功!",
+ "4004STOREREQ-000039": "保存成功!",
+ "4004STOREREQ-000040": "刷新成功!",
+ "4004STOREREQ-000041": "查询成功",
+ "4004STOREREQ-000042": "整单打开成功!",
+ "4004STOREREQ-000043": "整单关闭成功!",
+ "4004STOREREQ-000044": "行打开成功!",
+ "4004STOREREQ-000045": "提交",
+ "4004STOREREQ-000046": "删除",
+ "4004STOREREQ-000047": "收回",
+ "4004STOREREQ-000048": "保存提交成功!",
+ "4004STOREREQ-000049": "取消",
+ "4004STOREREQ-000050": "确定修改",
+ "4004STOREREQ-000051": "删除失败!",
+ "4004STOREREQ-000052": "刷新失败!",
+ "4004STOREREQ-000053": "选择物资及服务需求单",
+ "4004STOREREQ-000054": "生成物资需求申请单",
+ "4004STOREREQ-000055": "查询结果为空",
+ "4004STOREREQ-000056": "有未处理完的单据,是否退出转单",
+ "4004STOREREQ-000057": "取消成功",
+ "4004STOREREQ-000058": "维修计划生成的申请单不允许收回",
+ "4004STOREREQ-000059": "项目管理模块未启用!",
+ "4004STOREREQ-000060": "已保存单据不支持暂存!",
+ "4004STOREREQ-000061": "单据存在来源,不能支持暂存!",
+ "4004STOREREQ-000062": "关闭/打开原因",
+ "4004STOREREQ-000063": "请输入关闭/打开原因:",
+ "4004STOREREQ-000064": "关闭/打开原因不能为空",
+ "4004STOREREQ-000065": "提示 ! 最大录入长度为100"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004sysinit.json b/src/pu/public/lang/standard/simpchn/4004sysinit.json
new file mode 100644
index 0000000..bc5c418
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004sysinit.json
@@ -0,0 +1,59 @@
+{
+ "4004sysinit-000000": "供应商相同",
+ "4004sysinit-000001": "部门相同",
+ "4004sysinit-000002": "批次相同",
+ "4004sysinit-000003": "入库类型相同",
+ "4004sysinit-000004": "生产厂商相同",
+ "4004sysinit-000005": "自由辅助属性相同",
+ "4004sysinit-000006": "采购员相同",
+ "4004sysinit-000007": "来源同一订单",
+ "4004sysinit-000008": "主无税净价相同",
+ "4004sysinit-000009": "项目相同",
+ "4004sysinit-000010": "红蓝入库单数量绝对值相同",
+ "4004sysinit-000011": "财务组织相同",
+ "4004sysinit-000012": "物料相同",
+ "4004sysinit-000013": "红蓝发票数量绝对值相同",
+ "4004sysinit-000014": "主无税单价相同",
+ "4004sysinit-000015": "发票类型相同",
+ "4004sysinit-000016": "发票和入库单数量相同",
+ "4004sysinit-000017": "红蓝入库单结算",
+ "4004sysinit-000018": "红蓝发票结算",
+ "4004sysinit-000019": "发票与入库单结算",
+ "4004sysinit-000020": "动态参数设置",
+ "4004sysinit-000021": "系统内置必须匹配条件",
+ "4004sysinit-000022": "系统内置结算顺序",
+ "4004sysinit-000023": "发票与来源入库单结算",
+ "4004sysinit-000024": "发票与来源于同一订单下的入库单结算",
+ "4004sysinit-000025": "满足自动结算条件的其它发票与入库单结算",
+ "4004sysinit-000026": "确定",
+ "4004sysinit-000027": "取消",
+ "4004sysinit-000028": "供应商价目表",
+ "4004sysinit-000029": "订单最新价",
+ "4004sysinit-000030": "请购单单价",
+ "4004sysinit-000031": "参考成本",
+ "4004sysinit-000032": "计划价",
+ "4004sysinit-000033": "订单最低价",
+ "4004sysinit-000034": "供应商",
+ "4004sysinit-000035": "物料",
+ "4004sysinit-000036": "币种",
+ "4004sysinit-000037": "单据日期",
+ "4004sysinit-000038": "报价单位",
+ "4004sysinit-000039": "结算财务组织",
+ "4004sysinit-000040": "生产厂商",
+ "4004sysinit-000041": "质量等级",
+ "4004sysinit-000042": "收货地区",
+ "4004sysinit-000043": "运输方式",
+ "4004sysinit-000044": "订单价",
+ "4004sysinit-000045": "入库单价",
+ "4004sysinit-000046": "最新结算价",
+ "4004sysinit-000047": "右侧已选项不能为空!",
+ "4004sysinit-000048": "待选",
+ "4004sysinit-000049": "已选",
+ "4004sysinit-000050": "计划价物料是否按计划价暂估",
+ "4004sysinit-000051": "采购合同",
+ "4004sysinit-000052": "供应商价目表",
+ "4004sysinit-000053": "物料主供应商",
+ "4004sysinit-000054": "生成采购发票默认发票类型不允许为空",
+ "4004sysinit-000055": "生成采购发票默认发票类型",
+ "4004sysinit-000056": "采购发票"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004taxinvoice.json b/src/pu/public/lang/standard/simpchn/4004taxinvoice.json
new file mode 100644
index 0000000..17a1b92
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004taxinvoice.json
@@ -0,0 +1,21 @@
+{
+ "4004Taxinvoice-000000": "请选择费用行",
+ "4004Taxinvoice-000001": "关闭成功",
+ "4004Taxinvoice-000002": "打开成功",
+ "4004Taxinvoice-000003": "确认修改",
+ "4004Taxinvoice-000004": "是否修改组织,这样会清空您录入的信息?",
+ "4004Taxinvoice-000005": "收回成功",
+ "4004Taxinvoice-000006": "确定要删除吗?",
+ "4004Taxinvoice-000007": "处理成功",
+ "4004Taxinvoice-000008": "操作",
+ "4004Taxinvoice-000009": "请选择数据",
+ "4004Taxinvoice-000010": "提交成功",
+ "4004Taxinvoice-000011": "删除成功",
+ "4004Taxinvoice-000012": "进项发票",
+ "4004Taxinvoice-000013": "表体数据为空,不允许保存。",
+ "4004Taxinvoice-000014": "保存成功",
+ "4004Taxinvoice-000015": "指派",
+ "4004Taxinvoice-000016": "联查凭证",
+ "4004Taxinvoice-000017": "没有关联的单据!",
+ "4004Taxinvoice-000018": "无符合条件数据"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004transfer.json b/src/pu/public/lang/standard/simpchn/4004transfer.json
new file mode 100644
index 0000000..02f70ac
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004transfer.json
@@ -0,0 +1,59 @@
+{
+ "4004transfer-000000": "需要请购安排",
+ "4004transfer-000001": "传应付控制",
+ "4004transfer-000002": "入库匹配",
+ "4004transfer-000003": "不控制",
+ "4004transfer-000004": "质量合格检查",
+ "4004transfer-000005": "消耗性采购",
+ "4004transfer-000006": "结算完毕自动传应付",
+ "4004transfer-000007": "调整发票",
+ "4004transfer-000008": "是",
+ "4004transfer-000009": "否",
+ "4004transfer-000010": "下拉改变后的字段",
+ "4004transfer-000011": "是否供应商寄存",
+ "4004transfer-000012": "是否直运采购",
+ "4004transfer-000013": "采购订单是否检查采购业务委托关系",
+ "4004transfer-000014": "允许超订单付款",
+ "4004transfer-000015": "请购单生成订单限制方式",
+ "4004transfer-000016": "不限制",
+ "4004transfer-000017": "存在有效供应商价格才能生成",
+ "4004transfer-000018": "经过价格审批才能生成",
+ "4004transfer-000019": "是否进行到货计划安排",
+ "4004transfer-000020": "在途开始",
+ "4004transfer-000021": "审批",
+ "4004transfer-000022": "在途结束",
+ "4004transfer-000023": "输出",
+ "4004transfer-000024": "对方确认",
+ "4004transfer-000025": "确认",
+ "4004transfer-000026": "单据号",
+ "4004transfer-000027": "单据日期",
+ "4004transfer-000028": "是否数量",
+ "4004transfer-000029": "发货通知",
+ "4004transfer-000030": "发货",
+ "4004transfer-000031": "装运通知",
+ "4004transfer-000032": "装运",
+ "4004transfer-000033": "报关",
+ "4004transfer-000034": "出关",
+ "4004transfer-000035": "到货",
+ "4004transfer-000036": "入库",
+ "4004transfer-000037": "订单状态选择",
+ "4004transfer-000038": "未设置到货或入库状态,此交易上的订单将无法到货或入库,是否继续?",
+ "4004transfer-000039": "需要自动报检",
+ "4004transfer-000040": "服务类物料审批通过自动暂估应付",
+ "4004transfer-000041": "里程碑采购",
+ "4004transfer-000042": "里程碑逐级确认",
+ "4004transfer-000043": "超付款容差(%)",
+ "4004transfer-000044": "严格控制",
+ "4004transfer-000045": "请购/订单",
+ "4004transfer-000046": "请购/合同",
+ "4004transfer-000047": "请购/价格审批单",
+ "4004transfer-000048": "请购/询报价单",
+ "4004transfer-000049": "请购单执行流程",
+ "4004transfer-000050": "请购单执行控制方式",
+ "4004transfer-000051": "不控制",
+ "4004transfer-000052": "付款容差必须大于0!",
+ "4004transfer-000053": "价格属性",
+ "4004transfer-000054": "询到价格是否可改",
+ "4004transfer-000055": "来源采购合同单价是否可改",
+ "4004transfer-000056": "来源价格审批单单价是否可改"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004vmicancelest.json b/src/pu/public/lang/standard/simpchn/4004vmicancelest.json
new file mode 100644
index 0000000..4532803
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004vmicancelest.json
@@ -0,0 +1,18 @@
+{
+ "4004VMICANCELEST-000000": "取消费用暂估成功",
+ "4004VMICANCELEST-000001": "取消暂估成功",
+ "4004VMICANCELEST-000002": "未查询到数据!",
+ "4004VMICANCELEST-000003": "询问",
+ "4004VMICANCELEST-000004": "所选数据存在既做过货物暂估又做过费用暂估的记录,确定全部取消吗?",
+ "4004VMICANCELEST-000005": "否",
+ "4004VMICANCELEST-000006": "是",
+ "4004VMICANCELEST-000007": "消耗汇总取消暂估",
+ "4004VMICANCELEST-000008": "费用明细",
+ "4004VMICANCELEST-000009": "对应消耗汇总单行暂估的费用项及分摊的金额",
+ "4004VMICANCELEST-000010": "(是:仅取消费用暂估;否:货物暂估和费用暂估全部取消)",
+ "4004VMICANCELEST-000011": "取消",
+ "4004VMICANCELEST-000012": "提示信息",
+ "4004VMICANCELEST-000013": "全部取消",
+ "4004VMICANCELEST-000014": "仅取消费用",
+ "4004VMICANCELEST-000015": "不取消"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004vmiest.json b/src/pu/public/lang/standard/simpchn/4004vmiest.json
new file mode 100644
index 0000000..d22ba06
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004vmiest.json
@@ -0,0 +1,13 @@
+{
+ "4004VMIEST-000000": "暂估成功",
+ "4004VMIEST-000001": "没有可以分摊的费用项!",
+ "4004VMIEST-000002": "未查询到数据!",
+ "4004VMIEST-000003": "消耗汇总暂估",
+ "4004VMIEST-000004": "费用分摊",
+ "4004VMIEST-000005": "确定分摊",
+ "4004VMIEST-000006": "取消",
+ "4004VMIEST-000007": "费用明细",
+ "4004VMIEST-000008": "消耗汇总单行对应的费用项及费用暂估金额,可按行录入或者通过费用分摊批量录入",
+ "4004VMIEST-000009": "操作",
+ "4004VMIEST-000010": "的费用明细,以下字段不可以为空:"
+}
diff --git a/src/pu/public/lang/standard/simpchn/4004workbench.json b/src/pu/public/lang/standard/simpchn/4004workbench.json
new file mode 100644
index 0000000..23a78d9
--- /dev/null
+++ b/src/pu/public/lang/standard/simpchn/4004workbench.json
@@ -0,0 +1,35 @@
+{
+ "4004WORKBENCH-000000": "操作",
+ "4004WORKBENCH-000001": "订单物料数量",
+ "4004WORKBENCH-000002": "累计到货数量",
+ "4004WORKBENCH-000003": "累计入库数量",
+ "4004WORKBENCH-000004": "累计发票数量",
+ "4004WORKBENCH-000005": "累计发票金额(万元)",
+ "4004WORKBENCH-000006": "累计付款金额(万元)",
+ "4004WORKBENCH-000007": "提交成功",
+ "4004WORKBENCH-000008": "采购订单",
+ "4004WORKBENCH-000009": "价格结算单",
+ "4004WORKBENCH-000010": "到货单",
+ "4004WORKBENCH-000011": "采购发票",
+ "4004WORKBENCH-000012": "进度确认单",
+ "4004WORKBENCH-000013": "采购订单执行跟踪",
+ "4004WORKBENCH-000014": "提交指派",
+ "4004WORKBENCH-000015": "张",
+ "4004WORKBENCH-000016": "行",
+ "4004WORKBENCH-000017": "采购待下单",
+ "4004WORKBENCH-000018": "里程碑待收票",
+ "4004WORKBENCH-000019": "未来7天采购待收货",
+ "4004WORKBENCH-000020": "采购待收票",
+ "4004WORKBENCH-000021": "消耗汇总待收票",
+ "4004WORKBENCH-000022": "订单当前可付款",
+ "4004WORKBENCH-000023": "订单逾期未付款",
+ "4004WORKBENCH-000024": "提交",
+ "4004WORKBENCH-000025": "成功条数",
+ "4004WORKBENCH-000026": "失败条数",
+ "4004WORKBENCH-000027": "第",
+ "4004WORKBENCH-000028": ",条数据操作失败。失败原因:",
+ "4004WORKBENCH-000029": "共处理{totalNum}条,失败{failNum}条!",
+ "4004WORKBENCH-000030": "共处理{totalNum}条,成功{sucNum}条,失败{failNum}条!",
+ "4004WORKBENCH-000031": "处理成功{sucNum}条!",
+ "4004WORKBENCH-000032": "出错啦"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001arsub.json b/src/scmpub/public/lang/standard/simpchn/4001arsub.json
new file mode 100644
index 0000000..2b97be1
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001arsub.json
@@ -0,0 +1,47 @@
+{
+ "4006ARSUB-000000": "客户费用单",
+ "4006ARSUB-000001": "操作",
+ "4006ARSUB-000002": "取消",
+ "4006ARSUB-000003": "数据已经被删除,请返回列表界面!",
+ "4006ARSUB-000004": "确认修改",
+ "4006ARSUB-000005": "是否修改组织,这样会清空您录入的信息!",
+ "4006ARSUB-000006": "保存成功!",
+ "4006ARSUB-000007": "提交成功!",
+ "4006ARSUB-000008": "刷新成功!",
+ "4006ARSUB-000009": "删除成功!",
+ "4006ARSUB-000010": "当前单据未保存,您确认离开此页面?",
+ "4006ARSUB-000011": "客户费用单维护",
+ "4006ARSUB-000012": "请选择要删除的行!",
+ "4006ARSUB-000013": "收回成功!",
+ "4006ARSUB-000014": "整单关闭成功!",
+ "4006ARSUB-000015": "确定要删除吗?",
+ "4006ARSUB-000016": "删除",
+ "4006ARSUB-000017": "删除失败",
+ "4006ARSUB-000018": "请选择要操作的单据!",
+ "4006ARSUB-000019": "指派",
+ "4006ARSUB-000020": "整单打开成功!",
+ "4006ARSUB-000021": "提交",
+ "4006ARSUB-000022": "收回",
+ "4006ARSUB-000023": "整单关闭",
+ "4006ARSUB-000024": "整单打开",
+ "4006ARSUB-000025": "费用冲抵情况",
+ "4006ARSUB-000026": "选择返利结算单",
+ "4006ARSUB-000027": "核报",
+ "4006ARSUB-000028": "本次返利核报金额",
+ "4006ARSUB-000029": "选择客户费用申请单",
+ "4006ARSUB-000030": "本次可核报金额",
+ "4006ARSUB-000031": "有未保存的单据,确定要返回吗?",
+ "4006ARSUB-000032": "提示",
+ "4006ARSUB-000033": "存在上游来源单据,不允许增行!",
+ "4006ARSUB-000034": "存在上游来源单据,不允许插入行!",
+ "4006ARSUB-000035": "存在上游来源单据,不允许复制行!",
+ "4006ARSUB-000036": "销售返利模块未启用!",
+ "4006ARSUB-000037": "客户费用支持比例只允许在0 % 到100 % 之间",
+ "4006ARSUB-000038": "预算执行情况",
+ "4006ARSUB-000039": "返回",
+ "4006ARSUB-000040": "退出转单",
+ "4006ARSUB-000041": "有未保存的单据,确定要退出转单吗?",
+ "4006ARSUB-000042": "保存提交成功",
+ "4006ARSUB-000043": "客户费用支持比例存在小数",
+ "4006ARSUB-000044": "客户费用申请单模块未启用!"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001backreason.json b/src/scmpub/public/lang/standard/simpchn/4001backreason.json
new file mode 100644
index 0000000..c20936b
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001backreason.json
@@ -0,0 +1,14 @@
+{
+ "4001BACKREASON-000000": "取消",
+ "4001BACKREASON-000001": "确定要取消吗?",
+ "4001BACKREASON-000002": "刷新成功",
+ "4001BACKREASON-000003": "请选择要删除的数据",
+ "4001BACKREASON-000004": "删除",
+ "4001BACKREASON-000005": "确定要删除所选数据吗?",
+ "4001BACKREASON-000006": "删除成功!",
+ "4001BACKREASON-000007": "请选择要打印的单据!",
+ "4001BACKREASON-000008": "保存成功!",
+ "4001BACKREASON-000009": "退货理由设置",
+ "4001BACKREASON-000010": "操作",
+ "4001BACKREASON-000011": "确定要删除吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001barcode.json b/src/scmpub/public/lang/standard/simpchn/4001barcode.json
new file mode 100644
index 0000000..e7b4101
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001barcode.json
@@ -0,0 +1,3 @@
+{
+ "4001BARCODE-000000": "请输入单据条码"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001batchcode.json b/src/scmpub/public/lang/standard/simpchn/4001batchcode.json
new file mode 100644
index 0000000..37a2b51
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001batchcode.json
@@ -0,0 +1,19 @@
+{
+ "4001BATCHCODE-000000": "删除成功",
+ "4001BATCHCODE-000001": "提示",
+ "4001BATCHCODE-000002": "请选择要删除的行!",
+ "4001BATCHCODE-000003": "请选择要输出的档案!",
+ "4001BATCHCODE-000004": "错误",
+ "4001BATCHCODE-000005": "请选择要打印的档案!",
+ "4001BATCHCODE-000006": "保存成功",
+ "4001BATCHCODE-000007": "未查询出符合条件的数据",
+ "4001BATCHCODE-000008": "停用成功",
+ "4001BATCHCODE-000009": "启用成功",
+ "4001BATCHCODE-000010": "当前单据未保存,您确认离开此页面?",
+ "4001BATCHCODE-000011": "确定要删除吗?",
+ "4001BATCHCODE-000012": "批次号档案",
+ "4001BATCHCODE-000013": "操作",
+ "4001BATCHCODE-000014": "确定要停用吗?",
+ "4001BATCHCODE-000015": "确定要启用吗?",
+ "4001BATCHCODE-000016": "物料和批次号不能同时为空!"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001batchrule.json b/src/scmpub/public/lang/standard/simpchn/4001batchrule.json
new file mode 100644
index 0000000..f7bd208
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001batchrule.json
@@ -0,0 +1,33 @@
+{
+ "4001BATCHRULE-000000": "业务对象",
+ "4001BATCHRULE-000001": "还未定义长度,不能选择!",
+ "4001BATCHRULE-000002": "最多输入8个字符!",
+ "4001BATCHRULE-000003": "年",
+ "4001BATCHRULE-000004": "月",
+ "4001BATCHRULE-000005": "日",
+ "4001BATCHRULE-000006": "归零标志:",
+ "4001BATCHRULE-000007": "不归零",
+ "4001BATCHRULE-000008": "规则定义:",
+ "4001BATCHRULE-000009": "应用效果:",
+ "4001BATCHRULE-000010": "表示:",
+ "4001BATCHRULE-000011": "前缀",
+ "4001BATCHRULE-000012": "业务对象1",
+ "4001BATCHRULE-000013": "业务对象2",
+ "4001BATCHRULE-000014": "流水号",
+ "4001BATCHRULE-000015": "后缀",
+ "4001BATCHRULE-000016": "当前界面数据未保存,您确认离开此页面?",
+ "4001BATCHRULE-000017": "归零标志为年,批次号规则中必须包含年!",
+ "4001BATCHRULE-000018": "归零标志为月,批次号规则中必须包含月!",
+ "4001BATCHRULE-000019": "归零标志为日,批次号规则中必须包含日!",
+ "4001BATCHRULE-000020": "保存成功",
+ "4001BATCHRULE-000021": "物料批次号规则",
+ "4001BATCHRULE-000022": "物料基本分类",
+ "4001BATCHRULE-000023": "刷新成功!",
+ "4001BATCHRULE-000024": "删除成功",
+ "4001BATCHRULE-000025": "删除失败,请重试!",
+ "4001BATCHRULE-000026": "请注意,当前分类下无批次号编码规则,无需删除",
+ "4001BATCHRULE-000027": "确定要删除所选数据吗?删除后该分类下将无批次号编码规则",
+ "4001BATCHRULE-000028": "保存失败,当前分类无批次编码规则",
+ "4001BATCHRULE-000029": "删除",
+ "4001BATCHRULE-000030": "不支持跨级取消,请依次取消日、月、年"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001busiparam.json b/src/scmpub/public/lang/standard/simpchn/4001busiparam.json
new file mode 100644
index 0000000..7c110c9
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001busiparam.json
@@ -0,0 +1,29 @@
+{
+ "4001BUSIPARAM-000000": "动态参数设置",
+ "4001BUSIPARAM-000001": "传金税数据合并规则:",
+ "4001BUSIPARAM-000002": "不合并",
+ "4001BUSIPARAM-000003": "按存货合并",
+ "4001BUSIPARAM-000004": "按存货类合并",
+ "4001BUSIPARAM-000005": "按价格合并",
+ "4001BUSIPARAM-000006": "销售发票是否多单合并",
+ "4001BUSIPARAM-000007": "确定",
+ "4001BUSIPARAM-000008": "取消",
+ "4001BUSIPARAM-000009": "待选",
+ "4001BUSIPARAM-000010": "已选",
+ "4001BUSIPARAM-000011": "金税发票表头",
+ "4001BUSIPARAM-000012": "金税发票表体",
+ "4001BUSIPARAM-000013": "重置",
+ "4001BUSIPARAM-000014": "分销补货件默认补货单据",
+ "4001BUSIPARAM-000015": "工厂补货件默认补货单据",
+ "4001BUSIPARAM-000016": "采购件默认补货单据",
+ "4001BUSIPARAM-000017": "委外件默认补货单据",
+ "4001BUSIPARAM-000018": "询源默认补货单据类型",
+ "4001BUSIPARAM-000019": "已选组织列表为空,请选择参数所属组织后再批量设置参数!",
+ "4001BUSIPARAM-000020": "TMS生成系统单据的默认交易类型不允许为空",
+ "4001BUSIPARAM-000021": "TMS生成系统单据的默认交易类型",
+ "4001BUSIPARAM-000022": "签收途损单:",
+ "4001BUSIPARAM-000023": "应付单:",
+ "4001BUSIPARAM-000024": "生成TMS发货订单的业务类型",
+ "4001BUSIPARAM-000025": "销售发货单审批时:",
+ "4001BUSIPARAM-000026": "调拨发货单审批时:"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001carrier.json b/src/scmpub/public/lang/standard/simpchn/4001carrier.json
new file mode 100644
index 0000000..4cce3d9
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001carrier.json
@@ -0,0 +1,39 @@
+{
+ "4001CARRIER--000001": "确认修改",
+ "4001CARRIER-000000": "确认要修改组织?,这样会清空您录入的信息!",
+ "4001CARRIER-000001": "取消",
+ "4001CARRIER-000002": "确定要取消吗?",
+ "4001CARRIER-000003": "删除",
+ "4001CARRIER-000004": "确定要删除吗?",
+ "4001CARRIER-000005": "组织节点不能删除集团数据!",
+ "4001CARRIER-000006": "删除成功!",
+ "4001CARRIER-000007": "删除失败!",
+ "4001CARRIER-000008": "组织节点不能修改集团数据",
+ "4001CARRIER-000009": "刷新成功!",
+ "4001CARRIER-000010": "保存成功!",
+ "4001CARRIER-000011": "组织节点不能启用集团数据",
+ "4001CARRIER-000012": "启用",
+ "4001CARRIER-000013": "确定要启用吗?",
+ "4001CARRIER-000014": "否",
+ "4001CARRIER-000015": "启用成功!",
+ "4001CARRIER-000016": "停用",
+ "4001CARRIER-000017": "确定要停用吗?",
+ "4001CARRIER-000018": "是",
+ "4001CARRIER-000019": "停用成功!",
+ "4001CARRIER-000020": "当前单据未保存,您确认离开此页面?",
+ "4001CARRIER-000021": "刷新成功!",
+ "4001CARRIER-000022": "查询成功!",
+ "4001CARRIER-000023": "删除成功!",
+ "4001CARRIER-000024": "删除失败",
+ "4001CARRIER-000025": "组织节点不能维护集团数据!",
+ "4001CARRIER-000026": "请选择要打印的单据!",
+ "4001CARRIER-000027": "删除失败!",
+ "4001CARRIER-000028": "组织节点不能停用集团数据",
+ "4001CARRIER-000029": "启用成功!",
+ "4001CARRIER-000030": "停用成功!",
+ "4001CARRIER-000031": "显示停用",
+ "4001CARRIER-000032": "确认要删除该信息吗?",
+ "4001CARRIER-000033": "操作",
+ "4001CARRIERGROUP-000025": "确定要启用吗?",
+ "4001CARRIERGROUP-000026": "确定要停用吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001carriergroup.json b/src/scmpub/public/lang/standard/simpchn/4001carriergroup.json
new file mode 100644
index 0000000..6771b79
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001carriergroup.json
@@ -0,0 +1,30 @@
+{
+ "4001CARRIERGROUP--000001": "取消",
+ "4001CARRIERGROUP-000000": "确定要取消吗?",
+ "4001CARRIERGROUP-000001": "删除",
+ "4001CARRIERGROUP-000002": "确定要删除吗?",
+ "4001CARRIERGROUP-000003": "删除成功!",
+ "4001CARRIERGROUP-000004": "删除失败!",
+ "4001CARRIERGROUP-000005": "刷新成功!",
+ "4001CARRIERGROUP-000006": "保存成功!",
+ "4001CARRIERGROUP-000007": "启用",
+ "4001CARRIERGROUP-000008": "确定要启用吗?",
+ "4001CARRIERGROUP-000009": "否",
+ "4001CARRIERGROUP-000010": "启用成功!",
+ "4001CARRIERGROUP-000011": "停用",
+ "4001CARRIERGROUP-000012": "确定要停用吗?",
+ "4001CARRIERGROUP-000013": "是",
+ "4001CARRIERGROUP-000014": "停用成功!",
+ "4001CARRIERGROUP-000015": "当前单据未保存,您确认离开此页面?",
+ "4001CARRIERGROUP-000016": "刷新成功!",
+ "4001CARRIERGROUP-000017": "查询成功!",
+ "4001CARRIERGROUP-000018": "删除成功!",
+ "4001CARRIERGROUP-000019": "删除失败",
+ "4001CARRIERGROUP-000020": "请选择要打印的单据!",
+ "4001CARRIERGROUP-000021": "删除失败!",
+ "4001CARRIERGROUP-000022": "显示停用",
+ "4001CARRIERGROUP-000023": "确认要删除该信息吗?",
+ "4001CARRIERGROUP-000024": "操作",
+ "4001CARRIERGROUP-000025": "确定要启用吗?",
+ "4001CARRIERGROUP-000026": "确定要停用吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001cenpurule.json b/src/scmpub/public/lang/standard/simpchn/4001cenpurule.json
new file mode 100644
index 0000000..c88acdc
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001cenpurule.json
@@ -0,0 +1,11 @@
+{
+ "4001CENPURULE-000000": "请选择要删除的数据",
+ "4001CENPURULE-000001": "删除成功",
+ "4001CENPURULE-000002": " 请选择要打印的订单!",
+ "4001CENPURULE-000003": "保存成功!",
+ "4001CENPURULE-000004": "当前单据未保存,您确认离开此页面?",
+ "4001CENPURULE-000005": "适用组织",
+ "4001CENPURULE-000006": "集采控制规则",
+ "4001CENPURULE-000007": "确定要删除吗?",
+ "4001CENPURULE-000008": "操作"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001components.json b/src/scmpub/public/lang/standard/simpchn/4001components.json
new file mode 100644
index 0000000..c194ae7
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001components.json
@@ -0,0 +1,31 @@
+{
+ "4001COMPONENTS-000000": "确定",
+ "4001COMPONENTS-000001": "取消",
+ "4001COMPONENTS-000002": "收起",
+ "4001COMPONENTS-000003": "合并显示",
+ "4001COMPONENTS-000004": "求和",
+ "4001COMPONENTS-000005": "求平均",
+ "4001COMPONENTS-000006": "求加权平均",
+ "4001COMPONENTS-000007": "物料分类",
+ "4001COMPONENTS-000008": "可选栏目",
+ "4001COMPONENTS-000009": "分组汇总栏目",
+ "4001COMPONENTS-000010": "逐级汇总",
+ "4001COMPONENTS-000011": "物料分类末级汇总",
+ "4001COMPONENTS-000012": "正常",
+ "4001COMPONENTS-000013": "高级",
+ "4001COMPONENTS-000014": "栏目",
+ "4001COMPONENTS-000015": "打印",
+ "4001COMPONENTS-000016": "合并显示",
+ "4001COMPONENTS-000017": "待选列表",
+ "4001COMPONENTS-000018": "表头-已选",
+ "4001COMPONENTS-000019": "表体-已选",
+ "4001COMPONENTS-000020": "上移",
+ "4001COMPONENTS-000021": "下移",
+ "4001COMPONENTS-000022": "第一项无法上移!",
+ "4001COMPONENTS-000023": "最后一项无法下移!",
+ "4001COMPONENTS-000024": "收款人",
+ "4001COMPONENTS-000025": "复核人",
+ "4001COMPONENTS-000026": "数据集",
+ "4001COMPONENTS-000027": "确定",
+ "4001COMPONENTS-000028": "取消"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001coopsetup.json b/src/scmpub/public/lang/standard/simpchn/4001coopsetup.json
new file mode 100644
index 0000000..6e44956
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001coopsetup.json
@@ -0,0 +1,31 @@
+{
+ "4001COOPSETUP-000000": "删除成功!",
+ "4001COOPSETUP-000001": "确认删除",
+ "4001COOPSETUP-000002": "确定要删除所选数据吗?",
+ "4001COOPSETUP-000003": "保存成功!",
+ "4001COOPSETUP-000004": "销售订单",
+ "4001COOPSETUP-000005": "采购订单",
+ "4001COOPSETUP-000006": "销售组织",
+ "4001COOPSETUP-000007": "采购组织",
+ "4001COOPSETUP-000008": "登录日期",
+ "4001COOPSETUP-000009": "登录公司",
+ "4001COOPSETUP-000010": "登录用户",
+ "4001COOPSETUP-000011": "对应值",
+ "4001COOPSETUP-000012": "当前单据未保存,您确认离开此页面?",
+ "4001COOPSETUP-000013": "购销协同",
+ "4001COOPSETUP-000014": "出入库协同",
+ "4001COOPSETUP-000015": "注意",
+ "4001COOPSETUP-000016": "确定要删除吗?",
+ "4001COOPSETUP-000017": "确认取消",
+ "4001COOPSETUP-000018": "是否确认要取消?",
+ "4001COOPSETUP-000019": "取消",
+ "4001COOPSETUP-000020": "购销协同设置",
+ "4001COOPSETUP-000021": "请选择要删除的单据!",
+ "4001COOPSETUP-000022": "未查询出符合条件的数据",
+ "4001COOPSETUP-000023": "是否确定删除?",
+ "4001COOPSETUP-000024": "确定要删除吗?",
+ "4001COOPSETUP-000025": "操作",
+ "4001COOPSETUP-000026": "发票协同",
+ "4001COOPSETUP-000027": "采购发票",
+ "4001COOPSETUP-000028": "取值方式为固定值,取值内容不能为空!"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001dealfashion.json b/src/scmpub/public/lang/standard/simpchn/4001dealfashion.json
new file mode 100644
index 0000000..83a9388
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001dealfashion.json
@@ -0,0 +1,10 @@
+{
+ "4001DEALFASHION-000000": "请选择要删除的数据",
+ "4001DEALFASHION-000001": "删除成功",
+ "4001DEALFASHION-000002": " 页面为空,不能打印!",
+ "4001DEALFASHION-000003": "保存成功!",
+ "4001DEALFASHION-000004": "当前单据未保存,您确认离开此页面?",
+ "4001DEALFASHION-000005": "处理方式",
+ "4001DEALFASHION-000006": "确定要删除吗?",
+ "4001DEALFASHION-000007": "操作"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001driver.json b/src/scmpub/public/lang/standard/simpchn/4001driver.json
new file mode 100644
index 0000000..ab4b117
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001driver.json
@@ -0,0 +1,28 @@
+{
+ "4001DRIVER--000001": "请先选择组织",
+ "4001DRIVER-000000": "取消",
+ "4001DRIVER-000001": "确定要取消吗?",
+ "4001DRIVER-000002": "组织节点不能删除集团级节点数据",
+ "4001DRIVER-000003": "删除",
+ "4001DRIVER-000004": "确定要删除吗?",
+ "4001DRIVER-000005": "删除成功!",
+ "4001DRIVER-000006": "请选择要打印的单据!",
+ "4001DRIVER-000007": "刷新成功!",
+ "4001DRIVER-000008": "删除成功!",
+ "4001DRIVER-000009": "保存成功!",
+ "4001DRIVER-000010": "组织节点不启用集团数据",
+ "4001DRIVER-000011": "启用",
+ "4001DRIVER-000012": "确定要启用吗?",
+ "4001DRIVER-000013": "启用成功!",
+ "4001DRIVER-000014": "组织节点不停用集团数据",
+ "4001DRIVER-000015": "停用",
+ "4001DRIVER-000016": "确定要停用吗?",
+ "4001DRIVER-000017": "停用成功!",
+ "4001DRIVER-000018": "当前单据未保存,您确认离开此页面?",
+ "4001DRIVER-000019": "物流组织",
+ "4001DRIVER-000020": "确认要删除该信息吗?",
+ "4001DRIVER-000021": "操作",
+ "4001DRIVER-000022": "确定要启用吗?",
+ "4001DRIVER-000023": "确定要停用吗?",
+ "4001DRIVER-000024": "非属于承运商的司机名称,请参照公司人员档案录入。"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001extendformula.json b/src/scmpub/public/lang/standard/simpchn/4001extendformula.json
new file mode 100644
index 0000000..843c9bb
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001extendformula.json
@@ -0,0 +1,5 @@
+{
+ "4014ExtendFormula-000001": "数字",
+ "4014ExtendFormula-000002": "运算符",
+ "4014ExtendFormula-000003": "逻辑"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001invsource.json b/src/scmpub/public/lang/standard/simpchn/4001invsource.json
new file mode 100644
index 0000000..b02d109
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001invsource.json
@@ -0,0 +1,26 @@
+{
+ "4001INVSOURCE-000000": "确定要删除吗?",
+ "4001INVSOURCE-000001": "时间戳",
+ "4001INVSOURCE-000002": "主键",
+ "4001INVSOURCE-000003": "物料分类",
+ "4001INVSOURCE-000004": "需求库存组织",
+ "4001INVSOURCE-000005": "供货库存组织",
+ "4001INVSOURCE-000006": "物料分类名称",
+ "4001INVSOURCE-000007": "所属集团",
+ "4001INVSOURCE-000008": "删除成功",
+ "4001INVSOURCE-000009": "第",
+ "4001INVSOURCE-000010": "行:{需求库存组织:",
+ "4001INVSOURCE-000011": ",物料基本分类编码:",
+ "4001INVSOURCE-000012": "}与第",
+ "4001INVSOURCE-000013": "行数据重复,请修改后再保存。\n",
+ "4001INVSOURCE-000014": "保存成功",
+ "4001INVSOURCE-000015": "当前单据未保存,您确认离开此页面?",
+ "4001INVSOURCE-000016": "内部货源定义",
+ "4001INVSOURCE-000017": "成功导入",
+ "4001INVSOURCE-000018": "条数据!",
+ "4001INVSOURCE-000019": "操作",
+ "4001INVSOURCE-000020": "未查询出符合条件的数据",
+ "4001INVSOURCE-000021": "查询成功,共",
+ "4001INVSOURCE-000022": "条",
+ "4001INVSOURCE-000023": "导入数据不能为空"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001martrantype.json b/src/scmpub/public/lang/standard/simpchn/4001martrantype.json
new file mode 100644
index 0000000..bd4870a
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001martrantype.json
@@ -0,0 +1,22 @@
+{
+ "4001MARTRANTYPE-000000": "时间戳",
+ "4001MARTRANTYPE-000001": "主键",
+ "4001MARTRANTYPE-000002": "采购组织",
+ "4001MARTRANTYPE-000003": "删除成功!",
+ "4001MARTRANTYPE-000004": "确定要删除吗?",
+ "4001MARTRANTYPE-000005": "请选择数据!",
+ "4001MARTRANTYPE-000006": "注意",
+ "4001MARTRANTYPE-000007": "确定要删除所选数据吗?",
+ "4001MARTRANTYPE-000008": "保存成功!",
+ "4001MARTRANTYPE-000009": "表格不能为空!",
+ "4001MARTRANTYPE-000010": "当前单据未保存,您确认离开此页面?",
+ "4001MARTRANTYPE-000011": "确认删除",
+ "4001MARTRANTYPE-000012": "是否确认删除?",
+ "4001MARTRANTYPE-000013": "取消",
+ "4001MARTRANTYPE-000014": "确认取消",
+ "4001MARTRANTYPE-000015": "是否确认要取消?",
+ "4001MARTRANTYPE-000016": "物料订单类型设置",
+ "4001MARTRANTYPE-000017": "操作",
+ "4001MARTRANTYPE-000018": "刷新成功!",
+ "4001MARTRANTYPE-000019": "第{0}行[物料基本分类编码]与[物料编码]不能同时为空\n"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001packingtype.json b/src/scmpub/public/lang/standard/simpchn/4001packingtype.json
new file mode 100644
index 0000000..67fba5e
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001packingtype.json
@@ -0,0 +1,14 @@
+{
+ "4001PACKINGTYPE-000000": "取消",
+ "4001PACKINGTYPE-000001": "确定要取消吗?",
+ "4001PACKINGTYPE-000002": "刷新成功",
+ "4001PACKINGTYPE-000003": "请选择要删除的数据",
+ "4001PACKINGTYPE-000004": "删除",
+ "4001PACKINGTYPE-000005": "确定要删除所选数据吗?",
+ "4001PACKINGTYPE-000006": "删除成功!",
+ "4001PACKINGTYPE-000007": "请选择要打印的单据!",
+ "4001PACKINGTYPE-000008": "保存成功!",
+ "4001PACKINGTYPE-000009": "包装分类",
+ "4001PACKINGTYPE-000010": "操作",
+ "4001PACKINGTYPE-000011": "确定要删除吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001packtype.json b/src/scmpub/public/lang/standard/simpchn/4001packtype.json
new file mode 100644
index 0000000..ea1be54
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001packtype.json
@@ -0,0 +1,15 @@
+{
+ "4001PACKTYPE-000000": "取消",
+ "4001PACKTYPE-000001": "确定要取消吗?",
+ "4001PACKTYPE-000002": "刷新成功",
+ "4001PACKTYPE-000003": "请选择要删除的数据",
+ "4001PACKTYPE-000004": "删除",
+ "4001PACKTYPE-000005": "确定要删除所选数据吗?",
+ "4001PACKTYPE-000006": "删除成功!",
+ "4001PACKTYPE-000007": "请选择要打印的单据!",
+ "4001PACKTYPE-000008": "保存成功!",
+ "4001PACKTYPE-000009": "包装箱类型",
+ "4001PACKTYPE-000010": "公司",
+ "4001PACKTYPE-000011": "操作",
+ "4001PACKTYPE-000012": "确定要删除吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001prepaidinvoice.json b/src/scmpub/public/lang/standard/simpchn/4001prepaidinvoice.json
new file mode 100644
index 0000000..02d7057
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001prepaidinvoice.json
@@ -0,0 +1,41 @@
+{
+ "4006PREPAIDINVOICE-000000": "代垫运费发票",
+ "4006PREPAIDINVOICE-000001": "操作",
+ "4006PREPAIDINVOICE-000002": "取消",
+ "4006PREPAIDINVOICE-000003": "数据已经被删除,请返回列表界面!",
+ "4006PREPAIDINVOICE-000004": "确认修改",
+ "4006PREPAIDINVOICE-000005": "是否修改组织,这样会清空您录入的信息!",
+ "4006PREPAIDINVOICE-000006": "保存成功!",
+ "4006PREPAIDINVOICE-000007": "提交成功!",
+ "4006PREPAIDINVOICE-000008": "刷新成功!",
+ "4006PREPAIDINVOICE-000009": "删除成功!",
+ "4006PREPAIDINVOICE-000010": "当前单据未保存,您确认离开此页面?",
+ "4006PREPAIDINVOICE-000011": "代垫运费发票维护",
+ "4006PREPAIDINVOICE-000012": "请选择要删除的行!",
+ "4006PREPAIDINVOICE-000013": "收回成功!",
+ "4006PREPAIDINVOICE-000014": "整单关闭成功!",
+ "4006PREPAIDINVOICE-000015": "确定要删除吗?",
+ "4006PREPAIDINVOICE-000016": "删除",
+ "4006PREPAIDINVOICE-000017": "删除失败",
+ "4006PREPAIDINVOICE-000018": "请选择要操作的单据!",
+ "4006PREPAIDINVOICE-000019": "指派",
+ "4006PREPAIDINVOICE-000020": "整单打开成功!",
+ "4006PREPAIDINVOICE-000021": "提交",
+ "4006PREPAIDINVOICE-000022": "收回",
+ "4006PREPAIDINVOICE-000023": "整单关闭",
+ "4006PREPAIDINVOICE-000024": "整单打开",
+ "4006PREPAIDINVOICE-000025": "费用冲抵情况",
+ "4006PREPAIDINVOICE-000026": "选择销售订单",
+ "4006PREPAIDINVOICE-000027": "生成代垫发票",
+ "4006PREPAIDINVOICE-000028": "数量",
+ "4006PREPAIDINVOICE-000029": "选择客户费用申请单",
+ "4006PREPAIDINVOICE-000030": "价税合计",
+ "4006PREPAIDINVOICE-000031": "有未保存的单据,确定要返回吗?",
+ "4006PREPAIDINVOICE-000032": "提示",
+ "4006PREPAIDINVOICE-000033": "表体不能为空",
+ "4006PREPAIDINVOICE-000034": "返回",
+ "4006PREPAIDINVOICE-000035": "退出转单",
+ "4006PREPAIDINVOICE-000036": "有未保存的单据,确定要退出转单吗?",
+ "4006PREPAIDINVOICE-000037": "保存提交成功",
+ "4006PREPAIDINVOICE-000038": "选择运输单"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001promottype.json b/src/scmpub/public/lang/standard/simpchn/4001promottype.json
new file mode 100644
index 0000000..11f2ff0
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001promottype.json
@@ -0,0 +1,9 @@
+{
+ "4001PROMOTTYPE-000000": "刷新成功",
+ "4001PROMOTTYPE-000001": "请选择要删除的数据",
+ "4001PROMOTTYPE-000002": "删除成功!",
+ "4001PROMOTTYPE-000003": "保存成功!",
+ "4001PROMOTTYPE-000004": "促销类型定义",
+ "4001PROMOTTYPE-000005": "操作",
+ "4001PROMOTTYPE-000006": "确定要删除吗"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001pubmessage.json b/src/scmpub/public/lang/standard/simpchn/4001pubmessage.json
new file mode 100644
index 0000000..ecb90e5
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001pubmessage.json
@@ -0,0 +1,37 @@
+{
+ "4001PUBMESSAGE-000000": "展开",
+ "4001PUBMESSAGE-000001": "收起",
+ "4001PUBMESSAGE-000002": "我知道了",
+ "4001PUBMESSAGE-000003": "提示",
+ "4001PUBMESSAGE-000004": "处理成功",
+ "4001PUBMESSAGE-000005": "条!\n",
+ "4001PUBMESSAGE-000006": "处理失败",
+ "4001PUBMESSAGE-000007": "取消",
+ "4001PUBMESSAGE-000008": "确定要取消吗?",
+ "4001PUBMESSAGE-000009": "删除",
+ "4001PUBMESSAGE-000010": "确定要删除吗?",
+ "4001PUBMESSAGE-000011": "确定要删除所选数据吗?",
+ "4001PUBMESSAGE-000012": "确认修改",
+ "4001PUBMESSAGE-000013": "是否修改组织,这样会清空您录入的信息?",
+ "4001PUBMESSAGE-000014": "查询成功",
+ "4001PUBMESSAGE-000015": "查询成功,共{1}条",
+ "4001PUBMESSAGE-000016": "未查询出符合条件的数据",
+ "4001PUBMESSAGE-000017": "刷新成功",
+ "4001PUBMESSAGE-000018": "{0}成功",
+ "4001PUBMESSAGE-000019": "{0}失败",
+ "4001PUBMESSAGE-000020": "共处理{0}条,失败{1}条!",
+ "4001PUBMESSAGE-000021": "共处理{0}条,成功{1}条,失败{2}条!",
+ "4001PUBMESSAGE-000022": "处理成功{0}条!",
+ "4001PUBMESSAGE-000023": "保存成功",
+ "4001PUBMESSAGE-000024": "返回",
+ "4001PUBMESSAGE-000025": "有未保存的单据,确定要返回吗?",
+ "4001PUBMESSAGE-000026": "退出转单",
+ "4001PUBMESSAGE-000027": "有未保存的单据,确定要退出转单吗?",
+ "4001PUBMESSAGE-000028": "保存提交成功",
+ "4001PUBMESSAGE-000029": "影像管理模块未启用!",
+ "4001PUBMESSAGE-000030": "请选择数据!",
+ "4001PUBMESSAGE-000031": "启用",
+ "4001PUBMESSAGE-000032": "确定要启用所选数据吗?",
+ "4001PUBMESSAGE-000033": "停用",
+ "4001PUBMESSAGE-000034": "确定要停用所选数据吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001resumeexception.json b/src/scmpub/public/lang/standard/simpchn/4001resumeexception.json
new file mode 100644
index 0000000..7b4e607
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001resumeexception.json
@@ -0,0 +1,4 @@
+{
+ "4001RESUMEEXCEPTION-000000": "确定",
+ "4001RESUMEEXCEPTION-000001": "取消"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001route.json b/src/scmpub/public/lang/standard/simpchn/4001route.json
new file mode 100644
index 0000000..655ce3c
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001route.json
@@ -0,0 +1,53 @@
+{
+ "4001ROUTE-000001": "当前单据未保存,您确认离开此页面?",
+ "4001ROUTE-000002": "运输路线定义-物流组织",
+ "4001ROUTE-000003": "确定要删除该信息吗?",
+ "4001ROUTE-000004": "查询成功,共",
+ "4001ROUTE-000005": "条",
+ "4001ROUTE-000006": "未查询出符合条件的数据",
+ "4001ROUTE-000007": "请选择要操作的单据!",
+ "4001ROUTE-000008": "删除成功!",
+ "4001ROUTE-000009": "请选择要删除的行!",
+ "4001ROUTE-000010": "请选择要打印的数据!",
+ "4001ROUTE-000011": "请选择要输出的数据!",
+ "4001ROUTE-000012": "表体不能为空,至少设置两行!",
+ "4001ROUTE-000013": "运输路线定义-物流组织",
+ "4001ROUTE-000014": "刷新成功!",
+ "4001ROUTE-000015": "保存成功!",
+ "4001ROUTE-000016": "复制成功!",
+ "4001ROUTE-000017": "启用成功!",
+ "4001ROUTE-000018": "停用成功!",
+ "4001ROUTE-000019": "运输路线定义-集团",
+ "4001ROUTE-000020": "线路中已经存在相同站点,请修改!",
+ "4001ROUTE-000021": "第",
+ "4001ROUTE-000022": "行的间距不能小于等于0!",
+ "4001ROUTE-000023": "行的里程不能小于等于0!",
+ "4001ROUTE-000024": "行的里程不能小于等于第",
+ "4001ROUTE-000025": "行的里程!",
+ "4001ROUTE-000026": "删除表体行提示",
+ "4001ROUTE-000027": "确定删除起始站点?",
+ "4001ROUTE-000028": "操作",
+ "4001ROUTE-000029": "确认修改",
+ "4001ROUTE-000030": "是否修改组织,这样会清空您录入的信息?",
+ "4001ROUTE-000031": "组织节点不能删除集团数据!",
+ "4001ROUTE-000032": "数据已经被删除,请返回列表界面!",
+ "4001ROUTE-000033": "上传文件大小需小于或等于{0}M!",
+ "4001ROUTE-000035": "请选择要删除的单据行!",
+ "4001ROUTE-000036": "行的里程不能大于等于第",
+ "4001ROUTE-000037": "停用",
+ "4001ROUTE-000038": "停用所选数据?",
+ "4001ROUTE-000039": "启用",
+ "4001ROUTE-000040": "启用所选数据?",
+ "4001ROUTE-000041": "确定要删除吗?",
+ "4001ROUTE-000042": "取消",
+ "4001ROUTE-000043": "确定要取消吗?",
+ "4001ROUTE-000044": "显示停用",
+ "4001ROUTE-000045": "物流组织必选项未选!",
+ "4001ROUTE-000046": "确定要复制吗?",
+ "4001ROUTE-000047": "已启用",
+ "4001ROUTE-000048": "已停用",
+ "4001ROUTE-000049": "物流组织",
+ "4001ROUTE-000050": "组织节点不能操作集团数据!",
+ "4001ROUTE-000051": "确定要启用吗?",
+ "4001ROUTE-000052": "确定要停用吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001smartoutalert.json b/src/scmpub/public/lang/standard/simpchn/4001smartoutalert.json
new file mode 100644
index 0000000..ac0984c
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001smartoutalert.json
@@ -0,0 +1,20 @@
+{
+ "4001SMART-OUTALERT-000001": "暂无数据",
+ "4001SMART-OUTALERT-000002": "预警设置",
+ "4001SMART-OUTALERT-000003": "逾期未出库",
+ "4001SMART-OUTALERT-000004": "【计划发货日期 - 当前系统日期】< 0 为逾期未出库",
+ "4001SMART-OUTALERT-000005": "临期未出库",
+ "4001SMART-OUTALERT-000006": "【计划发货日期 - 当前系统日期】",
+ "4001SMART-OUTALERT-000007": "发货时间",
+ "4001SMART-OUTALERT-000008": "已逾期 X 天,",
+ "4001SMART-OUTALERT-000009": "临期 X 天,",
+ "4001SMART-OUTALERT-000010": "请及时发货!",
+ "4001SMART-OUTALERT-000011": "规格/型号:",
+ "4001SMART-OUTALERT-000012": "计划发货日期:",
+ "4001SMART-OUTALERT-000013": "预警数量:",
+ "4001SMART-OUTALERT-000014": "预警金额:",
+ "4001SMART-OUTALERT-000015": "出库进度",
+ "4001SMART-OUTALERT-000016": "预警天数不能为负",
+ "4001SMART-OUTALERT-000017": "预警天数不能大于 10000",
+ "4001SMART-OUTALERT-000018": "预警天数不能为空"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001smartprovider.json b/src/scmpub/public/lang/standard/simpchn/4001smartprovider.json
new file mode 100644
index 0000000..d61baf9
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001smartprovider.json
@@ -0,0 +1,29 @@
+{
+ "4001SMARTPROVIDER-000000": "模板编码",
+ "4001SMARTPROVIDER-000001": "报表实现类名",
+ "4001SMARTPROVIDER-000002": "验证",
+ "4001SMARTPROVIDER-000003": "确定",
+ "4001SMARTPROVIDER-000004": "逻辑型",
+ "4001SMARTPROVIDER-000005": "字节型",
+ "4001SMARTPROVIDER-000006": "数值型",
+ "4001SMARTPROVIDER-000007": "字节型数组",
+ "4001SMARTPROVIDER-000008": "日期型",
+ "4001SMARTPROVIDER-000009": "浮点双精度",
+ "4001SMARTPROVIDER-000010": "浮点单精度",
+ "4001SMARTPROVIDER-000011": "整型",
+ "4001SMARTPROVIDER-000012": "长整型",
+ "4001SMARTPROVIDER-000013": "空类型",
+ "4001SMARTPROVIDER-000014": "对象类型",
+ "4001SMARTPROVIDER-000015": "短整型",
+ "4001SMARTPROVIDER-000016": "时间型",
+ "4001SMARTPROVIDER-000017": "字符串型",
+ "4001SMARTPROVIDER-000018": "时间戳",
+ "4001SMARTPROVIDER-000019": "模板配置",
+ "4001SMARTPROVIDER-000020": "元数据",
+ "4001SMARTPROVIDER-000021": "取消",
+ "4001SMARTPROVIDER-000022": "字段编码",
+ "4001SMARTPROVIDER-000023": "字段名称",
+ "4001SMARTPROVIDER-000024": "数据类型",
+ "4001SMARTPROVIDER-000025": "位数",
+ "4001SMARTPROVIDER-000026": "精度"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001splitprinting.json b/src/scmpub/public/lang/standard/simpchn/4001splitprinting.json
new file mode 100644
index 0000000..7b085bd
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001splitprinting.json
@@ -0,0 +1,12 @@
+{
+ "4001SPLITPRINTING-000000": "分单处理",
+ "4001SPLITPRINTING-000001": "确定",
+ "4001SPLITPRINTING-000002": "取消",
+ "4001SPLITPRINTING-000003": "分单打印依据模板",
+ "4001SPLITPRINTING-000004": "数据项key",
+ "4001SPLITPRINTING-000005": "类型",
+ "4001SPLITPRINTING-000006": "数据项",
+ "4001SPLITPRINTING-000007": "时距取值",
+ "4001SPLITPRINTING-000008": "是否作为分单依据",
+ "4001SPLITPRINTING-000009": "是否表头"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001target.json b/src/scmpub/public/lang/standard/simpchn/4001target.json
new file mode 100644
index 0000000..be43ecc
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001target.json
@@ -0,0 +1,37 @@
+{
+ "4001TARGET-000000": "提示",
+ "4001TARGET-000001": "注意",
+ "4001TARGET-000002": "确定要删除吗?",
+ "4001TARGET-000003": "操作",
+ "4001TARGET-000004": "删除成功!",
+ "4001TARGET-000005": "请选择需要删除的数据!",
+ "4001TARGET-000006": "删除失败!",
+ "4001TARGET-000007": "当前单据未保存,您确认离开此页面?",
+ "4001TARGET-000008": "确认修改",
+ "4001TARGET-000009": "是否修改组织,这样会清空您录入的信息?",
+ "4001TARGET-000010": "同一指标表内指标项名称不能重复",
+ "4001TARGET-000011": "必须先录入关联年指标项,才能录入对应各期间的比例值",
+ "4001TARGET-000012": "销售指标表已维护销售指标或者已被销售返利政策引用后,不可以修改销售组织范围",
+ "4001TARGET-000013": "指标项已维护,不允许编辑",
+ "4001TARGET-000014": "此指标表已经被引用,当前物料维度行不允许编辑",
+ "4001TARGET-000015": "此指标表已经被引用,当前指标项类别不允许编辑",
+ "4001TARGET-000016": "年指标",
+ "4001TARGET-000017": "半年指标",
+ "4001TARGET-000018": "季指标",
+ "4001TARGET-000019": "月指标",
+ "4001TARGET-000020": "已经维护期间指标项,不允许修改",
+ "4001TARGET-000021": "物料维度已经维护了行记录,请删除行记录再修改",
+ "4001TARGET-000022": "销售指标表已维护关联指标项比例,年度不可改",
+ "4001TARGET-000023": "销售指标表已被销售指标维护或者已被销售返利政策引用,年度不可改",
+ "4001TARGET-000024": "销售指标表已被销售指标维护或者已被销售返利政策引用,指标维护方式不可改",
+ "4001TARGET-000025": "销售指标表已被销售指标维护或者已被销售指标调整引用,指标维护表头设置不可改",
+ "4001TARGET-000026": "删除成功",
+ "4001TARGET-000027": "年指标:",
+ "4001TARGET-000028": "已经被关联不允许删除",
+ "4001TARGET-000029": "请选择要删除的单据行",
+ "4001TARGET-000030": "基本信息",
+ "4001TARGET-000031": "物料维度",
+ "4001TARGET-000032": "指标项",
+ "4001TARGET-000033": "确定要删除吗?",
+ "4001TARGET-000034": "开始日期、结束日期不能为空"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001targetadj.json b/src/scmpub/public/lang/standard/simpchn/4001targetadj.json
new file mode 100644
index 0000000..1d58b54
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001targetadj.json
@@ -0,0 +1,79 @@
+{
+ "4001TARGETADJ-000000": "输入值必须为(0,∞]或者(0,∞]/(0,∞]",
+ "4001TARGETADJ-000001": "清空组织会清空您录入的信息!",
+ "4001TARGETADJ-000002": "是否修改组织,这样会清空您录入的信息?",
+ "4001TARGETADJ-000003": "提示",
+ "4001TARGETADJ-000004": "有未处理完的单据,是否退出转单",
+ "4001TARGETADJ-000005": "有未处理完的单据,是否退出转单?",
+ "4001TARGETADJ-000006": "确定要取消吗?",
+ "4001TARGETADJ-000007": "取消成功",
+ "4001TARGETADJ-000008": "操作成功!",
+ "4001TARGETADJ-000009": "行关闭失败!",
+ "4001TARGETADJ-000010": "请选择需要操作的数据!",
+ "4001TARGETADJ-000011": "行关闭成功!",
+ "4001TARGETADJ-000012": "合并显示",
+ "4001TARGETADJ-000013": "请购单合并显示: ",
+ "4001TARGETADJ-000014": "确定要删除所选数据吗?",
+ "4001TARGETADJ-000015": "删除成功!",
+ "4001TARGETADJ-000016": "第",
+ "4001TARGETADJ-000017": "行来源于资产配置申请, 不能删除\n",
+ "4001TARGETADJ-000018": "行已经关闭\n",
+ "4001TARGETADJ-000019": "行已经有后续单据\n",
+ "4001TARGETADJ-000020": "行打开失败!",
+ "4001TARGETADJ-000021": "表体为空",
+ "4001TARGETADJ-000022": "是否继续保存?",
+ "4001TARGETADJ-000023": "当前单据未保存,您确定离开此页面?",
+ "4001TARGETADJ-000024": "请购单",
+ "4001TARGETADJ-000025": "指派",
+ "4001TARGETADJ-000026": "删除",
+ "4001TARGETADJ-000027": "是否确定删除?",
+ "4001TARGETADJ-000028": "操作",
+ "4001TARGETADJ-000029": "提交成功",
+ "4001TARGETADJ-000030": "请选择需要提交的数据!",
+ "4001TARGETADJ-000031": "设置页签数量的默认值",
+ "4001TARGETADJ-000032": "请选择需要删除的数据!",
+ "4001TARGETADJ-000033": "请选择要输出的订单!",
+ "4001TARGETADJ-000034": "请选择要打印的订单!",
+ "4001TARGETADJ-000035": "请选择需要收回的数据!",
+ "4001TARGETADJ-000036": "注意",
+ "4001TARGETADJ-000037": "确定要删除吗?",
+ "4001TARGETADJ-000038": "待提交",
+ "4001TARGETADJ-000039": "审批中",
+ "4001TARGETADJ-000040": "执行中",
+ "4001TARGETADJ-000041": "全部",
+ "4001TARGETADJ-000042": "首页",
+ "4001TARGETADJ-000043": "请购单管理",
+ "4001TARGETADJ-000044": "物资需求申请",
+ "4001TARGETADJ-000045": "查询结果为空",
+ "4001TARGETADJ-000046": "生成请购单",
+ "4001TARGETADJ-000047": "选择物资需求申请单",
+ "4001TARGETADJ-000048": "提交失败!",
+ "4001TARGETADJ-000049": "保存成功!",
+ "4001TARGETADJ-000050": "收回成功",
+ "4001TARGETADJ-000051": "刷新成功",
+ "4001TARGETADJ-000052": "查询成功!",
+ "4001TARGETADJ-000053": "整单打开成功!",
+ "4001TARGETADJ-000054": "整单关闭成功!",
+ "4001TARGETADJ-000055": "行打开成功!",
+ "4001TARGETADJ-000056": "提交",
+ "4001TARGETADJ-000057": "删除",
+ "4001TARGETADJ-000058": "收回",
+ "4001TARGETADJ-000059": "保存提交成功!",
+ "4001TARGETADJ-000060": "确认修改",
+ "4001TARGETADJ-000061": "取消",
+ "4001TARGETADJ-000062": "刷新失败!",
+ "4001TARGETADJ-000063": "删除失败!",
+ "4001TARGETADJ-000064": "直运和委外互斥,不能同时选择。",
+ "4001TARGETADJ-000065": "价格论证表",
+ "4001TARGETADJ-000066": "报价日期",
+ "4001TARGETADJ-000067": "打印",
+ "4001TARGETADJ-000068": "收回失败!",
+ "4001TARGETADJ-000069": "是否修改指标表,这样会清空您录入的信息?",
+ "4001TARGETADJ-000070": "您确定要修改期间吗?修改会保存界面数据请确认?",
+ "4001TARGETADJ-000071": "您确定要修改物料维度吗?修改会保存界面数据请确认?",
+ "4001TARGETADJ-000072": "期间",
+ "4001TARGETADJ-000073": "物料维度",
+ "4001TARGETADJ-000074": "客户 ",
+ "4001TARGETADJ-000075": "各期间指标值之和不等于年指标值,是否保存?",
+ "4001TARGETADJ-000076": "单据日期不能为空"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001targetbill.json b/src/scmpub/public/lang/standard/simpchn/4001targetbill.json
new file mode 100644
index 0000000..5f626ad
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001targetbill.json
@@ -0,0 +1,22 @@
+{
+ "4001TARGETBILL-000004": "确认修改",
+ "4001TARGETBILL-000005": "是否修改组织,这样会清空您录入的信息?",
+ "4001TARGETBILL-000006": "操作",
+ "4001TARGETBILL-000007": "是否修改指标表,这样会清空您录入的信息?",
+ "4001TARGETBILL-000008": "您确定要修改期间吗?修改会保存界面数据请确认?",
+ "4001TARGETBILL-000009": "您确定要修改物料维度吗?修改会保存界面数据请确认?",
+ "4001TARGETBILL-000010": "确认修改",
+ "4001TARGETBILL-000011": "表体行不能为空!",
+ "4001TARGETBILL-000012": "保存成功!",
+ "4001TARGETBILL-000013": "操作",
+ "4001TARGETBILL-000014": "销售指标维护导出",
+ "4001TARGETBILL-000015": "销售组织",
+ "4001TARGETBILL-000016": "销售指标表",
+ "4001TARGETBILL-000017": "物料维度",
+ "4001TARGETBILL-000018": "期间",
+ "4001TARGETBILL-000019": "请先初始化界面之后再导入数据!",
+ "4001TARGETBILL-000020": "操作",
+ "4001TARGETBILL-000023": "客户 ",
+ "4001TARGETBILL-000024": "各期间指标值之和不等于年指标值,是否保存?",
+ "4001TARGETBILL-000025": "请选择要删除的行!"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001tempsave.json b/src/scmpub/public/lang/standard/simpchn/4001tempsave.json
new file mode 100644
index 0000000..9d2f2a4
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001tempsave.json
@@ -0,0 +1,10 @@
+{
+ "4001TEMPSAVE-000000": "序号",
+ "4001TEMPSAVE-000001": "标题",
+ "4001TEMPSAVE-000002": "操作",
+ "4001TEMPSAVE-000003": "草稿列表",
+ "4001TEMPSAVE-000004": "打开",
+ "4001TEMPSAVE-000005": "删除",
+ "4001TEMPSAVE-000006": "暂存成功!",
+ "4001TEMPSAVE-000007": "删除成功!"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001vehicle.json b/src/scmpub/public/lang/standard/simpchn/4001vehicle.json
new file mode 100644
index 0000000..6ebe28a
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001vehicle.json
@@ -0,0 +1,25 @@
+{
+ "4001VEHICLE--000001": "请先选择组织",
+ "4001VEHICLE-000000": "取消",
+ "4001VEHICLE-000001": "确定要取消吗?",
+ "4001VEHICLE-000002": "组织节点不能删除集团级节点数据",
+ "4001VEHICLE-000003": "删除",
+ "4001VEHICLE-000004": "确定要删除吗?",
+ "4001VEHICLE-000005": "删除成功!",
+ "4001VEHICLE-000006": "请选择要打印的单据!",
+ "4001VEHICLE-000007": "刷新成功!",
+ "4001VEHICLE-000008": "组织节点不能删除集团级节点数据",
+ "4001VEHICLE-000009": "保存成功!",
+ "4001VEHICLE-000010": "组织节点不启用集团数据",
+ "4001VEHICLE-000011": "启用",
+ "4001VEHICLE-000012": "确定要启用吗?",
+ "4001VEHICLE-000013": "启用成功!",
+ "4001VEHICLE-000014": "组织节点不停用集团数据",
+ "4001VEHICLE-000015": "停用",
+ "4001VEHICLE-000016": "确定要停用吗?",
+ "4001VEHICLE-000017": "停用成功!",
+ "4001VEHICLE-000018": "当前单据未保存,您确认离开此页面?",
+ "4001VEHICLE-000019": "物流组织",
+ "4001VEHICLE-000020": "确认要删除该信息吗?",
+ "4001VEHICLE-000021": "操作"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001vehicletype.json b/src/scmpub/public/lang/standard/simpchn/4001vehicletype.json
new file mode 100644
index 0000000..950f635
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001vehicletype.json
@@ -0,0 +1,28 @@
+{
+ "4001VEHICLETYPE--000001": "取消",
+ "4001VEHICLETYPE-000000": "确定要取消吗?",
+ "4001VEHICLETYPE-000001": "编码:",
+ "4001VEHICLETYPE-000002": " 名称:",
+ "4001VEHICLETYPE-000003": " 原因:组织节点不能删除集团数据; \r",
+ "4001VEHICLETYPE-000004": "以下档案不能删除:",
+ "4001VEHICLETYPE-000005": "删除",
+ "4001VEHICLETYPE-000006": "确定要删除吗?",
+ "4001VEHICLETYPE-000007": "删除成功!",
+ "4001VEHICLETYPE-000008": "请选择要打印的单据!",
+ "4001VEHICLETYPE-000009": "刷新成功!",
+ "4001VEHICLETYPE-000010": "保存成功!",
+ "4001VEHICLETYPE-000011": "组织节点不启用集团数据",
+ "4001VEHICLETYPE-000012": "启用",
+ "4001VEHICLETYPE-000013": "确定要启用吗?",
+ "4001VEHICLETYPE-000014": "启用成功!",
+ "4001VEHICLETYPE-000015": "组织节点不停用集团数据",
+ "4001VEHICLETYPE-000016": "停用",
+ "4001VEHICLETYPE-000017": "确定要停用吗?",
+ "4001VEHICLETYPE-000018": "停用成功!",
+ "4001VEHICLETYPE-000019": "当前单据未保存,您确认离开此页面?",
+ "4001VEHICLETYPE-000020": "物流组织",
+ "4001VEHICLETYPE-000021": "确认要删除该信息吗?",
+ "4001VEHICLETYPE-000022": "操作",
+ "4001VEHICLETYPE-000023": "确定要启用吗?",
+ "4001VEHICLETYPE-000024": "确定要停用吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/4001wholepack.json b/src/scmpub/public/lang/standard/simpchn/4001wholepack.json
new file mode 100644
index 0000000..c807433
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/4001wholepack.json
@@ -0,0 +1,15 @@
+{
+ "4001WHOLEPACK-000000": "取消",
+ "4001WHOLEPACK-000001": "确定要取消吗?",
+ "4001WHOLEPACK-000002": "刷新成功",
+ "4001WHOLEPACK-000003": "请选择要删除的数据",
+ "4001WHOLEPACK-000004": "删除",
+ "4001WHOLEPACK-000005": "确定要删除所选数据吗?",
+ "4001WHOLEPACK-000006": "删除成功!",
+ "4001WHOLEPACK-000007": "请选择要打印的单据!",
+ "4001WHOLEPACK-000008": "保存成功!",
+ "4001WHOLEPACK-000009": "整箱定义",
+ "4001WHOLEPACK-000010": "公司",
+ "4001WHOLEPACK-000011": "操作",
+ "4001WHOLEPACK-000012": "确定要删除吗?"
+}
diff --git a/src/scmpub/public/lang/standard/simpchn/refer.json b/src/scmpub/public/lang/standard/simpchn/refer.json
new file mode 100644
index 0000000..f6758f8
--- /dev/null
+++ b/src/scmpub/public/lang/standard/simpchn/refer.json
@@ -0,0 +1,77 @@
+{
+ "REFER-000000": "退货理由设置",
+ "REFER-000001": "编码",
+ "REFER-000002": "名称",
+ "REFER-000003": "失效日期",
+ "REFER-000004": "备注",
+ "REFER-000005": "批次档案",
+ "REFER-000006": "批次参照",
+ "REFER-000007": "物料名称",
+ "REFER-000008": "批次号",
+ "REFER-000009": "物料参照",
+ "REFER-000010": "物料基本分类",
+ "REFER-000011": "业务单元",
+ "REFER-000012": "所属组织",
+ "REFER-000013": "物料编码",
+ "REFER-000014": "规格",
+ "REFER-000015": "型号",
+ "REFER-000016": "物料简称",
+ "REFER-000017": "助记码",
+ "REFER-000018": "图号",
+ "REFER-000019": "主计量单位",
+ "REFER-000020": "承运商定义",
+ "REFER-000021": "承运商编码",
+ "REFER-000022": "承运商名称",
+ "REFER-000023": "承运商档案",
+ "REFER-000024": "承运商参照",
+ "REFER-000025": "物流组织",
+ "REFER-000026": "处理方式",
+ "REFER-000027": "处理方式编码",
+ "REFER-000028": "处理方式名称",
+ "REFER-000029": "司机定义",
+ "REFER-000030": "司机定义编码",
+ "REFER-000031": "司机定义名称",
+ "REFER-000032": "计量器具",
+ "REFER-000033": "计量秤编码",
+ "REFER-000034": "计量秤名称",
+ "REFER-000035": "组号",
+ "REFER-000036": "包装箱类型",
+ "REFER-000037": "包装箱类型编码",
+ "REFER-000038": "包装箱类型名称",
+ "REFER-000039": "促销类型",
+ "REFER-000040": "促销类型编码",
+ "REFER-000041": "促销类型名称",
+ "REFER-000042": "运输路线档案",
+ "REFER-000043": "运输路线参照",
+ "REFER-000044": "运输路线编码",
+ "REFER-000045": "运输路线名称",
+ "REFER-000046": "车辆定义",
+ "REFER-000047": "车辆定义编码",
+ "REFER-000048": "车辆定义名称",
+ "REFER-000049": "车型定义",
+ "REFER-000050": "车型定义编码",
+ "REFER-000051": "车型定义名称",
+ "REFER-000055": "包装分类",
+ "REFER-000056": "包装分类编码",
+ "REFER-000057": "包装分类名称",
+ "REFER-000058": "销售指标表",
+ "REFER-000059": "指标表编码",
+ "REFER-000060": "指标表名称",
+ "REFER-000061": "指标周期列表",
+ "REFER-000062": "指标日期",
+ "REFER-000063": "开始日期",
+ "REFER-000064": "结束日期",
+ "REFER-000065": "指标项",
+ "REFER-000066": "指标项名称",
+ "REFER-000067": "指标项类别",
+ "REFER-000068": "物料范围",
+ "REFER-000069": "行号",
+ "REFER-000070": "产品线",
+ "REFER-000071": "品牌",
+ "REFER-000072": "返利值排除物料组合",
+ "REFER-000073": "物料维度",
+ "REFER-000074": "物料组合",
+ "REFER-000075": "物料基本分类",
+ "REFER-000076": "物料销售分类",
+ "REFER-000077": "物料"
+}
diff --git a/src/scmpub/scmpub/components/TempSave/btnClicks/delete_BtnClick.js b/src/scmpub/scmpub/components/TempSave/btnClicks/delete_BtnClick.js
new file mode 100644
index 0000000..096ef75
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/btnClicks/delete_BtnClick.js
@@ -0,0 +1,34 @@
+/*09MFRu7iSOlVV+xuGkFYf0ko7xBwvsQejki+WC3G+Ak=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 页面功能描述
+ * @Date: 2019-03-30 16:05:25
+ * @Last Modified by: songyt13
+ * @Last Modified time: 2021-10-20 09:38:10
+ */
+import { URL } from '../const';
+import { showSuccessInfo } from '../../../pub/tool/messageUtil';
+import { ajax } from 'nc-lightapp-front';
+import { getLangByResId } from '../../../pub/tool/multiLangUtil';
+
+export default function open_BtnClick(props, record, index) {
+ let pk = this.state.tempDataList.rows[index].values.ctempsaveid.value;
+
+ ajax({
+ url: URL.DELETETEMPORARY,
+ data: [ pk ],
+ success: () => {
+ let tempSaveData = this.state.tempDataList;
+ tempSaveData.rows.splice(index, 1);
+ let list = this.state.summary;
+ list.splice(index, 1);
+ this.setState({
+ summary: list,
+ tempDataList: tempSaveData
+ });
+ showSuccessInfo(getLangByResId(this, '4001TEMPSAVE-000007'));
+ }
+ });
+}
+
+/*09MFRu7iSOlVV+xuGkFYf0ko7xBwvsQejki+WC3G+Ak=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/components/TempSave/btnClicks/open_BtnClick.js b/src/scmpub/scmpub/components/TempSave/btnClicks/open_BtnClick.js
new file mode 100644
index 0000000..1d60bb6
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/btnClicks/open_BtnClick.js
@@ -0,0 +1,18 @@
+/*tYnMVd9p7Xg2uKAziFweojre5Q4oo1PT2ASjZwNawu4=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 页面功能描述
+ * @Date: 2019-03-30 16:05:25
+ * @Last Modified by: wangceb
+ * @Last Modified time: 2019-04-08 15:23:16
+ */
+
+export default function open_BtnClick(props, record, index) {
+ let addcallback = this.props.clickTemporary;
+ if (addcallback) {
+ addcallback(this.props.parentProps, this.state.tempDataList.rows[index].values.data.value);
+ }
+ this.props.close();
+}
+
+/*tYnMVd9p7Xg2uKAziFweojre5Q4oo1PT2ASjZwNawu4=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/components/TempSave/btnClicks/operate_buttonClick.js b/src/scmpub/scmpub/components/TempSave/btnClicks/operate_buttonClick.js
new file mode 100644
index 0000000..3734e06
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/btnClicks/operate_buttonClick.js
@@ -0,0 +1,26 @@
+/*hrRCxviCXQlX5elGj1DAZ0Spf1mrlsFZ21KPh9gZ0cw=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 销售订单卡片操作列按钮事件
+ * @Date: 2018-04-19 10:34:04
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2021-01-13 13:16:42
+ */
+
+import delete_BtnClick from './delete_BtnClick';
+import open_BtnClick from './open_BtnClick';
+
+export default function buttonClick(props, id, text, record, index) {
+ switch (id) {
+ // Open 打开
+ case 'Open':
+ return open_BtnClick.bind(this)(props, record, index);
+ // Delete 删除
+ case 'Delete':
+ return delete_BtnClick.bind(this)(props, record, index);
+ default:
+ break;
+ }
+}
+
+/*hrRCxviCXQlX5elGj1DAZ0Spf1mrlsFZ21KPh9gZ0cw=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/components/TempSave/btnClicks/save_btnClicks.js b/src/scmpub/scmpub/components/TempSave/btnClicks/save_btnClicks.js
new file mode 100644
index 0000000..ebc0cd0
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/btnClicks/save_btnClicks.js
@@ -0,0 +1,130 @@
+/*BwOaGW3KVsm6Q9PtwiOIkExJ0FYjZ4iKdaX0y1XGcrU=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 供应链暂存功能
+ * @Date: 2019-03-19 15:01:25
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2023-03-29 12:25:01
+ */
+import { URL } from '../const';
+import { showSuccessInfo } from '../../../pub/tool/messageUtil';
+import { ajax, getMultiLang } from 'nc-lightapp-front';
+
+class LangContainer {
+ constructor() {
+ this.lang = null;
+ this.inlt = null;
+ // 初始化提示多语信息
+ getMultiLang({
+ moduleId: '4001tempsave',
+ domainName: 'scmpub',
+ callback: this.init.bind(this),
+ needInlt: true
+ });
+ }
+
+ init(lang, status, inlt) {
+ if (status) {
+ this.lang = lang;
+ this.inlt = inlt;
+ }
+ }
+
+ getLangByResId(resid, param) {
+ let str = resid;
+ if (param) {
+ str = this.inlt.get(resid, param);
+ return str ? str : resid;
+ } else {
+ // 如果还没有加载回来,则返回空,避免页面显示多语字符串
+ if (this.lang) {
+ str = this.lang[resid];
+ return str ? str : resid;
+ } else {
+ return resid;
+ }
+ }
+ }
+}
+
+/**
+ * 实例化多语容器
+ */
+const lang = new LangContainer();
+
+export default function save_btnClicks(props, config, checkFunction) {
+ // 是否校验
+ if (checkFunction && Object.prototype.toString.call(checkFunction).indexOf('Function') != -1) {
+ // 校验通过执行暂存
+ if (checkFunction.call(this)) {
+ doAction.call(this, props, config);
+ }
+ } else {
+ // 不校验 执行暂存
+ doAction.call(this, props, config);
+ }
+}
+
+function doAction(props, config) {
+ let bill = null;
+ // NCC-293958 重新组装config,默认过滤空行 modify by guozhq
+ config = {
+ filterDelRows: true,
+ ...config
+ };
+ if (config.param) {
+ props.cardTable.filterEmptyRows(config.area, [ config.param ], 'include');
+ }
+ if (config.type === 'card') {
+ if (config.tableId instanceof Array) {
+ bill = props.createExtCardDataSimple(config.pagecode, config.formId, config.tableId);
+ if (config.filterDelRows) {
+ for (let index = 0; index < config.tableId.length; index++) {
+ let tableArea = config.tableId[index];
+ if (bill.bodys[tableArea] && bill.bodys[tableArea].rows) {
+ let newRows = [];
+ bill.bodys[tableArea].rows.forEach((row) => {
+ if (row.status != '3') {
+ newRows.push(row);
+ }
+ });
+ bill.bodys[tableArea].rows = newRows;
+ }
+ }
+ }
+ } else {
+ bill = props.createMasterChildDataSimple(config.pagecode, config.formId, config.tableId);
+ if (config.filterDelRows) {
+ if (bill.body[config.tableId] && bill.body[config.tableId].rows) {
+ let newRows = [];
+ bill.body[config.tableId].rows.forEach((row) => {
+ if (row.status != '3') {
+ newRows.push(row);
+ }
+ });
+ bill.body[config.tableId].rows = newRows;
+ }
+ }
+ }
+ }
+ ajax({
+ url: URL.SAVE,
+ data: bill,
+ success: (res) => {
+ if (res.success) {
+ if (res.data && config.type === 'card') {
+ let pk = {
+ [res.data[0]]: {
+ display: res.data[1],
+ value: res.data[1]
+ }
+ };
+ this.props.form.setFormItemsValue(config.formId, pk);
+ }
+ showSuccessInfo(lang.getLangByResId('4001TEMPSAVE-000006'));
+ }
+ }
+ });
+}
+
+/*BwOaGW3KVsm6Q9PtwiOIkExJ0FYjZ4iKdaX0y1XGcrU=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/components/TempSave/const.js b/src/scmpub/scmpub/components/TempSave/const.js
new file mode 100644
index 0000000..323a5af
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/const.js
@@ -0,0 +1,12 @@
+/*D3odMZWVuLtxYck7qMUaMgmVOyvcchnTDZ2EVgk+abY=*/
+export const URL = {
+ SAVE: '/nccloud/scmpub/tempsave/save.do',
+ QUERYTEMPORARY: '/nccloud/scmpub/tempsave/querytemporary.do',
+ DELETETEMPORARY: '/nccloud/scmpub/tempsave/delete.do'
+};
+
+export const TEMPSAVE_CONST = {
+ TABLEID: 'tempsavetable'
+};
+
+/*D3odMZWVuLtxYck7qMUaMgmVOyvcchnTDZ2EVgk+abY=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/components/TempSave/index.js b/src/scmpub/scmpub/components/TempSave/index.js
new file mode 100644
index 0000000..aae01c7
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/index.js
@@ -0,0 +1,188 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 暂存提供的服务
+ * @Date: 2019-03-19 15:10:00
+ * @Last Modified by: mikey.zhaopeng
+ * @Last Modified time: 2023-09-22 15:39:00
+ */
+import save_btnClicks from './btnClicks/save_btnClicks';
+import operate_buttonClick from './btnClicks/operate_buttonClick';
+import { base, formatDatetime } from 'nc-lightapp-front';
+import React, { Component } from 'react';
+import initTemplet from './init/initTemplet';
+import { initLang, getLangByResId } from '../../pub/tool/multiLangUtil';
+import './index.less';
+const { NCModal, NCTable, NCTooltip } = base;
+const ACTIONS = { SAVE: save_btnClicks };
+
+class TempDataList extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ tempDataList: {},
+ summary: []
+ };
+ this.columns = [];
+ this.isCheck = false;
+ this.init();
+ initTemplet.call(this, this.props, true);
+ }
+
+ init = () => {
+ initLang(this, [ '4001tempsave' ], 'scmpub', this.initColumns);
+ };
+
+ initColumns = () => {
+ this.columns = [
+ {
+ title: {getLangByResId(this, '4001TEMPSAVE-000000')}, // 序号
+ dataIndex: 'index',
+ key: 'index',
+ width: '10%',
+ render: (text, record, index) => {
+ return {index + 1};
+ }
+ },
+ {
+ title: {getLangByResId(this, '4001TEMPSAVE-000001')}, // 标题
+ dataIndex: 'title',
+ key: 'title',
+ width: '70%',
+ render: (text, record) => {
+ let { title } = record;
+ // // summaryH 数据处理数据格式
+ // if (title.summaryH && title.summaryH.length > 0) {
+ // title.summaryH.map((item, index) => {
+ // if (item.indexOf('-') > 0 && item.indexOf(':') > 0 && item.indexOf(' ') > 0) {
+ // // 日期处理数据格式
+ // return (title.summaryH[index] = formatDatetime(item, true));
+ // } else if (typeof (item * 1) == 'number') {
+ // // 数字处理数字格式
+ // return (title.summaryH[index] = formatNumber(item, true));
+ // }
+ // });
+ // }
+ // // summaryB 数据处理数据格式
+ // if (title.summaryB && title.summaryB.length > 0) {
+ // title.summaryB.map((item) => {
+ // if (item && item.length > 0) {
+ // item.map((element, index) => {
+ // if (
+ // element.indexOf('-') > 0 &&
+ // element.indexOf(':') > 0 &&
+ // element.indexOf(' ') > 0
+ // ) {
+ // // 日期处理数据格式
+ // return (item[index] = formatDatetime(element, true));
+ // } else if (typeof (element * 1) == 'number') {
+ // // 数字处理数字格式
+ // return (item[index] = formatNumber(element, true));
+ // }
+ // });
+ // }
+ // return item;
+ // });
+ // }
+
+ let dom = (
+
+ {/* 摘要第一行数据,渲染表头数据 */}
+
+ {title.summaryH && {title.summaryH.join(',')}}
+
+ {/* 摘要第二行数据渲染,遍历表体数组,将有值的对象渲染 */}
+ {title.summaryB && (
+
+ {title.summaryB.length != 0 &&
+ title.summaryB.map((item) => [{item.join(',')}])}
+
+ )}
+ {/* 摘要第三行数据,时间戳 */}
+
{formatDatetime(title.createDate, true)}
+
+ );
+ return (
+
+ {dom}
+
+ );
+ }
+ },
+ {
+ title: {getLangByResId(this, '4001TEMPSAVE-000002')}, // 操作
+ dataIndex: 'opr',
+ key: 'opr',
+ // fixed: 'right',
+ width: '15%',
+ render: (text, record, index) => {
+ return (
+
+ );
+ }
+ }
+ ];
+ };
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.display) {
+ if (this.isCheck) {
+ //保证一次查询不会走多遍
+ this.isCheck = false;
+ return;
+ }
+ initTemplet.call(this, this.props, false);
+ }
+ }
+
+ // 界面组装
+ render() {
+ return (
+
+
+
+ {/* 草稿列表 */}
+ {getLangByResId(this, '4001TEMPSAVE-000003')}
+
+
+
+ {this.columns && (
+
+ )}
+
+
+
+ );
+ }
+}
+
+export { ACTIONS, TempDataList };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/components/TempSave/index.less b/src/scmpub/scmpub/components/TempSave/index.less
new file mode 100644
index 0000000..7dff894
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/index.less
@@ -0,0 +1,44 @@
+.tempsave_butn.u-table tr td a {
+ cursor: pointer;
+}
+
+.tempsave_tip.u-tooltip {
+ .tooltip-inner {
+ max-width: initial;
+ .tempsave_tip_font {
+ overflow: auto;
+ }
+ }
+}
+
+.row-data {
+ padding: 5px;
+ line-height: 20px;
+ max-height: 260px;
+ overflow: auto;
+ .summaryLineOne {
+ font-weight: bold;
+ font-size: 12px;
+ }
+ .summaryLineTwo {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .summaryLineOne,
+ .summaryLineTwo {
+ span:not(:first-child)::before {
+ content: ',';
+ margin-right: 8px;
+ }
+ }
+}
+
+.base-nc-tooltip.tempsave_tip {
+ max-width: 700px;
+ .summaryLineTwo {
+ overflow: auto;
+ white-space: normal;
+ }
+}
diff --git a/src/scmpub/scmpub/components/TempSave/init/initTemplet.js b/src/scmpub/scmpub/components/TempSave/init/initTemplet.js
new file mode 100644
index 0000000..62945c9
--- /dev/null
+++ b/src/scmpub/scmpub/components/TempSave/init/initTemplet.js
@@ -0,0 +1,43 @@
+/*mhKnC+f8UYziCOGCxgWZgqqyjU/dJwEqj8BqXazHMrA=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 暂存数据组件初始化
+ * @Date: 2019-03-20 13:40:50
+ * @Last Modified by: songyt13
+ * @Last Modified time: 2021-10-20 10:21:58
+ */
+import { ajax } from 'nc-lightapp-front';
+import { URL } from '../const';
+
+export default function(props, isFirst) {
+ // isFirst 是否为第一次查询,第一次查询时不设置this.isCheck 值
+
+ //优化 如果组件传入的this.props.isQuery 有值 则不再重复查询暂存数据
+ if (this.props.isQueryTemp != undefined && this.props.isQueryTemp == false) {
+ return;
+ }
+ ajax({
+ url: URL.QUERYTEMPORARY,
+ data: this.props.config,
+ success: (res) => {
+ if (res.data && res.data.tempdata) {
+ let rows = res.data.SummaryDTO.map((item) => {
+ return {
+ title: item
+ };
+ });
+
+ this.setState({ tempDataList: res.data.tempdata.tempdata, summary: rows });
+
+ !isFirst && (this.isCheck = true); //避免一次查询走2遍(调用setTempData方法会一直重复进入componentWillReceiveProps)
+ this.props.setIsQueryTemp && this.props.setIsQueryTemp(false);
+ } else {
+ this.setState({ tempDataList: {}, summary: [] });
+ !isFirst && (this.isCheck = true); //避免一次查询走2遍(调用setTempData方法会一直重复进入componentWillReceiveProps)
+ this.props.setIsQueryTemp && this.props.setIsQueryTemp(false);
+ }
+ }
+ });
+}
+
+/*mhKnC+f8UYziCOGCxgWZgqqyjU/dJwEqj8BqXazHMrA=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/cache/cacheDataManager.js b/src/scmpub/scmpub/pub/cache/cacheDataManager.js
new file mode 100644
index 0000000..4660fc7
--- /dev/null
+++ b/src/scmpub/scmpub/pub/cache/cacheDataManager.js
@@ -0,0 +1,325 @@
+/*XC08Y6s3vnRymr0zgTGgVyYadVlJkuNWrXNq76m00xc=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-08-01 18:35:31
+ * @Last Modified by: zhr
+ * @Last Modified time: 2021-07-07 10:48:37
+ */
+
+import { ajax, cardCache } from 'nc-lightapp-front';
+
+/**
+ *
+ * @param {*} props
+ * @param {参数object} param
+ */
+function changeUrlParam(props, param) {
+ props.setUrlParam(param);
+}
+
+/**
+ * 卡片下更新缓存数据使用
+ * @param {*} props
+ * @param {主键字段code} pk_field
+ * @param {主键值} pkvalue
+ * @param {单据数据} cacheData
+ * @param {区域ID} moduleId
+ * @param {缓存标识key} datasource
+ */
+function updateCacheData(props, pk_field, pkvalue, cacheData, moduleId, datasource) {
+ let { addCache, updateCache, getCacheById } = cardCache;
+ updateCache(pk_field, pkvalue, cacheData, moduleId, datasource);
+}
+
+/**
+ * 卡片下新增保存使用
+ * @param {*} props
+ * @param {主键字段code} pk_field
+ * @param {主键值} pkvalue
+ * @param {单据数据} cacheData
+ * @param {区域ID} moduleId
+ * @param {缓存标识key} datasource
+ */
+function addCacheData(props, pk_field, pkvalue, cacheData, moduleId, datasource) {
+ let { addCache } = cardCache;
+ addCache(pkvalue, cacheData, moduleId, datasource);
+}
+
+/**
+ * 卡片下删除更新缓存
+ * @param {*} props
+ * @param {主键字段code} pk_field
+ * @param {主键值} pkvalue
+ * @param {缓存标识key} datasource
+ */
+function deleteCacheData(props, pk_field, pkvalue, datasource) {
+ let { deleteCacheById, getNextId } = cardCache;
+ deleteCacheById(pk_field, pkvalue, datasource);
+}
+
+/**
+ * 卡片下删除自动翻到下一页使用
+ * @param {*} props
+ * @param {主键字段code} pk_field
+ * @param {主键值} pkvalue
+ * @param {单据数据} cacheData
+ * @param {区域ID} moduleId
+ * @param {缓存标识key} datasource
+ */
+function getNextId(props, pkvalue, datasource) {
+ let { getNextId } = cardCache;
+ let nextId = getNextId(pkvalue, datasource);
+ return nextId;
+}
+
+/**
+ * 列表下删除使用
+ * @param {*} props
+ * @param {区域ID} tableId
+ * @param {主键值} pkvalue
+ */
+function deleteCacheDataForList(props, tableId, pkvalue) {
+ if (pkvalue instanceof Array) {
+ pkvalue.forEach((element) => {
+ props.table.deleteCacheId(tableId, element);
+ });
+ } else {
+ props.table.deleteCacheId(tableId, pkvalue);
+ }
+}
+
+/**
+ *
+ * @param {*} props
+ * @param {区域ID} tableId
+ * @param {主键字段code} pk_field
+ * @param {批量处理后台返回的数据结构} messageInfo
+ */
+function updateCacheDataForList(props, tableId, pk_field, messageInfo, index) {
+ let sucessrows = messageInfo.sucessVOs;
+ if (sucessrows == null || sucessrows.length == 0) {
+ return;
+ }
+
+ // 组装更新数据
+ let updateDatas = [];
+ // 列表表头按钮
+ if (index == undefined) {
+ // 更新成功的数据
+ //1. 构建界面选择的信息 主键和index的对应关系
+ let selMap = {};
+ let selrows = props.table.getCheckedRows(tableId);
+ selrows.forEach((row) => {
+ let selpk = row.data.values[pk_field].value;
+ selMap[selpk] = row.index;
+ });
+ sucessrows[tableId].rows.forEach((sucessrow, index) => {
+ let pkvalue = sucessrow.values[pk_field].value;
+ let updateData = {
+ index: selMap[pkvalue],
+ data: { values: sucessrow.values }
+ };
+ updateDatas.push(updateData);
+ });
+ } else {
+ let updateData = {
+ index: index,
+ data: { values: sucessrows[tableId].rows[0].values }
+ };
+ updateDatas.push(updateData);
+ }
+ props.table.updateDataByIndexs(tableId, updateDatas);
+}
+
+/**
+ * 卡片下获取缓存数据
+ * @param {} props
+ * @param {缓存标识key} dataSource
+ * @param {主键值} pk
+ */
+function getCacheDataByPk(props, dataSource, pk) {
+ let { getCacheById } = cardCache;
+ return getCacheById(pk, dataSource);
+}
+
+/**
+ * 列表下是否有缓存数据
+ * @param {*} props
+ * @param {缓存标识key} dataSource
+ */
+function hasListCache(props, dataSource) {
+ return props.table.hasCacheData(dataSource);
+}
+
+/**
+ * 自定义缓存处理
+ * @param {缓存标识key} dataSource
+ * @param {自定义缓存标识} key
+ * @param {自定义缓存数据} data
+ */
+function setDefData(dataSource, key, data) {
+ let { setDefData } = cardCache;
+ setDefData(key, dataSource, data);
+}
+
+/**
+ * 自定义缓存处理
+ * @param {缓存标识key} dataSource
+ * @param {自定义缓存标识} key
+ */
+function getDefData(dataSource, key) {
+ let { getDefData } = cardCache;
+ return getDefData(key, dataSource);
+}
+
+/**
+ * 卡片下获取列表当前页的最后一条pk
+ * @param {缓存标识key} dataSource
+ * @param {自定义缓存标识} key
+ */
+function getCurrentLastId(dataSource) {
+ let { getCurrentLastId } = cardCache;
+ return getCurrentLastId(dataSource);
+}
+
+/**
+ * 下游单据,通过拉单进入编辑态,保存的时候使用
+ * 转单界面,通知上游转单界面处理了哪些来源id
+ * @param {*} props
+ * @param {*} key
+ * @param {*} rows
+ */
+function rewriteTransferSrcBids(props, key, rows) {
+ if (rows) {
+ let srcbids = [];
+ rows.forEach((row) => {
+ srcbids.push(row.values[key].value);
+ });
+ props.transferTable.setSavedTransferTableDataPk(srcbids);
+ }
+}
+
+/**
+ * 提供给双key场景回写修改缓存
+ * @param props
+ * @param keys
+ * @param separator
+ * @param rows
+ */
+function rewriteTransferSrcBidsByKeys(props, keys, separator ,rows) {
+ if (rows) {
+ let srcbids = [];
+ rows.forEach((row) => {
+ let srcbid = '';
+ for (let i = 0; i {
+ let selpk;
+ if (row.data.values[pk_newfield].value) {
+ selpk = row.data.values[pk_newfield].value;
+ } else {
+ selpk = row.data.values[pk_field].value;
+ }
+ selMap[selpk] = row.index;
+ });
+ sucessrows[tableId].rows.forEach((sucessrow, index) => {
+ let pkvalue = sucessrow.values[pk_field].value;
+ let updateData = {
+ index: selMap[pkvalue],
+ data: { values: sucessrow.values }
+ };
+ updateDatas.push(updateData);
+ });
+ } else {
+ let updateData = {
+ index: index,
+ data: { values: sucessrows[tableId].rows[0].values }
+ };
+ updateDatas.push(updateData);
+ }
+ props.table.updateDataByIndexs(tableId, updateDatas);
+}
+
+export {
+ changeUrlParam,
+ updateCacheData,
+ deleteCacheData,
+ getCacheDataByPk,
+ addCacheData,
+ hasListCache,
+ setDefData,
+ getDefData,
+ getCurrentLastId,
+ getNextId,
+ deleteCacheDataForList,
+ updateCacheDataForList,
+ rewriteTransferSrcBids,
+ rewriteTransferSrcBidsByKeys,
+ clearTransferCache,
+ updatePKCache,
+ updateCacheDataForListWhenChangePK
+};
+
+/*XC08Y6s3vnRymr0zgTGgVyYadVlJkuNWrXNq76m00xc=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/cache/index.js b/src/scmpub/scmpub/pub/cache/index.js
new file mode 100644
index 0000000..1905d87
--- /dev/null
+++ b/src/scmpub/scmpub/pub/cache/index.js
@@ -0,0 +1,42 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+import {
+ changeUrlParam,
+ updateCacheData,
+ deleteCacheData,
+ getCacheDataByPk,
+ addCacheData,
+ hasListCache,
+ setDefData,
+ getDefData,
+ getCurrentLastId,
+ getNextId,
+ deleteCacheDataForList,
+ updateCacheDataForList,
+ rewriteTransferSrcBids,
+ rewriteTransferSrcBidsByKeys,
+ clearTransferCache,
+ updatePKCache,
+ updateCacheDataForListWhenChangePK
+} from './cacheDataManager';
+
+export {
+ changeUrlParam,
+ updateCacheData,
+ deleteCacheData,
+ getCacheDataByPk,
+ addCacheData,
+ hasListCache,
+ setDefData,
+ getDefData,
+ getCurrentLastId,
+ getNextId,
+ deleteCacheDataForList,
+ updateCacheDataForList,
+ rewriteTransferSrcBids,
+ rewriteTransferSrcBidsByKeys,
+ clearTransferCache,
+ updatePKCache,
+ updateCacheDataForListWhenChangePK
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/pubrule/vbillcodeBeforeEvent.js b/src/scmpub/scmpub/pub/pubrule/vbillcodeBeforeEvent.js
new file mode 100644
index 0000000..1c1b0ea
--- /dev/null
+++ b/src/scmpub/scmpub/pub/pubrule/vbillcodeBeforeEvent.js
@@ -0,0 +1,52 @@
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
+/**
+ * 编辑前处理,需要物料
+ * 这类方法必须有返回值,返回true为可编辑,false为不可编辑
+ */
+import { ajax, toast } from 'nc-lightapp-front';
+
+export default function(props, constance) {
+ return new Promise(function(resolve, reject) {
+ let { key, formareaid, pk_org_key, billtype } = constance;
+ let pk_org = props.form.getFormItemsValue(formareaid, pk_org_key);
+ if (!pk_org || !pk_org.value) {
+ resolve(false);
+ } else {
+ let data = {
+ key: key,
+ params: {
+ pk_org: pk_org.value,
+ billtype: billtype
+ }
+ };
+
+ ajax({
+ url: '/nccloud/scmpub/arsub/headbefore.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);
+ }
+ });
+ }
+ });
+}
+
+/*rV0bQibesG0UGdyoLFMSM7x6jWesfKisfpfKoP+ycwg=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/queryarea/queryAreaInit.js b/src/scmpub/scmpub/pub/queryarea/queryAreaInit.js
new file mode 100644
index 0000000..d9bb822
--- /dev/null
+++ b/src/scmpub/scmpub/pub/queryarea/queryAreaInit.js
@@ -0,0 +1,32 @@
+/*9s06cI9qriZwm9mh0Mrs2jg+3rnEyO3vJuZq7y4KYsQ=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 页面功能描述
+ * @Date: 2018-08-13 16:54:23
+ * @Last Modified by: wangceb
+ * @Last Modified time: 2018-09-05 10:29:06
+ */
+import { transtypeUtils } from '../../../../scmpub/scmpub/pub/tool';
+function renderCompleteEvent(moduleId, orgfield, callback, ctrantypeid) {
+ // 设置默认值
+ transtypeUtils.setQueryDefaultValue.call(this, this.props, moduleId, ctrantypeid);
+ let pk_org_value = this.props.search.getSearchValByField(moduleId, orgfield);
+ let arr = null;
+ if (pk_org_value && pk_org_value.value && pk_org_value.value.firstvalue) {
+ let value = pk_org_value.value.firstvalue;
+
+ arr = value.split(',').map((item) => {
+ return {
+ refpk: item
+ };
+ });
+ }
+
+ if (callback) {
+ callback.call(this, orgfield, arr);
+ }
+}
+
+export { renderCompleteEvent };
+
+/*9s06cI9qriZwm9mh0Mrs2jg+3rnEyO3vJuZq7y4KYsQ=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/MultiCorpRefHandler.js b/src/scmpub/scmpub/pub/tool/MultiCorpRefHandler.js
new file mode 100644
index 0000000..a2e2d26
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/MultiCorpRefHandler.js
@@ -0,0 +1,143 @@
+/*ilGmt3t6VqTblKRfjBT0Xo1ca5CAmIKRwH54mHrPLDk=*/
+/*
+ * @Author: lichaoah
+ * @Date: 2018-07-02 14:36:36
+ * @Last Modified by: jiangphk
+ * @Last Modified time: 2023-08-08 09:31:00
+ *
+ * 设置是否可以使用可切换组织过滤:单选则不可切换组织,不选和多选可切换
+ * @param {*} props
+ * @param {*} val 编辑后输入的值,用于判断编辑后输入个数
+ * @param {*} searchAreaCode 查询区编码
+ * @param {*} effectField 被影响的查询条件的code值,分为数组和单个字符串两种情况
+ */
+export default function(props, val, searchAreaCode, effectField) {
+ let meta = props.meta.getMeta();
+ let items = meta[searchAreaCode].items;
+ //定义一个数字,用于记录设置的次数,如果所有都已经设置,则停止遍历
+ let num = 0;
+ //假如传入的是数组
+ if (typeof effectField == 'object' && effectField.constructor == Array) {
+ //选择一个
+ if (val && (val.length == 1 || val.refpk)) {
+ for (let i = 0; i < items.length; i++) {
+ for (let j = 0, len = effectField.length; j < len; j++) {
+ let item = items[i];
+ if (item.attrcode == effectField[j]) {
+ //如果本来就是false,直接返回
+ if (item.isShowUnit && item.isShowUnit == false) {
+ continue;
+ } else {
+ num++;
+ item.isShowUnit = false;
+ if (num == len) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ for (let i = 0; i < items.length; i++) {
+ for (let j = 0, len = effectField.length; j < len; j++) {
+ let item = items[i];
+ if (item.attrcode == effectField[j]) {
+ //如果本来就是true,直接返回
+ if (item.isShowUnit) {
+ continue;
+ } else {
+ num++;
+ item.isShowUnit = true;
+ if (num == len) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ } else if (typeof effectField == 'string' && effectField.constructor == String) {
+ //假如传入的是单个code
+ if (val && (val.length == 1 || val.refpk)) {
+ for (let i = 0; i < items.length; i++) {
+ let item = items[i];
+ if (item.attrcode == effectField) {
+ item.isShowUnit = false;
+ }
+ }
+ } else {
+ for (let i = 0; i < items.length; i++) {
+ let item = items[i];
+ if (item.attrcode == effectField) {
+ item.isShowUnit = true;
+ }
+ }
+ }
+ }
+ props.meta.setMeta(meta);
+}
+/**
+ * 多组织字段初始化
+ * @param {array} items
+ * @param {string,array} effectField 需要设置isShowUnit的字段
+ */
+export function multiCorpInit(items, effectField) {
+ if (!items) {
+ return;
+ }
+ //初始化所有字段的isShowUnit
+ initIsShowUnit(items, effectField);
+}
+/**
+ * 非指定字段设置为false,指定字段设置为true
+ * @param {array} items
+ * @param {array} effectField
+ */
+function initIsShowUnit(items, effectField) {
+ //简单起见,先把所有的字段的isShowUnit属性全部设置为false,这也是最终平台默认的效果
+ items.forEach((item) => {
+ item.isShowUnit = false;
+ });
+ //再把指定字段设置为true
+ setIsShowUnitTrue(items, effectField);
+}
+/**
+ * 设置isShowUnit为false
+ * @param {Array} items
+ * @param {string} attrcode 需要赋值的字段key,可以为字符串或者数组
+ */
+function setIsShowUnitTrue(items, attrcode) {
+ setIsShowUnit(items, attrcode, true);
+}
+/**
+ * 设置isShowUnit为true
+ * @param {Array} items
+ * @param {string} attrcode 需要赋值的字段key
+ */
+function setIsShowUnitFasle(items, attrcode) {
+ setIsShowUnit(items, attrcode, false);
+}
+/**
+ * 给isShowUnit赋值
+ * @param {Array} items
+ * @param {string} attrcode 需要赋值的字段key,可以为字符串或者数组
+ * @param {Boolean} effective isShowUnit的值,true or false
+ */
+function setIsShowUnit(items, attrcode, effective) {
+ if (typeof attrcode == 'object' && attrcode.constructor == Array) {
+ items.forEach((item) => {
+ if (attrcode.includes(item.attrcode)) {
+ item.isShowUnit = effective;
+ }
+ });
+ }
+ if (typeof attrcode == 'string' && attrcode.constructor == String) {
+ items.forEach((item) => {
+ if (attrcode == item.attrcode) {
+ item.isShowUnit = effective;
+ }
+ });
+ }
+}
+
+/*ilGmt3t6VqTblKRfjBT0Xo1ca5CAmIKRwH54mHrPLDk=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/afterEditUtil.js b/src/scmpub/scmpub/pub/tool/afterEditUtil.js
new file mode 100644
index 0000000..f9b181a
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/afterEditUtil.js
@@ -0,0 +1,1106 @@
+/*FySM9m52dyc0CNE1ub/NjojvWtqkk1r30E3Z9nL2PVw=*/
+/*
+ * @PageInfo: 编辑后工具类
+ * @Author: guozhq
+ * @Date: 2018-12-10 14:37:43
+ * @Last Modified by: wangpju
+ * @Last Modified time: yyyy-09-Th 06:33:50
+ */
+import { simplifyData, simplifyDataByFields } from './simplifyDataUtil';
+import { object } from 'prop-types';
+
+/**
+ * 主子表表体编辑后事件结果集处理
+ * @param {*} props
+ * @param {*} moduleId 表体区域编码
+ * @param {*} data 返回的结果res.data
+ * @param {*} i
+ */
+function processBillCardBodyEditResult(props, moduleId, data, i) {
+ // 方案一
+ // if (
+ // data &&
+ // data.billCard &&
+ // data.billCard.body &&
+ // data.billCard.body[moduleId] &&
+ // data.dataIndexs &&
+ // data.originalIndexs
+ // ) {
+ // let insertArray = [];
+ // let updateArray = [];
+ // data.originalIndexs.forEach((index, j) => {
+ // let dataIndex = data.dataIndexs[j];
+ // if (i == index) {
+ // updateArray.push({ index: index, data: data.billCard.body[moduleId].rows[dataIndex] });
+ // } else {
+ // insertArray.push({ index: index, data: data.billCard.body[moduleId].rows[dataIndex] });
+ // }
+ // });
+ // if (updateArray.length > 0) {
+ // props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ // }
+ // if (insertArray.length > 0) {
+ // props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ // }
+ // }
+ // 方案二
+ if (
+ data &&
+ data.billCard &&
+ data.billCard.body &&
+ data.billCard.body[moduleId] &&
+ data.billCard.body[moduleId].rows.length > 0
+ ) {
+ let rows = data.billCard.body[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: i + j, data: row };
+ if (j == 0) {
+ updateArray.push(obj);
+ } else {
+ insertArray.push(obj);
+ }
+ }
+ if (updateArray.length > 0) {
+ props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ let newrows = [];
+ let allrows = props.cardTable.getAllRows(moduleId, true);
+ insertArray.forEach((row) => {
+ let newrow = allrows[row.index];
+ newrows.push(newrow);
+ });
+ updateArray.forEach((row) => {
+ let newrow = allrows[row.index];
+ newrows.push(newrow);
+ });
+ data.billCard.body[moduleId].rows = newrows;
+ }
+}
+/**
+ * 创建一主多子编辑后事件结果(批量编辑)
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域编码
+ * @param {*} tableAreaCode 表体区域编码
+ * @param {*} moduleId 当前区域编码
+ * @param {*} key 编辑的Key值
+ * @param {*} changedRows
+ * @param {*} indexs 编辑的行数
+ * @param {*} userobject 自定义对象
+ */
+function createBodyAfterEventData4BatchMore(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ moduleId,
+ key,
+ changedRows,
+ indexs,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, changedRows);
+ data.index = 0;
+ let lines = [];
+ // // 删除display/scale 优化上行流量
+ let rows = data.card.bodys[moduleId].rows;
+ let newRows = [];
+ let changerRows = [];
+ let scm_indexs = [];
+ for (let index = 0; index < indexs.length; index++) {
+ if (rows[indexs[index]]) {
+ newRows[index] = rows[indexs[index]];
+ lines.push(index);
+ }
+ if (changedRows[index]) {
+ changerRows.push(changedRows[index]);
+ }
+ if (changedRows[index] && rows[indexs[index]]) {
+ scm_indexs.push(index + '');
+ }
+ }
+ data.changedrows = changerRows;
+ data.indexs = lines;
+ data.card.bodys[moduleId].rows = newRows;
+ // 处理编辑传递单行处理
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.bodys[moduleId] = simplifyData(data.card.bodys[moduleId]);
+
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+
+ let crownos = [];
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ userobject['scm_originindex'] = indexs[0] + '';
+ userobject['scm_allrownos'] = crownos;
+ userobject['indexs'] = indexs;
+ // 采购订单物料oid、vid不一致的问题,还有前后端userObject大驼峰小驼峰不一致的问题,导致后台接不到userObject参数 20220705 begin
+ userobject['scm_indexs'] = scm_indexs;
+ data.userObject = userobject;
+ // 采购订单物料oid、vid不一致的问题,还有前后端userObject大驼峰小驼峰不一致的问题,导致后台接不到userObject参数 20220705 end
+
+ return data;
+}
+/**
+ * 主子表表体编辑后事件结果集处理
+ * @param {*} props
+ * @param {*} moduleId 表体区域编码
+ * @param {*} data 返回的结果res.data
+ * @param {*} indexs
+ */
+function processBillCardBodyEditResult4Batch(props, moduleId, data, indexs) {
+ if (
+ data &&
+ data.billCard &&
+ data.billCard.body &&
+ data.billCard.body[moduleId] &&
+ data.billCard.body[moduleId].rows.length > 0
+ ) {
+ let rows = data.billCard.body[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ let allRows = props.cardTable.getAllRows(moduleId);
+ let i = allRows.length;
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: indexs[j], data: row };
+ if (indexs[j] < i) {
+ updateArray.push(obj);
+ } else {
+ insertArray.push(obj);
+ }
+ }
+ if (updateArray.length > 0) {
+ props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ }
+}
+/**
+ * 主子表表体编辑后事件结果集处理 只修改,不新增行
+ * @param {*} props
+ * @param {*} moduleId 表体区域编码
+ * @param {*} data 返回的结果res.data
+ * @param {*} i
+ */
+function processBillCardBodyEditResultNotAddRow(props, moduleId, data, i) {
+ // 方案二
+ if (
+ data &&
+ data.billCard &&
+ data.billCard.body &&
+ data.billCard.body[moduleId] &&
+ data.billCard.body[moduleId].rows.length > 0
+ ) {
+ let rows = data.billCard.body[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: i + j, data: row };
+ updateArray.push(obj);
+ }
+ if (updateArray.length > 0) {
+ props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ }
+}
+
+function processBillCardBodyEditResultNotAddRowForSO(props, moduleId, data, i) {
+ // 方案三
+ if (
+ data &&
+ data.billCard &&
+ data.billCard.body &&
+ data.billCard.body[moduleId] &&
+ data.billCard.body[moduleId].rows.length > 0
+ ) {
+ let rows = data.billCard.body[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: i[j], data: row };
+ updateArray.push(obj);
+ }
+ if (updateArray.length > 0) {
+ props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ }
+}
+
+/**
+ * 创建主子表编辑后事件结果
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域编码
+ * @param {*} tableAreaCode 表体区域编码
+ * @param {*} moduleId 当前区域编码
+ * @param {*} key 编辑的Key值
+ * @param {*} changedRows
+ * @param {*} i 当前编辑的行
+ * @param {*} userobject 自定义对象
+ */
+function createBodyAfterEventData(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ moduleId,
+ key,
+ changedRows,
+ i,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, changedRows);
+ data.index = 0;
+ data.indexs = [ 0 ];
+ // // 删除display/scale 优化上行流量
+ let rows = data.card.body[tableAreaCode].rows;
+ let newRows = [ rows[i] ];
+ data.card.body[tableAreaCode].rows = newRows;
+ // 处理编辑传递单行处理
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.body[tableAreaCode] = simplifyData(data.card.body[tableAreaCode]);
+
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+
+ let crownos = [];
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ userobject['scm_originindex'] = i + '';
+ userobject['scm_allrownos'] = crownos;
+ data.userobject = userobject;
+ return data;
+}
+
+/**
+ * 创建主子表编辑后事件结果(批量编辑)
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域编码
+ * @param {*} tableAreaCode 表体区域编码
+ * @param {*} moduleId 当前区域编码
+ * @param {*} key 编辑的Key值
+ * @param {*} changedRows
+ * @param {*} indexs 编辑的行数
+ * @param {*} userobject 自定义对象
+ */
+function createBodyAfterEventData4Batch(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ moduleId,
+ key,
+ changedRows,
+ indexs,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, changedRows);
+ data.index = 0;
+ let lines = [];
+ // // 删除display/scale 优化上行流量
+ let rows = data.card.body[tableAreaCode].rows;
+ let newRows = [];
+ let changerRows = [];
+ let scm_indexs = [];
+ let changerowsMap = new Map();
+ changedRows.forEach((value) => {
+ changerowsMap.set(value.rowid, value);
+ });
+ for (let index = 0; index < indexs.length; index++) {
+ if (rows[indexs[index]]) {
+ newRows[index] = rows[indexs[index]];
+ lines.push(index + '');
+ if (changerowsMap.has(newRows[index].rowid)) {
+ changerRows.push(changerowsMap.get(newRows[index].rowid));
+ }
+ } else {
+ newRows[index] = rows[index];
+ }
+ if (changedRows[index] && rows[indexs[index]]) {
+ scm_indexs.push(index + '');
+ }
+ }
+ data.changedrows = changerRows;
+ data.indexs = lines;
+ data.card.body[tableAreaCode].rows = newRows;
+ // 处理编辑传递单行处理
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.body[tableAreaCode] = simplifyData(data.card.body[tableAreaCode]);
+
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+
+ let crownos = [];
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ userobject['scm_originindex'] = indexs[0] + '';
+ userobject['scm_allrownos'] = crownos;
+ userobject['indexs'] = indexs;
+ userobject['scm_indexs'] = scm_indexs;
+ data.userobject = userobject;
+ return data;
+}
+
+/**
+ * 创建主子表编辑后事件结果(批量编辑)含孙表
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域编码
+ * @param {*} tableAreaCode 表体区域编码
+ * @param {*} moduleId 当前区域编码
+ * @param {*} key 编辑的Key值
+ * @param {*} changedRows
+ * @param {*} indexs 编辑的行数
+ * @param {*} userobject 自定义对象
+ */
+function createBodyAfterEventData4BatchHasSon(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ SonAreaCode,
+ bodyRelatedField,
+ moduleId,
+ key,
+ changedRows,
+ indexs,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, changedRows);
+ data.index = 0;
+ let lines = [];
+ // // 删除display/scale 优化上行流量
+ let rows = data.card.body[tableAreaCode].rows;
+ let newRows = [];
+ let changerRows = [];
+ let scm_indexs = [];
+ for (let index = 0; index < indexs.length; index++) {
+ if (rows[indexs[index]]) {
+ newRows[index] = rows[indexs[index]];
+ lines.push(index + '');
+ } else {
+ newRows[index] = rows[index];
+ }
+ if (changedRows[index]) {
+ changerRows.push(changedRows[index]);
+ }
+ if (changedRows[index] && rows[indexs[index]]) {
+ scm_indexs.push(index + '');
+ }
+ }
+ data.changedrows = changerRows;
+ data.indexs = lines;
+ data.card.body[tableAreaCode].rows = newRows;
+ // 处理编辑传递单行处理
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.body[tableAreaCode] = simplifyData(data.card.body[tableAreaCode]);
+
+ let allSonRows = [];
+ // 处理孙表
+ for (let index = 0; index < newRows.length; index++) {
+ let rowid = newRows[index].rowid;
+ let sonData = props.cardTable.getAllGrandData({ parentId: tableAreaCode });
+ let datas = createSonGridData(props, tableAreaCode, SonAreaCode, bodyRelatedField, sonData, rowid);
+ let sonRows = datas[SonAreaCode].rows;
+ if (sonRows && sonRows.length > 0) {
+ allSonRows.push.apply(allSonRows, sonRows);
+ }
+ }
+ data.card.grandSons = {
+ [SonAreaCode]: {
+ areaType: 'table',
+ areacode: SonAreaCode,
+ rows: allSonRows
+ }
+ };
+ data.card.grandSons[SonAreaCode] = simplifyData(data.card.grandSons[SonAreaCode]);
+
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+
+ let crownos = [];
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ userobject['scm_originindex'] = indexs[0] + '';
+ userobject['scm_allrownos'] = crownos;
+ userobject['indexs'] = indexs;
+ userobject['scm_indexs'] = scm_indexs;
+ data.userobject = userobject;
+ return data;
+}
+/**
+ * 创建表体编辑后事件(含孙表)
+ * @param {*} props
+ * @param {*} pageCode
+ * @param {*} formAreaCode 表头区域编码
+ * @param {*} tableAreaCode 表体区域编码
+ * @param {*} SonAreaCode 孙表区域编码
+ * @param {*} bodyRelatedField 子孙关联字段
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} changedRows
+ * @param {*} i
+ * @param {*} userobject
+ */
+function createBodyAfterEventData4Son(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ SonAreaCode,
+ bodyRelatedField,
+ moduleId,
+ key,
+ changedRows,
+ i,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, changedRows);
+ data.index = 0;
+ // // 删除display/scale 优化上行流量
+ let rows = data.card.body[tableAreaCode].rows;
+ let newRows = [ rows[i] ];
+ data.card.body[tableAreaCode].rows = newRows;
+ // 处理编辑传递单行处理
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.body[tableAreaCode] = simplifyData(data.card.body[tableAreaCode]);
+ // 处理孙表
+ let rowid = rows[i].rowid;
+ let sonData = props.cardTable.getAllGrandData({ parentId: tableAreaCode });
+ data.card.grandSons = createSonGridData(props, tableAreaCode, SonAreaCode, bodyRelatedField, sonData, rowid);
+ data.card.grandSons[SonAreaCode] = simplifyData(data.card.grandSons[SonAreaCode]);
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+
+ let crownos = [];
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ userobject['scm_originindex'] = i + '';
+ userobject['scm_allrownos'] = crownos;
+ data.userobject = userobject;
+ return data;
+}
+
+/**
+ * 创建孙表数据
+ * @param {*} props
+ * @param {*} tableAreaCode
+ * @param {*} SonAreaCode
+ * @param {*} bodyRelatedField
+ * @param {*} sonData
+ * @param {*} bodyRowId
+ */
+function createSonGridData(props, tableAreaCode, SonAreaCode, bodyRelatedField, sonData, bodyRowId, i) {
+ let newSonRows = [];
+ if (
+ sonData[bodyRowId] &&
+ sonData[bodyRowId][SonAreaCode] &&
+ sonData[bodyRowId][SonAreaCode].rows &&
+ sonData[bodyRowId][SonAreaCode].rows.length > 0
+ ) {
+ let rows = sonData[bodyRowId][SonAreaCode].rows;
+ for (let j = 0; j < rows.length; j++) {
+ const row = rows[j];
+
+ if (i != undefined) {
+ if (i == j) {
+ // 用孙表的子表主键判断是否新增行,如果孙表的子表有值的话,认为一定是主键或者 rowid
+ // 如果没值的话,一定是新增行,需要设置为 rowid
+ // 由于前端的状态管理比较混乱,单独用状态等于 2 判断不能覆盖所有新增场景,例如:后台返回新增的数据时,转单页面切换数据时
+ if (row.values[bodyRelatedField].value == null || row.status == '2') {
+ let bodypk;
+ // 新增态判断表体行是否存在主键,如果存在的话,则等于主键,否则等于rowid
+ if (props.cardTable.getValByKeyAndRowId(tableAreaCode, bodyRowId, bodyRelatedField)) {
+ bodypk = props.cardTable.getValByKeyAndRowId(tableAreaCode, bodyRowId, bodyRelatedField)
+ .value;
+ }
+ if (bodypk) {
+ row.values[bodyRelatedField] = { value: bodypk, display: null };
+ } else {
+ row.values[bodyRelatedField] = { value: bodyRowId, display: null };
+ }
+ }
+ newSonRows.push(row);
+ break;
+ }
+ } else {
+ if (row.values[bodyRelatedField].value == null || row.status == '2') {
+ let bodypk;
+ // 新增态判断表体行是否存在主键,如果存在的话,则等于主键,否则等于rowid
+ if (props.cardTable.getValByKeyAndRowId(tableAreaCode, bodyRowId, bodyRelatedField)) {
+ bodypk = props.cardTable.getValByKeyAndRowId(tableAreaCode, bodyRowId, bodyRelatedField).value;
+ }
+ if (bodypk) {
+ row.values[bodyRelatedField] = { value: bodypk, display: null };
+ } else {
+ row.values[bodyRelatedField] = { value: bodyRowId, display: null };
+ }
+ }
+ if (row.status == '3') {
+ continue;
+ }
+ newSonRows.push(row);
+ }
+ }
+ }
+ return {
+ [SonAreaCode]: {
+ areaType: 'table',
+ areacode: SonAreaCode,
+ rows: newSonRows
+ }
+ };
+}
+
+/**
+ * 创建孙表编辑后事件(含子表和表头)
+ * @param {*} props
+ * @param {*} pageCode
+ * @param {*} formAreaCode
+ * @param {*} tableAreaCode
+ * @param {*} SonAreaCode
+ * @param {*} bodyRelatedField
+ * @param {*} bodyIndex 表体行
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} changedRows
+ * @param {*} i
+ * @param {*} userobject
+ */
+function createSonAfterEventData4Son(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ SonAreaCode,
+ bodyRelatedField,
+ bodyIndex,
+ moduleId,
+ key,
+ changedRows,
+ i,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, changedRows);
+ data.index = 0;
+ // // 删除display/scale 优化上行流量
+ let rows = data.card.body[tableAreaCode].rows;
+ let newRows = [ rows[bodyIndex] ];
+ data.card.body[tableAreaCode].rows = newRows;
+ // 处理编辑传递单行处理
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.body[tableAreaCode] = simplifyData(data.card.body[tableAreaCode]);
+ // 处理孙表
+ let rowid = rows[bodyIndex].rowid;
+ let sonData = props.cardTable.getAllGrandData({ parentId: tableAreaCode });
+ data.card.grandSons = createSonGridData(props, tableAreaCode, SonAreaCode, bodyRelatedField, sonData, rowid, i);
+ data.card.body[SonAreaCode] = simplifyData(data.card.body[SonAreaCode]);
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+ // 补充孙表的区域编码,避免层级太深
+ userobject['scm_sonareacode'] = SonAreaCode;
+ data.userobject = userobject;
+ return data;
+}
+
+function processBillCardGrandSonEditResult(props, moduleId, data, i) {
+ if (
+ data &&
+ data.billCard &&
+ data.billCard.grandSons &&
+ data.billCard.grandSons[moduleId] &&
+ data.billCard.grandSons[moduleId].rows.length > 0
+ ) {
+ let rows = data.billCard.grandSons[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: i + j, data: row };
+ if (j == 0) {
+ updateArray.push(obj);
+ } else {
+ insertArray.push(obj);
+ }
+ }
+ if (updateArray.length > 0) {
+ props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ }
+}
+
+/**
+ * 创建一主多子表编辑后事件结果
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域编码
+ * @param {*} tableAreaCodes 表体区域编码,数组
+ * @param {*} moduleId 当前区域编码
+ * @param {*} key 编辑的Key值
+ * @param {*} changedRows
+ * @param {*} i 当前编辑的行
+ * @param {*} userobject 自定义对象
+ */
+function createExtBodyAfterEventData(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCodes,
+ moduleId,
+ key,
+ changedRows,
+ i,
+ userobject
+) {
+ let data = props.createBodyAfterEventData(pageCode, formAreaCode, tableAreaCodes, moduleId, key, changedRows);
+ data.index = 0;
+ data.indexs = [ 0 ];
+ // 处理编辑传递单行处理
+ let rows = data.card.bodys[moduleId].rows;
+ let newRows = [ rows[i] ];
+ data.card.bodys[moduleId].rows = newRows;
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ data.card.bodys[moduleId] = simplifyData(data.card.bodys[moduleId]);
+ // userObject 处理
+ userobject = userobject ? userobject : {};
+ let crownos = [];
+ rows.map((row) => {
+ if (row.status != '3') {
+ crownos.push(row.values['crowno'] ? row.values['crowno'].value : null);
+ }
+ });
+ userobject['scm_originindex'] = i + '';
+ userobject['scm_allrownos'] = crownos;
+ data.userObject = userobject;
+ return data;
+}
+
+/**
+ * 一主多子表表体编辑后事件结果集处理
+ * @param {*} props
+ * @param {*} moduleId 表体区域编码
+ * @param {*} data 返回的结果res.data.extbillcard
+ * @param {*} i
+ */
+function processExtBillCardBodyEditResult(props, moduleId, data) {
+ if (data.extbillcard && data.extbillcard.bodys && data.extbillcard.bodys[moduleId]) {
+ let updateArray = [];
+ let insertArray = [];
+ let insertIndex =
+ data.userObject && data.userObject.scm_originindex ? parseInt(data.userObject.scm_originindex) : 1;
+ data.extbillcard.bodys[moduleId].rows.forEach((element, i) => {
+ if (element.rowid) {
+ updateArray.push(element);
+ } else {
+ insertArray.push({ index: i + insertIndex, data: element });
+ }
+ });
+ props.cardTable.updateDataByRowId(moduleId, { rows: updateArray }, false, false);
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+}
+
+/**
+ * 一主多子表表体编辑后事件结果集批量处理
+ * @param {*} props
+ * @param {*} moduleId 表体区域编码
+ * @param {*} data 返回的结果res.data.extbillcard
+ * @param {*} i
+ */
+function processExtBillCardBodyEditResult4Batch(props, moduleId, data, indexs) {
+ if (data.extbillcard && data.extbillcard.bodys && data.extbillcard.bodys[moduleId]) {
+ let updateArray = [];
+ let insertArray = [];
+ // let insertIndex =
+ // data.userObject && data.userObject.scm_originindex ? parseInt(data.userObject.scm_originindex) : 1;
+ let rows = data.extbillcard.bodys[moduleId].rows;
+ let allRows = props.cardTable.getAllRows(moduleId);
+ let i = allRows.length;
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: indexs[j], data: row };
+ if (indexs[j] < i) {
+ updateArray.push(obj);
+ } else {
+ insertArray.push(obj);
+ }
+ }
+ if (updateArray.length > 0) {
+ props.cardTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ // data.extbillcard.bodys[moduleId].rows.forEach((element, i) => {
+ // if (element.rowid) {
+ // updateArray.push(element);
+ // } else {
+ // insertArray.push({ index: i + insertIndex, data: element });
+ // }
+ // });
+ // props.cardTable.updateDataByRowId(moduleId, { rows: updateArray }, false, false);
+ // props.cardTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+}
+
+/**
+ * 创建表格编辑后事件数据结构
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} areaCode 区域编码
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} changedrows
+ * @param {*} index
+ * @param {*} userobject
+ */
+function createGridAfterEventData(props, pageCode, areaCode, moduleId, key, changedrows, index, userobject) {
+ let meta = props.meta.getMeta();
+ let rows = props.editTable.getAllRows(areaCode, false);
+ let grid = {
+ templetid: meta.pageid,
+ pageid: pageCode,
+ [areaCode]: {
+ areaType: 'table',
+ areacode: areaCode,
+ rows: [ rows[index] ]
+ }
+ };
+ // 减少上行流量
+ grid[areaCode] = simplifyData(grid[areaCode]);
+ return {
+ attrcode: key,
+ changedrows: changedrows,
+ grid: grid,
+ index: 0,
+ indexs: [ 0 ],
+ userobject: userobject
+ };
+}
+
+/**
+ * 创建表格编辑后事件数据结构(批处理)
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} areaCode 区域编码
+ * @param {*} moduleId
+ * @param {*} key
+ * @param {*} changedrows
+ * @param {*} indexs
+ * @param {*} userobject
+ */
+function createGridAfterEventDataBatch(props, pageCode, areaCode, moduleId, key, changedrows, indexs, userobject) {
+ let meta = props.meta.getMeta();
+ let rows = props.editTable.getAllRows(areaCode, false);
+ let lines = [];
+ let newRows = [];
+ let changerRows = [];
+ let grid = {
+ templetid: meta.pageid,
+ pageid: pageCode,
+ [areaCode]: {
+ areaType: 'table',
+ areacode: areaCode,
+ rows: []
+ }
+ };
+ let changerowsMap = new Map();
+ changedrows.forEach((value) => {
+ changerowsMap.set(value.rowid, value);
+ });
+ for (let i = 0; i < indexs.length; i++) {
+ if (rows[indexs[i]]) {
+ newRows[i] = rows[indexs[i]];
+ lines.push(i + '');
+ if (changerowsMap.has(newRows[i].rowid)) {
+ changerRows.push(changerowsMap.get(newRows[i].rowid));
+ }
+ }
+ }
+ lines.forEach((index) => {
+ grid[areaCode].rows.push(newRows[index]);
+ });
+ // 减少上行流量
+ grid[areaCode] = simplifyData(grid[areaCode]);
+ return {
+ attrcode: key,
+ changedrows: changerRows,
+ grid: grid,
+ index: 0,
+ indexs: lines,
+ userobject: userobject
+ };
+}
+/**
+ * 处理表格编辑后事件结果
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} data
+ * @param {*} i
+ */
+function processGridEditResult(props, moduleId, data, i) {
+ if (data && data.grid && data.grid[moduleId]) {
+ let rows = data.grid[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: i + j, data: row };
+ if (j == 0) {
+ updateArray.push(obj);
+ } else {
+ insertArray.push(row);
+ }
+ }
+ if (updateArray.length > 0) {
+ props.editTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.editTable.insertRowsAfterIndex(moduleId, insertArray, i);
+ }
+ }
+}
+/**
+ * 处理表格编辑后事件结果(批处理)
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} data
+ * @param {*} indexs
+ */
+function processGridEditResultBatch(props, moduleId, data, indexs) {
+ if (data && data.grid && data.grid[moduleId] && data.grid[moduleId].rows.length > 0) {
+ let rows = data.grid[moduleId].rows;
+ let insertArray = [];
+ let updateArray = [];
+ let allRows = props.editTable.getAllRows(moduleId);
+ let i = allRows.length;
+ for (let j = 0; j < rows.length; j++) {
+ let row = rows[j];
+ let obj = { index: indexs[j], data: row };
+ if (indexs[j] < i) {
+ updateArray.push(obj);
+ } else {
+ insertArray.push(obj);
+ }
+ }
+ if (updateArray.length > 0) {
+ props.editTable.updateDataByIndexs(moduleId, updateArray);
+ }
+ if (insertArray.length > 0) {
+ props.editTable.insertDataByIndexs(moduleId, insertArray, true);
+ }
+ }
+}
+
+/**
+ * 表头编辑后过滤删除行
+ * @param {*} data
+ */
+function filterDeleteLine(data, tableAreaCode) {
+ let finalrows = [];
+ if (data.card.body && data.card.body[tableAreaCode] && data.card.body[tableAreaCode].rows) {
+ let origrows = data.card.body[tableAreaCode].rows;
+ if (origrows.length > 0) {
+ origrows.forEach((row) => {
+ if (row && row.status && row.status != '3') {
+ finalrows.push(row);
+ }
+ });
+ }
+ data.card.body[tableAreaCode].rows = finalrows;
+ }
+}
+
+/**
+ * 创建表头编辑后事件数据
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域
+ * @param {*} tableAreaCode 表体区域
+ * @param {*} moduleId 当前区域
+ * @param {*} key
+ * @param {*} value
+ * @param {*} userobject 自定义属性
+ * @param {*} bodyFields 需要传递到后台的表体字段数组,如果不传,则传所有字段
+ */
+function createHeadAfterEventData(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCode,
+ moduleId,
+ key,
+ value,
+ userobject,
+ bodyFields,
+ isInclude = true
+) {
+ let data = props.createHeadAfterEventData(pageCode, formAreaCode, tableAreaCode, moduleId, key, value);
+
+ // 过滤掉删除行,表头编辑后不应该关注表体删除行,删除行传到后台可能出现问题。
+ filterDeleteLine(data, tableAreaCode);
+
+ // 处理上行流量优化
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode]);
+ if (bodyFields) {
+ data.card.body[tableAreaCode] = simplifyDataByFields(
+ data.card.body[tableAreaCode],
+ true,
+ bodyFields,
+ isInclude
+ );
+ } else {
+ data.card.body[tableAreaCode] = simplifyData(data.card.body[tableAreaCode]);
+ }
+
+ userobject = userobject ? userobject : {};
+ data.userobject = userobject;
+ return data;
+}
+
+/**
+ * 处理表头编辑后事件返回结果的公共方法(处理返回是差异更新的数据)
+ * @param {*} props
+ * @param {*} formAreaCode
+ * @param {*} tableAreaCode
+ * @param {*} data
+ */
+function processBillCardHeadEditResult(props, formAreaCode, tableAreaCode, data) {
+ if (data && data.billCard) {
+ if (data.billCard.head) {
+ props.form.setAllFormValue({ [formAreaCode]: data.billCard.head[formAreaCode] });
+ }
+ if (data.billCard.body) {
+ props.cardTable.updateDiffDataByRowId(tableAreaCode, data.billCard.body[tableAreaCode]);
+ }
+ }
+}
+
+/**
+ * 创建一主多子表头编辑后事件数据
+ * @param {*} props
+ * @param {*} pageCode 页面编码
+ * @param {*} formAreaCode 表头区域
+ * @param {*} tableAreaCodes 表体区域,数组
+ * @param {*} moduleId 当前区域
+ * @param {*} key
+ * @param {*} value
+ * @param {*} userobject 自定义属性
+ */
+function createExtBillHeadAfterEventData(
+ props,
+ pageCode,
+ formAreaCode,
+ tableAreaCodes,
+ moduleId,
+ key,
+ value,
+ userobject
+) {
+ let data = props.createHeadAfterEventData(pageCode, formAreaCode, tableAreaCodes, moduleId, key, value);
+ // 处理上行流量优化
+ data.card.head[formAreaCode] = simplifyData(data.card.head[formAreaCode], false);
+ if (tableAreaCodes instanceof Array) {
+ tableAreaCodes.forEach((tableId) => {
+ data.card.bodys[tableId] = simplifyData(data.card.bodys[tableId], false);
+ });
+ }
+ userobject = userobject ? userobject : {};
+ data.userobject = userobject;
+ return data;
+}
+
+/**
+ * 处理表头编辑后事件返回结果的公共方法(处理返回是差异更新的数据)
+ * @param {*} props
+ * @param {*} formAreaCode
+ * @param {*} tableAreaCodes 表体区域,数组
+ * @param {*} data res.data
+ */
+function processExtBillCardHeadEditResult(props, formAreaCode, tableAreaCodes, data) {
+ if (data && data.extbillcard) {
+ if (data.extbillcard.head) {
+ props.form.setAllFormValue({ [formAreaCode]: data.extbillcard.head[formAreaCode] });
+ }
+ if (data.extbillcard.bodys) {
+ if (tableAreaCodes instanceof Array) {
+ tableAreaCodes.forEach((tableId) => {
+ if (data.extbillcard.bodys[tableId]) {
+ props.cardTable.updateDiffDataByRowId(tableId, data.extbillcard.bodys[tableId], false, false);
+ }
+ });
+ } else {
+ props.cardTable.updateDiffDataByRowId(
+ tableAreaCodes,
+ data.extbillcard.bodys[tableAreaCodes],
+ false,
+ false
+ );
+ }
+ }
+ }
+}
+
+export {
+ createGridAfterEventData,
+ createBodyAfterEventData,
+ createBodyAfterEventData4Son,
+ createSonAfterEventData4Son,
+ createHeadAfterEventData,
+ createExtBodyAfterEventData,
+ processBillCardHeadEditResult,
+ processBillCardGrandSonEditResult,
+ processBillCardBodyEditResult,
+ processBillCardBodyEditResultNotAddRow,
+ processGridEditResult,
+ processExtBillCardBodyEditResult,
+ createExtBillHeadAfterEventData,
+ processExtBillCardHeadEditResult,
+ createBodyAfterEventData4Batch,
+ processBillCardBodyEditResult4Batch,
+ createGridAfterEventDataBatch,
+ processGridEditResultBatch,
+ createBodyAfterEventData4BatchMore,
+ processExtBillCardBodyEditResult4Batch,
+ createBodyAfterEventData4BatchHasSon,
+ processBillCardBodyEditResultNotAddRowForSO
+};
+
+/*FySM9m52dyc0CNE1ub/NjojvWtqkk1r30E3Z9nL2PVw=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/autoAddRowUtil.js b/src/scmpub/scmpub/pub/tool/autoAddRowUtil.js
new file mode 100644
index 0000000..672a3bb
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/autoAddRowUtil.js
@@ -0,0 +1,75 @@
+/*okadrVteW1XEOQBzOL276FBBEQifXmTUZjW5UMB+Lxk=*/
+/*
+ * @PageInfo: 表格自动增行公共处理类 (使用此类,则不要设置平台提供的自动增行服务)
+ * @Author: guozhq
+ * @Date: 2019-07-01 11:21:56
+ * @Last Modified by: wangceb
+ * @Last Modified time: 2019-07-22 10:30:49
+ */
+import { RownoUtils as CardTableRownoUtils } from './cardTableTools/RownoUtil';
+import { RownoUtils as EditTableRownoUtils } from './editTableTools/RownoUtil';
+
+/**
+ * editTable自动增行功能(默认处理增加行号功能)
+ * @param {*} props
+ * @param {*} tableAreaCode 表格区域编码
+ * @param {*} currentIndex 当前编辑的行
+ * @param {*} config { isMuli, isAutoAddFunc, autoAddFunc, hasCrownoField = true, crownoField } 是否是多选、是否自动增行、自动增行自定义处理、是否存在行号字段、自定义行号字段
+ */
+function processEditTableAutoAddRow(props, tableAreaCode, currentIndex, config = {}) {
+ let { isMuli, isAutoAddFunc, autoAddFunc, hasCrownoField = true, crownoField } = config;
+ // 判断是否是多选
+ if (isMuli) {
+ return;
+ }
+ // 自定义是否增行逻辑
+ if (isAutoAddFunc && isAutoAddFunc()) {
+ return;
+ }
+ // 判断当前行是否是最后一行
+ let length = props.editTable.getNumberOfRows(tableAreaCode, false);
+ if (length == currentIndex + 1) {
+ if (autoAddFunc) {
+ autoAddFunc();
+ } else {
+ props.editTable.addRow(tableAreaCode, length);
+ if (hasCrownoField) {
+ EditTableRownoUtils.setRowNo(props, tableAreaCode, crownoField ? crownoField : 'crowno');
+ }
+ }
+ }
+}
+
+/**
+ * cardTable自动增行功能(默认处理增加行号功能)
+ * @param {*} props
+ * @param {*} tableAreaCode 表格区域编码
+ * @param {*} currentIndex 当前编辑的行
+ * @param {*} config { isMuli, isAutoAddFunc, autoAddFunc, hasCrownoField = true, crownoField } 是否是多选、是否自动增行、自动增行自定义处理、是否存在行号字段、自定义行号字段
+ */
+function processCardTableAutoAddRow(props, tableAreaCode, currentIndex, config = {}) {
+ let { isMuli, isAutoAddFunc, autoAddFunc, hasCrownoField = true, crownoField, defaultValue } = config;
+ // 判断是否是多选
+ if (isMuli) {
+ return;
+ }
+ // 自定义是否增行逻辑 如果返回是true 则可以自动增行,false则不自动增行
+ if (isAutoAddFunc && !isAutoAddFunc()) {
+ return;
+ }
+ // 判断当前行是否是最后一行
+ let length = props.cardTable.getNumberOfRows(tableAreaCode, false);
+ if (length == currentIndex + 1) {
+ if (autoAddFunc) {
+ autoAddFunc();
+ } else {
+ props.cardTable.addRow(tableAreaCode, length, defaultValue, false);
+ if (hasCrownoField) {
+ CardTableRownoUtils.setRowNo(props, tableAreaCode, crownoField ? crownoField : 'crowno');
+ }
+ }
+ }
+}
+export { processEditTableAutoAddRow, processCardTableAutoAddRow };
+
+/*okadrVteW1XEOQBzOL276FBBEQifXmTUZjW5UMB+Lxk=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/cardTableTools/RownoUtil.js b/src/scmpub/scmpub/pub/tool/cardTableTools/RownoUtil.js
new file mode 100644
index 0000000..a36558e
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/cardTableTools/RownoUtil.js
@@ -0,0 +1,350 @@
+/*ZGwwJjdOnNJ+WCuFIxmFVZVK35FHrxovfyItCAnEAPQ=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 行号处理
+ * @Date: 2018-06-06 14:19:13
+ * @Last Modified by: liulux
+ */
+import { formatAcuracy } from 'nc-lightapp-front';
+// 行号开始
+const START_VALUE = 10;
+// 行号步长
+const STEP_VALUE = 10;
+// 最小行号
+const MIN_VALUE = 0.00000001;
+// 零
+const ZERO_VALUE = 0;
+
+// 精度
+const DIGIT_POWER = 8;
+
+// 行号默认的key
+const ROWNO_KEY = 'crowno';
+/**
+ *
+ * 为cardtable 提供的重置行号方法
+ * @param {*} props
+ * @param {区域编码} moduleId
+ * @param {行号字段的编码,默认为crowno} rownoKey
+ */
+function resetRowNo(props, moduleId, rownoKey) {
+ if (rownoKey == undefined) {
+ rownoKey = ROWNO_KEY;
+ }
+
+ // 所有行数
+ let allRows = props.cardTable.getAllRows(moduleId);
+ for (let i = 0; i < allRows.length; i++) {
+ let crowno = i * 10 + 10;
+ // props.cardTable.setValByKeyAndIndex(moduleId, i, rownoKey, {
+ // value: crowno.toString(),
+ // display: crowno.toString()
+ // });
+ allRows[i].values[rownoKey].value = crowno.toString();
+ allRows[i].values[rownoKey].display = crowno.toString();
+ }
+ props.cardTable.updateTableData(moduleId, { rows: allRows }, null, false);
+}
+
+/**
+ * 将cardtable表体所有行号为空的行补充上行号
+ * @param {*} props
+ * @param {区域编码} moduleId
+ * @param {行号字段的编码} rownoKey
+ */
+function setRowNo(props, moduleId, rownoKey) {
+ if (rownoKey == undefined) {
+ rownoKey = ROWNO_KEY;
+ }
+ // 所有行数 适配平台,增加第二个参数true add by--2022.04.26
+ // let rowcount = props.cardTable.getNumberOfRows(moduleId, true);
+ let rowcount = props.cardTable.getNumberOfRows(moduleId);
+
+ if (rowcount <= 0) {
+ return;
+ }
+
+ let isContinue = true;
+ while (isContinue) {
+ // 先统计所有行号为空的行,若空行后存在行号有值的行,按照插入到该行处理
+ // 否则按照新增行的行号处理
+ let nullRowIndexs = [];
+ let tagRowIndex = -1;
+ // 根据空行决定在哪一行前面增加了多少空行
+ for (let index = 0; index < rowcount; index++) {
+ // 所有行遍历后,中止循环
+ if (index == rowcount - 1) {
+ isContinue = false;
+ }
+ let crowno = (props.cardTable.getValByKeyAndIndex(moduleId, index, rownoKey) || {}).value;
+ // if (crowno == null || crowno == '') {
+ if (!crowno) {
+ nullRowIndexs.push(index);
+ tagRowIndex = -1;
+ } else if (nullRowIndexs.length == 0) {
+ // 没有空行不用处理
+ continue;
+ } else {
+ tagRowIndex = index;
+ break;
+ }
+ }
+
+ let uaRowNo = null;
+ // 插入目标行不等于-1时 按照插入行处理
+ if (tagRowIndex != -1) {
+ uaRowNo = insertLinesByIndex(props, moduleId, rownoKey, tagRowIndex, nullRowIndexs);
+ uaRowNo = adjustRowNoForInsert(props, moduleId, rownoKey, tagRowIndex, uaRowNo);
+ } else {
+ uaRowNo = addLinesByIndex(props, moduleId, rownoKey, nullRowIndexs);
+ }
+ // 得到开始行、结束行行号
+ // 开始行号:比粘贴行行号略小的行,结束行号:粘贴行
+ // 设值到界面上
+ // setValByKeyAndIndex不适合批量渲染,会造成效率问题
+ // for (let index = 0; index < nullRowIndexs.length; index++) {
+ // let row = nullRowIndexs[index];
+ // props.cardTable.setValByKeyAndIndex(moduleId, row, rownoKey, {
+ // value: uaRowNo[index].toString(),
+ // display: uaRowNo[index].toString()
+ // });
+ // }
+
+ let allrows = props.cardTable.getAllRows(moduleId);
+ for (let index = 0; index < nullRowIndexs.length; index++) {
+ let row = nullRowIndexs[index];
+ allrows[row].values[rownoKey].value = uaRowNo[index].toString();
+ allrows[row].values[rownoKey].display = uaRowNo[index].toString();
+ }
+ props.cardTable.updateTableData(moduleId, { rows: allrows }, null, false);
+ }
+}
+
+/*
+ * 将cardtable表体所有行号为空的行补充上行号
+ * @param {*} props
+ * @param {区域编码} moduleId
+ * @param {行号字段的编码} rownoKey
+ * @param {特殊号(物料分组用)} vspecialcode
+ */
+function setRowMaterilNo(props, moduleId, rownoKey, vspecialcode) {
+ if (rownoKey == undefined) {
+ rownoKey = ROWNO_KEY;
+ }
+ // 所有行数
+ let rowcount = props.cardTable.getNumberOfRows(moduleId);
+
+ if (rowcount <= 0) {
+ return;
+ }
+
+ let isContinue = true;
+ while (isContinue) {
+ // 先统计所有行号为空的行,若空行后存在行号有值的行,按照插入到该行处理
+ // 否则按照新增行的行号处理
+ let nullRowIndexs = [];
+ let tagRowIndex = -1;
+ // 根据空行决定在哪一行前面增加了多少空行
+ for (let index = 0; index < rowcount; index++) {
+ // 所有行遍历后,中止循环
+ if (index == rowcount - 1) {
+ isContinue = false;
+ }
+ let crowno = (props.cardTable.getValByKeyAndIndex(moduleId, index, rownoKey) || {}).value;
+ let groupcode = (props.cardTable.getValByKeyAndIndex(moduleId, index, vspecialcode) || {}).value;
+
+ // if (crowno == null || crowno == '') {
+ if (!crowno && !groupcode) {
+ nullRowIndexs.push(index);
+ tagRowIndex = -1;
+ } else if (nullRowIndexs.length == 0) {
+ // 没有空行不用处理
+ continue;
+ } else {
+ tagRowIndex = index;
+ break;
+ }
+ }
+
+ let uaRowNo = null;
+ // 插入目标行不等于-1时 按照插入行处理
+ if (tagRowIndex != -1) {
+ uaRowNo = insertLinesByIndex(props, moduleId, rownoKey, tagRowIndex, nullRowIndexs);
+ uaRowNo = adjustRowNoForInsert(props, moduleId, rownoKey, tagRowIndex, uaRowNo);
+ } else {
+ uaRowNo = addLinesByIndex(props, moduleId, rownoKey, nullRowIndexs);
+ }
+ // 得到开始行、结束行行号
+ // 开始行号:比粘贴行行号略小的行,结束行号:粘贴行
+ // 设值到界面上
+ for (let index = 0; index < nullRowIndexs.length; index++) {
+ let row = nullRowIndexs[index];
+ props.cardTable.setValByKeyAndIndex(moduleId, row, rownoKey, {
+ value: uaRowNo[index].toString(),
+ display: uaRowNo[index].toString()
+ });
+ }
+ }
+}
+
+/**
+ * 插入的处理,对于插入行生成的行号进行靴位处理
+ * 所有元素比较,如果不重复,则可以削位
+ * @param {} iStart
+ * @param {*} iEnd
+ * @param {*} uaRowNo
+ */
+function adjustRowNoForInsert(props, moduleId, rownoKey, iEnd, uaRowNo) {
+ let iStart = iEnd - uaRowNo.length - 1;
+ let dPreviousRowNO = (props.cardTable.getValByKeyAndIndex(moduleId, iStart, rownoKey) || {}).value;
+ dPreviousRowNO = dPreviousRowNO ? dPreviousRowNO : ZERO_VALUE;
+ let dNextRowNO = (props.cardTable.getValByKeyAndIndex(moduleId, iEnd, rownoKey) || {}).value;
+
+ let iSetLen = uaRowNo.length;
+ let uaRowNoDgt = [];
+ uaRowNo.forEach((row) => {
+ uaRowNoDgt.push(row);
+ });
+ let iStepDgt = DIGIT_POWER;
+
+ while (true) {
+ let rowNoMap = {};
+
+ rowNoMap[dPreviousRowNO] = true;
+ rowNoMap[dNextRowNO] = true;
+
+ for (let index = 0; index < iSetLen; index++) {
+ let curRow = uaRowNoDgt[index];
+ if (
+ new Number(dPreviousRowNO) - new Number(curRow) >= 0 ||
+ new Number(dNextRowNO) - new Number(curRow) <= 0
+ ) {
+ break;
+ }
+ rowNoMap[curRow] = true;
+ }
+
+ if (Object.getOwnPropertyNames(rowNoMap).length !== iSetLen + 2) {
+ break;
+ }
+ for (let i = 0; i < iSetLen; i++) {
+ uaRowNo[i] = uaRowNoDgt[i];
+ }
+ if (iStepDgt <= 0) {
+ break;
+ }
+ // 给新插入的元素削位
+ --iStepDgt;
+ for (let i = 0; i < iSetLen; i++) {
+ let temp = removeThousands(formatAcuracy(uaRowNoDgt[i], iStepDgt));
+ uaRowNoDgt[i] = temp == '0.00000000' ? '0.00000001' : temp;
+ }
+ }
+
+ // // 去除逗号(1,905->1905)
+ // let retUaRowNo = [];
+ // uaRowNo.forEach(rowNo => {
+ // retUaRowNo.push(rowNo.replace(',', ''));
+ // });
+
+ return uaRowNo;
+}
+
+/**
+ * 新增到最后行的行号处理
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} rownoKey
+ * @param {*} nullRowIndexs
+ */
+function addLinesByIndex(props, moduleId, rownoKey, nullRowIndexs) {
+ let rowcount = props.cardTable.getNumberOfRows(moduleId);
+ let dPreviousRowNO = getRowNoUFDoubleMax(props, moduleId, rownoKey, rowcount);
+ let uaRowNo = new Array(nullRowIndexs.length);
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ uaRowNo[i] = (i + 1) * 10 + Number(dPreviousRowNO);
+ }
+ return uaRowNo;
+}
+
+function getRowNoUFDoubleMax(props, moduleId, rownoKey, nRow) {
+ if (nRow === 1) {
+ return ZERO_VALUE;
+ }
+ let dMaxValue = ZERO_VALUE;
+ let dEveryValue = null;
+
+ for (let i = 0; i < nRow; i++) {
+ dEveryValue = props.cardTable.getValByKeyAndIndex(moduleId, i, rownoKey).value;
+
+ if (dEveryValue && Number(dMaxValue) < Number(dEveryValue)) {
+ dMaxValue = Number(dEveryValue);
+ }
+ }
+
+ return dMaxValue;
+}
+
+function insertLinesByIndex(props, moduleId, rownoKey, tagRowIndex, nullRowIndexs) {
+ let dPreviousRowNO = getNotNullRowBefore(props, moduleId, rownoKey, tagRowIndex);
+ let dNextRowNO = props.cardTable.getValByKeyAndIndex(moduleId, tagRowIndex, rownoKey).value;
+ let uaRowNo = new Array(nullRowIndexs.length);
+ // 避免首末行号相等的情况
+ if (dPreviousRowNO === dNextRowNO) {
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ uaRowNo[i] = dPreviousRowNO;
+ }
+ } else if (dNextRowNO == null || dNextRowNO == '') {
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ uaRowNo[i] = (i + 1) * 10 + Number(dPreviousRowNO);
+ }
+ } else {
+ // 计算步长
+ let dStep = (dNextRowNO - dPreviousRowNO) / (nullRowIndexs.length + 1);
+ let tempRowNo = dPreviousRowNO;
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ // 限制生成的行号不能大于粘贴行的行号
+ tempRowNo = Number(tempRowNo) + Number(dStep);
+ let temp = removeThousands(formatAcuracy(tempRowNo, DIGIT_POWER));
+ uaRowNo[i] = temp == '0.00000000' ? '0.00000001' : temp;
+ }
+ }
+ return uaRowNo;
+}
+
+/**
+ * 取目标行前面不为空的行号值
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} rownoKey
+ * @param {目标行index} iRow
+ */
+function getNotNullRowBefore(props, moduleId, rownoKey, iRow) {
+ let rowcount = props.cardTable.getNumberOfRows(moduleId);
+ if (rowcount == 1) {
+ return ZERO_VALUE;
+ }
+ for (let index = iRow - 1; index >= 0; index--) {
+ let crowno = (props.cardTable.getValByKeyAndIndex(moduleId, index, rownoKey) || {}).value;
+ if (crowno != '' && crowno != undefined) {
+ return crowno;
+ }
+ }
+ return ZERO_VALUE;
+}
+
+//移除千分位
+function removeThousands(val) {
+ // 这里要区分 0 ‘’ null
+ return val ? val.toString().replace(/\,/gi, '') : val;
+}
+
+const RownoUtils = {
+ setRowMaterilNo,
+ setRowNo,
+ resetRowNo
+};
+
+export { RownoUtils };
+
+/*ZGwwJjdOnNJ+WCuFIxmFVZVK35FHrxovfyItCAnEAPQ=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/cardTableTools/compareUtils.js b/src/scmpub/scmpub/pub/tool/cardTableTools/compareUtils.js
new file mode 100644
index 0000000..762411f
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/cardTableTools/compareUtils.js
@@ -0,0 +1,103 @@
+/*l+SqBW7h7eMW37ihsc1uNbS0T8eP6jkuVSdxx5SU9H0=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 差异更新
+ * @Date: 2018-12-26 13:41:11
+ * @Last Modified by: CongKe
+ * @Last Modified time: 2020-02-17 15:29:27
+ */
+function updateDtaForCompareByPk(props, bill, config) {
+ let { headAreaId, bodyAreaId, bodyPKfield } = config;
+ props.form.setAllFormValue({ [headAreaId]: bill.head[headAreaId] });
+ bill.head[headAreaId].rows = props.form.getAllFormValue(headAreaId).rows;
+
+ let newBodyData = bill.body[bodyAreaId];
+ let oldtabledata = props.cardTable.getVisibleRows(bodyAreaId);
+ let rowidPkMap = {};
+ oldtabledata.forEach(rowdata => {
+ let pk = rowdata.values[bodyPKfield].value;
+ rowidPkMap[pk] = rowdata.rowid;
+ });
+
+ // 补充后台返回的数据结构的rowid,后台返回结构的rowid为行数据的主键
+ newBodyData.rows.forEach(rowdata => {
+ let rowid = rowidPkMap[rowdata.rowid];
+ rowdata.rowid = rowid;
+ });
+
+ let fulltabledata = props.cardTable.updateDataByRowId(bodyAreaId, newBodyData, true);
+ bill.body[bodyAreaId] = fulltabledata;
+
+ return bill;
+}
+
+/**
+ * 一主多子单点差异更新
+ * @param {*} props
+ * @param {*} grid res.data
+ * @param {*} config
+ */
+function updateGridDataForCompareByPk(props, grid, config) {
+ let { AreaId, bodyPKfield } = config;
+ let newData = grid[AreaId];
+ let oldData = props.editTable.getAllRows(AreaId);
+ let rowidPkMap = {};
+ oldData.forEach(rowdata => {
+ let pk = rowdata.values[bodyPKfield].value;
+ rowidPkMap[pk] = rowdata.rowid;
+ });
+ // 补充后台返回的数据结构的rowid,后台返回结构的rowid为行数据的主键
+ newData.rows.forEach(rowdata => {
+ let rowid = rowidPkMap[rowdata.rowid];
+ rowdata.rowid = rowid;
+ });
+ //props.editTable.updateDiffDataByRowId(AreaId, newData);
+ props.editTable.updateDataByRowId(AreaId, newData);
+}
+
+/**
+ * 一主多子单点差异更新
+ * @param {*} props
+ * @param {*} bill res.data
+ * @param {*} config {如果不需要处理Rowid需要传isHaveRowid:true,否则不传}
+ */
+function updateExtBillDataForCompareByPk(props, bill, config) {
+ let { headAreaId, bodyIdAndPkMap, baseBack, isHaveRowid } = config;
+ props.form.setAllFormValue({ [headAreaId]: bill.head[headAreaId] });
+ bill.head[headAreaId].rows = props.form.getAllFormValue(headAreaId).rows;
+ bodyIdAndPkMap.forEach((bodyAreaId, bodyPKfield) => {
+ let newBodyData = bill.bodys[bodyAreaId];
+ if (newBodyData) {
+ if (!isHaveRowid) {
+ let oldtabledata = props.cardTable.getVisibleRows(bodyAreaId);
+ let rowidPkMap = new Map();
+ oldtabledata.forEach(rowdata => {
+ let pk = rowdata.values[bodyPKfield];
+ pk = !pk ? pk : pk.value;
+ rowidPkMap.set(pk, rowdata.rowid);
+ });
+ // 补充后台返回的数据结构的rowid,后台返回结构的rowid为行数据的主键
+ newBodyData.rows.forEach(rowdata => {
+ if (JSON.stringify(rowdata.values) != '{}' || baseBack) {
+ // 后台返回数据 表体pk放置到了rowid上面
+ let bpk = rowdata.rowid;
+ let rowid = rowidPkMap.get(bpk);
+ rowdata.rowid = rowid;
+ }
+ });
+ }
+ let fulltabledata;
+ if (baseBack) {
+ // 后台新增了表体行数据,进行diff更新
+ fulltabledata = props.cardTable.updateDiffDataByRowId(bodyAreaId, newBodyData, true, true, false);
+ } else {
+ fulltabledata = props.cardTable.updateDataByRowId(bodyAreaId, newBodyData, true);
+ }
+ bill.bodys[bodyAreaId] = fulltabledata;
+ }
+ });
+ return bill;
+}
+export { updateDtaForCompareByPk, updateExtBillDataForCompareByPk, updateGridDataForCompareByPk };
+
+/*l+SqBW7h7eMW37ihsc1uNbS0T8eP6jkuVSdxx5SU9H0=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/cardTableTools/index.js b/src/scmpub/scmpub/pub/tool/cardTableTools/index.js
new file mode 100644
index 0000000..840383a
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/cardTableTools/index.js
@@ -0,0 +1,15 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: chaiwx
+ * @PageInfo: 工具
+ * @Date: 2018-06-06 14:18:48
+ * @Last Modified by: chaiwx
+ * @Last Modified time: 2018-06-20 13:35:51
+ */
+
+import { rowCopyPasteUtils } from './rowCopyPasteUtils';
+import { RownoUtils } from './RownoUtil';
+
+export { rowCopyPasteUtils, RownoUtils };
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils.js b/src/scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils.js
new file mode 100644
index 0000000..37b97a0
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils.js
@@ -0,0 +1,359 @@
+/*bSz7so+nmXJf3x6ZSaY2aFqb7lj1LRiUoHM7ROfJnnw=*/
+import { deepClone } from 'nc-lightapp-front';
+
+/*
+ * @Author: chaiwx
+ * @PageInfo: 表体复制粘贴行工具文件
+ * @Date: 2018-06-15 15:33:31
+ * @Last Modified by: yinliangc
+ * @Last Modified time: 2023-11-14 19:35:44
+ */
+
+// 表体肩部按钮初始化状态
+const BTNINITSTATUS = true;
+// 表体肩部按钮复制中状态
+const BTNPASTESTATUS = false;
+
+/**
+ * 复制-单行(通常用于操作列复制)
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} record --操作列操作中的行数据
+ * @param {*} initBtns --初始化显示的按钮
+ * @param {*} pasteBtns --复制中显示的按钮
+ */
+function copyRow(props, moduleId, record, initBtns, pasteBtns) {
+ // 缓存复制的数据
+ // this.setState({
+ // copyRowDatas: record
+ // });
+ this.copyRowDatas = record;
+ // 设置按钮可见性
+ setBtnVisible(props, initBtns, pasteBtns, BTNPASTESTATUS);
+ // 多选框不可用
+ props.cardTable.setAllCheckboxAble(moduleId, false);
+ return record;
+}
+
+/**
+ * 复制-多行(通常用于肩部复制)
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} initBtns
+ * @param {*} pasteBtns
+ */
+function copyRows(props, moduleId, initBtns, pasteBtns) {
+ // 缓存选中行数据
+ let checkArr = props.cardTable.getCheckedRows(moduleId);
+ if (checkArr && checkArr.length > 0) {
+ // this.setState({
+ // copyRowDatas: checkArr
+ // });
+ this.copyRowDatas = checkArr;
+ setBtnVisible(props, initBtns, pasteBtns, BTNPASTESTATUS);
+ props.cardTable.setAllCheckboxAble(moduleId, false);
+ return checkArr;
+ }
+}
+
+function extCopyRows(props, moduleId, initBtns, pasteBtns) {
+ // 缓存选中行数据
+ let checkArr = props.cardTable.getCheckedRows(moduleId);
+ if (checkArr && checkArr.length > 0) {
+ // this.setState({
+ // copyRowDatas: checkArr
+ // });
+ this.copyRowDatas = checkArr;
+ if (!this.copyLineDatas) {
+ this.copyLineDatas = {};
+ }
+ // NCC-371064 这个问题修改成了判断this.copyLineDatas[moduleId]有值才设置值,这种是错误的
+ // if(this.copyLineDatas && this.copyLineDatas[moduleId]){
+ // NCC-386416 这里只要判断有这个对象就可以了,里面的属性是可以动态给的
+ if (this.copyLineDatas) {
+ this.copyLineDatas[moduleId] = checkArr;
+ }
+ setBtnVisible(props, initBtns, pasteBtns, BTNPASTESTATUS);
+ props.cardTable.setAllCheckboxAble(moduleId, false);
+ return checkArr;
+ }
+}
+
+/**
+ * 粘贴数据到index下方(通常用于操作列粘贴)
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} index
+ * @param {*} initBtns --复制前显示按钮
+ * @param {*} pasteBtns --复制后显示按钮
+ * @param {*} fieldsForClear --需要清空的字段
+ */
+function extPasteRowsToIndex(props, moduleId, index, initBtns, pasteBtns, fieldsForClear, grandSonFields4Clear) {
+ if (!this.copyLineDatas) {
+ this.copyLineDatas = {};
+ }
+ this.copyRowDatas = this.copyLineDatas[moduleId];
+ // 粘贴至此
+ pasteLines(props, moduleId, this.copyRowDatas, index - 1, fieldsForClear, grandSonFields4Clear);
+ // 清空缓存,切换按钮
+ // this.setState({
+ // copyRowDatas: null
+ // });
+ this.copyRowDatas = null;
+ this.copyLineDatas[moduleId] = null;
+ setBtnVisible(props, initBtns, pasteBtns, BTNINITSTATUS);
+ props.cardTable.selectAllRows(moduleId, false);
+ props.cardTable.setAllCheckboxAble(moduleId, true);
+}
+
+/**
+ * 粘贴至末行
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} initBtns
+ * @param {*} pasteBtns
+ * @param {*} fieldsForClear
+ */
+function extPasteRowsToTail(props, moduleId, initBtns, pasteBtns, fieldsForClear, grandSonFields4Clear) {
+ // 批量粘贴至末行
+ let rowCount = props.cardTable.getNumberOfRows(moduleId);
+ extPasteRowsToIndex.call(
+ this,
+ props,
+ moduleId,
+ rowCount,
+ initBtns,
+ pasteBtns,
+ fieldsForClear,
+ grandSonFields4Clear
+ );
+}
+
+/**
+ * 取消复制
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} initBtns
+ * @param {*} pasteBtns
+ */
+function extCancel(props, moduleId, initBtns, pasteBtns) {
+ // 清空复制行缓存数据
+ // this.setState({
+ // copyRowDatas: null
+ // });
+ this.copyRowDatas = null;
+ if (!this.copyLineDatas) {
+ this.copyLineDatas = {};
+ }
+ this.copyLineDatas[moduleId] = null;
+ setBtnVisible(props, initBtns, pasteBtns, BTNINITSTATUS);
+ props.cardTable.selectAllRows(moduleId, false);
+ props.cardTable.setAllCheckboxAble(moduleId, true);
+}
+
+/**
+ * 粘贴数据到index下方(通常用于操作列粘贴)
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} index
+ * @param {*} initBtns --复制前显示按钮
+ * @param {*} pasteBtns --复制后显示按钮
+ * @param {*} fieldsForClear --需要清空的字段
+ */
+function pasteRowsToIndex(props, moduleId, index, initBtns, pasteBtns, fieldsForClear, grandSonFields4Clear) {
+ // 粘贴至此
+ pasteLines(props, moduleId, this.copyRowDatas, index - 1, fieldsForClear, grandSonFields4Clear);
+ // 清空缓存,切换按钮
+ // this.setState({
+ // copyRowDatas: null
+ // });
+ this.copyRowDatas = null;
+ setBtnVisible(props, initBtns, pasteBtns, BTNINITSTATUS);
+ props.cardTable.selectAllRows(moduleId, false);
+ props.cardTable.setAllCheckboxAble(moduleId, true);
+}
+
+/**
+ * 粘贴至末行
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} initBtns
+ * @param {*} pasteBtns
+ * @param {*} fieldsForClear
+ */
+function pasteRowsToTail(props, moduleId, initBtns, pasteBtns, fieldsForClear, grandSonFields4Clear) {
+ // 批量粘贴至末行
+ let rowCount = props.cardTable.getNumberOfRows(moduleId);
+ pasteRowsToIndex.call(this, props, moduleId, rowCount, initBtns, pasteBtns, fieldsForClear, grandSonFields4Clear);
+}
+
+/**
+ * 取消复制
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} initBtns
+ * @param {*} pasteBtns
+ */
+function cancel(props, moduleId, initBtns, pasteBtns) {
+ // 清空复制行缓存数据
+ // this.setState({
+ // copyRowDatas: null
+ // });
+ this.copyRowDatas = null;
+ setBtnVisible(props, initBtns, pasteBtns, BTNINITSTATUS);
+ props.cardTable.selectAllRows(moduleId, false);
+ props.cardTable.setAllCheckboxAble(moduleId, true);
+}
+
+/**
+ * 批量复制方法
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} copyRowDatas
+ * @param {*} index
+ * @param {*} fieldsForClear
+ */
+function pasteLines(props, moduleId, copyRowDatas, index, fieldsForClear, grandSonFields4Clear) {
+ //deepClone效率存在问题 使用JSON.parse 目测没问题
+ //let data = deepClone(copyRowDatas);
+ let data = JSON.parse(JSON.stringify(copyRowDatas));
+ if (data) {
+ let copyRowIds = [];
+ if (data instanceof Array) {
+ // 多行
+ // 选中行行数
+ let checkCount = data.length;
+ let insertData = [];
+ // 循环粘贴至末行
+ for (let i = 0; i < checkCount; i++) {
+ let rowData = data[i].data;
+ copyRowIds.push(rowData.rowid);
+ clearFields(rowData, fieldsForClear);
+ insertData.push(rowData);
+ }
+ props.cardTable.insertRowsAfterIndex(moduleId, insertData, index);
+ } else {
+ // 单行
+ clearFields(data, fieldsForClear);
+ copyRowIds.push(data.rowid);
+ props.cardTable.insertRowsAfterIndex(moduleId, data, index);
+ }
+ pasteGrandSonsLines(props, moduleId, copyRowIds, index, grandSonFields4Clear);
+ }
+}
+
+/**
+ * 粘贴孙表
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} copyRowIds
+ * @param {*} index
+ * @param {*} grandSonFields4Clear
+ */
+function pasteGrandSonsLines(props, moduleId, copyRowIds, index, grandSonFields4Clear) {
+ if (!grandSonFields4Clear) {
+ return;
+ }
+ // 孙表复制粘贴逻辑
+ let rows = props.cardTable.getAllRows(moduleId);
+ // 获取原始行rowid
+ let grandSonCopyDataArray = [];
+ let sonDatas = props.cardTable.getAllGrandData({ parentId: moduleId });
+ copyRowIds.forEach((rowid) => {
+ let sonData = sonDatas[rowid];
+ sonData = deepClone(sonData);
+ let grandSonCopyDataMap = {};
+ for (const grandSonArea in sonData) {
+ if (sonData.hasOwnProperty(grandSonArea)) {
+ const sonRows = sonData[grandSonArea].rows;
+ clearFields(sonRows, grandSonFields4Clear);
+ grandSonCopyDataMap[grandSonArea] = sonRows;
+ }
+ }
+ grandSonCopyDataArray.push(grandSonCopyDataMap);
+ });
+ // 获取目标Rowid
+ for (let i = 0; i < copyRowIds.length; i++) {
+ let rowid = rows[i + index + 1].rowid;
+ let grandSonCopyDataMap = grandSonCopyDataArray[i];
+ for (const grandSonArea in grandSonCopyDataMap) {
+ if (grandSonCopyDataMap.hasOwnProperty(grandSonArea)) {
+ const sonRows = grandSonCopyDataMap[grandSonArea];
+ sonRows.forEach((row) => {
+ row.status = '2';
+ row.rowid = null;
+ });
+ props.cardTable.setGrandTableData({
+ rowid: rowid,
+ parentId: moduleId,
+ tableId: grandSonArea,
+ data: { rows: sonRows },
+ shouldForceUpdate: false,
+ isCache: false,
+ isDiffUpdate: false
+ });
+ }
+ }
+ }
+}
+
+/**
+ * 清空要清空的字段
+ * @param {*} rowData
+ * @param {*} fieldsForClear
+ */
+function clearFields(copyRowDatas, fieldsForClear) {
+ if (fieldsForClear && fieldsForClear instanceof Array) {
+ if (copyRowDatas instanceof Array) {
+ copyRowDatas.forEach((rowData) => {
+ fieldsForClear.forEach((field) => {
+ rowData.values[field] = {
+ value: null,
+ display: null,
+ scale: -1
+ };
+ });
+ });
+ } else {
+ fieldsForClear.forEach((field) => {
+ copyRowDatas.values[field] = {
+ value: null,
+ display: null,
+ scale: -1
+ };
+ });
+ }
+ }
+}
+
+/**
+ * 设置按钮可见性
+ * @param {*} props
+ * @param {*} initBtns
+ * @param {*} pasteBtns
+ * @param {*} status
+ */
+function setBtnVisible(props, initBtns, pasteBtns, status) {
+ if (initBtns) {
+ props.button.setButtonVisible(initBtns, status);
+ }
+ if (pasteBtns) {
+ props.button.setButtonVisible(pasteBtns, !status);
+ }
+}
+
+const rowCopyPasteUtils = {
+ copyRow,
+ copyRows,
+ pasteRowsToIndex,
+ pasteRowsToTail,
+ cancel,
+ extCancel,
+ extCopyRows,
+ extPasteRowsToIndex,
+ extPasteRowsToTail
+};
+
+export { rowCopyPasteUtils };
+
+/*bSz7so+nmXJf3x6ZSaY2aFqb7lj1LRiUoHM7ROfJnnw=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/columnSortUtils.js b/src/scmpub/scmpub/pub/tool/columnSortUtils.js
new file mode 100644
index 0000000..20bfed6
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/columnSortUtils.js
@@ -0,0 +1,64 @@
+/*Lm7XJwk0y0sY3meTnlbg/YY08bgMyJpRn7AMQRjWJl4=*/
+/*
+ * @Author: chaiwx
+ * @PageInfo: 排序工具
+ * @Date: 2018-06-15 15:33:31
+ * @Last Modified by: chaiwx
+ * @Last Modified time: 2019-03-22 13:21:43
+ */
+
+/**
+ * 非数字类型字段按数字进行排序
+ * @param {*} meta 模板
+ * @param {*} moduleId 区域id
+ * @param {*} fields 字段(可已是单个字段或数组)
+ */
+function numberSort(meta, moduleId, fields) {
+ // 行号排序处理
+ meta[moduleId].items.map((item) => {
+ if (fields instanceof Array) {
+ if (fields.includes(item.attrcode)) {
+ setNumberSorter(item);
+ }
+ } else {
+ if (fields == item.attrcode) {
+ setNumberSorter(item);
+ }
+ }
+ });
+}
+
+/**
+ * 设置排序方法
+ * @param {*} item 字段
+ */
+function setNumberSorter(item) {
+ item.sorter = (front, behind) => {
+ let frontValue = Number(front.values[item.attrcode].value);
+ let behindValue = Number(behind.values[item.attrcode].value);
+ return compare(frontValue, behindValue);
+ };
+}
+
+/**
+ * 比较
+ * @param {*} frontValue 第一个值
+ * @param {*} behindValue 第二个值
+ */
+function compare(frontValue, behindValue) {
+ if (frontValue < behindValue) {
+ return -1;
+ } else if (frontValue > behindValue) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+const columnSortUtils = {
+ numberSort
+};
+
+export { columnSortUtils };
+
+/*Lm7XJwk0y0sY3meTnlbg/YY08bgMyJpRn7AMQRjWJl4=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/crossRuleUtils.js b/src/scmpub/scmpub/pub/tool/crossRuleUtils.js
new file mode 100644
index 0000000..55ffa58
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/crossRuleUtils.js
@@ -0,0 +1,140 @@
+/*TZdi7ZD2qc06xBNXw0DDF+4A9mZ6xeSJ4O2D/HflOQY=*/
+import { deepClone } from '../tool';
+function beforeEdit(params) {
+ let { props, appcode, pagecode, headarea, bodyarea, key, isHead, record, billtype } = params;
+ let { pk_org_field, transtypeid_field } = params;
+ let meta = props.meta.getMeta();
+ let item;
+ if (isHead) {
+ let rows = props.cardTable.getCheckedRows(bodyarea);
+ if (!rows && rows.length > 0) {
+ record = rows[0];
+ }
+ item = meta[headarea].items.find((item) => item.attrcode == key);
+ } else {
+ item = meta[bodyarea].items.find((item) => item.attrcode == key);
+ }
+ //如果为自定义页签时,不处理
+ if (!item) {
+ return;
+ }
+ let crossRuleParams = {};
+ crossRuleParams.pk_org = (props.form.getFormItemsValue(headarea, pk_org_field) || {}).value;
+ crossRuleParams.transtype = (props.form.getFormItemsValue(headarea, transtypeid_field) || {}).value;
+ crossRuleParams.key = key;
+ crossRuleParams.billtype = billtype;
+ crossRuleParams.currarea = isHead ? headarea : bodyarea;
+ crossRuleParams.appcode = appcode;
+ crossRuleParams.pagecode = pagecode;
+ crossRuleParams.headarea = headarea;
+ crossRuleParams.bodyarea = bodyarea;
+ crossRuleParams.headdata = filterData({ [headarea]: props.form.getAllFormValue(headarea) }, headarea);
+ crossRuleParams.bodydata = filterData({ [bodyarea]: { rows: [ record ] } }, bodyarea);
+ item._queryCondition = item._queryCondition || item.queryCondition;
+ let queryCondition = isHead ? item._queryCondition : item.queryCondition;
+
+ //如果已经添加狗规则,则不再添加
+ if (queryCondition && queryCondition.crossRuleParams) {
+ return;
+ }
+ if (isHead) {
+ if (item && item.itemtype == 'refer') {
+ item.queryCondition = (params) => {
+ queryCondition = {
+ ...(typeof queryCondition === 'function'
+ ? queryCondition(params)
+ : typeof queryCondition === 'object' ? queryCondition : {})
+ };
+ if (!params) {
+ return queryCondition;
+ }
+ let reftype_key = 'TreeRefActionExt';
+ if (params.refType == 'grid' || params.refType == 'gridTree') {
+ reftype_key = 'GridRefActionExt';
+ }
+ if (
+ !queryCondition[reftype_key] ||
+ queryCondition[reftype_key].indexOf('nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder') < 0
+ ) {
+ queryCondition[reftype_key] = queryCondition[reftype_key]
+ ? queryCondition[reftype_key] + ',nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder'
+ : 'nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder';
+ }
+ if (
+ !queryCondition['UsualGridRefActionExt'] ||
+ queryCondition['UsualGridRefActionExt'].indexOf(
+ 'nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder'
+ ) < 0
+ ) {
+ queryCondition['UsualGridRefActionExt'] = queryCondition['UsualGridRefActionExt']
+ ? queryCondition['UsualGridRefActionExt'] +
+ ',nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder'
+ : 'nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder';
+ }
+ queryCondition.crossRuleParams = JSON.stringify(crossRuleParams);
+ return queryCondition;
+ };
+ }
+ props.meta.setMeta(meta);
+ } else {
+ props.cardTable.setQueryCondition(bodyarea, {
+ [key]: (params) => {
+ queryCondition = {
+ ...(typeof queryCondition === 'function'
+ ? queryCondition(params)
+ : typeof queryCondition === 'object' ? queryCondition : {})
+ };
+ if (!params) {
+ return queryCondition;
+ }
+ let reftype_key = 'TreeRefActionExt';
+ if (params.refType == 'grid' || params.refType == 'gridTree') {
+ reftype_key = 'GridRefActionExt';
+ }
+ if (
+ !queryCondition[reftype_key] ||
+ queryCondition[reftype_key].indexOf('nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder') < 0
+ ) {
+ queryCondition[reftype_key] = queryCondition[reftype_key]
+ ? queryCondition[reftype_key] + ',nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder'
+ : 'nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder';
+ }
+ if (
+ !queryCondition['UsualGridRefActionExt'] ||
+ queryCondition['UsualGridRefActionExt'].indexOf(
+ 'nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder'
+ ) < 0
+ ) {
+ queryCondition['UsualGridRefActionExt'] = queryCondition['UsualGridRefActionExt']
+ ? queryCondition['UsualGridRefActionExt'] +
+ ',nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder'
+ : 'nccloud.web.scmpub.pub.crossrule.CrossRuleSqlBuilder';
+ }
+ queryCondition.crossRuleParams = JSON.stringify(crossRuleParams);
+ return queryCondition;
+ }
+ });
+ }
+}
+
+function filterData(data, areacode) {
+ if (data && data[areacode] && data[areacode].rows && data[areacode].rows[0]) {
+ let temp = deepClone(data);
+ let values = temp[areacode].rows[0].values;
+ let filteredValues = {};
+ let index;
+ for (index in values) {
+ if (values[index] && values[index].value) {
+ filteredValues[index] = values[index];
+ }
+ }
+ temp[areacode].rows = [ { values: filteredValues } ];
+ return JSON.stringify(temp);
+ }
+}
+/**
+ * 单据规则控制
+ */
+export default { beforeEdit };
+
+/*TZdi7ZD2qc06xBNXw0DDF+4A9mZ6xeSJ4O2D/HflOQY=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/currencyRateUtil.js b/src/scmpub/scmpub/pub/tool/currencyRateUtil.js
new file mode 100644
index 0000000..ed49f98
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/currencyRateUtil.js
@@ -0,0 +1,236 @@
+/*edROmdp52grRhtYsnRn9KbhnjdSY/ridw88pkgpAH54=*/
+/*
+ * @Author: chaiwx
+ * @PageInfo:汇率类型参照过滤公共方法
+ * @Date: 2021-06-30 11:31:17
+ * @Last Modified by: chaiwx
+ * @Last Modified time: 2021-06-30 11:31:17
+ */
+
+import { ajax, toast } from 'nc-lightapp-front';
+
+const RATE_TYPE_MIDDLE = 0; //日汇率-中间汇率
+const RATE_TYPE_BUYING = 1; //日汇率 - 买入汇率;
+const RATE_TYPE_SELLING = 2; //日汇率 - 卖出汇率;
+const RATE_TYPE_ADJUST = 3; //期间汇率;
+const RATE_TYPE_AVG = 4; //平均汇率;
+const RATE_TYPE_FIX = 5; //固定汇率;
+const RATE_TYPE_SYSTEM = 6; //系统赋值;
+const RATE_TYPE_CUSTOM = 7; //自定义汇率;
+
+/**
+ * 汇率类型中间价参照过滤
+ */
+function rateTypeMindFilter() {
+ let categorys = '(' + RATE_TYPE_MIDDLE + ',' + RATE_TYPE_BUYING + ',' + RATE_TYPE_SELLING + ')';
+ return {
+ rate_category_in_value: categorys
+ };
+}
+
+/**
+ * 汇率类型买入价参照过滤
+ */
+function rateTypeBuyFilter() {
+ let categorys = '(' + RATE_TYPE_MIDDLE + ',' + RATE_TYPE_BUYING + ',' + '5' + ',' + RATE_TYPE_CUSTOM + ')';
+ return {
+ rate_category_in_value: categorys
+ };
+}
+
+/**
+ * 汇率类型卖出价参照过滤
+ */
+function rateTypeSellFilter() {
+ let categorys = '(' + RATE_TYPE_MIDDLE + ',' + RATE_TYPE_SELLING + ',' + '5' + ',' + RATE_TYPE_CUSTOM + ')';
+ return {
+ rate_category_in_value: categorys
+ };
+}
+
+/**
+ * 汇率是否可编辑
+ * >三大汇率走参数
+ * >自定义汇率始终可改
+ * >符合自制,自制始终可改,非自制不可改
+ * @param {*} category
+ * @param {*} isSelfMake
+ */
+async function canRateModify(category, isSelfMake) {
+ let flag = false;
+
+ if (category == RATE_TYPE_MIDDLE || category == RATE_TYPE_BUYING || category == RATE_TYPE_SELLING) {
+ // 三种日汇率,请求后台根据参数判断
+ // 三种日汇率,请求后台根据参数判断
+ ajax({
+ url: '/nccloud/scmpub/currentcyrate/rateEditable.do',
+ data: { category: category },
+ async: false,
+ loading: false,
+ success: (res) => {
+ if (res.data) {
+ flag = res.data;
+ }
+ },
+ error: (error) => {
+ toast({
+ color: 'warning',
+ content: error.message
+ });
+ flag = false;
+ }
+ });
+ // flag = new Promise(function(resolve, reject) {
+ // ajax({
+ // url: '/nccloud/scmpub/currentcyrate/rateEditable.do',
+ // data: { category: category },
+ // loading: false,
+ // success: (res) => {
+ // if (res.data) {
+ // let editFlag = res.data;
+ // resolve(editFlag);
+ // }
+ // },
+ // error: (error) => {
+ // toast({
+ // color: 'warning',
+ // content: error.message
+ // });
+ // resolve(false);
+ // }
+ // });
+ // });
+ } else if (category == RATE_TYPE_CUSTOM || !category) {
+ // 自定义 || 空
+ flag = true;
+ } else if (isSelfMake) {
+ // 自制
+ flag = true;
+ }
+
+ return flag;
+}
+
+/**
+ * 批量粘贴判断汇率是否可编辑
+ * >三大汇率走参数
+ * >自定义汇率始终可改
+ * >符合自制,自制始终可改,非自制不可改
+ * @param {*} category
+ * @param {*} isSelfMake
+ */
+async function batchCanRateModify(category, isSelfMake) {
+ let flag = false;
+
+ if (category == RATE_TYPE_MIDDLE || category == RATE_TYPE_BUYING || category == RATE_TYPE_SELLING) {
+ // 三种日汇率,请求后台根据参数判断
+ new Promise(function(resolve, reject) {
+ ajax({
+ url: '/nccloud/scmpub/currentcyrate/rateEditable.do',
+ data: { category: category },
+ loading: false,
+ success: (res) => {
+ if (res.data) {
+ flag = res.data;
+ }
+ },
+ error: (error) => {
+ toast({
+ color: 'warning',
+ content: error.message
+ });
+ resolve(false);
+ }
+ });
+ });
+ } else if (category == RATE_TYPE_CUSTOM || !category) {
+ // 自定义 || 空
+ flag = true;
+ } else if (isSelfMake) {
+ // 自制
+ flag = true;
+ }
+
+ return flag;
+}
+
+/**
+ * 汇率日期是否可编辑
+ * @param {*} category
+ * @param {*} isSelfMake
+ */
+function canRateDateModify(category, isSelfMake) {
+ let flag = false;
+
+ if (category == RATE_TYPE_CUSTOM) {
+ // 自定义
+ flag = true;
+ } else if (category == RATE_TYPE_MIDDLE || category == RATE_TYPE_BUYING || category == RATE_TYPE_SELLING) {
+ // 日汇率均不可编辑
+ flag = false;
+ } else if (category == '5' && isSelfMake) {
+ // 固定汇率并自制,可以编辑
+ flag = true;
+ }
+
+ return flag;
+}
+
+/**
+ * 表体行是否符合自制规则
+ * @param {*} record
+ * @param {*} srctypeField 来源单据类型字段
+ * @param {*} cannotEditSrctypes 不可编辑的来源单据类型数组
+ * @returns
+ */
+function isRowSelfMake(rowdata, srctypeField, cannotEditSrctypes) {
+ let isSelfMake = true;
+ let category = (rowdata.values.fratecategory || {}).value;
+ let srctype = (rowdata.values[srctypeField] || {}).value;
+
+ if (category == '5' && cannotEditSrctypes.includes(srctype)) {
+ // 固定汇率、来源单据类型是不可编辑的单据类型
+ isSelfMake = false;
+ }
+
+ return isSelfMake;
+}
+
+/**
+ * 单据是否符合自制规则
+ * @param {*} data
+ * @param {*} bodyArea
+ * @param {*} srctypeField
+ * @param {*} cannotEditSrctypes
+ */
+function isBillSelfMake(category, bodyArea, srctypeField, cannotEditSrctypes) {
+ let isSelfMake = true;
+
+ if (category == '5') {
+ // 固定汇率
+ let bodyRows = this.props.cardTable.getVisibleRows(bodyArea);
+ for (let i = 0; i < bodyRows.length; i++) {
+ // 获取所有行,有一行有不能编辑的来源类型,不可编辑
+ let srctype = bodyRows[i].values[srctypeField].value;
+ if (cannotEditSrctypes.includes(srctype)) {
+ isSelfMake = false;
+ break;
+ }
+ }
+ }
+
+ return isSelfMake;
+}
+
+export {
+ rateTypeMindFilter,
+ rateTypeBuyFilter,
+ rateTypeSellFilter,
+ canRateModify,
+ batchCanRateModify,
+ canRateDateModify,
+ isRowSelfMake,
+ isBillSelfMake
+};
+
+/*edROmdp52grRhtYsnRn9KbhnjdSY/ridw88pkgpAH54=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/dateFormat.js b/src/scmpub/scmpub/pub/tool/dateFormat.js
new file mode 100644
index 0000000..d257f79
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/dateFormat.js
@@ -0,0 +1,35 @@
+/*3+OxmavkIrqqZL5i5oXk60a6Kor5G/hJc9zYaBROe9w=*/
+/*
+ * @Author: maopch
+ * @PageInfo: 在willMount生命周期中调用后,可以在本类中使用 new Date().Format('yyyy-MM-dd') 来格式化日期
+ * @Date: 2018-06-14 16:54:11
+ * @Last Modified by: jiangphk
+ * @Last Modified time: 2023-08-08 09:35:22
+ */
+/**
+ * author: meizz
+ */
+export default function() {
+ Date.prototype.Format = function(fmt) {
+ var o = {
+ 'M+': this.getMonth() + 1, //月份
+ 'd+': this.getDate(), //日
+ 'h+': this.getHours(), //小时
+ 'm+': this.getMinutes(), //分
+ 's+': this.getSeconds(), //秒
+ 'q+': Math.floor((this.getMonth() + 3) / 3), //季度
+ S: this.getMilliseconds() //毫秒
+ };
+ if (/(y+)/.test(fmt)) {
+ fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
+ }
+ for (var k in o){
+ if (new RegExp('(' + k + ')').test(fmt)){
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
+ }
+ }
+ return fmt;
+ };
+}
+
+/*3+OxmavkIrqqZL5i5oXk60a6Kor5G/hJc9zYaBROe9w=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/editTableTools/RownoUtil.js b/src/scmpub/scmpub/pub/tool/editTableTools/RownoUtil.js
new file mode 100644
index 0000000..3b2bc8f
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/editTableTools/RownoUtil.js
@@ -0,0 +1,240 @@
+/*ZGwwJjdOnNJ+WCuFIxmFVZVK35FHrxovfyItCAnEAPQ=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 行号处理
+ * @Date: 2018-06-06 14:19:13
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2022-10-27 18:35:09
+ */
+
+// 行号开始
+const START_VALUE = 10;
+// 行号步长
+const STEP_VALUE = 10;
+// 最小行号
+const MIN_VALUE = 0.00000001;
+// 零
+const ZERO_VALUE = 0;
+
+// 精度
+const DIGIT_POWER = 8;
+
+// 行号默认的key
+const ROWNO_KEY = 'crowno';
+/**
+ *
+ * 为editTable 提供的重置行号方法
+ * @param {*} props
+ * @param {区域编码} moduleId
+ * @param {行号字段的编码,默认为crowno} rownoKey
+ */
+function resetRowNo(props, moduleId, rownoKey) {
+ if (rownoKey == undefined) {
+ rownoKey = ROWNO_KEY;
+ }
+
+ // 所有行数
+ let rowcount = props.editTable.getNumberOfRows(moduleId);
+ for (let i = 0; i < rowcount; i++) {
+ let crowno = i * 10 + 10;
+ props.editTable.setValByKeyAndIndex(moduleId, i, rownoKey, {
+ value: crowno.toString(),
+ display: crowno.toString()
+ });
+ }
+}
+
+/**
+ * 将editTable表体所有行号为空的行补充上行号
+ * @param {*} props
+ * @param {区域编码} moduleId
+ * @param {行号字段的编码} rownoKey
+ * @param {自定义行间距} num
+ */
+function setRowNo(props, moduleId, rownoKey, num) {
+ if (rownoKey == undefined) {
+ rownoKey = ROWNO_KEY;
+ }
+ // 所有行数
+ let rowcount = props.editTable.getNumberOfRows(moduleId);
+
+ if (rowcount <= 0) {
+ return;
+ }
+
+ let isContinue = true;
+ while (isContinue) {
+ // 先统计所有行号为空的行,若空行后存在行号有值的行,按照插入到该行处理
+ // 否则按照新增行的行号处理
+ let nullRowIndexs = [];
+ let tagRowIndex = -1;
+ // 根据空行决定在哪一行前面增加了多少空行
+ for (let index = 0; index < rowcount; index++) {
+ // 所有行遍历后,中止循环
+ if (index == rowcount - 1) {
+ isContinue = false;
+ }
+ let crowno = (props.editTable.getValByKeyAndIndex(moduleId, index, rownoKey) || {}).value;
+ // if (crowno == null || crowno == '') {
+ if (!crowno) {
+ nullRowIndexs.push(index);
+ tagRowIndex = -1;
+ } else if (nullRowIndexs.length == 0) {
+ // 没有空行不用处理
+ continue;
+ } else {
+ tagRowIndex = index;
+ break;
+ }
+ }
+
+ let uaRowNo = null;
+ // 插入目标行不等于-1时 按照插入行处理
+ if (tagRowIndex != -1) {
+ uaRowNo = insertLinesByIndex(props, moduleId, rownoKey, tagRowIndex, nullRowIndexs, num);
+ } else {
+ uaRowNo = addLinesByIndex(props, moduleId, rownoKey, nullRowIndexs, num);
+ }
+ // 得到开始行、结束行行号
+ // 开始行号:比粘贴行行号略小的行,结束行号:粘贴行
+ // 设值到界面上
+ for (let index = 0; index < nullRowIndexs.length; index++) {
+ let row = nullRowIndexs[index];
+ props.editTable.setValByKeyAndIndex(moduleId, row, rownoKey, {
+ value: uaRowNo[index].toString(),
+ display: uaRowNo[index].toString()
+ });
+ }
+ }
+}
+
+function addLinesByIndex(props, moduleId, rownoKey, nullRowIndexs, num) {
+ let rowcount = props.editTable.getNumberOfRows(moduleId);
+ let dPreviousRowNO = getRowNoUFDoubleMax(props, moduleId, rownoKey, rowcount);
+ let uaRowNo = new Array(nullRowIndexs.length);
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ if (num) {
+ uaRowNo[i] = (i + 1) * num + Number(dPreviousRowNO);
+ } else {
+ uaRowNo[i] = (i + 1) * 10 + Number(dPreviousRowNO);
+ }
+ }
+ return uaRowNo;
+}
+
+function getRowNoUFDoubleMax(props, moduleId, rownoKey, nRow) {
+ if (nRow === 1) {
+ return ZERO_VALUE;
+ }
+ let dMaxValue = ZERO_VALUE;
+ let dEveryValue = null;
+
+ for (let i = 0; i < nRow; i++) {
+ dEveryValue = props.editTable.getValByKeyAndIndex(moduleId, i, rownoKey).value;
+ if (Number(dMaxValue) < Number(dEveryValue)) {
+ dMaxValue = dEveryValue;
+ }
+ }
+
+ return dMaxValue;
+}
+
+function insertLinesByIndex(props, moduleId, rownoKey, tagRowIndex, nullRowIndexs, num) {
+ let dPreviousRowNO = getNotNullRowBefore(props, moduleId, rownoKey, tagRowIndex);
+ let dNextRowNO = props.editTable.getValByKeyAndIndex(moduleId, tagRowIndex, rownoKey).value;
+ let uaRowNo = new Array(nullRowIndexs.length);
+ // 避免首末行号相等的情况
+ if (dPreviousRowNO === dNextRowNO) {
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ uaRowNo[i] = dPreviousRowNO;
+ }
+ } else if (dNextRowNO == null || dNextRowNO == '') {
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ if (num) {
+ uaRowNo[i] = (i + 1) * num + Number(dPreviousRowNO);
+ } else {
+ uaRowNo[i] = (i + 1) * 10 + Number(dPreviousRowNO);
+ }
+ }
+ } else {
+ // 计算步长
+ let dStep = (dNextRowNO - dPreviousRowNO) / (nullRowIndexs.length + 1);
+ let tempRowNo = dPreviousRowNO;
+ for (let i = 0; i < nullRowIndexs.length; i++) {
+ // 限制生成的行号不能大于粘贴行的行号
+ tempRowNo = Number(tempRowNo) + Number(dStep);
+ // if (tempRowNo >= dNextRowNO ) {
+ // tempRowNo = dNextRowNO - (dStep, iStepDgt);
+ // }
+ uaRowNo[i] = tempRowNo;
+ }
+ }
+ return uaRowNo;
+}
+
+/**
+ * 取目标行前面不为空的行号值
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} rownoKey
+ * @param {目标行index} iRow
+ */
+function getNotNullRowBefore(props, moduleId, rownoKey, iRow) {
+ let rowcount = props.editTable.getNumberOfRows(moduleId);
+ if (rowcount == 1) {
+ return ZERO_VALUE;
+ }
+ for (let index = iRow - 1; index >= 0; index--) {
+ let crowno = (props.editTable.getValByKeyAndIndex(moduleId, index, rownoKey) || {}).value;
+ if (crowno != '' && crowno != undefined) {
+ return crowno;
+ }
+ }
+ return ZERO_VALUE;
+}
+/**
+ * 设置目标行行号
+ * @param {*} props
+ * @param {*} moduleId
+ * @param {*} rownoKey
+ * @param {*} index
+ */
+function setRowNoByIndex(props, moduleId, rownoKey, index) {
+ if (rownoKey == undefined) {
+ rownoKey = ROWNO_KEY;
+ }
+
+ let maxRowNum = 0;
+ if (index == 0) {
+ props.editTable.setValByKeyAndIndex(moduleId, index, rownoKey, {
+ value: '10',
+ display: '10'
+ });
+ }
+ for (let i = 0; i < index; i++) {
+ let crowno = (props.editTable.getValByKeyAndIndex(moduleId, i, rownoKey) || {}).value;
+ // if (crowno == null || crowno == '') {
+ if (crowno) {
+ if (Number(crowno) > maxRowNum) {
+ maxRowNum = Number(crowno);
+ }
+ }
+ }
+ // 得到开始行、结束行行号
+ // 开始行号:比粘贴行行号略小的行,结束行号:粘贴行
+ // 设值到界面上
+ let num = ((maxRowNum + 10) / 10).toFixed(0) * 10;
+ props.editTable.setValByKeyAndIndex(moduleId, index, rownoKey, {
+ value: num.toString(),
+ display: num.toString()
+ });
+}
+const RownoUtils = {
+ setRowNo,
+ resetRowNo,
+ setRowNoByIndex
+};
+
+export { RownoUtils };
+
+/*ZGwwJjdOnNJ+WCuFIxmFVZVK35FHrxovfyItCAnEAPQ=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/formulaMsgUtils.js b/src/scmpub/scmpub/pub/tool/formulaMsgUtils.js
new file mode 100644
index 0000000..300b31c
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/formulaMsgUtils.js
@@ -0,0 +1,31 @@
+/*GCfrah0lguDiV0WsPMUvywspxGTw0uTi5yoyZiiQ37M=*/
+/*
+ * @PageInfo: 模板控制公式,验证公式等返回消息处理类
+ * @Author: guozhq
+ * @Date: 2023-04-20 20:44:33
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2023-04-20 21:09:55
+ */
+
+/**
+ * 处理公式Msg
+ * @param {*} formulamsg ajax返回res.formulamsg
+ * @param {*} tableTypeObj 表格类型对象{[PAGECODE.head_payment]: 'cardTable', [PAGECODE.cardbody]: 'cardTable'}
+ * @param {*} callback 平台api callback
+ * @param {*} data 平台api callback 需要的data
+ * @param {*} currentIndex 当前处理index,要求是数值类型
+ */
+function dealFormulaMsg(props, formulamsg, tableTypeObj, callback, data, currentIndex) {
+ if (formulamsg && formulamsg instanceof Array && formulamsg.length > 0) {
+ if (Number.isInteger(currentIndex)) {
+ currentIndex = formulamsg.map((item, index) => {
+ return currentIndex + index;
+ });
+ }
+ props.dealFormulamsg(formulamsg, tableTypeObj, callback, data, currentIndex);
+ }
+}
+
+export { dealFormulaMsg };
+
+/*GCfrah0lguDiV0WsPMUvywspxGTw0uTi5yoyZiiQ37M=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/getParentURlParme.js b/src/scmpub/scmpub/pub/tool/getParentURlParme.js
new file mode 100644
index 0000000..dfb12a5
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/getParentURlParme.js
@@ -0,0 +1,27 @@
+/*gSeRo1WD0EkupWOeyr1KX6FQlEFbubHBERiNiooAkUo=*/
+/*
+ * @Author: zhangchangqing
+ * @PageInfo: 获取父页面参数的方法
+ * @Date: 2018-04-19 10:38:05
+ * @Last Modified by: mikey.zhangchqf
+ * @Last Modified time: 2018-07-19 14:14:32
+ */
+function getUrlParam(parm) {
+ //获取父地址中的参数
+ let appUrl = decodeURIComponent(window.parent.location.href).split('?');
+ if (appUrl && appUrl[1]) {
+ let appPrams = appUrl[1].split('&');
+ if (appPrams && appPrams instanceof Array) {
+ let parmObj = {};
+ appPrams.forEach((item) => {
+ let key = item.split('=')[0];
+ let value = item.split('=')[1];
+ parmObj[key] = value;
+ });
+ return parmObj[parm];
+ }
+ }
+}
+export { getUrlParam };
+
+/*gSeRo1WD0EkupWOeyr1KX6FQlEFbubHBERiNiooAkUo=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/hotKeysUtil.js b/src/scmpub/scmpub/pub/tool/hotKeysUtil.js
new file mode 100644
index 0000000..2eb60ab
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/hotKeysUtil.js
@@ -0,0 +1,36 @@
+/*nzPwJchSHexuasQwBMhkMX+Ih3bVgkZn0vfRhR+XppM=*/
+/*
+ * @PageInfo: 供应链快捷键工具类
+ * @Author: guozhq
+ * @Date: 2019-01-25 10:30:45
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2019-01-25 10:44:28
+ */
+
+/**
+ * 列表态操作列不需要快捷键的按钮
+ * 例:
+ * props.button.createOprationButton({
+ * ...其它
+ * ignoreHotkeyCode:getListDisableHotKeyBtn()
+ * })
+ */
+function getListDisableHotKeyBtn() {
+ return [ 'Commit', 'Delete' ]; /** 目前是仅有提交和删除 */
+}
+
+/**
+ * 卡片态表格肩部不需要快捷键的按钮
+ * 例:
+ * props.button.createButtonApp({
+ * ...其它
+ * ignoreHotkeyCode:getCardDisableHotKeyBtn()
+ * })
+ */
+function getCardDisableHotKeyBtn() {
+ return [ 'DeleteLine' ]; /** 目前是仅有删除行 */
+}
+
+export { getListDisableHotKeyBtn, getCardDisableHotKeyBtn };
+
+/*nzPwJchSHexuasQwBMhkMX+Ih3bVgkZn0vfRhR+XppM=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/hyperlinkUtil.js b/src/scmpub/scmpub/pub/tool/hyperlinkUtil.js
new file mode 100644
index 0000000..16f3505
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/hyperlinkUtil.js
@@ -0,0 +1,320 @@
+/*rEVSGC1qXEnlKPkrXBbDXY9yjkdUHo+xRxhLEBZ6Dvw=*/
+/*
+ * @Author: chaiwx
+ * @PageInfo: 超链接工具
+ * @Date: 2022-04-14 15:22:57
+ * @Last Modified by: chaiwx
+ * @Last Modified time: 2022-04-14 15:22:57
+ */
+import { ajax } from 'nc-lightapp-front';
+/**
+ * 给table字段设置超链接
+ * @param {*} props
+ * @param {*} meta meta
+ * @param {*} config 跳转参数, moduleId 区域编码, linkmap = {
+ * linkField, // 超链接字段
+ * billtype, // 单据类型
+ * billtypeField, // 单据类型字段,针对表格数据有多种单据类型,有单据类型字段
+ * pkField, // 超链接目标单据主键
+ * }
+ * @returns
+ */
+//需要特殊处理的单据号超链接
+const specialBill = [
+ '4B36', //工单
+ '4B32', // 维修计划
+ '4A08', // 资产配置申请
+ '4A50', //安装拆卸单
+];
+
+function batchSetHyperlinkForTableFields(props, meta, config) {
+ let {
+ sence = 4, // 联查场景,一般超链接走单据联查,单据联查为4
+ moduleId, // 区域编码
+ linkmap
+ } = config;
+ if (meta[moduleId] != null) {
+ meta[moduleId].items.map((item, key) => {
+ if (linkmap.has(item.attrcode)) {
+ let {
+ linkField = item.attrcode, // 超链接字段
+ billtype, // 单据类型
+ billtypeField, // 单据类型字段,针对表格数据有多种单据类型,有单据类型字段
+ pkField // 超链接目标单据主键
+ } = linkmap.get(item.attrcode);
+ item.renderStatus = 'browse';
+ item.render = (text, record, index) => {
+ let billid = (record[pkField] || (record.values && record.values[pkField]) || {}).value;
+ // billtypeField优先级高于billtype
+ let rowbilltype;
+ if (billtypeField) {
+ rowbilltype = getBillType(record, billtypeField);
+ }
+ let curbilltype = rowbilltype ? rowbilltype : billtype;
+ if(curbilltype && billid && specialBill.includes(curbilltype)) {
+ return specialBillProcess.call(this, props, record, curbilltype, linkField, billid);
+ }else if (curbilltype && billid) {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo(null, {
+ billtype: curbilltype,
+ sence: sence,
+ //联查计划编制时需要查询最新版本
+ scene : curbilltype == '4D84' ? 'linksce' : null,
+ //scene : 'linksce',
+ status: 'browse',
+ id: billid
+ });
+ }}
+ >
+ {!(record[linkField] || (record.values && record.values[linkField]) || {}).display ? (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).value
+ ) : (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).display
+ )}
+
+ );
+ } else {
+ return !(record[linkField] || (record.values && record.values[linkField]) || {}).display
+ ? (record[linkField] || (record.values && record.values[linkField]) || {}).value
+ : (record[linkField] || (record.values && record.values[linkField]) || {}).display;
+ }
+ };
+ }
+ });
+ }
+}
+
+/**
+ * 给simpletable字段设置超链接
+ * @param {*} props
+ * @param {*} meta meta
+ * @param {*} config 跳转参数
+ * @returns
+ */
+function setHyperlinkForSimpleTableField(props, meta, config) {
+ let {
+ moduleId, // 区域编码
+ linkField, // 超链接字段
+ billtype, // 单据类型
+ billtypeField, // 单据类型字段,针对表格数据有多种单据类型,有单据类型字段
+ pkField, // 超链接目标单据主键
+ sence = 4 // 联查场景,一般超链接走单据联查,单据联查为4
+ } = config;
+
+ meta[moduleId].items.map((item, key) => {
+ if (item.attrcode == linkField) {
+ item.renderStatus = 'browse';
+ item.render = (text, record, index) => {
+ let billid = record[pkField] ? record[pkField].value : '';
+ // billtype需要重新声明,不然不同单据类型走第一次的缓存(批签字为例)
+ let billType = billtype ? billtype : record[billtypeField].value;
+ if (billType && billid) {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo(null, {
+ billtype: billType,
+ sence: sence,
+ //联查计划编制时需要查询最新版本
+ scene : billType == '4D84' ? 'linksce' : null,
+ status: 'browse',
+ id: billid
+ });
+ }}
+ >
+ {!record[linkField].display ? record[linkField].value : record[linkField].display}
+
+ );
+ } else {
+ return !record[linkField].display ? record[linkField].value : record[linkField].display;
+ }
+ };
+ }
+ });
+}
+
+/**
+ * 给edittable字段设置超链接
+ * @param {*} props
+ * @param {*} meta meta
+ * @param {*} config 跳转参数
+ * @returns
+ */
+function setHyperlinkForEditTableField(props, meta, config) {
+ let {
+ moduleId, // 区域编码
+ linkField, // 超链接字段
+ billtype, // 单据类型
+ billtypeField, // 单据类型字段,针对表格数据有多种单据类型,有单据类型字段
+ pkField, // 超链接目标单据主键
+ sence = 4 // 联查场景,一般超链接走单据联查,单据联查为4
+ } = config;
+
+ meta[moduleId].items.map((item, key) => {
+ if (item.attrcode == linkField) {
+ item.renderStatus = 'browse';
+ item.render = (text, record, index) => {
+ let billid = record.values[pkField].value;
+ // billtype需要重新声明,不然不同单据类型走第一次的缓存(批签字为例)
+ let billtype = billtype ? billtype : record.values[billtypeField].value;
+ if (billtype && billid) {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo(null, {
+ billtype: billtype,
+ sence: sence,
+ status: 'browse',
+ id: billid
+ });
+ }}
+ >
+ {!record.values[linkField].display ? (
+ record.values[linkField].value
+ ) : (
+ record.values[linkField].display
+ )}
+
+ );
+ } else {
+ return !record.values[linkField].display
+ ? record.values[linkField].value
+ : record.values[linkField].display;
+ }
+ };
+ }
+ });
+}
+//需要特殊处理单据号超链接
+function specialBillProcess(props, record, curbilltype, linkField, billid) {
+ if(curbilltype == '4B36') {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo('../../../../ewm/workorder/workorder/main/index.html#/card', {
+ appcode: '456001504A',
+ pagecode: '456001504A_card',
+ id: billid,
+ status: 'browse',
+ });
+ }}
+ >
+ {!(record[linkField] || (record.values && record.values[linkField]) || {}).display ? (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).value
+ ) : (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).display
+ )}
+
+ );
+ }else if(curbilltype == '4B32') {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo('../../../../ewm/maintainplan/repairplan/main/index.html#/card', {
+ appcode: '456001016A',
+ pagecode: '456001016A_card',
+ id: billid,
+ status: 'browse',
+ });
+ }}
+ >
+ {!(record[linkField] || (record.values && record.values[linkField]) || {}).display ? (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).value
+ ) : (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).display
+ )}
+
+ );
+ }else if(curbilltype == '4A08') {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo('../../../../aim/allocation/purchaseplan/main/index.html#/card', {
+ appcode: '451000504A',
+ pagecode: '451000504A_card',
+ id: billid,
+ status: 'browse',
+ });
+ }}
+ >
+ {!(record[linkField] || (record.values && record.values[linkField]) || {}).display ? (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).value
+ ) : (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).display
+ )}
+
+ );
+ }else if(curbilltype == '4A50') {
+ return (
+ {
+ e.stopPropagation();
+ props.openTo('../../../../aum/spare/installdetach/card/index.html', {
+ appcode: '452006004A',
+ pagecode: '452006004A_card',
+ id: billid,
+ status: 'browse',
+ });
+ }}
+ >
+ {!(record[linkField] || (record.values && record.values[linkField]) || {}).display ? (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).value
+ ) : (
+ (record[linkField] || (record.values && record.values[linkField]) || {}).display
+ )}
+
+ );
+ }
+}
+
+//处理特殊的单据类型,根据主键找当前单据类型编码或父级单据类型编码
+function getBillType(record, billtypeField) {
+ let rowbilltype = (record[billtypeField] || (record.values && record.values[billtypeField]) || {})
+ .value;
+ if (rowbilltype == '1001Z900000000002215') {//工单
+ rowbilltype = '4B36';
+ }else if (rowbilltype == '1001ZP1000000005GEZN') {//物资及服务需求单
+ rowbilltype = '4D14';
+ } else if (rowbilltype == '1001Z900000000002213') {//维修计划
+ rowbilltype = '4B32';
+ } else if (rowbilltype == '1001Z91000000001U0LZ') {//资产配置申请
+ rowbilltype = '4A08';
+ }else if(rowbilltype && billtypeField =='cworkordertrantype'){
+ let data ={
+ transtype: rowbilltype,
+ isByid: true
+ }
+ ajax({
+ url: '/nccloud/scmpub/pub/queryTranstype.do',
+ data: data,
+ async:false,
+ success: (res) => {
+ if (res.data === null) {
+ return;
+ }
+ // resolve(res.data);
+ rowbilltype = res.data;
+ }
+ });
+ }
+ return rowbilltype;
+}
+
+export { setHyperlinkForSimpleTableField, setHyperlinkForEditTableField, batchSetHyperlinkForTableFields };
+
+/*rEVSGC1qXEnlKPkrXBbDXY9yjkdUHo+xRxhLEBZ6Dvw=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/index.js b/src/scmpub/scmpub/pub/tool/index.js
new file mode 100644
index 0000000..300cd67
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/index.js
@@ -0,0 +1,32 @@
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 公共处理工具
+ * @Date: 2018-06-06 14:18:48
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2020-08-24 08:49:50
+ */
+
+import dateFormat from './dateFormat';
+import transtypeUtils from './transtypeUtils';
+import marAsstUtils from './materialAsstHelper';
+import crossRuleUtils from './crossRuleUtils';
+import { getUrlParam } from './getParentURlParme';
+import vbatchcodeHelper from './vbatchcodeHelper';
+//引用平台公共的拷贝,兼容业务代码以免报错
+import { deepClone } from 'nc-lightapp-front';
+import { setPsndocShowLeavePower, setRefShowDisabledData } from './refUtils';
+
+export {
+ deepClone,
+ dateFormat,
+ transtypeUtils,
+ marAsstUtils,
+ crossRuleUtils,
+ getUrlParam,
+ vbatchcodeHelper,
+ setPsndocShowLeavePower,
+ setRefShowDisabledData
+};
+
+/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/materialAsstHelper.js b/src/scmpub/scmpub/pub/tool/materialAsstHelper.js
new file mode 100644
index 0000000..0df92cc
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/materialAsstHelper.js
@@ -0,0 +1,396 @@
+/*3YvuFoWQ0YaKvMe8vxwXjw2RFs8uFLR1hRd1FwF6kQs=*/
+/*
+ * @Author: hujieh
+ * @PageInfo: 物料编辑后事件功能(单据处理辅助属性相关)
+ * @Date: 2018-08-14 19:10:07
+ * @Last Modified by: zhangfan
+ * @Last Modified time: 2023-07-17 16:02:23
+ */
+import { ajax, base, toast } from 'nc-lightapp-front';
+
+/**
+ * 获取自由辅助属性的queryContion
+ * @param {*} props
+ * @param {*} appcode
+ * @param {*} pagecode
+ * @param {*} areacode
+ * @param {*} key
+ * @param {*} record
+ * @param {*} freefield
+ * @param {*} defQueryCondition
+ * @returns
+ */
+function getVfreeQueryCondition(props, appcode, pagecode, areacode, key, record, freefield, defQueryCondition = {}) {
+ let queryCondition = { ...defQueryCondition };
+ let meta = props.meta.getMeta();
+ let item = meta[areacode].items.find((item) => item.attrcode == key);
+ if (item.itemtype == 'refer') {
+ queryCondition.data = JSON.stringify({ [areacode]: { areacode: areacode, rows: [ record ] } });
+ return queryCondition;
+ }
+ return queryCondition;
+}
+
+/**
+ * 物料辅助属性编辑前处理,如果是参照类型,添加过滤控制
+ * @param {*} props
+ * @param {*} appcode 小应用编码,可以为空
+ * @param {*} pagecode 页面编码
+ * @param {*} areacode 辅助属性所在的区域编码
+ * @param {*} key 触发事件的字段编码
+ * @param {*} record 行数据
+ * @param {*} freefield 客户供应商辅助属性字段编码对象,对象格式为:freefield = {ccustomerid:xxxx, ccustomervid:xxxx, cvendorid:xxxx, cvendorvid:xxxx}
+ */
+function resetItem(props, appcode, pagecode, areacode, key, record, freefield) {
+ let meta = props.meta.getMeta();
+ let item = meta[areacode].items.find((item) => item.attrcode == key);
+ if (item.itemtype == 'refer') {
+ let queryCondition = item.queryCondition;
+ if (typeof queryCondition === 'function') {
+ item.filterCon = queryCondition;
+ }
+ props.cardTable.setQueryCondition(areacode, {
+ [key]: (params) => {
+ if (typeof queryCondition === 'function') {
+ queryCondition = { ...queryCondition(params) };
+ } else if (typeof queryCondition === 'object') {
+ queryCondition = { ...item.filterCon(params) };
+ }
+ if (item.filterCon && typeof item.filterCon === 'function') {
+ queryCondition = { ...item.filterCon(params) };
+ }
+ // queryCondition = {
+ // ...(typeof queryCondition === 'function'
+ // ? queryCondition(params)
+ // : typeof queryCondition === 'object' ? queryCondition : {})
+ // };
+ let reftype_key = 'TreeRefActionExt';
+ if (params && (params.refType == 'grid' || params.refType == 'gridTree')) {
+ reftype_key = 'GridRefActionExt';
+ }
+ queryCondition.appcode = appcode;
+ queryCondition.pagecode = pagecode;
+ queryCondition.areacode = areacode;
+ queryCondition.data = JSON.stringify({ [areacode]: { areacode: areacode, rows: [ record ] } });
+ queryCondition.freefield = JSON.stringify(freefield);
+ queryCondition.defineField = key;
+ queryCondition.isShowDisabledData = false;
+ queryCondition[reftype_key] = 'nccloud.web.scmpub.pub.marasst.MarAsstDefaultRef';
+ queryCondition['UsualGridRefActionExt'] = 'nccloud.web.scmpub.pub.marasst.MarAsstDefaultRef';
+ return queryCondition;
+ }
+ });
+ }
+}
+
+/**
+ * 物料辅助属性编辑前处理,如果是参照类型,添加过滤控制
+ * @param {*} props
+ * @param {*} appcode 小应用编码,可以为空
+ * @param {*} pagecode 页面编码
+ * @param {*} areacode 辅助属性所在的区域编码
+ * @param {*} key 触发事件的字段编码
+ * @param {*} record 行数据
+ * @param {*} freefield 客户供应商辅助属性字段编码对象,对象格式为:freefield = {ccustomerid:xxxx, ccustomervid:xxxx, cvendorid:xxxx, cvendorvid:xxxx}
+ */
+function resetEditItem(props, appcode, pagecode, areacode, key, record, freefield) {
+ let meta = props.meta.getMeta();
+ let item = meta[areacode].items.find((item) => item.attrcode == key);
+ if (item.itemtype == 'refer') {
+ let queryCondition = item.queryCondition;
+ if (typeof queryCondition === 'function') {
+ item.filterCon = queryCondition;
+ }
+ props.editTable.setQueryCondition(areacode, {
+ [key]: (params) => {
+ if (typeof queryCondition === 'function') {
+ queryCondition = { ...queryCondition(params) };
+ } else if (typeof queryCondition === 'object') {
+ queryCondition = { ...item.filterCon(params) };
+ }
+ // queryCondition = {
+ // ...(typeof queryCondition === 'function'
+ // ? queryCondition(params)
+ // : typeof queryCondition === 'object' ? queryCondition : {})
+ // };
+ let reftype_key = 'TreeRefActionExt';
+ if (params && (params.refType == 'grid' || params.refType == 'gridTree')) {
+ reftype_key = 'GridRefActionExt';
+ }
+ queryCondition.appcode = appcode;
+ queryCondition.pagecode = pagecode;
+ queryCondition.areacode = areacode;
+ queryCondition.data = JSON.stringify({ [areacode]: { areacode: areacode, rows: [ record ] } });
+ queryCondition.freefield = JSON.stringify(freefield);
+ queryCondition.defineField = key;
+ queryCondition[reftype_key] = 'nccloud.web.scmpub.pub.marasst.MarAsstDefaultRef';
+ queryCondition['UsualGridRefActionExt'] = 'nccloud.web.scmpub.pub.marasst.MarAsstDefaultRef';
+ return queryCondition;
+ }
+ });
+ }
+}
+
+/**
+ * 物料辅助属性编辑前处理,如果是参照类型,添加过滤控制
+ * @param {*} props
+ * @param {*} appcode 小应用编码,可以为空
+ * @param {*} pagecode 页面编码
+ * @param {*} areacode 辅助属性所在的区域编码
+ * @param {*} key 触发事件的字段编码
+ * @param {*} record 行数据
+ * @param {*} freefield 客户供应商辅助属性字段编码对象,对象格式为:freefield = {ccustomerid:xxxx,ccustomervid:xxxx,cvendorid:xxxx,cvendorvid:xxxx}
+ */
+function resetGridItem(props, appcode, pagecode, areacode, key, record, freefield) {
+ let meta = props.meta.getMeta();
+ let item = meta[areacode].items.find((item) => item.attrcode == key);
+ if (item.itemtype == 'refer') {
+ let queryCondition = item.queryCondition;
+ item.queryCondition = (params) => {
+ queryCondition = {
+ ...(typeof queryCondition === 'function'
+ ? queryCondition(params)
+ : typeof queryCondition === 'object' ? queryCondition : {})
+ };
+ let reftype_key = 'TreeRefActionExt';
+ if (params.refType == 'grid' || params.refType == 'gridTree') {
+ reftype_key = 'GridRefActionExt';
+ }
+ queryCondition.appcode = appcode;
+ queryCondition.pagecode = pagecode;
+ queryCondition.areacode = areacode;
+ queryCondition.data = JSON.stringify({ [areacode]: { areacode: areacode, rows: [ record ] } });
+ queryCondition.defineField = key;
+ queryCondition[reftype_key] = 'nccloud.web.scmpub.pub.marasst.MarAsstDefaultRef';
+ queryCondition.freefield = JSON.stringify(freefield);
+ queryCondition['UsualGridRefActionExt'] = 'nccloud.web.scmpub.pub.marasst.MarAsstDefaultRef';
+ return queryCondition;
+ };
+ }
+}
+
+/**
+ * 物料辅助属性编辑后处理,如果受控字段的值不在值域内,则清空
+ * @param {*} props
+ * @param {*} appcode
+ * @param {*} pagecode
+ * @param {*} areacode
+ * @param {*} key
+ * @param {*} material_field
+ * @param {*} record
+ * @param {*} index
+ * @param {*} freefield 客户供应商辅助属性字段编码对象,对象格式为:freefield = {ccustomerid:xxxx,ccustomervid:xxxx,cvendorid:xxxx,cvendorvid:xxxx}
+ */
+function afterEdit(props, appcode, pagecode, areacode, key, material_field, record, index, freefield) {
+ let data = {
+ appcode,
+ pagecode,
+ areacode,
+ controlField: key,
+ controlValue: (record.values[key] || {}).value,
+ materialvid: (record.values[material_field] || {}).value,
+ freefield: JSON.stringify(freefield)
+ };
+ let freefieldArr = [];
+ if (freefield && Object.keys(freefield) && Object.keys(freefield).length > 0) {
+ Object.keys(freefield).forEach((item) => {
+ freefieldArr.push(freefield[item]);
+ });
+ }
+ ajax({
+ url: '/nccloud/scmpub/pub/marasstAfterEdit.do',
+ data: data,
+ async: false,
+ mode: 'normal',
+ success: (res) => {
+ if (res.data && res.data) {
+ for (let i in res.data) {
+ let values = res.data[i];
+ if (!values || values.length == 0) {
+ props.cardTable.setValByKeyAndIndex(areacode, index, i, {
+ value: null,
+ display: null,
+ scale: -1
+ });
+ } else if (
+ values &&
+ values.length == 1 &&
+ values[0] &&
+ freefieldArr.length > 0 &&
+ freefieldArr.includes(key) &&
+ freefieldArr.includes(i)
+ ) {
+ let newvalues = values[0].split('@-@');
+ props.cardTable.setValByKeyAndIndex(areacode, index, i, {
+ value: newvalues[0],
+ display: newvalues[1],
+ scale: -1
+ });
+ } else {
+ let value = (record.values[i] || {}).value;
+ if (value != null && values[0]) {
+ let newvalues = values[0].split('@-@');
+ if (!newvalues.includes(value)) {
+ props.cardTable.setValByKeyAndIndex(areacode, index, i, {
+ value: null,
+ display: null,
+ scale: -1
+ });
+ if (i == freefield.cvendorid) {
+ // 供应商oid不在约束范围之内,需要清空vid
+ props.cardTable.setValByKeyAndIndex(areacode, index, freefield.cvendorvid, {
+ value: null,
+ display: null,
+ scale: -1
+ });
+ } else if (i == freefield.ccustomerid) {
+ // 客户oid不在约束范围之内,需要清空vid
+ props.cardTable.setValByKeyAndIndex(areacode, index, freefield.ccustomervid, {
+ value: null,
+ display: null,
+ scale: -1
+ });
+ }
+ }
+ } else if (!values.includes(value)) {
+ props.cardTable.setValByKeyAndIndex(areacode, index, i, {
+ value: null,
+ display: null,
+ scale: -1
+ });
+ }
+ }
+ }
+ }
+ }
+ });
+}
+
+/**
+ * 物料辅助属性编辑后处理,如果受控字段的值不在值域内,则清空
+ * @param {*} props
+ * @param {*} appcode
+ * @param {*} pagecode
+ * @param {*} areacode
+ * @param {*} key
+ * @param {*} material_field
+ * @param {*} record
+ * @param {*} index
+ * @param {*} freefield 客户供应商辅助属性字段编码对象,对象格式为:freefield = {ccustomerid:xxxx,ccustomervid:xxxx,cvendorid:xxxx,cvendorvid:xxxx}
+ */
+function afterTableEdit(props, appcode, pagecode, areacode, key, material_field, value, pk_material, index, freefield) {
+ let data = {
+ appcode,
+ pagecode,
+ areacode,
+ controlField: key,
+ controlValue: value,
+ materialvid: pk_material,
+ freefield: JSON.stringify(freefield)
+ };
+ let freefieldArr = [];
+ if (freefield && Object.keys(freefield) && Object.keys(freefield).length > 0) {
+ Object.keys(freefield).forEach((item) => {
+ freefieldArr.push(freefield[item]);
+ });
+ }
+ ajax({
+ url: '/nccloud/scmpub/pub/marasstAfterEdit.do',
+ data: data,
+ async: false,
+ mode: 'normal',
+ success: (res) => {
+ if (res.data && res.data) {
+ for (let i in res.data) {
+ let values = res.data[i];
+ if (!values || values.length == 0) {
+ props.editTable.setValByKeyAndIndex(areacode, index, i, {
+ value: null,
+ display: null,
+ scale: -1,
+ isEdit: false
+ });
+ } else if (
+ values &&
+ values.length == 1 &&
+ values[0] &&
+ freefieldArr.length > 0 &&
+ freefieldArr.includes(key)
+ ) {
+ let newvalues = values[0].split('@-@');
+ props.editTable.setValByKeyAndIndex(areacode, index, i, {
+ value: newvalues[0],
+ display: newvalues[1],
+ scale: -1,
+ isEdit: false
+ });
+ } else {
+ if (!values.includes(value)) {
+ props.editTable.setValByKeyAndIndex(areacode, index, i, {
+ value: null,
+ display: null,
+ scale: -1,
+ isEdit: false
+ });
+ }
+ }
+ }
+ }
+ }
+ });
+}
+
+/**
+ * 主子拉平物料辅助属性编辑前处理,如果是参照类型,添加过滤控制
+ * @param {*} props
+ * @param {*} appcode 小应用编码,可以为空
+ * @param {*} pagecode 页面编码
+ * @param {*} areacode 辅助属性所在的区域编码
+ * @param {*} key 触发事件的字段编码
+ * @param {*} record 行数据
+ * @param {*} freefield 客户供应商辅助属性字段编码对象,对象格式为:freefield = {ccustomerid:xxxx,ccustomervid:xxxx,cvendorid:xxxx,cvendorvid:xxxx}
+ */
+function resetViewItem(props, appcode, pagecode, areacode, key, record, freefield) {
+ let meta = props.meta.getMeta();
+ let item = meta[areacode].items.find((item) => item.attrcode == key);
+ if (item.itemtype == 'refer') {
+ let queryCondition = item.queryCondition;
+ if (typeof queryCondition === 'function') {
+ item.filterCon = queryCondition;
+ }
+ props.cardTable.setQueryCondition(areacode, {
+ [key]: (params) => {
+ if (typeof queryCondition === 'function') {
+ queryCondition = { ...queryCondition(params) };
+ } else if (typeof queryCondition === 'object') {
+ queryCondition = { ...item.filterCon(params) };
+ }
+ let reftype_key = 'TreeRefActionExt';
+ if (params.refType == 'grid' || params.refType == 'gridTree') {
+ reftype_key = 'GridRefActionExt';
+ }
+ queryCondition.appcode = appcode;
+ queryCondition.pagecode = pagecode;
+ queryCondition.areacode = areacode;
+ queryCondition.data = JSON.stringify({ [areacode]: { areacode: areacode, rows: [ record ] } });
+ queryCondition.freefield = JSON.stringify(freefield);
+ queryCondition.defineField = key;
+ queryCondition[reftype_key] = 'nccloud.web.scmpub.pub.marasst.ViewMarAsstDefaultRef';
+ queryCondition['UsualGridRefActionExt'] = 'nccloud.web.scmpub.pub.marasst.ViewMarAsstDefaultRef';
+ return queryCondition;
+ }
+ });
+ }
+}
+
+export default {
+ resetItem,
+ afterEdit,
+ resetGridItem,
+ resetViewItem,
+ afterTableEdit,
+ resetEditItem,
+ getVfreeQueryCondition
+};
+
+/*3YvuFoWQ0YaKvMe8vxwXjw2RFs8uFLR1hRd1FwF6kQs=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/messageUtil.js b/src/scmpub/scmpub/pub/tool/messageUtil.js
new file mode 100644
index 0000000..6a21890
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/messageUtil.js
@@ -0,0 +1,531 @@
+/*6aEr4lFTsmy3cTmxIxMSG+5hWwH5PYUcVDt+KqtXtLM=*/
+/*
+ * 消息提示工具类
+ * @Author: guozhq
+ * @Date: 2018-07-17 12:27:47
+ * @Last Modified by: zhangllb
+ * @Last Modified time: 2023-08-31 09:12:45
+>>>>>>> refs/heads/develop-ncc1.01
+ */
+import { toast, promptBox, getMultiLang } from 'nc-lightapp-front';
+
+/**
+ * 处理消息提示的多语问题,定义的提示多语容器(ES6语法支持面向对象类)
+ */
+class LangContainer {
+ constructor() {
+ this.lang = null;
+ this.inlt = null;
+ console.log('LangContainer初始化');
+ // 初始化提示多语信息
+ getMultiLang({
+ moduleId: '4001pubmessage',
+ domainName: 'scmpub',
+ callback: this.init.bind(this),
+ needInlt: true
+ });
+ }
+
+ init(lang, status, inlt) {
+ if (status) {
+ this.lang = lang;
+ this.inlt = inlt;
+ }
+ }
+
+ getLangByResId(resid, param) {
+ let str = resid;
+ if (param) {
+ str = this.inlt.get(resid, param);
+ return str ? str : resid;
+ } else {
+ // 如果还没有加载回来,则返回空,避免页面显示多语字符串
+ if (this.lang) {
+ str = this.lang[resid];
+ return str ? str : resid;
+ } else {
+ return resid;
+ }
+ }
+ }
+}
+
+/**
+ * 实例化多语容器
+ */
+const lang = new LangContainer();
+
+/**
+ * 显示操作成功信息
+ * @param {*} title 非必输 默认:已成功
+ * @param {*} content 非必输
+ * @param {*} duration 非必输 默认3秒 值为infinity 不消失
+ */
+function showSuccessInfo(title, content, duration) {
+ showInfo(title, content, duration);
+}
+
+/**
+ * 显示警告信息
+ * @param {*} title 非必输 默认:请注意
+ * @param {*} content 非必输
+ * @param {*} duration 非必输 默认3秒 值为infinity 不消失
+ */
+function showWarningInfo(title, content, duration) {
+ showInfo(title, content, duration, 'warning');
+}
+
+/**
+ * 显示显示帮助信息信息
+ * @param {*} title 非必输 默认:帮助信息
+ * @param {*} content 非必输
+ * @param {*} duration 非必输 默认3秒 值为infinity 不消失
+ */
+function showInfoInfo(title, content, duration) {
+ showInfo(title, content, duration, 'info');
+}
+
+/**
+ * 显示失败信息
+ * @param {*} title 非必输 默认:出错啦
+ * @param {*} content 非必输
+ * @param {*} duration 非必输 默认3秒 值为infinity 不消失
+ */
+function showErrorInfo(title, content, duration = 'infinity') {
+ showInfo(title, content, duration, 'danger');
+}
+
+/**
+ * 批量操作错误提示(修改成红框,之前是黄框)
+ * @param {*} title
+ * @param {*} content
+ * @param {*} detailMsg
+ * @param {*} param
+ */
+function showBatchOperateInfo(title, content, detailMsg, param = {}) {
+ showInfo(
+ title,
+ content,
+ 'infinity',
+ 'danger',
+ true,
+ [
+ lang.getLangByResId('4001PUBMESSAGE-000000'),
+ lang.getLangByResId('4001PUBMESSAGE-000001'),
+ lang.getLangByResId('4001PUBMESSAGE-000002')
+ ] /* 国际化处理: 展开,收起,我知道了*/,
+ detailMsg,
+ param.onExpand,
+ param.onClose
+ );
+}
+
+function showInfo(title, content, duration, color, groupOperation, TextArr, groupOperationMsg, onExpand, onClose) {
+ toast({
+ duration: duration, // 消失时间,默认是3秒; 值为 infinity 时不消失,非必输
+ color: color, // 提示类别,默认是 "success",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ groupOperation: groupOperation, //批量操作,默认值是false,批量操作是true,非批量操作是false,非必输
+ TextArr: TextArr, //提示框按钮文字,第一个值是展按钮未展开时,第二个值是展开按钮展开时,第三个值是关闭,批量操作必输
+ groupOperationMsg: groupOperationMsg, //数组的每一项,是批量操作之后数据处理结果的描述,非必输
+ onExpand: onExpand, // 点击展开按钮的回调函数,非必输
+ onClose: onClose // 关闭按钮的回调函数,非必输
+ });
+}
+
+/**
+ * 显示成功Dialog
+ * @param {*} title 标题 非必输 默认:已成功
+ * @param {*} content 内容 非必输
+ * @param {*} param 参数 非必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showSuccessDialog(title, content, param = {}) {
+ showMessageDialog(title, content, param);
+}
+
+/**
+ * 显示警告Dialog
+ * @param {*} title 标题 非必输 默认:请注意
+ * @param {*} content 内容 非必输
+ * @param {*} param 参数 非必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showWarningDialog(title, content, param = {}) {
+ showMessageDialog(title, content, param, 'warning');
+}
+
+/**
+ * 显示帮助Dialog
+ * @param {*} title 标题 非必输 默认:帮助信息
+ * @param {*} content 内容 非必输
+ * @param {*} param 参数 非必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showInfoDialog(title, content, param = {}) {
+ showMessageDialog(title, content, param, 'info');
+}
+
+/**
+ * 显示错误Dialog
+ * @param {*} title 标题 非必输 默认:出错啦 请注意 帮助信息 已成功
+ * @param {*} content 内容 非必输
+ * @param {*} param 参数 非必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showErrorDialog(title, content, param = {}) {
+ showMessageDialog(title, content, param, 'danger');
+}
+
+function showMessageDialog(title, content, param = {}, color) {
+ promptBox({
+ color: color, // 提示类别默认"success", "success"/"info"/"warning"/"danger",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ noFooter: param.noFooter, // 是否显示底部按钮(确定、取消),默认显示(false),非必输
+ noCancelBtn: param.noCancelBtn, // 是否显示取消按钮,,默认显示(false),非必输
+ beSureBtnName: param.beSureBtnName, // 确定按钮名称, 默认为"确定",非必输
+ cancelBtnName: param.cancelBtnName, // 取消按钮名称, 默认为"取消",非必输
+ beSureBtnClick: param.beSureBtnClick, // 确定按钮点击调用函数,非必输
+ cancelBtnClick: param.cancelBtnClick, // 取消按钮点击调用函数,非必输
+ closeBtnClick: param.closeBtnClick, //关闭按钮点击调用函数,非必输
+ closeByClickBackDrop: param.closeByClickBackDrop, //点击遮罩关闭提示框,默认是true点击关闭,阻止关闭是false
+ zIndex: 306
+ });
+}
+// add by wangceb 批量消息提示框
+function showBatchOprMessage(
+ title = lang.getLangByResId('4001PUBMESSAGE-000003'),
+ messageInfo,
+ param = {},
+ btnname = ''
+) {
+ /* 国际化处理: 提示*/
+ let failedNum = messageInfo.failedNum;
+ let sucessNum = messageInfo.sucessNum;
+ // 全部成功,提示即可
+ if (failedNum == 0) {
+ showSuccessInfo(
+ lang.getLangByResId('4001PUBMESSAGE-000018', { 0: btnname }),
+ lang.getLangByResId('4001PUBMESSAGE-000022', { 0: messageInfo.sucessNum })
+ ); /* 国际化处理: 处理成功{0}条!*/
+ } else if (sucessNum == 0) {
+ title = lang.getLangByResId('4001PUBMESSAGE-000019', { 0: btnname });
+ let content = lang.getLangByResId('4001PUBMESSAGE-000020', {
+ 0: messageInfo.failedNum,
+ 1: messageInfo.failedNum
+ });
+ /* 国际化处理:共处理{0}条,失败{1}条!*/
+ toast({
+ duration: 'infinity', // 消失时间,默认是3秒; 值为 infinity 时不消失,非必输
+ color: 'danger', // 提示类别,默认是 "success",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ groupOperation: true, //批量操作,默认值是false,批量操作是true,非批量操作是false,非必输
+ TextArr: [
+ lang.getLangByResId('4001PUBMESSAGE-000000'),
+ lang.getLangByResId('4001PUBMESSAGE-000001'),
+ lang.getLangByResId('4001PUBMESSAGE-000002')
+ ], //提示框按钮文字,第一个值是展按钮未展开时,第二个值是展开按钮展开时,第三个值是关闭,批量操作必输/* 国际化处理: 展开,收起,我知道了*/
+ groupOperationMsg: messageInfo.errorMessages, //数组的每一项,是批量操作之后数据处理结果的描述,非必输
+ onExpand: param.onExpand, // 点击展开按钮的回调函数,非必输
+ onClose: param.onClose // 关闭按钮的回调函数,非必输
+ });
+ } else {
+ title = lang.getLangByResId('4001PUBMESSAGE-000019', { 0: btnname });
+ let content = lang.getLangByResId('4001PUBMESSAGE-000021', {
+ 0: Number(messageInfo.sucessNum) + Number(messageInfo.failedNum),
+ 1: messageInfo.sucessNum,
+ 2: messageInfo.failedNum
+ }); /* 国际化处理: 共处理{0}条,成功{1}条,失败{2}条!*/
+ toast({
+ duration: 'infinity', // 消失时间,默认是3秒; 值为 infinity 时不消失,非必输
+ color: 'danger', // 提示类别,默认是 "success",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ groupOperation: true, //批量操作,默认值是false,批量操作是true,非批量操作是false,非必输
+ TextArr: [
+ lang.getLangByResId('4001PUBMESSAGE-000000'),
+ lang.getLangByResId('4001PUBMESSAGE-000001'),
+ lang.getLangByResId('4001PUBMESSAGE-000002')
+ ], //提示框按钮文字,第一个值是展按钮未展开时,第二个值是展开按钮展开时,第三个值是关闭,批量操作必输/* 国际化处理: 展开,收起,我知道了*/
+ groupOperationMsg: messageInfo.errorMessages, //数组的每一项,是批量操作之后数据处理结果的描述,非必输
+ onExpand: param.onExpand, // 点击展开按钮的回调函数,非必输
+ onClose: param.onClose // 关闭按钮的回调函数,非必输
+ });
+ }
+}
+
+/**
+ * 显示提示取消对话框
+ * @param {*} param 参数(对象) 必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showCancelDialog(param = {}) {
+ showWarningDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000007'),
+ lang.getLangByResId('4001PUBMESSAGE-000008'),
+ param
+ ); /* 国际化处理: 取消,确定要取消吗?*/
+}
+
+/**
+ * 显示提示卡片单个删除对话框
+ * @param {*} param 参数(对象) 必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showSingleDeleteDialog(param = {}) {
+ showWarningDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000009'),
+ lang.getLangByResId('4001PUBMESSAGE-000010'),
+ param
+ ); /* 国际化处理: 删除,确定要删除吗?*/
+}
+
+/**
+ * 显示提示列表多个删除对话框
+ * @param {*} param 参数(对象) 必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showDeleteDialog(param = {}) {
+ showWarningDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000009'),
+ lang.getLangByResId('4001PUBMESSAGE-000011'),
+ param
+ ); /* 国际化处理: 删除,确定要删除所选数据吗?*/
+}
+
+/**
+ * 显示提示列表多个启用对话框
+ * @param {*} param 参数(对象) 必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showEnableDialog(param = {}) {
+ showWarningDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000031'),
+ lang.getLangByResId('4001PUBMESSAGE-000032'),
+ param
+ ); /* 国际化处理: 启用,确定要启用所选数据吗?*/
+}
+
+/**
+ * 显示提示列表多个停用对话框
+ * @param {*} param 参数(对象) 必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showDisableDialog(param = {}) {
+ showWarningDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000033'),
+ lang.getLangByResId('4001PUBMESSAGE-000034'),
+ param
+ ); /* 国际化处理: 停用,确定要停用所选数据吗?*/
+}
+
+/**
+ * 显示提示修改主组织对话框
+ * @param {*} param 参数(对象) 必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showChangeOrgDialog(param = {}) {
+ showWarningDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000012'),
+ lang.getLangByResId('4001PUBMESSAGE-000013'),
+ param
+ ); /* 国际化处理: 确认修改,是否修改组织,这样会清空您录入的信息?*/
+}
+
+/**
+ * 查询结果提示消息
+ * @param {*} successNum 可不传
+ */
+function showHasQueryResultInfo(successNum) {
+ if (successNum) {
+ showSuccessInfo(null, lang.getLangByResId('4001PUBMESSAGE-000015', { 1: successNum })); /**国际化处理:查询成功,共{0}条 */
+ } else {
+ showSuccessInfo(null, lang.getLangByResId('4001PUBMESSAGE-000014') /**查询成功 */);
+ }
+}
+
+/**
+ * 转单或者不分页签的查询结果提示消息
+ * @param {*} successNum 可不传
+ */
+function showQueryResultInfoForNoPage(successNum) {
+ if (successNum) {
+ showSuccessInfo(null, lang.getLangByResId('4001PUBMESSAGE-000015', { 1: successNum })); /**国际化处理:查询成功,共{0}条 */
+ } else {
+ showNoQueryResultInfo();
+ }
+}
+
+/**
+ * 没有查询结果提示消息
+ */
+function showNoQueryResultInfo() {
+ showWarningInfo(null, lang.getLangByResId('4001PUBMESSAGE-000016')); /**国际化处理:未查询出符合条件的数据 */
+}
+
+/**
+ * 请选择数据!
+ * 适配打印次数按钮添加 add by yinl 20200822
+ */
+function showCheckDataWarningInfo() {
+ showWarningInfo(null, lang.getLangByResId('4001PUBMESSAGE-000030')); /**国际化处理:请选择数据! */
+}
+
+/**
+ * 刷新成功提示消息
+ */
+function showRefreshInfo() {
+ showSuccessInfo(lang.getLangByResId('4001PUBMESSAGE-000017')); /**国际化处理:刷新成功 */
+}
+
+/**
+ * 保存成功提示消息
+ */
+function showSaveInfo() {
+ showSuccessInfo(lang.getLangByResId('4001PUBMESSAGE-000023')); /**国际化处理:保存成功 */
+}
+
+// add by CongKe 返回批量消息内容并弹出提示
+function showBatchOprReturnMessage(
+ title = lang.getLangByResId('4001PUBMESSAGE-000003'),
+ messageInfo,
+ param = {},
+ btnname = ''
+) {
+ let msgcontent = '';
+ /* 国际化处理: 提示*/
+ let failedNum = messageInfo.failedNum;
+ let sucessNum = messageInfo.sucessNum;
+ // 全部成功,提示即可
+ if (failedNum == 0) {
+ showSuccessInfo(
+ lang.getLangByResId('4001PUBMESSAGE-000018', { 0: btnname }),
+ lang.getLangByResId('4001PUBMESSAGE-000022', { 0: messageInfo.sucessNum })
+ ); /* 国际化处理: 处理成功{0}条!*/
+ msgcontent = lang.getLangByResId('4001PUBMESSAGE-000022', { 0: messageInfo.sucessNum });
+ } else if (sucessNum == 0) {
+ title = lang.getLangByResId('4001PUBMESSAGE-000019', { 0: btnname });
+ let content = lang.getLangByResId('4001PUBMESSAGE-000020', {
+ 0: messageInfo.failedNum,
+ 1: messageInfo.failedNum
+ });
+ /* 国际化处理:共处理{0}条,失败{1}条!*/
+ toast({
+ duration: 'infinity', // 消失时间,默认是3秒; 值为 infinity 时不消失,非必输
+ color: 'danger', // 提示类别,默认是 "success",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ groupOperation: true, //批量操作,默认值是false,批量操作是true,非批量操作是false,非必输
+ TextArr: [
+ lang.getLangByResId('4001PUBMESSAGE-000000'),
+ lang.getLangByResId('4001PUBMESSAGE-000001'),
+ lang.getLangByResId('4001PUBMESSAGE-000002')
+ ], //提示框按钮文字,第一个值是展按钮未展开时,第二个值是展开按钮展开时,第三个值是关闭,批量操作必输/* 国际化处理: 展开,收起,我知道了*/
+ groupOperationMsg: messageInfo.errorMessages, //数组的每一项,是批量操作之后数据处理结果的描述,非必输
+ onExpand: param.onExpand, // 点击展开按钮的回调函数,非必输
+ onClose: param.onClose, // 关闭按钮的回调函数,非必输
+ customBtn: param.customBtn // JSX结构,有批量消息时,并且是展开状态显示,按钮放在原有按钮后面。如果传入span标签,样式会跟原有的按钮样式保持一致,特殊样式请自己实现
+ });
+ messageInfo.errorMessages.forEach((e) => {
+ msgcontent += e;
+ });
+ // msgcontent += messageInfo.errorMessages;
+ } else {
+ title = lang.getLangByResId('4001PUBMESSAGE-000019', { 0: btnname });
+ let content = lang.getLangByResId('4001PUBMESSAGE-000021', {
+ 0: Number(messageInfo.sucessNum) + Number(messageInfo.failedNum),
+ 1: messageInfo.sucessNum,
+ 2: messageInfo.failedNum
+ }); /* 国际化处理: 共处理{0}条,成功{1}条,失败{2}条!*/
+ toast({
+ duration: 'infinity', // 消失时间,默认是3秒; 值为 infinity 时不消失,非必输
+ color: 'danger', // 提示类别,默认是 "success",非必输
+ title: title, // 提示标题, 默认不同类别下分别为:"已成功"/"帮助信息"/"请注意"/"出错啦",非必输
+ content: content, // 提示内容,非必输
+ groupOperation: true, //批量操作,默认值是false,批量操作是true,非批量操作是false,非必输
+ TextArr: [
+ lang.getLangByResId('4001PUBMESSAGE-000000'),
+ lang.getLangByResId('4001PUBMESSAGE-000001'),
+ lang.getLangByResId('4001PUBMESSAGE-000002')
+ ], //提示框按钮文字,第一个值是展按钮未展开时,第二个值是展开按钮展开时,第三个值是关闭,批量操作必输/* 国际化处理: 展开,收起,我知道了*/
+ groupOperationMsg: messageInfo.errorMessages, //数组的每一项,是批量操作之后数据处理结果的描述,非必输
+ onExpand: param.onExpand, // 点击展开按钮的回调函数,非必输
+ onClose: param.onClose, // 关闭按钮的回调函数,非必输
+ customBtn: param.customBtn // JSX结构,有批量消息时,并且是展开状态显示,按钮放在原有按钮后面。如果传入span标签,样式会跟原有的按钮样式保持一致,特殊样式请自己实现
+ });
+ messageInfo.errorMessages.forEach((e) => {
+ msgcontent += e;
+ });
+ // msgcontent += messageInfo.errorMessages;
+ }
+ return msgcontent;
+}
+
+/**
+ * 点击卡片界面返回按钮显示警告Dialog
+ * @param {*} title 标题 非必输 默认:请注意
+ * @param {*} content 内容 非必输
+ * @param {*} param 参数 非必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showBackWarningDialog(param = {}) {
+ showMessageDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000024'), // 返回
+ lang.getLangByResId('4001PUBMESSAGE-000025'), // 有未保存的单据,确定要返回吗?
+ param,
+ 'warning'
+ );
+}
+
+/**
+ * 点击卡片界面退出转单按钮显示警告Dialog
+ * @param {*} title 标题 非必输 默认:请注意
+ * @param {*} content 内容 非必输
+ * @param {*} param 参数 非必输 参数列表:noFooter noCancelBtn beSureBtnName cancelBtnName beSureBtnClick cancelBtnClick closeBtnClick closeByClickBackDrop
+ */
+function showQuitTransferWarningDialog(param = {}) {
+ showMessageDialog(
+ lang.getLangByResId('4001PUBMESSAGE-000026'), // 退出转单
+ lang.getLangByResId('4001PUBMESSAGE-000027'), // 有未保存的单据,确定要退出转单吗?
+ param,
+ 'warning'
+ );
+}
+
+/**
+ * 保存提交成功-多语提示
+ */
+function showSaveAndCommitInfo() {
+ showSuccessInfo(lang.getLangByResId('4001PUBMESSAGE-000028')); /**国际化处理:保存提交成功 */
+}
+
+/**
+ * 查询成功
+ */
+function showQuerySuccess() {
+ showSuccessInfo(null, lang.getLangByResId('4001PUBMESSAGE-000014') /**查询成功 */);
+}
+
+export {
+ showSuccessInfo,
+ showWarningInfo,
+ showErrorInfo,
+ showInfoInfo,
+ showSuccessDialog,
+ showInfoDialog,
+ showErrorDialog,
+ showWarningDialog,
+ showBatchOprMessage,
+ showBatchOperateInfo,
+ showCancelDialog,
+ showSingleDeleteDialog,
+ showDeleteDialog,
+ showChangeOrgDialog,
+ showHasQueryResultInfo,
+ showNoQueryResultInfo,
+ showRefreshInfo,
+ showSaveInfo,
+ showQueryResultInfoForNoPage,
+ showBatchOprReturnMessage,
+ showBackWarningDialog,
+ showQuitTransferWarningDialog,
+ showSaveAndCommitInfo,
+ showQuerySuccess,
+ showCheckDataWarningInfo,
+ showEnableDialog,
+ showDisableDialog
+};
+
+/*6aEr4lFTsmy3cTmxIxMSG+5hWwH5PYUcVDt+KqtXtLM=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/multiLangUtil.js b/src/scmpub/scmpub/pub/tool/multiLangUtil.js
new file mode 100644
index 0000000..63887ed
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/multiLangUtil.js
@@ -0,0 +1,83 @@
+/*2Uuv1cMWZkg2BRt9wxfm3QleX4XVoItnYwuVl1hWO+M=*/
+/*
+ * 多语使用工具类
+ * @Author: guozhq
+ * @Date: 2018-10-18 16:01:37
+ * @Last Modified by: xiahui
+ * @Last Modified time: 2018-12-24 16:23:55
+ */
+import { getMultiLang, toast } from 'nc-lightapp-front';
+
+/**
+ * 初始化多语文件到组件内
+ * @param {*} _this
+ * @param {*} resPath 数组
+ * @param {*} moduleCode
+ * @param {*} callback 初始化模板回调
+ */
+function initLang(_this, resPath, moduleCode, callback) {
+ // 初始化集合
+ _this.lang = null;
+ _this.inlt = null;
+
+ // _this.state.lang = {};
+ // _this.state.inlt = null;
+
+ let success = (lang, status, inlt) => {
+ if (status) {
+ _this.lang = lang;
+ _this.inlt = inlt;
+
+ // _this.setState({ lang: lang, inlt: inlt });
+ }
+ // 模板初始化
+ callback && callback();
+ };
+ getMultiLang({ moduleId: resPath, domainName: moduleCode, callback: success, needInlt: true });
+}
+
+/**
+ * 获取多语
+ * @param {*} _this
+ * @param {*} resid
+ * @param {*} param
+ */
+function getLangByResId(_this, resid, param) {
+ check(_this, resid);
+ let str = resid;
+ if (param) {
+ if (_this.inlt) {
+ str = _this.inlt.get(resid, param);
+ return str ? str : resid;
+ // str = _this.state.inlt.get(resid, param);
+ } else {
+ return '';
+ }
+ } else {
+ // 如果还没有加载回来,则返回空,避免页面显示多语字符串
+ if (_this.lang) {
+ // if (_this.state.lang){
+ // str = _this.state.lang[resid];
+ str = _this.lang[resid];
+ return str ? str : resid;
+ } else {
+ return '';
+ }
+ }
+}
+
+/**
+ * 检查
+ * @param {*} _this
+ * @param {*} resid
+ */
+function check(_this, resid) {
+ if (!_this) {
+ toast({ color: 'danger', content: '请检查代码中this是否能够取到!当前为undifined,位置:' + resid });
+ throw new Error('请检查代码中this是否能够取到!当前为undifined,位置:' + resid);
+ }
+}
+
+export { initLang, getLangByResId };
+
+/*2Uuv1cMWZkg2BRt9wxfm3QleX4XVoItnYwuVl1hWO+M=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/printCountQuery.js b/src/scmpub/scmpub/pub/tool/printCountQuery.js
new file mode 100644
index 0000000..3ed1555
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/printCountQuery.js
@@ -0,0 +1,52 @@
+/*2zgL5dIlMDjskk4x63qAUwoUq0K0xo/+IP8PH7kHN9E=*/
+/*
+ * @Author: yinliangc
+ * @PageInfo: 打印次数查询
+ * @Date: 2020-08-21 18:27:27
+ * @Last Modified by: raoczh
+ * @Last Modified time: 2020-12-23 11:22:01
+ */
+
+import printNfig from 'uap/common/components/printlimitModal';
+import { showCheckDataWarningInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil';
+
+/**
+ * 打印次数查询
+ * @param {*} props
+ * @param {type, CONST, modal} printParas 参数,包含3个属性,table, CONST, modal
+ * type:标识类型(1-simpleTable,2-form),目前table只支持simpleTalbe,如果有其他需求,可以增加取数逻辑
+ * CONST:常量,结构{area:'区域编码',hid:'表头主键字段名称'}
+ * modal:适配打印次数查询模态框的modalID,一般是'code-config'
+ *
+ * printParas参数例子:{type:1,CONST:{area:'head',hid:'cgeneralhid'},modal:'code-config'}
+ */
+export default function(props, printParas = { type, CONST, modal }) {
+ /******************** 1、组装数据 ********************/
+ let { type, CONST, modal } = printParas;
+ let billids = [];
+ if (type == 1) {
+ // 组装列表界面(simpleTable)的打印次数查询数据
+ let checkdatas = props.table.getCheckedRows(CONST.area);
+ if (checkdatas && checkdatas.length > 0) {
+ checkdatas.forEach((item) => {
+ billids.push(item.data.values[CONST.hid].value);
+ });
+ }
+ } else if (type == 2) {
+ // 组装卡片界面(form)的打印次数查询数据
+ let id = props.form.getFormItemsValue(CONST.area, CONST.hid).value;
+ billids.push(id);
+ }
+
+ /******************** 2、容错提示 ********************/
+ if (!billids || billids.length <= 0) {
+ showCheckDataWarningInfo.call(this); // 提示选择数据
+ return;
+ }
+
+ /******************** 3、执行打印次数查询 ********************/
+ let params = { billids, modalName: modal };
+ printNfig(props, params);
+}
+
+/*2zgL5dIlMDjskk4x63qAUwoUq0K0xo/+IP8PH7kHN9E=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/refUtils.js b/src/scmpub/scmpub/pub/tool/refUtils.js
new file mode 100644
index 0000000..f66f594
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/refUtils.js
@@ -0,0 +1,34 @@
+/*Koat7zHub1jf1LCkMokWpNeSvVbwQzqFvIkaC4EdHn8=*/
+/*
+ * @Author: wangceb
+ * @PageInfo: 参照设置工具类
+ * @Date: 2018-12-13 13:51:05
+ * @Last Modified by: maopch
+ * @Last Modified time: 2018-12-27 10:46:40
+ */
+
+/**
+ * 设置人员参照是否显示离职人员
+ * @param {*} item
+ * @param {*} value
+ */
+function setPsndocShowLeavePower(item, value = true) {
+ item.isShowDimission = value;
+}
+
+/**
+ * 设置参照本身及上部业务单元框显示停用功能
+ * @param {*} item
+ * @param {*} value
+ */
+function setRefShowDisabledData(item, value = true) {
+ item.isShowDisabledData = value;
+ item.unitPropsExtend = {
+ isShowDisabledData: value, // 显示停用
+ isHasDisabledData: value // 是否有【显示停用】功能
+ };
+}
+
+export { setPsndocShowLeavePower, setRefShowDisabledData };
+
+/*Koat7zHub1jf1LCkMokWpNeSvVbwQzqFvIkaC4EdHn8=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/rownoInputUtil.js b/src/scmpub/scmpub/pub/tool/rownoInputUtil.js
new file mode 100644
index 0000000..8a6cdad
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/rownoInputUtil.js
@@ -0,0 +1,39 @@
+/*XPAPBltA6EYjnCbK1e5GwNkuldu8oAjkmoatMnXEouM=*/
+/**
+ * 行号字段前端设置的是文本,但是业务要求必须为数值,这里增加输入值的正则校验,只能输入数值
+ * @param {*} rownoField
+ * @param {*} config
+ */
+export default function(rownoField, config) {
+ console.log(111, config);
+ let inputVal = config.valueChange; //当前input框的数值
+ let item = config.item;
+ if (item.attrcode == rownoField) {
+ let checkFloat = /^-?[0-9]*(\.\d*)?$|^-?d^(\.\d*)?$/; //过滤是否为小数的正则,不完善;
+ if (inputVal.length == 0) {
+ //删除时,数值为空的情况过滤
+ return true;
+ } else if (checkFloat.test(inputVal)) {
+ if (inputVal.indexOf('-') != -1 && inputVal.substr(1, 1) == '0') {
+ if (inputVal.substr(1) == '.') {
+ return false;
+ } else if (inputVal.length > 2 && inputVal.substr(2, 1) != '.') {
+ return false;
+ }
+ } else if (inputVal.substr(0, 1) == '0') {
+ if (inputVal.substr(0) == '.') {
+ return false;
+ } else if (inputVal.length > 1 && inputVal.substr(1, 1) != '.') {
+ return false;
+ }
+ }
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return true;
+ }
+}
+
+/*XPAPBltA6EYjnCbK1e5GwNkuldu8oAjkmoatMnXEouM=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/sagaMessageUtils.js b/src/scmpub/scmpub/pub/tool/sagaMessageUtils.js
new file mode 100644
index 0000000..2c0d916
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/sagaMessageUtils.js
@@ -0,0 +1,24 @@
+/*11jkV86KiOSY3t5d3BKE1BUVOMOXWnnO0bJcPND0/Z8=*/
+/*
+ * @Author: chaiwx
+ * @PageInfo: saga相关消息工具
+ * @Date: 2018-07-22 09:40:38
+ * @Last Modified by: chaiwx
+ * @Last Modified time: 2019-12-09 11:05:50
+ */
+
+/**
+ * 显示saga错误信息提示框
+ * @param {*} props
+ * @param {*} params
+ */
+function showSagaErrorToast(props, params = {}) {
+ props.socket.showToast({
+ gtxid: params.gtxid,
+ billpk: params.billpk
+ });
+}
+
+export { showSagaErrorToast };
+
+/*11jkV86KiOSY3t5d3BKE1BUVOMOXWnnO0bJcPND0/Z8=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/simplifyDataUtil.js b/src/scmpub/scmpub/pub/tool/simplifyDataUtil.js
new file mode 100644
index 0000000..4765a87
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/simplifyDataUtil.js
@@ -0,0 +1,103 @@
+/*q66uLcENNnUUiflkjqcKRNvoUGXNgQg5nHGI8JA4taw=*/
+/*
+ * @PageInfo: 简化数据处理类
+ * @Author: guozhq
+ * @Date: 2018-12-27 15:42:41
+ * @Last Modified by: liulux
+ * @Last Modified time: 2022-04-11 21:35:25
+ */
+/**
+ *
+ * @param {*} data 要处理的数据结构
+ * @param {*} flag 是否简化scale的处理(默认是true)
+ */
+function simplifyData(data, flag = true) {
+ if (data && Array.isArray(data.rows) && data.rows.length) {
+ let newData = {
+ ...data,
+ rows: []
+ };
+ data.rows.forEach((item) => {
+ if (item && item.values) {
+ let newValues = {};
+ for (let pop in item.values) {
+ if (item.values[pop]) {
+ if (!isEmpty(item.values[pop].value)) {
+ newValues[pop] = { value: item.values[pop].value };
+ if (!flag && item.values[pop].scale != -1) {
+ newValues[pop].scale = item.values[pop].scale;
+ }
+ } else {
+ if (!flag && item.values[pop].scale != -1) {
+ newValues[pop] = { scale: item.values[pop].scale };
+ } else {
+ // newValues[pop] = {};
+ }
+ }
+ }
+ }
+ newData.rows.push({
+ ...item,
+ values: newValues
+ });
+ }
+ });
+ return newData;
+ }
+ return data;
+}
+function simplifyDataByFields(data, flag = true, bodyFields, isInclude = true) {
+ if (data && Array.isArray(data.rows) && data.rows.length) {
+ let newData = {
+ ...data,
+ rows: []
+ };
+ data.rows.forEach((item) => {
+ if (item.values) {
+ let newValues = {};
+ for (let pop in item.values) {
+ if (!bodyFields) {
+ if (!isEmpty(item.values[pop].value)) {
+ newValues[pop] = { value: item.values[pop].value };
+ if (!flag && item.values[pop].scale != -1) {
+ newValues[pop].scale = item.values[pop].scale;
+ }
+ } else {
+ if (!flag && item.values[pop].scale != -1) {
+ newValues[pop] = { scale: item.values[pop].scale };
+ }
+ }
+ } else {
+ if (isInclude) {
+ if (bodyFields.includes(pop)) {
+ newValues[pop] = { value: item.values[pop].value };
+ }
+ } else {
+ if (!bodyFields.includes(pop)) {
+ newValues[pop] = { value: item.values[pop].value };
+ }
+ }
+ }
+ }
+ newData.rows.push({
+ ...item,
+ values: newValues
+ });
+ }
+ });
+ return newData;
+ }
+ return data;
+}
+
+// 判断第一个参数是否为空,后面可以传其他【认为是空值】的参数
+function isEmpty(val, ...rest) {
+ if (val === null || val === undefined || val === '' || rest.find((e) => e == val)) {
+ return true;
+ }
+ return false;
+}
+
+export { simplifyData, simplifyDataByFields };
+
+/*q66uLcENNnUUiflkjqcKRNvoUGXNgQg5nHGI8JA4taw=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/titleUtil.js b/src/scmpub/scmpub/pub/tool/titleUtil.js
new file mode 100644
index 0000000..e84d4ae
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/titleUtil.js
@@ -0,0 +1,48 @@
+/*HFtHR8qy9s2qJFq95yOvBCStSrQ2e/DY7lKJHU+lxNk=*/
+/*
+ * @PageInfo: 创建APP应用标题工具
+ * @Author: guozhq
+ * @Date: 2019-08-22 08:37:27
+ * @Last Modified by: guozhq
+ * @Last Modified time: 2019-08-22 08:42:43
+ */
+
+/**
+ * 创建列表标题 (默认不带返回按钮)(基于BillHeadInfo)
+ * @param {*} _this this
+ * @param {*} params 参数对象 默认为 {} ,title 不传默认取应用菜单名称
+ */
+export function createListTitle(_this, params = {}) {
+ let { BillHeadInfo } = _this.props;
+ const { createBillHeadInfo } = BillHeadInfo;
+ return createBillHeadInfo({
+ ...params,
+ title: getAPPTitle(_this, params.title),
+ initShowBackBtn: false
+ });
+}
+
+/**
+ * 创建卡片标题(基于BillHeadInfo)
+ * @param {*} _this this
+ * @param {*} params 参数对象 默认为 {} ,title 不传默认取应用菜单名称
+ */
+export function createCardTitle(_this, params = {}) {
+ let { BillHeadInfo } = _this.props;
+ const { createBillHeadInfo } = BillHeadInfo;
+ return createBillHeadInfo({
+ ...params,
+ title: getAPPTitle(_this, params.title)
+ });
+}
+
+function getAPPTitle(_this, title) {
+ if (title) {
+ return title;
+ } else {
+ // 取菜单标题
+ return _this.props.getSearchParam('n');
+ }
+}
+
+/*HFtHR8qy9s2qJFq95yOvBCStSrQ2e/DY7lKJHU+lxNk=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil.js b/src/scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil.js
new file mode 100644
index 0000000..7e6584b
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/transferSkipToSrcBillUtil.js
@@ -0,0 +1,143 @@
+/*QU/hztwuBQEjAU9FLv5ds4WTvZJGl5XxbwLrt/mrB67EEB1aFrB6jorkLTajYJNw*/
+/*
+ * @Author: raoczh
+ * @PageInfo: 拉单界面单据号超链接
+ * @Date: 2019-08-20 10:32:13
+ * @Last Modified by: xiaoyaoj
+ * @Last Modified time: 2023-08-29 19:55:47
+ *
+ */
+
+import { ajax } from 'nc-lightapp-front';
+
+/**
+ * @param {*} props
+ * @param {*} item
+ * @param {object} config 跳转需要的参数
+ * @param {true/false} isAllPage 是否是全部页签
+ */
+function transferSkipToSrcBillUtil(props, item, config, isAllPage = false) {
+ if (isAllPage) {
+ const { billtypefield, billcodefield = 'vbillcode', pkfield } = config;
+ if (item.attrcode == billcodefield) {
+ //取消固定宽度,不然保存列宽失效
+ // item.width = 150;
+ item.renderStatus = 'browse';
+ item.render = (text, record, index) => {
+ let id = pkfield ? record[pkfield].value : record.headKey;
+ if (record[billtypefield] && record[billtypefield].value) {
+ let billtype = record[billtypefield].value;
+ return (
+ {
+ e.stopPropagation();
+ props.openTo(null, {
+ billtype: billtype,
+ //单据类型中的卡片联查
+ sence: 4,
+ status: 'browse',
+ id: id
+ });
+ }}
+ >
+ {!record[billcodefield].display ? (
+ record[billcodefield].value
+ ) : (
+ record[billcodefield].display
+ )}
+
+ );
+ } else {
+ return text.display || text.value;
+ }
+ };
+ return item;
+ }
+ } else {
+ const { billtype, billcodefield = 'vbillcode', pkfield } = config;
+ if (item.attrcode == billcodefield) {
+ // item.width = 150;
+ item.renderStatus = 'browse';
+ item.render = (text, record, index) => {
+ return (
+ {
+ if (billtype && record[pkfield]) {
+ e.stopPropagation();
+ props.openTo(null, {
+ billtype: billtype,
+ //单据类型中的卡片联查
+ sence: 4,
+ status: 'browse',
+ id: record[pkfield].value
+ });
+ }
+ }}
+ >
+ {!record[billcodefield].display ? record[billcodefield].value : record[billcodefield].display}
+
+ );
+ };
+ return item;
+ } else if (item.attrcode === 'ccarrierid') {
+ // 承运商超超链接
+ item.render = (text, record, index) => {
+ if (record && record.ccarrierid) {
+ return (
+ {
+ let ccarrierid = record.ccarrierid.value;
+ // 拼装json
+ let data = {
+ pks: [ ccarrierid ]
+ };
+ // 发送请求 获取类型
+ ajax({
+ url: '/nccloud/scmpub/carrier/getType.do',
+ data: data,
+ success: (res) => {
+ debugger;
+ if (res.success) {
+ let data = res.data;
+ var datum = data[ccarrierid];
+ if (datum == true) {
+ //说明是集团节点
+ // console.log("集团")
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carriergroup/main/#/card', {
+ status: 'browse',
+ appcode: '400101616',
+ pagecode: '400101616_card',
+ id: ccarrierid,
+ flag: 'super_outer'
+ });
+ } else {
+ // 组织节点
+ props.openTo('/scmpub/scmpub/carrier/main/#/card', {
+ status: 'browse',
+ appcode: '400101612',
+ pagecode: '400101612_card',
+ id: ccarrierid,
+ flag: 'super_outer'
+ });
+ }
+ }
+ }
+ });
+ }}
+ >
+ {record.ccarrierid && record.ccarrierid.display}
+
+ );
+ }
+ };
+ return item;
+ }
+ }
+}
+export { transferSkipToSrcBillUtil };
+
+/*QU/hztwuBQEjAU9FLv5ds4WTvZJGl5XxbwLrt/mrB67EEB1aFrB6jorkLTajYJNw*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/transtypeUtils.js b/src/scmpub/scmpub/pub/tool/transtypeUtils.js
new file mode 100644
index 0000000..08cdc15
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/transtypeUtils.js
@@ -0,0 +1,157 @@
+/*es+fWOGBgTdETVra6z7pRddejB1u9kWJbEw15uRYUQs=*/
+/**
+ * 页面初始化,inittemplate返回结果的处理,将交易类型信息缓存到state中
+ * @param {res.context} context
+ */
+import { setDefData , getDefData} from '../../pub/cache';
+
+
+const SCM_TRANSTYPEDATA = 'scm_transtypedata';
+const TRANSTYP_CODE='transtype_code';
+const TRANSTYPE_PK='pk_transtype';
+const TRANSTYPE_NAME = 'transtype_name';
+
+function init(context) {
+ if (context && context.paramMap && context.paramMap.transtype) {
+ this.transtypeData = {
+ transtype: context.paramMap.transtype,
+ transtype_name: context.paramMap.transtype_name,
+ pk_transtype: context.paramMap.pk_transtype
+ };
+
+ setDefData(SCM_TRANSTYPEDATA, TRANSTYP_CODE,context.paramMap.transtype);
+ setDefData(SCM_TRANSTYPEDATA, TRANSTYPE_NAME,context.paramMap.transtype_name);
+ setDefData(SCM_TRANSTYPEDATA, TRANSTYPE_PK,context.paramMap.pk_transtype);
+
+ }
+}
+
+/**
+ * 获取交易类型pk
+ */
+function getTranstypeID() {
+ let pk_transtype = getDefData(SCM_TRANSTYPEDATA,TRANSTYPE_PK);
+ return pk_transtype;
+ // return (this.transtypeData || {}).pk_transtype;
+}
+
+/**
+ * 获取交易类型code
+ */
+function getTranstypeCode() {
+ let transtype = getDefData(SCM_TRANSTYPEDATA,TRANSTYP_CODE);
+ return transtype;
+ // return (this.transtypeData || {}).transtype;
+}
+
+/**
+ * 获取交易类型name
+ */
+function getTranstypeName() {
+ let transtype_name = getDefData(SCM_TRANSTYPEDATA, TRANSTYPE_NAME);
+ return transtype_name;
+ // return (this.transtypeData || {}).transtype_name;
+}
+
+/**
+ * 交易类型和交易类型编码编辑前判断,如果是交易类型发布的节点,则返回false不可编辑
+ * @param {*} key
+ * @param {*} idField
+ * @param {*} codeField
+ */
+function beforeEdit(key, idField, codeField) {
+ if (key == idField || key == codeField) {
+ if (this.transtypeData && this.transtypeData.transtype) {
+ return false;
+ }
+ }
+ return true;
+}
+/**
+ * 设置默认值
+ * @param {form的区域编码} formArea
+ * @param {交易类型id字段} idField
+ * @param {交易类型code字段} codeField
+ */
+function setValue(formArea, idField, codeField) {
+ if (this.transtypeData) {
+ this.props.form.setFormItemsValue(formArea, {
+ [idField]: { value: this.transtypeData.pk_transtype, display: this.transtypeData.transtype_name },
+ [codeField]: { value: this.transtypeData.transtype, display: this.transtypeData.transtype }
+ });
+ }
+}
+
+/**
+ * 查询前处理查询条件,如果是交易类型发布的节点,需要添加交易类型条件
+ * @param {查询信息} queryInfo
+ * @param {查询区交易类型id字段} idField
+ */
+function beforeSearch(queryInfo, idField, codeField) {
+ if (queryInfo) {
+ if (this.transtypeData && this.transtypeData.pk_transtype) {
+ if (!queryInfo.querycondition) {
+ queryInfo.querycondition = {};
+ }
+ if (!queryInfo.querycondition.conditions) {
+ queryInfo.querycondition.conditions = [];
+ }
+ if (!queryInfo.querycondition.logic) {
+ queryInfo.querycondition.logic = 'and';
+ }
+ let condition = {
+ field: idField,
+ datatype: '204',
+ oprtype: '=',
+ value: { firstvalue: this.transtypeData.pk_transtype }
+ };
+ queryInfo.querycondition.conditions.push(condition);
+ }
+ }
+ return queryInfo;
+}
+
+/**
+ * 列表查询区交易类型处理,如果为交易类型发布的小应用,交易类型的查询条件不可修改,不可移除。注意此方法要再setmeta前调用
+ * @param {*} props
+ * @param {*} meta
+ * @param {*} queryarea
+ * @param {*} idField
+ */
+function initQuery(props, meta, queryarea, idField) {
+ let item = meta[queryarea].items.find((item) => item.attrcode == idField);
+ if (item && this.transtypeData) {
+ item.disabled = true;
+ item.isfixedcondition = true;
+ item.visible = true;
+ // item.initalvalue = { display: getTranstypeName.call(this), value: getTranstypeID.call(this) };
+ }
+}
+
+/**
+ * 设置查询区交易类型字段的默认值
+ * @param {*} props
+ * @param {*} queryarea
+ * @param {*} idField
+ */
+function setQueryDefaultValue(props, queryarea, idField) {
+ if (this.transtypeData) {
+ props.search.setSearchValByField(queryarea, idField, {
+ display: getTranstypeName.call(this),
+ value: getTranstypeID.call(this)
+ });
+ }
+}
+export default {
+ init,
+ getTranstypeID,
+ getTranstypeCode,
+ getTranstypeName,
+ beforeEdit,
+ setValue,
+ beforeSearch,
+ initQuery,
+ setQueryDefaultValue
+};
+
+/*es+fWOGBgTdETVra6z7pRddejB1u9kWJbEw15uRYUQs=*/
\ No newline at end of file
diff --git a/src/scmpub/scmpub/pub/tool/vbatchcodeHelper.js b/src/scmpub/scmpub/pub/tool/vbatchcodeHelper.js
new file mode 100644
index 0000000..f5b0c3c
--- /dev/null
+++ b/src/scmpub/scmpub/pub/tool/vbatchcodeHelper.js
@@ -0,0 +1,46 @@
+/*rtD709urIbSFAQIdWF30Ay4/TMrBdCgKkD4vgbld5bI=*/
+import { ajax } from 'nc-lightapp-front';
+/**
+ *
+ * @param {*} onhandDimParams 存量参数
+ * @param {*} billParams 本单据的参数
+ * @param {*} url 后台接口
+ * @param {*} canInsert 是否可以新增(true时,查不到批次号时把输入值不清空,false时清空)
+ * @param {*} callback 回调,用于处理vo合并,并更新表体行
+ * @param {*} value 返回的数据
+ */
+function onBlur(onhandDimParams, billParams, url, canInsert, callback, value) {
+ if (!value) {
+ return;
+ }
+ let data = {
+ onhandDimAppcode: onhandDimParams.appcode,
+ onhandDimPagecode: onhandDimParams.pagecode,
+ onhandDimVOGrid: {
+ head: {
+ areaType: 'table',
+ rows: [ onhandDimParams.headRows.rows[0] ]
+ },
+ pageid: onhandDimParams.pagecode
+ },
+ appcode: billParams.appcode,
+ pagecode: billParams.pagecode,
+ bodyarea: billParams.bodyarea,
+ currGrid: { [billParams.bodyarea]: { rows: [ billParams.record ] } },
+ batchcode: value,
+ canInsert
+ };
+ ajax({
+ url: url,
+ data: data,
+ mode: 'normal',
+ success: (res) => {
+ if (callback) {
+ callback.call(this, billParams.bodyarea, billParams.index, res.data);
+ }
+ }
+ });
+}
+export default { onBlur };
+
+/*rtD709urIbSFAQIdWF30Ay4/TMrBdCgKkD4vgbld5bI=*/
\ No newline at end of file