Compare commits

...
Author SHA1 Message Date
chfei bac53e7812 超管 增加商铺永不过期权限 2026-09-28 17:08:42 +08:00
wule 5bfaed02e2 Merge branch 'master' of github.com:KJD2025/KJD 2026-09-24 13:31:29 +08:00
wule 7b9d63d0c9 上货遇到类目更新缓存失效的重新识别一次类目 2026-09-24 13:31:10 +08:00
chfei b12eb46f8e Merge branch 'master' of github.com:jtt-fan/KJD 2026-09-24 10:28:33 +08:00
chfei 99fd0407be 运费流水增加同步物流 2026-09-24 10:28:23 +08:00
wule 3696ee3b3e 新增额外包裹字段 2026-09-23 22:04:19 +08:00
chfei fe9bad9983 管理员与OEM增加 修改用户的同步物流金额 2026-09-23 14:46:55 +08:00
chfei 90dbd7fedc 用户消费付款类型增加 同步物流 =55 2026-09-23 11:40:54 +08:00
chfei 16ed764447 超级用户管理 增加分页 2026-09-22 18:43:07 +08:00
chfei d9dd4dfaed Merge branch 'master' of github.com:jtt-fan/KJD 2026-09-21 11:08:59 +08:00
chfei 93d2956d95 修复上货页面绑定多次bug 2026-09-21 11:08:45 +08:00
wule fe5ff0513a 新版本,oem新打包 2026-09-21 11:05:42 +08:00
wule 50d3e6c3ee Merge branch 'master' of github.com:KJD2025/KJD 2026-09-21 10:40:32 +08:00
wule d1001d5623 保证金 更新 2026-09-21 10:39:32 +08:00
chfei 2bb20fc107 结算页面 刷新去除 结算改刷新 2026-09-20 19:06:23 +08:00
chfei 652e7bc6e1 OEM 结算和用户修改OEM归属 2026-09-20 17:10:33 +08:00
chfei 8c11794884 Merge branch 'master' of github.com:jtt-fan/KJD 2026-09-18 16:21:21 +08:00
chfei 1b9d2244c8 待上传商品筛选配置保存 2026-09-17 18:02:37 +08:00
wule 8a89859a3f 发布新版本 2026-09-17 15:51:40 +08:00
wule 95faf9f104 修复类目识别后未保存的bug 2026-09-17 15:34:58 +08:00
chfei ab4f94e320 Merge branch 'master' of github.com:jtt-fan/KJD 2026-09-17 14:50:57 +08:00
chfei a9c3e5e301 增加OEM返现列表 2026-09-17 14:50:45 +08:00
wule b15c49f253 修复类目模板上传重试多次取值错误问题 2026-09-17 14:38:12 +08:00
wule f06bed1927 上货小优化 2026-09-17 14:36:58 +08:00
wule 02e4d9d5c7 Merge branch 'master' of github.com:KJD2025/KJD 2026-09-17 10:21:53 +08:00
wule b94507ad81 更新配置 2026-09-17 10:21:38 +08:00
wule 2c15736f11 Merge branch 'master' of github.com:KJD2025/KJD 2026-09-16 18:51:38 +08:00
wule c0fa847158 优化类目模板获取错误状态显示 2026-09-16 18:51:20 +08:00
wule 1e93c5fdfb 发版本, oem新打包 2026-09-16 16:16:31 +08:00
wule b9c756b561 上货类目识别改为使用接口 2026-09-16 16:14:45 +08:00
wule 52bb9973b9 新版本 2026-09-16 15:20:41 +08:00
wule 1d8ad2c412 Merge branch 'master' of github.com:KJD2025/KJD 2026-09-16 15:16:37 +08:00
wule 44c00570ac 用户的积分充值放开 2026-09-16 15:15:11 +08:00
chfei 2f6b0deb1c 修改店铺续费的接口 改为最新接口 2026-09-16 13:45:33 +08:00
chfei 2e4aeee82f Merge branch 'master' of github.com:jtt-fan/KJD 2026-09-15 13:53:50 +08:00
chfei ab7bd36ba6 上货增加图片缓存 暂未开放 2026-09-15 13:52:05 +08:00
wule 6e3a100d0a cef缓存还原,上货价格同步崩溃问题修复 2026-09-15 10:16:18 +08:00
wule 1468153f6d Merge branch 'master' of github.com:KJD2025/KJD 2026-09-15 10:12:06 +08:00
wule 761c3483bc 新版本 2026-09-15 10:11:33 +08:00
wule 7df74cd30a 更新版本 2026-09-11 11:58:34 +08:00
44 changed files with 2759 additions and 488 deletions

No files matched your search

+6
View File
@@ -60,4 +60,10 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Update="BaseClass.cs">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Compile>
</ItemGroup>
</Project>
+1 -1
View File
@@ -31,7 +31,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 1312;
public static int VersionCount = 1326;
public static string MainPath = "29wx";
//public static string MainPath = "29wx";
//public static string MainPath = "29pdd";
+16
View File
@@ -1166,6 +1166,22 @@ Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+
Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.1+(KHTML,+like+Gecko)+Chrome/21.0.1180.89+Safari/537.1
Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/45.0.2454.101+Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.2372.400 QQBrowser/9.5.10548.400";
public static async Task<string> PostJsonAsync(string url, object postData, int? timeOut = null)
{
return await PostUtf8Async(url, JsonHelper.SerializeObject(postData), contentType: "application/json", timeOut: timeOut);
}
public static async Task<string> PostJsonAsync(string url, string postData, int? timeOut = null)
{
return await PostUtf8Async(url, postData, contentType: "application/json", timeOut: timeOut);
}
public static string PostJson(string url, object postData, int? timeOut = null)
{
return PostUtf8(url, JsonHelper.SerializeObject(postData), contentType: "application/json", timeOut: timeOut);
}
public static string PostJson(string url, string postData, int? timeOut = null)
{
return PostUtf8(url, postData, contentType: "application/json", timeOut: timeOut);
}
/// <summary>
/// post 数据
@@ -86,5 +86,8 @@ namespace AllBase.Model.DBModel
支付宝在线充值 = 30,
云仓退货支出 = 31,
礼物单退费 = 34,
额外订单创建 = 35,
额外订单作废 = 36,
同步物流 = 55,
}
}
+5 -5
View File
@@ -25,11 +25,7 @@ namespace AllBase.Model.Result
{
public TData Data { get; set; }
}
public class PageResult<TData> : Result<List<TData>>
{
public int Page { get; set; }
public int Total { get; set; }
}
public class PageData<T>
{
public long Total { get; set; }
@@ -48,4 +44,8 @@ namespace AllBase.Model.Result
PageSize = pageSize;
}
}
public class ApiPageResult<T> : Result<PageData<T>>
{
}
}
+9
View File
@@ -228,6 +228,11 @@ namespace AllBase.Model.Result
/// 遇到需要终止上货的提示词的重试次数。
/// </summary>
public int upLimitRetryCount { get; set; } = 0;
/// <summary>
/// 是否永不过期
/// </summary>
public bool never_expires { get; set; }
}
public class AuthInfo
@@ -321,6 +326,10 @@ namespace AllBase.Model.Result
/// 每一单礼物额外收取费用
/// </summary>
public decimal gift_oem_amount_per_order { get; set; } = 0m;
/// <summary>
/// 同步物流额外收费
/// </summary>
public decimal sync_logistics_per_order { get; set; } = 0m;
/// <summary>
/// 子账号禁止访问的页面
/// </summary>
Binary file not shown.

After

Width:  |  Height:  |  Size: 492 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

+1
View File
@@ -0,0 +1 @@
2621y1FaMThd0KE8FSJyrlRb335arzDa88rfp3u0lBx7Swh62S2o13qKTwl984JFT20lG5ikWH7WWUNHAO72agv4kg0l5w23rHJmnA0eZxZcHXuAzdW058M1wu4xtmcJC2xggztkm5F55R1HxKU4s4sGFJiNDf6cB2DcWroaGvG5Yk9t98hD53IXIR6V92PS5YxN98U4kk16Xj0Y5G0F2TZ091YO2OXLpJIZmp6lMP9MlMpCXARz6ivEWDBC45j5dGAC1XZB6HYCh6hZvOK9VLF27J0EW0w1Vvi9fUFTm8X91Y12um16j2wm76kfo0h4S4ls96o8AsuAed3NiqW4c5988lMz3A0YIwv2XAF0039P9304fFTZAbmh4DTdxoEkSfPtMT07b2vknGzN8EU2JXdVcBBXrvveQs5oGn0K687j5X8Ij4D5EDVzx748WR4Va2IsfEt5yIK9J22eDY58KmA3kIrqi4Yf5tElYOQ6eZSaJovQ55xjxroIt8wT7i2XbM8ZSsSKm5k3Z80fc7Hw8TFESb7tm30Py3X3mbL3eE0opMJ6MUoyiUj1zpI7VvK32yq6x997weK2lwU6A0PyOe39oWvYN0AKIqCqwNizY4S9QApiH4Yr13Xs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6l4fI3119OATWs1F3R82q3B6P33D3YFwyB60ZRGs1XqLDbIj4eTCcd651Yv9x1p1S3pO6BB2n23gwkMKmmJWJ55ZWoZ6345L187psy8L48VGle6umpW5gmU4D1G02yZa1gkzsJ9x74H5tz33IDDyWDuCu89axcFN3D7DA6L90bbdeKEj9Fe7Afk3ms0FL9OxOH3KaHGlTrJc124J665yl01Tg7Mq3I7Y0Aq7aptQsACWxo8mxUxZeNdh5Ogpm1o7rZlAzz1lP2Ff23foY1xMS12akt4hix7oW8HSZf08mj729o2dle2g8cpV2Kkyx5H8H0kM186yFlQ8dNed915h453inONLVOVU6Guwa0fhqoZfiEezEFjM7IxII607er1PlG3M5MWG9nPhX60xMEG04ZHmnxSCeMs6InTYA3h4o1edvGRRXl3F91gcQvP1O1bqfPWvMlpD2g6z159RgG12zfNak0Uh4VZDPAKcHSfNJJ38KJmEi2QSU04mu127X950sK5873319b0f4FNQeyKyJsaXYPM8hyS9tBw5F2FEA29XPdlXR98GVON1EZ1f9JA64rWU1YLVWo7oD58xH9jFu6D0a7VpsX32hnzMD70nlXmDpEKd82B3k6Bg0Z9d987bAqXa828234ERwhn5zoDF3eidd96U0Cy7P0zUB6a9uMYU9AZbf4tf0UYhHYW4rqg1L1eqrH6TKSdK3BVS6KOE48oFcW629CNuaSy5ne5m9nIF7hunwwi89ZzLjx547ZuhR2xJ8q6pS1yTSc2I7BJrg3qlYKb4oMbetgBHXSml8qN36XH91339rsA6L5QaIFqp8zDT4fbi5QWwMcH8kWC4D1G7debV7cq6JdbXJAnRKBT4179zs795rYNBe0CsraL9p1jI5jQl18EzCCimrTPoCKJY2vM3dD9TRvWwxBzxM79m56Hzq1XiOwM237d53bQhLX5E0ZGq45At3qFK5MyDASZU7nNS6vKiY8Kunb4j7c18Il4Js7uDrRdyPlaBj3XCGETu7ueT5hqFVGoFKsB92EXdJKBiX2vYgC1Zd49yLg756StghyfH4G2eH13W1uxDxU140eSNBCfBLyU548S3jmU8c3j6ya2mrzVZ223W71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EQ2Bre4G2dmDZ2MG7qmGW0OxwY96JI5GmdNf8f4txhVqb9xSTJg1OUq83AX1mhmdB99m2fvlvu7qaiCcR4xDXKjS7zFNQOZWtrsJjv6gLJh4OcaAQox4MtI470abKkxOiTdqISHF26ED3A2SZz0iLJb184QJJz992vl4H4e93fMS253kZQyV82xXPHMtVyaI1meC9NS64BJGJhoyYdj7sZ9Jlja8dNC8dbkLBvQDHuwz6zxvoO5LWGt8H94N94R1vuV9PbHFrj45FMRlbetzzo4C0u88kGQ758iv7Q6tFFfv3jAppyHrT7HBxyeJm1Bwj31vxt2THuzT8S2c2R71TFd0gGo54ixrx5Re9oi51AX8h3tFpMdjiBU0iWNt8GCWVB5UXUWWF3r8c1OZ2g81h7ddjkQ0Wv95L2H3q3lRb59iSpW1jh9JkCr1YX3Ts6JUx6cM7zrU4nqM0qXqaQCY3KUq87nGY2FwBPF3VQg7045qCd10Y92oGrv3Fy0g66049GNDU758zagUQSlcmPkeV2S5nAL1m28Ezh4Dwjh7aE0QvyHnz9LlnEgGXQeR2u6eugxLine truncated
Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

+189
View File
@@ -0,0 +1,189 @@
; 该脚本使用 HM VNISEdit 脚本编辑器向导产生
; 安装程序初始定义常量
!define PRODUCT_NAME "贝塔一体仓"
!define PRODUCT_VERSION "v12.61"
;!define PRODUCT_PUBLISHER "${PRODUCT_NAME}软件制作组"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\29供应链.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
;!define PRODUCT_UNINST_ROOT_KEY "HKLM" ;需要管理员权限
!define PRODUCT_UNINST_ROOT_KEY "HKCU"
!define UTILS_PATH ".\Utils"
!define SOURCE_PATH "..\Bin.Oem"
!define OUT_PUT_PATH ".\Bin"
SetCompressor lzma
; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------
!include "MUI.nsh"
; MUI 预定义常量
!define MUI_ABORTWARNING
!define MUI_ICON "${SOURCE_PATH}\favicon.ico"
;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNICON "${UTILS_PATH}\uninstall.ico"
; 语言选择窗口常量设置
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
; 欢迎页面
!insertmacro MUI_PAGE_WELCOME
; 许可协议页面
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "${UTILS_PATH}\Licence.txt"
; 安装目录选择页面
!insertmacro MUI_PAGE_DIRECTORY
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES
; 安装完成页面
;!define MUI_FINISHPAGE_RUN "$INSTDIR\29供应链.exe" ;win10直接启动会双开,以下改为使用函数启动
;!define MUI_FINISHPAGE_RUN "exe_file" ;指定要运行的可执行文件路径(如 $INSTDIR\MyApp.exe)。文件名含空格时无需加引号 。
;!define MUI_FINISHPAGE_RUN_TEXT "text" ;设置复选框旁的显示文本(例如:“立即运行我的应用”)。
;!define MUI_FINISHPAGE_RUN_PARAMETERS "params" ;传入运行参数。若参数含双引号,需用 \" 转义 。
;!define MUI_FINISHPAGE_RUN_NOTCHECKED ;默认不选中该复选框(即默认不运行)。
;!define MUI_FINISHPAGE_RUN_FUNCTION "func_name" ;替代直接运行 exe,改为调用自定义 NSIS 函数(此时 MUI_FINISHPAGE_RUN 可不带参数),适合需执行多步逻辑的场景 。
;示例================================================================================================================
;!include "MUI2.nsh"
;!define MUI_FINISHPAGE_RUN "$INSTDIR\MyApp.exe"
;!define MUI_FINISHPAGE_RUN_TEXT "启动应用程序"
;!define MUI_FINISHPAGE_RUN_PARAMETERS "/silent"
;;!define MUI_FINISHPAGE_RUN_NOTCHECKED
;!insertmacro MUI_PAGE_FINISH
;示例结束============================================================================================================
!define MUI_FINISHPAGE_RUN
;安装函数定义
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchExe"
!insertmacro MUI_PAGE_FINISH
; 安装卸载过程页面
!insertmacro MUI_UNPAGE_INSTFILES
; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "SimpChinese"
; 安装预释放文件
!insertmacro MUI_RESERVEFILE_LANGDLL
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; ------ MUI 现代界面定义结束 ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${OUT_PUT_PATH}\${PRODUCT_NAME} ${PRODUCT_VERSION}.exe"
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
;InstallDir "D:\${PRODUCT_NAME}"
;InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
InstallDirRegKey HKCU "${PRODUCT_UNINST_KEY}" "UninstallString"
ShowInstDetails show
ShowUnInstDetails show
BrandingText "${PRODUCT_NAME}安装程序"
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
;SetOverwrite on|off|try|ifnewer ;强制覆盖|不覆盖|仅覆盖可写文件|仅覆盖旧文件
SetOverwrite on
;/x 排除的目录或文件
;File /r /x "Config.xml" /x "choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "AllBase.pdb" /x "Work.pdb" /x "29供应链.pdb" /x "data" "${SOURCE_PATH}\*.*"
File /r /x "BaseClass.cs" /x "Config.xml" /x "choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "*.pdb" /x "*.zip" /x "data" /x "Cache" /x "29wx.lnk" /x "29wx.ico" /x "29pdd.lnk" /x "29pdd.ico" "${SOURCE_PATH}\*.*"
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\29供应链.exe" "" "$INSTDIR\favicon.ico"
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\29供应链.exe" "" "$INSTDIR\favicon.ico"
File "${SOURCE_PATH}\29供应链.exe"
;SetOutPath "$TEMP"
;File "${UTILS_PATH}\VC_redist_2015_2022.x64.exe"
;ExecWait '$TEMP\vc_redist.x86.exe' # 一般(非静默)VC的安装
;ExecWait '"$TEMP\vc_redist.x86.exe" /q' # silent install 静默安装
SectionEnd
Section -AdditionalIcons
SetOutPath $INSTDIR
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
;WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\29供应链.exe"
WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\29供应链.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\29供应链.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_NAME}软件制作组"
SectionEnd
#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--#
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
;function要写字section之后
Function LaunchExe
;ExecShell "" "$INSTDIR\${PRODUCT_NAME}.exe"
; 启动主程序,ExecWait 会等待程序启动后再继续(推荐用于确保启动成功)
;ExecWait '"$INSTDIR\YourApp.exe"' // 等待也可以用来弹出必要组件安装时等待安装完成再继续运行安装程序。
; 若希望安装程序立即关闭而不等待,可使用 Exec
;Exec '"$INSTDIR\29供应链.exe"'
Exec "$INSTDIR\29供应链.exe"
; 以普通用户权限启动程序(即使安装包是管理员权限)
;System::Call 'shell32::ShellExecute(i 0, t"open", t"explorer.exe", t"/e,$INSTDIR\start.bat", t"", i 0)'
;Exec "$INSTDIR\start.bat"
FunctionEnd
/******************************
* 以下是安装程序的卸载部分 *
******************************/
Section Uninstall
Delete "$INSTDIR\uninst.exe"
Delete "$TEMP\vc_redist.x86.exe"
Delete "$INSTDIR\29供应链.exe"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk"
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
RMDir /r "$INSTDIR\blob_storage"
RMDir /r "$INSTDIR\Cache"
RMDir /r "$INSTDIR\config"
RMDir /r "$INSTDIR\data"
RMDir /r "$INSTDIR\DawnCache"
RMDir /r "$INSTDIR\GPUCache"
RMDir /r "$INSTDIR\locales"
RMDir /r "$INSTDIR\log"
RMDir /r "$INSTDIR\ru-ru"
RMDir /r "$INSTDIR\static"
RMDir /r "$INSTDIR\taobao"
RMDir /r "$INSTDIR\temp"
RMDir /r "$INSTDIR\upBak"
RMDir /r "$INSTDIR\upTemp"
RMDir /r "$INSTDIR\x64"
RMDir /r "$INSTDIR\x86"
RMDir /r "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
;DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--#
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "您确实要完全移除 $(^Name) ,及其所有的组件?" IDYES +2
Abort
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) 已成功地从您的计算机移除。"
FunctionEnd
@@ -2,7 +2,7 @@
; 安装程序初始定义常量
!define PRODUCT_NAME "川合供应链"
!define PRODUCT_VERSION "v12.15"
!define PRODUCT_VERSION "v12.61"
;!define PRODUCT_PUBLISHER "${PRODUCT_NAME}软件制作组"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\29供应链.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+1 -1
View File
@@ -296,7 +296,7 @@ namespace TemuKJD.BLL
shop.AddTime = BaseRegex.GetStringJson(ref shopStr, "add_time") == null ? DateTime.MinValue : Convert.ToDateTime(BaseRegex.GetStringJson(ref shopStr, "add_time"));
shop.is_point_shop_expire = BaseRegex.GetBoolJson(ref shopStr, "is_point_shop_expire");
shop.expire_time = BaseRegex.GetIntJson(ref shopStr, "expire_time");
shop.never_expires = BaseRegex.GetBoolJson(ref shopStr, "never_expires");
if (BaseClass.MainPath == "29pdd")
{
shop.AntiContents.Clear();
+150
View File
@@ -0,0 +1,150 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TemuKJD.Extension;
public class DataContext<TSource> : BindingSource
{
public DataContext() { }
public DataContext(TSource dataSource) : base(dataSource, null) { }
// 强类型的 DataSource,避免调用方还要自己转型
public new TSource DataSource
{
get => (TSource)base.DataSource;
set => base.DataSource = value;
}
}
public static class BindingExtensions
{
/// <summary>
/// TSource 必须显式指定(因为无法从参数推断),TControl 自动从调用方控件推断
/// </summary>
public static Binding Bind<TSource, TControl>(
this TControl ctrl,
DataContext<TSource> dataSource,
Expression<Func<TControl, object>> controlPropertyExpr,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null)
where TControl : Control
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), dataSource, dataPropertyExpr, mode, format, parseHandler);
public static Binding Bind<TControl>(
this TControl ctrl,
BindingSource dataSource,
Expression<Func<TControl, object>> controlPropertyExpr,
string dataPropertyName,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null) where TControl : Control
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), dataSource, dataPropertyName, mode, format, parseHandler);
// ---------- 共享的核心实现,不对外暴露 ----------
private static Binding BindCore<TSource>(
Control ctrl,
string controlPropertyName,
BindingSource bs,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode,
string format,
ConvertEventHandler parseHandler) => BindCore(ctrl, controlPropertyName, bs, dataPropertyExpr.GetPropertyName(), mode, format, parseHandler);
private static Binding BindCore(
Control ctrl,
string controlPropertyName,
BindingSource bs,
string dataPropertyName,
DataSourceUpdateMode mode,
string format,
ConvertEventHandler parseHandler)
{
var binding = new Binding(controlPropertyName, bs, dataPropertyName, true, mode);
if (!string.IsNullOrEmpty(format))
binding.Format += (s, e) => e.Value = string.Format($"{{0:{format}}}", e.Value);
if (parseHandler != null)
binding.Parse += parseHandler;
ctrl.DataBindings.Add(binding);
return binding;
}
// ---------- TextBox ----------
public static Binding Bind<TSource>(
this TextBox ctrl,
BindingSource bs,
Expression<Func<TextBox, object>> controlPropertyExpr,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null)
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), bs, dataPropertyExpr, mode, format, parseHandler);
// ---------- CheckBox ----------
public static Binding Bind<TSource>(
this CheckBox ctrl,
BindingSource bs,
Expression<Func<CheckBox, object>> controlPropertyExpr,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null)
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), bs, dataPropertyExpr, mode, format, parseHandler);
// ---------- DateTimePicker ----------
public static Binding Bind<TSource>(
this DateTimePicker ctrl,
BindingSource bs,
Expression<Func<DateTimePicker, object>> controlPropertyExpr,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null)
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), bs, dataPropertyExpr, mode, format, parseHandler);
// ---------- ComboBox ----------
public static Binding Bind<TSource>(
this ComboBox ctrl,
BindingSource bs,
Expression<Func<ComboBox, object>> controlPropertyExpr,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null)
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), bs, dataPropertyExpr, mode, format, parseHandler);
// ---------- NumericUpDown ----------
public static Binding Bind<TSource>(
this NumericUpDown ctrl,
BindingSource bs,
Expression<Func<NumericUpDown, object>> controlPropertyExpr,
Expression<Func<TSource, object>> dataPropertyExpr,
DataSourceUpdateMode mode = DataSourceUpdateMode.OnPropertyChanged,
string format = null,
ConvertEventHandler parseHandler = null)
=> BindCore(ctrl, controlPropertyExpr.GetPropertyName(), bs, dataPropertyExpr, mode, format, parseHandler);
public static string GetPropertyName<TSource, TProperty>(
this Expression<Func<TSource, TProperty>> propertyExpr)
{
if (propertyExpr.Body is MemberExpression member)
return member.Member.Name;
// 处理值类型属性被隐式转换为 object 的情况(如 decimal -> object)
if (propertyExpr.Body is UnaryExpression unary &&
unary.Operand is MemberExpression unaryMember)
return unaryMember.Member.Name;
throw new ArgumentException("表达式必须是形如 x => x.PropertyName 的属性访问", nameof(propertyExpr));
}
}
+6
View File
@@ -38,6 +38,9 @@
<Compile Update="ChangeForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Extension\BindingExtensions.cs">
<SubType>Component</SubType>
</Compile>
<Compile Update="InitForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -188,6 +191,9 @@
<Compile Update="WXForms\ShopForms\WXShopOemWithdrawalForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="WXForms\ShopForms\WXShopOemRebateRecordsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="WXForms\ShopForms\WXTaxManage.cs">
<SubType>Form</SubType>
</Compile>
+23 -5
View File
@@ -209,9 +209,9 @@ namespace TemuKJD
var pName = Process.GetCurrentProcess().ProcessName;
ProcessCount = Process.GetProcesses().Count(p => p.ProcessName == pName);
//138版cef自己不会分缓存,会因占用导致报错,手动分缓存
//settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache\\" + ProcessCount);
settings.RootCachePath = Path.Combine(Environment.CurrentDirectory, "Cache");
settings.CachePath = Path.Combine(settings.RootCachePath, ProcessCount.ParseToString());
settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache\\" + ProcessCount);
//settings.RootCachePath = Path.Combine(Environment.CurrentDirectory, "Cache");
//settings.CachePath = Path.Combine(settings.RootCachePath, ProcessCount.ParseToString());
//settings.CachePath = null; //禁止缓存
//settings.CefCommandLineArgs.Add("enable-javascript", "1");
//settings.CefCommandLineArgs.Add("disable-features", "NetworkService,NetworkServiceInProcess");
@@ -312,7 +312,7 @@ namespace TemuKJD
{
ReadWxCate();
//ReadWxCateBound();
ReadWxCateBound60323();
ReadWxCateBound60921();
ReadPddCate();
while(!StartUp.IsShopInit)
@@ -332,7 +332,7 @@ namespace TemuKJD
void ReadWxCate()
{
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808");
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920");
if (!File.Exists(filePath))
return;
using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8))
@@ -472,6 +472,24 @@ namespace TemuKJD
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
}
void ReadWxCateBound60921()
{
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921");
if (!File.Exists(filePath))
return;
try
{
var catTxt = FileBase.ReadAllText(filePath, System.Text.Encoding.UTF8);
GlobalConfig.WxCatBoundList = [.. JsonHelper.DeserializeJsonToList<WxCatBoundInfo>(catTxt)];
}
catch (Exception ex)
{
BaseMsgForm.ShowError("类目价格获取失败:" + ex.Message);
}
if (GlobalConfig.WxCatBoundList == null)
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
}
public void SetTitle()
{
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
@@ -1714,7 +1714,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx1.TabIndex = 787;
this.panelEx1.Text = "类目保证金转换";
this.panelEx1.Visible = false;
this.panelEx1.Click += new System.EventHandler(this.btnCatBound_Click);
//
// btnGetAllCate
@@ -1739,7 +1738,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnGetAllCate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnGetAllCate.TabIndex = 777;
this.btnGetAllCate.Text = "取微信全类目";
this.btnGetAllCate.Visible = false;
this.btnGetAllCate.Click += new System.EventHandler(this.btnGetAllCate_Click);
//
// pnlEditExtCodePrice
@@ -2230,6 +2228,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.PageSize = 100;
@@ -26,6 +26,7 @@ using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using TemuKJD.KJDForms.ProductForms.TemuJitSubForms;
using TemuKJD.ToolForms;
using TemuKJD.WXForms.ProductForms;
using Work;
@@ -1586,9 +1587,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
public static void GetProdWxCat(KJDDBProduct prod, DataGridViewRow row)
public static void GetProdWxCat(KJDDBProduct prod, DataGridViewRow row, ShopLoginInfo _shop = null)
{
var shop = GlobalConfig.ShopLoginList.OrderBy(x => Guid.NewGuid()).FirstOrDefault();
ShopLoginInfo shop = null;
if (_shop != null)
shop = _shop;
else
shop = GlobalConfig.ShopLoginList.OrderBy(x => Guid.NewGuid()).FirstOrDefault();
WXShopTokenInfo token = WXDBProdUploadForm.lstWXShopTokenInfo.FirstOrDefault(t => t.shopId == shop.ShopId);
for (int i = 0; i < 5; i++)
{
@@ -1610,10 +1615,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
// 如果店铺token不可用,随机获取一个上传图片的accessToken
if (token == null || token.isExpire || string.IsNullOrEmpty(token.accessToken))
if (_shop == null && (token == null || token.isExpire || string.IsNullOrEmpty(token.accessToken)))
{
// 获取微信accessToken
//token = new WxApiBLL().GetRandomWxToken();
token = new WxApiBLL().GetRandomWxToken();
shop = GlobalConfig.ShopLoginList.OrderBy(x => Guid.NewGuid()).FirstOrDefault();
token = WXDBProdUploadForm.lstWXShopTokenInfo.FirstOrDefault(t => t.shopId == shop.ShopId);
@@ -1631,13 +1636,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms
obj["req_type"] = 1;
obj["head_imgs"] = new JArray();
var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
KJDDBProduct dbProd = null;
if (prod.db_type == "云端数据")
dbProd = prod;
else
dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
List<string> mainImgLst3 = new List<string>();
string productTitle = "";
if (dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "1688外部数据" ||
dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "微信店采" || dbProd.product_get_type_text == "机会商品" ||
dbProd.product_get_type_text == "多多外部数据" || dbProd.product_get_type_text == "微信外部数据")
dbProd.product_get_type_text == "多多外部数据" || dbProd.product_get_type_text == "微信外部数据" || dbProd.db_type == "云端数据")
{
if ((dbProd.product_get_type_text == "微信小店" || dbProd.product_get_type_text == "微信店采") && dbProd.wx_cat_leaf != null)
{
@@ -1717,7 +1726,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
mainImgLst3 = pInfo.detail.galleries.Where(g => g.type == 1).Take(3).Select(s => s.url).ToList();
productTitle = pInfo.detail.goods_name;
}
if (dbProd.product_get_type_text == "机会商品" || dbProd.product_get_type_text == "多多外部数据" || dbProd.product_get_type_text == "微信外部数据")
if (dbProd.product_get_type_text == "机会商品" || dbProd.product_get_type_text == "多多外部数据" || dbProd.product_get_type_text == "微信外部数据" ||
dbProd.db_type == "云端数据")
{
string convertRst = "";
var pInfo = JsonHelper.DeserializeJsonToObject<PDDProductInfo>(dbProd.product_json);
@@ -1757,6 +1767,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
throw new Exception("商品图片链接失效");
}
}
// 上传图片识别
@@ -1804,6 +1816,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
data1 += "&post_data=" + GetHtml.UrlEncodeUtf8(post_data);
var html1 = GetHtml.PostUtf8(url1, data1);
var catId = BaseRegex.GetStringJson(ref html1, "cat_id");
if (string.IsNullOrEmpty(catId))
{
throw new Exception(BaseRegex.GetStringJsonByRegs(ref html1, html1, "errMsg", "err_msg", "errorMsg", "error_msg"));
}
var jCatFirstLst = JsonHelper.JObjectParse(html1)["categories"].FirstOrDefault()["cats"] as JArray;
int index = 0;
@@ -1931,9 +1947,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
}
prod.wx_cat_1 = dbProd.wx_cat_1;
prod.main_cat_id = dbProd.main_cat_id;
prod.main_cat_name = dbProd.main_cat_name;
prod.wx_cat_2 = dbProd.wx_cat_2;
prod.wx_cat_3 = dbProd.wx_cat_3;
prod.wx_cat_leaf = dbProd.wx_cat_leaf;
prod.cat_id = dbProd.cat_id;
prod.cat_name = dbProd.cat_name;
}
catch (Exception ex)
{
if (row == null)
throw new Exception(ex.Message);
}
}
@@ -2683,6 +2710,49 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void btnCatBound_Click(object sender, EventArgs e)
{
List<WxCatBoundInfo> WxCatBoundInfolst = new List<WxCatBoundInfo>();
foreach (var cat in GlobalConfig.WxCatList)
{
var index = GlobalConfig.WxCatList.IndexOf(cat);
if (cat.leaf)
{
var url1 = BaseClass.BuildWXObjString("product/Wx_api_get_wx_cate_bound");
var data1 = UserLogin.GetSignaturex();
data1 += "&token=" + new WxApiBLL().GetRandomWxToken().accessToken;
data1 += "&cat_id=" + cat.cat_id;
var html1 = GetHtml.PostUtf8(url1, data1);
while (string.IsNullOrEmpty(html1) || BaseRegex.GetIntJson(ref html1, "deposit").IsNullOrZero())
{
Thread.Sleep(100);
data1 = UserLogin.GetSignaturex();
//data1 += "&token=" + GlobalConfig.WxGlobalTokenList.OrderBy(x => Guid.NewGuid()).FirstOrDefault()?.accessToken;
data1 += "&token=" + new WxApiBLL().GetRandomWxToken().accessToken;
data1 += "&cat_id=" + cat.cat_id;
html1 = GetHtml.PostUtf8(url1, data1);
}
WxCatBoundInfo wxCatBoundInfo = new WxCatBoundInfo();
wxCatBoundInfo.leaf_id = cat.cat_id.ParseToLong();
wxCatBoundInfo.full_cat_name = cat.name;
wxCatBoundInfo.leaf_name = cat.name;
wxCatBoundInfo.cat_bound = BaseRegex.GetIntJson(ref html1, "deposit") / 100;
var parentCat = cat;
while (!parentCat.f_cat_id.ParseToLong().IsNullOrZero())
{
parentCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == parentCat.f_cat_id);
if (parentCat == null)
break;
wxCatBoundInfo.full_cat_name = parentCat.name + "/" + wxCatBoundInfo.full_cat_name;
}
if (wxCatBoundInfo.cat_bound > 0)
WxCatBoundInfolst.Add(wxCatBoundInfo);
}
}
var catBoundStr = JsonHelper.SerializeObject(WxCatBoundInfolst);
}
+206 -26
View File
@@ -86,6 +86,14 @@ namespace TemuKJD.WXForms.AdminForms
this.txtSearch = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.pnlSyncLogisticsPerOrder = new System.Windows.Forms.Panel();
this.lblSyncLogisticsPerOrderUserId = new System.Windows.Forms.Label();
this.lblSyncLogisticsPerOrderUserInfo = new System.Windows.Forms.Label();
this.panel8 = new System.Windows.Forms.Panel();
this.numSyncLogisticsPerOrder = new System.Windows.Forms.NumericUpDown();
this.label20 = new System.Windows.Forms.Label();
this.btnSyncLogisticsPerOrderCancel = new DevComponents.DotNetBar.PanelEx();
this.btnSyncLogisticsPerOrder = new DevComponents.DotNetBar.PanelEx();
this.pnlGiftOemAmountPerOrder = new System.Windows.Forms.Panel();
this.lblGiftOemAmountPerOrderUserId = new System.Windows.Forms.Label();
this.lblGiftOemAmountPerOrderUserInfo = new System.Windows.Forms.Label();
@@ -139,6 +147,8 @@ namespace TemuKJD.WXForms.AdminForms
this.btnTopUpCancel = new DevComponents.DotNetBar.PanelEx();
this.btnTopUpOK = new DevComponents.DotNetBar.PanelEx();
this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -165,10 +175,11 @@ namespace TemuKJD.WXForms.AdminForms
this.colChangeRefundPostagePerOrder = new System.Windows.Forms.DataGridViewLinkColumn();
this.colGiftOemAmountPerOrder = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChangeGiftOemAmountPerOrder = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSyncLogisticsPerOrder = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChangeSyncLogisticsPerOrder = new System.Windows.Forms.DataGridViewLinkColumn();
this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn();
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
this.splitContainer5.Panel1.SuspendLayout();
this.splitContainer5.Panel2.SuspendLayout();
@@ -178,6 +189,9 @@ namespace TemuKJD.WXForms.AdminForms
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.pnlSyncLogisticsPerOrder.SuspendLayout();
this.panel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSyncLogisticsPerOrder)).BeginInit();
this.pnlGiftOemAmountPerOrder.SuspendLayout();
this.panel7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numGiftOemAmountPerOrder)).BeginInit();
@@ -810,6 +824,7 @@ namespace TemuKJD.WXForms.AdminForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.pnlSyncLogisticsPerOrder);
this.splitContainer1.Panel1.Controls.Add(this.pnlGiftOemAmountPerOrder);
this.splitContainer1.Panel1.Controls.Add(this.pnlRefundPostagePerOrder);
this.splitContainer1.Panel1.Controls.Add(this.pnlPostagePerOrder);
@@ -820,11 +835,128 @@ namespace TemuKJD.WXForms.AdminForms
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer1.Panel2.Controls.Add(this.btnExportShopErp);
this.splitContainer1.Size = new System.Drawing.Size(1172, 651);
this.splitContainer1.SplitterDistance = 620;
this.splitContainer1.TabIndex = 2;
//
// pnlSyncLogisticsPerOrderr
//
this.pnlSyncLogisticsPerOrder.AccessibleDescription = "";
this.pnlSyncLogisticsPerOrder.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pnlSyncLogisticsPerOrder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlSyncLogisticsPerOrder.Controls.Add(this.lblSyncLogisticsPerOrderUserId);
this.pnlSyncLogisticsPerOrder.Controls.Add(this.lblSyncLogisticsPerOrderUserInfo);
this.pnlSyncLogisticsPerOrder.Controls.Add(this.panel8);
this.pnlSyncLogisticsPerOrder.Location = new System.Drawing.Point(40, 389);
this.pnlSyncLogisticsPerOrder.Name = "pnlSyncLogisticsPerOrderr";
this.pnlSyncLogisticsPerOrder.Size = new System.Drawing.Size(360, 146);
this.pnlSyncLogisticsPerOrder.TabIndex = 458;
this.pnlSyncLogisticsPerOrder.Visible = false;
//
// lblSyncLogisticsPerOrderUserId
//
this.lblSyncLogisticsPerOrderUserId.AutoSize = true;
this.lblSyncLogisticsPerOrderUserId.Location = new System.Drawing.Point(256, 19);
this.lblSyncLogisticsPerOrderUserId.Name = "lblSyncLogisticsPerOrderUserId";
this.lblSyncLogisticsPerOrderUserId.Size = new System.Drawing.Size(47, 17);
this.lblSyncLogisticsPerOrderUserId.TabIndex = 457;
this.lblSyncLogisticsPerOrderUserId.Text = "UserId";
this.lblSyncLogisticsPerOrderUserId.Visible = false;
//
// lblSyncLogisticsPerOrderUserInfo
//
this.lblSyncLogisticsPerOrderUserInfo.AutoSize = true;
this.lblSyncLogisticsPerOrderUserInfo.Location = new System.Drawing.Point(20, 19);
this.lblSyncLogisticsPerOrderUserInfo.Name = "lblSyncLogisticsPerOrderUserInfo";
this.lblSyncLogisticsPerOrderUserInfo.Size = new System.Drawing.Size(58, 17);
this.lblSyncLogisticsPerOrderUserInfo.TabIndex = 455;
this.lblSyncLogisticsPerOrderUserInfo.Text = "UserInfo";
//
// panel8
//
this.panel8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel8.Controls.Add(this.numSyncLogisticsPerOrder);
this.panel8.Controls.Add(this.label20);
this.panel8.Controls.Add(this.btnSyncLogisticsPerOrderCancel);
this.panel8.Controls.Add(this.btnSyncLogisticsPerOrder);
this.panel8.Location = new System.Drawing.Point(23, 52);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(310, 57);
this.panel8.TabIndex = 454;
//
// numSyncLogisticsPerOrder
//
this.numSyncLogisticsPerOrder.DecimalPlaces = 2;
this.numSyncLogisticsPerOrder.Location = new System.Drawing.Point(125, 16);
this.numSyncLogisticsPerOrder.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numSyncLogisticsPerOrder.Name = "numSyncLogisticsPerOrder";
this.numSyncLogisticsPerOrder.Size = new System.Drawing.Size(56, 23);
this.numSyncLogisticsPerOrder.TabIndex = 1;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(7, 19);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(116, 17);
this.label20.TabIndex = 456;
this.label20.Text = "同步物流额外收取:";
//
// btnSyncLogisticsPerOrderCancel
//
this.btnSyncLogisticsPerOrderCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnSyncLogisticsPerOrderCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSyncLogisticsPerOrderCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSyncLogisticsPerOrderCancel.Location = new System.Drawing.Point(244, 16);
this.btnSyncLogisticsPerOrderCancel.Name = "btnSyncLogisticsPerOrderCancel";
this.btnSyncLogisticsPerOrderCancel.Size = new System.Drawing.Size(56, 23);
this.btnSyncLogisticsPerOrderCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrderCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnSyncLogisticsPerOrderCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnSyncLogisticsPerOrderCancel.Style.GradientAngle = 90;
this.btnSyncLogisticsPerOrderCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnSyncLogisticsPerOrderCancel.TabIndex = 458;
this.btnSyncLogisticsPerOrderCancel.Text = "取消";
this.btnSyncLogisticsPerOrderCancel.Click += new System.EventHandler(this.btnSyncLogisticsPerOrderCancel_Click);
//
// btnSyncLogisticsPerOrder
//
this.btnSyncLogisticsPerOrder.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSyncLogisticsPerOrder.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSyncLogisticsPerOrder.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSyncLogisticsPerOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSyncLogisticsPerOrder.Location = new System.Drawing.Point(185, 16);
this.btnSyncLogisticsPerOrder.Name = "btnSyncLogisticsPerOrder";
this.btnSyncLogisticsPerOrder.Size = new System.Drawing.Size(56, 23);
this.btnSyncLogisticsPerOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrder.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSyncLogisticsPerOrder.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSyncLogisticsPerOrder.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSyncLogisticsPerOrder.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSyncLogisticsPerOrder.Style.GradientAngle = 90;
this.btnSyncLogisticsPerOrder.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrder.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.TabIndex = 453;
this.btnSyncLogisticsPerOrder.Text = "确定";
this.btnSyncLogisticsPerOrder.Click += new System.EventHandler(this.btnSyncLogisticsPerOrder_Click);
//
// pnlGiftOemAmountPerOrder
//
this.pnlGiftOemAmountPerOrder.Anchor = System.Windows.Forms.AnchorStyles.None;
@@ -1643,6 +1775,8 @@ namespace TemuKJD.WXForms.AdminForms
this.colChangeRefundPostagePerOrder,
this.colGiftOemAmountPerOrder,
this.colChangeGiftOemAmountPerOrder,
this.colSyncLogisticsPerOrder,
this.colChangeSyncLogisticsPerOrder,
this.colAddShop,
this.editColumn,
this.deleteColumn});
@@ -1657,6 +1791,47 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvUser.TabIndex = 1;
this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick);
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(783, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(389, 27);
this.ucSplitPage1.TabIndex = 443;
this.ucSplitPage1.TotalCount = ((long)(0));
this.ucSplitPage1.TotalPage = 1;
//
// btnExportShopErp
//
this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExportShopErp.Location = new System.Drawing.Point(0, 1);
this.btnExportShopErp.Name = "btnExportShopErp";
this.btnExportShopErp.Size = new System.Drawing.Size(140, 25);
this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnExportShopErp.Style.GradientAngle = 90;
this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.TabIndex = 439;
this.btnExportShopErp.Text = "导出用户到后台系统";
this.btnExportShopErp.Visible = false;
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
//
// colCheck
//
this.colCheck.FillWeight = 30F;
@@ -1840,6 +2015,20 @@ namespace TemuKJD.WXForms.AdminForms
this.colChangeGiftOemAmountPerOrder.Name = "colChangeGiftOemAmountPerOrder";
this.colChangeGiftOemAmountPerOrder.ReadOnly = true;
//
// colSyncLogisticsPerOrder
//
this.colSyncLogisticsPerOrder.FillWeight = 60F;
this.colSyncLogisticsPerOrder.HeaderText = "每单同步物流额外收费";
this.colSyncLogisticsPerOrder.Name = "colSyncLogisticsPerOrder";
this.colSyncLogisticsPerOrder.ReadOnly = true;
//
// colChangeSyncLogisticsPerOrder
//
this.colChangeSyncLogisticsPerOrder.FillWeight = 25F;
this.colChangeSyncLogisticsPerOrder.HeaderText = "改";
this.colChangeSyncLogisticsPerOrder.Name = "colChangeSyncLogisticsPerOrder";
this.colChangeSyncLogisticsPerOrder.ReadOnly = true;
//
// colAddShop
//
this.colAddShop.FillWeight = 70F;
@@ -1865,31 +2054,6 @@ namespace TemuKJD.WXForms.AdminForms
this.deleteColumn.Name = "deleteColumn";
this.deleteColumn.ReadOnly = true;
//
// btnExportShopErp
//
this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExportShopErp.Location = new System.Drawing.Point(0, 1);
this.btnExportShopErp.Name = "btnExportShopErp";
this.btnExportShopErp.Size = new System.Drawing.Size(140, 25);
this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnExportShopErp.Style.GradientAngle = 90;
this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.TabIndex = 439;
this.btnExportShopErp.Text = "导出用户到后台系统";
this.btnExportShopErp.Visible = false;
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
//
// WXAdminAccountForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1912,6 +2076,11 @@ namespace TemuKJD.WXForms.AdminForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.pnlSyncLogisticsPerOrder.ResumeLayout(false);
this.pnlSyncLogisticsPerOrder.PerformLayout();
this.panel8.ResumeLayout(false);
this.panel8.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numSyncLogisticsPerOrder)).EndInit();
this.pnlGiftOemAmountPerOrder.ResumeLayout(false);
this.pnlGiftOemAmountPerOrder.PerformLayout();
this.panel7.ResumeLayout(false);
@@ -2056,6 +2225,15 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.Label label15;
private DevComponents.DotNetBar.PanelEx btnGiftOemAmountPerOrderCancel;
private DevComponents.DotNetBar.PanelEx btnGiftOemAmountPerOrder;
private UserControls.UcSplitPage ucSplitPage1;
private System.Windows.Forms.Panel pnlSyncLogisticsPerOrder;
private System.Windows.Forms.Label lblSyncLogisticsPerOrderUserId;
private System.Windows.Forms.Label lblSyncLogisticsPerOrderUserInfo;
private System.Windows.Forms.Panel panel8;
private System.Windows.Forms.NumericUpDown numSyncLogisticsPerOrder;
private System.Windows.Forms.Label label20;
private DevComponents.DotNetBar.PanelEx btnSyncLogisticsPerOrderCancel;
private DevComponents.DotNetBar.PanelEx btnSyncLogisticsPerOrder;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn;
@@ -2082,6 +2260,8 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.DataGridViewLinkColumn colChangeRefundPostagePerOrder;
private System.Windows.Forms.DataGridViewTextBoxColumn colGiftOemAmountPerOrder;
private System.Windows.Forms.DataGridViewLinkColumn colChangeGiftOemAmountPerOrder;
private System.Windows.Forms.DataGridViewTextBoxColumn colSyncLogisticsPerOrder;
private System.Windows.Forms.DataGridViewLinkColumn colChangeSyncLogisticsPerOrder;
private System.Windows.Forms.DataGridViewLinkColumn colAddShop;
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
@@ -14,6 +14,7 @@ using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using TemuKJD.UserControls;
using Work;
namespace TemuKJD.WXForms.AdminForms
@@ -28,8 +29,16 @@ namespace TemuKJD.WXForms.AdminForms
public WXAdminAccountForm()
{
InitializeComponent();
this.Load += WXAdminAccountForm_Load;
}
private void WXAdminAccountForm_Load(object sender, EventArgs e)
{
this.ucSplitPage1.PageChange += UcSplitPage1_PageChange;
}
private void btnOpUser_Click(object sender, EventArgs e)
{
if (txtPassword.Text != txtRePass.Text)
@@ -109,6 +118,7 @@ namespace TemuKJD.WXForms.AdminForms
if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid))
{
data.Append("&id=" + Uid);
data.Append("&uu=true");
url = BaseClass.BuildObjString("user/update_user");
}
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
@@ -139,6 +149,8 @@ namespace TemuKJD.WXForms.AdminForms
string url = BaseClass.BuildObjString("user/get_all_user");
StringBuilder data = new StringBuilder();
data.Append(UserLogin.GetSignaturex());
data.Append($"&page={ucSplitPage1.CurrentPage}");
data.Append($"&page_size={ucSplitPage1.PageSize}");
if (cmbSearchGroup.Text == "主账户")
{
data.Append("&group_id=3");
@@ -174,6 +186,7 @@ namespace TemuKJD.WXForms.AdminForms
user.postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "postage_per_order");
user.refund_postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "refund_postage_per_order");
user.gift_oem_amount_per_order = BaseRegex.GetDecimalJson(ref oStr, "gift_oem_amount_per_order");
user.sync_logistics_per_order = BaseRegex.GetDecimalJson(ref oStr, "sync_logistics_per_order");
user.oem_id = BaseRegex.GetStringJson(ref oStr, "oem_id");
user.oem_name = BaseRegex.GetStringJson(ref oStr, "oem_name");
var parent_user_name = BaseRegex.GetStringJson(ref oStr, "parent_user_name");
@@ -206,13 +219,23 @@ namespace TemuKJD.WXForms.AdminForms
(user.group_id == "3") ? "改" : null,
Math.Max(0m, user.gift_oem_amount_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
Math.Max(0m, user.sync_logistics_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
user.group_id == "3" ? "添加店铺" : "",
"编辑",
"删除");
}
}
int count = BaseRegex.GetIntJson(ref html, "count");
Invoke(new Action(() =>
{
ucSplitPage1.TotalCount = count;
}));
}
private void UcSplitPage1_PageChange(object obj)
{
GetUser();
}
private void btnCancel_Click(object sender, EventArgs e)
{
btnOpUser.Text = "添加用户";
@@ -247,6 +270,7 @@ namespace TemuKJD.WXForms.AdminForms
private void btnRefresh_Click(object sender, EventArgs e)
{
ucSplitPage1.CurrentPage = 1;
GetUser();
}
@@ -267,6 +291,7 @@ namespace TemuKJD.WXForms.AdminForms
decimal postagePerOrder = dgvUser.Rows[e.RowIndex].Cells["colPostagePerOrder"].Value.ParseToDecimal();
decimal refundPostagePerOrder = dgvUser.Rows[e.RowIndex].Cells["colRefundPostagePerOrder"].Value.ParseToDecimal();
decimal giftOemAmountPerOrder = dgvUser.Rows[e.RowIndex].Cells["colGiftOemAmountPerOrder"].Value.ParseToDecimal();
decimal syncLogisticsPerOrder = dgvUser.Rows[e.RowIndex].Cells["colSyncLogisticsPerOrder"].Value.ParseToDecimal();
string oemId = dgvUser.Rows[e.RowIndex].Cells["colOemId"].Value.ParseToString();
var row = dgvUser.Rows[e.RowIndex];
if (columText == "编辑")
@@ -381,6 +406,16 @@ namespace TemuKJD.WXForms.AdminForms
this.pnlGiftOemAmountPerOrder.BringToFront();
this.lblGiftOemAmountPerOrderUserId.Text = uid;
}
if (columName == "colChangeSyncLogisticsPerOrder")
{
this.lblSyncLogisticsPerOrderUserInfo.Text = mobile + " - " + nickName;
this.numSyncLogisticsPerOrder.Value = syncLogisticsPerOrder;
this.pnlSyncLogisticsPerOrder.Tag = row;
this.pnlSyncLogisticsPerOrder.Visible = true;
this.pnlSyncLogisticsPerOrder.BringToFront();
this.lblSyncLogisticsPerOrderUserId.Text = uid;
}
}
}
@@ -425,6 +460,7 @@ namespace TemuKJD.WXForms.AdminForms
pnlPostagePerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlRefundPostagePerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlGiftOemAmountPerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlSyncLogisticsPerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
this.cmbGroup.Items.Clear();
this.cmbGroup.Items.Add("主账户");
@@ -718,5 +754,42 @@ namespace TemuKJD.WXForms.AdminForms
{
pnlGiftOemAmountPerOrder.Visible = false;
}
private void btnSyncLogisticsPerOrder_Click(object sender, EventArgs e)
{
if (updateSyncLogisticsPerOrder(lblSyncLogisticsPerOrderUserId.Text))
{
pnlSyncLogisticsPerOrder.Visible = false;
BaseMsgForm.ShowInfo("修改同步物流额外金额成功");
}
}
public bool updateSyncLogisticsPerOrder(string userDbId, bool showFailBox = true)
{
string url = BaseClass.BuildObjString("user/update_user");
string data = UserLogin.GetSignaturex();
data += "&id=" + userDbId;
data += "&sync_logistics_per_order=" + numSyncLogisticsPerOrder.Value;
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
if (!html.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
if (showFailBox)
{
Invoke(new Action(() => { BaseMsgForm.ShowError(msg); }));
}
return false;
}
var row = dgvUser.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["UserIdColumn"].Value.ParseToString() == userDbId);
if (row != null)
{
Invoke(new Action(() => { row.Cells["colSyncLogisticsPerOrder"].Value = numSyncLogisticsPerOrder.Value; }));
}
return true;
}
private void btnSyncLogisticsPerOrderCancel_Click(object sender, EventArgs e)
{
pnlSyncLogisticsPerOrder.Visible = false;
}
}
}
@@ -216,7 +216,7 @@ namespace TemuKJD.WXForms.AdminForms
data = JsonHelper.SerializeObject(obj);
var html = GetHtml.PostUtf8(url, data);
var ret = JsonConvert.DeserializeObject<PageResult<WXOemWithdrawalInfo>>(html);
var ret = JsonConvert.DeserializeObject<ApiPageResult<WXOemWithdrawalInfo>>(html);
if (ret.Code != 200)
{
Invoke(new Action(() =>
@@ -227,10 +227,10 @@ namespace TemuKJD.WXForms.AdminForms
}
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
pageCount = Math.Ceiling(1.0 * ret.Total / pageSize).ParseToInt();
pageCount = Math.Ceiling(1.0 * ret.Data.Total / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
return ret.Data;
return ret.Data.List;
}
+79 -62
View File
@@ -68,6 +68,10 @@ namespace TemuKJD.WXForms.AdminForms
this.btnRemainOK = new DevComponents.DotNetBar.PanelEx();
this.lblAddProdRemaining = new System.Windows.Forms.Label();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panel3 = new System.Windows.Forms.Panel();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -96,13 +100,10 @@ namespace TemuKJD.WXForms.AdminForms
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
this.colUpload = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_never_expires = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panel3 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -655,6 +656,7 @@ namespace TemuKJD.WXForms.AdminForms
this.colCopyCookies,
this.colUpload,
this.colSubSa,
this.col_never_expires,
this.colEdit,
this.colDelete,
this.colMsg});
@@ -670,9 +672,59 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown);
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(595, 0);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(882, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalCount = ((long)(0));
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1271, 25);
this.statusBar.TabIndex = 1;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.White;
this.panel3.Controls.Add(this.splitContainer1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(1, 33);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1271, 576);
this.panel3.TabIndex = 35;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
this.colSelect.FillWeight = 21.69699F;
this.colSelect.HeaderText = "";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
@@ -681,33 +733,35 @@ namespace TemuKJD.WXForms.AdminForms
//
// colLoginName
//
this.colLoginName.FillWeight = 70F;
this.colLoginName.FillWeight = 58.41498F;
this.colLoginName.HeaderText = "店铺登录号码";
this.colLoginName.Name = "colLoginName";
this.colLoginName.ReadOnly = true;
//
// colShopId
//
this.colShopId.FillWeight = 70F;
this.colShopId.FillWeight = 58.41498F;
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopAccount
//
this.colShopAccount.FillWeight = 83.44997F;
this.colShopAccount.HeaderText = "店铺账号";
this.colShopAccount.Name = "colShopAccount";
this.colShopAccount.ReadOnly = true;
//
// colNotes
//
this.colNotes.FillWeight = 83.44997F;
this.colNotes.HeaderText = "备注";
this.colNotes.Name = "colNotes";
this.colNotes.ReadOnly = true;
//
// colGroupName
//
this.colGroupName.FillWeight = 70F;
this.colGroupName.FillWeight = 58.41498F;
this.colGroupName.HeaderText = "店铺分组";
this.colGroupName.Name = "colGroupName";
this.colGroupName.ReadOnly = true;
@@ -751,14 +805,14 @@ namespace TemuKJD.WXForms.AdminForms
//
// colUser
//
this.colUser.FillWeight = 67F;
this.colUser.FillWeight = 55.91148F;
this.colUser.HeaderText = "所属账户";
this.colUser.Name = "colUser";
this.colUser.ReadOnly = true;
//
// colSubUser
//
this.colSubUser.FillWeight = 67F;
this.colSubUser.FillWeight = 55.91148F;
this.colSubUser.HeaderText = "子账户";
this.colSubUser.Name = "colSubUser";
this.colSubUser.ReadOnly = true;
@@ -796,7 +850,7 @@ namespace TemuKJD.WXForms.AdminForms
//
// colGotoShop
//
this.colGotoShop.FillWeight = 46F;
this.colGotoShop.FillWeight = 38.38699F;
this.colGotoShop.HeaderText = "进入店铺";
this.colGotoShop.Name = "colGotoShop";
this.colGotoShop.ReadOnly = true;
@@ -815,7 +869,7 @@ namespace TemuKJD.WXForms.AdminForms
//
// colRelogin
//
this.colRelogin.FillWeight = 46F;
this.colRelogin.FillWeight = 38.38699F;
this.colRelogin.HeaderText = "登录";
this.colRelogin.Name = "colRelogin";
this.colRelogin.ReadOnly = true;
@@ -832,7 +886,7 @@ namespace TemuKJD.WXForms.AdminForms
//
// colBuyApi
//
this.colBuyApi.FillWeight = 46F;
this.colBuyApi.FillWeight = 38.38699F;
this.colBuyApi.HeaderText = "API购买";
this.colBuyApi.Name = "colBuyApi";
this.colBuyApi.ReadOnly = true;
@@ -881,7 +935,7 @@ namespace TemuKJD.WXForms.AdminForms
//
// colCopyCookies
//
this.colCopyCookies.FillWeight = 70F;
this.colCopyCookies.FillWeight = 58.41498F;
this.colCopyCookies.HeaderText = "复制Cookie";
this.colCopyCookies.Name = "colCopyCookies";
this.colCopyCookies.ReadOnly = true;
@@ -900,11 +954,20 @@ namespace TemuKJD.WXForms.AdminForms
//
// colSubSa
//
this.colSubSa.FillWeight = 67F;
this.colSubSa.FillWeight = 55.91148F;
this.colSubSa.HeaderText = "二级超管";
this.colSubSa.Name = "colSubSa";
this.colSubSa.ReadOnly = true;
//
// col_never_expires
//
this.col_never_expires.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.col_never_expires.FillWeight = 239.8477F;
this.col_never_expires.HeaderText = "永不过期";
this.col_never_expires.Name = "col_never_expires";
this.col_never_expires.ReadOnly = true;
this.col_never_expires.Width = 50;
//
// colEdit
//
this.colEdit.FillWeight = 46F;
@@ -930,53 +993,6 @@ namespace TemuKJD.WXForms.AdminForms
this.colMsg.ReadOnly = true;
this.colMsg.Visible = false;
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(595, 0);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.Location = new System.Drawing.Point(882, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1271, 25);
this.statusBar.TabIndex = 1;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.White;
this.panel3.Controls.Add(this.splitContainer1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(1, 33);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1271, 576);
this.panel3.TabIndex = 35;
//
// WXAdminShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1083,6 +1099,7 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colUpload;
private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa;
private System.Windows.Forms.DataGridViewCheckBoxColumn col_never_expires;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
@@ -1,7 +1,9 @@
using AllBase;
using AllBase.Model.Param.TemuProductManage;
using AllBase.Model.Result;
using NaiBa.Util;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -11,16 +13,16 @@ using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using TemuKJD.BaseForms;
using Work;
using NaiBa.Util;
using TemuKJD.WXForms.ShopForms;
using Work;
namespace TemuKJD.WXForms.AdminForms
{
@@ -144,6 +146,7 @@ namespace TemuKJD.WXForms.AdminForms
"复制Cookie",
"上传",
shop.OperateSubSaName,
shop.never_expires,
"编辑",
"删除");
}));
@@ -218,7 +221,7 @@ namespace TemuKJD.WXForms.AdminForms
SearchShop(this.ucSplitPage1.CurrentPage);
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
private async void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
@@ -226,7 +229,7 @@ namespace TemuKJD.WXForms.AdminForms
string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString();
string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString();
var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId);
string ownerUser = dgvShop.Rows[e.RowIndex].Cells["colUser"].Value.ParseToString();
switch (headerText)
{
case "检测":
@@ -324,6 +327,14 @@ namespace TemuKJD.WXForms.AdminForms
this.numAddRemaining.Value = shop.AddProductRemaining;
this.pnlAddProdRemaining.Visible = true;
break;
case "永不过期":
var isNever = !(bool)dgvShop.Rows[e.RowIndex].Cells["col_never_expires"].Value;
if (await UpdateShopNeverExpires(shop.ShopId, ownerUser, isNever))
{
dgvShop.Rows[e.RowIndex].Cells["col_never_expires"].Value = isNever;
}
break;
case "":
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value;
break;
@@ -353,7 +364,8 @@ namespace TemuKJD.WXForms.AdminForms
int i = 1;
foreach (var shopInfo in shopInfoLst)
{
Invoke(new Action(() =>{
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value = i;
this.statusBar.pgbTaskProgress.Text = i + "/" + shopInfoLst.Count;
i++;
@@ -755,5 +767,38 @@ namespace TemuKJD.WXForms.AdminForms
{
}
private async Task<bool> UpdateShopNeverExpires(string shopid, string ownerUser, bool isnever)
{
this.pbLoading.Visible = true;
try
{
var url = BaseClass.BuildObjString("shop/UpdateShopNeverExpires");
var data = UserLogin.GetSignPostData(new
{
ShopId = shopid,
IsNever = isnever,
OwnerUser = ownerUser
});
string html = await GetHtml.PostJsonAsync(url, data);
var ret = JsonConvert.DeserializeObject<Result<bool>>(html);
if (ret.Code == 200)
{
return ret.Data;
}
return false;
}
catch
{
return false;
}
finally
{
this.pbLoading.Visible = false;
}
}
}
}
@@ -201,6 +201,9 @@
<metadata name="colSubSa.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="col_never_expires.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
File diff suppressed because it is too large. Load diff
@@ -403,7 +403,8 @@ namespace Work._29Tools.Forms.UserForms
"拍单扣除/作废返还",
"超重扣费支出",
"退货包裹扣费支出",
"云仓退货扣费支出"});
"云仓退货扣费支出",
"同步物流"});
this.cmbType.Location = new System.Drawing.Point(55, 20);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(121, 25);
@@ -990,8 +991,8 @@ namespace Work._29Tools.Forms.UserForms
this.KeyPreview = true;
this.Name = "WXOemAccountBalanceForm";
this.Padding = new System.Windows.Forms.Padding(2);
this.Text = "OEM返现明细";
this.TitleText = "OEM返现明细";
this.Text = "运费流水明细";
this.TitleText = "运费流水明细";
this.Load += new System.EventHandler(this.WXGetTopUpQrCode_Load);
this.Controls.SetChildIndex(this.panel1, 0);
this.panel1.ResumeLayout(false);
@@ -151,6 +151,8 @@ namespace Work._29Tools.Forms.UserForms
data3 += "&type_in=26";
else if (cmbType.Text == "云仓退货扣费支出")
data3 += "&type_in=31";
else if (cmbType.Text == "同步物流")
data3 += "&type_in=55";
else if (!string.IsNullOrEmpty(cmbType.Text))
data3 += "&type_in=" + cmbType.Text;
data3 += "&page=" + ucSplitPage1.CurrentPage;
+192 -30
View File
@@ -29,14 +29,14 @@ namespace TemuKJD.WXForms.ShopForms
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
this.pnlSuperManage = new System.Windows.Forms.Panel();
this.label10 = new System.Windows.Forms.Label();
@@ -141,9 +141,19 @@ namespace TemuKJD.WXForms.ShopForms
this.colChangeRefundPostagePerOrder = new System.Windows.Forms.DataGridViewLinkColumn();
this.colGiftOemAmountPerOrder = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChangeGiftOemAmountPerOrder = new System.Windows.Forms.DataGridViewLinkColumn();
this.colSyncLogisticsPerOrder = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChangeSyncLogisticsPerOrder = new System.Windows.Forms.DataGridViewLinkColumn();
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
this.pnlSyncLogisticsPerOrder = new System.Windows.Forms.Panel();
this.lblSyncLogisticsPerOrderUserId = new System.Windows.Forms.Label();
this.lblSyncLogisticsPerOrderUserInfo = new System.Windows.Forms.Label();
this.panel8 = new System.Windows.Forms.Panel();
this.numSyncLogisticsPerOrder = new System.Windows.Forms.NumericUpDown();
this.label20 = new System.Windows.Forms.Label();
this.btnSyncLogisticsPerOrderCancel = new DevComponents.DotNetBar.PanelEx();
this.btnSyncLogisticsPerOrder = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
this.splitContainer5.Panel1.SuspendLayout();
this.splitContainer5.Panel2.SuspendLayout();
@@ -172,6 +182,9 @@ namespace TemuKJD.WXForms.ShopForms
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddTopUp)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvUser)).BeginInit();
this.pnlSyncLogisticsPerOrder.SuspendLayout();
this.panel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSyncLogisticsPerOrder)).BeginInit();
this.SuspendLayout();
//
// splitContainer5
@@ -512,6 +525,7 @@ namespace TemuKJD.WXForms.ShopForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.pnlSyncLogisticsPerOrder);
this.splitContainer1.Panel1.Controls.Add(this.pnlGiftOemAmountPerOrder);
this.splitContainer1.Panel1.Controls.Add(this.pnlRefundPostagePerOrder);
this.splitContainer1.Panel1.Controls.Add(this.pnlPostagePerOrder);
@@ -1249,20 +1263,20 @@ namespace TemuKJD.WXForms.ShopForms
//
this.dgvUser.AllowUserToAddRows = false;
this.dgvUser.AllowUserToDeleteRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle25.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle25;
this.dgvUser.AutoRowNumber = true;
this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvUser.BackgroundColor = System.Drawing.Color.White;
this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle26.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle26.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle26.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle26.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle26;
this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -1291,6 +1305,8 @@ namespace TemuKJD.WXForms.ShopForms
this.colChangeRefundPostagePerOrder,
this.colGiftOemAmountPerOrder,
this.colChangeGiftOemAmountPerOrder,
this.colSyncLogisticsPerOrder,
this.colChangeSyncLogisticsPerOrder,
this.editColumn,
this.deleteColumn});
this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1417,12 +1433,13 @@ namespace TemuKJD.WXForms.ShopForms
//
// colPlus
//
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colPlus.DefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colPlus.DefaultCellStyle = dataGridViewCellStyle27;
this.colPlus.FillWeight = 22F;
this.colPlus.HeaderText = "+";
this.colPlus.Name = "colPlus";
this.colPlus.ReadOnly = true;
this.colPlus.Visible = false;
//
// colShopPointsPerMonth
//
@@ -1433,8 +1450,8 @@ namespace TemuKJD.WXForms.ShopForms
//
// colChangePointsPerMonth
//
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangePointsPerMonth.DefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangePointsPerMonth.DefaultCellStyle = dataGridViewCellStyle28;
this.colChangePointsPerMonth.FillWeight = 25F;
this.colChangePointsPerMonth.HeaderText = "改";
this.colChangePointsPerMonth.Name = "colChangePointsPerMonth";
@@ -1450,8 +1467,8 @@ namespace TemuKJD.WXForms.ShopForms
//
// colBalancePlus
//
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colBalancePlus.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colBalancePlus.DefaultCellStyle = dataGridViewCellStyle29;
this.colBalancePlus.FillWeight = 22F;
this.colBalancePlus.HeaderText = "+";
this.colBalancePlus.Name = "colBalancePlus";
@@ -1467,8 +1484,8 @@ namespace TemuKJD.WXForms.ShopForms
//
// colChangePostagePerOrder
//
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangePostagePerOrder.DefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangePostagePerOrder.DefaultCellStyle = dataGridViewCellStyle30;
this.colChangePostagePerOrder.FillWeight = 25F;
this.colChangePostagePerOrder.HeaderText = "改";
this.colChangePostagePerOrder.Name = "colChangePostagePerOrder";
@@ -1483,8 +1500,8 @@ namespace TemuKJD.WXForms.ShopForms
//
// colChangeRefundPostagePerOrder
//
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangeRefundPostagePerOrder.DefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangeRefundPostagePerOrder.DefaultCellStyle = dataGridViewCellStyle31;
this.colChangeRefundPostagePerOrder.FillWeight = 25F;
this.colChangeRefundPostagePerOrder.HeaderText = "改";
this.colChangeRefundPostagePerOrder.Name = "colChangeRefundPostagePerOrder";
@@ -1501,8 +1518,8 @@ namespace TemuKJD.WXForms.ShopForms
//
// colChangeGiftOemAmountPerOrder
//
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangeGiftOemAmountPerOrder.DefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.colChangeGiftOemAmountPerOrder.DefaultCellStyle = dataGridViewCellStyle32;
this.colChangeGiftOemAmountPerOrder.FillWeight = 25F;
this.colChangeGiftOemAmountPerOrder.HeaderText = "改";
this.colChangeGiftOemAmountPerOrder.Name = "colChangeGiftOemAmountPerOrder";
@@ -1510,6 +1527,20 @@ namespace TemuKJD.WXForms.ShopForms
this.colChangeGiftOemAmountPerOrder.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colChangeGiftOemAmountPerOrder.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colSyncLogisticsPerOrder
//
this.colSyncLogisticsPerOrder.FillWeight = 60F;
this.colSyncLogisticsPerOrder.HeaderText = "每单同步物流额外收费";
this.colSyncLogisticsPerOrder.Name = "colSyncLogisticsPerOrder";
this.colSyncLogisticsPerOrder.ReadOnly = true;
//
// colChangeSyncLogisticsPerOrder
//
this.colChangeSyncLogisticsPerOrder.FillWeight = 25F;
this.colChangeSyncLogisticsPerOrder.HeaderText = "改";
this.colChangeSyncLogisticsPerOrder.Name = "colChangeSyncLogisticsPerOrder";
this.colChangeSyncLogisticsPerOrder.ReadOnly = true;
//
// editColumn
//
this.editColumn.FillWeight = 40F;
@@ -1553,6 +1584,122 @@ namespace TemuKJD.WXForms.ShopForms
this.btnExportShopErp.Visible = false;
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
//
// pnlSyncLogisticsPerOrder
//
this.pnlSyncLogisticsPerOrder.AccessibleDescription = "";
this.pnlSyncLogisticsPerOrder.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pnlSyncLogisticsPerOrder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlSyncLogisticsPerOrder.Controls.Add(this.lblSyncLogisticsPerOrderUserId);
this.pnlSyncLogisticsPerOrder.Controls.Add(this.lblSyncLogisticsPerOrderUserInfo);
this.pnlSyncLogisticsPerOrder.Controls.Add(this.panel8);
this.pnlSyncLogisticsPerOrder.Location = new System.Drawing.Point(23, 389);
this.pnlSyncLogisticsPerOrder.Name = "pnlSyncLogisticsPerOrder";
this.pnlSyncLogisticsPerOrder.Size = new System.Drawing.Size(360, 146);
this.pnlSyncLogisticsPerOrder.TabIndex = 459;
this.pnlSyncLogisticsPerOrder.Visible = false;
//
// lblSyncLogisticsPerOrderUserId
//
this.lblSyncLogisticsPerOrderUserId.AutoSize = true;
this.lblSyncLogisticsPerOrderUserId.Location = new System.Drawing.Point(256, 19);
this.lblSyncLogisticsPerOrderUserId.Name = "lblSyncLogisticsPerOrderUserId";
this.lblSyncLogisticsPerOrderUserId.Size = new System.Drawing.Size(47, 17);
this.lblSyncLogisticsPerOrderUserId.TabIndex = 457;
this.lblSyncLogisticsPerOrderUserId.Text = "UserId";
this.lblSyncLogisticsPerOrderUserId.Visible = false;
//
// lblSyncLogisticsPerOrderUserInfo
//
this.lblSyncLogisticsPerOrderUserInfo.AutoSize = true;
this.lblSyncLogisticsPerOrderUserInfo.Location = new System.Drawing.Point(20, 19);
this.lblSyncLogisticsPerOrderUserInfo.Name = "lblSyncLogisticsPerOrderUserInfo";
this.lblSyncLogisticsPerOrderUserInfo.Size = new System.Drawing.Size(58, 17);
this.lblSyncLogisticsPerOrderUserInfo.TabIndex = 455;
this.lblSyncLogisticsPerOrderUserInfo.Text = "UserInfo";
//
// panel8
//
this.panel8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel8.Controls.Add(this.numSyncLogisticsPerOrder);
this.panel8.Controls.Add(this.label20);
this.panel8.Controls.Add(this.btnSyncLogisticsPerOrderCancel);
this.panel8.Controls.Add(this.btnSyncLogisticsPerOrder);
this.panel8.Location = new System.Drawing.Point(23, 52);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(310, 57);
this.panel8.TabIndex = 454;
//
// numSyncLogisticsPerOrder
//
this.numSyncLogisticsPerOrder.DecimalPlaces = 2;
this.numSyncLogisticsPerOrder.Location = new System.Drawing.Point(125, 16);
this.numSyncLogisticsPerOrder.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numSyncLogisticsPerOrder.Name = "numSyncLogisticsPerOrder";
this.numSyncLogisticsPerOrder.Size = new System.Drawing.Size(56, 23);
this.numSyncLogisticsPerOrder.TabIndex = 1;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(7, 19);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(116, 17);
this.label20.TabIndex = 456;
this.label20.Text = "同步物流额外收取:";
//
// btnSyncLogisticsPerOrderCancel
//
this.btnSyncLogisticsPerOrderCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnSyncLogisticsPerOrderCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSyncLogisticsPerOrderCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSyncLogisticsPerOrderCancel.Location = new System.Drawing.Point(244, 16);
this.btnSyncLogisticsPerOrderCancel.Name = "btnSyncLogisticsPerOrderCancel";
this.btnSyncLogisticsPerOrderCancel.Size = new System.Drawing.Size(56, 23);
this.btnSyncLogisticsPerOrderCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrderCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnSyncLogisticsPerOrderCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnSyncLogisticsPerOrderCancel.Style.GradientAngle = 90;
this.btnSyncLogisticsPerOrderCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrderCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnSyncLogisticsPerOrderCancel.TabIndex = 458;
this.btnSyncLogisticsPerOrderCancel.Text = "取消";
this.btnSyncLogisticsPerOrderCancel.Click += new System.EventHandler(this.btnSyncLogisticsPerOrderCancel_Click);
//
// btnSyncLogisticsPerOrder
//
this.btnSyncLogisticsPerOrder.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSyncLogisticsPerOrder.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSyncLogisticsPerOrder.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSyncLogisticsPerOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSyncLogisticsPerOrder.Location = new System.Drawing.Point(185, 16);
this.btnSyncLogisticsPerOrder.Name = "btnSyncLogisticsPerOrder";
this.btnSyncLogisticsPerOrder.Size = new System.Drawing.Size(56, 23);
this.btnSyncLogisticsPerOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrder.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSyncLogisticsPerOrder.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSyncLogisticsPerOrder.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSyncLogisticsPerOrder.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSyncLogisticsPerOrder.Style.GradientAngle = 90;
this.btnSyncLogisticsPerOrder.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSyncLogisticsPerOrder.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSyncLogisticsPerOrder.TabIndex = 453;
this.btnSyncLogisticsPerOrder.Text = "确定";
this.btnSyncLogisticsPerOrder.Click += new System.EventHandler(this.btnSyncLogisticsPerOrder_Click);
//
// WXOemAccountForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1606,6 +1753,11 @@ namespace TemuKJD.WXForms.ShopForms
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddTopUp)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvUser)).EndInit();
this.pnlSyncLogisticsPerOrder.ResumeLayout(false);
this.pnlSyncLogisticsPerOrder.PerformLayout();
this.panel8.ResumeLayout(false);
this.panel8.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numSyncLogisticsPerOrder)).EndInit();
this.ResumeLayout(false);
}
@@ -1719,5 +1871,15 @@ namespace TemuKJD.WXForms.ShopForms
private System.Windows.Forms.DataGridViewLinkColumn colChangeGiftOemAmountPerOrder;
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
private System.Windows.Forms.Panel pnlSyncLogisticsPerOrder;
private System.Windows.Forms.Label lblSyncLogisticsPerOrderUserId;
private System.Windows.Forms.Label lblSyncLogisticsPerOrderUserInfo;
private System.Windows.Forms.Panel panel8;
private System.Windows.Forms.NumericUpDown numSyncLogisticsPerOrder;
private System.Windows.Forms.Label label20;
private DevComponents.DotNetBar.PanelEx btnSyncLogisticsPerOrderCancel;
private DevComponents.DotNetBar.PanelEx btnSyncLogisticsPerOrder;
private System.Windows.Forms.DataGridViewTextBoxColumn colSyncLogisticsPerOrder;
private System.Windows.Forms.DataGridViewLinkColumn colChangeSyncLogisticsPerOrder;
}
}
+56 -1
View File
@@ -128,6 +128,7 @@ namespace TemuKJD.WXForms.ShopForms
user.postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "postage_per_order");
user.refund_postage_per_order = BaseRegex.GetDecimalJson(ref oStr, "refund_postage_per_order");
user.gift_oem_amount_per_order = BaseRegex.GetDecimalJson(ref oStr, "gift_oem_amount_per_order");
user.sync_logistics_per_order = BaseRegex.GetDecimalJson(ref oStr, "sync_logistics_per_order");
user.oem_id = BaseRegex.GetStringJson(ref oStr, "oem_id");
user.oem_name = BaseRegex.GetStringJson(ref oStr, "oem_name");
var parent_user_name = BaseRegex.GetStringJson(ref oStr, "parent_user_name");
@@ -160,6 +161,8 @@ namespace TemuKJD.WXForms.ShopForms
(user.group_id == "3") ? "改" : null,
Math.Max(0m, user.gift_oem_amount_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
Math.Max(0m, user.sync_logistics_per_order.ParseToDecimal()),
(user.group_id == "3") ? "改" : null,
user.group_id == "3" ? "添加店铺" : "",
"编辑",
"删除");
@@ -206,6 +209,7 @@ namespace TemuKJD.WXForms.ShopForms
decimal postagePerOrder = dgvUser.Rows[e.RowIndex].Cells["colPostagePerOrder"].Value.ParseToDecimal();
decimal refundPostagePerOrder = dgvUser.Rows[e.RowIndex].Cells["colRefundPostagePerOrder"].Value.ParseToDecimal();
decimal giftOemAmountPerOrder = dgvUser.Rows[e.RowIndex].Cells["colGiftOemAmountPerOrder"].Value.ParseToDecimal();
decimal syncLogisticsPerOrder = dgvUser.Rows[e.RowIndex].Cells["colSyncLogisticsPerOrder"].Value.ParseToDecimal();
var row = dgvUser.Rows[e.RowIndex];
if (columText == "编辑")
{
@@ -282,6 +286,15 @@ namespace TemuKJD.WXForms.ShopForms
this.pnlGiftOemAmountPerOrder.BringToFront();
this.lblGiftOemAmountPerOrderUserId.Text = uid;
}
if (columName == "colChangeSyncLogisticsPerOrder")
{
this.lblSyncLogisticsPerOrderUserInfo.Text = mobile + " - " + nickName;
this.numSyncLogisticsPerOrder.Value = syncLogisticsPerOrder;
this.pnlSyncLogisticsPerOrder.Tag = row;
this.pnlSyncLogisticsPerOrder.Visible = true;
this.pnlSyncLogisticsPerOrder.BringToFront();
this.lblSyncLogisticsPerOrderUserId.Text = uid;
}
}
if (columText == "")
row.Cells["colCheck"].Value = !row.Cells["colCheck"].Value.ParseToBool();
@@ -328,12 +341,15 @@ namespace TemuKJD.WXForms.ShopForms
pnlPostagePerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlRefundPostagePerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlGiftOemAmountPerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlSyncLogisticsPerOrder.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
this.txtSearch.GotFocus += TxtSearch_GotFocus;
this.txtSearch.LostFocus += TxtSearch_LostFocus;
if (colPoints.Visible == true && colPlus.Visible == true)
{
this.dgvUser.AddMergeColumn(new List<string> { "colPoints", "colPlus" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colPoints", "colPlus" }, "积分点数");
}
this.dgvUser.AddMergeColumn(new List<string> { "colShopPointsPerMonth", "colChangePointsPerMonth" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colShopPointsPerMonth", "colChangePointsPerMonth" }, "月费耗点");
this.dgvUser.AddMergeColumn(new List<string> { "colBalance", "colBalancePlus" });
@@ -344,6 +360,8 @@ namespace TemuKJD.WXForms.ShopForms
this.dgvUser.AddMergeColumnHeader(new List<string> { "colRefundPostagePerOrder", "colChangeRefundPostagePerOrder" }, "每单退货快递费");
this.dgvUser.AddMergeColumn(new List<string> { "colGiftOemAmountPerOrder", "colChangeRefundPostagePerOrder" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colGiftOemAmountPerOrder", "colChangeGiftOemAmountPerOrder" }, "每单礼物额外收取");
this.dgvUser.AddMergeColumn(new List<string> { "colSyncLogisticsPerOrder", "colChangeSyncLogisticsPerOrder" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colSyncLogisticsPerOrder", "colChangeSyncLogisticsPerOrder" }, "同步物流额外收取");
}
private void TxtSearch_LostFocus(object sender, EventArgs e)
@@ -614,5 +632,42 @@ namespace TemuKJD.WXForms.ShopForms
{
pnlGiftOemAmountPerOrder.Visible = false;
}
private void btnSyncLogisticsPerOrder_Click(object sender, EventArgs e)
{
if (updateSyncLogisticsPerOrder(lblSyncLogisticsPerOrderUserId.Text))
{
pnlSyncLogisticsPerOrder.Visible = false;
BaseMsgForm.ShowInfo("修改同步物流额外金额成功");
}
}
public bool updateSyncLogisticsPerOrder(string userDbId, bool showFailBox = true)
{
string url = BaseClass.BuildObjString("user/update_user");
string data = UserLogin.GetSignaturex();
data += "&id=" + userDbId;
data += "&sync_logistics_per_order=" + numSyncLogisticsPerOrder.Value;
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
if (!html.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
if (showFailBox)
{
Invoke(new Action(() => { BaseMsgForm.ShowError(msg); }));
}
return false;
}
var row = dgvUser.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["UserIdColumn"].Value.ParseToString() == userDbId);
if (row != null)
{
Invoke(new Action(() => { row.Cells["colSyncLogisticsPerOrder"].Value = numSyncLogisticsPerOrder.Value; }));
}
return true;
}
private void btnSyncLogisticsPerOrderCancel_Click(object sender, EventArgs e)
{
pnlSyncLogisticsPerOrder.Visible = false;
}
}
}
@@ -357,8 +357,8 @@ namespace Work._29Tools.Forms.UserForms
this.KeyPreview = true;
this.Name = "WXOemPointsTopUpListForm";
this.Padding = new System.Windows.Forms.Padding(2);
this.Text = "OEM积分明细";
this.TitleText = "OEM积分明细";
this.Text = "积分流水明细";
this.TitleText = "积分流水明细";
this.Load += new System.EventHandler(this.WXGetTopUpQrCode_Load);
this.Controls.SetChildIndex(this.panel1, 0);
this.panel1.ResumeLayout(false);
+34 -30
View File
@@ -31,26 +31,28 @@ namespace TemuKJD.WXForms.ShopForms
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("店铺列表");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("子账号管理");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("OEM账号管理");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("OEM返现明细");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("OEM积分明细");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("店铺地址管理");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("店铺经营统计");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("评分考核");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("税务申报");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("积分充值");
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("OEM提现管理");
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("运费流水明细");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("积分流水明细");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("OEM提现管理");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("店铺地址管理");
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("店铺经营统计");
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("评分考核");
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("税务申报");
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("积分充值");
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("OEM返利明细");
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5,
treeNode11,
treeNode6,
treeNode12,
treeNode7,
treeNode8,
treeNode9,
treeNode10});
treeNode10,
treeNode11});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
@@ -148,26 +150,28 @@ namespace TemuKJD.WXForms.ShopForms
treeNode2.Text = "子账号管理";
treeNode3.Name = "OEM账号管理";
treeNode3.Text = "OEM账号管理";
treeNode4.Name = "OEM返现明细";
treeNode4.Text = "OEM返现明细";
treeNode5.Name = "OEM积分明细";
treeNode5.Text = "OEM积分明细";
treeNode6.Name = "店铺地址管理";
treeNode6.Text = "店铺地址管理";
treeNode7.Name = "店铺经营统计";
treeNode7.Text = "店铺经营统计";
treeNode8.Name = "评分考核";
treeNode8.Text = "评分考核";
treeNode9.Name = "税务申报";
treeNode9.Text = "税务申报";
treeNode10.Name = "积分充值";
treeNode10.Text = "积分充值";
treeNode11.Name = "OEM提现管理";
treeNode11.Text = "OEM提现管理";
treeNode12.Name = "店铺管理";
treeNode12.Text = "店铺管理";
treeNode4.Name = "运费流水明细";
treeNode4.Text = "运费流水明细";
treeNode5.Name = "积分流水明细";
treeNode5.Text = "积分流水明细";
treeNode6.Name = "OEM提现管理";
treeNode6.Text = "OEM提现管理";
treeNode7.Name = "店铺地址管理";
treeNode7.Text = "店铺地址管理";
treeNode8.Name = "店铺经营统计";
treeNode8.Text = "店铺经营统计";
treeNode9.Name = "评分考核";
treeNode9.Text = "评分考核";
treeNode10.Name = "税务申报";
treeNode10.Text = "税务申报";
treeNode11.Name = "积分充值";
treeNode11.Text = "积分充值";
treeNode12.Name = "OEM返利明细";
treeNode12.Text = "OEM返利明细";
treeNode13.Name = "店铺管理";
treeNode13.Text = "店铺管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode12});
treeNode13});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 461);
this.tv.TabIndex = 1;
+13 -7
View File
@@ -34,6 +34,7 @@ namespace TemuKJD.WXForms.ShopForms
public Lazy<WXOemAccountBalanceForm> oemAccountBalanceForm = new Lazy<WXOemAccountBalanceForm>();
public Lazy<WXOemPointsTopUpListForm> oemAccountPointsForm = new Lazy<WXOemPointsTopUpListForm>();
public Lazy<WXShopOemWithdrawalForm> oemWithdrawalForm = new Lazy<WXShopOemWithdrawalForm>();
public Lazy<WXShopOemRebateRecordsForm> oemRebateRecordsForm = new Lazy<WXShopOemRebateRecordsForm>();
public WXShopForm()
@@ -61,7 +62,7 @@ namespace TemuKJD.WXForms.ShopForms
public List<string> getHideTreeNodes()
{
List<string> hideNames = new List<string>() { "积分充值", "OEM账号管理", "OEM返现明细", "OEM积分明细", "OEM提现管理", "店铺地址管理", "评分考核", "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" };
List<string> hideNames = new List<string>() { "积分充值", "OEM账号管理", "运费流水明细", "积分流水明细", "OEM提现管理", "OEM返利明细", "店铺地址管理", "评分考核", "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计", "店铺经营统计1" };
if (BaseClass.SaLevel == 1)
{
@@ -77,16 +78,18 @@ namespace TemuKJD.WXForms.ShopForms
{
hideNames.Remove("评分考核");
}
if (BaseClass.UserAuthority.Contains("充值用户") && BaseClass.GroupId == 3 && BaseClass.AgentCode.IsNullOrEmpty() && BaseClass.OemId.IsNullOrEmpty())
//if (BaseClass.UserAuthority.Contains("充值用户") && BaseClass.GroupId == 3 && BaseClass.AgentCode.IsNullOrEmpty() && BaseClass.OemId.IsNullOrEmpty())
if (BaseClass.UserAuthority.Contains("充值用户") && BaseClass.GroupId == 3)
{
//hideNames.Remove("积分充值");
hideNames.Remove("积分充值");
}
if (!BaseClass.OemId.IsNullOrEmpty() && BaseClass.IsOemOwner)
{
hideNames.Remove("OEM账号管理");
hideNames.Remove("OEM返现明细");
hideNames.Remove("OEM积分明细");
hideNames.Remove("运费流水明细");
hideNames.Remove("积分流水明细");
hideNames.Remove("OEM提现管理");
hideNames.Remove("OEM返利明细");
}
foreach (var forbiddenPage in BaseClass.ForbiddenPage.Split(','))
@@ -141,15 +144,18 @@ namespace TemuKJD.WXForms.ShopForms
case "OEM账号管理":
SetForm(oemAccountForm.Value);
break;
case "OEM返现明细":
case "运费流水明细":
SetForm(oemAccountBalanceForm.Value);
break;
case "OEM积分明细":
case "积分流水明细":
SetForm(oemAccountPointsForm.Value);
break;
case "OEM提现管理":
SetForm(oemWithdrawalForm.Value);
break;
case "OEM返利明细":
SetForm(oemRebateRecordsForm.Value);
break;
}
}));
}).Start();
+11
View File
@@ -659,10 +659,21 @@
10000,
0,
0,
0});
this.numAddTopUp.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numAddTopUp.Name = "numAddTopUp";
this.numAddTopUp.ReadOnly = true;
this.numAddTopUp.Size = new System.Drawing.Size(36, 23);
this.numAddTopUp.TabIndex = 1;
this.numAddTopUp.Value = new decimal(new int[] {
1,
0,
0,
0});
this.numAddTopUp.ValueChanged += new System.EventHandler(this.numAddTopUp_ValueChanged);
//
// label8
+52 -36
View File
@@ -3,14 +3,17 @@ using AllBase.Helper;
using AllBase.Model.Result;
using NaiBa.Util;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -18,6 +21,8 @@ using TemuKJD.BaseForms;
using TemuKJD.BLL;
using TemuKJD.Extension;
using Work;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
//using TemuKJD.PDDForms.AdminForms;
namespace TemuKJD.WXForms.ShopForms
@@ -283,7 +288,8 @@ namespace TemuKJD.WXForms.ShopForms
int i = 1;
foreach (var shopInfo in shopInfoLst)
{
Invoke(new Action(() => {
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value = i;
this.statusBar.pgbTaskProgress.Text = i + "/" + shopInfoLst.Count;
i++;
@@ -305,7 +311,8 @@ namespace TemuKJD.WXForms.ShopForms
int i = 1;
foreach (var shopInfo in shopInfoLst)
{
Invoke(new Action(() => {
Invoke(new Action(() =>
{
this.statusBar.pgbTaskProgress.Value = i;
this.statusBar.pgbTaskProgress.Text = i + "/" + shopInfoLst.Count;
this.statusBar.pgbTaskProgress.Maximum = shopInfoLst.Count;
@@ -927,7 +934,7 @@ namespace TemuKJD.WXForms.ShopForms
case "续期":
lblShopId.Text = shop.ShopId;
lblShopInfo.Text = shop.ShopAccount;
numAddTopUp.Value = 0;
numAddTopUp.Value = 1;
pnlTopUp.Visible = true;
break;
//case "多重登录":
@@ -1222,52 +1229,47 @@ namespace TemuKJD.WXForms.ShopForms
pnlTopUp.Visible = false;
}
private void btnTopUpOK_Click(object sender, EventArgs e)
private async void btnTopUpOK_Click(object sender, EventArgs e)
{
try
{
//var row = pnlTopUp.Tag as DataGridViewRow;
//if (row == null)
// return;
//var shopId = row.Cells["colShopId"].Value.ParseToString();
//if (shopId == null)
// return;
//var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
//if (shop == null)
// return;
var shopIds = lblShopId.Text.Split(';');
string errMsg = "";
int renew_months = (int)numAddTopUp.Value;//续费月数
renew_months = Math.Max(1, renew_months);
if (BaseMsgForm.ShowConfirm($"[{lblShopInfo.Text}] 店铺续费:{renew_months}个月", "提示").DialogResult == DialogResult.Cancel)
{
return;
}
pbLoading.Visible = true;
pbLoading.BringToFront();
string errMsg = "";
Task.Run(() =>
{
foreach (var shopId in shopIds)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
continue;
string url = BaseClass.BuildObjString("user/update_user_points");
string data = UserLogin.GetSignaturex();
data += "&update_user_name=" + BaseClass.UserName;
data += "&update_user_nick=" + BaseClass.NickName;
data += "&option_type=" + "续费";
data += "&operator_type=" + "用户";
data += "&operator_name=" + BaseClass.UserName;
data += "&delta_points=" + (numAddTopUp.Value * BaseClass.ShopPointsPerMonth).ParseToInt();
data += "&shop_id=" + shopId;
data += "&shop_account=" + shop.ShopAccount;
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
Thread.Sleep(100);
if (!html.Contains("\"code\":200"))
string url = BaseClass.BuildObjString("user/shop_renew");
var data = UserLogin.GetSignPostData(new
{
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
errMsg += shop.ShopAccount + ":" + msg + " ";
UserName = BaseClass.UserName,
ShopId = shopId,
RenewDuration = renew_months,
});
string html = await GetHtml.PostJsonAsync(url, data);
var ret = JsonConvert.DeserializeObject<Result<ShopRenewResponse>>(html);
if (ret.Code != 200)
{
errMsg += $"shop.ShopAccount:{ret.Msg}";
continue;
}
shop.expire_time = BaseRegex.GetIntJson(ref html, "newExpireTime");
shop.expire_time = ret.Data.ExpireTime;
shop.is_point_shop_expire = false;
BaseClass.Points = BaseRegex.GetIntJson(ref html, "newUserPoints");
BaseClass.Points = ret.Data.UserPoints;
Invoke(new Action(() =>
{
MainForm.instance.lblPoints.Text = "账户积分:" + BaseClass.Points;
@@ -1287,7 +1289,15 @@ namespace TemuKJD.WXForms.ShopForms
BaseMsgForm.ShowInfo("充值完成 发生以下错误:\r\n" + errMsg);
}
}));
});
}
catch (Exception ex)
{
}
finally
{
pbLoading.Visible = false;
}
}
private void numAddTopUp_ValueChanged(object sender, EventArgs e)
@@ -1302,8 +1312,14 @@ namespace TemuKJD.WXForms.ShopForms
lblShopId.Text = string.Join(";", shops.Select(s => s.ShopId));
lblShopInfo.Text = string.Join(" ", shops.Select(s => s.ShopAccount));
numAddTopUp.Value = 0;
numAddTopUp.Value = 1;
pnlTopUp.Visible = true;
}
}
public class ShopRenewResponse
{
public string ShopId { get; set; }
public int ExpireTime‌ { get; set; }
public int UserPoints { get; set; }
}
}
@@ -0,0 +1,368 @@
namespace TemuKJD.WXForms.ShopForms
{
partial class WXShopOemRebateRecordsForm
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopOemRebateRecordsForm));
this.panel1 = new System.Windows.Forms.Panel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxFilter = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.dtpEndTime = new System.Windows.Forms.DateTimePicker();
this.lblTo = new System.Windows.Forms.Label();
this.dtpStartTime = new System.Windows.Forms.DateTimePicker();
this.lblDateRange = new System.Windows.Forms.Label();
this.cmbType = new System.Windows.Forms.ComboBox();
this.lblType = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvRebateRecords = new TemuKJD.UserComponent.DataGridViewEx();
this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRebate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxFilter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvRebateRecords)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.splitContainer1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(1, 33);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1222, 586);
this.panel1.TabIndex = 0;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxFilter);
this.splitContainer1.Panel1.Padding = new System.Windows.Forms.Padding(2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1222, 586);
this.splitContainer1.SplitterDistance = 75;
this.splitContainer1.TabIndex = 0;
//
// ucGroupBoxFilter
//
this.ucGroupBoxFilter.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxFilter.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxFilter.Controls.Add(this.btnSearch);
this.ucGroupBoxFilter.Controls.Add(this.dtpEndTime);
this.ucGroupBoxFilter.Controls.Add(this.lblTo);
this.ucGroupBoxFilter.Controls.Add(this.dtpStartTime);
this.ucGroupBoxFilter.Controls.Add(this.lblDateRange);
this.ucGroupBoxFilter.Controls.Add(this.cmbType);
this.ucGroupBoxFilter.Controls.Add(this.lblType);
this.ucGroupBoxFilter.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucGroupBoxFilter.Location = new System.Drawing.Point(2, 2);
this.ucGroupBoxFilter.Name = "ucGroupBoxFilter";
this.ucGroupBoxFilter.Size = new System.Drawing.Size(1218, 71);
this.ucGroupBoxFilter.TabIndex = 0;
this.ucGroupBoxFilter.TabStop = false;
this.ucGroupBoxFilter.Text = "查询条件";
//
// btnSearch
//
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(677, 26);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(68, 25);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSearch.Style.GradientAngle = 90;
this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.TabIndex = 5;
this.btnSearch.Text = "查询";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// dtpEndTime
//
this.dtpEndTime.CustomFormat = "yyyy-MM-dd";
this.dtpEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpEndTime.Location = new System.Drawing.Point(492, 26);
this.dtpEndTime.Name = "dtpEndTime";
this.dtpEndTime.ShowCheckBox = true;
this.dtpEndTime.Size = new System.Drawing.Size(145, 23);
this.dtpEndTime.TabIndex = 4;
//
// lblTo
//
this.lblTo.AutoSize = true;
this.lblTo.Location = new System.Drawing.Point(466, 30);
this.lblTo.Name = "lblTo";
this.lblTo.Size = new System.Drawing.Size(20, 17);
this.lblTo.TabIndex = 3;
this.lblTo.Text = "至";
//
// dtpStartTime
//
this.dtpStartTime.CustomFormat = "yyyy-MM-dd";
this.dtpStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpStartTime.Location = new System.Drawing.Point(312, 26);
this.dtpStartTime.Name = "dtpStartTime";
this.dtpStartTime.ShowCheckBox = true;
this.dtpStartTime.Size = new System.Drawing.Size(145, 23);
this.dtpStartTime.TabIndex = 2;
//
// lblDateRange
//
this.lblDateRange.AutoSize = true;
this.lblDateRange.Location = new System.Drawing.Point(240, 30);
this.lblDateRange.Name = "lblDateRange";
this.lblDateRange.Size = new System.Drawing.Size(68, 17);
this.lblDateRange.TabIndex = 1;
this.lblDateRange.Text = "日期范围:";
//
// cmbType
//
this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbType.FormattingEnabled = true;
this.cmbType.Items.AddRange(new object[] {
"运费",
"续费"});
this.cmbType.Location = new System.Drawing.Point(83, 26);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(120, 25);
this.cmbType.TabIndex = 0;
//
// lblType
//
this.lblType.AutoSize = true;
this.lblType.Location = new System.Drawing.Point(35, 30);
this.lblType.Name = "lblType";
this.lblType.Size = new System.Drawing.Size(44, 17);
this.lblType.TabIndex = 0;
this.lblType.Text = "类型:";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.pbLoading);
this.splitContainer2.Panel1.Controls.Add(this.dgvRebateRecords);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1222, 507);
this.splitContainer2.SplitterDistance = 478;
this.splitContainer2.TabIndex = 0;
//
// pbLoading
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(586, 214);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLoading.TabIndex = 1;
this.pbLoading.TabStop = false;
this.pbLoading.Visible = false;
//
// dgvRebateRecords
//
this.dgvRebateRecords.AllowUserToAddRows = false;
this.dgvRebateRecords.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvRebateRecords.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvRebateRecords.AutoRowNumber = true;
this.dgvRebateRecords.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvRebateRecords.BackgroundColor = System.Drawing.Color.White;
this.dgvRebateRecords.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvRebateRecords.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvRebateRecords.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvRebateRecords.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colUserName,
this.colAmount,
this.colRebate,
this.colCreateTime});
this.dgvRebateRecords.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvRebateRecords.Location = new System.Drawing.Point(4, 0);
this.dgvRebateRecords.MultiSelectCheckBox = false;
this.dgvRebateRecords.Name = "dgvRebateRecords";
this.dgvRebateRecords.ReadOnly = true;
this.dgvRebateRecords.RowTemplate.Height = 28;
this.dgvRebateRecords.ShowCellErrors = false;
this.dgvRebateRecords.Size = new System.Drawing.Size(1214, 478);
this.dgvRebateRecords.TabIndex = 0;
//
// colUserName
//
this.colUserName.FillWeight = 30F;
this.colUserName.HeaderText = "用户账号";
this.colUserName.Name = "colUserName";
this.colUserName.ReadOnly = true;
//
// colAmount
//
this.colAmount.FillWeight = 24F;
this.colAmount.HeaderText = "订单金额(元)";
this.colAmount.Name = "colAmount";
this.colAmount.ReadOnly = true;
//
// colRebate
//
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(140)))), ((int)(((byte)(0)))));
this.colRebate.DefaultCellStyle = dataGridViewCellStyle3;
this.colRebate.FillWeight = 24F;
this.colRebate.HeaderText = "返利金额(元)";
this.colRebate.Name = "colRebate";
this.colRebate.ReadOnly = true;
//
// colCreateTime
//
this.colCreateTime.FillWeight = 32F;
this.colCreateTime.HeaderText = "创建时间";
this.colCreateTime.Name = "colCreateTime";
this.colCreateTime.ReadOnly = true;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(833, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 200;
this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
this.ucSplitPage1.TabIndex = 1;
this.ucSplitPage1.TotalCount = ((long)(0));
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1222, 25);
this.statusBar.TabIndex = 0;
//
// WXShopOemRebateRecordsForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1224, 620);
this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.Name = "WXShopOemRebateRecordsForm";
this.Text = "OEM返利明细";
this.TitleText = "OEM返利明细";
this.VisibleChanged += new System.EventHandler(this.WXShopOemRebateRecordsForm_VisibleChanged);
this.Controls.SetChildIndex(this.panel1, 0);
this.panel1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxFilter.ResumeLayout(false);
this.ucGroupBoxFilter.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvRebateRecords)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.SplitContainer splitContainer1;
private TemuKJD.UserComponent.UcGroupBoxEx ucGroupBoxFilter;
private System.Windows.Forms.Label lblType;
private System.Windows.Forms.ComboBox cmbType;
private System.Windows.Forms.Label lblDateRange;
private System.Windows.Forms.DateTimePicker dtpStartTime;
private System.Windows.Forms.Label lblTo;
private System.Windows.Forms.DateTimePicker dtpEndTime;
private DevComponents.DotNetBar.PanelEx btnSearch;
private System.Windows.Forms.SplitContainer splitContainer2;
private TemuKJD.UserComponent.DataGridViewEx dgvRebateRecords;
private System.Windows.Forms.PictureBox pbLoading;
private TemuKJD.UserControls.UcSplitPage ucSplitPage1;
private TemuKJD.UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewTextBoxColumn colUserName;
private System.Windows.Forms.DataGridViewTextBoxColumn colAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colRebate;
private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime;
}
}
@@ -0,0 +1,207 @@
using AllBase;
using AllBase.Model.Result;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using Work;
namespace TemuKJD.WXForms.ShopForms
{
/// <summary>
/// OEM返利明细。
/// 支持按类型(运费、续费)和日期范围查询返利记录。
/// </summary>
public partial class WXShopOemRebateRecordsForm : BaseGeneralForm
{
private readonly BindingList<RebateRecordResponse> dataList = new BindingList<RebateRecordResponse>();
private bool first = true;
private bool loading;
public WXShopOemRebateRecordsForm()
{
InitializeComponent();
InitBindingDataGridView();
this.cmbType.SelectedIndex = 0;
this.dtpStartTime.Value = DateTime.Now.Date.AddMonths(-3);
this.dtpEndTime.Value = DateTime.Now.Date;
}
#region 列表绑定
private void InitBindingDataGridView()
{
this.dgvRebateRecords.AutoGenerateColumns = false;
this.colUserName.DataPropertyName = nameof(RebateRecordResponse.UserName);
this.colAmount.DataPropertyName = nameof(RebateRecordResponse.Amount);
this.colRebate.DataPropertyName = nameof(RebateRecordResponse.Rebate);
this.colCreateTime.DataPropertyName = nameof(RebateRecordResponse.CreateTime);
this.colCreateTime.DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss";
this.colAmount.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
this.colRebate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
this.dgvRebateRecords.CellFormatting += DgvRebateRecords_CellFormatting;
this.dgvRebateRecords.DataSource = dataList;
}
private void DgvRebateRecords_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.Value == null || e.Value == DBNull.Value)
return;
if (e.ColumnIndex != this.colAmount.Index && e.ColumnIndex != this.colRebate.Index)
return;
if (long.TryParse(e.Value.ToString(), out long amountInFen))
{
e.Value = (amountInFen / 100m).ToString("F2");
e.FormattingApplied = true;
}
}
#endregion
#region 数据加载
private void WXShopOemRebateRecordsForm_VisibleChanged(object sender, EventArgs e)
{
//if (this.Visible && first)
//{
// first = false;
// GetRebateRecords(1);
//}
}
private async Task GetRebateRecords(int page)
{
if (loading)
return;
if (this.dtpStartTime.Checked && this.dtpEndTime.Checked && this.dtpStartTime.Value.Date > this.dtpEndTime.Value.Date)
{
BaseMsgForm.ShowError("开始日期不能大于结束日期!");
return;
}
int type = GetRebateType(this.cmbType.Text);
int pageSize = this.ucSplitPage1.PageSize;
string startTime = this.dtpStartTime.Checked
? this.dtpStartTime.Value.ToString("yyyy-MM-dd 00:00:00")
: null;
string endTime = this.dtpEndTime.Checked
? this.dtpEndTime.Value.ToString("yyyy-MM-dd 23:59:59")
: null;
this.loading = true;
this.btnSearch.Enabled = false;
this.ucSplitPage1.Enabled = false;
this.pbLoading.Visible = true;
this.dgvRebateRecords.Rows.Clear();
this.dataList.Clear();
try
{
var ret = await RequestRebateRecords(type, page, pageSize, startTime, endTime);
if (ret == null)
throw new Exception("接口未返回数据");
List<RebateRecordResponse> list = ret?.List ?? new List<RebateRecordResponse>();
int pageCount = Math.Max((int)Math.Ceiling((double)ret.Total / Math.Max(pageSize, 1)), 1);
this.ucSplitPage1.TotalPage = pageCount;
list.ForEach(item => this.dataList.Add(item));
this.statusBar.lblTaskStatus.Text = "返利明细查询完毕";
}
catch (Exception ex)
{
this.statusBar.lblTaskStatus.Text = "返利明细查询失败";
BaseMsgForm.ShowError("返利明细获取失败:" + ex.Message);
}
finally
{
if (!this.IsDisposed)
{
this.pbLoading.Visible = false;
this.btnSearch.Enabled = true;
this.ucSplitPage1.Enabled = true;
this.loading = false;
}
}
}
private async Task<PageData<RebateRecordResponse>> RequestRebateRecords(
int type,
int page,
int pageSize,
string startTime,
string endTime)
{
var url = BaseClass.BuildObjString("oem/GetRebateRecords");
var obj = UserLogin.GetSignPostData(new
{
Type = type,
PageIndex = page,
PageSize = pageSize,
StartTime = startTime,
EndTime = endTime
});
// GetSignPostData 会将 null 转为空字符串,这里恢复为接口约定的 null。
var postData = obj as IDictionary<string, object>;
if (postData != null)
{
postData["StartTime"] = startTime;
postData["EndTime"] = endTime;
}
string html = await GetHtml.PostJsonAsync(url, obj);
if (string.IsNullOrWhiteSpace(html))
throw new Exception("接口未返回数据");
var ret= JsonConvert.DeserializeObject<ApiPageResult<RebateRecordResponse>>(html);
if (ret.Code != 200)
{
throw new Exception("查询失败,请重试!" + ret.Msg);
}
return ret.Data;
}
private static int GetRebateType(string typeName)
{
return string.Equals(typeName, "续费", StringComparison.Ordinal) ? 1 : 0;
}
#endregion
#region 事件
private async void btnSearch_Click(object sender, EventArgs e)
{
if (this.ucSplitPage1.CurrentPage != 1)
{
this.ucSplitPage1.CurrentPage = 1;
return;
}
await GetRebateRecords(1);
}
private async void ucSplitPage1_PageChange(object obj)
{
await GetRebateRecords(this.ucSplitPage1.CurrentPage);
}
#endregion
}
/// <summary>
/// OEM返利记录。
/// </summary>
public class RebateRecordResponse
{
public string UserName { get; set; }
public long Amount { get; set; }
public long Rebate { get; set; }
public DateTime CreateTime { get; set; }
}
}
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAQYAAAAABoCgAAFgAAACgAAABAAAAAgAAAAAEABAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAV3d3d3d3d3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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAYAA
AAAAAAABwAAAAAAAAAPAAAAAAAAAA+AAAAAAAAAH+AAAAAAAAB//gAAAAAAB/w==
</value>
</data>
</root>
@@ -158,7 +158,7 @@ namespace TemuKJD.WXForms.ShopForms
this.btnRefreshBalance.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshBalance.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshBalance.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshBalance.Location = new System.Drawing.Point(1130, 41);
this.btnRefreshBalance.Location = new System.Drawing.Point(702, 42);
this.btnRefreshBalance.Name = "btnRefreshBalance";
this.btnRefreshBalance.Size = new System.Drawing.Size(60, 23);
this.btnRefreshBalance.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -520,12 +520,15 @@ namespace TemuKJD.WXForms.ShopForms
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(829, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(389, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalCount = ((long)(0));
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
//
@@ -13,6 +13,7 @@ using System.Drawing;
using System.Drawing.Printing;
using System.IO;
using System.Linq;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -39,6 +40,7 @@ namespace TemuKJD.WXForms.ShopForms
/// <summary>收款二维码图片(base64)</summary>
private string qrCodeBase64 = "";
private bool isSettlement = false;
public WXShopOemWithdrawalForm()
{
@@ -93,7 +95,7 @@ namespace TemuKJD.WXForms.ShopForms
#endregion
#region 数据加载
private void WXShopOemWithdrawalForm_VisibleChanged(object sender, EventArgs e)
private async void WXShopOemWithdrawalForm_VisibleChanged(object sender, EventArgs e)
{
if (this.Visible && first)
{
@@ -103,49 +105,56 @@ namespace TemuKJD.WXForms.ShopForms
}
bool first = true;
/// <summary>
/// 刷新账户金额 + 提现记录
/// </summary>
private async Task RefreshAll()
{
await RefreshOMEAmount();
GetWithdrawals(ucSplitPage1.CurrentPage);
}
/// <summary>
/// 刷新账户统计 + 提现记录
/// 刷新OEM钱
/// </summary>
private void RefreshAll()
/// <returns></returns>
/// <exception cref="Exception"></exception>
private async Task RefreshOMEAmount()
{
LoadSummary();
GetWithdrawals(ucSplitPage1.CurrentPage);
var url = BaseClass.BuildObjString("user/getOemAmount");
var data = UserLogin.GetSignPostData(new { });
var html = await GetHtml.PostJsonAsync(url, data);
var ret = JsonConvert.DeserializeObject<Result<oemflowsStatistics>>(html);
if (ret.Code != 200)
{
throw new Exception(ret.Msg);
}
this.lblWithdrawable.Text = (ret.Data.AvailableBalance / 100m).ToString("F2");
this.lblTotalRebate.Text = (ret.Data.TotalRebateAmount / 100m).ToString("F2");
this.lblTotalWithdrawn.Text = (ret.Data.TotalWithdrawAmount / 100m).ToString("F2");
}
/// <summary>
/// 加载账户统计:可提现总额 / 历史累计返利 / 历史累计提现
/// </summary>
public void LoadSummary()
{
this.btnRefreshBalance.Enabled = false;
Task.Run(() =>
{
try
public async Task Settlement()
{
var url = BaseClass.BuildObjString("user/oem_settle_flows");
var obj = UserLogin.GetSignPostData(new { });
string data = JsonHelper.SerializeObject(obj);
var html = GetHtml.PostUtf8(url, data);
var data = UserLogin.GetSignPostData(new { });
var html = await GetHtml.PostJsonAsync(url, data);
var ret = JsonConvert.DeserializeObject<Result<oemflowsStatistics>>(html);
Invoke(new Action(() =>
{
if (ret.Code != 200)
{
BaseMsgForm.ShowError("刷新失败:" + ret.Msg);
return;
throw new Exception("结算失败:" + ret.Msg);
}
this.lblWithdrawable.Text = (ret.Data.AvailableBalance / 100m).ToString("F2");
this.lblTotalRebate.Text = (ret.Data.TotalRebateAmount / 100m).ToString("F2");
this.lblTotalWithdrawn.Text = (ret.Data.TotalWithdrawAmount / 100m).ToString("F2");
this.lblWithdrawable.Text = (ret.Data.available_balance / 100m).ToString("F2");
this.lblTotalRebate.Text = (ret.Data.total_rebate_amount / 100m).ToString("F2");
this.lblTotalWithdrawn.Text = (ret.Data.total_withdraw_amount / 100m).ToString("F2");
}));
}
finally
{
Invoke(new Action(() => this.btnRefreshBalance.Enabled = true));
}
});
}
@@ -193,7 +202,7 @@ namespace TemuKJD.WXForms.ShopForms
string data = JsonHelper.SerializeObject(obj);
var html = GetHtml.PostUtf8(url, data);
var ret = JsonConvert.DeserializeObject<PageResult<WXOemWithdrawalInfo>>(html);
var ret = JsonConvert.DeserializeObject<ApiPageResult<WXOemWithdrawalInfo>>(html);
if (ret.Code != 200)
{
Invoke(new Action(() =>
@@ -205,18 +214,49 @@ namespace TemuKJD.WXForms.ShopForms
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
pageCount = Math.Ceiling(1.0 * ret.Total / pageSize).ParseToInt();
pageCount = Math.Ceiling(1.0 * ret.Data.Total / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
return ret.Data;
return ret.Data.List;
}
#endregion
#region 事件
//private async void bt_RefreshAmount_Click(object sender, EventArgs e)
//{
// try
// {
// bt_RefreshAmount.Enabled = false;
// await RefreshOMEAmount();
// }
// catch (Exception ex)
// {
// BaseMsgForm.ShowError(ex.Message);
// }
// finally
// {
// bt_RefreshAmount.Enabled = true;
// }
//}
/// <summary>刷新可提现总额等账户统计</summary>
private void btnRefreshBalance_Click(object sender, EventArgs e)
private async void btnRefreshBalance_Click(object sender, EventArgs e)
{
LoadSummary();
try
{
btnRefreshBalance.Enabled = false;
await Settlement();
isSettlement = true;
}
catch (Exception ex)
{
BaseMsgForm.ShowError(ex.Message);
}
finally
{
btnRefreshBalance.Enabled = true;
}
}
/// <summary>选择收款二维码图片</summary>
@@ -253,8 +293,13 @@ namespace TemuKJD.WXForms.ShopForms
}
/// <summary>提交提现申请</summary>
private void btnSubmit_Click(object sender, EventArgs e)
private async void btnSubmit_Click(object sender, EventArgs e)
{
if (isSettlement == false)
{
BaseMsgForm.ShowError("请先结算后再选择提现!");
return;
}
decimal amountYuan = this.numAmount.Value;
if (amountYuan <= 0)
{
@@ -307,7 +352,7 @@ namespace TemuKJD.WXForms.ShopForms
this.numAmount.Value = 0;
this.qrCodeBase64 = "";
this.pictureBoxQr.Image = Properties.Resources.nopic;
RefreshAll();
Refresh();
}
catch (Exception ex)
{
@@ -338,6 +383,8 @@ namespace TemuKJD.WXForms.ShopForms
GetWithdrawals(ucSplitPage1.CurrentPage);
}
#endregion
}
class oemflowsStatistics
@@ -345,14 +392,14 @@ namespace TemuKJD.WXForms.ShopForms
/// <summary>
/// 当前可提现
/// </summary>
public long available_balance { get; set; }
public long AvailableBalance { get; set; }
/// <summary>
/// 历史累计返利
/// </summary>
public long total_rebate_amount { get; set; }
public long TotalRebateAmount { get; set; }
/// <summary>
/// 历史累计提现
/// </summary>
public long total_withdraw_amount { get; set; }
public long TotalWithdrawAmount { get; set; }
}
}
+10 -10
View File
@@ -690,13 +690,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
// File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat.zip"));
// }
//}
if (!FileBase.Exists("temp\\wxCat60808"))
if (!FileBase.Exists("temp\\wxCat60920"))
{
if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat60808.zip", "temp\\wxCat60808.dll" + ".bak"))
if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCat60920.zip", "temp\\wxCat60920.dll" + ".bak"))
{
FileBase.Move("temp\\wxCat60808.dll" + ".bak", "temp\\wxCat60808.zip");
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808.zip"));
FileBase.Move("temp\\wxCat60920.dll" + ".bak", "temp\\wxCat60920.zip");
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920.zip"));
}
}
//if (!FileBase.Exists("temp\\wxCatBound"))
@@ -708,13 +708,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
// File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound.zip"));
// }
//}
if (!FileBase.Exists("temp\\wxCatBound60810"))
if (!FileBase.Exists("temp\\wxCatBound60921"))
{
if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound60810.zip", "temp\\wxCatBound60810.dll" + ".bak"))
if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "wxCatBound60921.zip", "temp\\wxCatBound60921.dll" + ".bak"))
{
FileBase.Move("temp\\wxCatBound60810.dll" + ".bak", "temp\\wxCatBound60810.zip");
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60810.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60810.zip"));
FileBase.Move("temp\\wxCatBound60921.dll" + ".bak", "temp\\wxCatBound60921.zip");
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921.zip"), Path.Combine(Environment.CurrentDirectory, "temp"));
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921.zip"));
}
}