采购订单源码
This commit is contained in:
parent
01bf1e9f70
commit
bb6e83b9a4
|
|
@ -1 +1 @@
|
|||
/scmpub/
|
||||
|
||||
|
|
|
|||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import bodyAfterEvent from './bodyAfterEvent';
|
||||
import bodyPackAfterEvent from './bodyPackAfterEvent';
|
||||
import vbatchcodeAfterEvent from './vbatchcodeAfterEvent';
|
||||
export { bodyAfterEvent, vbatchcodeAfterEvent, bodyPackAfterEvent };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import orgAfterEvent from './orgAfterEvent';
|
||||
import initPkOrgAfter from './initPkOrgAfter';
|
||||
import commonAfterEvent from './commonAfterEvent';
|
||||
export { commonAfterEvent, orgAfterEvent, initPkOrgAfter };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import headAfterEvent from './headAfterEvent';
|
||||
import bodyAfterEvent from './bodyAfterEvent';
|
||||
import bodyPackAfterEvent from './bodyPackAfterEvent';
|
||||
export { headAfterEvent, bodyAfterEvent, bodyPackAfterEvent };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import bodyBatchEvents from './bodyBatchEvents';
|
||||
export { bodyBatchEvents };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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*/
|
||||
|
|
@ -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*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import ctrantypeBefore from './ctrantypeBefore';
|
||||
|
||||
export { ctrantypeBefore };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import headBeforeEvent from './headBeforeEvent';
|
||||
import bodyBeforeEvent from './bodyBeforeEvent';
|
||||
import packBeforeEvent from './packBeforeEvent';
|
||||
export { headBeforeEvent, bodyBeforeEvent, packBeforeEvent };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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 (
|
||||
<div className="definition-icons">
|
||||
{createButtonApp({
|
||||
area: areaCode,
|
||||
onButtonClick: btnClick.bind(this),
|
||||
ignoreHotkeyCode: [ BUTTON.delLine ]
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
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 ? (
|
||||
<TempDataList
|
||||
parentProps={this.props}
|
||||
display={this.state.showTemp}
|
||||
config={{
|
||||
pagecode: CARD.pagecode,
|
||||
type: 'card',
|
||||
processorstr: 'nccloud.web.dm.delivbill.action.DelivbillTempSaveProcessor'
|
||||
}}
|
||||
addTemporary={this.state.tempDataList}
|
||||
close={() => {
|
||||
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=*/
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import initTemplate from './initTemplate';
|
||||
export { initTemplate };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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 (
|
||||
<span
|
||||
className="code-detail-link"
|
||||
onClick={() => {
|
||||
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}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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 (
|
||||
<div className="nc-bill-extCard-2">
|
||||
<div className="nc-bill-top-area">
|
||||
<NCAffix>
|
||||
{/* 按钮区 */}
|
||||
<NCDiv areaCode={NCDiv.config.HEADER} className="nc-bill-header-area">
|
||||
<span>
|
||||
{createCardTitle(this, {
|
||||
backBtnClick: btnClick.bind(this, this.props, BUTTON.back)
|
||||
})}
|
||||
</span>
|
||||
<div className="header-button-area">
|
||||
{createButtonApp({
|
||||
area: CARD.head,
|
||||
onButtonClick: btnClick.bind(this)
|
||||
})}
|
||||
</div>
|
||||
{/* 上一页/下一页 */}
|
||||
<div className="header-cardPagination-area">
|
||||
{createCardPagination({
|
||||
handlePageInfoChange: (props, pk) => {
|
||||
pageInfoClick.call(this, props, pk);
|
||||
},
|
||||
dataSource: CACHEDATA.listCacheKey
|
||||
})}
|
||||
</div>
|
||||
{/* 单据追溯 */}
|
||||
<BillTrack
|
||||
show={this.state.showTrack}
|
||||
close={() => {
|
||||
this.setState({ showTrack: false });
|
||||
}}
|
||||
pk={this.state.pk}
|
||||
type={FIELD.billtype}
|
||||
/>
|
||||
{/* 附件管理 */}
|
||||
{this.state.showUploader && (
|
||||
<NCUploader
|
||||
billId={this.state.billid}
|
||||
onHide={() => {
|
||||
this.setState({
|
||||
showUploader: false
|
||||
});
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</NCDiv>
|
||||
</NCAffix>
|
||||
{/* 表单 */}
|
||||
<div className="nc-bill-form-area">
|
||||
{createForm(CARD.form, {
|
||||
onAfterEvent: headAfterEvent.bind(this),
|
||||
onBeforeEvent: headBeforeEvent.bind(this)
|
||||
})}
|
||||
{this.creatTempDataList()}
|
||||
</div>
|
||||
</div>
|
||||
{/* 包装 */}
|
||||
<div className="nc-bill-table-area">
|
||||
{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
|
||||
})}
|
||||
</div>
|
||||
{/* 货物 */}
|
||||
<div className="nc-bill-tableTab-area">
|
||||
{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
|
||||
})}
|
||||
</div>
|
||||
<NCModal show={this.state.dlgShowFlag} onHide={this.hideDtailsState} size="sm">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000049')}</NCModal.Title>
|
||||
{/* 国际化处理: 运输单签收条件*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<SigntermDlg
|
||||
initData={this.state.initData}
|
||||
initBillPk={this.state.pk}
|
||||
closeDlg={this.hideDtailsState}
|
||||
defineDlg={this.defineDlg}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
</NCModal>
|
||||
<NCModal show={this.state.dlgListFlag} onHide={this.hideDlgListState} size="xlg">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000050')}</NCModal.Title>
|
||||
{/* 国际化处理: 签收录入*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<SigntermDlgList
|
||||
initBillPk={this.state.pk}
|
||||
conditionData={this.state.dlgCondition}
|
||||
setHeadData={(data) => {
|
||||
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;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
<NCModal.Footer>
|
||||
{this.props.button.createButtonApp({
|
||||
area: CARD.dialog,
|
||||
onButtonClick: signtermBtnClick.bind(this)
|
||||
})}
|
||||
</NCModal.Footer>
|
||||
</NCModal>
|
||||
<NCModal show={this.state.refAddLineFlag} onHide={this.hideDlgRefState} size="xlg" zIndex="230">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000051')}</NCModal.Title>
|
||||
{/* 国际化处理: 运输单参照生单*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<MultiTransferTable
|
||||
isRefAddLine={true}
|
||||
refAddData={this.state.refAddData}
|
||||
refAddLineDefine={this.refAddLineDefine}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
</NCModal>
|
||||
<NCModal show={this.state.combineViewFlag} onHide={this.hideDlgCombineView} size="xlg">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000052')}</NCModal.Title>
|
||||
{/* 国际化处理: 合并显示*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<CombineModel
|
||||
initData={this.state.combinePK}
|
||||
getInstance={(content) => {
|
||||
this.CombineModalContent = content;
|
||||
}}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
<NCModal.Footer>
|
||||
{createButtonApp({
|
||||
area: CARD.combine,
|
||||
onButtonClick: (...arg) => {
|
||||
this.CombineModalContent && this.CombineModalContent.btnClick(...arg);
|
||||
}
|
||||
})}
|
||||
</NCModal.Footer>
|
||||
</NCModal>
|
||||
{createModal('code-config')}
|
||||
{createModal('printService', {
|
||||
className: 'print-service'
|
||||
})}
|
||||
<iframe id="printServiceframe" name="printServiceframe" style={{ display: 'none' }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/*YkFTtpPO29FuuRZj9TLkgycLbgOBngMvh/KJ2RgABAI=*/
|
||||
|
|
@ -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 (
|
||||
<div id="transferCard" className="nc-bill-transferList">
|
||||
<NCAffix>
|
||||
<NCDiv areaCode={NCDiv.config.HEADER} className="nc-bill-header-area">
|
||||
<div className="header-title-search-area">
|
||||
{createCardTitle(this, {
|
||||
backBtnClick: btnClick.bind(this, this.props, BUTTON.back)
|
||||
})}
|
||||
</div>
|
||||
<div className="header-button-area">
|
||||
{createButtonApp({
|
||||
area: CARD.head,
|
||||
onButtonClick: btnClick.bind(this)
|
||||
})}
|
||||
</div>
|
||||
{/* 单据追溯 */}
|
||||
<BillTrack
|
||||
show={this.state.showTrack}
|
||||
close={() => {
|
||||
this.setState({ showTrack: false });
|
||||
}}
|
||||
pk={this.state.pk}
|
||||
type={FIELD.billtype}
|
||||
/>
|
||||
{/* 附件管理 */}
|
||||
{this.state.showUploader && (
|
||||
<NCUploader
|
||||
billId={this.state.billid}
|
||||
onHide={() => {
|
||||
this.setState({
|
||||
showUploader: false
|
||||
});
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</NCDiv>
|
||||
</NCAffix>
|
||||
<div className="nc-bill-transferList-content">
|
||||
{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);
|
||||
}
|
||||
})}
|
||||
<div className="transferList-content-right nc-bill-extCard-2">
|
||||
<div className="nc-bill-form-area">
|
||||
{createForm(CARD.form, {
|
||||
onAfterEvent: headAfterEvent.bind(this),
|
||||
onBeforeEvent: headBeforeEvent.bind(this)
|
||||
})}
|
||||
</div>
|
||||
{/* 包装 */}
|
||||
<div className="nc-bill-table-area">
|
||||
{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
|
||||
})}
|
||||
</div>
|
||||
{/* 货物 */}
|
||||
<div className="nc-bill-tableTab-area">
|
||||
{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
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<NCModal show={this.state.dlgShowFlag} onHide={this.hideDtailsState} size="sm">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000049')}</NCModal.Title>
|
||||
{/* 国际化处理: 运输单签收条件*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<SigntermDlg
|
||||
initData={this.state.initData}
|
||||
initBillPk={this.state.pk}
|
||||
closeDlg={this.hideDtailsState}
|
||||
defineDlg={this.defineDlg}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
</NCModal>
|
||||
<NCModal show={this.state.dlgListFlag} onHide={this.hideDlgListState} size="xlg">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000050')}</NCModal.Title>
|
||||
{/* 国际化处理: 签收录入*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<SigntermDlgList
|
||||
initBillPk={this.state.pk}
|
||||
conditionData={this.state.dlgCondition}
|
||||
setHeadData={(data) => {
|
||||
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;
|
||||
}}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
<NCModal.Footer>
|
||||
{this.props.button.createButtonApp({
|
||||
area: CARD.dialog,
|
||||
onButtonClick: signtermBtnClick.bind(this)
|
||||
})}
|
||||
</NCModal.Footer>
|
||||
</NCModal>
|
||||
<NCModal show={this.state.refAddLineFlag} onHide={this.hideDlgRefState} size="xlg" zIndex="230">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000051')}</NCModal.Title>
|
||||
{/* 国际化处理: 运输单参照生单*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<MultiTransferTable
|
||||
isRefAddLine={true}
|
||||
refAddData={this.state.refAddData}
|
||||
refAddLineDefine={this.refAddLineDefine}
|
||||
/>
|
||||
</NCModal.Body>
|
||||
</NCModal>
|
||||
<NCModal show={this.state.combineViewFlag} onHide={this.hideDlgCombineView} size="xlg">
|
||||
<NCModal.Header closeButton>
|
||||
<NCModal.Title>{getLangByResId(this, '4014DELIVBILL-000052')}</NCModal.Title>
|
||||
{/* 国际化处理: 合并显示*/}
|
||||
</NCModal.Header>
|
||||
<NCModal.Body>
|
||||
<CombineModel initData={this.state.combinePK} getInstance={(content) => {
|
||||
this.CombineModalContent = content;
|
||||
}} />
|
||||
</NCModal.Body>
|
||||
<NCModal.Footer>
|
||||
{createButtonApp({
|
||||
area: CARD.combine,
|
||||
onButtonClick: (...arg) => {
|
||||
this.CombineModalContent && this.CombineModalContent.btnClick(...arg);
|
||||
}
|
||||
})}
|
||||
</NCModal.Footer>
|
||||
</NCModal>
|
||||
{createModal('code-config')}
|
||||
{createModal('printService', {
|
||||
className: 'print-service'
|
||||
})}
|
||||
<iframe id="printServiceframe" name="printServiceframe" style={{ display: 'none' }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/*tDZvrAdMQJe+xlnVQH5dvw/DhfFThXxBN5sprg28Z3U=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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 (
|
||||
<div className="nc-bill-extCard-2">
|
||||
<div className="nc-bill-top-area">
|
||||
{/* 表单 */}
|
||||
<div className="nc-bill-form-area">{createForm(CARD.form, {})}</div>
|
||||
</div>
|
||||
{/* 货物 */}
|
||||
<div className="nc-bill-table-area scm-ic-extent-btn">
|
||||
{createCardTable(CARD.body, {
|
||||
hideModelSave: true,
|
||||
adaptionHeight: false
|
||||
})}
|
||||
</div>
|
||||
{/* 包装 */}
|
||||
<div className="nc-bill-tableTab-area scm-ic-extent-btn">
|
||||
{createCardTable(CARD.pack, {
|
||||
hideModelSave: true,
|
||||
adaptionHeight: true
|
||||
})}
|
||||
</div>
|
||||
{createModal('printService', {
|
||||
className: 'print-service'
|
||||
})}
|
||||
<iframe id="printServiceframe" name="printServiceframe" style={{ display: 'none' }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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=*/
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import initTemplate from './initTemplate';
|
||||
export { initTemplate };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,6 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import searchAfterEvent from './searchAfterEvent';
|
||||
|
||||
export { searchAfterEvent };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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=*/
|
||||
|
|
@ -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 (
|
||||
<div className="nc-bill-list">
|
||||
<NCAffix>
|
||||
<NCDiv areaCode={NCDiv.config.HEADER} className="nc-bill-header-area">
|
||||
<div className="header-title-search-area">{createListTitle(this)}</div>
|
||||
<div className="header-button-area">
|
||||
{createButtonApp({
|
||||
area: LIST.head,
|
||||
onButtonClick: btnClick.bind(this),
|
||||
ignoreHotkeyCode: [ BUTTON.approve, BUTTON.delete ]
|
||||
})}
|
||||
</div>
|
||||
{/* 单据追溯 */}
|
||||
<BillTrack
|
||||
show={this.state.showTrack}
|
||||
close={() => {
|
||||
this.setState({ showTrack: false });
|
||||
}}
|
||||
pk={this.state.pk}
|
||||
type={FIELD.billtype}
|
||||
/>
|
||||
{/* 附件管理 */}
|
||||
{this.state.showUploader && (
|
||||
<NCUploader
|
||||
billId={this.state.billid}
|
||||
billNo={this.state.vbillcode}
|
||||
onHide={() => {
|
||||
this.setState({
|
||||
showUploader: false
|
||||
});
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</NCDiv>
|
||||
</NCAffix>
|
||||
{/* 查询区 */}
|
||||
<div className="nc-bill-search-area">
|
||||
{NCCreateSearch(LIST.search, {
|
||||
clickSearchBtn: commonSearch.bind(this, this.props, false),
|
||||
defaultConditionsNum: 5,
|
||||
onAfterEvent: searchAfterEvent.bind(this),
|
||||
renderCompleteEvent: this.renderCompleteEvent,
|
||||
statusChangeEvent: this.renderCompleteEvent
|
||||
})}
|
||||
</div>
|
||||
{/* 列表区 */}
|
||||
<div className="nc-bill-table-area">
|
||||
{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)
|
||||
})}
|
||||
</div>
|
||||
{createModal('code-config')}
|
||||
{createModal('printService', {
|
||||
className: 'print-service'
|
||||
})}
|
||||
<iframe id="printServiceframe" name="printServiceframe" style={{ display: 'none' }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
DelivbillList = createPage({
|
||||
billinfo: {
|
||||
billtype: 'grid',
|
||||
pagecode: LIST.pagecode,
|
||||
headcode: LIST.search,
|
||||
bodycode: LIST.list
|
||||
}
|
||||
})(DelivbillList);
|
||||
|
||||
export default DelivbillList;
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
import initTemplate from './initTemplate';
|
||||
export { initTemplate };
|
||||
|
||||
/*QrbcW4heYaekOseeRyzLLb3iVj0IQra+5s6Y0Z3orvo=*/
|
||||
|
|
@ -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 (
|
||||
<BillCodeHyperLink
|
||||
value={((record || {}).vbillcode || {}).value}
|
||||
onClick={() => {
|
||||
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 (
|
||||
<span
|
||||
className="code-detail-link"
|
||||
onClick={() => {
|
||||
|
||||
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}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
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=*/
|
||||
|
|
@ -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=*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue