|
|
|
@ -18,6 +18,25 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
{
|
|
|
|
|
public class DingDing
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 使用 Token 初始化账号Client
|
|
|
|
|
* @return Client
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public static AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client CreateClient1()
|
|
|
|
|
{
|
|
|
|
|
AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config();
|
|
|
|
|
config.Protocol = "https";
|
|
|
|
|
config.RegionId = "central";
|
|
|
|
|
return new AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client(config);
|
|
|
|
|
}
|
|
|
|
|
public static AlibabaCloud.SDK.Dingtalkworkflow_1_0.Client CreateClient()
|
|
|
|
|
{
|
|
|
|
|
AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config();
|
|
|
|
|
config.Protocol = "https";
|
|
|
|
|
config.RegionId = "central";
|
|
|
|
|
return new AlibabaCloud.SDK.Dingtalkworkflow_1_0.Client(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取token
|
|
|
|
@ -63,7 +82,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
/// <param name="token">钉钉token</param>
|
|
|
|
|
/// <param name="ProcessCode">审批模板Id</param>
|
|
|
|
|
/// <param name="TenantId">租户Id</param>
|
|
|
|
|
public static void UpDingOAForm(string token, string ProcessCode, List<InInvoice> inInvoicesData,List<SysDictData> dictlist)
|
|
|
|
|
public static void UpDingOAForm(string token, string ProcessCode, List<InInvoice> inInvoicesData, List<SysDictData> dictlist)
|
|
|
|
|
{
|
|
|
|
|
AlibabaCloud.SDK.Dingtalkworkflow_1_0.Client client = CreateClient();
|
|
|
|
|
FormCreateHeaders formCreateHeaders = new FormCreateHeaders();
|
|
|
|
@ -75,8 +94,8 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
foreach (var item in dictlist)
|
|
|
|
|
{
|
|
|
|
|
SelectOption so = new SelectOption();
|
|
|
|
|
so.Value=item.Value;
|
|
|
|
|
so.Key= item.Value;
|
|
|
|
|
so.Value = item.Value;
|
|
|
|
|
so.Key = item.Value;
|
|
|
|
|
fyleop.Add(so);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -129,6 +148,21 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
selectOptions.Add(st);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//明细金额
|
|
|
|
|
FormComponent mxje = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "MoneyField",
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "MoneyField-mxje", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = false, // 控件是否必填
|
|
|
|
|
Label = "金额(元)", // 控件标题
|
|
|
|
|
Placeholder = "请输入", // 输入提示
|
|
|
|
|
Print = "1",//是否参与打印
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
FormComponent fymx = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "DDSelectField",
|
|
|
|
@ -145,11 +179,10 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormComponent fymxList = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "TableField",
|
|
|
|
|
Children = new List<FormComponent> { fymx },
|
|
|
|
|
Children = new List<FormComponent> { fymx, mxje },
|
|
|
|
|
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
@ -160,21 +193,41 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 金额
|
|
|
|
|
//FormComponent xmmcA = new FormComponent
|
|
|
|
|
//{
|
|
|
|
|
// ComponentType = "MoneyField",
|
|
|
|
|
// Props = new FormComponentProps
|
|
|
|
|
// {
|
|
|
|
|
// ComponentId = "MoneyField_1JZJIQ", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
// Required = true, // 控件是否必填
|
|
|
|
|
// Label = "金额(元)", // 控件标题
|
|
|
|
|
// Placeholder = "请输入金额",// 输入提示
|
|
|
|
|
// Print = "1",//是否参与打印
|
|
|
|
|
// Disabled = false, //是否可编辑
|
|
|
|
|
// }
|
|
|
|
|
//};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 自动计算金额
|
|
|
|
|
FormComponent xmmcA = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "MoneyField",
|
|
|
|
|
ComponentType = "CalculateField",
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "MoneyField_1JZJIQ", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = true, // 控件是否必填
|
|
|
|
|
Label = "金额(元)", // 控件标题
|
|
|
|
|
Placeholder = "请输入金额",// 输入提示
|
|
|
|
|
Print = "1",//是否参与打印
|
|
|
|
|
Disabled = false, //是否可编辑
|
|
|
|
|
Label = "总金额(元)", // 控件标题
|
|
|
|
|
Placeholder = "费用明细合计金额",// 输入提示
|
|
|
|
|
|
|
|
|
|
Formula = "[{\"id\":\"MoneyField-mxje\"}]"
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 收款账户
|
|
|
|
|
FormComponent skzh = new FormComponent
|
|
|
|
|
{
|
|
|
|
@ -209,11 +262,11 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
|
|
|
|
|
FormComponent bxsy = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "TextField",
|
|
|
|
|
ComponentType = "TextareaField",
|
|
|
|
|
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "TextField-bxsy", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
ComponentId = "TextareaField-bxsy", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = true, // 控件是否必填
|
|
|
|
|
Label = "报销事由", // 控件标题
|
|
|
|
|
Placeholder = "请输入",// 输入提示
|
|
|
|
@ -225,6 +278,69 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
};
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 收款人姓名
|
|
|
|
|
FormComponent skrxm = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "TextField",
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "TextField-skrxm", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = true, // 控件是否必填
|
|
|
|
|
Label = "收款人姓名", // 控件标题
|
|
|
|
|
Placeholder = "请输入",// 输入提示
|
|
|
|
|
Print = "1",//是否参与打印
|
|
|
|
|
Disabled = false, //是否可编辑
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 收款人卡号
|
|
|
|
|
FormComponent skrkh = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "TextField",
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "TextField-skrkh", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = true, // 控件是否必填
|
|
|
|
|
Label = "收款人卡号", // 控件标题
|
|
|
|
|
Placeholder = "请输入",// 输入提示
|
|
|
|
|
Print = "1",//是否参与打印
|
|
|
|
|
Disabled = false, //是否可编辑
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
#endregion
|
|
|
|
|
#region 所属银行
|
|
|
|
|
FormComponent ssyh = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "TextField",
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "TextField-ssyh", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = true, // 控件是否必填
|
|
|
|
|
Label = "所属银行", // 控件标题
|
|
|
|
|
Placeholder = "(例如)青岛银行",// 输入提示
|
|
|
|
|
Print = "1",//是否参与打印
|
|
|
|
|
Disabled = false, //是否可编辑
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 开户行
|
|
|
|
|
FormComponent khh = new FormComponent
|
|
|
|
|
{
|
|
|
|
|
ComponentType = "TextField",
|
|
|
|
|
Props = new FormComponentProps
|
|
|
|
|
{
|
|
|
|
|
ComponentId = "TextField-khh", // 控件id,表单内唯一,与bizAlias二选一
|
|
|
|
|
Required = true, // 控件是否必填
|
|
|
|
|
Label = "开户行", // 控件标题
|
|
|
|
|
Placeholder = "请输入",// 输入提示
|
|
|
|
|
Print = "1",//是否参与打印
|
|
|
|
|
Disabled = false, //是否可编辑
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormCreateRequest formCreateRequest = new FormCreateRequest
|
|
|
|
|
{
|
|
|
|
@ -234,11 +350,17 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
FormComponents = new List<FormComponent>
|
|
|
|
|
{
|
|
|
|
|
fylx,//费用类别
|
|
|
|
|
xmmc,//项目名称
|
|
|
|
|
//xmmc,//项目名称
|
|
|
|
|
fymxList,//费用明细
|
|
|
|
|
xmmcA,//金额
|
|
|
|
|
skzh,//收款账户
|
|
|
|
|
//skzh,//收款账户
|
|
|
|
|
bxsy,//报销事由
|
|
|
|
|
skrxm,//收款人姓名
|
|
|
|
|
skrkh,//收款人银行卡号
|
|
|
|
|
ssyh,//所属银行
|
|
|
|
|
khh,//收款人银行开户行
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//glspd //关联审批单
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
@ -266,28 +388,6 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 使用 Token 初始化账号Client
|
|
|
|
|
* @return Client
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public static AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client CreateClient1()
|
|
|
|
|
{
|
|
|
|
|
AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config();
|
|
|
|
|
config.Protocol = "https";
|
|
|
|
|
config.RegionId = "central";
|
|
|
|
|
return new AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client(config);
|
|
|
|
|
}
|
|
|
|
|
public static AlibabaCloud.SDK.Dingtalkworkflow_1_0.Client CreateClient()
|
|
|
|
|
{
|
|
|
|
|
AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config();
|
|
|
|
|
config.Protocol = "https";
|
|
|
|
|
config.RegionId = "central";
|
|
|
|
|
return new AlibabaCloud.SDK.Dingtalkworkflow_1_0.Client(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取审批实例详情
|
|
|
|
|
/// </summary>
|
|
|
|
|