!2234 新增子号拆单时是否允许创建新订单权限

pull/2254/MERGE
cf-erp 1 year ago committed by ChenX
parent a35b91fb8d
commit 7aac44a609

@ -63,7 +63,13 @@ export class ErpView extends React.Component<ErpViewProp, {}> {
switch (this.props.erpRoute.RouteType)
{
case ErpRoutes.:
this.postMessage("init", { token: this.props.token, chaidanOption: option });
this.postMessage("init", {
token: this.props.token,
chaidanOption: option,
permission: {
createOrder: userConfig.isMaster || userConfig.rights.includes('417')
}
});
break;
case ErpRoutes.:
this.postMessage("singleInit", singleData);

@ -20,20 +20,14 @@ switch (location.hostname)
}
if (location.hash != '')
{
let branch = location.hash.match(/cd=(.+)?&?/)[1];
const query = new URLSearchParams(location.hash.substring(1));
let branch = query.get('cd');
let host = ErpURL.host;
if (branch)
{
const r = new RegExp(`${host}/branch=(.*?)`, 'g');
if (!r.test(branch))
{
if (location.hostname === 'localhost')
{
ErpURL.host = branch;
} else
if (branch.indexOf('//localhost') == -1)
{
ErpURL.host = host + `/branch=${branch}/`;
}
} else
{
ErpURL.host = branch;

Loading…
Cancel
Save