Compare commits
262
Commits
1ed9d72815
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6b8d3a83a | ||
|
|
65caf003aa | ||
|
|
00e0503dec | ||
|
|
4c4124f3ee | ||
|
|
a1e4ff1eea | ||
|
|
fe13744a9e | ||
|
|
42d2e23406 | ||
|
|
e785536152 | ||
|
|
5e453e2927 | ||
|
|
44553b43d1 | ||
|
|
171064f03f | ||
|
|
e3f4e34def | ||
|
|
9e10d29bfe | ||
|
|
8008dfb527 | ||
|
|
4ca9c082a1 | ||
|
|
5f08abec0f | ||
|
|
b8674a11c5 | ||
|
|
5ef326d19c | ||
|
|
2295b0df48 | ||
|
|
15b8288a98 | ||
|
|
d9e8011564 | ||
|
|
fb8e6a5479 | ||
|
|
c7cdf3ff88 | ||
|
|
82165f25a8 | ||
|
|
fe8f9851fe | ||
|
|
3d091462c5 | ||
|
|
78a64aa661 | ||
|
|
71614f64e4 | ||
|
|
04a8ba0472 | ||
|
|
a93ab77028 | ||
|
|
d17cb0f139 | ||
|
|
60db6f933d | ||
|
|
761e3f102f | ||
|
|
98531e0344 | ||
|
|
ee10fb5ea8 | ||
|
|
79b0027b7e | ||
|
|
344cbb4ac2 | ||
|
|
200e5bc8c8 | ||
|
|
4b554b55d9 | ||
|
|
dadbb67914 | ||
|
|
4e641928be | ||
|
|
4bbb46304d | ||
|
|
42ed8fc929 | ||
|
|
ba6da5e85f | ||
|
|
ec13db7cc1 | ||
|
|
a03f00fcdb | ||
|
|
942ca54dd8 | ||
|
|
6e8ff468f8 | ||
|
|
ac93305d5f | ||
|
|
5b9ed01fa1 | ||
|
|
9789a4686f | ||
|
|
1ee4c99647 | ||
|
|
8fc0e404c3 | ||
|
|
c4c54fc03e | ||
|
|
d43cf21afc | ||
|
|
7ac3c67242 | ||
|
|
72c85ca3f1 | ||
|
|
518365a0d3 | ||
|
|
27ac748f33 | ||
|
|
3483c99d37 | ||
|
|
a4bc9a788e | ||
|
|
8f7e190974 | ||
|
|
85259d8335 | ||
|
|
5777c30048 | ||
|
|
c40e591317 | ||
|
|
54986faa50 | ||
|
|
30808d56e8 | ||
|
|
679f6cc9e6 | ||
|
|
a5889085d4 | ||
|
|
6d3f9e4118 | ||
|
|
96214a54ea | ||
|
|
f167c2585d | ||
|
|
671ca453e0 | ||
|
|
da01c9f83f | ||
|
|
70996d5409 | ||
|
|
bf3b6487f0 | ||
|
|
be8c0bd1e2 | ||
|
|
cefea9dc1a | ||
|
|
430bf8d574 | ||
|
|
e08b4797cb | ||
|
|
679bd39144 | ||
|
|
1a5f40926b | ||
|
|
6029eda6de | ||
|
|
9545de7684 | ||
|
|
6b8557f8b2 | ||
|
|
4b34090cec | ||
|
|
d76cf5c342 | ||
|
|
d70b74ee4a | ||
|
|
1172670a7e | ||
|
|
be0be1866d | ||
|
|
a31b87b512 | ||
|
|
f89670877d | ||
|
|
a9f3ed81af | ||
|
|
5530b4be2d | ||
|
|
adc3649b59 | ||
|
|
2d788bd8b1 | ||
|
|
3dd65bdccc | ||
|
|
c79758f235 | ||
|
|
e01d9a4681 | ||
|
|
3f618707da | ||
|
|
8e581196af | ||
|
|
cb61749cda | ||
|
|
c1352264a9 | ||
|
|
61f0fc0edd | ||
|
|
279ca6e8e9 | ||
|
|
f8af5730d3 | ||
|
|
fe50ca114a | ||
|
|
fb7b623a9f | ||
|
|
39cf75fcbb | ||
|
|
26bf67265d | ||
|
|
37d879c3e5 | ||
|
|
fda30c824a | ||
|
|
19f48e9e6f | ||
|
|
e492457516 | ||
|
|
04584600c8 | ||
|
|
b466645640 | ||
|
|
2186281fb5 | ||
|
|
78d8f79089 | ||
|
|
526b009f5e | ||
|
|
13cb427d2f | ||
|
|
941f48c8b8 | ||
|
|
bcc934c1ba | ||
|
|
8e88e0f5d7 | ||
|
|
102af9a15c | ||
|
|
e1daca428c | ||
|
|
727ed7b8ec | ||
|
|
2cb616b50a | ||
|
|
f8e68a6322 | ||
|
|
7471b707f1 | ||
|
|
8ec1b63f8a | ||
|
|
a37744b284 | ||
|
|
3af9a8017a | ||
|
|
fc83308711 | ||
|
|
e63d6c896c | ||
|
|
3f3477d3f4 | ||
|
|
50a0668278 | ||
|
|
1803a4e5e9 | ||
|
|
6ed2cede16 | ||
|
|
2915056795 | ||
|
|
103b2a1a4a | ||
|
|
e02047ae57 | ||
|
|
a6e8e5b8cd | ||
|
|
12e9defdb5 | ||
|
|
f0f1f1ed9e | ||
|
|
1d5b6ba0e4 | ||
|
|
c7a87cac28 | ||
|
|
4d7fd2c157 | ||
|
|
9c62e0c03d | ||
|
|
483d87f57d | ||
|
|
b63dacfe7e | ||
|
|
c76e5c9663 | ||
|
|
3affb4a732 | ||
|
|
cf2efbcb16 | ||
|
|
af43e6aed5 | ||
|
|
0b94c43fab | ||
|
|
fd07c9ba40 | ||
|
|
221c0e6648 | ||
|
|
bf5a70597c | ||
|
|
6e5dfa92b8 | ||
|
|
f5c8baef9a | ||
|
|
324ca0c6e7 | ||
|
|
f6eef23f96 | ||
|
|
ddb23544c7 | ||
|
|
7380763c1d | ||
|
|
707efc1723 | ||
|
|
f722993c3d | ||
|
|
b7c682ef10 | ||
|
|
62e80d3c75 | ||
|
|
f7851320ba | ||
|
|
12fe0c26fb | ||
|
|
d36774ea18 | ||
|
|
fd0ff6771f | ||
|
|
e96871a87a | ||
|
|
e04e4e5108 | ||
|
|
06e6fe89bc | ||
|
|
c868460cd7 | ||
|
|
7eea26cdda | ||
|
|
e4b1a24ddb | ||
|
|
b74e4598a7 | ||
|
|
c999a80048 | ||
|
|
1b0aa81263 | ||
|
|
8e0cc20649 | ||
|
|
7982f7e348 | ||
|
|
17728c074c | ||
|
|
1d4867ebf2 | ||
|
|
eb6b1c5651 | ||
|
|
bbac29ac78 | ||
|
|
cf15ef194f | ||
|
|
a217a74868 | ||
|
|
3d86e986b0 | ||
|
|
aad92e8f8e | ||
|
|
d3488c98f5 | ||
|
|
fe87aece4e | ||
|
|
10bb0803d9 | ||
|
|
4ed7346aa8 | ||
|
|
7df2cc0957 | ||
|
|
a786ba6ce9 | ||
|
|
41b240c066 | ||
|
|
b6b4693c86 | ||
|
|
7c5f083784 | ||
|
|
52b1e9eb90 | ||
|
|
06e45bf587 | ||
|
|
bd3bde553b | ||
|
|
41b12d1284 | ||
|
|
f9dcae4610 | ||
|
|
dc136e449e | ||
|
|
1eb5315261 | ||
|
|
b827c6e118 | ||
|
|
2f9c98b105 | ||
|
|
1509e0a11d | ||
|
|
c83521f36d | ||
|
|
e00cf2d573 | ||
|
|
2465b38e65 | ||
|
|
abca4c996b | ||
|
|
ebccdbc28c | ||
|
|
b2d6d81e07 | ||
|
|
9cca38beff | ||
|
|
75aae91b66 | ||
|
|
e71ef72475 | ||
|
|
a89adafe61 | ||
|
|
9626bc8d8c | ||
|
|
e7d22984df | ||
|
|
912837a84b | ||
|
|
a81ba26de8 | ||
|
|
ea14ad3af4 | ||
|
|
e0dead1b6d | ||
|
|
18a4373918 | ||
|
|
4873b6cdd5 | ||
|
|
79ad130fde | ||
|
|
a27f6cb33c | ||
|
|
89299d3e3a | ||
|
|
84a484a568 | ||
|
|
0f850b8840 | ||
|
|
4a4d9d7dfb | ||
|
|
0244865ace | ||
|
|
c4363d0ac9 | ||
|
|
ade92facab | ||
|
|
41fa98dc2d | ||
|
|
6b36de2494 | ||
|
|
4e122fce6e | ||
|
|
5fb42e4d34 | ||
|
|
60b1088e55 | ||
|
|
064bd1f142 | ||
|
|
dd512a0dcb | ||
|
|
74e59b4892 | ||
|
|
a01e938055 | ||
|
|
66d4d67374 | ||
|
|
28c112794d | ||
|
|
b84ccc4670 | ||
|
|
e3c91177f6 | ||
|
|
77843a54f6 | ||
|
|
cc0904c728 | ||
|
|
10ae4c0cf9 | ||
|
|
eeee1affd3 | ||
|
|
a4802f4ba1 | ||
|
|
92fc8cf5b8 | ||
|
|
890c0a6a11 | ||
|
|
8d4d3157a2 | ||
|
|
87a0d34526 | ||
|
|
88846e401b | ||
|
|
9d0646805d | ||
|
|
da4f20ef3b |
No files matched your search
@@ -0,0 +1,63 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
###############################################################################
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set default behavior for command prompt diff.
|
||||||
|
#
|
||||||
|
# This is need for earlier builds of msysgit that does not have it on by
|
||||||
|
# default for csharp files.
|
||||||
|
# Note: This is only used by command line
|
||||||
|
###############################################################################
|
||||||
|
#*.cs diff=csharp
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set the merge driver for project and solution files
|
||||||
|
#
|
||||||
|
# Merging from the command prompt will add diff markers to the files if there
|
||||||
|
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||||
|
# the diff markers are never inserted). Diff markers may cause the following
|
||||||
|
# file extensions to fail to load in VS. An alternative would be to treat
|
||||||
|
# these files as binary and thus will always conflict and require user
|
||||||
|
# intervention with every merge. To do so, just uncomment the entries below
|
||||||
|
###############################################################################
|
||||||
|
#*.sln merge=binary
|
||||||
|
#*.csproj merge=binary
|
||||||
|
#*.vbproj merge=binary
|
||||||
|
#*.vcxproj merge=binary
|
||||||
|
#*.vcproj merge=binary
|
||||||
|
#*.dbproj merge=binary
|
||||||
|
#*.fsproj merge=binary
|
||||||
|
#*.lsproj merge=binary
|
||||||
|
#*.wixproj merge=binary
|
||||||
|
#*.modelproj merge=binary
|
||||||
|
#*.sqlproj merge=binary
|
||||||
|
#*.wwaproj merge=binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# behavior for image files
|
||||||
|
#
|
||||||
|
# image files are treated as binary by default.
|
||||||
|
###############################################################################
|
||||||
|
#*.jpg binary
|
||||||
|
#*.png binary
|
||||||
|
#*.gif binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# diff behavior for common document formats
|
||||||
|
#
|
||||||
|
# Convert binary document formats to text before diffing them. This feature
|
||||||
|
# is only available from the command line. Turn it on by uncommenting the
|
||||||
|
# entries below.
|
||||||
|
###############################################################################
|
||||||
|
#*.doc diff=astextplain
|
||||||
|
#*.DOC diff=astextplain
|
||||||
|
#*.docx diff=astextplain
|
||||||
|
#*.DOCX diff=astextplain
|
||||||
|
#*.dot diff=astextplain
|
||||||
|
#*.DOT diff=astextplain
|
||||||
|
#*.pdf diff=astextplain
|
||||||
|
#*.PDF diff=astextplain
|
||||||
|
#*.rtf diff=astextplain
|
||||||
|
#*.RTF diff=astextplain
|
||||||
@@ -25,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".test", ".test", "{14261B9B
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WXOrder.Test", "test\WXOrder.Test\WXOrder.Test.csproj", "{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WXOrder.Test", "test\WXOrder.Test\WXOrder.Test.csproj", "{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderSupportTicket", "OrderSupportTicket\OrderSupportTicket.csproj", "{22D31944-2087-437A-B374-C0874E9EC53A}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -117,6 +119,22 @@ Global
|
|||||||
{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x64.Build.0 = Release|Any CPU
|
{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x86.ActiveCfg = Release|Any CPU
|
{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x86.Build.0 = Release|Any CPU
|
{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{22D31944-2087-437A-B374-C0874E9EC53A}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\AllBase\29WxOrderAllBase.csproj" />
|
<ProjectReference Include="..\AllBase\29WxOrderAllBase.csproj" />
|
||||||
|
<ProjectReference Include="..\OrderSupportTicket\OrderSupportTicket.csproj" />
|
||||||
<ProjectReference Include="..\Work\29WxOrderWork.csproj" />
|
<ProjectReference Include="..\Work\29WxOrderWork.csproj" />
|
||||||
<ProjectReference Include="..\WxOrder.Framework\WxOrder.Framework.csproj" />
|
<ProjectReference Include="..\WxOrder.Framework\WxOrder.Framework.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -65,16 +67,26 @@
|
|||||||
<!-- 资源文件:SDK 样式工程默认不会把图片/图标作为 Resource,这里按原工程显式声明 -->
|
<!-- 资源文件:SDK 样式工程默认不会把图片/图标作为 Resource,这里按原工程显式声明 -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\**\*" />
|
<Resource Include="Resources\**\*" />
|
||||||
|
<None Remove="Ctrls\BuyerCtrls\Resources\pdd_afterorder.js" />
|
||||||
<None Remove="Ctrls\PDDInvoice\Resources\invoice.js" />
|
<None Remove="Ctrls\PDDInvoice\Resources\invoice.js" />
|
||||||
|
<None Remove="Ctrls\PDDInvoice\Resources\order.js" />
|
||||||
<Resource Include="29wx.ico" />
|
<Resource Include="29wx.ico" />
|
||||||
<Resource Include="29_common_icon.ico" />
|
<Resource Include="29_common_icon.ico" />
|
||||||
|
<Resource Include="Ctrls\BuyerCtrls\Resources\pdd_afterorder.js" />
|
||||||
<Resource Include="Ctrls\PDDInvoice\Resources\invoice.js" />
|
<Resource Include="Ctrls\PDDInvoice\Resources\invoice.js" />
|
||||||
|
<Resource Include="Ctrls\PDDInvoice\Resources\order.js" />
|
||||||
<Resource Include="gear.ico" />
|
<Resource Include="gear.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Update="Ctrls\BuyerCtrls\PddBuyOrderCtrl.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Views\ChangePickNoView.xaml.cs">
|
<Compile Update="Views\ChangePickNoView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Common\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net462</TargetFramework>
|
||||||
|
<RootNamespace>_29WxOrderWpf</RootNamespace>
|
||||||
|
<AssemblyName>29WxFindOrder</AssemblyName>
|
||||||
|
<UseWPF>true</UseWPF>
|
||||||
|
<ApplicationIcon>gear.ico</ApplicationIcon>
|
||||||
|
<LangVersion>12</LangVersion>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<OutputPath>..\bin\</OutputPath>
|
||||||
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>..\..\KJD Cef138\Bin\</OutputPath>
|
||||||
|
<DefineConstants>TRACE;RELEASE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="CefSharp.Common" Version="138.0.340" />
|
||||||
|
<PackageReference Include="CefSharp.Wpf" Version="138.0.340" />
|
||||||
|
<PackageReference Include="chromiumembeddedframework.runtime.win-x64" Version="138.0.34" />
|
||||||
|
<PackageReference Include="chromiumembeddedframework.runtime.win-x86" Version="138.0.34" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
||||||
|
<PackageReference Include="WPFCommon" Version="1.2.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="NaiBa.Util">
|
||||||
|
<HintPath>..\DllReference\NaiBa.Util.dll</HintPath>
|
||||||
|
<Private>true</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\AllBase\29WxOrderAllBase.csproj" />
|
||||||
|
<ProjectReference Include="..\OrderSupportTicket\OrderSupportTicket.csproj" />
|
||||||
|
<ProjectReference Include="..\Work\29WxOrderWork.csproj" />
|
||||||
|
<ProjectReference Include="..\WxOrder.Framework\WxOrder.Framework.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- 资源文件:SDK 样式工程默认不会把图片/图标作为 Resource,这里按原工程显式声明 -->
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\**\*" />
|
||||||
|
<None Remove="Ctrls\PDDInvoice\Resources\invoice.js" />
|
||||||
|
<None Remove="Ctrls\PDDInvoice\Resources\order.js" />
|
||||||
|
<Resource Include="29wx.ico" />
|
||||||
|
<Resource Include="29_common_icon.ico" />
|
||||||
|
<Resource Include="Ctrls\PDDInvoice\Resources\invoice.js" />
|
||||||
|
<Resource Include="Ctrls\PDDInvoice\Resources\order.js" />
|
||||||
|
<Resource Include="gear.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Ctrls\BuyerCtrls\PddBuyOrderCtrl.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\ChangePickNoView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Common\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -3,8 +3,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf"
|
xmlns:local="clr-namespace:_29WxOrderWpf">
|
||||||
StartupUri="MainWindow.xaml">
|
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<converters:HasValueToVisibilityConverter x:Key="hasValueToVisibilityConverter" />
|
<converters:HasValueToVisibilityConverter x:Key="hasValueToVisibilityConverter" />
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ namespace _29WxOrderWpf
|
|||||||
string str = GetExceptionMsg(ex, string.Empty);
|
string str = GetExceptionMsg(ex, string.Empty);
|
||||||
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
|
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
|
||||||
//BaseMsgForm.ShowError(str, "系统错误");
|
//BaseMsgForm.ShowError(str, "系统错误");
|
||||||
BaseMsgWindow.ShowError(str, "系统错误");
|
BaseMsgWindow.ShowError(str, "系统错误", null, MsgWindowLevel.LARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 初始化cef
|
#region 初始化cef
|
||||||
@@ -142,6 +142,8 @@ namespace _29WxOrderWpf
|
|||||||
Cef.Initialize(settings);
|
Cef.Initialize(settings);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
new MainWindow().Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
//static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
//static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
||||||
@@ -155,14 +157,14 @@ namespace _29WxOrderWpf
|
|||||||
{
|
{
|
||||||
string str = GetExceptionMsg(e.Exception, e.ToString());
|
string str = GetExceptionMsg(e.Exception, e.ToString());
|
||||||
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
|
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
|
||||||
BaseMsgWindow.ShowError(str, "系统错误");
|
BaseMsgWindow.ShowError(str, "系统错误", null, MsgWindowLevel.LARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
|
string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
|
||||||
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
|
NaiBa.Util.Helper.LogHelper.WriteWithTime("SystemError:" + str);
|
||||||
BaseMsgWindow.ShowError(str, "系统错误");
|
BaseMsgWindow.ShowError(str, "系统错误", null, MsgWindowLevel.LARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -188,7 +190,7 @@ namespace _29WxOrderWpf
|
|||||||
}
|
}
|
||||||
sb.AppendLine("***************************************************************");
|
sb.AppendLine("***************************************************************");
|
||||||
NaiBa.Util.Helper.LogHelper.WriteWithTime("Error:" + sb);
|
NaiBa.Util.Helper.LogHelper.WriteWithTime("Error:" + sb);
|
||||||
BaseMsgWindow.ShowError(sb.ToString(), "系统错误");
|
BaseMsgWindow.ShowError(sb.ToString(), "系统错误", null, MsgWindowLevel.LARGE);
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ namespace _29WxOrderWpf.BaseWindows
|
|||||||
MainWindow.Instance.borderMessage.BorderBrush = Application.Current.Resources["pageColorBrush"] as SolidColorBrush;
|
MainWindow.Instance.borderMessage.BorderBrush = Application.Current.Resources["pageColorBrush"] as SolidColorBrush;
|
||||||
MainWindow.Instance.tbMessage.Foreground = Application.Current.Resources["pageColorBrush"] as SolidColorBrush;
|
MainWindow.Instance.tbMessage.Foreground = Application.Current.Resources["pageColorBrush"] as SolidColorBrush;
|
||||||
}
|
}
|
||||||
if (type.ToLower() == "error")
|
if (type.ToLower() == "err" || type.ToLower() == "error")
|
||||||
{
|
{
|
||||||
MainWindow.Instance.borderMessage.BorderBrush = Application.Current.Resources["PageWarningBrush"] as SolidColorBrush;
|
MainWindow.Instance.borderMessage.BorderBrush = Application.Current.Resources["PageWarningBrush"] as SolidColorBrush;
|
||||||
MainWindow.Instance.tbMessage.Foreground = Application.Current.Resources["PageWarningBrush"] as SolidColorBrush;
|
MainWindow.Instance.tbMessage.Foreground = Application.Current.Resources["PageWarningBrush"] as SolidColorBrush;
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<Window
|
|
||||||
x:Class="_29WxOrderWpf.Common.DialogWindow"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Common"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
Title="{Binding Title}"
|
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
Background="#FFFFFF"
|
|
||||||
WindowStartupLocation="CenterOwner"
|
|
||||||
mc:Ignorable="d">
|
|
||||||
<Window.Resources>
|
|
||||||
<Style x:Key="DialogWindowStyle" TargetType="Window">
|
|
||||||
<Setter Property="Tag" Value="Default" />
|
|
||||||
<Setter Property="ResizeMode" Value="NoResize" />
|
|
||||||
<Setter Property="ShowInTaskbar" Value="False" />
|
|
||||||
<Setter Property="WindowChrome.GlassFrameThickness" Value="-1" />
|
|
||||||
</Style>
|
|
||||||
</Window.Resources>
|
|
||||||
<Grid />
|
|
||||||
</Window>
|
|
||||||
@@ -15,6 +15,9 @@ namespace _29WxOrderWpf.Converters
|
|||||||
{
|
{
|
||||||
ListBoxItem item = (ListBoxItem)value;
|
ListBoxItem item = (ListBoxItem)value;
|
||||||
ListBox listView = ItemsControl.ItemsControlFromItemContainer(item) as ListBox;
|
ListBox listView = ItemsControl.ItemsControlFromItemContainer(item) as ListBox;
|
||||||
|
if (listView == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
return listView.ItemContainerGenerator.IndexFromContainer(item) + 1;
|
return listView.ItemContainerGenerator.IndexFromContainer(item) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
BorderBrush="{StaticResource mainColorBrush}"
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
Checked="chkAutoReadBuyerOrder_CheckedChanged"
|
Checked="chkAutoReadBuyerOrder_CheckedChanged"
|
||||||
Content="自动读买手单"
|
Content="自动读多多买手单"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
IsChecked="true"
|
IsChecked="true"
|
||||||
Unchecked="chkAutoReadBuyerOrder_CheckedChanged" />
|
Unchecked="chkAutoReadBuyerOrder_CheckedChanged" />
|
||||||
@@ -98,9 +98,9 @@
|
|||||||
<Button
|
<Button
|
||||||
x:Name="btnNextBuyer"
|
x:Name="btnNextBuyer"
|
||||||
Grid.Column="8"
|
Grid.Column="8"
|
||||||
Padding="4,0"
|
|
||||||
Height="24"
|
Height="24"
|
||||||
Margin="4,0,0,0"
|
Margin="4,0,0,0"
|
||||||
|
Padding="4,0"
|
||||||
Click="btnNextBuyer_Click"
|
Click="btnNextBuyer_Click"
|
||||||
Content="下一个买手"
|
Content="下一个买手"
|
||||||
Style="{StaticResource BasePageButtonStyle}" />
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
@@ -273,7 +273,8 @@
|
|||||||
Margin="180,0,0,0"
|
Margin="180,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Panel.ZIndex="1"
|
Panel.ZIndex="1"
|
||||||
Content="正在操作:" />
|
d:Content="正在操作:"
|
||||||
|
Content="{Binding LblMsgStr}" />
|
||||||
|
|
||||||
<TabControl
|
<TabControl
|
||||||
x:Name="tabOrderType"
|
x:Name="tabOrderType"
|
||||||
@@ -363,6 +364,7 @@
|
|||||||
RowHeaderWidth="0"
|
RowHeaderWidth="0"
|
||||||
RowHeight="50"
|
RowHeight="50"
|
||||||
SelectionChanged="dgBuyerOrder_SelectionChanged"
|
SelectionChanged="dgBuyerOrder_SelectionChanged"
|
||||||
|
SelectionUnit="Cell"
|
||||||
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
@@ -381,7 +383,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.6*"
|
Width="0.6*"
|
||||||
Binding="{Binding WxSendTypeStr}"
|
Binding="{Binding WxSendTypeStr, Mode=OneWay}"
|
||||||
Header="是否直发">
|
Header="是否直发">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -393,7 +395,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.5*"
|
Width="1.5*"
|
||||||
Binding="{Binding order_sn}"
|
Binding="{Binding order_sn, Mode=OneWay}"
|
||||||
Header="拍单订单号">
|
Header="拍单订单号">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -405,7 +407,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.5*"
|
Width="1.5*"
|
||||||
Binding="{Binding ShopOrderIdStr}"
|
Binding="{Binding ShopOrderIdStr, Mode=OneWay}"
|
||||||
Header="店铺订单号">
|
Header="店铺订单号">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -417,7 +419,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding buyerName}"
|
Binding="{Binding buyerName, Mode=OneWay}"
|
||||||
Header="买手名称">
|
Header="买手名称">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -429,7 +431,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.8*"
|
Width="0.8*"
|
||||||
Binding="{Binding OrderTimeStr}"
|
Binding="{Binding OrderTimeStr, Mode=OneWay}"
|
||||||
Header="拍单时间">
|
Header="拍单时间">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -441,7 +443,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.8*"
|
Width="1.8*"
|
||||||
Binding="{Binding ProdInfoStr}"
|
Binding="{Binding ProdInfoStr, Mode=OneWay}"
|
||||||
Header="商品信息">
|
Header="商品信息">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -453,7 +455,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.8*"
|
Width="0.8*"
|
||||||
Binding="{Binding AmoutValue}"
|
Binding="{Binding AmoutValue, Mode=OneWay}"
|
||||||
Header="金额">
|
Header="金额">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -465,7 +467,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding order_status_prompt}"
|
Binding="{Binding order_status_prompt, Mode=OneWay}"
|
||||||
Header="订单状态">
|
Header="订单状态">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -477,7 +479,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding outExpressCompanyCode}"
|
Binding="{Binding outExpressCompanyCode, Mode=OneWay}"
|
||||||
Header="物流名称">
|
Header="物流名称">
|
||||||
<!-- outExpressCompanyName -->
|
<!-- outExpressCompanyName -->
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
@@ -490,7 +492,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding tracking_number}"
|
Binding="{Binding tracking_number, Mode=OneWay}"
|
||||||
Header="物流单号">
|
Header="物流单号">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -502,7 +504,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding sendStatus}"
|
Binding="{Binding sendStatus, Mode=OneWay}"
|
||||||
Header="订单信息">
|
Header="订单信息">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -532,7 +534,7 @@
|
|||||||
Click="btnSendBuyerOrder_Click"
|
Click="btnSendBuyerOrder_Click"
|
||||||
Content="发送"
|
Content="发送"
|
||||||
Foreground="{StaticResource PageLinkBrush}"
|
Foreground="{StaticResource PageLinkBrush}"
|
||||||
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}, Mode=OneWay}" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnSendDirectBuyerOrder"
|
x:Name="btnSendDirectBuyerOrder"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
@@ -545,7 +547,7 @@
|
|||||||
Click="btnSendBuyerOrder_Click"
|
Click="btnSendBuyerOrder_Click"
|
||||||
Content="发送"
|
Content="发送"
|
||||||
Foreground="{StaticResource PageLinkBrush}"
|
Foreground="{StaticResource PageLinkBrush}"
|
||||||
Visibility="{Binding WxSendTypeStr, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding WxSendTypeStr, Converter={StaticResource HasTextVisibility}, Mode=OneWay}" />
|
||||||
<!-- 直发单直发标注不为空 -->
|
<!-- 直发单直发标注不为空 -->
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -567,11 +569,12 @@
|
|||||||
LoadingRow="dgBuyerOrder_LoadingRow"
|
LoadingRow="dgBuyerOrder_LoadingRow"
|
||||||
RowHeaderWidth="0"
|
RowHeaderWidth="0"
|
||||||
RowHeight="50"
|
RowHeight="50"
|
||||||
|
SelectionUnit="Cell"
|
||||||
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="40"
|
Width="40"
|
||||||
Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}"
|
Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}, Mode=OneWay}"
|
||||||
CanUserSort="False"
|
CanUserSort="False"
|
||||||
Header="序列"
|
Header="序列"
|
||||||
IsReadOnly="True">
|
IsReadOnly="True">
|
||||||
@@ -585,7 +588,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.6*"
|
Width="0.6*"
|
||||||
Binding="{Binding WxSendTypeStr}"
|
Binding="{Binding WxSendTypeStr, Mode=OneWay}"
|
||||||
Header="是否直发">
|
Header="是否直发">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -597,7 +600,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.5*"
|
Width="1.5*"
|
||||||
Binding="{Binding afterSalesId}"
|
Binding="{Binding afterSalesId, Mode=OneWay}"
|
||||||
Header="售后单号">
|
Header="售后单号">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -609,7 +612,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.5*"
|
Width="1.5*"
|
||||||
Binding="{Binding orderSn}"
|
Binding="{Binding orderSn, Mode=OneWay}"
|
||||||
Header="拍单订单号">
|
Header="拍单订单号">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -621,7 +624,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.5*"
|
Width="1.5*"
|
||||||
Binding="{Binding ShopOrderIdStr}"
|
Binding="{Binding ShopOrderIdStr, Mode=OneWay}"
|
||||||
Header="店铺订单号">
|
Header="店铺订单号">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -633,7 +636,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding buyerName}"
|
Binding="{Binding buyerName, Mode=OneWay}"
|
||||||
Header="买手名称">
|
Header="买手名称">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -645,7 +648,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.8*"
|
Width="0.8*"
|
||||||
Binding="{Binding orderDate}"
|
Binding="{Binding orderDate, Mode=OneWay}"
|
||||||
Header="拍单日期">
|
Header="拍单日期">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -657,7 +660,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.8*"
|
Width="1.8*"
|
||||||
Binding="{Binding ProdInfoStr}"
|
Binding="{Binding ProdInfoStr, Mode=OneWay}"
|
||||||
Header="商品信息">
|
Header="商品信息">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -669,7 +672,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.8*"
|
Width="0.8*"
|
||||||
Binding="{Binding OrderAmountValue}"
|
Binding="{Binding OrderAmountValue, Mode=OneWay}"
|
||||||
Header="订单金额">
|
Header="订单金额">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -681,7 +684,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="0.8*"
|
Width="0.8*"
|
||||||
Binding="{Binding RefundAmountValue}"
|
Binding="{Binding RefundAmountValue, Mode=OneWay}"
|
||||||
Header="售后金额">
|
Header="售后金额">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -693,7 +696,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding AfterSaleStatusStr}"
|
Binding="{Binding AfterSaleStatusStr, Mode=OneWay}"
|
||||||
Header="售后状态">
|
Header="售后状态">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -705,7 +708,7 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1*"
|
Width="1*"
|
||||||
Binding="{Binding sendStatus}"
|
Binding="{Binding sendStatus, Mode=OneWay}"
|
||||||
Header="订单信息">
|
Header="订单信息">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@@ -720,7 +723,7 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Button Grid.Column="1" Grid.Row="2" x:Name="btnSendBuyerOrder" VerticalAlignment="Center" Background="Transparent" HorizontalAlignment="Center"
|
<Button Grid.Column="1" Grid.Row="2" x:Name="btnSendBuyerOrder" VerticalAlignment="Center" Background="Transparent" HorizontalAlignment="Center"
|
||||||
Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" Margin="4,0,0,0" Content="发送" Click="btnSendBuyerOrder_Click"
|
Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" Margin="4,0,0,0" Content="发送" Click="btnSendBuyerOrder_Click"
|
||||||
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}"></Button>
|
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}, Mode=OneWay}"></Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>-->
|
</DataGridTemplateColumn>-->
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,7 @@
|
|||||||
x:Class="_29WxOrderWpf.Ctrls.BuyerCtrls.PDDBuyerSelectCtrl"
|
x:Class="_29WxOrderWpf.Ctrls.BuyerCtrls.PDDBuyerSelectCtrl"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:c="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:c="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
@@ -18,14 +18,6 @@
|
|||||||
<ColumnDefinition Width="auto" />
|
<ColumnDefinition Width="auto" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image
|
|
||||||
Width="24"
|
|
||||||
Height="24"
|
|
||||||
Margin="4,0,0,0"
|
|
||||||
Cursor="Hand"
|
|
||||||
MouseLeftButtonUp="Image_MouseLeftButtonUp"
|
|
||||||
Source="{StaticResource imgBuyerOrder}" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wpf:SpacingStackPanel
|
<wpf:SpacingStackPanel
|
||||||
@@ -34,6 +26,26 @@
|
|||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
VerticalSpacing="2">
|
VerticalSpacing="2">
|
||||||
<WrapPanel x:Name="wpPddBuyer">
|
<WrapPanel x:Name="wpPddBuyer">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
Width="24"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseLeftButtonUp="Image_MouseLeftButtonUp"
|
||||||
|
Source="{StaticResource imgBuyerOrder}" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkPddBuyerLogin"
|
||||||
|
Margin="2,2,2,2"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
d:IsChecked="True"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Click="chkBuyerLogin_Click"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="True" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbPddBuyer"
|
x:Name="cmbPddBuyer"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -108,7 +120,27 @@
|
|||||||
<WrapPanel
|
<WrapPanel
|
||||||
x:Name="wpTaobaoBuyer"
|
x:Name="wpTaobaoBuyer"
|
||||||
d:Visibility="Visible"
|
d:Visibility="Visible"
|
||||||
Visibility="Collapsed">
|
Visibility="Visible">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
x:Name="imgTb"
|
||||||
|
Width="24"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseLeftButtonUp="imgTb_MouseLeftButtonUp"
|
||||||
|
Source="{StaticResource imgBuyerOrder}" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkTbBuyerLogin"
|
||||||
|
Margin="2,2,2,2"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Click="chkBuyerLogin_Click"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="False" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbTaobaoBuyer"
|
x:Name="cmbTaobaoBuyer"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -189,7 +221,8 @@
|
|||||||
c:DebugVisibility.Enable="True"
|
c:DebugVisibility.Enable="True"
|
||||||
d:Visibility="Visible"
|
d:Visibility="Visible"
|
||||||
Click="btnSwitch_Click"
|
Click="btnSwitch_Click"
|
||||||
Style="{StaticResource BasePageButtonStyle}">
|
Style="{StaticResource BasePageButtonStyle}"
|
||||||
|
Visibility="Collapsed">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="0,0,0,1"
|
Margin="0,0,0,1"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Common;
|
|
||||||
using _29WxOrderWpf.Ctrls.OrderCtrls;
|
using _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
using _29WxOrderWpf.ViewModels;
|
using _29WxOrderWpf.ViewModels;
|
||||||
using _29WxOrderWpf.Views;
|
using _29WxOrderWpf.Views;
|
||||||
@@ -25,6 +24,7 @@ using System.Windows.Shapes;
|
|||||||
using TemuKJD.ToolForms;
|
using TemuKJD.ToolForms;
|
||||||
using Work;
|
using Work;
|
||||||
using Work.BaseForms;
|
using Work.BaseForms;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||||
{
|
{
|
||||||
@@ -149,21 +149,50 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int buyZIndex = 2;
|
||||||
private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
if (wpPddBuyer.Visibility == Visibility.Visible)
|
if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||||
{
|
MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
if (MainWindow.Instance.gridPddBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||||
MainWindow.Instance.gridPddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||||
if (Panel.GetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl) < 1)
|
|
||||||
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, 1);
|
|
||||||
else
|
else
|
||||||
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, -1);
|
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||||
}
|
|
||||||
else
|
Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, buyZIndex++);
|
||||||
{
|
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, -1);
|
MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
}
|
|
||||||
|
//if (/*wpPddBuyer.Visibility == Visibility.Visible*/ chkPddBuyerLogin.IsChecked == true)
|
||||||
|
//{
|
||||||
|
// if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||||
|
// MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
// if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||||
|
// else
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||||
|
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, buyZIndex++);
|
||||||
|
// MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
// MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
//}
|
||||||
|
//else if (/*wpTaobaoBuyer.Visibility == Visibility.Visible*/ chkTbBuyerLogin.IsChecked == true)
|
||||||
|
//{
|
||||||
|
// if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||||
|
// MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
// if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||||
|
// else
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||||
|
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.tbBuyerOrderReadCtrl, buyZIndex++);
|
||||||
|
// MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
// MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,10 +206,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
|||||||
foreach (var order in GlobalConfig.lstOrder)
|
foreach (var order in GlobalConfig.lstOrder)
|
||||||
{
|
{
|
||||||
//OrderListCtrl.InitOrderObservableProp(order);
|
//OrderListCtrl.InitOrderObservableProp(order);
|
||||||
foreach (var orderItem in order.orderItems)
|
foreach (var orderItem in order.OrderItems)
|
||||||
{
|
{
|
||||||
orderItem.UpdateOrderItemBuyButton();
|
orderItem.UpdateOrderItemBuyButton();
|
||||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -192,10 +220,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
|||||||
foreach (var order in GlobalConfig.lstOrder)
|
foreach (var order in GlobalConfig.lstOrder)
|
||||||
{
|
{
|
||||||
//OrderListCtrl.InitOrderObservableProp(order);
|
//OrderListCtrl.InitOrderObservableProp(order);
|
||||||
foreach (var orderItem in order.orderItems)
|
foreach (var orderItem in order.OrderItems)
|
||||||
{
|
{
|
||||||
orderItem.UpdateOrderItemBuyButton();
|
orderItem.UpdateOrderItemBuyButton();
|
||||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -305,5 +332,62 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void chkBuyerLogin_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (sender == chkPddBuyerLogin)
|
||||||
|
{
|
||||||
|
chkPddBuyerLogin.IsChecked = true;
|
||||||
|
chkTbBuyerLogin.IsChecked = false;
|
||||||
|
|
||||||
|
GlobalConfig.CurrentBuyPlatform = "pdd";
|
||||||
|
foreach (var order in GlobalConfig.lstOrder)
|
||||||
|
{
|
||||||
|
//OrderListCtrl.InitOrderObservableProp(order);
|
||||||
|
foreach (var orderItem in order.OrderItems)
|
||||||
|
{
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
orderItem.UpdateOrderItemBuyButton();
|
||||||
|
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
chkPddBuyerLogin.IsChecked = false;
|
||||||
|
chkTbBuyerLogin.IsChecked = true;
|
||||||
|
|
||||||
|
GlobalConfig.CurrentBuyPlatform = "tb";
|
||||||
|
foreach (var order in GlobalConfig.lstOrder)
|
||||||
|
{
|
||||||
|
//OrderListCtrl.InitOrderObservableProp(order);
|
||||||
|
foreach (var orderItem in order.OrderItems)
|
||||||
|
{
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
orderItem.UpdateOrderItemBuyButton();
|
||||||
|
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void imgTb_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||||
|
MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||||
|
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||||
|
else
|
||||||
|
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||||
|
|
||||||
|
Panel.SetZIndex(MainWindow.Instance.tbBuyerOrderReadCtrl, buyZIndex++);
|
||||||
|
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,735 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="_29WxOrderWpf.Ctrls.BuyerCtrls.PDDMultiBuyerOrderReadCtrl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
x:Name="pddMultiBuyerOrderReadCtrl"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="1000"
|
||||||
|
Loaded="UserControl_Loaded"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Border
|
||||||
|
Background="White"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1,1,0,1"
|
||||||
|
CornerRadius="5,0,0,5">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="40" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Button
|
||||||
|
x:Name="btnHideAll"
|
||||||
|
Grid.Row="1"
|
||||||
|
Width="25"
|
||||||
|
Height="60"
|
||||||
|
Margin="-20,0,0,20"
|
||||||
|
HorizontalAlignment="left"
|
||||||
|
Click="btnHideAll_Click"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}">
|
||||||
|
<TextBlock Margin="0,0,5,0">
|
||||||
|
关<LineBreak />
|
||||||
|
闭</TextBlock>
|
||||||
|
</Button>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Margin="12,0,4,0"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseLeftButtonUp="btnHideAll_Click"
|
||||||
|
Source="{StaticResource imgCloseGray}"
|
||||||
|
Visibility="Collapsed" />
|
||||||
|
<WrapPanel Grid.Column="1" VerticalAlignment="Center">
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkAutoReadBuyerOrder"
|
||||||
|
Margin="6,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Checked="chkAutoReadBuyerOrder_CheckedChanged"
|
||||||
|
Content="自动读多多买手单"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="true"
|
||||||
|
Unchecked="chkAutoReadBuyerOrder_CheckedChanged" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkHideNoWxIdOrder"
|
||||||
|
Margin="6,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Checked="chkHideNoWxIdOrder_CheckedChanged"
|
||||||
|
Content="隐藏无微信订单的买手单"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="True"
|
||||||
|
Unchecked="chkHideNoWxIdOrder_CheckedChanged" />
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkAutoAfterSale"
|
||||||
|
Margin="6,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Checked="chkAutoAfterSale_Checked"
|
||||||
|
Content="未发货订单自动售后"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="True"
|
||||||
|
Unchecked="chkAutoAfterSale_Checked"
|
||||||
|
Visibility="Visible" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnSearch"
|
||||||
|
Grid.Column="8"
|
||||||
|
Width="118"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Click="btnSearch_Click"
|
||||||
|
Content="刷新订单"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnNextBuyer"
|
||||||
|
Grid.Column="8"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Padding="4,0"
|
||||||
|
Click="btnNextBuyer_Click"
|
||||||
|
Content="下一个买手"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtFilter"
|
||||||
|
Grid.Column="2"
|
||||||
|
Height="28"
|
||||||
|
Margin="28,0,8,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
TextChanged="txtFilter_TextChanged" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnFilter"
|
||||||
|
Grid.Column="3"
|
||||||
|
Width="50"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,8,0"
|
||||||
|
Click="btnFilter_Click"
|
||||||
|
Content="过滤"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
|
<Grid
|
||||||
|
x:Name="GridCef"
|
||||||
|
Grid.Row="1"
|
||||||
|
Background="LightGray" />
|
||||||
|
<Grid
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="2,2,0,334"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border
|
||||||
|
x:Name="borderPddBuyer"
|
||||||
|
Width="138"
|
||||||
|
Background="White"
|
||||||
|
CornerRadius="0,4,4,0">
|
||||||
|
<Grid>
|
||||||
|
<ListBox x:Name="lbPddBuyer">
|
||||||
|
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<ContentPresenter
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<!--<local:ShopListRowCtrl></local:ShopListRowCtrl>-->
|
||||||
|
<Border
|
||||||
|
MinHeight="50"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
BorderBrush="{StaticResource ListRowBorderColorBrush}"
|
||||||
|
BorderThickness="0,0,0,1"
|
||||||
|
CornerRadius="0">
|
||||||
|
<Border.Style>
|
||||||
|
<!-- 鼠标进入或悬停Border时切换颜色(悬停时Border的填充控件必须有填充Border,所在层级不限,仅填充透明Grid则触发器无效) -->
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{StaticResource ListRowHoverBackColorBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
|
||||||
|
<Grid x:Name="gridListItem">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition x:Name="colCheck" Width="25*" />
|
||||||
|
<ColumnDefinition x:Name="colBuyerName" Width="100*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<CheckBox
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
Click="CheckBox_Click"
|
||||||
|
IsChecked="{Binding IsSelect, Mode=TwoWay}" />
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyerNick"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Cursor="Hand"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Loaded="txtBuyerNick_Loaded"
|
||||||
|
Text="{Binding buyer_nick}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="60"
|
||||||
|
Margin="-2,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="-1"
|
||||||
|
Background="{StaticResource pageColorBrush}"
|
||||||
|
CornerRadius="0,5,5,0"
|
||||||
|
Cursor="Hand">
|
||||||
|
<Button
|
||||||
|
x:Name="btnHideBuyer"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="20"
|
||||||
|
Height="60"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0,0,0,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Click="btnHideBuyer_Click"
|
||||||
|
Content="◀"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<Grid
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="0"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Background="Transparent"
|
||||||
|
Visibility="Visible">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="btnHide"
|
||||||
|
Width="60"
|
||||||
|
Height="25"
|
||||||
|
Margin="0,0,0,-10"
|
||||||
|
Padding="0,2,0,0"
|
||||||
|
VerticalContentAlignment="top"
|
||||||
|
Click="btnHide_Click"
|
||||||
|
Content="▼"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
<Grid
|
||||||
|
x:Name="gridTable"
|
||||||
|
Grid.Row="1"
|
||||||
|
Height="330"
|
||||||
|
Margin="2"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Background="White"
|
||||||
|
Visibility="Visible">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="40" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label
|
||||||
|
x:Name="lblMsg"
|
||||||
|
Margin="180,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="1"
|
||||||
|
Content="正在操作:" />
|
||||||
|
|
||||||
|
<TabControl
|
||||||
|
x:Name="tabOrderType"
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="0,-32,0,1"
|
||||||
|
VerticalAlignment="Stretch">
|
||||||
|
<TabControl.Resources>
|
||||||
|
<Style TargetType="{x:Type TabControl}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type TabControl}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border
|
||||||
|
Grid.Row="1"
|
||||||
|
MinHeight="4"
|
||||||
|
Background="#f8f8f9"
|
||||||
|
BorderBrush="#e0e0e0"
|
||||||
|
BorderThickness="1,1,1,0"
|
||||||
|
CornerRadius="0,4,0,0">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" />
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Background="#e8e8e9"
|
||||||
|
BorderBrush="#e1e1e1"
|
||||||
|
BorderThickness="1,1,1,0"
|
||||||
|
CornerRadius="4,4,0,0">
|
||||||
|
<TabPanel
|
||||||
|
x:Name="HeaderPanel"
|
||||||
|
Background="Transparent"
|
||||||
|
IsItemsHost="True" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="TabItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TabItem">
|
||||||
|
<Border
|
||||||
|
Name="Border"
|
||||||
|
Margin="-1,-2,-1,0"
|
||||||
|
BorderThickness="1,1,1,0"
|
||||||
|
CornerRadius="4,4,0,0">
|
||||||
|
<ContentPresenter
|
||||||
|
x:Name="ContentSite"
|
||||||
|
Margin="10,5"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
ContentSource="Header" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="#f8f8f9" />
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="#e0e0e0" />
|
||||||
|
<Setter TargetName="Border" Property="Margin" Value="-1,-3,-1,-1" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource pageColorBrush}" />
|
||||||
|
<Setter Property="Panel.ZIndex" Value="100" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="False">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Foreground" Value="#999999" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</TabControl.Resources>
|
||||||
|
<TabItem Header="买手订单">
|
||||||
|
<DataGrid
|
||||||
|
x:Name="dgBuyerOrder"
|
||||||
|
Grid.Row="1"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserAddRows="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
ColumnHeaderHeight="30"
|
||||||
|
HorizontalGridLinesBrush="{StaticResource HorizontalGridLinesBrush}"
|
||||||
|
LoadingRow="dgBuyerOrder_LoadingRow"
|
||||||
|
RowHeaderWidth="0"
|
||||||
|
RowHeight="50"
|
||||||
|
SelectionChanged="dgBuyerOrder_SelectionChanged"
|
||||||
|
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="40"
|
||||||
|
Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}"
|
||||||
|
CanUserSort="False"
|
||||||
|
Header="序列"
|
||||||
|
IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.6*"
|
||||||
|
Binding="{Binding WxSendTypeStr}"
|
||||||
|
Header="是否直发">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding order_sn}"
|
||||||
|
Header="拍单订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding ShopOrderIdStr}"
|
||||||
|
Header="店铺订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding buyerName}"
|
||||||
|
Header="买手名称">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding OrderTimeStr}"
|
||||||
|
Header="拍单时间">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.8*"
|
||||||
|
Binding="{Binding ProdInfoStr}"
|
||||||
|
Header="商品信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding AmoutValue}"
|
||||||
|
Header="金额">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding order_status_prompt}"
|
||||||
|
Header="订单状态">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding outExpressCompanyCode}"
|
||||||
|
Header="物流名称">
|
||||||
|
<!-- outExpressCompanyName -->
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding tracking_number}"
|
||||||
|
Header="物流单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding sendStatus}"
|
||||||
|
Header="订单信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTemplateColumn
|
||||||
|
x:Name="colSendBuyerOrder"
|
||||||
|
Width="0.6*"
|
||||||
|
Header="手动发送">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="btnSendBuyerOrder"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
Click="btnSendBuyerOrder_Click"
|
||||||
|
Content="发送"
|
||||||
|
Foreground="{StaticResource PageLinkBrush}"
|
||||||
|
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnSendDirectBuyerOrder"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
Click="btnSendBuyerOrder_Click"
|
||||||
|
Content="发送"
|
||||||
|
Foreground="{StaticResource PageLinkBrush}"
|
||||||
|
Visibility="{Binding WxSendTypeStr, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<!-- 直发单直发标注不为空 -->
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="买手售后">
|
||||||
|
|
||||||
|
<DataGrid
|
||||||
|
x:Name="dgBuyerAfterSale"
|
||||||
|
Grid.Row="1"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserAddRows="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
ColumnHeaderHeight="30"
|
||||||
|
HorizontalGridLinesBrush="{StaticResource HorizontalGridLinesBrush}"
|
||||||
|
LoadingRow="dgBuyerOrder_LoadingRow"
|
||||||
|
RowHeaderWidth="0"
|
||||||
|
RowHeight="50"
|
||||||
|
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="40"
|
||||||
|
Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}"
|
||||||
|
CanUserSort="False"
|
||||||
|
Header="序列"
|
||||||
|
IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.6*"
|
||||||
|
Binding="{Binding WxSendTypeStr}"
|
||||||
|
Header="是否直发">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding afterSalesId}"
|
||||||
|
Header="售后单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding orderSn}"
|
||||||
|
Header="拍单订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding ShopOrderIdStr}"
|
||||||
|
Header="店铺订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding buyerName}"
|
||||||
|
Header="买手名称">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding orderDate}"
|
||||||
|
Header="拍单日期">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.8*"
|
||||||
|
Binding="{Binding ProdInfoStr}"
|
||||||
|
Header="商品信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding OrderAmountValue}"
|
||||||
|
Header="订单金额">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding RefundAmountValue}"
|
||||||
|
Header="售后金额">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding AfterSaleStatusStr}"
|
||||||
|
Header="售后状态">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding sendStatus}"
|
||||||
|
Header="订单信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<!--<DataGridTemplateColumn Width="0.6*" Header="手动发送" x:Name="colSendBuyerOrderAfterSale" >
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Grid.Column="1" Grid.Row="2" x:Name="btnSendBuyerOrder" VerticalAlignment="Center" Background="Transparent" HorizontalAlignment="Center"
|
||||||
|
Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" Margin="4,0,0,0" Content="发送" Click="btnSendBuyerOrder_Click"
|
||||||
|
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}"></Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>-->
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,598 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="_29WxOrderWpf.Ctrls.BuyerCtrls.PddBuyOrderCtrl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
|
||||||
|
xmlns:wpf="WPFCommon"
|
||||||
|
x:Name="pddBuyOrderCtrl"
|
||||||
|
Width="1360"
|
||||||
|
Height="768"
|
||||||
|
MinWidth="800"
|
||||||
|
MinHeight="600"
|
||||||
|
d:Height="800"
|
||||||
|
Loaded="pddBuyOrderCtrl_Loaded"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<BooleanToVisibilityConverter x:Key="BoolToVis" />
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource TitleContentBaseStyle}" TargetType="wpf:TitleContent">
|
||||||
|
<Setter Property="Placement" Value="Left" />
|
||||||
|
<Setter Property="TitleVerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="LeftTitlePadding" Value="0,0,0,0" />
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="wpf:SpacingStackPanel">
|
||||||
|
<Setter Property="Margin" Value="3,0" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid Background="White">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- 地址栏 -->
|
||||||
|
<Border
|
||||||
|
Grid.Row="0"
|
||||||
|
Background="White"
|
||||||
|
BorderBrush="#E0E0E0"
|
||||||
|
BorderThickness="0,0,0,1">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtAddress"
|
||||||
|
Margin="3,2"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
BorderBrush="#D0D0D0"
|
||||||
|
BorderThickness="1"
|
||||||
|
KeyDown="txtAddress_KeyDown"
|
||||||
|
Text="{Binding Address, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 主区域:浏览器 -->
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="500" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- 浏览器容器 -->
|
||||||
|
<Grid
|
||||||
|
x:Name="BrowserHost"
|
||||||
|
Grid.Column="0"
|
||||||
|
Background="White"
|
||||||
|
ClipToBounds="True">
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,-140,0,0"
|
||||||
|
Padding="30,20"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="99"
|
||||||
|
d:Text="ErrorMsg"
|
||||||
|
Background="#C0FFFFFF"
|
||||||
|
FontSize="20"
|
||||||
|
Foreground="Red"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
Text="{Binding ErrorMsg}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Visibility="{Binding ErrorMsg, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="30,20"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="99"
|
||||||
|
d:Text="TransitErrorMsg"
|
||||||
|
Background="#C0FFFFFF"
|
||||||
|
FontSize="20"
|
||||||
|
Foreground="Red"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
Text="{Binding TransitErrorMsg}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Visibility="{Binding TransitErrorMsg, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
</Grid>
|
||||||
|
<GridSplitter
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="5"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="#d0d0d0"
|
||||||
|
ResizeBehavior="PreviousAndNext"
|
||||||
|
ShowsPreview="True" />
|
||||||
|
|
||||||
|
<Grid Grid.Column="2">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Grid.Row="0"
|
||||||
|
Margin="4"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Image
|
||||||
|
x:Name="imgOrderItem"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="0"
|
||||||
|
Width="100"
|
||||||
|
Height="100"
|
||||||
|
Margin="0,4,8,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Panel.ZIndex="1"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseDown="imgOrderItem_MouseDown"
|
||||||
|
Source="{Binding Img}" />
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Width="250"
|
||||||
|
Margin="4"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4">
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkDirectOrder"
|
||||||
|
Margin="0,0,0,8"
|
||||||
|
d:IsChecked="True"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Content="保存地址时替换为云仓地址"
|
||||||
|
FontSize="12" />
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="店铺名称:"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="85">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="订单编号:"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="85">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtOrderId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtOrderIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<TextBlock FontSize="14" FontWeight="Bold">店铺商品信息:</TextBlock>
|
||||||
|
<wpf:TitleContent
|
||||||
|
x:Name="tcShopGoodsName"
|
||||||
|
Title="店铺标题:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="85">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopGoodsName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopGoodsNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="店铺规格:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopSpecName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopSpecNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="店铺商品ID:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopGoodsId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopGoodsIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="店铺SKUID:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopSkuId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopSkuIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="平台商品编码:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtSpuCode"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtSpuCodeVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="平台SKU编码:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtSkuCode"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtSkuCodeVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.04*" />
|
||||||
|
<ColumnDefinition Width="0.96*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="数量:"
|
||||||
|
Grid.Column="0"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopOrderItemCnt"
|
||||||
|
Height="22"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
FontSize="15"
|
||||||
|
FontWeight="bold"
|
||||||
|
Foreground="Red"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopOrderItemCntVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title=" 总价:"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
TitleHorizontalAlignment="Right">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopOrderItemPrice"
|
||||||
|
Height="22"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
FontSize="15"
|
||||||
|
FontWeight="bold"
|
||||||
|
Foreground="Red"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtShopOrderItemPriceVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Grid.Row="0"
|
||||||
|
Margin="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4"
|
||||||
|
Visibility="{Binding BuyInfoVisivility}">
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,4,0,0"
|
||||||
|
FontSize="14"
|
||||||
|
FontWeight="Bold">
|
||||||
|
买手拍单信息:
|
||||||
|
</TextBlock>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="商品标题:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyGoodsName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuyGoodsNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="规格名称:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuySkuName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuySkuNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="拍单商品ID:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyGoodsId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuyGoodsIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="拍单SKUID:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuySkuId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuySkuIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.04*" />
|
||||||
|
<ColumnDefinition Width="0.96*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="拍单数量:"
|
||||||
|
Grid.Column="0"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyCnt"
|
||||||
|
Height="22"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
FontSize="15"
|
||||||
|
FontWeight="bold"
|
||||||
|
Foreground="Red"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuyCntVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="拍单总价:"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
TitleHorizontalAlignment="Right">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyPrice"
|
||||||
|
Height="22"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
FontSize="15"
|
||||||
|
FontWeight="bold"
|
||||||
|
Foreground="Red"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuyPriceVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
</Grid>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="拍单订单号:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyOrderId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuyOrderIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="溯源码:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtSourceCode"
|
||||||
|
Height="20"
|
||||||
|
Background="#DDDDDD"
|
||||||
|
BorderBrush="#999999"
|
||||||
|
IsEnabled="False"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtSourceCodeVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
|
||||||
|
<wpf:TitleContent
|
||||||
|
x:Name="tcBuyAddress"
|
||||||
|
Title="中转地址:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyTransitWarehouse"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtBuyTransitWarehouseVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<Grid>
|
||||||
|
<Button
|
||||||
|
x:Name="btnReMap"
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="48"
|
||||||
|
Margin="0"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Command="{Binding ReMapCommand}"
|
||||||
|
Content="重新关联商品"
|
||||||
|
FontSize="12"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnCopyCurrentFullAddress"
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="48"
|
||||||
|
Margin="85,0,0,0"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Command="{Binding CopyCurrentFullAddressCommand}"
|
||||||
|
Content="复制完整中转地址"
|
||||||
|
FontSize="12"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding CurrentFullTransitAddress, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnManualUpdateBuyOrder"
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="48"
|
||||||
|
Margin="0"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Command="{Binding ManualUpdateBuyOrderCommand}"
|
||||||
|
Content="手动确认拍单"
|
||||||
|
FontSize="12"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="4"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4"
|
||||||
|
Visibility="{Binding MapInfoVisivility}">
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,4,0,0"
|
||||||
|
FontSize="14"
|
||||||
|
FontWeight="Bold">
|
||||||
|
关联商品信息:
|
||||||
|
</TextBlock>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="商品标题:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtMapGoodsName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtMapGoodsNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="规格名称:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtMapSkuName"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtMapSkuNameVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="关联商品ID:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtMapGoodsId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtMapGoodsIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="关联SKUID:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtMapSkuId"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtMapSkuIdVal}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="发货地:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtSendProvince"
|
||||||
|
Height="20"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
Text="{Binding txtSendProvinceVal}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnManualUpdateSendProvince"
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="48"
|
||||||
|
Margin="3,0,0,0"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
d:Opacity="0.5"
|
||||||
|
Content="手动更新发货地"
|
||||||
|
FontSize="12"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="中转仓:"
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<ComboBox
|
||||||
|
x:Name="cmbTransitWarehouse"
|
||||||
|
Height="22"
|
||||||
|
SelectedIndex="0"
|
||||||
|
SelectedValue="{Binding cmbTransitWarehouseVal}"
|
||||||
|
SelectionChanged="cmbTransitWarehouse_SelectionChanged"
|
||||||
|
Style="{StaticResource RoundedComboBox}">
|
||||||
|
<!--<ComboBoxItem Content="仓库地址" />-->
|
||||||
|
</ComboBox>
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title=""
|
||||||
|
TitleHorizontalAlignment="Right"
|
||||||
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
|
<Button
|
||||||
|
x:Name="btnManualUpdateTransitWarehouse"
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="48"
|
||||||
|
Margin="0"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Command="{Binding UpdateTransitWarehouseCommand}"
|
||||||
|
Content="确认商品关联"
|
||||||
|
FontSize="12"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
using _29WxOrderWpf.ViewModels;
|
||||||
|
using AllBase.Model.DBModel;
|
||||||
|
using CefSharp.Wpf;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PddBuyOrderCtrl.xaml 的交互逻辑
|
||||||
|
/// </summary>
|
||||||
|
public partial class PddBuyOrderCtrl : UserControl
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>视图模型</summary>
|
||||||
|
public PddBuyOrderViewModel ViewModel { get; }
|
||||||
|
|
||||||
|
public PddBuyOrderCtrl(BuyerLoginInfo buyerInfo, oms_wei_order_item_info orderItemInfo)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
|
||||||
|
{
|
||||||
|
this.cmbTransitWarehouse.Items.Add(warehouse.TransName + " " + warehouse.TransFullAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewModel = new PddBuyOrderViewModel(buyerInfo, orderItemInfo);
|
||||||
|
ViewModel.BrowserCreated += ViewModel_BrowserCreated;
|
||||||
|
ViewModel.RequestClose += ViewModel_RequestClose;
|
||||||
|
DataContext = ViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void pddBuyOrderCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
//btnManualUpdateSendProvince.Visibility = Visibility.Collapsed;
|
||||||
|
if (this.ViewModel.BuyType == "direct")
|
||||||
|
{
|
||||||
|
this.tcBuyAddress.Title = "拍单地址:";
|
||||||
|
}
|
||||||
|
|
||||||
|
await ViewModel.Start();
|
||||||
|
}
|
||||||
|
private void ViewModel_BrowserCreated(ChromiumWebBrowser browser)
|
||||||
|
{
|
||||||
|
Grid.SetRow(browser, 0);
|
||||||
|
Grid.SetColumn(browser, 0);
|
||||||
|
BrowserHost.Children.Add(browser);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ViewModel_RequestClose()
|
||||||
|
{
|
||||||
|
Window parentWindow = Window.GetWindow(this);
|
||||||
|
if (this.IsLoaded && parentWindow != null)
|
||||||
|
parentWindow.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtAddress_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Key == Key.Enter)
|
||||||
|
{
|
||||||
|
ViewModel.ReloadCommand.Execute(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cmbTransitWarehouse_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void imgOrderItem_MouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (imgOrderItem.Width == 100)
|
||||||
|
{
|
||||||
|
imgOrderItem.Width = 500;
|
||||||
|
imgOrderItem.Height = 500;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
imgOrderItem.Width = 100;
|
||||||
|
imgOrderItem.Height = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -12,6 +12,7 @@
|
|||||||
Height="768"
|
Height="768"
|
||||||
MinWidth="800"
|
MinWidth="800"
|
||||||
MinHeight="600"
|
MinHeight="600"
|
||||||
|
d:Height="800"
|
||||||
Loaded="taobaoBuyOrderCtrl_Loaded"
|
Loaded="taobaoBuyOrderCtrl_Loaded"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
@@ -62,7 +63,36 @@
|
|||||||
x:Name="BrowserHost"
|
x:Name="BrowserHost"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Background="White"
|
Background="White"
|
||||||
ClipToBounds="True" />
|
ClipToBounds="True">
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,-140,0,0"
|
||||||
|
Padding="30,20"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="99"
|
||||||
|
d:Text="ErrorMsg"
|
||||||
|
Background="#C0FFFFFF"
|
||||||
|
FontSize="20"
|
||||||
|
Foreground="Red"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
Text="{Binding ErrorMsg}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Visibility="{Binding ErrorMsg, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="30,20"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="99"
|
||||||
|
d:Text="TransitErrorMsg"
|
||||||
|
Background="#C0FFFFFF"
|
||||||
|
FontSize="20"
|
||||||
|
Foreground="Red"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
Text="{Binding TransitErrorMsg}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Visibility="{Binding TransitErrorMsg, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
</Grid>
|
||||||
<GridSplitter
|
<GridSplitter
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="5"
|
Width="5"
|
||||||
@@ -84,6 +114,18 @@
|
|||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
VerticalSpacing="4">
|
VerticalSpacing="4">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
x:Name="imgOrderItem"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="0"
|
||||||
|
Width="100"
|
||||||
|
Height="100"
|
||||||
|
Margin="0,2,8,2"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseDown="imgOrderItem_MouseDown"
|
||||||
|
Source="{Binding Img}" />
|
||||||
|
|
||||||
<TextBlock FontSize="14" FontWeight="Bold">店铺商品信息:</TextBlock>
|
<TextBlock FontSize="14" FontWeight="Bold">店铺商品信息:</TextBlock>
|
||||||
<wpf:TitleContent
|
<wpf:TitleContent
|
||||||
x:Name="tcShopGoodsName"
|
x:Name="tcShopGoodsName"
|
||||||
@@ -323,6 +365,7 @@
|
|||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<wpf:TitleContent
|
<wpf:TitleContent
|
||||||
|
x:Name="tcBuyAddress"
|
||||||
Title="中转地址:"
|
Title="中转地址:"
|
||||||
TitleHorizontalAlignment="Right"
|
TitleHorizontalAlignment="Right"
|
||||||
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
@@ -347,6 +390,19 @@
|
|||||||
Content="重新关联商品"
|
Content="重新关联商品"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}" />
|
Style="{StaticResource BasePageButtonLightStyle}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnCopyCurrentFullAddress"
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="48"
|
||||||
|
Margin="85,0,0,0"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Command="{Binding CopyCurrentFullAddressCommand}"
|
||||||
|
Content="复制完整中转地址"
|
||||||
|
FontSize="12"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding CurrentFullTransitAddress, Converter={StaticResource HasTextVisibility}}" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnManualUpdateBuyOrder"
|
x:Name="btnManualUpdateBuyOrder"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -360,6 +416,18 @@
|
|||||||
FontSize="12"
|
FontSize="12"
|
||||||
Style="{StaticResource BasePageButtonStyle}" />
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<TextBlock
|
||||||
|
Width="auto"
|
||||||
|
Padding="0,3"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="99"
|
||||||
|
Background="#C0FFFFFF"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="#EE0000"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
Text=" 淘宝网页跳转速度较慢,请耐心等待"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</wpf:SpacingStackPanel>
|
</wpf:SpacingStackPanel>
|
||||||
</wpf:SpacingStackPanel>
|
</wpf:SpacingStackPanel>
|
||||||
|
|
||||||
@@ -429,10 +497,13 @@
|
|||||||
TitleHorizontalAlignment="Right"
|
TitleHorizontalAlignment="Right"
|
||||||
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtSendProvince"
|
x:Name="txtSendProvince"
|
||||||
Height="20"
|
Height="20"
|
||||||
Margin="0,0,96,0"
|
|
||||||
BorderBrush="{StaticResource pageColorBrush}"
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
@@ -442,9 +513,10 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Height="20"
|
Height="20"
|
||||||
MinWidth="48"
|
MinWidth="48"
|
||||||
Margin="0"
|
Margin="3,0,0,0"
|
||||||
Padding="4,0"
|
Padding="4,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
|
d:Opacity="0.5"
|
||||||
Content="手动更新发货地"
|
Content="手动更新发货地"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Style="{StaticResource BasePageButtonStyle}" />
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public partial class TaobaoBuyOrderCtrl : UserControl
|
|||||||
|
|
||||||
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
|
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
|
||||||
{
|
{
|
||||||
this.cmbTransitWarehouse.Items.Add(warehouse.TransName + " " + warehouse.TransDetailAddress);
|
this.cmbTransitWarehouse.Items.Add(warehouse.TransName + " " + warehouse.TransFullAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewModel = new TaobaoBuyOrderViewModel(buyerInfo, orderItemInfo);
|
ViewModel = new TaobaoBuyOrderViewModel(buyerInfo, orderItemInfo);
|
||||||
@@ -44,8 +44,25 @@ public partial class TaobaoBuyOrderCtrl : UserControl
|
|||||||
|
|
||||||
private async void taobaoBuyOrderCtrl_Loaded(object sender, RoutedEventArgs e)
|
private async void taobaoBuyOrderCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
btnManualUpdateSendProvince.Visibility = Visibility.Collapsed;
|
||||||
|
if (this.ViewModel.BuyType == "direct")
|
||||||
|
{
|
||||||
|
this.tcBuyAddress.Title = "拍单地址:";
|
||||||
|
}
|
||||||
|
Window parentWindow = Window.GetWindow(this);
|
||||||
|
if (this.IsLoaded && parentWindow != null)
|
||||||
|
{
|
||||||
|
parentWindow.Closed += ParentWindow_Closed;
|
||||||
|
}
|
||||||
|
|
||||||
await ViewModel.Start();
|
await ViewModel.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ParentWindow_Closed(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
private void ViewModel_BrowserCreated(ChromiumWebBrowser browser)
|
private void ViewModel_BrowserCreated(ChromiumWebBrowser browser)
|
||||||
{
|
{
|
||||||
Grid.SetRow(browser, 0);
|
Grid.SetRow(browser, 0);
|
||||||
@@ -72,4 +89,18 @@ public partial class TaobaoBuyOrderCtrl : UserControl
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void imgOrderItem_MouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (imgOrderItem.Width == 100)
|
||||||
|
{
|
||||||
|
imgOrderItem.Width = 300;
|
||||||
|
imgOrderItem.Height = 300;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
imgOrderItem.Width = 100;
|
||||||
|
imgOrderItem.Height = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,735 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="_29WxOrderWpf.Ctrls.BuyerCtrls.TbBuyerOrderReadCtrl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
x:Name="tbBuyerOrderReadCtrl"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="1000"
|
||||||
|
Loaded="UserControl_Loaded"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Border
|
||||||
|
Background="White"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1,1,0,1"
|
||||||
|
CornerRadius="5,0,0,5">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="40" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Button
|
||||||
|
x:Name="btnHideAll"
|
||||||
|
Grid.Row="1"
|
||||||
|
Width="25"
|
||||||
|
Height="60"
|
||||||
|
Margin="-20,0,0,20"
|
||||||
|
HorizontalAlignment="left"
|
||||||
|
Click="btnHideAll_Click"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}">
|
||||||
|
<TextBlock Margin="0,0,5,0">
|
||||||
|
关<LineBreak />
|
||||||
|
闭</TextBlock>
|
||||||
|
</Button>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Margin="12,0,4,0"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseLeftButtonUp="btnHideAll_Click"
|
||||||
|
Source="{StaticResource imgCloseGray}"
|
||||||
|
Visibility="Collapsed" />
|
||||||
|
<WrapPanel Grid.Column="1" VerticalAlignment="Center">
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkAutoReadBuyerOrder"
|
||||||
|
Margin="6,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Checked="chkAutoReadBuyerOrder_CheckedChanged"
|
||||||
|
Content="自动读淘宝买手单"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="true"
|
||||||
|
Unchecked="chkAutoReadBuyerOrder_CheckedChanged" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkHideNoWxIdOrder"
|
||||||
|
Margin="6,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Checked="chkHideNoWxIdOrder_CheckedChanged"
|
||||||
|
Content="隐藏无微信订单的买手单"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="True"
|
||||||
|
Unchecked="chkHideNoWxIdOrder_CheckedChanged" />
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkAutoAfterSale"
|
||||||
|
Margin="6,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Checked="chkAutoAfterSale_Checked"
|
||||||
|
Content="未发货订单自动售后"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="True"
|
||||||
|
Unchecked="chkAutoAfterSale_Checked"
|
||||||
|
Visibility="Visible" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnSearch"
|
||||||
|
Grid.Column="8"
|
||||||
|
Width="118"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Click="btnSearch_Click"
|
||||||
|
Content="刷新订单"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnNextBuyer"
|
||||||
|
Grid.Column="8"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Padding="4,0"
|
||||||
|
Click="btnNextBuyer_Click"
|
||||||
|
Content="下一个买手"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtFilter"
|
||||||
|
Grid.Column="2"
|
||||||
|
Height="28"
|
||||||
|
Margin="28,0,8,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||||
|
TextChanged="txtFilter_TextChanged" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnFilter"
|
||||||
|
Grid.Column="3"
|
||||||
|
Width="50"
|
||||||
|
Height="24"
|
||||||
|
Margin="4,0,8,0"
|
||||||
|
Click="btnFilter_Click"
|
||||||
|
Content="过滤"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
|
<Grid
|
||||||
|
x:Name="GridCef"
|
||||||
|
Grid.Row="1"
|
||||||
|
Background="LightGray" />
|
||||||
|
<Grid
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="2,2,0,334"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border
|
||||||
|
x:Name="borderTbBuyer"
|
||||||
|
Width="138"
|
||||||
|
Background="White"
|
||||||
|
CornerRadius="0,4,4,0">
|
||||||
|
<Grid>
|
||||||
|
<ListBox x:Name="lbTbBuyer">
|
||||||
|
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<ContentPresenter
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<!--<local:ShopListRowCtrl></local:ShopListRowCtrl>-->
|
||||||
|
<Border
|
||||||
|
MinHeight="50"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
BorderBrush="{StaticResource ListRowBorderColorBrush}"
|
||||||
|
BorderThickness="0,0,0,1"
|
||||||
|
CornerRadius="0">
|
||||||
|
<Border.Style>
|
||||||
|
<!-- 鼠标进入或悬停Border时切换颜色(悬停时Border的填充控件必须有填充Border,所在层级不限,仅填充透明Grid则触发器无效) -->
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{StaticResource ListRowHoverBackColorBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
|
||||||
|
<Grid x:Name="gridListItem">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition x:Name="colCheck" Width="25*" />
|
||||||
|
<ColumnDefinition x:Name="colBuyerName" Width="100*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<CheckBox
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
Click="CheckBox_Click"
|
||||||
|
IsChecked="{Binding IsSelect, Mode=TwoWay}" />
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtBuyerNick"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Cursor="Hand"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Loaded="txtBuyerNick_Loaded"
|
||||||
|
Text="{Binding buyer_nick}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="60"
|
||||||
|
Margin="-2,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="-1"
|
||||||
|
Background="{StaticResource pageColorBrush}"
|
||||||
|
CornerRadius="0,5,5,0"
|
||||||
|
Cursor="Hand">
|
||||||
|
<Button
|
||||||
|
x:Name="btnHideBuyer"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="20"
|
||||||
|
Height="60"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0,0,0,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Click="btnHideBuyer_Click"
|
||||||
|
Content="◀"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<Grid
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="0"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Background="Transparent"
|
||||||
|
Visibility="Visible">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="btnHide"
|
||||||
|
Width="60"
|
||||||
|
Height="25"
|
||||||
|
Margin="0,0,0,-10"
|
||||||
|
Padding="0,2,0,0"
|
||||||
|
VerticalContentAlignment="top"
|
||||||
|
Click="btnHide_Click"
|
||||||
|
Content="▼"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
<Grid
|
||||||
|
x:Name="gridTable"
|
||||||
|
Grid.Row="1"
|
||||||
|
Height="330"
|
||||||
|
Margin="2"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Background="White"
|
||||||
|
Visibility="Visible">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="40" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label
|
||||||
|
x:Name="lblMsg"
|
||||||
|
Margin="180,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Panel.ZIndex="1"
|
||||||
|
Content="正在操作:" />
|
||||||
|
|
||||||
|
<TabControl
|
||||||
|
x:Name="tabOrderType"
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="0,-32,0,1"
|
||||||
|
VerticalAlignment="Stretch">
|
||||||
|
<TabControl.Resources>
|
||||||
|
<Style TargetType="{x:Type TabControl}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type TabControl}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border
|
||||||
|
Grid.Row="1"
|
||||||
|
MinHeight="4"
|
||||||
|
Background="#f8f8f9"
|
||||||
|
BorderBrush="#e0e0e0"
|
||||||
|
BorderThickness="1,1,1,0"
|
||||||
|
CornerRadius="0,4,0,0">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" />
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Background="#e8e8e9"
|
||||||
|
BorderBrush="#e1e1e1"
|
||||||
|
BorderThickness="1,1,1,0"
|
||||||
|
CornerRadius="4,4,0,0">
|
||||||
|
<TabPanel
|
||||||
|
x:Name="HeaderPanel"
|
||||||
|
Background="Transparent"
|
||||||
|
IsItemsHost="True" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="TabItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TabItem">
|
||||||
|
<Border
|
||||||
|
Name="Border"
|
||||||
|
Margin="-1,-2,-1,0"
|
||||||
|
BorderThickness="1,1,1,0"
|
||||||
|
CornerRadius="4,4,0,0">
|
||||||
|
<ContentPresenter
|
||||||
|
x:Name="ContentSite"
|
||||||
|
Margin="10,5"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
ContentSource="Header" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="#f8f8f9" />
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="#e0e0e0" />
|
||||||
|
<Setter TargetName="Border" Property="Margin" Value="-1,-3,-1,-1" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource pageColorBrush}" />
|
||||||
|
<Setter Property="Panel.ZIndex" Value="100" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="False">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Foreground" Value="#999999" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</TabControl.Resources>
|
||||||
|
<TabItem Header="买手订单">
|
||||||
|
<DataGrid
|
||||||
|
x:Name="dgBuyerOrder"
|
||||||
|
Grid.Row="1"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserAddRows="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
ColumnHeaderHeight="30"
|
||||||
|
HorizontalGridLinesBrush="{StaticResource HorizontalGridLinesBrush}"
|
||||||
|
LoadingRow="dgBuyerOrder_LoadingRow"
|
||||||
|
RowHeaderWidth="0"
|
||||||
|
RowHeight="50"
|
||||||
|
SelectionChanged="dgBuyerOrder_SelectionChanged"
|
||||||
|
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="40"
|
||||||
|
Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}"
|
||||||
|
CanUserSort="False"
|
||||||
|
Header="序列"
|
||||||
|
IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.6*"
|
||||||
|
Binding="{Binding WxSendTypeStr}"
|
||||||
|
Header="是否直发">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding order_sn}"
|
||||||
|
Header="拍单订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding ShopOrderIdStr}"
|
||||||
|
Header="店铺订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding buyerName}"
|
||||||
|
Header="买手名称">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding OrderTimeStr}"
|
||||||
|
Header="拍单时间">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.8*"
|
||||||
|
Binding="{Binding ProdInfoStr}"
|
||||||
|
Header="商品信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding AmoutValue}"
|
||||||
|
Header="金额">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding order_status_prompt}"
|
||||||
|
Header="订单状态">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding outExpressCompanyCode}"
|
||||||
|
Header="物流名称">
|
||||||
|
<!-- outExpressCompanyName -->
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding tracking_number}"
|
||||||
|
Header="物流单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding sendStatus}"
|
||||||
|
Header="订单信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTemplateColumn
|
||||||
|
x:Name="colSendBuyerOrder"
|
||||||
|
Width="0.6*"
|
||||||
|
Header="手动发送">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="btnSendBuyerOrder"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
Click="btnSendBuyerOrder_Click"
|
||||||
|
Content="发送"
|
||||||
|
Foreground="{StaticResource PageLinkBrush}"
|
||||||
|
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnSendDirectBuyerOrder"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
Click="btnSendBuyerOrder_Click"
|
||||||
|
Content="发送"
|
||||||
|
Foreground="{StaticResource PageLinkBrush}"
|
||||||
|
Visibility="{Binding WxSendTypeStr, Converter={StaticResource HasTextVisibility}}" />
|
||||||
|
<!-- 直发单直发标注不为空 -->
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="买手售后">
|
||||||
|
|
||||||
|
<DataGrid
|
||||||
|
x:Name="dgBuyerAfterSale"
|
||||||
|
Grid.Row="1"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserAddRows="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
ColumnHeaderHeight="30"
|
||||||
|
HorizontalGridLinesBrush="{StaticResource HorizontalGridLinesBrush}"
|
||||||
|
LoadingRow="dgBuyerOrder_LoadingRow"
|
||||||
|
RowHeaderWidth="0"
|
||||||
|
RowHeight="50"
|
||||||
|
VerticalGridLinesBrush="{StaticResource VerticalGridLinesBrush}">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="40"
|
||||||
|
Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}"
|
||||||
|
CanUserSort="False"
|
||||||
|
Header="序列"
|
||||||
|
IsReadOnly="True">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.6*"
|
||||||
|
Binding="{Binding WxSendTypeStr}"
|
||||||
|
Header="是否直发">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding afterSalesId}"
|
||||||
|
Header="售后单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding orderSn}"
|
||||||
|
Header="拍单订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.5*"
|
||||||
|
Binding="{Binding ShopOrderIdStr}"
|
||||||
|
Header="店铺订单号">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding buyerName}"
|
||||||
|
Header="买手名称">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding orderDate}"
|
||||||
|
Header="拍单日期">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.8*"
|
||||||
|
Binding="{Binding ProdInfoStr}"
|
||||||
|
Header="商品信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding OrderAmountValue}"
|
||||||
|
Header="订单金额">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="0.8*"
|
||||||
|
Binding="{Binding RefundAmountValue}"
|
||||||
|
Header="售后金额">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding AfterSaleStatusStr}"
|
||||||
|
Header="售后状态">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1*"
|
||||||
|
Binding="{Binding sendStatus}"
|
||||||
|
Header="订单信息">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Margin" Value="5" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<!--<DataGridTemplateColumn Width="0.6*" Header="手动发送" x:Name="colSendBuyerOrderAfterSale" >
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button Grid.Column="1" Grid.Row="2" x:Name="btnSendBuyerOrder" VerticalAlignment="Center" Background="Transparent" HorizontalAlignment="Center"
|
||||||
|
Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" Margin="4,0,0,0" Content="发送" Click="btnSendBuyerOrder_Click"
|
||||||
|
Visibility="{Binding TransitWarehouseIdStr, Converter={StaticResource HasTextVisibility}}"></Button>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>-->
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -11,7 +11,7 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using TinyPinyin;
|
using WxOrder.Framework.Commons.pinyin;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.Commons
|
namespace _29WxOrderWpf.Ctrls.Commons
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
using _29WxOrderWpf.BaseWindows;
|
||||||
|
using _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||||
|
using _29WxOrderWpf.ViewModels;
|
||||||
|
using AllBase;
|
||||||
|
using AllBase.Helper;
|
||||||
|
using AllBase.Model.DBModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using TemuKJD.ToolForms;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
|
|
||||||
|
internal class OrderBuyerOrdersHelper
|
||||||
|
{
|
||||||
|
public static void ShowBuyerOrder(oms_wei_order_item_info orderItem, string buyerAccount, string buyerName, string outOrderId, bool isShowOrderList = false)
|
||||||
|
{
|
||||||
|
if (outOrderId.StartsWith("tb_")) // 淘宝买手及订单
|
||||||
|
{
|
||||||
|
var buyer = GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(p => p.buyer_id == buyerAccount || p.buyer_name == buyerName);
|
||||||
|
if (buyer == null)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("该订单买手号未在当前账户登录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = "";
|
||||||
|
if (isShowOrderList)
|
||||||
|
url = "https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm?";
|
||||||
|
else
|
||||||
|
url = "https://trade.tmall.com/detail/orderDetail.htm?bizOrderId=" + outOrderId.Replace("tb_", "");
|
||||||
|
|
||||||
|
TaobaoBuyOrderCtrl taobaoBuyView = new TaobaoBuyOrderCtrl(GlobalConfig.CurrentTaobaoBuyer, orderItem);
|
||||||
|
taobaoBuyView.ViewModel.InitUrl = url;
|
||||||
|
new DialogWindow()
|
||||||
|
{
|
||||||
|
Title = "订单查看 - 当前买手 " + buyer.buyer_nick,
|
||||||
|
Content = taobaoBuyView,
|
||||||
|
Width = SystemParameters.PrimaryScreenWidth < 1920 ? SystemParameters.PrimaryScreenWidth : SystemParameters.PrimaryScreenWidth * 90 / 100,
|
||||||
|
Height = SystemParameters.PrimaryScreenHeight * 90 / 100,
|
||||||
|
WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||||
|
}.ShowDialog();
|
||||||
|
}
|
||||||
|
else // 拼多多买手及订单
|
||||||
|
{
|
||||||
|
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(p => p.buyer_id == buyerAccount || p.buyer_name == buyerName);
|
||||||
|
if (buyer == null)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("该订单买手号未在当前账户登录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = "";
|
||||||
|
if (isShowOrderList)
|
||||||
|
url = "https://mobile.yangkeduo.com/index.html"; /* 订单列表 */
|
||||||
|
else
|
||||||
|
url = "https://mobile.yangkeduo.com/order.html?order_sn=" + outOrderId + "&page_from=1&main_orders=1&is_tester=1&refer_page_name=my_order" +
|
||||||
|
"&refer_page_id=10032_" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now) + "_" + Randomx.GetWordNumber(10) + "&refer_page_sn=10032";
|
||||||
|
|
||||||
|
// 拍单的时候检测一下买手号
|
||||||
|
if (buyer.status == "在线")
|
||||||
|
{
|
||||||
|
PddMobileLoginViewModel.CheckBuyerLogin(buyer);
|
||||||
|
}
|
||||||
|
if (buyer.status != "在线")
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("买手号掉线");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance, orderItem, buyer, orderItem.PddBuyMap)
|
||||||
|
{
|
||||||
|
TitleText = "订单查看 - 当前买手 " + buyer.buyer_nick,
|
||||||
|
InitUrl = url /* 订单页面 */
|
||||||
|
};
|
||||||
|
buyOrderForm.pnlBuy.Visible = false;
|
||||||
|
|
||||||
|
//已有拍单关联的控制界面显示隐藏
|
||||||
|
if (orderItem.PddBuyMap != null)
|
||||||
|
{
|
||||||
|
buyOrderForm.pnlBuy.Visible = true;
|
||||||
|
buyOrderForm.pnlMap.Visible = false;
|
||||||
|
}
|
||||||
|
buyOrderForm.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Common;
|
|
||||||
using _29WxOrderWpf.Ctrls.PDDInvoice;
|
using _29WxOrderWpf.Ctrls.PDDInvoice;
|
||||||
using _29WxOrderWpf.Ctrls.Statistics;
|
using _29WxOrderWpf.Ctrls.Statistics;
|
||||||
using _29WxOrderWpf.Services;
|
using _29WxOrderWpf.Services;
|
||||||
@@ -15,6 +14,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Work._29Tools.BLL;
|
using Work._29Tools.BLL;
|
||||||
|
using WxOrder.Framework.Commons.Dialogs;
|
||||||
using static _29WxOrderWpf.Services.ShipGiftService;
|
using static _29WxOrderWpf.Services.ShipGiftService;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
@@ -83,7 +83,7 @@ public partial class OrderListCtrl
|
|||||||
{
|
{
|
||||||
sucessCount++;
|
sucessCount++;
|
||||||
item.gift_order_status = 1;
|
item.gift_order_status = 1;
|
||||||
foreach (var orderItem in item.orderItems)
|
foreach (var orderItem in item.OrderItems)
|
||||||
{
|
{
|
||||||
InitOrderItemObservableProp(orderItem);
|
InitOrderItemObservableProp(orderItem);
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@ public partial class OrderListCtrl
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetProgress(index, count);
|
SetProgress(index, count);
|
||||||
BottomMsg = $"礼品单发送进度:{index}/{count}\t\t{item.orderItems.FirstOrDefault()?.title ?? ""}";
|
BottomMsg = $"礼品单发送进度:{index}/{count}\t\t{item.OrderItems.FirstOrDefault()?.title ?? ""}";
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ public partial class OrderListCtrl
|
|||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
sucessCount++;
|
sucessCount++;
|
||||||
this.GetOrder(item.order_id);
|
await this.GetOrder(item.order_id);
|
||||||
SetProgress(index, count);
|
SetProgress(index, count);
|
||||||
item.IsSelect = false;
|
item.IsSelect = false;
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ public partial class OrderListCtrl
|
|||||||
{
|
{
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
BottomMsg = $"订单同步进度:{index}/{count}\t\t{item.orderItems.FirstOrDefault()?.title ?? ""}";
|
BottomMsg = $"订单同步进度:{index}/{count}\t\t{item.OrderItems.FirstOrDefault()?.title ?? ""}";
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
BottomMsg = $"订单同步进度完成 成功:{sucessCount} 失败:{errorCount} 总数:{count}";
|
BottomMsg = $"订单同步进度完成 成功:{sucessCount} 失败:{errorCount} 总数:{count}";
|
||||||
@@ -203,7 +203,7 @@ public partial class OrderListCtrl
|
|||||||
{
|
{
|
||||||
long shopid = item.Key;
|
long shopid = item.Key;
|
||||||
string shopName = item.Value.FirstOrDefault()?.shop_name ?? "";
|
string shopName = item.Value.FirstOrDefault()?.shop_name ?? "";
|
||||||
string[] afterSaleOrderIds = item.Value.SelectMany(a => a.refundItems).Where(a => a != null).Select(a => a.after_sale_order_id).ToArray();
|
string[] afterSaleOrderIds = item.Value.SelectMany(a => a.RefundItems).Where(a => a != null).Select(a => a.after_sale_order_id).ToArray();
|
||||||
var ret = await PullWXOrderService.Instance.PullAfterSaleOrdersAsync(shopid, afterSaleOrderIds);
|
var ret = await PullWXOrderService.Instance.PullAfterSaleOrdersAsync(shopid, afterSaleOrderIds);
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
@@ -308,11 +308,8 @@ public partial class OrderListCtrl
|
|||||||
|
|
||||||
private void ShowPDDInvoiceDialog()
|
private void ShowPDDInvoiceDialog()
|
||||||
{
|
{
|
||||||
new DialogWindow
|
var view = new PDDInvoiceView();
|
||||||
{
|
DialogService.ShowOrActivateWindow(view);
|
||||||
Title = "发票助手",
|
|
||||||
Content = new PDDInvoiceView()
|
|
||||||
}.Show();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListCtrl"
|
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListCtrl"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:c="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:c="WxOrder.Framework"
|
||||||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
||||||
@@ -145,6 +145,7 @@
|
|||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
SelectedIndex="0"
|
SelectedIndex="0"
|
||||||
|
SelectionChanged="cmbTimeType_SelectionChanged"
|
||||||
Style="{StaticResource RoundedComboBox}"
|
Style="{StaticResource RoundedComboBox}"
|
||||||
Text="更新时间">
|
Text="更新时间">
|
||||||
<ComboBoxItem>
|
<ComboBoxItem>
|
||||||
@@ -169,7 +170,8 @@
|
|||||||
Grid.Column="7"
|
Grid.Column="7"
|
||||||
Margin="0,0,14,0"
|
Margin="0,0,14,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
BorderThickness="0" />
|
BorderThickness="0"
|
||||||
|
SelectedDate="{Binding DateStart}" />
|
||||||
|
|
||||||
<!-- 结束时间 -->
|
<!-- 结束时间 -->
|
||||||
<Border
|
<Border
|
||||||
@@ -185,7 +187,8 @@
|
|||||||
Grid.Column="8"
|
Grid.Column="8"
|
||||||
Margin="10,0,4,0"
|
Margin="10,0,4,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
BorderThickness="0" />
|
BorderThickness="0"
|
||||||
|
SelectedDate="{Binding DateEnd}" />
|
||||||
<CheckBox
|
<CheckBox
|
||||||
x:Name="chkEndDate"
|
x:Name="chkEndDate"
|
||||||
Grid.Column="8"
|
Grid.Column="8"
|
||||||
@@ -193,6 +196,7 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
BorderBrush="{StaticResource mainColorBrush}"
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Click="chkEndDate_Click"
|
||||||
FontSize="12" />
|
FontSize="12" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -248,6 +252,7 @@
|
|||||||
</EventTrigger>
|
</EventTrigger>
|
||||||
</Image.Triggers>
|
</Image.Triggers>
|
||||||
</Image>
|
</Image>
|
||||||
|
<WrapPanel>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
x:Name="chkAutoReadOrder"
|
x:Name="chkAutoReadOrder"
|
||||||
Margin="2,0"
|
Margin="2,0"
|
||||||
@@ -265,11 +270,27 @@
|
|||||||
Margin="2,0"
|
Margin="2,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
d:Opacity="0.5"
|
||||||
|
d:Visibility="Visible"
|
||||||
BorderBrush="{StaticResource mainColorBrush}"
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
Click="chkSyncDirectOrderWaybill_Click"
|
Click="chkSyncDirectOrderWaybill_Click"
|
||||||
Content="同步物流单"
|
Content="同步物流单"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
IsChecked="False" />
|
IsChecked="False"
|
||||||
|
Visibility="Collapsed" />
|
||||||
|
<CheckBox
|
||||||
|
x:Name="chkNextFullReadOrder"
|
||||||
|
Margin="2,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Opacity="0.5"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
Content="下次全量读单"
|
||||||
|
FontSize="12"
|
||||||
|
IsChecked="{Binding isReadFullOrder}"
|
||||||
|
Visibility="Visible" />
|
||||||
|
</WrapPanel>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
<wpf:SpacingStackPanel Grid.Column="13" HorizontalSpacing="5">
|
<wpf:SpacingStackPanel Grid.Column="13" HorizontalSpacing="5">
|
||||||
@@ -600,9 +621,10 @@
|
|||||||
</TabControl.Resources>
|
</TabControl.Resources>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="待采购"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Header="待采购"
|
Header="{Binding WaitBuyTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged">
|
SizeChanged="TabItem_SizeChanged">
|
||||||
<Border
|
<Border
|
||||||
Padding="0,10"
|
Padding="0,10"
|
||||||
@@ -683,14 +705,16 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="异常需重拍"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Foreground="#FFEE0099"
|
Foreground="#FFEE0099"
|
||||||
Header="异常需重拍"
|
Header="{Binding AbnormalTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged" />
|
SizeChanged="TabItem_SizeChanged" />
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
Header="待发货"
|
d:Header="待发货"
|
||||||
|
Header="{Binding WaitSendTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged">
|
SizeChanged="TabItem_SizeChanged">
|
||||||
<Border
|
<Border
|
||||||
Margin="4,0,4,4"
|
Margin="4,0,4,4"
|
||||||
@@ -729,9 +753,10 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="待收货"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Header="待收货"
|
Header="{Binding WaitReceiveTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged">
|
SizeChanged="TabItem_SizeChanged">
|
||||||
<Border
|
<Border
|
||||||
Margin="4,0,4,4"
|
Margin="4,0,4,4"
|
||||||
@@ -867,10 +892,11 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="需处理售后单"
|
||||||
Background="#FF6666"
|
Background="#FF6666"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Foreground="#FF2222"
|
Foreground="#FF2222"
|
||||||
Header="需处理售后单"
|
Header="{Binding EmergencyManualReturnOrderTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged">
|
SizeChanged="TabItem_SizeChanged">
|
||||||
<Border
|
<Border
|
||||||
Margin="4,0,4,4"
|
Margin="4,0,4,4"
|
||||||
@@ -1145,10 +1171,11 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="退货仓自动售后单"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Foreground="#FF7744"
|
Foreground="#FF7744"
|
||||||
Header="退货仓自动售后单"
|
Header="{Binding EmergencyDistribReturnOrderTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged">
|
SizeChanged="TabItem_SizeChanged">
|
||||||
<Border
|
<Border
|
||||||
Margin="4,0,4,4"
|
Margin="4,0,4,4"
|
||||||
@@ -1280,10 +1307,11 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="售后完成单"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Foreground="#FFaa77"
|
Foreground="#FFaa77"
|
||||||
Header="售后完成单"
|
Header="{Binding RefundTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged">
|
SizeChanged="TabItem_SizeChanged">
|
||||||
<Border
|
<Border
|
||||||
Margin="4,0,4,4"
|
Margin="4,0,4,4"
|
||||||
@@ -1371,9 +1399,10 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem
|
<TabItem
|
||||||
MinWidth="60"
|
MinWidth="60"
|
||||||
|
d:Header="全部订单"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Header="全部订单"
|
Header="{Binding AllOrderTabTxt}"
|
||||||
SizeChanged="TabItem_SizeChanged" />
|
SizeChanged="TabItem_SizeChanged" />
|
||||||
<!--<TabItem Header="发货异常">
|
<!--<TabItem Header="发货异常">
|
||||||
<Grid Background="#FFE5E5E5"/>
|
<Grid Background="#FFE5E5E5"/>
|
||||||
@@ -1404,7 +1433,8 @@
|
|||||||
CanUserReorderColumns="False"
|
CanUserReorderColumns="False"
|
||||||
ColumnDisplayIndexChanged="dgOrderHeader_ColumnDisplayIndexChanged"
|
ColumnDisplayIndexChanged="dgOrderHeader_ColumnDisplayIndexChanged"
|
||||||
ColumnHeaderHeight="{Binding ElementName=lstTitle, Path=ActualHeight}"
|
ColumnHeaderHeight="{Binding ElementName=lstTitle, Path=ActualHeight}"
|
||||||
LayoutUpdated="dgOrderHeader_LayoutUpdated">
|
LayoutUpdated="dgOrderHeader_LayoutUpdated"
|
||||||
|
Sorting="dgOrderHeader_Sorting">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="38"
|
Width="38"
|
||||||
@@ -1451,9 +1481,20 @@
|
|||||||
Header="店铺单号"
|
Header="店铺单号"
|
||||||
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
x:Name="dgHeaderTime"
|
||||||
Width="90*"
|
Width="90*"
|
||||||
Header="交易时间"
|
Header="交易时间 ▼"
|
||||||
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}">
|
||||||
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<!-- 设置 Cursor 为 Hand -->
|
||||||
|
<TextBlock
|
||||||
|
x:Name="tbHeaderTimeTxt"
|
||||||
|
Cursor="Hand"
|
||||||
|
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=DataContext.ColumnHeaderTitle}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="65*"
|
Width="65*"
|
||||||
Header="利润"
|
Header="利润"
|
||||||
@@ -1485,9 +1526,14 @@
|
|||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Margin="7,0,7,0"
|
Margin="7,0,7,0"
|
||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
|
AlternationCount="1000000"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
ScrollViewer.CanContentScroll="True"
|
ScrollViewer.CanContentScroll="True"
|
||||||
VirtualizingPanel.ScrollUnit="Pixel">
|
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
||||||
|
VirtualizingPanel.ScrollUnit="Pixel"
|
||||||
|
VirtualizingStackPanel.IsVirtualizing="True"
|
||||||
|
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
||||||
|
<!-- VirtualizingStackPanel.VirtualizationMode="Recycling" -->
|
||||||
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem">
|
<Style TargetType="ListBoxItem">
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -43,8 +43,53 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="6" />
|
<RowDefinition Height="6" />
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
<RowDefinition Height="6" />
|
<RowDefinition Height="6" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
<local:OrderListRowItemCtrl
|
||||||
|
Grid.Row="1"
|
||||||
|
DataContext="{Binding OrderItem}"
|
||||||
|
Visibility="{Binding OrderItemVisibility}" />
|
||||||
|
<!--<local:OrderListRowItemCtrl
|
||||||
|
Grid.Row="2"
|
||||||
|
DataContext="{Binding OrderItem2}"
|
||||||
|
Visibility="{Binding OrderItemVisibility}" />
|
||||||
|
<local:OrderListRowItemCtrl
|
||||||
|
Grid.Row="3"
|
||||||
|
DataContext="{Binding OrderItem2}"
|
||||||
|
Visibility="{Binding OrderItemVisibility}" />
|
||||||
|
<local:OrderListRowItemCtrl
|
||||||
|
Grid.Row="4"
|
||||||
|
DataContext="{Binding OrderItem3}"
|
||||||
|
Visibility="{Binding OrderItemVisibility}" />
|
||||||
|
<local:OrderListRowItemCtrl
|
||||||
|
Grid.Row="5"
|
||||||
|
DataContext="{Binding OrderItem4}"
|
||||||
|
Visibility="{Binding OrderItemVisibility}" />-->
|
||||||
|
<!--<ItemsControl Grid.Row="1" ItemsSource="{Binding orderItems}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<local:OrderListRowItemCtrl DataContext="{Binding}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>-->
|
||||||
|
<!--<ListBox
|
||||||
|
Grid.Row="1"
|
||||||
|
ItemsSource="{Binding OrderItems}"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||||
|
VirtualizingStackPanel.IsVirtualizing="True"
|
||||||
|
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<local:OrderListRowItemCtrl DataContext="{Binding}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>-->
|
||||||
|
<!--<TextBlock Text="{Binding ProductName}" Margin="20,0,0,0"/>-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -41,20 +41,22 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
|
|
||||||
private async void OrderListRowCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
private async void OrderListRowCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.DataContext is oms_wei_order_info order)
|
//await Task.Run(() => { Thread.Sleep(1); });
|
||||||
{
|
|
||||||
int index = 0;
|
//if (this.DataContext is oms_wei_order_info order)
|
||||||
foreach (var orderItem in order.orderItems)
|
//{
|
||||||
{
|
// int index = 0;
|
||||||
gridChildOrder.RowDefinitions.Insert(gridChildOrder.RowDefinitions.Count - 1, new RowDefinition() { Height = GridLength.Auto });
|
// foreach (var orderItem in order.orderItems)
|
||||||
index++;
|
// {
|
||||||
var rowItem = new OrderListRowItemCtrl() { DataContext = orderItem, Name = "rowItem" + index };
|
// gridChildOrder.RowDefinitions.Insert(gridChildOrder.RowDefinitions.Count - 1, new RowDefinition() { Height = GridLength.Auto });
|
||||||
Grid.SetRow(rowItem, index);
|
// index++;
|
||||||
this.gridChildOrder.Children.Add(rowItem);
|
// var rowItem = new OrderListRowItemCtrl() { DataContext = orderItem, Name = "rowItem" + index };
|
||||||
if (index >= 5)
|
// Grid.SetRow(rowItem, index);
|
||||||
break;
|
// this.gridChildOrder.Children.Add(rowItem);
|
||||||
}
|
// if (index >= 5)
|
||||||
}
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
|
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
|
||||||
d:DesignHeight="50"
|
d:DesignHeight="50"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="850"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Border Background="{StaticResource ListRowBorderColorBrush}" CornerRadius="12,12,0,0">
|
<Border Background="{StaticResource ListRowBorderColorBrush}" CornerRadius="12,12,0,0">
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="auto" />
|
<ColumnDefinition Width="auto" />
|
||||||
<ColumnDefinition Width="auto" />
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
<ColumnDefinition Width="20" />
|
<ColumnDefinition Width="20" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox
|
<TextBox
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
Foreground="{Binding OrderBuyTypeColor}"
|
Foreground="{Binding OrderBuyTypeColor}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding OrderBuyType}"
|
Text="{Binding OrderBuyType}"
|
||||||
Visibility="{Binding OrderBuyType, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding OrderBuyTypeVisibility}" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="8,8,-4,8"
|
Margin="8,8,-4,8"
|
||||||
@@ -158,7 +159,7 @@
|
|||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
FontSize="7"
|
FontSize="7"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
Foreground="{Binding Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"
|
Foreground="{Binding Shop.LoginStatusStrColor}"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding Shop.LoginStatusStr}"
|
Text="{Binding Shop.LoginStatusStr}"
|
||||||
WaterMark="店铺状态" />
|
WaterMark="店铺状态" />
|
||||||
@@ -167,6 +168,7 @@
|
|||||||
Grid.Column="6"
|
Grid.Column="6"
|
||||||
Margin="4,8,4,8"
|
Margin="4,8,4,8"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
d:Text="店铺名称"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
@@ -205,13 +207,27 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="Gray"
|
Foreground="#FF8888"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
|
Text="{Binding OrderDiffItemCountStr}"
|
||||||
WaterMark="该订单共有 1 条不同商品记录" />
|
WaterMark="该订单共有 1 条不同商品记录" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="11"
|
Grid.Column="11"
|
||||||
Margin="10"
|
Margin="0,0,8,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Cursor="Hand"
|
||||||
|
FontSize="20"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Foreground="{StaticResource mainColorBrush}"
|
||||||
|
MouseLeftButtonUp="TextBlock_MouseLeftButtonUp"
|
||||||
|
Style="{StaticResource TextBlockIcon}"
|
||||||
|
Text="{StaticResource txt-arrow_sync}"
|
||||||
|
ToolTip="刷新订单状态" />
|
||||||
|
<!-- Foreground="{Binding ElementName=b_gift, Path=BorderBrush}" -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="12"
|
||||||
|
Margin="0,0,8,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
d:Text="仅退款/退货退款"
|
d:Text="仅退款/退货退款"
|
||||||
Foreground="Gray"
|
Foreground="Gray"
|
||||||
@@ -219,9 +235,8 @@
|
|||||||
|
|
||||||
<Border
|
<Border
|
||||||
x:Name="borderFlag"
|
x:Name="borderFlag"
|
||||||
Grid.Column="12"
|
Grid.Column="13"
|
||||||
Width="auto"
|
Width="auto"
|
||||||
Height="15"
|
|
||||||
Margin="2"
|
Margin="2"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
@@ -229,6 +244,13 @@
|
|||||||
MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
|
MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
|
||||||
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
|
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
|
||||||
<WrapPanel VerticalAlignment="Center">
|
<WrapPanel VerticalAlignment="Center">
|
||||||
|
<Button
|
||||||
|
Width="60"
|
||||||
|
Height="22"
|
||||||
|
Margin="0,0,10,0"
|
||||||
|
Click="btn_createOrderSupportTicket"
|
||||||
|
Content="创建工单"
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
@@ -240,9 +262,10 @@
|
|||||||
Margin="2,0,0,0"
|
Margin="2,0,0,0"
|
||||||
d:Fill="SkyBlue"
|
d:Fill="SkyBlue"
|
||||||
Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z"
|
Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z"
|
||||||
Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}"
|
Fill="{Binding ColourFlagBrush}"
|
||||||
Stretch="Uniform" />
|
Stretch="Uniform" />
|
||||||
|
<!-- ColourFlagBrush -->
|
||||||
|
<!-- Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}" -->
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using AllBase;
|
|||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
using NaiBa.Util.Extension;
|
using NaiBa.Util.Extension;
|
||||||
|
using OrderSupportTicket.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -30,6 +31,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class OrderListRowHeaderCtrl : UserControl
|
public partial class OrderListRowHeaderCtrl : UserControl
|
||||||
{
|
{
|
||||||
|
public static DateTime LastRefreshTime = DateTime.Now.AddSeconds(-5);
|
||||||
|
|
||||||
public OrderListRowHeaderCtrl()
|
public OrderListRowHeaderCtrl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -86,7 +89,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
||||||
{
|
{
|
||||||
// 更新代发管理情况
|
// 更新代发管理情况
|
||||||
foreach (var orderItem in ord.orderItems)
|
foreach (var orderItem in ord.OrderItems)
|
||||||
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
|
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,9 +121,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
{
|
{
|
||||||
if (this.DataContext is oms_wei_order_info order)
|
if (this.DataContext is oms_wei_order_info order)
|
||||||
{
|
{
|
||||||
if (order.orderItems.Count > 5)
|
if (order.OrderItems.Count > 5)
|
||||||
{
|
{
|
||||||
txtCount.Text = "该订单共计 " + order.orderItems.Count + " 件商品";
|
//txtCount.Text = "该订单共计 " + order.orderItems.Count + " 件商品";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,5 +202,55 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 创建工单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private async void btn_createOrderSupportTicket(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!(this.DataContext is oms_wei_order_info order))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var shop = order.Shop
|
||||||
|
?? GlobalConfig.ShopLoginList.FirstOrDefault(
|
||||||
|
s => s.ErpShopId == order.shop_id.ParseToString());
|
||||||
|
var appId = shop?.ShopId?.Trim();
|
||||||
|
if (string.IsNullOrWhiteSpace(appId)
|
||||||
|
|| string.IsNullOrWhiteSpace(order.order_id))
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowAnimateMessage(
|
||||||
|
"订单缺少店铺 APPID 或订单号,无法创建工单",
|
||||||
|
"Error",
|
||||||
|
5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var ticketOrder = TicketOrderOption.FromWechatOrder(order, appId);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await MainWindow.Instance.CreateOrderSupportTicketAsync(ticketOrder);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("打开工单窗口失败:" + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void TextBlock_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (!(this.DataContext is oms_wei_order_info order))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (LastRefreshTime > DateTime.Now.AddSeconds(-5))
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowAnimateMessage("操作太快了请稍候再点击", "Error", 5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LastRefreshTime = DateTime.Now;
|
||||||
|
await Task.Run(async () => { await MainWindow.Instance.orderListCtrl.GetOrder(order.order_id); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,10 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource listBoxIndexConverter}}" />
|
d:Text="1"
|
||||||
|
Text="{Binding ItemOrder.Index}" />
|
||||||
|
<!-- Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ItemsControl.AlternationIndex)}" -->
|
||||||
|
<!-- Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource listBoxIndexConverter}}" -->
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="0,0,0,0"
|
Margin="0,0,0,0"
|
||||||
@@ -92,7 +95,15 @@
|
|||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
MouseDown="imgOrderItem_MouseDown"
|
MouseDown="imgOrderItem_MouseDown"
|
||||||
MouseEnter="imgOrderItem_MouseEnter"
|
MouseEnter="imgOrderItem_MouseEnter"
|
||||||
MouseLeave="imgOrderItem_MouseLeave" />
|
MouseLeave="imgOrderItem_MouseLeave">
|
||||||
|
<Image.Source>
|
||||||
|
<MultiBinding Converter="{StaticResource ImageUrlToBitmapImage}" Mode="OneWay">
|
||||||
|
<Binding IsAsync="True" Path="ThumbImgStr" />
|
||||||
|
<Binding IsAsync="True" Path="IsLoadThumbImg" />
|
||||||
|
<!--<Binding Path="DataContext.IsLoadImage" RelativeSource="{RelativeSource AncestorType=UserControl}" />-->
|
||||||
|
</MultiBinding>
|
||||||
|
</Image.Source>
|
||||||
|
</Image>
|
||||||
|
|
||||||
<wpf:SpacingStackPanel
|
<wpf:SpacingStackPanel
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -140,7 +151,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding sku_attr_str}"
|
Text="{Binding SkuAttrStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
WaterMark="规格" />
|
WaterMark="规格" />
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
@@ -205,13 +216,13 @@
|
|||||||
WaterMark="成交时间" />
|
WaterMark="成交时间" />
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<wpf:TitleContent Title="发货时间:" Visibility="{Binding ItemOrder.ship_done_time_visibility}">
|
<wpf:TitleContent Title="发货时间:" Visibility="{Binding ItemOrder.ShipDoneTimeVisibility}">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
d:Text="00-01-01 01:01:01"
|
d:Text="00-01-01 01:01:01"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding ItemOrder.ship_done_time_str}"
|
Text="{Binding ItemOrder.ShipDoneTimeStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
WaterMark="发货时间" />
|
WaterMark="发货时间" />
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
@@ -298,7 +309,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding predict_commission_fee_str}"
|
Text="{Binding PredictCommissionFeeStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
WaterMark="平台服务费" />
|
WaterMark="平台服务费" />
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
@@ -308,7 +319,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding commission_amount_str}"
|
Text="{Binding CommissionAmountStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
WaterMark="达人佣金" />
|
WaterMark="达人佣金" />
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
@@ -318,7 +329,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding out_amount_str}"
|
Text="{Binding OutAmountStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
WaterMark="外采金额" />
|
WaterMark="外采金额" />
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
@@ -416,7 +427,7 @@
|
|||||||
BorderBrush="{StaticResource PageWarningBrushCC}"
|
BorderBrush="{StaticResource PageWarningBrushCC}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
Visibility="{Binding ElementName=txtWaybillException, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding ShopWaybillExceptionStrVisibility}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="txtWaybillException"
|
x:Name="txtWaybillException"
|
||||||
MinWidth="20"
|
MinWidth="20"
|
||||||
@@ -439,14 +450,14 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||||
Text="{Binding RefundStatusStr}"
|
Text="{Binding RefundStatusStr}"
|
||||||
Visibility="{Binding ElementName=txtOrderItemStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding RefundStatusStrVisibility}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||||
Text=":"
|
Text=":"
|
||||||
Visibility="{Binding ElementName=txtOrderItemStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding RefundStatusStrVisibility}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="txtStatusStr"
|
x:Name="txtStatusStr"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
@@ -455,7 +466,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||||
Text="{Binding ItemRefund.RefundStatusStr}"
|
Text="{Binding ItemRefund.RefundStatusStr}"
|
||||||
Visibility="{Binding ElementName=txtStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding ItemRefund.RefundStatusStrVisibility}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<!-- 售后原因 -->
|
<!-- 售后原因 -->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -465,8 +476,8 @@
|
|||||||
d:Text="售后原因"
|
d:Text="售后原因"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="#f56c6c"
|
Foreground="#f56c6c"
|
||||||
Text="{Binding ItemRefund.reasonTextStr}"
|
Text="{Binding ItemRefund.ReasonTextStr}"
|
||||||
Visibility="{Binding ElementName=txtRefundReasonTextStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding RefundReasonTextStrVisibility}" />
|
||||||
|
|
||||||
<!-- 售后结果 -->
|
<!-- 售后结果 -->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -477,7 +488,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="#f56c6c"
|
Foreground="#f56c6c"
|
||||||
Text="{Binding RefundResultStr}"
|
Text="{Binding RefundResultStr}"
|
||||||
Visibility="{Binding ElementName=txtRefundResult, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding RefundResultStrVisibility}" />
|
||||||
|
|
||||||
<!-- 收货地址 -->
|
<!-- 收货地址 -->
|
||||||
<wpf:TitleContent Title="收货地址:">
|
<wpf:TitleContent Title="收货地址:">
|
||||||
@@ -536,7 +547,7 @@
|
|||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding ItemRefund.after_sale_order_id}"
|
Text="{Binding ItemRefund.after_sale_order_id}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Visibility="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource HasTextVisibility}}"
|
Visibility="{Binding RefundAfterSaleOrderIdVisibility}"
|
||||||
WaterMark="退款单号" />
|
WaterMark="退款单号" />
|
||||||
<Border
|
<Border
|
||||||
Width="12"
|
Width="12"
|
||||||
@@ -557,7 +568,7 @@
|
|||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<!-- 退货地址 -->
|
<!-- 退货地址 -->
|
||||||
<wpf:TitleContent Title="退货地址:" Visibility="{Binding RefundAddressStr, Converter={StaticResource HasTextVisibility}}">
|
<wpf:TitleContent Title="退货地址:" Visibility="{Binding RefundAddressShortStrVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtRefundAddress"
|
x:Name="txtRefundAddress"
|
||||||
@@ -566,7 +577,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding RefundAddressStr, Converter={StaticResource TextEllipsisConverter26}}"
|
Text="{Binding RefundAddressShortStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
ToolTip="{Binding RefundAddressStr}"
|
ToolTip="{Binding RefundAddressStr}"
|
||||||
WaterMark="退货地址" />
|
WaterMark="退货地址" />
|
||||||
@@ -613,7 +624,7 @@
|
|||||||
BorderBrush="{Binding BuyerTransitWaybillStatusBorderColor}"
|
BorderBrush="{Binding BuyerTransitWaybillStatusBorderColor}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
Visibility="{Binding BuyerTransitWaybillStatusStr, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding BuyerTransitWaybillStatusStrVisibility}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="txtBuyStatus"
|
x:Name="txtBuyStatus"
|
||||||
MinWidth="20"
|
MinWidth="20"
|
||||||
@@ -623,8 +634,8 @@
|
|||||||
Foreground="{Binding BuyerTransitWaybillStatusStrColor}"
|
Foreground="{Binding BuyerTransitWaybillStatusStrColor}"
|
||||||
Text="{Binding BuyerTransitWaybillStatusStr}" />
|
Text="{Binding BuyerTransitWaybillStatusStr}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<!--<Border
|
||||||
x:Name="borderWarehouseStatas"
|
x:Name="borderWarehouseStatus"
|
||||||
Height="auto"
|
Height="auto"
|
||||||
MinWidth="30"
|
MinWidth="30"
|
||||||
Margin="0,0,4,0"
|
Margin="0,0,4,0"
|
||||||
@@ -635,7 +646,9 @@
|
|||||||
BorderBrush="{Binding WarehouseWaybillStatusBorderColor}"
|
BorderBrush="{Binding WarehouseWaybillStatusBorderColor}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
Visibility="{Binding WarehouseWaybillStatusStr, Converter={StaticResource HasTextVisibility}}">
|
Cursor="Hand"
|
||||||
|
MouseUp="borderWarehouseStatus_MouseUp"
|
||||||
|
Visibility="{Binding WarehouseWaybillStatusStrVisibility}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="txtWarehouseStatus"
|
x:Name="txtWarehouseStatus"
|
||||||
MinWidth="20"
|
MinWidth="20"
|
||||||
@@ -645,7 +658,51 @@
|
|||||||
Foreground="{Binding WarehouseWaybillStatusStrColor}"
|
Foreground="{Binding WarehouseWaybillStatusStrColor}"
|
||||||
MouseEnter="txtWarehouseStatus_MouseEnter"
|
MouseEnter="txtWarehouseStatus_MouseEnter"
|
||||||
Text="{Binding WarehouseWaybillStatusStr}" />
|
Text="{Binding WarehouseWaybillStatusStr}" />
|
||||||
|
</Border>-->
|
||||||
|
<Border
|
||||||
|
x:Name="borderWarehousePackageStatus"
|
||||||
|
Height="auto"
|
||||||
|
MinWidth="30"
|
||||||
|
Margin="0,0,4,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Background="{StaticResource PageOkBrush50}"
|
||||||
|
d:BorderBrush="{StaticResource PageOkBrush}"
|
||||||
|
Background="{Binding WarehouseWaybillStatusBackColor}"
|
||||||
|
BorderBrush="{Binding WarehouseWaybillStatusBorderColor}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="2"
|
||||||
|
Cursor="Hand"
|
||||||
|
MouseUp="borderWarehouseStatus_MouseUp"
|
||||||
|
Visibility="{Binding TransitPackageLatestWarehouseStatusStrVisibility}">
|
||||||
|
<TextBlock
|
||||||
|
x:Name="txtWarehouseStatus"
|
||||||
|
MinWidth="20"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Text="包裹状态"
|
||||||
|
Background="Transparent"
|
||||||
|
Foreground="{Binding WarehouseWaybillStatusStrColor}"
|
||||||
|
MouseEnter="txtWarehouseStatus_MouseEnter"
|
||||||
|
Text="{Binding TransitPackageLatestWarehouseStatusStr}" />
|
||||||
</Border>
|
</Border>
|
||||||
|
<!--<Border
|
||||||
|
Height="auto"
|
||||||
|
MinWidth="30"
|
||||||
|
Margin="0,0,4,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Background="{StaticResource pageColorBrush}"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="2"
|
||||||
|
Visibility="{Binding TransitRefundVoidStatusStrVisibility}">
|
||||||
|
<TextBlock
|
||||||
|
MinWidth="20"
|
||||||
|
Padding="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Text="作废状态"
|
||||||
|
Background="Transparent"
|
||||||
|
Foreground="White"
|
||||||
|
Text="{Binding TransitRefundVoidStatusStr}" />
|
||||||
|
</Border>-->
|
||||||
<Border
|
<Border
|
||||||
Height="auto"
|
Height="auto"
|
||||||
MinWidth="30"
|
MinWidth="30"
|
||||||
@@ -655,7 +712,7 @@
|
|||||||
BorderBrush="{StaticResource pageColorBrush}"
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
Visibility="{Binding TransitRefundVoidStatusStr, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding TransitPackageLatestVoidStatusStrVisibility}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
MinWidth="20"
|
MinWidth="20"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
@@ -663,7 +720,7 @@
|
|||||||
d:Text="作废状态"
|
d:Text="作废状态"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
Text="{Binding TransitRefundVoidStatusStr}" />
|
Text="{Binding TransitPackageLatestVoidStatusStr}" />
|
||||||
</Border>
|
</Border>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
@@ -673,19 +730,21 @@
|
|||||||
Title="采购账户:"
|
Title="采购账户:"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Foreground="#0099ff"
|
Foreground="#0099ff"
|
||||||
MouseLeftButtonUp="TransitOrderBuye_Click"
|
MouseLeftButtonUp="TransitOrderBuy_Click"
|
||||||
Visibility="{Binding ElementName=txtTransitOrderBuyerStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding ItemTransitOutOrderBuyerStrVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtTransitOrderBuyerStr"
|
x:Name="txtTransitOrderBuyerStr"
|
||||||
Margin="-2,2,4,2"
|
Margin="-2,2,4,2"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
d:Text="AAA采购王者"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Foreground="#0099ff"
|
Foreground="#0099ff"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ItemTransitOrderWithVoid.buyer_account}"
|
||||||
Text="{Binding ItemTransitOrderWithVoid.OutOrderBuyerStr}"
|
Text="{Binding ItemTransitOrderWithVoid.OutOrderBuyerStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
WaterMark="采购账户:" />
|
WaterMark="采购账户:" />
|
||||||
@@ -700,7 +759,7 @@
|
|||||||
BorderBrush="{Binding TransitRefundStatusBackColor}"
|
BorderBrush="{Binding TransitRefundStatusBackColor}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
Visibility="{Binding TransitRefundStatusStr, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding TransitRefundStatusStrVisibility}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="txtRefundStatus"
|
x:Name="txtRefundStatus"
|
||||||
MinWidth="20"
|
MinWidth="20"
|
||||||
@@ -720,13 +779,14 @@
|
|||||||
Title="采购单号:"
|
Title="采购单号:"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Foreground="#0099ff"
|
Foreground="#0099ff"
|
||||||
Visibility="{Binding ElementName=txtTransitOrderNumStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding ItemTransitOutOrderNoStrVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtTransitOrderNumStr"
|
x:Name="txtTransitOrderNumStr"
|
||||||
Margin="-2,0"
|
Margin="-2,0"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
d:Text="261009-123456…"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
@@ -743,8 +803,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
MouseLeftButtonDown="Path_MouseLeftButtonDown"
|
MouseLeftButtonDown="Path_MouseLeftButtonDown"
|
||||||
Tag="{Binding order_id}"
|
Tag="{Binding order_id}">
|
||||||
Visibility="{Binding ElementName=txtTransitOrderBuyerStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
|
||||||
<Path
|
<Path
|
||||||
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
|
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
|
||||||
Fill="{StaticResource PageLinkBrush}"
|
Fill="{StaticResource PageLinkBrush}"
|
||||||
@@ -759,12 +818,13 @@
|
|||||||
x:Name="wpBuyTime"
|
x:Name="wpBuyTime"
|
||||||
Title="采购时间:"
|
Title="采购时间:"
|
||||||
Foreground="{Binding OutOrderTimeQualifiedBrush}"
|
Foreground="{Binding OutOrderTimeQualifiedBrush}"
|
||||||
Visibility="{Binding ElementName=txtOutOrderTimeQualifiedStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding OutOrderTimeQualifiedStrVisibility}">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtOutOrderTimeQualifiedStr"
|
x:Name="txtOutOrderTimeQualifiedStr"
|
||||||
Margin="-2,0"
|
Margin="-2,0"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
d:Text="2026-10-09 15:59:59"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Foreground="{Binding OutOrderTimeQualifiedBrush}"
|
Foreground="{Binding OutOrderTimeQualifiedBrush}"
|
||||||
@@ -778,11 +838,12 @@
|
|||||||
<wpf:TitleContent
|
<wpf:TitleContent
|
||||||
Title="取号物流:"
|
Title="取号物流:"
|
||||||
Foreground="{StaticResource PageOkBrush}"
|
Foreground="{StaticResource PageOkBrush}"
|
||||||
Visibility="{Binding TransitOrderWaybillToWareHouseStr, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding TransitOrderWaybillToWareHouseStrVisibility}">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
Margin="-2,0"
|
Margin="-2,0"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
d:Text="JTSD-JT12345678"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Foreground="{StaticResource PageOkBrush}"
|
Foreground="{StaticResource PageOkBrush}"
|
||||||
@@ -808,12 +869,13 @@
|
|||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<!-- 仓库物流 -->
|
<!-- 仓库物流 -->
|
||||||
<wpf:TitleContent Title="仓库物流:" Visibility="{Binding TransitOrderWaybillFromWareHouseStr, Converter={StaticResource HasTextVisibility}}">
|
<wpf:TitleContent Title="仓库物流:" Visibility="{Binding TransitOrderWaybillFromWareHouseStrVisibility}">
|
||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
Margin="-2,0"
|
Margin="-2,0"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
d:Text="YD-3123456789999"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
@@ -832,7 +894,7 @@
|
|||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<!-- 仓库物流 -->
|
<!-- 仓库物流 -->
|
||||||
<wpf:TitleContent Title="补发物流:" Visibility="{Binding TransitExtraPackageWaybillStr, Converter={StaticResource HasTextVisibility}}">
|
<wpf:TitleContent Title="补发物流:" Visibility="{Binding TransitExtraPackageWaybillStrVisibility}">
|
||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
Margin="-2,0"
|
Margin="-2,0"
|
||||||
@@ -852,18 +914,19 @@
|
|||||||
Click="btnVoidTransitExtraOrder_Click"
|
Click="btnVoidTransitExtraOrder_Click"
|
||||||
Content="{Binding TransitExtraPackageWaybillBtnStr}"
|
Content="{Binding TransitExtraPackageWaybillBtnStr}"
|
||||||
Style="{StaticResource LinkButton}"
|
Style="{StaticResource LinkButton}"
|
||||||
Visibility="{Binding TransitExtraPackageWaybillBtnStr, Converter={StaticResource HasTextVisibility}}" />
|
Visibility="{Binding TransitExtraPackageWaybillBtnStrVisibility}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<!-- 外采买手 -->
|
<!-- 外采买手 -->
|
||||||
<wpf:TitleContent Title="外采买手:" Visibility="{Binding ItemOrder.out_account, Converter={StaticResource HasTextVisibility}}">
|
<wpf:TitleContent Title="外采买手:" Visibility="{Binding ItemOrder.OutAccountStrVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtDirectBuyer"
|
x:Name="txtDirectBuyer"
|
||||||
Margin="-2,2,4,2"
|
Margin="-2,2,4,2"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
d:Text="BBB采购废柴"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
@@ -883,7 +946,7 @@
|
|||||||
BorderBrush="{Binding DirectRefundStatusBackColor}"
|
BorderBrush="{Binding DirectRefundStatusBackColor}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="2"
|
CornerRadius="2"
|
||||||
Visibility="{Binding DirectRefundStatusStr, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding DirectRefundStatusStrVisibility}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="txtOutBuyerRefundStatus"
|
x:Name="txtOutBuyerRefundStatus"
|
||||||
MinWidth="20"
|
MinWidth="20"
|
||||||
@@ -901,13 +964,14 @@
|
|||||||
<wpf:TitleContent
|
<wpf:TitleContent
|
||||||
Title="外采单号:"
|
Title="外采单号:"
|
||||||
Foreground="#0099ff"
|
Foreground="#0099ff"
|
||||||
Visibility="{Binding ItemOrder.out_order_no, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding OutOrderNoVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtDirectBuyerOrderNo"
|
x:Name="txtDirectBuyerOrderNo"
|
||||||
Margin="-2,2"
|
Margin="-2,2"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
|
d:Text="261009-123456…"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
@@ -924,7 +988,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
MouseLeftButtonDown="PathCopyDirectBuyerOrderNo_MouseLeftButtonDown"
|
MouseLeftButtonDown="PathCopyDirectBuyerOrderNo_MouseLeftButtonDown"
|
||||||
Visibility="{Binding ElementName=txtDirectBuyerOrderNo, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding OutOrderNoVisibility}">
|
||||||
<Path
|
<Path
|
||||||
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
|
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
|
||||||
Fill="{StaticResource PageLinkBrush}"
|
Fill="{StaticResource PageLinkBrush}"
|
||||||
@@ -937,7 +1001,7 @@
|
|||||||
<wpf:TitleContent
|
<wpf:TitleContent
|
||||||
x:Name="wpDirectBuyTime"
|
x:Name="wpDirectBuyTime"
|
||||||
Title="外采时间:"
|
Title="外采时间:"
|
||||||
Visibility="{Binding ElementName=txtDirectOrderBuyTimeStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
Visibility="{Binding DirectOrderBuyTimeStrVisibility}">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtDirectOrderBuyTimeStr"
|
x:Name="txtDirectOrderBuyTimeStr"
|
||||||
Margin="-2,2"
|
Margin="-2,2"
|
||||||
@@ -1288,7 +1352,7 @@
|
|||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<!-- 总店地址 -->
|
<!-- 总店地址 -->
|
||||||
<wpf:TitleContent Title="总店地址:" Visibility="{Binding PddBuyerAfterSaleAddressStr, Converter={StaticResource HasTextVisibility}}">
|
<wpf:TitleContent Title="总店地址:" Visibility="{Binding PddBuyerAfterSaleAddressStrVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtBuyerRefundAddress"
|
x:Name="txtBuyerRefundAddress"
|
||||||
@@ -1298,10 +1362,9 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding PddBuyerAfterSaleAddressStr, Converter={StaticResource TextEllipsisConverter}}"
|
Text="{Binding PddBuyerAfterSaleAddressShortStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
ToolTip="{Binding PddBuyerAfterSaleAddressStr}"
|
ToolTip="{Binding PddBuyerAfterSaleAddressStr}"
|
||||||
Visibility="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource HasTextVisibility}}"
|
|
||||||
WaterMark="总店退货地址" />
|
WaterMark="总店退货地址" />
|
||||||
<Border
|
<Border
|
||||||
Width="12"
|
Width="12"
|
||||||
@@ -1321,7 +1384,7 @@
|
|||||||
</wpf:TitleContent>
|
</wpf:TitleContent>
|
||||||
|
|
||||||
<!-- 直发总店 -->
|
<!-- 直发总店 -->
|
||||||
<wpf:TitleContent Title="直发总店:" Visibility="{Binding DirectPddBuyerAfterSaleAddressStr, Converter={StaticResource HasTextVisibility}}">
|
<wpf:TitleContent Title="直发总店:" Visibility="{Binding DirectPddBuyerAfterSaleAddressStrVisibility}">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<uc:UcWaterMarkTextBox1
|
<uc:UcWaterMarkTextBox1
|
||||||
x:Name="txtDirectBuyerRefundAddress"
|
x:Name="txtDirectBuyerRefundAddress"
|
||||||
@@ -1331,10 +1394,9 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{Binding DirectPddBuyerAfterSaleAddressStr, Converter={StaticResource TextEllipsisConverter}}"
|
Text="{Binding DirectPddBuyerAfterSaleAddressShortStr}"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
ToolTip="{Binding DirectPddBuyerAfterSaleAddressStr}"
|
ToolTip="{Binding DirectPddBuyerAfterSaleAddressStr}"
|
||||||
Visibility="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource HasTextVisibility}}"
|
|
||||||
WaterMark="总店退货地址" />
|
WaterMark="总店退货地址" />
|
||||||
<Border
|
<Border
|
||||||
Width="12"
|
Width="12"
|
||||||
@@ -1356,7 +1418,6 @@
|
|||||||
</wpf:SpacingStackPanel>
|
</wpf:SpacingStackPanel>
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
|
|
||||||
|
|
||||||
<wpf:SpacingStackPanel
|
<wpf:SpacingStackPanel
|
||||||
Grid.Column="8"
|
Grid.Column="8"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
@@ -1374,8 +1435,6 @@
|
|||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
VerticalSpacing="6">
|
VerticalSpacing="6">
|
||||||
|
|
||||||
|
|
||||||
<wpf:TitleContent>
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnMapSkus"
|
x:Name="btnMapSkus"
|
||||||
Height="22"
|
Height="22"
|
||||||
@@ -1386,9 +1445,7 @@
|
|||||||
Content="选择SKU"
|
Content="选择SKU"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="{Binding MapSkusBtnVisibility}" />
|
Visibility="{Binding MapSkusBtnVisibility}" />
|
||||||
</wpf:TitleContent>
|
|
||||||
|
|
||||||
<wpf:TitleContent>
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnBuyOrder"
|
x:Name="btnBuyOrder"
|
||||||
Height="22"
|
Height="22"
|
||||||
@@ -1409,8 +1466,6 @@
|
|||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="{Binding ItemOrder.IsWaitBuy, Converter={StaticResource visibleToVisibilityConverter}}" />
|
Visibility="{Binding ItemOrder.IsWaitBuy, Converter={StaticResource visibleToVisibilityConverter}}" />
|
||||||
|
|
||||||
</wpf:TitleContent>
|
|
||||||
<wpf:TitleContent>
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnVoidTransitOrder"
|
x:Name="btnVoidTransitOrder"
|
||||||
Height="22"
|
Height="22"
|
||||||
@@ -1421,10 +1476,20 @@
|
|||||||
Click="btnVoidTransitOrder_Click"
|
Click="btnVoidTransitOrder_Click"
|
||||||
Content="作废重拍"
|
Content="作废重拍"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="Collapsed" />
|
Visibility="{Binding BtnVoidTransitOrderVisibility}" />
|
||||||
</wpf:TitleContent>
|
|
||||||
|
<Button
|
||||||
|
x:Name="btnAbnormalOrderExtraBuy"
|
||||||
|
Height="22"
|
||||||
|
MinWidth="38"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Content="额外拍单"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding BtnAbnormalOrderExtraBuyVisibility}" />
|
||||||
|
|
||||||
|
|
||||||
<wpf:TitleContent>
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnAbnormalOrderRebuy"
|
x:Name="btnAbnormalOrderRebuy"
|
||||||
Height="22"
|
Height="22"
|
||||||
@@ -1435,46 +1500,21 @@
|
|||||||
Click="btnAbnormalOrderRebuy_Click"
|
Click="btnAbnormalOrderRebuy_Click"
|
||||||
Content="异常重拍"
|
Content="异常重拍"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="Collapsed" />
|
Visibility="{Binding BtnAbnormalOrderRebuyVisibility}" />
|
||||||
</wpf:TitleContent>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 直发拍单 -->
|
<!-- 直发拍单 -->
|
||||||
<wpf:TitleContent>
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnDirectBuyOrder"
|
x:Name="btnDirectBuyOrder"
|
||||||
Height="22"
|
Height="22"
|
||||||
MinWidth="38"
|
MinWidth="38"
|
||||||
Margin="0,0,0,0"
|
Margin="0,0,0,0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
Click="btnDirectBuyOrder_Click"
|
Click="btnDirectBuyOrder_Click"
|
||||||
Content="直发拍单"
|
Content="直发拍单"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="{Binding BtnDirectBuyOrderVisibility}" />
|
Visibility="{Binding BtnDirectBuyOrderVisibility}" />
|
||||||
</wpf:TitleContent>
|
|
||||||
|
|
||||||
<!-- 礼品发货 -->
|
|
||||||
<wpf:TitleContent>
|
|
||||||
<Button
|
|
||||||
x:Name="btnShipGift"
|
|
||||||
Height="22"
|
|
||||||
MinWidth="38"
|
|
||||||
Margin="0,0,0,0"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
d:Visibility="Visible"
|
|
||||||
Click="btn_ShipGiftCommand"
|
|
||||||
Content="礼品发货"
|
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
|
||||||
Visibility="{Binding ItemOrder.IsWaitSend, Converter={StaticResource VisibleToVisibilityConverter}}" />
|
|
||||||
</wpf:TitleContent>
|
|
||||||
</wpf:SpacingStackPanel>
|
|
||||||
|
|
||||||
<wpf:SpacingStackPanel
|
|
||||||
Grid.Column="8"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Orientation="Vertical"
|
|
||||||
VerticalSpacing="3">
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnChangeWaybill"
|
x:Name="btnChangeWaybill"
|
||||||
MinWidth="38"
|
MinWidth="38"
|
||||||
@@ -1484,11 +1524,46 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
d:Visibility="Visible"
|
d:Visibility="Visible"
|
||||||
Click="btnChangeWaybill_Click"
|
Click="btnChangeWaybill_Click"
|
||||||
Content="补发/修改物流"
|
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="{Binding ItemOrder.IsShowChangeWaybillBtn, Converter={StaticResource VisibleToVisibilityConverter}}" />
|
Visibility="{Binding ItemOrder.IsShowChangeWaybillBtn, Converter={StaticResource VisibleToVisibilityConverter}}">
|
||||||
|
<TextBlock TextAlignment="Center">
|
||||||
|
补发/修改<LineBreak />
|
||||||
|
物流</TextBlock>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!-- 礼品发货 -->
|
||||||
<Button
|
<Button
|
||||||
|
x:Name="btnShipGift"
|
||||||
|
Height="22"
|
||||||
|
MinWidth="38"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Click="btn_ShipGiftCommand"
|
||||||
|
Content="礼品发货"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding ItemOrder.IsWaitSend, Converter={StaticResource VisibleToVisibilityConverter}}" />
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Grid.Column="8"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="5">
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="btnTransitInfo"
|
||||||
|
Height="22"
|
||||||
|
MinWidth="38"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Click="btnTransitInfo_Click"
|
||||||
|
Content="云仓详情"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding ItemTransitOrderWithVoid, Converter={StaticResource hasValueToVisibilityConverter}}" />
|
||||||
|
<!--<Button
|
||||||
x:Name="btnAddEditTransitWarehouseReject_New"
|
x:Name="btnAddEditTransitWarehouseReject_New"
|
||||||
MinWidth="38"
|
MinWidth="38"
|
||||||
MinHeight="20"
|
MinHeight="20"
|
||||||
@@ -1541,7 +1616,75 @@
|
|||||||
Content="滞留补发买家"
|
Content="滞留补发买家"
|
||||||
FontSize="11"
|
FontSize="11"
|
||||||
Style="{StaticResource BasePageButtonLightStyle}"
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
Visibility="{Binding ItemOrder.IsShowTransitExtraPackagesBtn, Converter={StaticResource VisibleToVisibilityConverter}}" />
|
Visibility="{Binding ItemOrder.IsShowTransitExtraPackagesBtn, Converter={StaticResource VisibleToVisibilityConverter}}" />-->
|
||||||
|
<Button
|
||||||
|
x:Name="btnVoidPackage"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Content="作废包裹"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Click="btnVoidTransitOrder_Click"
|
||||||
|
Content="{Binding VoidPackageTypeStr}"
|
||||||
|
FontSize="11"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding TransitPackageLatest.VoidPackageBtnVisibility}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnAddEditTransitWarehouseReject_New"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Click="btnAddEditTransitWarehouseReject_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding TransitPackageLatest.RejectPackageBtnVisibility}">
|
||||||
|
<TextBlock>
|
||||||
|
云仓拒收<LineBreak />
|
||||||
|
退回总店</TextBlock>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnAddEditTransitWarehouseAfterSale_n1"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0"
|
||||||
|
Click="btnAddEditTransitWarehouseAfterSale_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding TransitPackageLatest.ReturnPackageBtnVisibility}">
|
||||||
|
<TextBlock>
|
||||||
|
拒收失败<LineBreak />
|
||||||
|
转寄总店</TextBlock>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnAddEditTransitWarehouseAfterSale_n2"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0"
|
||||||
|
Click="btnAddEditTransitWarehouseAfterSale_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding TransitPackageLatest.InterceptPackageBtnVisibility}">
|
||||||
|
<TextBlock>
|
||||||
|
出库拦截<LineBreak />
|
||||||
|
退回仓库</TextBlock>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnTransitExtraPackages"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="38"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Click="btnTransitExtraPackages_Click"
|
||||||
|
Content="滞留补发买家"
|
||||||
|
FontSize="11"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding TransitPackageLatest.ExtraPackagesBtnVisibility}" />
|
||||||
</wpf:SpacingStackPanel>
|
</wpf:SpacingStackPanel>
|
||||||
</wpf:SpacingStackPanel>
|
</wpf:SpacingStackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,7 @@
|
|||||||
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderTaskDialogView"
|
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderTaskDialogView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comn="WxOrder.Framework"
|
||||||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Services;
|
using _29WxOrderWpf.Services;
|
||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
using AllBase.Util;
|
using AllBase.Util;
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderTransitListCtrl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:wpf="WPFCommon"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
Background="White"
|
||||||
|
Foreground="DimGray"
|
||||||
|
Loaded="OrderTransitListCtrl_Loaded"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style BasedOn="{StaticResource TitleContentBaseStyle}" TargetType="wpf:TitleContent">
|
||||||
|
<Setter Property="Placement" Value="Left" />
|
||||||
|
<Setter Property="TitleVerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="LeftTitlePadding" Value="0,0,0,0" />
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="wpf:SpacingStackPanel">
|
||||||
|
<Setter Property="Margin" Value="3,0" />
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Height="30" Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="店铺:" />
|
||||||
|
<TextBox
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
d:Text="音诉云仓"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="DimGray"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding ShopNameStr}" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="订单号:" />
|
||||||
|
<TextBox
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
d:Text="3700000000000000"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="DimGray"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding OrderIdStr}" />
|
||||||
|
</StackPanel>
|
||||||
|
<ListBox
|
||||||
|
x:Name="lbxTransitList"
|
||||||
|
Grid.Row="4"
|
||||||
|
Margin="7,0,7,0"
|
||||||
|
HorizontalContentAlignment="Stretch"
|
||||||
|
BorderThickness="0">
|
||||||
|
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<ContentPresenter
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<!-- 此处绑定将数据源传递给子自定义控件 -->
|
||||||
|
<local:OrderTransitListDetailCtrl DataContext="{Binding}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using AllBase.Model.DBModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OrderTransitListCtrl.xaml 的交互逻辑
|
||||||
|
/// </summary>
|
||||||
|
public partial class OrderTransitListCtrl : UserControl
|
||||||
|
{
|
||||||
|
OrderTransitListCtrlViewModel ViewModel;
|
||||||
|
|
||||||
|
public OrderTransitListCtrl(oms_wei_order_item_transit_model transitInfo)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
UpdateViewModel(transitInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateViewModel(oms_wei_order_item_transit_model transitInfo)
|
||||||
|
{
|
||||||
|
ViewModel = new OrderTransitListCtrlViewModel(transitInfo);
|
||||||
|
ViewModel.RequestClose += ViewModel_RequestClose;
|
||||||
|
|
||||||
|
DataContext = ViewModel;
|
||||||
|
this.lbxTransitList.ItemsSource = ViewModel.TransitInfo.OrderItemTransitDetailList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ViewModel_RequestClose()
|
||||||
|
{
|
||||||
|
Window parentWindow = Window.GetWindow(this);
|
||||||
|
if (this.IsLoaded && parentWindow != null)
|
||||||
|
parentWindow.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OrderTransitListCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window parentWindow = Window.GetWindow(this);
|
||||||
|
if (parentWindow != null)
|
||||||
|
{
|
||||||
|
parentWindow.Closed += ChangeWaybillView_Closed;
|
||||||
|
}
|
||||||
|
ViewModel.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangeWaybillView_Closed(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
using AllBase.Model.DBModel;
|
||||||
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
|
|
||||||
|
public class OrderTransitListCtrlViewModel : PropertyNotifyObject
|
||||||
|
{
|
||||||
|
private volatile bool _isWindowLoaded = false;
|
||||||
|
|
||||||
|
public oms_wei_order_item_transit_model TransitInfo
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.TransitInfo); }
|
||||||
|
set { this.SetValue(x => x.TransitInfo, value); }
|
||||||
|
}
|
||||||
|
public oms_wei_order_item_info OrderItem
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.OrderItem); }
|
||||||
|
set { this.SetValue(x => x.OrderItem, value); }
|
||||||
|
}
|
||||||
|
public string OrderIdStr
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.OrderIdStr); }
|
||||||
|
set { this.SetValue(x => x.OrderIdStr, value); }
|
||||||
|
}
|
||||||
|
public string ShopNameStr
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.ShopNameStr); }
|
||||||
|
set { this.SetValue(x => x.ShopNameStr, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>请求关闭窗口</summary>
|
||||||
|
public event Action RequestClose;
|
||||||
|
|
||||||
|
public OrderTransitListCtrlViewModel(oms_wei_order_item_transit_model transitInfo)
|
||||||
|
{
|
||||||
|
TransitInfo = transitInfo;
|
||||||
|
OrderItem = transitInfo?.OrderItem;
|
||||||
|
OrderIdStr = OrderItem?.order_id;
|
||||||
|
ShopNameStr = OrderItem?.ItemOrder?.Shop?.ShopAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 窗口加载完成时调用
|
||||||
|
/// </summary>
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
_isWindowLoaded = true;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 窗口关闭时调用,停止后台任务
|
||||||
|
/// </summary>
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
_isWindowLoaded = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,411 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderTransitListDetailCtrl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:wpf="WPFCommon"
|
||||||
|
d:DesignHeight="280"
|
||||||
|
d:DesignWidth="1200"
|
||||||
|
Background="White"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style BasedOn="{StaticResource TitleContentBaseStyle}" TargetType="wpf:TitleContent">
|
||||||
|
<Setter Property="Placement" Value="Left" />
|
||||||
|
<Setter Property="TitleVerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="LeftTitlePadding" Value="0,0,0,0" />
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="wpf:SpacingStackPanel">
|
||||||
|
<Setter Property="Margin" Value="3,0" />
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Border
|
||||||
|
MinHeight="50"
|
||||||
|
Margin="5"
|
||||||
|
BorderBrush="#8087CEEB"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="10">
|
||||||
|
<Grid Opacity="{Binding Opacity}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Background="#5087CEEB" CornerRadius="8,8,0,0">
|
||||||
|
<StackPanel MinHeight="30" Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="仓库订单号" />
|
||||||
|
<TextBox
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
d:Text="261008-123456789012345"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="DimGray"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding OrderCode}" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Text="发货包裹"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Foreground="{Binding TransitTypeStrColor}"
|
||||||
|
Text="{Binding TransitTypeStr}" />
|
||||||
|
<TextBox
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
d:Text="ABCDEF1"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="DimGray"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding SourceCode}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="0.7*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="0.5*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border
|
||||||
|
Margin="0,10"
|
||||||
|
BorderBrush="LightSkyBlue"
|
||||||
|
BorderThickness="0,0,1,0">
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Margin="10,10"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4">
|
||||||
|
<wpf:TitleContent Title="交易单号:" Foreground="#FF666666">
|
||||||
|
<TextBox
|
||||||
|
d:Text="371234567890123456"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="#FF888888"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding WxOrderId}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="采购账户:" Foreground="#FF666666">
|
||||||
|
<WrapPanel>
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtOutOrderBuyer"
|
||||||
|
d:Text="张三"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Cursor="Hand"
|
||||||
|
Foreground="#AA0000FF"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding OutBuyerId}"
|
||||||
|
Text="{Binding OutBuyerName}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<Border
|
||||||
|
x:Name="borderTransitBuyerRefundStatus"
|
||||||
|
Height="auto"
|
||||||
|
MinWidth="30"
|
||||||
|
Margin="2,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Background="{StaticResource PageOkBrush}"
|
||||||
|
d:BorderBrush="{StaticResource PageOkBrush}"
|
||||||
|
Background="{Binding TransitDetailRefundStatusBackColor}"
|
||||||
|
BorderBrush="{Binding TransitDetailRefundStatusBackColor}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="2"
|
||||||
|
Visibility="{Binding TransitDetailRefundStatusStrVisibility}">
|
||||||
|
<TextBlock
|
||||||
|
x:Name="txtRefundStatus"
|
||||||
|
MinWidth="20"
|
||||||
|
Padding="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Text="退货成功"
|
||||||
|
Background="Transparent"
|
||||||
|
Foreground="White"
|
||||||
|
Text="{Binding TransitDetailRefundStatusStr}" />
|
||||||
|
</Border>
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="采购单号:" Foreground="#FF666666">
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtOutOrderId"
|
||||||
|
d:Text="261008-1234567890123456"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Cursor="Hand"
|
||||||
|
Foreground="#AA0000FF"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding OutOrderId}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="下单时间:" Foreground="#FF666666">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-07 10:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="#FF888888"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding WxOrderCreateTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="添加时间:" Foreground="#FF666666">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-07 18:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="#FF888888"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding TransitAddTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="创建时间:" Foreground="#FF666666">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-08 00:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="#FF888888"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding CreateTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<!--<wpf:TitleContent Title="店铺名称:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="芥麦亚"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding ShopName}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>-->
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="0,10"
|
||||||
|
BorderBrush="LightSkyBlue"
|
||||||
|
BorderThickness="0,0,1,0"
|
||||||
|
Opacity="0.5">
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Margin="10,10"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4">
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="{Binding WarehouseName}"
|
||||||
|
d:Title="上海仓"
|
||||||
|
FontWeight="Bold">
|
||||||
|
<WrapPanel>
|
||||||
|
<TextBox
|
||||||
|
d:Text="已出仓"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
FontWeight="Normal"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding WarehouseStatus}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="入库单号:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="JTSD-JT12345678901122"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding UpperWaybill}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="出库单号:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="YD-3111111555555123"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding DownWaybill}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="货架号:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="EB3021"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding ShelfCodeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="货架记录时间:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-08 00:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding ShelfTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="0,10"
|
||||||
|
BorderBrush="LightSkyBlue"
|
||||||
|
BorderThickness="0,0,1,0"
|
||||||
|
Opacity="0.5">
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Margin="10,10"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4">
|
||||||
|
<wpf:TitleContent Title="作废状态:" FontWeight="Bold">
|
||||||
|
<TextBox
|
||||||
|
d:Text="已作废"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
FontWeight="Normal"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding TransitVoidStatus}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="拒收状态:" FontWeight="Bold">
|
||||||
|
<TextBox
|
||||||
|
d:Text="拒收失败"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
FontWeight="Normal"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding TransitRejectStatus}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="拦截状态:" FontWeight="Bold">
|
||||||
|
<TextBox
|
||||||
|
d:Text="已拦截"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
FontWeight="Normal"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding TransitReturnStatus}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border
|
||||||
|
Grid.Column="3"
|
||||||
|
Margin="0,10"
|
||||||
|
BorderBrush="LightSkyBlue"
|
||||||
|
BorderThickness="0,0,1,0"
|
||||||
|
Opacity="0.5">
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Margin="10,10"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="4">
|
||||||
|
<wpf:TitleContent Title="到仓时间:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-07 10:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding InboundTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="取号时间:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-08 00:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding PickUpTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
<wpf:TitleContent Title="出仓时间:">
|
||||||
|
<TextBox
|
||||||
|
d:Text="26-10-07 10:33:33"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Text="{Binding OutboundTimeStr}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</wpf:TitleContent>
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="4">
|
||||||
|
<wpf:SpacingStackPanel
|
||||||
|
Grid.Column="8"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalSpacing="5">
|
||||||
|
<Button
|
||||||
|
x:Name="btnVoidPackage"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="2"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Click="btnVoidPackage_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding VoidPackageBtnVisibility}">
|
||||||
|
作废包裹
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnAddEditTransitWarehouseReject_New"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="2"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Click="btnAddEditTransitWarehouseReject_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding RejectPackageBtnVisibility}">
|
||||||
|
<!--<TextBlock>
|
||||||
|
云仓拒收<LineBreak />
|
||||||
|
退回总店</TextBlock>-->
|
||||||
|
云仓拒收退回总店
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnAddEditTransitWarehouseAfterSale_n1"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="2"
|
||||||
|
Click="btnAddEditTransitWarehouseAfterSale_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding ReturnPackageBtnVisibility}">
|
||||||
|
拒收失败转寄总店
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnAddEditTransitWarehouseAfterSale_n2"
|
||||||
|
MinWidth="38"
|
||||||
|
MinHeight="20"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="2"
|
||||||
|
Click="btnAddEditTransitWarehouseAfterSale_Click"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding InterceptPackageBtnVisibility}">
|
||||||
|
出库拦截退回仓库
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnTransitExtraPackages"
|
||||||
|
Height="20"
|
||||||
|
MinWidth="38"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Padding="2"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Click="btnTransitExtraPackages_Click"
|
||||||
|
Content="滞留补发买家"
|
||||||
|
FontSize="11"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
Visibility="{Binding ExtraPackagesBtnVisibility}" />
|
||||||
|
</wpf:SpacingStackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,246 @@
|
|||||||
|
using _29WxOrderWpf.BaseWindows;
|
||||||
|
using _29WxOrderWpf.Views;
|
||||||
|
using AllBase;
|
||||||
|
using AllBase.Helper;
|
||||||
|
using AllBase.Model.DBModel;
|
||||||
|
using NaiBa.Util.Extension;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using Work;
|
||||||
|
using Work._29Tools.BLL;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OrderTransitListDetailCtrl.xaml 的交互逻辑
|
||||||
|
/// </summary>
|
||||||
|
public partial class OrderTransitListDetailCtrl : UserControl
|
||||||
|
{
|
||||||
|
public OrderTransitListDetailCtrl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.txtOutOrderId.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOutOrderId_MouseLeftButtonUp), true);
|
||||||
|
this.txtOutOrderBuyer.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOutOrderId_MouseLeftButtonUp), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> 作废包裹 </summary>
|
||||||
|
private async void btnVoidPackage_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (this.DataContext is oms_wei_order_item_transit_detail_info transitDetailInfo)
|
||||||
|
{
|
||||||
|
btnVoidPackage.IsEnabled = false;
|
||||||
|
var orderItem = transitDetailInfo.oms_wei_order_item_info;
|
||||||
|
var transitOrder = transitDetailInfo.oms_wei_external_procurement_log_info;
|
||||||
|
var returnOrder = transitDetailInfo.oms_wei_external_procurement_after_sale_info;
|
||||||
|
var extOrder = transitDetailInfo.oms_wei_transfer_extra_package;
|
||||||
|
|
||||||
|
// 作废发货包裹
|
||||||
|
if (transitOrder != null)
|
||||||
|
{
|
||||||
|
transitOrder = orderItem.ItemTransitOrders.FirstOrDefault(t => t.order_code == transitOrder.order_code) ?? transitOrder;
|
||||||
|
await OrderTransitService.VoidOrder(orderItem, transitOrder);
|
||||||
|
}
|
||||||
|
// 作废退货包裹
|
||||||
|
else if (returnOrder != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var voidResult = await OrderTransitService.VoidAfterSalePackage(orderItem, returnOrder);
|
||||||
|
if (!string.IsNullOrEmpty(voidResult))
|
||||||
|
BaseMsgWindow.ShowInfo(voidResult);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 作废额外包裹
|
||||||
|
else if (extOrder != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var voidResult = await OrderTransitService.VoidExtraPackage(orderItem, extOrder);
|
||||||
|
if (!string.IsNullOrEmpty(voidResult))
|
||||||
|
BaseMsgWindow.ShowInfo(voidResult);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshListCtrl(orderItem);
|
||||||
|
btnVoidPackage.IsEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary> 拒收包裹 </summary>
|
||||||
|
private async void btnAddEditTransitWarehouseReject_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (this.DataContext is oms_wei_order_item_transit_detail_info transitDetailInfo)
|
||||||
|
{
|
||||||
|
btnAddEditTransitWarehouseReject_New.IsEnabled = false;
|
||||||
|
|
||||||
|
var orderItem = transitDetailInfo.oms_wei_order_item_info;
|
||||||
|
var transitOrder = transitDetailInfo.oms_wei_external_procurement_log_info;
|
||||||
|
var returnOrder = transitDetailInfo.oms_wei_external_procurement_after_sale_info;
|
||||||
|
var extOrder = transitDetailInfo.oms_wei_transfer_extra_package;
|
||||||
|
|
||||||
|
// 拒收发货包裹
|
||||||
|
if (transitOrder != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var rejectRst = await OrderTransitService.RejectTransitOrder(orderItem, transitOrder);
|
||||||
|
if (!string.IsNullOrEmpty(rejectRst))
|
||||||
|
BaseMsgWindow.ShowInfo(rejectRst);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 拒收额外包裹(额外包裹暂不支持多件商品发货,故暂不存在拒收功能)
|
||||||
|
else if (extOrder != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshListCtrl(orderItem);
|
||||||
|
btnAddEditTransitWarehouseReject_New.IsEnabled = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnAddEditTransitWarehouseAfterSale_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (this.DataContext is oms_wei_order_item_transit_detail_info transitDetailInfo)
|
||||||
|
{
|
||||||
|
btnAddEditTransitWarehouseAfterSale_n1.IsEnabled = false;
|
||||||
|
btnAddEditTransitWarehouseAfterSale_n2.IsEnabled = false;
|
||||||
|
|
||||||
|
var orderItem = transitDetailInfo.oms_wei_order_item_info;
|
||||||
|
var transitOrder = transitDetailInfo.oms_wei_external_procurement_log_info;
|
||||||
|
var returnOrder = transitDetailInfo.oms_wei_external_procurement_after_sale_info;
|
||||||
|
var extOrder = transitDetailInfo.oms_wei_transfer_extra_package;
|
||||||
|
|
||||||
|
if (transitOrder != null)
|
||||||
|
{
|
||||||
|
bool isOutWarehouse = sender == btnAddEditTransitWarehouseAfterSale_n2;
|
||||||
|
OrderListRowItemCtrl.ShowReturnPackageWindow(orderItem, transitDetailInfo, isOutWarehouse);
|
||||||
|
}
|
||||||
|
else if (extOrder != null)
|
||||||
|
{
|
||||||
|
bool isOutWarehouse = sender == btnAddEditTransitWarehouseAfterSale_n2;
|
||||||
|
OrderListRowItemCtrl.ShowReturnPackageWindow(orderItem, transitDetailInfo, isOutWarehouse);
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshListCtrl(orderItem);
|
||||||
|
btnAddEditTransitWarehouseAfterSale_n1.IsEnabled = true;
|
||||||
|
btnAddEditTransitWarehouseAfterSale_n2.IsEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnTransitExtraPackages_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
// 滞留补发买家(补发包裹)
|
||||||
|
if (this.DataContext is oms_wei_order_item_transit_detail_info transitDetailInfo)
|
||||||
|
{
|
||||||
|
var orderItem = transitDetailInfo.oms_wei_order_item_info;
|
||||||
|
var transitOrder = transitDetailInfo.oms_wei_external_procurement_log_info;
|
||||||
|
var returnOrder = transitDetailInfo.oms_wei_external_procurement_after_sale_info;
|
||||||
|
var extOrder = transitDetailInfo.oms_wei_transfer_extra_package;
|
||||||
|
|
||||||
|
if (transitOrder != null)
|
||||||
|
{
|
||||||
|
// 不是中转仓,直接返回
|
||||||
|
if (transitOrder == null)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("非中转仓订单不支持补发!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TransitExtraPackagesView transitExtraPackagesView = new TransitExtraPackagesView(orderItem.ItemOrder, orderItem, transitOrder);
|
||||||
|
new DialogWindow()
|
||||||
|
{
|
||||||
|
Title = "滞留补发买家",
|
||||||
|
Content = transitExtraPackagesView,
|
||||||
|
}.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshListCtrl(orderItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshListCtrl(oms_wei_order_item_info orderItem)
|
||||||
|
{
|
||||||
|
// 更新列表
|
||||||
|
if (FindParent<OrderTransitListCtrl>(this) is OrderTransitListCtrl transitListCtrl)
|
||||||
|
{
|
||||||
|
oms_wei_order_item_transit_model transitInfo = new oms_wei_order_item_transit_model()
|
||||||
|
{
|
||||||
|
OrderItem = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == orderItem?.order_id)?.OrderItems.FirstOrDefault(oi => oi.sku_id == orderItem?.sku_id),
|
||||||
|
};
|
||||||
|
transitListCtrl.UpdateViewModel(transitInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找指定类型的父级控件
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">目标父控件类型</typeparam>
|
||||||
|
/// <param name="child">起始子控件</param>
|
||||||
|
/// <returns>找到的父控件,未找到则返回 null</returns>
|
||||||
|
public static T FindParent<T>(DependencyObject child) where T : DependencyObject
|
||||||
|
{
|
||||||
|
DependencyObject parentObject = VisualTreeHelper.GetParent(child);
|
||||||
|
|
||||||
|
if (parentObject == null) return null;
|
||||||
|
|
||||||
|
if (parentObject is T parent)
|
||||||
|
{
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 递归继续向上查找
|
||||||
|
return FindParent<T>(parentObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtOutOrderId_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (this.DataContext is oms_wei_order_item_transit_detail_info transitDetailInfo && transitDetailInfo.oms_wei_order_item_info is oms_wei_order_item_info orderItem)
|
||||||
|
{
|
||||||
|
var buyerId = txtOutOrderBuyer.Tag as string;
|
||||||
|
var buyerName = txtOutOrderBuyer.Text;
|
||||||
|
var outOrderId = txtOutOrderId.Text;
|
||||||
|
if (string.IsNullOrEmpty(buyerName) || string.IsNullOrEmpty(outOrderId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isShowOrderList = sender == txtOutOrderBuyer;
|
||||||
|
|
||||||
|
OrderBuyerOrdersHelper.ShowBuyerOrder(orderItem, buyerId, buyerName, outOrderId, isShowOrderList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,351 @@
|
|||||||
|
using _29WxOrderWpf.BaseWindows;
|
||||||
|
using _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||||
|
using _29WxOrderWpf.ViewModels;
|
||||||
|
using _29WxOrderWpf.Views;
|
||||||
|
using AllBase;
|
||||||
|
using AllBase.Helper;
|
||||||
|
using AllBase.Model.DBModel;
|
||||||
|
using AllBase.Model.Result;
|
||||||
|
using NaiBa.Util.Extension;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Work;
|
||||||
|
using Work._29Tools.BLL;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
|
|
||||||
|
internal class OrderTransitService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 作废中转仓发货包裹
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderItem"></param>
|
||||||
|
/// <param name="isSilent"></param>
|
||||||
|
/// <param name="UpdateOrderBeforeVoid">作废前是否更新服务端订单状态</param>
|
||||||
|
public static async Task VoidOrder(oms_wei_order_item_info orderItem, oms_wei_external_procurement_log_info transitOrder = null, bool isSilent = false, bool UpdateOrderBeforeVoid = true)
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
{
|
||||||
|
if (BaseMsgWindow.ShowConfirm("确定作废当前包裹吗?").DialogResult == false)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 作废前查询订单状态
|
||||||
|
var orderId = orderItem.order_id;
|
||||||
|
var skuId = orderItem.sku_id;
|
||||||
|
if (UpdateOrderBeforeVoid)
|
||||||
|
await Task.Run(async() => { await MainWindow.Instance.orderListCtrl.GetOrder(orderId); });
|
||||||
|
|
||||||
|
var newOrder = GlobalConfig.lstOrder.FirstOrDefault(or => or.order_id == orderId);
|
||||||
|
if (newOrder?.OrderItems.Count == 1)
|
||||||
|
orderItem = newOrder?.OrderItems?.FirstOrDefault();
|
||||||
|
else
|
||||||
|
orderItem = newOrder?.OrderItems?.FirstOrDefault(oi => oi.sku_id == skuId);
|
||||||
|
|
||||||
|
if (orderItem == null)
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
BaseMsgWindow.ShowError("订单查询失败,请重试");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (transitOrder == null)
|
||||||
|
transitOrder = orderItem.ItemTransitOrder ?? orderItem.ItemTransitOrderWithVoid;
|
||||||
|
|
||||||
|
if (transitOrder == null)
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
BaseMsgWindow.ShowError("要作废的中转订单不存在,请确认后重试");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 先作废后申请买手退款
|
||||||
|
// 订单作废接口(作废重拍)
|
||||||
|
//postman request POST 'http://localhost:8088/oms-api/external_procurement/discardOrder' \
|
||||||
|
// --header 'Content-Type: application/json' \
|
||||||
|
// --body '{
|
||||||
|
// "orderNo":"12334534534",
|
||||||
|
// "outOrderNo":"12312312"
|
||||||
|
//}' 成功返回code:0 失败返回code:1
|
||||||
|
|
||||||
|
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/discardOrder";
|
||||||
|
var data2 = new JObject();
|
||||||
|
data2["orderNo"] = orderItem.order_id;
|
||||||
|
//data2["outOrderNo"] = transitOrder.out_order_no;
|
||||||
|
data2["outOrderNo"] = transitOrder.order_code;
|
||||||
|
var dataStr2 = JsonHelper.SerializeObject(data2);
|
||||||
|
var discardRst = await HttpResponseWXBLL.e57PostResponseAsync(url2, dataStr2);
|
||||||
|
if (discardRst.Contains("\"code\":0") || discardRst.Contains("\"code\":200"))
|
||||||
|
{
|
||||||
|
//MainWindow.Instance.orderListCtrl.GetOrder(orderId);
|
||||||
|
// 修改为在买手退款流程后提示作废信息
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var msg = BaseRegex.GetStringJsonByRegs(ref discardRst, discardRst, "msg");
|
||||||
|
if (!isSilent)
|
||||||
|
BaseMsgWindow.ShowInfo("订单作废失败,服务端返回 " + msg);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 处理买手售后
|
||||||
|
if (transitOrder.out_order_no.ParseToString().StartsWith("tb_")) // 淘宝买手售后
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
BaseMsgWindow.ShowError("淘宝买手暂不支持自动售后,作废后请手动申请售后");
|
||||||
|
else
|
||||||
|
transitOrder.refund_status = "淘宝买手暂不支持自动售后,作废后需手动申请售后";
|
||||||
|
}
|
||||||
|
else // 拼多多买手售后
|
||||||
|
{
|
||||||
|
bool noBuyer = false;
|
||||||
|
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_id == transitOrder.buyer_account || b.buyer_name == transitOrder.buyer_account);
|
||||||
|
if (buyer == null)
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
if (BaseMsgWindow.ShowConfirm("拍单买手不存在,点击确定直接作废中转单并手动取消买手单,点击取消登录买手后重试").DialogResult != true)
|
||||||
|
return;
|
||||||
|
noBuyer = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检测一下买手号
|
||||||
|
if (GlobalConfig.CurrentPddBuyer.status == "在线")
|
||||||
|
{
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
PddMobileLoginViewModel.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (GlobalConfig.CurrentPddBuyer.status != "在线")
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
if (BaseMsgWindow.ShowConfirm("买手号掉线,点击确定直接作废中转单并手动取消买手单,点击取消登录买手后重试").DialogResult != true)
|
||||||
|
return;
|
||||||
|
noBuyer = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!noBuyer)
|
||||||
|
{
|
||||||
|
PddBuyerOrderLiteInfo order = null;
|
||||||
|
order = PDDBuyerOrderReadCtrl.lstPddBuyerOrderInfoLite.FirstOrDefault(o => o.order_sn == transitOrder.out_order_no);
|
||||||
|
if (order == null)
|
||||||
|
order = new PddBuyerOrderLiteInfo()
|
||||||
|
{
|
||||||
|
order_status_prompt = "待发货",
|
||||||
|
order_amount = transitOrder.out_amount,
|
||||||
|
order_sn = transitOrder.out_order_no
|
||||||
|
};
|
||||||
|
PDDBuyerOrderReadCtrl.lstPddBuyerOrderInfoLite.Add(order);
|
||||||
|
|
||||||
|
var pddAfterRst = "";
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
pddAfterRst = PDDBuyerOrderReadCtrl.SimPddAfterSale(buyer, order);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (pddAfterRst.Contains("\"after_sales_status\":1") || pddAfterRst.Contains("该订单已全额退款") || pddAfterRst.Contains("订单未付款"))
|
||||||
|
{
|
||||||
|
// 保存退款成功状态
|
||||||
|
order.order_status_prompt = pddAfterRst.Contains("订单未付款") ? "订单未付款" : "退款成功";
|
||||||
|
// 中转仓订单买手号售后信息 存到服务端
|
||||||
|
var refundRst = PDDBuyerOrderReadCtrl.SendTransitAfterSaleE57(order);
|
||||||
|
if (refundRst.Contains("<code>0</code>") || refundRst.Contains("<code>200</code>"))
|
||||||
|
{
|
||||||
|
order.sendStatus = "退款成功 买手退款信息更新成功";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var msg = BaseRegex.GetStringXml(ref refundRst, "msg");
|
||||||
|
order.sendStatus = "退款成功 买手退款信息更新失败,服务端返回 " + msg;
|
||||||
|
}
|
||||||
|
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order_list", PDDBuyerOrderReadCtrl.lstPddBuyerOrderInfoLite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!isSilent)
|
||||||
|
if (BaseMsgWindow.ShowConfirm("买手退款失败,点击确定直接作废中转单并手动取消买手单,点击取消稍候重试").DialogResult != true)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 更新拍单余额
|
||||||
|
StartUp.UpdateBalance();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 立即更新订单
|
||||||
|
transitOrder = orderItem.ItemTransitOrders.FirstOrDefault(o => o.order_code == transitOrder.order_code) ?? transitOrder;
|
||||||
|
transitOrder.order_void_status = 1;
|
||||||
|
orderItem.SetOrderItemTextProperty();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 重新过滤订单
|
||||||
|
OrderListCtrl.InitOrderItemObservableProp(orderItem);
|
||||||
|
MainWindow.Instance.orderListCtrl.FilterOrders();
|
||||||
|
if (!isSilent)
|
||||||
|
BaseMsgWindow.ShowInfo("订单作废成功,请重新拍单");
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作废售后包裹
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="returnOrder"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<string> VoidAfterSalePackage(oms_wei_order_item_info orderItem, oms_wei_external_procurement_after_sale_info returnOrder)
|
||||||
|
{
|
||||||
|
string typeStr = returnOrder?.pack_type == 1 ? "作废分销发货退货包裹" : "作废额外包裹退货包裹";
|
||||||
|
string msg = $@"确定{typeStr}吗?";
|
||||||
|
|
||||||
|
if (BaseMsgWindow.ShowConfirm(msg, typeStr, null, MsgWindowLevel.MEDIUM, 300).DialogResult != true)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/orders/interceptReturn";
|
||||||
|
var data = new JObject();
|
||||||
|
data["externalOrderNo"] = returnOrder.external_order_no;
|
||||||
|
data["orderNo"] = returnOrder.order_no; // 订单编号
|
||||||
|
data["orderCode"] = returnOrder.order_code;
|
||||||
|
data["packType"] = returnOrder.pack_type; /* 1作废分销发货退货包裹 2作废额外包裹退货包裹 */
|
||||||
|
var dataStr2 = JsonHelper.SerializeObject(data);
|
||||||
|
var voidRst = await HttpResponseWXBLL.e57PostResponseAsync(url2, dataStr2);
|
||||||
|
|
||||||
|
if (voidRst.Contains("\"code\":0") || voidRst.Contains("\"code\":200"))
|
||||||
|
{
|
||||||
|
StartUp.UpdateBalance();
|
||||||
|
returnOrder.order_void_status = 1;
|
||||||
|
orderItem.SetOrderItemTextProperty();
|
||||||
|
return typeStr + "成功!";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception(typeStr + "失败,服务端返回:" + BaseRegex.GetStringJsonByRegs(ref voidRst, voidRst, "msg"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 作废额外包裹
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderItem"></param>
|
||||||
|
/// <param name="extraOrder"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="Exception"></exception>
|
||||||
|
public static async Task<string> VoidExtraPackage(oms_wei_order_item_info orderItem, oms_wei_transfer_extra_package extraOrder)
|
||||||
|
{
|
||||||
|
string typeStr = "作废额外包裹";
|
||||||
|
string msg = $@"确定{typeStr}吗?";
|
||||||
|
|
||||||
|
if (BaseMsgWindow.ShowConfirm(msg, typeStr, null, MsgWindowLevel.MEDIUM, 300).DialogResult != true)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
var data = new JObject();
|
||||||
|
data["batchId"] = extraOrder.batchId;
|
||||||
|
data["orderCode"] = extraOrder.order_code;
|
||||||
|
var dataStr = JsonHelper.SerializeObject(data);
|
||||||
|
var url = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/extraOrders/void";
|
||||||
|
var voidRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||||
|
if (BaseRegex.GetStringJson(ref voidRst, "code") != "0" && BaseRegex.GetStringJson(ref voidRst, "code") != "200")
|
||||||
|
{
|
||||||
|
throw new Exception("作废额外包裹失败,服务端返回:" + BaseRegex.GetStringJsonByRegs(ref voidRst, voidRst, "msg"));
|
||||||
|
}
|
||||||
|
StartUp.UpdateBalance();
|
||||||
|
extraOrder.order_void_status = 1;
|
||||||
|
orderItem.SetOrderItemTextProperty();
|
||||||
|
//MainWindow.Instance.orderListCtrl.FilterOneOrder(orderItem.order_id);
|
||||||
|
return "作废额外包裹成功!";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 云仓申请拒收退回总店
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderItem"></param>
|
||||||
|
public static async Task<string> RejectTransitOrder(oms_wei_order_item_info orderItem, oms_wei_external_procurement_log_info _itemTransitOrder)
|
||||||
|
{
|
||||||
|
string msg = $@"
|
||||||
|
云仓拒收退回总店
|
||||||
|
|
||||||
|
说 明:店铺产生售后,拒收成功,货物会原物流退回总店。
|
||||||
|
拒收条件:(总店物流没到云仓/未签收前)。顺丰/京东无法
|
||||||
|
拒收,直接总店申请仅退款让总店拦截。
|
||||||
|
收 费:免费";
|
||||||
|
|
||||||
|
if (BaseMsgWindow.ShowConfirm(msg, "云仓拒收退回总店", null, MsgWindowLevel.LARGE, 300).DialogResult != true)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
orderItem.ItemTransitOrders = await OrderGetOrderListHelper.GetTransitWarehouseList(orderItem.order_id);
|
||||||
|
orderItem.PddBuyerOrders = (await OrderGetOrderListHelper.GetPddBuyerOrders(orderItem.order_id)).Where(o => o.wx_send_type == 0).ToList();
|
||||||
|
orderItem.PddBuyerOrders.AddRange((await OrderGetOrderListHelper.GetTbBuyerOrders(orderItem.order_id)).Where(o => o.wx_send_type == 0).ToList());
|
||||||
|
OrderListCtrl.InitOrderItemObservableProp(orderItem);
|
||||||
|
|
||||||
|
var itemTransitOrder = orderItem.ItemTransitOrders.FirstOrDefault(o => o.order_code == _itemTransitOrder?.order_code && o.out_order_no == _itemTransitOrder?.out_order_no);
|
||||||
|
if (itemTransitOrder == null)
|
||||||
|
itemTransitOrder = _itemTransitOrder;
|
||||||
|
|
||||||
|
//if (itemTransitOrder?.warehouse_status == 3) { BaseMsgWindow.ShowError("商品已拒收或拦截!"); return; }
|
||||||
|
//if (itemTransitOrder?.warehouse_status == 2) { BaseMsgWindow.ShowError("商品已出库,请选择退回中转仓!"); return; }
|
||||||
|
//if (string.IsNullOrEmpty(orderItem.PddBuyerOrder?.order_sn)) { BaseMsgWindow.ShowError("商品未出单,请直接去拼多多买手申请退款"); return; }
|
||||||
|
if (itemTransitOrder?.has_reject == 1 || itemTransitOrder?.has_reject == 3)
|
||||||
|
{
|
||||||
|
//BaseMsgWindow.ShowAnimateMessage("已申请拒收", "Msg", 3);
|
||||||
|
return "已申请过拒收";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 中转仓拒收(已产生物流)
|
||||||
|
string url = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/orders/rejectApply";
|
||||||
|
var dataObj = new JObject();
|
||||||
|
dataObj["orderCode"] = itemTransitOrder?.order_code;
|
||||||
|
dataObj["orderId"] = orderItem.order_id;
|
||||||
|
dataObj["logisticsExpressCode"] = orderItem.PddBuyerOrder?.order_sn;
|
||||||
|
var data = JsonHelper.SerializeObject(dataObj);
|
||||||
|
var html = HttpResponseWXBLL.e57PostResponse(url, data, "");
|
||||||
|
int rejectStatus = 0;
|
||||||
|
if (html.Contains("<code>0</code>") || html.Contains("<code>200</code>"))
|
||||||
|
{
|
||||||
|
rejectStatus = 1;
|
||||||
|
//BaseMsgWindow.ShowAnimateMessage("申请成功", "Msg", 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rejectStatus = 2;
|
||||||
|
var err = BaseRegex.GetStringXmlByRegs(ref html, html, "msg");
|
||||||
|
//BaseMsgWindow.ShowAnimateMessage("申请失败", "Error", 3);
|
||||||
|
throw new Exception("申请失败" + err);
|
||||||
|
}
|
||||||
|
url = BaseClass.Build29WxObjString("order/wx_update_transit_order_reject_status");
|
||||||
|
data = UserLogin.GetSignaturex();
|
||||||
|
data += "&order_no=" + orderItem.order_id;
|
||||||
|
data += "&order_sku_id=" + orderItem.sku_id;
|
||||||
|
data += "&has_reject=" + rejectStatus;
|
||||||
|
html = await GetHtml.PostUtf8Async(url, data);
|
||||||
|
|
||||||
|
itemTransitOrder.has_reject = rejectStatus;
|
||||||
|
OrderListCtrl.InitOrderItemObservableProp(orderItem);
|
||||||
|
|
||||||
|
return "申请成功";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 申请拒收后查询拒收状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderItem"></param>
|
||||||
|
/// <param name="upperWaybill"></param>
|
||||||
|
public static void ShowRejectTransitOrder(oms_wei_order_item_info orderItem, string upperWaybill)
|
||||||
|
{
|
||||||
|
BaiduGetWaybillInfoView buyerLoginForm = new BaiduGetWaybillInfoView(orderItem);
|
||||||
|
buyerLoginForm.ViewModel.InitUrl = "https://www.baidu.com/s?ie=UTF-8&wd=" + upperWaybill;
|
||||||
|
|
||||||
|
new DialogWindow()
|
||||||
|
{
|
||||||
|
Width = 1280,
|
||||||
|
Height = 800,
|
||||||
|
Title = "物流拒收查询",
|
||||||
|
Content = buyerLoginForm,
|
||||||
|
}.Show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
// 填写信息
|
||||||
|
function changeReactInputValue(inputDom, newText) {
|
||||||
|
let lastValue = inputDom.value;
|
||||||
|
inputDom.value = newText;
|
||||||
|
let event = new Event('input', { bubbles: true });
|
||||||
|
event.simulated = true;
|
||||||
|
let tracker = inputDom._valueTracker;
|
||||||
|
if (tracker) {
|
||||||
|
tracker.setValue(lastValue);
|
||||||
|
}
|
||||||
|
inputDom.dispatchEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 异步 sleep
|
||||||
|
function sleep(ms) {
|
||||||
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查找元素(支持选择器或XPath)
|
||||||
|
function findElement(selector, isXPath = true) {
|
||||||
|
if (isXPath) {
|
||||||
|
return document.evaluate(
|
||||||
|
selector,
|
||||||
|
document,
|
||||||
|
null,
|
||||||
|
XPathResult.FIRST_ORDERED_NODE_TYPE,
|
||||||
|
null
|
||||||
|
).singleNodeValue;
|
||||||
|
} else {
|
||||||
|
return document.querySelector(selector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 完整流程
|
||||||
|
async function changeTbAddress(data = {}) {
|
||||||
|
const {
|
||||||
|
transitAddress = ''
|
||||||
|
} = data;
|
||||||
|
|
||||||
|
console.log('📝 开始自动填写地址...');
|
||||||
|
|
||||||
|
// 1. 点击"修改"按钮,弹出修改地址框
|
||||||
|
var btnType = findElement('(//a[contains(text(), "修改")])[1]');
|
||||||
|
for (i = 0; i < 10; i++) {
|
||||||
|
if (!btnType) {
|
||||||
|
console.warn('⚠️ 找不到"修改"按钮,等待重试' + i);
|
||||||
|
await sleep(500);
|
||||||
|
btnType = findElement('(//a[contains(text(), "修改")])[1]');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!btnType) {
|
||||||
|
console.warn('⚠️ 找不到"修改"按钮');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
btnType.click();
|
||||||
|
console.log('✅ 已点击"修改"按钮');
|
||||||
|
await sleep(500);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// // 2. 填充并自动识别收货地址
|
||||||
|
// const invoiceTitle = findElement('//label[contains(text(), "发票抬头")]/following-sibling::textarea[1]') ||
|
||||||
|
// findElement('//*[contains(text(), "发票抬头")]/following-sibling::textarea[1]');
|
||||||
|
// if (invoiceTitle) {
|
||||||
|
// changeReactInputValue(invoiceTitle, title);
|
||||||
|
// console.log('✅ 发票抬头已填充');
|
||||||
|
// } else {
|
||||||
|
// console.warn('⚠️ 未找到发票抬头控件');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 3. 查找并填充税号
|
||||||
|
// const taxNumberInput = findElement('//label[contains(text(), "税号")]/following-sibling::input[1]') ||
|
||||||
|
// findElement('//*[contains(text(), "税号")]/following-sibling::input[1]');
|
||||||
|
// if (taxNumberInput) {
|
||||||
|
// changeReactInputValue(taxNumberInput, taxNumber);
|
||||||
|
// console.log('✅ 税号已填充');
|
||||||
|
// } else {
|
||||||
|
// console.warn('⚠️ 未找到税号控件');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// await sleep(300);
|
||||||
|
|
||||||
|
// // 4. 查找并点击"申请发票"按钮
|
||||||
|
// const applyBtn = findElement('//*[contains(text(), "申请发票")]');
|
||||||
|
// if (!applyBtn) {
|
||||||
|
// console.error('❌ 未找到"申请发票"按钮');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// applyBtn.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
// await sleep(300);
|
||||||
|
// applyBtn.click();
|
||||||
|
// console.log('✅ 已点击"申请发票"按钮');
|
||||||
|
|
||||||
|
// // 5. 等待弹窗/状态出现
|
||||||
|
// await sleep(300);
|
||||||
|
|
||||||
|
// // 6. 判断状态
|
||||||
|
// // 检查是否有"已经申请过"的提示
|
||||||
|
// const alreadyApplied = findElement('//*[contains(text(), "您已经提交过发票申请了")]')
|
||||||
|
|
||||||
|
|
||||||
|
// if (alreadyApplied) {
|
||||||
|
// console.log('✅ 已经申请过,无需重复操作');
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// const successElement = findElement('//*[text()="确认发票信息无误后再提交"]');
|
||||||
|
// if (successElement == null) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// // 检查是否有"确认开具"按钮或提示
|
||||||
|
// const confirmBtn = findElement('//*[text()= "确认"]');
|
||||||
|
|
||||||
|
// if (confirmBtn) {
|
||||||
|
// console.log('✅ 找到"确认"按钮,准备点击...');
|
||||||
|
// await sleep(200);
|
||||||
|
// confirmBtn.click();
|
||||||
|
// console.log('✅ 已点击"确认"按钮');
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 如果都没有找到
|
||||||
|
// console.warn('⚠️ 未找到"已经申请过"或"确认"按钮,请手动检查');
|
||||||
|
// return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 调用 ==========
|
||||||
|
(async function () {
|
||||||
|
try {
|
||||||
|
const result = await changeTbAddress({
|
||||||
|
transitAddress: '{中转仓地址}'
|
||||||
|
});
|
||||||
|
console.log('执行结果:', result);
|
||||||
|
// 批量开票时,C# 端轮询该变量获取执行结果
|
||||||
|
window.__invoiceApplyResult = result;
|
||||||
|
} catch (ex) {
|
||||||
|
console.error('执行异常:', ex);
|
||||||
|
window.__invoiceApplyResult = false;
|
||||||
|
}
|
||||||
|
})();
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
using _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -15,6 +16,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using WPFCommon.Models;
|
using WPFCommon.Models;
|
||||||
|
using WxOrder.Framework.Commons.Dialogs;
|
||||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.PDDInvoice;
|
namespace _29WxOrderWpf.Ctrls.PDDInvoice;
|
||||||
@@ -22,19 +24,26 @@ namespace _29WxOrderWpf.Ctrls.PDDInvoice;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// PDDInvoiceDialog.xaml 的交互逻辑
|
/// PDDInvoiceDialog.xaml 的交互逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class PDDInvoiceDialog : UserControl
|
public partial class PDDInvoiceDialog : UserControl, IDialogAware
|
||||||
{
|
{
|
||||||
public PDDInvoiceDialog()
|
public PDDInvoiceDialog(InvoiceConfig config)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
Config = NaiBa.Util.Helper.ConfigHelper.LoadConfig<InvoiceConfig>(ConfigPath);
|
Config = new InvoiceConfig();
|
||||||
|
Config.Assign(config);
|
||||||
}
|
}
|
||||||
|
public string Title { get; set; }
|
||||||
|
public event Action<IDialogResult> RequestClose;
|
||||||
|
|
||||||
private void PDDInvoiceDialog_Loaded(object sender, RoutedEventArgs e)
|
private void PDDInvoiceDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public void OnDialogOpened(IDialogParameters parameters)
|
||||||
|
{
|
||||||
|
Title = "设置";
|
||||||
|
}
|
||||||
|
|
||||||
private void ViewModel_RequestClose()
|
private void ViewModel_RequestClose()
|
||||||
{
|
{
|
||||||
@@ -44,21 +53,35 @@ public partial class PDDInvoiceDialog : UserControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private const string ConfigPath = "./invoice.config";
|
|
||||||
public InvoiceConfig Config { get; }
|
public InvoiceConfig Config { get; }
|
||||||
|
|
||||||
public ICommand ConfirmCommand => new DelegateCommand(Confirm);
|
public ICommand ConfirmCommand => new DelegateCommand(Confirm);
|
||||||
|
|
||||||
private void Confirm()
|
private void Confirm()
|
||||||
{
|
{
|
||||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig(ConfigPath, Config);
|
RequestClose?.Invoke(new DialogResult(ButtonResult.OK, new DialogParameters
|
||||||
ViewModel_RequestClose();
|
{
|
||||||
|
{ "config",Config}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
public ICommand CancelCommand => new DelegateCommand(Cancel);
|
public ICommand CancelCommand => new DelegateCommand(Cancel);
|
||||||
|
|
||||||
|
|
||||||
private void Cancel()
|
private void Cancel()
|
||||||
{
|
{
|
||||||
ViewModel_RequestClose();
|
RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CanCloseDialog()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDialogClosed()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2,15 +2,15 @@
|
|||||||
x:Class="_29WxOrderWpf.Ctrls.PDDInvoice.PDDInvoiceView"
|
x:Class="_29WxOrderWpf.Ctrls.PDDInvoice.PDDInvoiceView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:comm="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comm="WxOrder.Framework"
|
||||||
xmlns:common="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:common="WxOrder.Framework"
|
||||||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.PDDInvoice.ViewModels"
|
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.PDDInvoice.ViewModels"
|
||||||
xmlns:wpf="clr-namespace:WPFCommon.Controls;assembly=WPFCommon"
|
xmlns:wpf="clr-namespace:WPFCommon.Controls;assembly=WPFCommon"
|
||||||
comm:DialogWindowProperty.ResizeMode="CanResizeWithGrip"
|
comm:DialogWindowProperty.ResizeMode="CanResizeWithGrip"
|
||||||
comm:DialogWindowProperty.ShowMinButton="False"
|
comm:DialogWindowProperty.ShowMinButton="True"
|
||||||
common:DialogWindowProperty.Height="720"
|
common:DialogWindowProperty.Height="720"
|
||||||
common:DialogWindowProperty.Width="1260"
|
common:DialogWindowProperty.Width="1260"
|
||||||
d:DataContext="{d:DesignInstance Type=vm:PDDInvoiceViewModel,
|
d:DataContext="{d:DesignInstance Type=vm:PDDInvoiceViewModel,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
using _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||||
|
using CefSharp.DevTools.Overlay;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -65,9 +66,6 @@ public partial class PDDInvoiceView : UserControl
|
|||||||
{
|
{
|
||||||
_scrollStopTimer.Stop();
|
_scrollStopTimer.Stop();
|
||||||
|
|
||||||
System.Diagnostics.Debug.WriteLine("滚动停止了");
|
|
||||||
|
|
||||||
|
|
||||||
// 用 Background 优先级设置,避免和当前这一帧的滚动惯性/渲染争抢,
|
// 用 Background 优先级设置,避免和当前这一帧的滚动惯性/渲染争抢,
|
||||||
// 让 UI 线程先把滚动动画收尾,再去处理这一波图片加载触发
|
// 让 UI 线程先把滚动动画收尾,再去处理这一波图片加载触发
|
||||||
Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
|
Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
|
||||||
@@ -100,4 +98,5 @@ public partial class PDDInvoiceView : UserControl
|
|||||||
.ContainerFromItem(vm.SelectedOrder) as FrameworkElement;
|
.ContainerFromItem(vm.SelectedOrder) as FrameworkElement;
|
||||||
container?.BringIntoView();
|
container?.BringIntoView();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,134 +1,302 @@
|
|||||||
// 填写信息
|
/*!
|
||||||
|
* invoice_hook.js · v1.0.0
|
||||||
|
* 发票申请 Hook
|
||||||
|
* - 使用 window.InvoiceApply 统一暴露接口
|
||||||
|
* - 支持重复注入,不重复自动执行
|
||||||
|
* - CEF 可通过 window.InvoiceApply.__installed 判断脚本是否已注入
|
||||||
|
* - 执行结果保存在 window.__invoiceApplyResult
|
||||||
|
*/
|
||||||
|
; (function (global) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// 已注入时不重复创建对象或重复自动执行
|
||||||
|
if (global.InvoiceApply && global.InvoiceApply.__installed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var VERSION = '1.0.0';
|
||||||
|
var state = {
|
||||||
|
installed: false,
|
||||||
|
running: false,
|
||||||
|
result: null,
|
||||||
|
error: null,
|
||||||
|
lastRunAt: null
|
||||||
|
};
|
||||||
|
|
||||||
|
function sleep(ms) {
|
||||||
|
return new Promise(function (resolve) {
|
||||||
|
global.setTimeout(resolve, ms);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 支持 XPath 或 CSS 选择器
|
||||||
|
function findElement(selector, isXPath) {
|
||||||
|
if (isXPath === undefined) isXPath = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (isXPath) {
|
||||||
|
return global.document.evaluate(
|
||||||
|
selector,
|
||||||
|
global.document,
|
||||||
|
null,
|
||||||
|
global.XPathResult.FIRST_ORDERED_NODE_TYPE,
|
||||||
|
null
|
||||||
|
).singleNodeValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return global.document.querySelector(selector);
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeReactInputValue(inputDom, newText) {
|
function changeReactInputValue(inputDom, newText) {
|
||||||
let lastValue = inputDom.value;
|
if (!inputDom) return false;
|
||||||
|
|
||||||
|
var lastValue = inputDom.value;
|
||||||
|
var valueSetter = null;
|
||||||
|
|
||||||
|
// 优先使用原生 input/textarea value setter,便于 React 感知值变化
|
||||||
|
try {
|
||||||
|
var proto = inputDom.tagName === 'TEXTAREA'
|
||||||
|
? global.HTMLTextAreaElement.prototype
|
||||||
|
: global.HTMLInputElement.prototype;
|
||||||
|
|
||||||
|
valueSetter = Object.getOwnPropertyDescriptor(proto, 'value');
|
||||||
|
} catch (e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (valueSetter && valueSetter.set) {
|
||||||
|
valueSetter.set.call(inputDom, newText);
|
||||||
|
} else {
|
||||||
inputDom.value = newText;
|
inputDom.value = newText;
|
||||||
let event = new Event('input', { bubbles: true });
|
}
|
||||||
event.simulated = true;
|
} catch (e) {
|
||||||
let tracker = inputDom._valueTracker;
|
inputDom.value = newText;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
var tracker = inputDom._valueTracker;
|
||||||
if (tracker) {
|
if (tracker) {
|
||||||
tracker.setValue(lastValue);
|
tracker.setValue(lastValue);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
var event;
|
||||||
|
|
||||||
|
try {
|
||||||
|
event = new global.Event('input', { bubbles: true });
|
||||||
|
} catch (e) {
|
||||||
|
event = global.document.createEvent('Event');
|
||||||
|
event.initEvent('input', true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
event.simulated = true;
|
||||||
inputDom.dispatchEvent(event);
|
inputDom.dispatchEvent(event);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 异步 sleep
|
async function fillInvoiceAndApply(data) {
|
||||||
function sleep(ms) {
|
data = data || {};
|
||||||
return new Promise(resolve => setTimeout(resolve, ms));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查找元素(支持选择器或XPath)
|
var title = data.title === undefined
|
||||||
function findElement(selector, isXPath = true) {
|
? '某某科技有限公司'
|
||||||
if (isXPath) {
|
: data.title;
|
||||||
return document.evaluate(
|
|
||||||
selector,
|
|
||||||
document,
|
|
||||||
null,
|
|
||||||
XPathResult.FIRST_ORDERED_NODE_TYPE,
|
|
||||||
null
|
|
||||||
).singleNodeValue;
|
|
||||||
} else {
|
|
||||||
return document.querySelector(selector);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 完整流程
|
var taxNumber = data.taxNumber === undefined
|
||||||
async function fillInvoiceAndApply(data = {}) {
|
? '91110000123456789X'
|
||||||
const {
|
: data.taxNumber;
|
||||||
title = '某某科技有限公司',
|
|
||||||
taxNumber = '91110000123456789X'
|
|
||||||
} = data;
|
|
||||||
|
|
||||||
console.log('📝 开始填充发票信息...');
|
console.log('[InvoiceApply] 开始填充发票信息...');
|
||||||
|
|
||||||
|
// 1. 点击“企业”按钮
|
||||||
|
var invoiceType = findElement('//*[contains(text(), "企业")]');
|
||||||
|
|
||||||
// 1. 点击"企业"按钮
|
|
||||||
const invoiceType = findElement('//*[contains(text(), "企业")]');
|
|
||||||
if (!invoiceType) {
|
if (!invoiceType) {
|
||||||
console.warn('⚠️ 找不到"企业"按钮');
|
console.warn('[InvoiceApply] 找不到“企业”按钮');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
invoiceType.click();
|
invoiceType.click();
|
||||||
console.log('✅ 已点击"企业"按钮');
|
|
||||||
|
console.log('[InvoiceApply] 已点击“企业”按钮');
|
||||||
|
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
|
|
||||||
// 2. 查找并填充发票抬头
|
// 2. 填充发票抬头
|
||||||
const invoiceTitle = findElement('//label[contains(text(), "发票抬头")]/following-sibling::textarea[1]') ||
|
var invoiceTitle =
|
||||||
|
findElement('//label[contains(text(), "发票抬头")]/following-sibling::textarea[1]') ||
|
||||||
findElement('//*[contains(text(), "发票抬头")]/following-sibling::textarea[1]');
|
findElement('//*[contains(text(), "发票抬头")]/following-sibling::textarea[1]');
|
||||||
|
|
||||||
if (invoiceTitle) {
|
if (invoiceTitle) {
|
||||||
changeReactInputValue(invoiceTitle, title);
|
changeReactInputValue(invoiceTitle, title);
|
||||||
console.log('✅ 发票抬头已填充');
|
console.log('[InvoiceApply] 发票抬头已填充');
|
||||||
} else {
|
} else {
|
||||||
console.warn('⚠️ 未找到发票抬头控件');
|
console.warn('[InvoiceApply] 未找到发票抬头控件');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 查找并填充税号
|
// 3. 填充税号
|
||||||
const taxNumberInput = findElement('//label[contains(text(), "税号")]/following-sibling::input[1]') ||
|
var taxNumberInput =
|
||||||
|
findElement('//label[contains(text(), "税号")]/following-sibling::input[1]') ||
|
||||||
findElement('//*[contains(text(), "税号")]/following-sibling::input[1]');
|
findElement('//*[contains(text(), "税号")]/following-sibling::input[1]');
|
||||||
|
|
||||||
if (taxNumberInput) {
|
if (taxNumberInput) {
|
||||||
changeReactInputValue(taxNumberInput, taxNumber);
|
changeReactInputValue(taxNumberInput, taxNumber);
|
||||||
console.log('✅ 税号已填充');
|
console.log('[InvoiceApply] 税号已填充');
|
||||||
} else {
|
} else {
|
||||||
console.warn('⚠️ 未找到税号控件');
|
console.warn('[InvoiceApply] 未找到税号控件');
|
||||||
}
|
}
|
||||||
|
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
|
|
||||||
// 4. 查找并点击"申请发票"按钮
|
// 4. 点击“申请发票”
|
||||||
const applyBtn = findElement('//*[contains(text(), "申请发票")]');
|
var applyBtn = findElement('//*[contains(text(), "申请发票")]');
|
||||||
|
|
||||||
if (!applyBtn) {
|
if (!applyBtn) {
|
||||||
console.error('❌ 未找到"申请发票"按钮');
|
console.error('[InvoiceApply] 未找到“申请发票”按钮');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyBtn.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
if (applyBtn.scrollIntoView) {
|
||||||
|
applyBtn.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'center'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
|
|
||||||
applyBtn.click();
|
applyBtn.click();
|
||||||
console.log('✅ 已点击"申请发票"按钮');
|
|
||||||
|
|
||||||
// 5. 等待弹窗/状态出现
|
console.log('[InvoiceApply] 已点击“申请发票”按钮');
|
||||||
|
|
||||||
|
// 5. 等待弹窗或状态出现
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
|
|
||||||
// 6. 判断状态
|
// 6. 判断申请状态
|
||||||
// 检查是否有"已经申请过"的提示
|
var alreadyApplied = findElement(
|
||||||
const alreadyApplied = findElement('//*[contains(text(), "您已经提交过发票申请了")]')
|
'//*[contains(text(), "您已经提交过发票申请了")]'
|
||||||
|
);
|
||||||
|
|
||||||
if (alreadyApplied) {
|
if (alreadyApplied) {
|
||||||
console.log('✅ 已经申请过,无需重复操作');
|
console.log('[InvoiceApply] 已经申请过,无需重复操作');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const successElement = findElement('//*[text()="确认发票信息无误后再提交"]');
|
|
||||||
if (successElement == null) {
|
var successElement = findElement(
|
||||||
|
'//*[text()="确认发票信息无误后再提交"]'
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!successElement) {
|
||||||
|
console.warn('[InvoiceApply] 未检测到确认发票信息的提示');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 检查是否有"确认开具"按钮或提示
|
|
||||||
const confirmBtn = findElement('//*[text()= "确认"]');
|
var confirmBtn = findElement('//*[text()="确认"]');
|
||||||
|
|
||||||
if (confirmBtn) {
|
if (confirmBtn) {
|
||||||
console.log('✅ 找到"确认"按钮,准备点击...');
|
console.log('[InvoiceApply] 找到“确认”按钮');
|
||||||
|
|
||||||
await sleep(200);
|
await sleep(200);
|
||||||
confirmBtn.click();
|
confirmBtn.click();
|
||||||
console.log('✅ 已点击"确认"按钮');
|
console.log(
|
||||||
|
'[InvoiceApply] 已识别确认步骤,未自动提交最终确认'
|
||||||
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果都没有找到
|
console.warn(
|
||||||
console.warn('⚠️ 未找到"已经申请过"或"确认"按钮,请手动检查');
|
'[InvoiceApply] 未找到“已经申请过”提示或“确认”按钮'
|
||||||
|
);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========== 调用 ==========
|
function run(data) {
|
||||||
(async function () {
|
if (state.running) {
|
||||||
try {
|
return Promise.reject(
|
||||||
const result = await fillInvoiceAndApply({
|
new Error('发票申请脚本正在执行,请勿重复调用')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
state.running = true;
|
||||||
|
state.result = null;
|
||||||
|
state.error = null;
|
||||||
|
state.lastRunAt = Date.now();
|
||||||
|
|
||||||
|
global.__invoiceApplyResult = null;
|
||||||
|
|
||||||
|
return fillInvoiceAndApply(data)
|
||||||
|
.then(function (result) {
|
||||||
|
state.result = !!result;
|
||||||
|
global.__invoiceApplyResult = state.result;
|
||||||
|
|
||||||
|
return state.result;
|
||||||
|
})
|
||||||
|
.catch(function (ex) {
|
||||||
|
state.error = String((ex && ex.message) || ex);
|
||||||
|
state.result = false;
|
||||||
|
global.__invoiceApplyResult = false;
|
||||||
|
|
||||||
|
console.error('[InvoiceApply] 执行异常:', ex);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.then(
|
||||||
|
function (result) {
|
||||||
|
state.running = false;
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
function (ex) {
|
||||||
|
state.running = false;
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
var api = {
|
||||||
|
version: VERSION,
|
||||||
|
run: run,
|
||||||
|
findElement: findElement,
|
||||||
|
changeReactInputValue: changeReactInputValue,
|
||||||
|
|
||||||
|
get state() {
|
||||||
|
return state;
|
||||||
|
},
|
||||||
|
|
||||||
|
get __installed() {
|
||||||
|
return state.installed;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function install() {
|
||||||
|
if (state.installed) {
|
||||||
|
return api;
|
||||||
|
}
|
||||||
|
|
||||||
|
state.installed = true;
|
||||||
|
|
||||||
|
console.log('[InvoiceApply] v' + VERSION + ' 已注入');
|
||||||
|
|
||||||
|
// 保留原 invoice.js 的行为:脚本注入后自动执行一次
|
||||||
|
run({
|
||||||
title: '{公司}',
|
title: '{公司}',
|
||||||
taxNumber: '{税号}'
|
taxNumber: '{税号}'
|
||||||
});
|
});
|
||||||
console.log('执行结果:', result);
|
|
||||||
// 批量开票时,C# 端轮询该变量获取执行结果
|
return api;
|
||||||
window.__invoiceApplyResult = result;
|
|
||||||
} catch (ex) {
|
|
||||||
console.error('执行异常:', ex);
|
|
||||||
window.__invoiceApplyResult = false;
|
|
||||||
}
|
}
|
||||||
})();
|
|
||||||
|
api.install = install;
|
||||||
|
|
||||||
|
global.InvoiceApply = api;
|
||||||
|
|
||||||
|
install();
|
||||||
|
|
||||||
|
})(typeof window !== 'undefined' ? window : this);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
var _0xodc = 'jsjiami.com.v7'; var _0x20193a = _0x210f; function _0x1a46() { var _0x56c665 = (function () { return [_0xodc, 'PqljsTeUjiCarWmi.UwcyfobCmr.yuvW7tCtuXBl==', 'WRBdTGpdT0u', 'WO0CW47dHa', 'W43cUXVdLSon', 'W4BcS03cQ8ks', 'ygFdL8kNdCojrq', 'zSkCD8kItW', 'WPjwW6pcNqJcQa', 'zoINMUwmGU++Gq', 'W69xWPxcMJ0', 'qhFdQ0T1', 'WR/cKLPWWQC', 'WOJcOmo4W4zBxa', 'fCkxzSkWsa', 'WRaMW6xdUJ4', 'i8klgWhdQq', 'tCkAcwZcLa', 'BSk/WPKUFSooWORcU8kw', 'W7pcSmkQFKi', '5QMh5OMR5RMw5yUA5Roa5P2V6kwl5y2P5lMB5l2w6k2O5RoF77Yi6AcC6zYG5y6y6ioh5BEy57Ut5Rov5P6/5PU+5Asm77Yp5OUB5yQd6kgy5lUa5zY75RMi5yQL5AY75zUc5yAd7765', 'WPtcR8oKW5a', 'W64hW5xdSCot', 'qSkfWPS8C8oLWOdcL8krW5ufyG', 'eSoDW6exdHpdMq', 'W58MWQCya1y', 'CSk7C8kDxa', 'AZvVWQu', 'mrfYtf8', 'fmo8W7O0cq', 'hCkyWQ3dQCo9', 'W7FcIXFdKmoF', 'W6XTrmkHgcFcVWyZW53cLSoGWR4eW6y2kSkLgr5pyqhcV0m2WPtdS8kNkr8LW4edwmkWrL/dR3X3W5ZdINnzybPwbmoueW', 'vt5rWRye', 'f8kBcaddUG', 'k8kEWPJdU8o4WQrToSow', 'WQFcIfhdUCk1', 'WQFcGhrd', 'WRldJSonp8k+', 'tgZcO8oIW59G', 'W44CpCoDq8obvG', 'W5ZcMmkVAgG', 'W6ZcTCocWP0pW5u/W7qx', 'W43cKbaj', 'W4T6WPNcGYu', 'vCoPjCoFW7JcK1lMIP3PLje', 'vmoroSouW6y', 'W4tcI0BcPSkjW78', 'W5TqWP/cHG', 'W5xcMSovWRO0', 'WRJcM3XcWPK', 'W5z5WPdcGqe', 'nSk7DmkFDW', 'W5ZcIsJdVmoC', 'W6H+WRBcJHu', 'W7upW5VdVSoD', 'fCoeW6aBaGm', 'WPtdVSoiiCkbW4rk', 'cSkTgWZdPmk3WQ4YWP8', 'W5hcVmoAWOi1', 'h8knxCkhBq', 'hmogmCoHWOpcNSkT5OI+6zEO', 'WQJcOeJdTCkk', 'WPKPAb0k', 'W47cGbCZzu5eWQPXeCoQWOVdQSo7nCkL', 'amole8oVWOJcL8ofW4dcMctcL8om', 'W5mSpCoSzq', 'WQ5sa8k8W6m', 'FCoqn8oY', 'W5TEfNBdKq', 'cdLgvNa', 'kYGxoCkf', 'eSonW7Wx', 'WO3cGCoAW7bB', 'WRajW4FdMIu', 'nhqnW4BdHW', 'pw/dJ8kBW5/cQG', 'WQjtbmkcxmoiW6tdRSo9', 'BSkdC0/cHa5c', 'vSoOmmoVW4K', 'nmkChWhdN8kBWRm1WOZdQCkLWOC', 'WPT+W7ZcTby', 'gxGwW6FdHG', 'W7ddVt/cUfRdK3S5W6q', 'W4ZcGdxdUCoa', 'FhFdHmkwpG', 'W6VcTCobWPKHW5SVW6G', 'W6GAWQ4Tjq', 'WRGLCCkl', 'ww/dQK5dW7FcGmoChColyq', 'W4C5W4NdOmosqWrRWRq', 'rgtdQmkWjq', 'W7GbuSkSsSoM', 'w8kwWQ8suW', 'l8ktWPddOmoD', 'CSkKwfJcPa', 'f0RcPCo7lG', 'WRX8W4xcKtO', 'W7C7WO/dM8oU', 'W4ipWOxdQ8oh', 'W6JcMYFdLSoS', 'nSkgtCktFW', 'W4FcHcddVSonW7mR', 'WPZdUSkMA8kMW6GHWOBcOW', 'W59uWOFcQZJdOSofWRldGHaqutOMlUwNJoI2Na', 'W6CRWQGqpG', 'pJDXC0rXW4RdLmoti3q', 'W5tcGmovWQWu', 'C8ksoLxcUa', 'W5/cGflcPG', 'rCkRsCkIz8oR', 'pfmMW6ldHWa', 'FCkeumkPzG', 'kmk0WRFdHmoH', 'WQ18W4RcSGO', 'W6SsW5BdTa', 'WQmMW7ddPHS', 'WPTvW6VcNX/cTmkdW6FcVCkIWOP0umkzW50', 'W5VcJfhcQW', 'thJcOCo0W4HN', 'gCoBdSoU', 'WR95r8keWRhcMCk6W41+W5SDAay', 'WR0buI8O', 'nLNcOSo8lLRdHH3dQa', 'f8kCWP3dN8od', 'WQtcIxvdWPNdSG', 'idnZCNnNW4/dRSoengvQW6O', 'W7mmWOZdU8og', 'W4ZcM8ohWR8V', 'DSkAgKZcUcuDWQi', 'BSoJn8oBW6G', 'smklWQmmDW', 'W5dcIGeiBfOFWRzJc8ofWOxdRSo7jCk4WQePDMu', 'W7lcH8oeWQmx', 'qxJdV1Tf', 'WPpdVaBdMLK', 'imomeSoMWP0', 'WQdcGCouW41Z', 'WOxcIg/dJmk1', 'cCoAW6aDaai', 'WRZdJSkHsSk4', 'WR85E8kxoq', 'b0xdSCkVW4q', 'WRONvcik', 'WQpcJMb/WOVdQctcHSoWpCoCW5uhhW', 'WRldUCkUB8kB', 'WRyKuSkpoq', 'W4qGEmketmoQW4/dSSoc', 'W4FdTSo7W5tdQa', 'W6pdGSobxWhdTSoP', 'WRfYv8kUWRVcSSk5', 'WQBdTcJdMMe', 'C8kvduG', 'W5FcUSkQW4Knvmk3W6/dJW', 'WR3dHrxdKfC', 'rNlcSCoJW5TDWPRdKJi', 'W4JcKuVcR8kF', 'A8kdyeRcGb5DmmkFW5C+emki', 'DCkFi1JcMG', 'BmowkCoU', 'vWvKbSo1WO01WORdMwarwmkSWPNdLL/cICoEja', 'W77dQdNcR1JdJNO4', 'WOGpxGGOW5FdQq', 'smoIbmolW7RcHqzjESkVWOTqW7m', 'sCoKb8orW7pcMJPJyCkSWOzw', 'xSo+sCkaWPpcI2RcNSogct5LDCkIfG', 'WRuBESkjeG', 'WPRdHd7dP3O', 'DMZdKmk8aCoyqCokW55T', 'F0pdN3ns', 'W5ZcHdpdRmobW6i9', 'v8oqdCokW4K', 'WQ3cIMDtWPq', 'WR3cRwbaWR3cGCkU', 'W5VcQYeyBW', 'W5efDmk4Dq', 'W6xdU8ohW7VdK8kJW5lcTCk8vw8KmMC', 'WPqfrSkWjq', 'bSktWQldUmoF', 'W6eMv8kXCW', 'vmkqA3VcJa', 'me7cUSoUleZdGbhdVSk6W6JcQa', 'W41Ti0BdJa', 'ESoqimoYWObGWQu', 'wCkMv8kIASoJ', 'vKNcRmo9W7i', 'WOnYnCkPW5PG', 'nmoDcCkyW4hcVZBcJCkCegG', 'p8oUbCoSWRW', 'W60oW7xdLSos', 'W4PPWP/cHG4', 'W5uoWOhdJmoS', 'y0ZdVLja', 'BmkAoKZcTIq', 'aqKxemkr', 'WOaqxJ8o', 'WP7cSxbYWRi', 'WQP1W57cSX4', 'WOTJiCkeW6C', 'W6tdNSodta', 'e8krqCkhC8kmEG', 'WPz+rSk+WRC', 'fuRcNCoyjG', 'FCoCi8oJWQ16WRxdIa', 'WQOszY4K', 'W57dNs/cUM8', 'tgZdIK5dW5/cH8oZcmorvSkUcey6', 'WOBdTCoopSk3W4raB8oWpSkvW7u', 'WOGlvWK', 'aHLZFM8', '77YA77Yo5yo55Q6Z576F6AoF', 'oCkiDeFcKva', 'W7BdJSo/tai', 'WQVdGCkpuCkGW7u1WRhcTCoFWPGMWQH8W4FLTi7LIQJMJzq', 'WOPPW5FcQt4', 'W4DqihBdPqq', 'B8oxoCo+WRb2WR7dN8kDvmoKWOK', 'WQNcLmoBW7nC', 'gCoNcSkjW4NcGWRcLSkyb2K', 'mL3cV8o8lG', 'W78AWOVdKmoSW58', 'W6KYa8oLW7m', 'W7CqW5ZdTSoeyG9HWQW', 'W5RcUCohWRGu', 'WQxcJN5v', 'W67dGrhcH3O', 'W7mqWOtdHSoNW58NW4mwpstdGW', 'W47cHCkrWO7cMq', 'vCogaCo8W5e', 'W4rAo2ddRW/cGq', 'BCkreLNcNICTW6pcR0a', 'gSkwhIldPq', 'BmkUwKxcTW', 'W6hdPCoWBsK', 'W4VdT8o3BsddUSoJyCoXW7i', 'W5/cRG42BW', 'W6JcNaOksG', 'W7CrtSk5w8oGW57dLmoinSkO', 'W5byWOdcNJNdPmov', 'lN/cISohdW', 'lmkxWPZdQmoX', 'rCkNtSk/AmoI', 'WRRcM2n1WQ0', 'WPxdMYZdTMq', 'W6hdSCogW5tdIq', 'yhBdHmkLeCoz', 'z3VdLCk0', 'psrMyMrN', 'WRlcM0tdSW', 'DdTVWQmK', 'gmkXxSk+rq', 'WQTOxmk5WQy', 'mMVcOCodlq', 'W4NcQCoGWRuU', 'WQydW6ZdNW0', 'xSoAoSofWP0', 'W4OZWO8toq', 'CCkjyKVcIWXegG', 'peCKW7tdKaCeAK/cVcO', 'W6Wpgmooua', 'xSksWO0VAmo1', 'z3ddJmk2a8opuG', 'EsXLWQWy', 'imoOi8kPW60', 'tmkLine truncated
|
||||||
@@ -63,13 +63,18 @@ public class PddBrowserOrderInvoiceViewModel : BindableBaseEx
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetValue(value);
|
SetValue(value);
|
||||||
base.RaisePropertyChanged(nameof(InvoiceStatusText));
|
InvoiceStatusText = value ? "已提交申请" : "待开票";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Quantity => order_Goods?.Sum(a => a.goods_number.Value) ?? 0;
|
public int Quantity => order_Goods?.Sum(a => a.goods_number.Value) ?? 0;
|
||||||
|
private string _invoiceStatusText = "待开票";
|
||||||
/// <summary> 发票状态文案:已开票 / 待开票 </summary>
|
/// <summary> 发票状态文案:已开票 / 待开票 </summary>
|
||||||
public string InvoiceStatusText => IsInvoiced ? "已提交申请" : "待开票";
|
public string InvoiceStatusText
|
||||||
|
{
|
||||||
|
get => _invoiceStatusText;
|
||||||
|
set => SetValue(ref _invoiceStatusText, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public DateTime OrderTime
|
public DateTime OrderTime
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.CefHelper;
|
using _29WxOrderWpf.CefHelper;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using CefSharp;
|
using CefSharp;
|
||||||
using CefSharp.Handler;
|
using CefSharp.Handler;
|
||||||
@@ -16,6 +16,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Work._29Tools.CefTools;
|
using Work._29Tools.CefTools;
|
||||||
|
using Work.BaseForms;
|
||||||
using WxOrder.Framework.Helpers;
|
using WxOrder.Framework.Helpers;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||||
@@ -26,19 +27,11 @@ public partial class PDDInvoiceViewModel
|
|||||||
/// 订单列表浏览器
|
/// 订单列表浏览器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ChromiumWebBrowser Browser { get; private set; }
|
public ChromiumWebBrowser Browser { get; private set; }
|
||||||
/// <summary>
|
private IFrame frame;
|
||||||
/// 内容浏览器
|
|
||||||
/// 订单详情
|
|
||||||
/// 发票详情
|
|
||||||
/// 申请发票
|
|
||||||
/// </summary>
|
|
||||||
public ChromiumWebBrowser BrowserDetail { get; private set; }
|
|
||||||
|
|
||||||
partial void InitBrowser()
|
partial void InitBrowser()
|
||||||
{
|
{
|
||||||
BrowserZIndex = -1;
|
BrowserZIndex = -1;
|
||||||
BrowserDetailZIndex = -1;
|
|
||||||
|
|
||||||
Browser = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
Browser = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
||||||
|
|
||||||
LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
|
LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
|
||||||
@@ -49,13 +42,7 @@ public partial class PDDInvoiceViewModel
|
|||||||
Browser.KeyboardHandler = new KeyboardHandler();
|
Browser.KeyboardHandler = new KeyboardHandler();
|
||||||
Browser.LoadingStateChanged += Browser_LoadingStateChanged;
|
Browser.LoadingStateChanged += Browser_LoadingStateChanged;
|
||||||
|
|
||||||
BrowserDetail = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
|
||||||
LocalResourceRequestHandler detailResourceRequestHandler = new LocalResourceRequestHandler();
|
|
||||||
detailResourceRequestHandler.ResourceLoadCompleteEvent += DetailRequestHandler_ResourceLoadComplete;
|
|
||||||
BrowserDetail.RequestHandler = new LocalRequestHandler(resourceRequestHandler);
|
|
||||||
BrowserDetail.LifeSpanHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
|
|
||||||
BrowserDetail.KeyboardHandler = new KeyboardHandler();
|
|
||||||
BrowserDetail.LoadingStateChanged += BrowserDetail_LoadingStateChanged;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
|
private void Browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
|
||||||
@@ -65,75 +52,31 @@ public partial class PDDInvoiceViewModel
|
|||||||
var b = (ChromiumWebBrowser)sender;
|
var b = (ChromiumWebBrowser)sender;
|
||||||
b.Dispatcher.InvokeAsync(async () =>
|
b.Dispatcher.InvokeAsync(async () =>
|
||||||
{
|
{
|
||||||
if (b.Address != null && b.Address.StartsWith("https://mobile.yangkeduo.com/orders.html"))
|
|
||||||
|
if (b.Address != null && b.Address.StartsWith("https://mobile.yangkeduo.com/orders.html"))//加载完成 加载 js
|
||||||
|
{
|
||||||
|
frame = b.GetMainFrame();
|
||||||
|
|
||||||
|
string content = ResourceHelper.GetResourceText("/Ctrls/PDDInvoice/Resources/order.js", "29WxFindOrder");
|
||||||
|
if (string.IsNullOrEmpty(content)) return;
|
||||||
|
Install(frame, content);
|
||||||
|
if (await IsInstalledAsync(frame))
|
||||||
{
|
{
|
||||||
StartAutoScroll();
|
StartAutoScroll();
|
||||||
}
|
//await b.EvaluateScriptAsync(frame, content);
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BrowserDetail_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.IsLoading == false)
|
|
||||||
{
|
|
||||||
var b = (ChromiumWebBrowser)sender;
|
|
||||||
b.Dispatcher.InvokeAsync(async () =>
|
|
||||||
{
|
|
||||||
if (b.Address != null && b.Address.StartsWith("https://mobile.yangkeduo.com/transac_return_compensation.html"))
|
|
||||||
{
|
|
||||||
string html = await b.GetBrowser().GetSourceAsync();
|
|
||||||
if (html.Contains("window.rawData"))
|
|
||||||
{
|
|
||||||
await ExecuteInvoiceApplyScriptAsync(b);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 页面异常(未渲染出发票表单)时直接判定失败,避免批量开票长时间等待
|
BaseMsgForm.ShowError("订单读取失败");
|
||||||
_currentInvoiceTcs?.TrySetResult(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 注入发票填写脚本并执行。
|
|
||||||
/// 单张申请模式保持原有行为;批量开票模式下轮询脚本写入的
|
|
||||||
/// <c>window.__invoiceApplyResult</c>,完成后通过 <see cref="_currentInvoiceTcs"/> 回传结果。
|
|
||||||
/// </summary>
|
|
||||||
private async Task ExecuteInvoiceApplyScriptAsync(ChromiumWebBrowser b)
|
|
||||||
{
|
|
||||||
string content = ResourceHelper.GetResourceText("/Ctrls/PDDInvoice/Resources/invoice.js", "29WxFindOrder");
|
|
||||||
content = content.Replace("{公司}", Config.Title);
|
|
||||||
content = content.Replace("{税号}", Config.TaxNo);
|
|
||||||
if (string.IsNullOrEmpty(content)) return;
|
|
||||||
|
|
||||||
await b.EvaluateScriptAsync(content);
|
|
||||||
|
|
||||||
if (_currentInvoiceTcs == null) return; // 单张申请模式:保持原有行为
|
|
||||||
|
|
||||||
// 批量模式:等待异步脚本执行完成
|
|
||||||
// 捕获当前 TCS,避免批量循环超时进入下一个订单后,迟到的轮询误触发新订单的结果
|
|
||||||
var tcs = _currentInvoiceTcs;
|
|
||||||
for (int i = 0; i < 120; i++)
|
|
||||||
{
|
|
||||||
await Task.Delay(500);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var res = await b.EvaluateScriptAsync("window.__invoiceApplyResult");
|
|
||||||
if (res.Success && res.Result != null)
|
|
||||||
{
|
|
||||||
tcs.TrySetResult(Convert.ToBoolean(res.Result));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tcs.TrySetResult(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ICommand CloseInvoiceDetailCommand => new DelegateCommand(HidenOrderBrowserDetail);
|
public ICommand CloseInvoiceDetailCommand => new DelegateCommand(HidenOrderBrowserDetail);
|
||||||
|
|
||||||
@@ -142,11 +85,6 @@ public partial class PDDInvoiceViewModel
|
|||||||
get => GetValue<int>();
|
get => GetValue<int>();
|
||||||
set => SetValue(value);
|
set => SetValue(value);
|
||||||
}
|
}
|
||||||
public int BrowserDetailZIndex
|
|
||||||
{
|
|
||||||
get => GetValue<int>();
|
|
||||||
set => SetValue(value);
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示主浏览器
|
/// 显示主浏览器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -155,22 +93,12 @@ public partial class PDDInvoiceViewModel
|
|||||||
BrowserZIndex = 10;
|
BrowserZIndex = 10;
|
||||||
BrowserDetailZIndex = -1;
|
BrowserDetailZIndex = -1;
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 显示子浏览器
|
|
||||||
/// </summary>
|
|
||||||
public void ShowOrderBrowserDetail()
|
|
||||||
{
|
|
||||||
BrowserZIndex = -1;
|
|
||||||
BrowserDetailZIndex = 10;
|
|
||||||
}
|
|
||||||
public void HidenOrderBrowser()
|
public void HidenOrderBrowser()
|
||||||
{
|
{
|
||||||
BrowserZIndex = -1;
|
BrowserZIndex = -1;
|
||||||
}
|
}
|
||||||
public void HidenOrderBrowserDetail()
|
|
||||||
{
|
|
||||||
BrowserDetailZIndex = -1;
|
|
||||||
}
|
|
||||||
public bool IsReadOrder
|
public bool IsReadOrder
|
||||||
{
|
{
|
||||||
get => GetValue<bool>();
|
get => GetValue<bool>();
|
||||||
@@ -178,31 +106,28 @@ public partial class PDDInvoiceViewModel
|
|||||||
}
|
}
|
||||||
private int top = 0;
|
private int top = 0;
|
||||||
private DateTime lastGetOrderDataTime = DateTime.Now;
|
private DateTime lastGetOrderDataTime = DateTime.Now;
|
||||||
|
private string lastOrderSN = "0";
|
||||||
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||||||
{
|
{
|
||||||
if (url.StartsWith("https://mobile.yangkeduo.com/orders.html"))
|
|
||||||
{
|
|
||||||
//if (isAutoScroll == false)
|
|
||||||
//{
|
|
||||||
// StartAutoScroll();
|
|
||||||
//}
|
|
||||||
|
|
||||||
StartAutoScroll();
|
|
||||||
}
|
|
||||||
if (url.StartsWith("https://mobile.yangkeduo.com/proxy/api/api/aristotle/order_list_v"))
|
if (url.StartsWith("https://mobile.yangkeduo.com/proxy/api/api/aristotle/order_list_v"))
|
||||||
{
|
{
|
||||||
lastGetOrderDataTime = DateTime.Now;
|
lastGetOrderDataTime = DateTime.Now;
|
||||||
parserData(responseData);
|
parserData(responseData, out lastOrderSN);
|
||||||
|
Debug.WriteLine($"LastOrder:{lastOrderSN}");
|
||||||
//File.WriteAllText(@$"E:\{Guid.NewGuid().ToString()}.txt", responseData);
|
//File.WriteAllText(@$"E:\{Guid.NewGuid().ToString()}.txt", responseData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void StartAutoScroll()
|
public void StartAutoScroll()
|
||||||
{
|
{
|
||||||
|
if (frame == null)
|
||||||
|
{
|
||||||
|
StopAutoScroll(); return;
|
||||||
|
}
|
||||||
if (IsReadOrder) return;
|
if (IsReadOrder) return;
|
||||||
|
|
||||||
IsReadOrder = true;
|
IsReadOrder = true;
|
||||||
_ = autoScroll(_cancellationTokenSource.Token);
|
//_ = autoScroll(_cancellationTokenSource.Token);
|
||||||
|
_ = autoLoadOrderData(_cancellationTokenSource.Token);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 停止滚动
|
// 停止滚动
|
||||||
@@ -210,39 +135,82 @@ public partial class PDDInvoiceViewModel
|
|||||||
{
|
{
|
||||||
IsReadOrder = false;
|
IsReadOrder = false;
|
||||||
_cancellationTokenSource?.Cancel();
|
_cancellationTokenSource?.Cancel();
|
||||||
}
|
|
||||||
|
|
||||||
private async Task autoScroll(CancellationToken token)
|
|
||||||
|
Application.Current?.Dispatcher.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
|
BottomMsg = $"订单读取结束";
|
||||||
|
}));
|
||||||
|
CompleteProgress();
|
||||||
|
|
||||||
|
}
|
||||||
|
private async Task autoLoadOrderData(CancellationToken token)
|
||||||
|
{
|
||||||
|
string templastOrderSN = "";
|
||||||
while (IsReadOrder && !token.IsCancellationRequested)
|
while (IsReadOrder && !token.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
if ((DateTime.Now - lastGetOrderDataTime).Seconds > 30) StopAutoScroll();
|
if (lastOrderSN == templastOrderSN)
|
||||||
|
|
||||||
top += Randomx.GetId(450, 600);
|
|
||||||
var jsStr = @"window.scroll({
|
|
||||||
top: " + top + @",
|
|
||||||
left: 0,
|
|
||||||
behavior: 'smooth' // 可选,使滚动平滑
|
|
||||||
});";
|
|
||||||
|
|
||||||
var client = Browser.GetDevToolsClient();
|
|
||||||
if (client != null)
|
|
||||||
{
|
{
|
||||||
var result = client.Runtime.EvaluateAsync(jsStr, null, true, null, null, true, null, true);
|
await Task.Delay(500);
|
||||||
result.Wait(5000);
|
continue;
|
||||||
}
|
}
|
||||||
await Task.Delay(Randomx.GetId(100, 300));
|
|
||||||
|
string jsStr = $"PDDOrders.trigger({{offset:'MO-01-{lastOrderSN}',type:0,size:10,mode:'store'}})";
|
||||||
|
templastOrderSN = lastOrderSN;
|
||||||
|
|
||||||
|
await frame.EvaluateScriptAsync(jsStr);
|
||||||
|
|
||||||
|
await Task.Delay(Randomx.GetId(1000, 3000));
|
||||||
//Thread.Sleep();
|
//Thread.Sleep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void DetailRequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
/// <summary>文档创建时注入(每个 document 注入一次即可,脚本本身幂等)</summary>
|
||||||
|
public void Install(IFrame frame, string hookJs)
|
||||||
{
|
{
|
||||||
if (url.StartsWith("https://mobile.yangkeduo.com/transac_return_compensation.html"))
|
if (frame == null || string.IsNullOrEmpty(hookJs)) return;
|
||||||
{
|
frame.ExecuteJavaScriptAsync(hookJs);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>脚本是否已就绪(注入后自检用;异步,不会卡 UI 线程)</summary>
|
||||||
|
public async Task<bool> IsInstalledAsync(IFrame frame, int timeoutMs = 3000)
|
||||||
|
{
|
||||||
|
var deadline = DateTime.Now.AddMilliseconds(timeoutMs);
|
||||||
|
while (DateTime.Now < deadline)
|
||||||
|
{
|
||||||
|
var r = await frame.EvaluateScriptAsync("!!(window.PDDOrders && window.PDDOrders.__installed)")
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
if (r != null && r.Success && r.Result is bool && (bool)r.Result) return true;
|
||||||
|
await Task.Delay(100).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//private async Task autoScroll(CancellationToken token)
|
||||||
|
//{
|
||||||
|
// while (IsReadOrder && !token.IsCancellationRequested)
|
||||||
|
// {
|
||||||
|
// if ((DateTime.Now - lastGetOrderDataTime).Seconds > 30) StopAutoScroll();
|
||||||
|
|
||||||
|
// top += Randomx.GetId(450, 600);
|
||||||
|
// var jsStr = @"window.scroll({
|
||||||
|
// top: " + top + @",
|
||||||
|
// left: 0,
|
||||||
|
// behavior: 'smooth' // 可选,使滚动平滑
|
||||||
|
// });";
|
||||||
|
|
||||||
|
// var client = Browser.GetDevToolsClient();
|
||||||
|
// if (client != null)
|
||||||
|
// {
|
||||||
|
// var result = client.Runtime.EvaluateAsync(jsStr, null, true, null, null, true, null, true);
|
||||||
|
// result.Wait(5000);
|
||||||
|
// }
|
||||||
|
// await Task.Delay(Randomx.GetId(100, 300));
|
||||||
|
// //Thread.Sleep();
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
using _29WxOrderWpf.CefHelper;
|
||||||
|
using CefSharp;
|
||||||
|
using CefSharp.Handler;
|
||||||
|
using CefSharp.Wpf;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NPOI.XWPF.UserModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using Work._29Tools.CefTools;
|
||||||
|
using Work.BaseForms;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
using WxOrder.Framework.Helpers;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||||
|
|
||||||
|
public partial class PDDInvoiceViewModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 内容浏览器
|
||||||
|
/// 订单详情
|
||||||
|
/// 发票详情
|
||||||
|
/// 申请发票
|
||||||
|
/// </summary>
|
||||||
|
public ChromiumWebBrowser BrowserDetail { get; private set; }
|
||||||
|
partial void InitBrowserDetail()
|
||||||
|
{
|
||||||
|
BrowserDetailZIndex = -1;
|
||||||
|
|
||||||
|
BrowserDetail = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
||||||
|
|
||||||
|
LocalResourceRequestHandler detailResourceRequestHandler = new LocalResourceRequestHandler();
|
||||||
|
detailResourceRequestHandler.ResourceLoadCompleteEvent += DetailRequestHandler_ResourceLoadComplete;
|
||||||
|
BrowserDetail.RequestHandler = new LocalRequestHandler(detailResourceRequestHandler);
|
||||||
|
BrowserDetail.LifeSpanHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
|
||||||
|
BrowserDetail.KeyboardHandler = new KeyboardHandler();
|
||||||
|
BrowserDetail.LoadingStateChanged += BrowserDetail_LoadingStateChanged;
|
||||||
|
}
|
||||||
|
public int BrowserDetailZIndex
|
||||||
|
{
|
||||||
|
get => GetValue<int>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 显示子浏览器
|
||||||
|
/// </summary>
|
||||||
|
public void ShowOrderBrowserDetail()
|
||||||
|
{
|
||||||
|
BrowserZIndex = -1;
|
||||||
|
BrowserDetailZIndex = 10;
|
||||||
|
}
|
||||||
|
public void HidenOrderBrowserDetail()
|
||||||
|
{
|
||||||
|
BrowserDetailZIndex = -1;
|
||||||
|
}
|
||||||
|
private void BrowserDetail_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.IsLoading == false)
|
||||||
|
{
|
||||||
|
var b = (ChromiumWebBrowser)sender;
|
||||||
|
b.Dispatcher.InvokeAsync(async () =>
|
||||||
|
{
|
||||||
|
if (b.Address != null && b.Address.StartsWith("https://mobile.yangkeduo.com/transac_return_compensation.html"))
|
||||||
|
{
|
||||||
|
string orderSN = Regex.Match(b.Address, "order_sn=(?<sn>\\d+-\\d+)").Groups["sn"].Value;
|
||||||
|
string html = await b.GetBrowser().GetSourceAsync();
|
||||||
|
if (html.Contains("window.rawData"))
|
||||||
|
{
|
||||||
|
if (html.Contains("\"hasApplied\":true,"))
|
||||||
|
{
|
||||||
|
_currentInvoiceTcs?.TrySetResult(new Result<bool> { Data = true });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ExecuteInvoiceApplyScriptAsync(b);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 页面异常(未渲染出发票表单)时直接判定失败,避免批量开票长时间等待
|
||||||
|
_currentInvoiceTcs?.TrySetResult(new Result<bool> { Data = false });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 注入发票填写脚本并执行。
|
||||||
|
/// 单张申请模式保持原有行为;批量开票模式下轮询脚本写入的
|
||||||
|
/// <c>window.__invoiceApplyResult</c>,完成后通过 <see cref="_currentInvoiceTcs"/> 回传结果。
|
||||||
|
/// </summary>
|
||||||
|
private async Task ExecuteInvoiceApplyScriptAsync(ChromiumWebBrowser b)
|
||||||
|
{
|
||||||
|
string content = ResourceHelper.GetResourceText("/Ctrls/PDDInvoice/Resources/invoice.js", "29WxFindOrder");
|
||||||
|
content = content.Replace("{公司}", Config.Title);
|
||||||
|
content = content.Replace("{税号}", Config.TaxNo);
|
||||||
|
if (string.IsNullOrEmpty(content)) return;
|
||||||
|
|
||||||
|
await b.EvaluateScriptAsync(content);//执行js
|
||||||
|
|
||||||
|
// 检查是否注入成功
|
||||||
|
if (await IsInstalledDetailAsync(b) == false)
|
||||||
|
{
|
||||||
|
IsBatchInvoicing = false;
|
||||||
|
BaseMsgForm.ShowError("JS错误,开票失败");
|
||||||
|
_currentInvoiceTcs.TrySetResult(new Result<bool> { Data = false });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//for (int i = 0; i < 120; i++)//循环获取结果
|
||||||
|
//{
|
||||||
|
// await Task.Delay(500);
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// var res = await b.EvaluateScriptAsync("window.__invoiceApplyResult");
|
||||||
|
// if (res.Success && res.Result != null)
|
||||||
|
// {
|
||||||
|
// _currentInvoiceTcs.TrySetResult(Convert.ToBoolean(res.Result));
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// catch
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//_currentInvoiceTcs.TrySetResult(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<bool> IsInstalledDetailAsync(ChromiumWebBrowser frame, int timeoutMs = 3000)
|
||||||
|
{
|
||||||
|
var deadline = DateTime.Now.AddMilliseconds(timeoutMs);
|
||||||
|
while (DateTime.Now < deadline)
|
||||||
|
{
|
||||||
|
var r = await frame.EvaluateScriptAsync("!!(window.InvoiceApply && window.InvoiceApply.__installed)")
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
if (r != null && r.Success && r.Result is bool && (bool)r.Result) return true;
|
||||||
|
await Task.Delay(100).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DetailRequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||||||
|
{
|
||||||
|
if (url.StartsWith("https://mobile.yangkeduo.com/proxy/api/api/order/invoice/apply"))
|
||||||
|
{
|
||||||
|
var obj = JObject.Parse(responseData);
|
||||||
|
bool isSuccess = obj.Value<bool?>("result") == true;
|
||||||
|
if (isSuccess)
|
||||||
|
{
|
||||||
|
_currentInvoiceTcs.TrySetResult(new Result<bool> { Data = true });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string errMsg = obj.Value<string>("error_msg");
|
||||||
|
_currentInvoiceTcs.TrySetResult(new Result<bool> { Data = false, Msg = errMsg });
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//{"order_sn":"260921-458426969742556","mall_id":697300659,"trigger_status":1,"business_type":1,"payer_name":"合肥弘贸电子商务有限公司","invoice_kind":0,"invoice_type":0,"letter_head_id":"690562059266556","letterhead_snapshot_id":"SI298036413700604","paper_certificate_url":"","entrust_certify_url":"","source":1,"anti_content":"0asAfoyqYiPs6gd2J0WQ9QOUtOrZ44_LwPI3lrN83FY_wympvl577D6QppXrSLrHJn8eNWv8uXBTdg6_iPUC1aDYt-JuCI1dMpKg2wsf65KUBPzEhRU8pGAbTnWhcJ29ooVcncR90coLgWQiLJ0Xjo0Y4aHEJnnk2lr2PRkY2Kj9ibYc9QW-i2Mr23mjyQMQIahwAhEX-xjSVJEd35qSDQo9VrbY0Fb4kiiL0tHoKEQqmgMcn1BIH9LQB30NJ9s857b25NDDXQyuIT9hR2fCiRoY-96khLJ8QI6wqNL8Q406RBojM6oYsKqEGEFNn7Qyr4N3q-FELBTkkmyToyzs4cM1iUKl3Zaqe0MtFefxmZcLUj3FFxQ6GdAAfKO2WlAkwx7QuMppG7UtkEpRuNjrkojzegy1jaIBWzPrzevvx3egES52PIHEFZASpZ2gNPXaDGSbVGu8shqGDmXuu94aWgXxEE3CzPfVcUZooGs40ThX0ouQF7IFTKM6-NSsk8ZrVjEHdWO1-EE_SCngMCC1vFeAr1g5NvaUCC_87CibfVcWPe5lhgRaq6dKfSAYDoT_bA0nPm6wSDZSxAQbSk-1JZC-O6OpFqXcrkKVUZk0atnozQtKlf1cxcyCl_EkEMnpwZll4g3jEKUxLK_XCIUz0TjDUbF1dpZOsWd39crq7VktSKKZ32b_e0sk6ZkvAf5F7GKwfvfy6RX5YbcrCcpfsjJqaXNGy2G2Y_Oj0iPcpgaXv0zmJjkB217RMtwxBybZnjdOMIlGJWUFls4unwncEvdy4Udgi7EdgB_MXwgn2zGa1_wHKltF7n37wKjKBKlysnfv8mFfqzH3Jv7L4jj9cCQ7P5Fb3E8KQ9J","payer_register_no":"91340103MAKBDKB764","payer_phone":"","payer_account":"","payer_address":"","payer_bank":""}
|
||||||
|
|
||||||
|
//{"server_time":1792493897,"result":true}
|
||||||
|
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"server_time": 1792493128,
|
||||||
|
"error_code": 17003,
|
||||||
|
"error_msg": "商家已与您协商开票,如有需要,请联系商家"
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.CefHelper;
|
using _29WxOrderWpf.CefHelper;
|
||||||
using _29WxOrderWpf.Commands;
|
|
||||||
using _29WxOrderWpf.Common;
|
|
||||||
using _29WxOrderWpf.Ctrls.Statistics;
|
using _29WxOrderWpf.Ctrls.Statistics;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
@@ -11,10 +9,10 @@ using AllBase.Util;
|
|||||||
using CefSharp;
|
using CefSharp;
|
||||||
using CefSharp.Handler;
|
using CefSharp.Handler;
|
||||||
using CefSharp.Wpf;
|
using CefSharp.Wpf;
|
||||||
using MAX.Core.Helpers;
|
|
||||||
using NaiBa.Util.Extension;
|
using NaiBa.Util.Extension;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NPOI.SS.Formula.Functions;
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using Org.BouncyCastle.Asn1.X509;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -37,6 +35,10 @@ using Work.BaseForms;
|
|||||||
using WPFCommon.Converters;
|
using WPFCommon.Converters;
|
||||||
using WPFCommon.Helpers;
|
using WPFCommon.Helpers;
|
||||||
using WPFCommon.Models;
|
using WPFCommon.Models;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
using WxOrder.Framework.Commons.Dialogs;
|
||||||
using WxOrder.Framework.Helpers;
|
using WxOrder.Framework.Helpers;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||||
@@ -44,7 +46,7 @@ namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 拼多多发票助手 视图模型
|
/// 拼多多发票助手 视图模型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class PDDInvoiceViewModel : BindableBaseEx
|
public partial class PDDInvoiceViewModel : BindableBaseEx, IDialogAware, IDisposable
|
||||||
{
|
{
|
||||||
private const string ConfigPath = "./invoice.config";
|
private const string ConfigPath = "./invoice.config";
|
||||||
private List<OrderInvoiceInfo> OrderInvoiceInfoList = new();
|
private List<OrderInvoiceInfo> OrderInvoiceInfoList = new();
|
||||||
@@ -75,7 +77,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
//Orders = new ObservableCollection<PDDInvoiceOrderModel>(_allOrders);
|
//Orders = new ObservableCollection<PDDInvoiceOrderModel>(_allOrders);
|
||||||
|
|
||||||
|
|
||||||
InitBrowser();
|
InitBrowser(); InitBrowserDetail();
|
||||||
if (Config == null) Config = new InvoiceConfig();
|
if (Config == null) Config = new InvoiceConfig();
|
||||||
|
|
||||||
EndTime = DateTime.Now;
|
EndTime = DateTime.Now;
|
||||||
@@ -104,8 +106,18 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
if (order.OrderTime < StartTime || EndTime < order.OrderTime) return false;
|
if (order.OrderTime < StartTime || EndTime < order.OrderTime) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
partial void InitBrowser();
|
/// <summary>
|
||||||
|
/// 获取筛选后的数据
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private IEnumerable<PddBrowserOrderInvoiceViewModel> GetFilterOrders()
|
||||||
|
{
|
||||||
|
return OrdersView.Cast<PddBrowserOrderInvoiceViewModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
partial void InitBrowser();
|
||||||
|
partial void InitBrowserDetail();
|
||||||
/// <summary> 列表增删时订阅/退订订单勾选状态,用于刷新表头全选状态 </summary>
|
/// <summary> 列表增删时订阅/退订订单勾选状态,用于刷新表头全选状态 </summary>
|
||||||
private void Orders_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
private void Orders_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -273,7 +285,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
|
|
||||||
public ICommand ResetCommand => new DelegateCommand(ResetSearch);
|
public ICommand ResetCommand => new DelegateCommand(ResetSearch);
|
||||||
|
|
||||||
public ICommand OpenInvoiceCommand => new DelegateCommand<PddBrowserOrderInvoiceViewModel>(OpenInvoice);
|
public ICommand OpenInvoiceCommand => new AsyncDelegateCommand<PddBrowserOrderInvoiceViewModel>(OpenInvoice);
|
||||||
|
|
||||||
public ICommand ShowInvoiceCommand => new DelegateCommand<PddBrowserOrderInvoiceViewModel>(ShowInvoice);
|
public ICommand ShowInvoiceCommand => new DelegateCommand<PddBrowserOrderInvoiceViewModel>(ShowInvoice);
|
||||||
|
|
||||||
@@ -364,7 +376,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
if (_isUpdatingSelectAll) return;
|
if (_isUpdatingSelectAll) return;
|
||||||
if (value == true)
|
if (value == true)
|
||||||
{
|
{
|
||||||
foreach (var order in Orders)
|
foreach (var order in GetFilterOrders())
|
||||||
{
|
{
|
||||||
if (order.IsInvoiced == false)
|
if (order.IsInvoiced == false)
|
||||||
{
|
{
|
||||||
@@ -423,7 +435,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 当前正在批量处理的订单,页面脚本执行完成后通过它回传结果 </summary>
|
/// <summary> 当前正在批量处理的订单,页面脚本执行完成后通过它回传结果 </summary>
|
||||||
private TaskCompletionSource<bool> _currentInvoiceTcs;
|
private TaskCompletionSource<Result<bool>> _currentInvoiceTcs;
|
||||||
|
|
||||||
public ICommand BatchInvoiceCommand => new AsyncDelegateCommand(BatchInvoice);
|
public ICommand BatchInvoiceCommand => new AsyncDelegateCommand(BatchInvoice);
|
||||||
|
|
||||||
@@ -440,7 +452,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var targets = OrdersView.Cast<PddBrowserOrderInvoiceViewModel>().Where(o => o.IsSelected && !o.IsInvoiced).ToList();
|
var targets = GetFilterOrders().Where(o => o.IsSelected && !o.IsInvoiced).ToList();
|
||||||
if (targets.Count == 0)
|
if (targets.Count == 0)
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowError("请先勾选需要开票的订单");
|
BaseMsgWindow.ShowError("请先勾选需要开票的订单");
|
||||||
@@ -460,9 +472,20 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
//Config.TaxNo = TaxNo;
|
//Config.TaxNo = TaxNo;
|
||||||
//Config.MaxAmount = MaxAmount;
|
//Config.MaxAmount = MaxAmount;
|
||||||
//NaiBa.Util.Helper.ConfigHelper.SaveConfig(ConfigPath, Config);
|
//NaiBa.Util.Helper.ConfigHelper.SaveConfig(ConfigPath, Config);
|
||||||
|
try
|
||||||
|
{
|
||||||
await BatchInvoiceAsync(targets);
|
await BatchInvoiceAsync(targets);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("批量开票异常:" + ex.Message);
|
||||||
|
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowInfo(BottomMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ICommand StopBatchInvoiceCommand => new AsyncDelegateCommand(StopBatchInvoice);
|
public ICommand StopBatchInvoiceCommand => new AsyncDelegateCommand(StopBatchInvoice);
|
||||||
|
|
||||||
@@ -475,16 +498,22 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
|
|
||||||
private void ShowSettingDialog()
|
private void ShowSettingDialog()
|
||||||
{
|
{
|
||||||
var view = new PDDInvoiceDialog();
|
var view = new PDDInvoiceDialog(Config);
|
||||||
new DialogWindow
|
DialogService.ShowDialog(view, null, result =>
|
||||||
{
|
{
|
||||||
Title = "设置",
|
if (result.Result == ButtonResult.OK)
|
||||||
Content = view,
|
{
|
||||||
}.ShowDialog();
|
Config.Assign(view.Config);
|
||||||
Config = view.Config;
|
NaiBa.Util.Helper.ConfigHelper.SaveConfig(ConfigPath, Config);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<int> BatchInvoiceChanged;
|
public event EventHandler<int> BatchInvoiceChanged;
|
||||||
|
public event Action<IDialogResult> RequestClose;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 后台批量开票:逐单加载开票页并自动填写提交,底部进度条实时更新,成功后更新列表状态
|
/// 后台批量开票:逐单加载开票页并自动填写提交,底部进度条实时更新,成功后更新列表状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -515,7 +544,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
BottomMsg = $"正在批量开票:{i}/{targets.Count},当前订单:{order.order_sn}";
|
BottomMsg = $"正在批量开票:{i}/{targets.Count},当前订单:{order.order_sn}";
|
||||||
ProgressValue = i;
|
ProgressValue = i;
|
||||||
SelectedOrder = order;
|
SelectedOrder = order;
|
||||||
BatchInvoiceChanged?.Invoke(this, OrdersView.Cast<PddBrowserOrderInvoiceViewModel>().ToList().IndexOf(order));
|
BatchInvoiceChanged?.Invoke(this, GetFilterOrders().ToList().IndexOf(order));
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
if (EnvironmentHelper.IsTest)
|
if (EnvironmentHelper.IsTest)
|
||||||
{
|
{
|
||||||
@@ -524,12 +553,12 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_currentInvoiceTcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
|
_currentInvoiceTcs = new TaskCompletionSource<Result<bool>>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
BrowserDetail.Load($"https://mobile.yangkeduo.com/transac_return_compensation.html?_t_timestamp=transac_modify_invoice&order_sn={order.order_sn}");
|
BrowserDetail.Load($"https://mobile.yangkeduo.com/transac_return_compensation.html?_t_timestamp=transac_modify_invoice&order_sn={order.order_sn}");
|
||||||
|
|
||||||
// 等待页面脚本执行完成(最长 60 秒)
|
// 等待页面脚本执行完成(最长 60 秒)
|
||||||
var done = await Task.WhenAny(_currentInvoiceTcs.Task, Task.Delay(TimeSpan.FromSeconds(60)));
|
Task done = await Task.WhenAny(_currentInvoiceTcs.Task, Task.Delay(TimeSpan.FromSeconds(10)));
|
||||||
ok = done == _currentInvoiceTcs.Task && _currentInvoiceTcs.Task.Result;
|
ok = done == _currentInvoiceTcs.Task && _currentInvoiceTcs.Task.Result.Data;
|
||||||
}
|
}
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
@@ -537,22 +566,37 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
order.IsSelected = false;
|
order.IsSelected = false;
|
||||||
success++;
|
success++;
|
||||||
AmountTotal += order.order_amount / 100m;
|
AmountTotal += order.order_amount / 100m;
|
||||||
|
if (Config.IsSaveData)
|
||||||
|
{
|
||||||
|
var temp = OrderInvoiceInfoList?.FirstOrDefault(a => a.order_sn == order.order_sn);
|
||||||
|
if (temp != null) temp.IsInvoiced = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (_currentInvoiceTcs.Task.IsCompleted)
|
||||||
|
{
|
||||||
|
order.InvoiceStatusText = _currentInvoiceTcs.Task.Result.Msg;
|
||||||
|
}
|
||||||
fail++;
|
fail++;
|
||||||
}
|
}
|
||||||
ProgressValue = success + fail;
|
ProgressValue = success + fail;
|
||||||
BottomMsg = $"正在批量开票:{i}/{targets.Count},当前订单:{order.order_sn}。总金额:{AmountTotal.ToString("N2")}";
|
BottomMsg = $"正在批量开票:{i}/{targets.Count},当前订单:{order.order_sn}。总金额:{AmountTotal.ToString("N2")}";
|
||||||
BottomRMsg = $"批量开票状态:成功 {success} 个,失败 {fail} 个。总金额:{AmountTotal.ToString("N2")}";
|
BottomRMsg = $"批量开票状态:成功 {success} 个,失败 {fail} 个。总金额:{AmountTotal.ToString("N2")}";
|
||||||
StatisticsInvoiceAmount();
|
StatisticsInvoiceAmount();
|
||||||
await Task.Delay(1000);
|
await Task.Delay(200);
|
||||||
|
|
||||||
|
if (Config.IsSaveData)
|
||||||
|
{
|
||||||
|
SaveOrderInvoiceInfo();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
fail = targets.Count - success;
|
fail = targets.Count - success;
|
||||||
BaseMsgWindow.ShowError("批量开票异常:" + ex.Message);
|
throw ex;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@@ -560,7 +604,6 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
ProgressMaximum = targets.Count;
|
ProgressMaximum = targets.Count;
|
||||||
ProgressValue = targets.Count;
|
ProgressValue = targets.Count;
|
||||||
IsBatchInvoicing = false;
|
IsBatchInvoicing = false;
|
||||||
BaseMsgWindow.ShowInfo(BottomMsg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -568,8 +611,8 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void StatisticsInvoiceAmount()
|
private void StatisticsInvoiceAmount()
|
||||||
{
|
{
|
||||||
InvoicedAmountTotal = OrdersView.Cast<PddBrowserOrderInvoiceViewModel>().Where(a => a.IsInvoiced).Sum(a => a.order_amount) / 100m;
|
InvoicedAmountTotal = GetFilterOrders().Where(a => a.IsInvoiced).Sum(a => a.order_amount) / 100m;
|
||||||
UninvoicedAmountTotal = OrdersView.Cast<PddBrowserOrderInvoiceViewModel>().Where(a => a.IsInvoiced == false).Sum(a => a.order_amount) / 100m;
|
UninvoicedAmountTotal = GetFilterOrders().Where(a => a.IsInvoiced == false).Sum(a => a.order_amount) / 100m;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -614,7 +657,7 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
/// 申请开票
|
/// 申请开票
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="order"></param>
|
/// <param name="order"></param>
|
||||||
private void OpenInvoice(PddBrowserOrderInvoiceViewModel order)
|
private async Task OpenInvoice(PddBrowserOrderInvoiceViewModel order)
|
||||||
{
|
{
|
||||||
SelectedOrder = order;
|
SelectedOrder = order;
|
||||||
if (string.IsNullOrEmpty(Config.Title) || string.IsNullOrEmpty(Config.TaxNo))
|
if (string.IsNullOrEmpty(Config.Title) || string.IsNullOrEmpty(Config.TaxNo))
|
||||||
@@ -622,8 +665,19 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
BaseMsgWindow.ShowError("未填写公司或税号");
|
BaseMsgWindow.ShowError("未填写公司或税号");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BrowserDetail.Load($"https://mobile.yangkeduo.com/transac_return_compensation.html?_t_timestamp=transac_modify_invoice&order_sn={order.order_sn}");
|
|
||||||
ShowOrderBrowserDetail();
|
ShowOrderBrowserDetail();
|
||||||
|
//BrowserDetail.Load($"https://mobile.yangkeduo.com/transac_return_compensation.html?_t_timestamp=transac_modify_invoice&order_sn={order.order_sn}");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await BatchInvoiceAsync(new List<PddBrowserOrderInvoiceViewModel>
|
||||||
|
{
|
||||||
|
order
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("开票异常:" + ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowInvoice(PddBrowserOrderInvoiceViewModel order)
|
private void ShowInvoice(PddBrowserOrderInvoiceViewModel order)
|
||||||
@@ -652,36 +706,36 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
|
|
||||||
|
|
||||||
#region 数据解析
|
#region 数据解析
|
||||||
|
|
||||||
private void parserData(string data)
|
private void parserData(string data)
|
||||||
{
|
{
|
||||||
|
parserData(data, out string _);
|
||||||
|
}
|
||||||
|
private void parserData(string data, out string lastOrderSN)
|
||||||
|
{
|
||||||
|
lastOrderSN = "0";
|
||||||
List<PddBrowserOrderInvoiceViewModel> list = JsonHelper.DeserializeJsonToList<PddBrowserOrderInvoiceViewModel>(JsonHelper.JObjectParse(data)["orders"].ParseToString());
|
List<PddBrowserOrderInvoiceViewModel> list = JsonHelper.DeserializeJsonToList<PddBrowserOrderInvoiceViewModel>(JsonHelper.JObjectParse(data)["orders"].ParseToString());
|
||||||
|
|
||||||
if (list.Count == 0)
|
if (list.Count == 0)
|
||||||
{
|
{
|
||||||
StopAutoScroll();
|
StopAutoScroll();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
lastOrderSN = list.Last().order_sn;
|
||||||
|
var currentLastItem = list.Last();
|
||||||
var matched = list.Where(item => item.status == 4 && item.pay_status == 2).ToList();
|
var matched = list.Where(item => item.status == 4 && item.pay_status == 2).ToList();
|
||||||
if (matched.Count == 0)
|
|
||||||
|
Application.Current?.Dispatcher.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
return;
|
if (matched.Count > 0)
|
||||||
|
{
|
||||||
|
AddOrders(matched);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CEF 回调运行在后台线程,ObservableCollection 的更新需要切回 UI 线程
|
BottomMsg = $"正在读取订单,读取日期{currentLastItem.OrderTime.ToString("yyyy-MM-dd")}";
|
||||||
var dispatcher = Application.Current?.Dispatcher;
|
|
||||||
if (dispatcher == null || dispatcher.CheckAccess())
|
|
||||||
{
|
|
||||||
AddOrders(matched);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
AddOrders(matched);
|
|
||||||
BottomMsg = $"正在读取订单,读取日期{matched.Last().OrderTime.ToString("yyyy-MM-dd")}";
|
|
||||||
}));
|
}));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,10 +770,11 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatisticsInvoiceAmount();
|
StatisticsInvoiceAmount();
|
||||||
|
if (Config.IsSaveData)
|
||||||
|
{
|
||||||
SaveOrderInvoiceInfo();
|
SaveOrderInvoiceInfo();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -814,6 +869,9 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
get => _progressMaximum;
|
get => _progressMaximum;
|
||||||
set => SetValue(ref _progressMaximum, value);
|
set => SetValue(ref _progressMaximum, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Title => "发票助手";
|
||||||
|
|
||||||
public void SetProgress(int value, int maxValue)
|
public void SetProgress(int value, int maxValue)
|
||||||
{
|
{
|
||||||
StopUnknownTotalProgressTimer();
|
StopUnknownTotalProgressTimer();
|
||||||
@@ -887,6 +945,28 @@ public partial class PDDInvoiceViewModel : BindableBaseEx
|
|||||||
}
|
}
|
||||||
_unknownTotalProgressTimer = null;
|
_unknownTotalProgressTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
StopAutoScroll();
|
||||||
|
Browser.Dispose();
|
||||||
|
BrowserDetail.Dispose();
|
||||||
|
}
|
||||||
|
public void OnDialogOpened(IDialogParameters parameters)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public bool CanCloseDialog()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDialogClosed()
|
||||||
|
{
|
||||||
|
Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -896,5 +976,13 @@ public class InvoiceConfig
|
|||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string TaxNo { get; set; }
|
public string TaxNo { get; set; }
|
||||||
public decimal MaxAmount { get; set; }
|
public decimal MaxAmount { get; set; }
|
||||||
public bool IsSaveData { get; set; }
|
public bool IsSaveData { get; set; } = true;
|
||||||
|
|
||||||
|
public void Assign(InvoiceConfig config)
|
||||||
|
{
|
||||||
|
Title = config.Title;
|
||||||
|
TaxNo = config.TaxNo;
|
||||||
|
MaxAmount = config.MaxAmount;
|
||||||
|
IsSaveData = config.IsSaveData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.Settings"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.Settings"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="[vm ]clr-namespace:_29WxOrderWpf.ViewModels"
|
xmlns:vm="clr-namespace:_29WxOrderWpf.ViewModels"
|
||||||
xmlns:wpf="WPFCommon"
|
xmlns:wpf="WPFCommon"
|
||||||
Title="设置"
|
Title="设置"
|
||||||
Width="800"
|
Width="800"
|
||||||
@@ -22,6 +22,47 @@
|
|||||||
Style="{StaticResource SideTabControl}"
|
Style="{StaticResource SideTabControl}"
|
||||||
TabStripPlacement="Left">
|
TabStripPlacement="Left">
|
||||||
|
|
||||||
|
<TabItem Header="拍单">
|
||||||
|
<StackPanel>
|
||||||
|
<Border Style="{StaticResource SettingRow}">
|
||||||
|
<Grid Visibility="{Binding ShowEnablePddTransitTraditionalAddress}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Style="{StaticResource SettingTitle}" Text="云仓拍单" />
|
||||||
|
<TextBlock Style="{StaticResource SettingDesc}" Text="多多云仓拍单随机繁体详细地址" />
|
||||||
|
</StackPanel>
|
||||||
|
<CheckBox
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
IsChecked="{Binding SwitchEnablePddTransitTraditionalAddress}"
|
||||||
|
Style="{StaticResource ToggleSwitch}" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Border Style="{StaticResource SettingRow}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Style="{StaticResource SettingTitle}" Text="直发拍单" />
|
||||||
|
<TextBlock Style="{StaticResource SettingDesc}" Text="允许直发拍单" />
|
||||||
|
</StackPanel>
|
||||||
|
<CheckBox
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
IsChecked="{Binding SwitchEnableDirectBuy}"
|
||||||
|
Style="{StaticResource ToggleSwitch}" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Header="发货">
|
<TabItem Header="发货">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Border Style="{StaticResource SettingRow}">
|
<Border Style="{StaticResource SettingRow}">
|
||||||
@@ -37,8 +78,12 @@
|
|||||||
<CheckBox
|
<CheckBox
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
d:Visibility="Visible"
|
||||||
IsChecked="{Binding AutoSwitchGiftType}"
|
IsChecked="{Binding AutoSwitchGiftType}"
|
||||||
Style="{StaticResource ToggleSwitch}" />
|
IsEnabled="False"
|
||||||
|
Opacity="0.5"
|
||||||
|
Style="{StaticResource ToggleSwitch}"
|
||||||
|
Visibility="Collapsed" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using _29WxOrderWpf.ViewModels;
|
using _29WxOrderWpf.ViewModels;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
|
using AllBase.Helper;
|
||||||
using AllBase.Model.Config;
|
using AllBase.Model.Config;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
@@ -44,6 +45,15 @@ public partial class SettingsView : Window
|
|||||||
var setting = vm.ToConfig();
|
var setting = vm.ToConfig();
|
||||||
BaseClass.Setting = setting;
|
BaseClass.Setting = setting;
|
||||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig(SettingViewModel.SettingFileName, JsonConvert.SerializeObject(setting));
|
NaiBa.Util.Helper.ConfigHelper.SaveConfig(SettingViewModel.SettingFileName, JsonConvert.SerializeObject(setting));
|
||||||
|
|
||||||
|
foreach (var order in GlobalConfig.lstOrder)
|
||||||
|
{
|
||||||
|
foreach (var orderItem in order.OrderItems)
|
||||||
|
{
|
||||||
|
orderItem.UpdateOrderItemBuyButton();
|
||||||
|
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -157,10 +157,18 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="50*"
|
||||||
|
Header="序号"
|
||||||
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="100*"
|
Width="100*"
|
||||||
Header="AppId"
|
Header="AppId"
|
||||||
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="100*"
|
||||||
|
Header="店铺编号"
|
||||||
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="100*"
|
Width="100*"
|
||||||
Header="店铺名称"
|
Header="店铺名称"
|
||||||
@@ -224,7 +232,9 @@
|
|||||||
<Grid x:Name="gridListItem">
|
<Grid x:Name="gridListItem">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!--<ColumnDefinition Width="{Binding colShopIdWidth,RelativeSource={RelativeSource AncestorType={x:Type local:ShopListCtrl}}}" ></ColumnDefinition>-->
|
<!--<ColumnDefinition Width="{Binding colShopIdWidth,RelativeSource={RelativeSource AncestorType={x:Type local:ShopListCtrl}}}" ></ColumnDefinition>-->
|
||||||
<ColumnDefinition x:Name="colCheck" Width="100*" />
|
<ColumnDefinition x:Name="colCheck" Width="50*" />
|
||||||
|
<ColumnDefinition x:Name="colIndex" Width="50*" />
|
||||||
|
<ColumnDefinition x:Name="colAppId" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colShopId" Width="100*" />
|
<ColumnDefinition x:Name="colShopId" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colShopName" Width="100*" />
|
<ColumnDefinition x:Name="colShopName" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colGroupName" Width="100*" />
|
<ColumnDefinition x:Name="colGroupName" Width="100*" />
|
||||||
@@ -245,8 +255,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Tag="{Binding ShopId}"
|
Text="{Binding Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource listBoxIndexConverter}}"
|
||||||
Text="{Binding ShopId}"
|
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
@@ -256,7 +265,7 @@
|
|||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Tag="{Binding ShopId}"
|
Tag="{Binding ShopId}"
|
||||||
Text="{Binding ShopAccount}"
|
Text="{Binding ShopId}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="3"
|
Grid.Column="3"
|
||||||
@@ -265,11 +274,31 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ErpShopId}"
|
||||||
|
Text="{Binding ErpShopId}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="4"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ShopId}"
|
||||||
|
Text="{Binding ShopAccount}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="5"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
Tag="{Binding ShopId}"
|
Tag="{Binding ShopId}"
|
||||||
Text="{Binding GroupName}"
|
Text="{Binding GroupName}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="4"
|
Grid.Column="6"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// 空/Null 表示全部店铺(服务层会取全部店铺的 ErpShopId)。
|
/// 空/Null 表示全部店铺(服务层会取全部店铺的 ErpShopId)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> ShopIds { get; set; }
|
public List<string> ShopIds { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否统计快递费用
|
||||||
|
/// </summary>
|
||||||
|
public bool StatPackages { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -111,6 +115,10 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// 被拒绝金额(分)
|
/// 被拒绝金额(分)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public long RejectedRefund { get; set; }
|
public long RejectedRefund { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包裹费用
|
||||||
|
/// </summary>
|
||||||
|
public long PackageAmount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -179,6 +187,16 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int OrderRefundAmount { get; set; }
|
public int OrderRefundAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 利润
|
||||||
|
/// </summary>
|
||||||
|
public long ProfitAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 平台佣金
|
||||||
|
/// </summary>
|
||||||
|
public long PlatformFee { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 外采金额(分),即该订单下所有买手订单的购买金额之和
|
/// 外采金额(分),即该订单下所有买手订单的购买金额之和
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -189,6 +207,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int UnrefundedAmount { get; set; }
|
public int UnrefundedAmount { get; set; }
|
||||||
|
|
||||||
|
public long PackageAmount { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 买手订单信息(一个订单号对应多个买手订单)
|
/// 买手订单信息(一个订单号对应多个买手订单)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -200,6 +219,14 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class BuyerOrderInfo
|
public class BuyerOrderInfo
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 买手订单ID
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库类型 0,1直发
|
||||||
|
/// </summary>
|
||||||
|
public int PurchaseType { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 外部订单(买手订单)号
|
/// 外部订单(买手订单)号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -210,6 +237,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int OutAmount { get; set; }
|
public int OutAmount { get; set; }
|
||||||
|
|
||||||
|
public long RefundId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 退款金额(分)
|
/// 退款金额(分)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -219,6 +247,9 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
/// 退款状态
|
/// 退款状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string RefundStatusText { get; set; }
|
public string RefundStatusText { get; set; }
|
||||||
|
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public string Remark { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -266,6 +297,10 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
public decimal BuyerRefundSuccessedAmount { get; set; }
|
public decimal BuyerRefundSuccessedAmount { get; set; }
|
||||||
/// <summary>买手号剩余退款金额(尚未成功退款的金额,元)</summary>
|
/// <summary>买手号剩余退款金额(尚未成功退款的金额,元)</summary>
|
||||||
public decimal BuyerRefundRemainingAmount => BuyerRefundAmount - BuyerRefundSuccessedAmount;
|
public decimal BuyerRefundRemainingAmount => BuyerRefundAmount - BuyerRefundSuccessedAmount;
|
||||||
|
/// <summary>
|
||||||
|
/// 包裹费用
|
||||||
|
/// </summary>
|
||||||
|
public decimal PackageAmount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -333,6 +368,10 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
|
|
||||||
/// <summary>平均利润率(利润 / 采购金额,百分数,如 12.34 表示 12.34%)</summary>
|
/// <summary>平均利润率(利润 / 采购金额,百分数,如 12.34 表示 12.34%)</summary>
|
||||||
public decimal AverageProfitRate { get; set; }
|
public decimal AverageProfitRate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包裹费用
|
||||||
|
/// </summary>
|
||||||
|
public decimal PackageAmount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -392,7 +431,11 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Models
|
|||||||
Refund = 2,
|
Refund = 2,
|
||||||
|
|
||||||
/// <summary>买手未退回金额的订单:退款订单中买手款项还没退回的(对应统计里的未退回金额口径)</summary>
|
/// <summary>买手未退回金额的订单:退款订单中买手款项还没退回的(对应统计里的未退回金额口径)</summary>
|
||||||
BuyerUnrefunded = 3
|
BuyerUnrefunded = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// 利润订单 有效订单+退款订单利润>0
|
||||||
|
/// </summary>
|
||||||
|
Profit = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
x:Class="_29WxOrderWpf.Ctrls.Statistics.PeriodRevenueStatisticsView"
|
x:Class="_29WxOrderWpf.Ctrls.Statistics.PeriodRevenueStatisticsView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:common="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:common="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:stat="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
xmlns:stat="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.Statistics.ViewModels"
|
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.Statistics.ViewModels"
|
||||||
|
xmlns:wpf="WPFCommon"
|
||||||
d:DataContext="{d:DesignInstance Type=vm:ShopRevenueStatisticsViewModel,
|
d:DataContext="{d:DesignInstance Type=vm:ShopRevenueStatisticsViewModel,
|
||||||
IsDesignTimeCreatable=True}"
|
IsDesignTimeCreatable=True}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
@@ -48,9 +49,9 @@
|
|||||||
Width="110"
|
Width="110"
|
||||||
Height="32"
|
Height="32"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
|
BorderThickness="1"
|
||||||
DisplayMemberPath="Text"
|
DisplayMemberPath="Text"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
BorderThickness="1"
|
|
||||||
ItemsSource="{Binding TimeRangeOptions}"
|
ItemsSource="{Binding TimeRangeOptions}"
|
||||||
SelectedItem="{Binding SelectedTimeRange, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedTimeRange, Mode=TwoWay}"
|
||||||
Style="{StaticResource RoundedComboBox}" />
|
Style="{StaticResource RoundedComboBox}" />
|
||||||
@@ -60,9 +61,10 @@
|
|||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#666666"
|
Foreground="#666666"
|
||||||
Text="日期" />
|
Text="日期" />
|
||||||
<DatePicker BorderBrush="{StaticResource pageColorBrush}"
|
<DatePicker
|
||||||
Height="32"
|
Height="32"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
SelectedDate="{Binding StartDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
SelectedDate="{Binding StartDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0"
|
Margin="6,0"
|
||||||
@@ -70,9 +72,10 @@
|
|||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#666666"
|
Foreground="#666666"
|
||||||
Text="~" />
|
Text="~" />
|
||||||
<DatePicker BorderBrush="{StaticResource pageColorBrush}"
|
<DatePicker
|
||||||
Height="32"
|
Height="32"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
|
BorderBrush="{StaticResource pageColorBrush}"
|
||||||
SelectedDate="{Binding EndDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
SelectedDate="{Binding EndDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="14,0,6,0"
|
Margin="14,0,6,0"
|
||||||
@@ -95,6 +98,14 @@
|
|||||||
ItemsSource="{Binding ShopOptions}"
|
ItemsSource="{Binding ShopOptions}"
|
||||||
SelectedItem="{Binding SelectedShop, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedShop, Mode=TwoWay}"
|
||||||
Style="{StaticResource BaseComboBoxStyle}" />-->
|
Style="{StaticResource BaseComboBoxStyle}" />-->
|
||||||
|
<wpf:TitleContent
|
||||||
|
Title="去除快递费"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Placement="Left"
|
||||||
|
TitleVerticalAlignment="Center">
|
||||||
|
<CheckBox IsChecked="{Binding StatPackages}" Style="{StaticResource ToggleSwitch}" />
|
||||||
|
</wpf:TitleContent>
|
||||||
<Button
|
<Button
|
||||||
Height="32"
|
Height="32"
|
||||||
Margin="18,0,0,0"
|
Margin="18,0,0,0"
|
||||||
|
|||||||
@@ -80,16 +80,6 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
<Button
|
|
||||||
Margin="10"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Command="{Binding ShowOrderListCommand}"
|
|
||||||
CommandParameter="ValidOrderCount"
|
|
||||||
Content="明细"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{StaticResource pageColorBrush}"
|
|
||||||
Style="{StaticResource IconButtonStyle}" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<!-- 采购金额 -->
|
<!-- 采购金额 -->
|
||||||
<Border Style="{StaticResource CardBorderStyle}">
|
<Border Style="{StaticResource CardBorderStyle}">
|
||||||
@@ -113,6 +103,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- 利润 -->
|
<!-- 利润 -->
|
||||||
|
<Grid>
|
||||||
<Border Style="{StaticResource CardBorderStyle}">
|
<Border Style="{StaticResource CardBorderStyle}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -132,6 +123,17 @@
|
|||||||
Text="实际利润" />
|
Text="实际利润" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
<Button
|
||||||
|
Margin="10"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Command="{Binding ShowOrderListCommand}"
|
||||||
|
CommandParameter="ProfitOrder"
|
||||||
|
Content="明细"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{StaticResource pageColorBrush}"
|
||||||
|
Style="{StaticResource IconButtonStyle}" />
|
||||||
|
</Grid>
|
||||||
<!-- 平均利润率 -->
|
<!-- 平均利润率 -->
|
||||||
<Border Style="{StaticResource CardBorderStyle}">
|
<Border Style="{StaticResource CardBorderStyle}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
@@ -255,7 +257,7 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Foreground="#888888"
|
Foreground="#888888"
|
||||||
Text="总采购金额" />
|
Text="售后采购金额" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,12,0,0"
|
Margin="0,12,0,0"
|
||||||
FontSize="30"
|
FontSize="30"
|
||||||
|
|||||||
@@ -37,6 +37,13 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
/// 订单明细列表(有效订单 / 退款订单 / 买手未退回金额的订单),供订单列表弹窗使用。
|
/// 订单明细列表(有效订单 / 退款订单 / 买手未退回金额的订单),供订单列表弹窗使用。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<List<ShopOrderDetailResponse>> QueryOrderRowsAsync(ShopRevenueStatisticsQuery query, ShopOrderDetailType detailType);
|
Task<List<ShopOrderDetailResponse>> QueryOrderRowsAsync(ShopRevenueStatisticsQuery query, ShopOrderDetailType detailType);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 把某笔买手订单标记为退款成功(订单列表弹窗“退款成功”按钮,仅买手未退回金额的订单使用)。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">买手退款表ID(<see cref="BuyerOrderInfo.RefundId"/>,即表格当前行的 id)</param>
|
||||||
|
Task<bool> UpdateBuyerRefundStatusAsync(long id);
|
||||||
|
Task<bool> UpdateBuyerAfterOrderRemark(long id, string remark);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -101,7 +108,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
decimal buyerPaymentAmount = ToYuan(list.Sum(a => a.TotalPurchase));
|
decimal buyerPaymentAmount = ToYuan(list.Sum(a => a.TotalPurchase));
|
||||||
decimal buyerRefundAmount = ToYuan(list.Sum(a => a.TotalRefund));
|
decimal buyerRefundAmount = ToYuan(list.Sum(a => a.TotalRefund));
|
||||||
decimal buyerRefundSuccessedAmount = ToYuan(list.Sum(a => a.DoneRefund));
|
decimal buyerRefundSuccessedAmount = ToYuan(list.Sum(a => a.DoneRefund));
|
||||||
|
decimal packageAmount = ToYuan(list.Sum(a => a.PackageAmount));
|
||||||
int validOrderCount = list.Sum(a => a.OrderCount); // 新接口 OrderCount 不含退款订单
|
int validOrderCount = list.Sum(a => a.OrderCount); // 新接口 OrderCount 不含退款订单
|
||||||
int refundOrderCount = list.Sum(a => a.RefundOrderCount);
|
int refundOrderCount = list.Sum(a => a.RefundOrderCount);
|
||||||
int totalOrderCount = validOrderCount + refundOrderCount;
|
int totalOrderCount = validOrderCount + refundOrderCount;
|
||||||
@@ -121,6 +128,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
BuyerPaymentAmount = buyerPaymentAmount,
|
BuyerPaymentAmount = buyerPaymentAmount,
|
||||||
BuyerRefundAmount = buyerRefundAmount,
|
BuyerRefundAmount = buyerRefundAmount,
|
||||||
BuyerRefundSuccessedAmount = buyerRefundSuccessedAmount,
|
BuyerRefundSuccessedAmount = buyerRefundSuccessedAmount,
|
||||||
|
PackageAmount = packageAmount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +249,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
decimal profit = ToYuan(list.Sum(a => a.ProfitAmount));
|
decimal profit = ToYuan(list.Sum(a => a.ProfitAmount));
|
||||||
decimal buyerPaymentAmount = ToYuan(list.Sum(a => a.TotalPurchase));
|
decimal buyerPaymentAmount = ToYuan(list.Sum(a => a.TotalPurchase));
|
||||||
int orderCount = list.Sum(a => a.OrderCount);
|
int orderCount = list.Sum(a => a.OrderCount);
|
||||||
|
decimal packageAmount = ToYuan(list.Sum(a => a.PackageAmount));
|
||||||
return new ShopStatisticsItem
|
return new ShopStatisticsItem
|
||||||
{
|
{
|
||||||
ShopName = ResolveShopName(shopId),
|
ShopName = ResolveShopName(shopId),
|
||||||
@@ -253,7 +261,8 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
PlatformFeeTotal = ToYuan(list.Sum(a => a.PlatformFee)),
|
PlatformFeeTotal = ToYuan(list.Sum(a => a.PlatformFee)),
|
||||||
Commission = 0m, // 新接口无“达人佣金”字段,保留占位
|
Commission = 0m, // 新接口无“达人佣金”字段,保留占位
|
||||||
AvgOrderAmount = orderCount == 0 ? 0m : salesAmount / orderCount,
|
AvgOrderAmount = orderCount == 0 ? 0m : salesAmount / orderCount,
|
||||||
AverageProfitRate = buyerPaymentAmount == 0m ? 0m : profit / buyerPaymentAmount * 100m
|
AverageProfitRate = buyerPaymentAmount == 0m ? 0m : profit / buyerPaymentAmount * 100m,
|
||||||
|
PackageAmount = packageAmount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,6 +373,9 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
/// <summary>订单明细接口地址(订单列表弹窗用)</summary>
|
/// <summary>订单明细接口地址(订单列表弹窗用)</summary>
|
||||||
private const string GetShopOrderDetailsApi = "shop_revenue_statistics/GetShopOrderDetails";
|
private const string GetShopOrderDetailsApi = "shop_revenue_statistics/GetShopOrderDetails";
|
||||||
|
|
||||||
|
/// <summary>更新买手订单退款状态接口地址(id 通过 URL 参数传递)</summary>
|
||||||
|
private const string UpdateBuyerRefundStatusApi = "buyer/UpdateBuyerRefundStatsu";
|
||||||
|
|
||||||
/// <summary>Unix 纪元(本地时区),用于解析以时间戳作为 Key 的返回数据</summary>
|
/// <summary>Unix 纪元(本地时区),用于解析以时间戳作为 Key 的返回数据</summary>
|
||||||
private static readonly DateTime UnixEpoch = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
private static readonly DateTime UnixEpoch = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||||
|
|
||||||
@@ -375,7 +387,13 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
// 顺序请求:签名中的 time/code 由当前时间生成,并发请求有被判重复签名的风险。
|
// 顺序请求:签名中的 time/code 由当前时间生成,并发请求有被判重复签名的风险。
|
||||||
var summaryStats = await RequestStatsAsync(query, ShopStatsGroupType.Summary);
|
var summaryStats = await RequestStatsAsync(query, ShopStatsGroupType.Summary);
|
||||||
var trend = await RequestTrendAsync(query);
|
var trend = await RequestTrendAsync(query);
|
||||||
|
if (query.StatPackages)
|
||||||
|
{
|
||||||
|
foreach (var item in summaryStats)
|
||||||
|
{
|
||||||
|
item.ProfitAmount -= item.PackageAmount;
|
||||||
|
}
|
||||||
|
}
|
||||||
return new ShopRevenueStatisticsResult
|
return new ShopRevenueStatisticsResult
|
||||||
{
|
{
|
||||||
Summary = ShopStatsAggregator.GetSummary(summaryStats),
|
Summary = ShopStatsAggregator.GetSummary(summaryStats),
|
||||||
@@ -389,7 +407,13 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
{
|
{
|
||||||
// 按天/周/月粒度取数;接口不返回整段汇总,卡片由返回的周期记录在客户端合计
|
// 按天/周/月粒度取数;接口不返回整段汇总,卡片由返回的周期记录在客户端合计
|
||||||
var stats = await RequestStatsAsync(query, ToGroupType(periodType));
|
var stats = await RequestStatsAsync(query, ToGroupType(periodType));
|
||||||
|
if (query.StatPackages)
|
||||||
|
{
|
||||||
|
foreach (var item in stats)
|
||||||
|
{
|
||||||
|
item.ProfitAmount -= item.PackageAmount;
|
||||||
|
}
|
||||||
|
}
|
||||||
return new ShopPeriodStatisticsResult
|
return new ShopPeriodStatisticsResult
|
||||||
{
|
{
|
||||||
Summary = ShopStatsAggregator.GetSummary(stats),
|
Summary = ShopStatsAggregator.GetSummary(stats),
|
||||||
@@ -626,5 +650,41 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
|||||||
EnsureSuccess(ret);
|
EnsureSuccess(ret);
|
||||||
return ret.Data ?? new List<ShopOrderDetailResponse>();
|
return ret.Data ?? new List<ShopOrderDetailResponse>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求 buyer/UpdateBuyerRefundStatsu 更新买手订单退款状态:
|
||||||
|
/// id 拼在 URL 查询参数上(Build29WxObjString 生成的地址已带 ?obj=…,这里用 &id= 追加);
|
||||||
|
/// 请求体走 UserLogin.GetSignPostData 常规签名(time/code 等)。
|
||||||
|
/// 返回码非 200 时抛出异常,由调用方提示。
|
||||||
|
/// </summary>
|
||||||
|
public async Task<bool> UpdateBuyerRefundStatusAsync(long id)
|
||||||
|
{
|
||||||
|
if (id == 0)
|
||||||
|
throw new Exception("更新失败:缺少买手订单ID");
|
||||||
|
|
||||||
|
var url = BaseClass.Build29WxObjString(UpdateBuyerRefundStatusApi) + "&id=" + id;
|
||||||
|
var html = await GetHtml.PostJsonAsync(url, UserLogin.GetSignPostData(new { }));
|
||||||
|
|
||||||
|
var ret = Deserialize<Result<bool>>(html);
|
||||||
|
EnsureSuccess(ret);
|
||||||
|
return ret.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> UpdateBuyerAfterOrderRemark(long id, string remark)
|
||||||
|
{
|
||||||
|
if (id == 0)
|
||||||
|
throw new Exception("更新失败:缺少买手订单ID");
|
||||||
|
|
||||||
|
var url = BaseClass.Build29WxObjString("buyer/UpdateBuyerAfterRemark");
|
||||||
|
var html = await GetHtml.PostJsonAsync(url, UserLogin.GetSignPostData(new
|
||||||
|
{
|
||||||
|
id = id,
|
||||||
|
remark
|
||||||
|
}));
|
||||||
|
|
||||||
|
var ret = Deserialize<Result<bool>>(html);
|
||||||
|
EnsureSuccess(ret);
|
||||||
|
return ret.Data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,12 +7,14 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:stat="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
xmlns:stat="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
||||||
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.Statistics.ViewModels"
|
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.Statistics.ViewModels"
|
||||||
xmlns:wpf="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:wpf="WxOrder.Framework"
|
||||||
|
Width="1600"
|
||||||
d:Background="#F5F7FB"
|
d:Background="#F5F7FB"
|
||||||
d:DataContext="{d:DesignInstance Type=vm:ShopRevenueStatisticsViewModel,
|
d:DataContext="{d:DesignInstance Type=vm:ShopRevenueStatisticsViewModel,
|
||||||
IsDesignTimeCreatable=True}"
|
IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="900"
|
d:DesignHeight="900"
|
||||||
d:DesignWidth="1600"
|
d:DesignWidth="1600"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<BooleanToVisibilityConverter x:Key="boolToVisibilityConverter" />
|
<BooleanToVisibilityConverter x:Key="boolToVisibilityConverter" />
|
||||||
@@ -272,11 +274,13 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<!-- helper -->
|
<!-- helper -->
|
||||||
<Border
|
|
||||||
|
<WrapPanel
|
||||||
Margin="0,20,30,0"
|
Margin="0,20,30,0"
|
||||||
Padding="10"
|
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top">
|
||||||
|
<Border
|
||||||
|
Padding="10"
|
||||||
Background="{StaticResource pageColorBrush}"
|
Background="{StaticResource pageColorBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
@@ -295,7 +299,7 @@
|
|||||||
Text="利润计算逻辑" />
|
Text="利润计算逻辑" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
</WrapPanel>
|
||||||
<!-- Popup 弹出层 -->
|
<!-- Popup 弹出层 -->
|
||||||
<Popup
|
<Popup
|
||||||
x:Name="InfoPopup"
|
x:Name="InfoPopup"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
x:Class="_29WxOrderWpf.Ctrls.Statistics.ShowOrderDialogView"
|
x:Class="_29WxOrderWpf.Ctrls.Statistics.ShowOrderDialogView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comn="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
@@ -12,11 +12,12 @@
|
|||||||
comn:DialogWindowProperty.Width="1320"
|
comn:DialogWindowProperty.Width="1320"
|
||||||
d:Background="White"
|
d:Background="White"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="1000"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
PreviewKeyDown="ShowOrderDialogView_PreviewKeyDown"
|
PreviewKeyDown="ShowOrderDialogView_PreviewKeyDown"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
|
<wpf:BindingProxy x:Key="ViewModel" Data="{Binding}" />
|
||||||
<!-- 单元格文字居中 -->
|
<!-- 单元格文字居中 -->
|
||||||
<Style x:Key="CenterCellTextStyle" TargetType="TextBlock">
|
<Style x:Key="CenterCellTextStyle" TargetType="TextBlock">
|
||||||
<Setter Property="TextAlignment" Value="Center" />
|
<Setter Property="TextAlignment" Value="Center" />
|
||||||
@@ -148,15 +149,19 @@
|
|||||||
Header="退款金额" />
|
Header="退款金额" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
Binding="{Binding OutAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
Binding="{Binding PlatformFee, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
||||||
ElementStyle="{StaticResource CenterCellTextStyle}"
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
||||||
Header="外采金额" />
|
Header="平台费用" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
Binding="{Binding UnrefundedAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
Binding="{Binding ProfitAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
||||||
ElementStyle="{StaticResource CenterCellTextStyle}"
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
||||||
Header="未退回金额" />
|
Header="利润" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="*"
|
||||||
|
Binding="{Binding PackageAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
||||||
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
||||||
|
Header="快递费" />
|
||||||
<!-- 买手订单:一笔买手订单占一行,不合并 -->
|
<!-- 买手订单:一笔买手订单占一行,不合并 -->
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="1.6*"
|
Width="1.6*"
|
||||||
@@ -167,7 +172,8 @@
|
|||||||
Width="*"
|
Width="*"
|
||||||
Binding="{Binding BuyerOutAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
Binding="{Binding BuyerOutAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
||||||
ElementStyle="{StaticResource CenterCellTextStyle}"
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
||||||
Header="买手金额" />
|
Header="外采金额" />
|
||||||
|
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
Binding="{Binding BuyerRefundAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
Binding="{Binding BuyerRefundAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
||||||
@@ -178,6 +184,58 @@
|
|||||||
Binding="{Binding BuyerRefundStatusText}"
|
Binding="{Binding BuyerRefundStatusText}"
|
||||||
ElementStyle="{StaticResource CenterCellTextStyle}"
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
||||||
Header="退款状态" />
|
Header="退款状态" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="1.1*"
|
||||||
|
Binding="{Binding Remark}"
|
||||||
|
Header="备注"
|
||||||
|
Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.IsBuyerUnrefunded, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="ToolTip" Value="{Binding Remark}" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<!-- 操作:仅“买手未退回金额的订单”弹窗显示(列可见性在构造函数里按订单明细类型设置) -->
|
||||||
|
<DataGridTemplateColumn
|
||||||
|
x:Name="colUpdateRefund"
|
||||||
|
Width="*"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Header="操作"
|
||||||
|
Visibility="Collapsed">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{Binding Source={StaticResource ViewModel}, Path=Data.UpdateBuyerRefundStatusCommand}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Content="确认成功"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
ToolTip="把该笔买手订单标记为退款成功" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn
|
||||||
|
x:Name="colRemark"
|
||||||
|
Width="*"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Header="操作"
|
||||||
|
Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.IsBuyerUnrefunded, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Button
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{Binding Source={StaticResource ViewModel}, Path=Data.UpdateRemarkCommand}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Content="备注"
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}"
|
||||||
|
ToolTip="设置备注" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
||||||
|
using _29WxOrderWpf.Ctrls.Statistics.Services;
|
||||||
using _29WxOrderWpf.ToolCtrls;
|
using _29WxOrderWpf.ToolCtrls;
|
||||||
|
using AllBase;
|
||||||
|
using NaiBa.Util.Extension;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -19,6 +22,7 @@ using System.Windows.Media;
|
|||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using Work.BaseForms;
|
||||||
using WPFCommon.Models;
|
using WPFCommon.Models;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.Statistics;
|
namespace _29WxOrderWpf.Ctrls.Statistics;
|
||||||
@@ -30,10 +34,17 @@ public partial class ShowOrderDialogView : UserControl
|
|||||||
{
|
{
|
||||||
private readonly KeyEventHandler shortcutKeyHandler;
|
private readonly KeyEventHandler shortcutKeyHandler;
|
||||||
|
|
||||||
public ShowOrderDialogView(List<ShopOrderDetailResponse> list)
|
public ShowOrderDialogView(List<ShopOrderDetailResponse> list, ShopOrderDetailType detailType, IShopRevenueStatisticsService statisticsService)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.DataContext = new ShowOrderDialogViewModel(list);
|
this.DataContext = new ShowOrderDialogViewModel(list, detailType, statisticsService);
|
||||||
|
|
||||||
|
// “操作”列(退款成功按钮)只在“买手未退回金额的订单”弹窗里显示
|
||||||
|
if (detailType == ShopOrderDetailType.BuyerUnrefunded)
|
||||||
|
{
|
||||||
|
colUpdateRefund.Visibility = Visibility.Visible;
|
||||||
|
//colRemark.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
shortcutKeyHandler = ShowOrderDialogView_PreviewKeyDown;
|
shortcutKeyHandler = ShowOrderDialogView_PreviewKeyDown;
|
||||||
|
|
||||||
@@ -83,6 +94,7 @@ public partial class ShowOrderDialogView : UserControl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 弹窗级快捷键:Ctrl+A 全选(筛选后显示的)行,Ctrl+C 复制数据。
|
/// 弹窗级快捷键:Ctrl+A 全选(筛选后显示的)行,Ctrl+C 复制数据。
|
||||||
/// 焦点在文本框里(如订单号搜索框)时不拦截,保留文本自身的 Ctrl+A/Ctrl+C/Ctrl+V 行为。
|
/// 焦点在文本框里(如订单号搜索框)时不拦截,保留文本自身的 Ctrl+A/Ctrl+C/Ctrl+V 行为。
|
||||||
@@ -139,7 +151,7 @@ public partial class ShowOrderDialogView : UserControl
|
|||||||
/// 没有买手订单时占一行且买手字段为空),不把多笔买手订单合并到同一行。
|
/// 没有买手订单时占一行且买手字段为空),不把多笔买手订单合并到同一行。
|
||||||
/// 商铺订单级字段(店名/订单号/创建时间/金额等)在多行之间重复,保证每行都是一条完整记录。
|
/// 商铺订单级字段(店名/订单号/创建时间/金额等)在多行之间重复,保证每行都是一条完整记录。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class ShopOrderDetailRow
|
class ShopOrderDetailRow : BindableBaseEx
|
||||||
{
|
{
|
||||||
public string ShopName { get; set; }
|
public string ShopName { get; set; }
|
||||||
|
|
||||||
@@ -150,25 +162,51 @@ class ShopOrderDetailRow
|
|||||||
public int OrderPrice { get; set; }
|
public int OrderPrice { get; set; }
|
||||||
|
|
||||||
public int OrderRefundAmount { get; set; }
|
public int OrderRefundAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 利润
|
||||||
|
/// </summary>
|
||||||
|
public long ProfitAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包裹费用
|
||||||
|
/// </summary>
|
||||||
|
public long PackageAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 平台佣金
|
||||||
|
/// </summary>
|
||||||
|
public long PlatformFee { get; set; }
|
||||||
public int OutAmount { get; set; }
|
public int OutAmount { get; set; }
|
||||||
|
|
||||||
public int UnrefundedAmount { get; set; }
|
public int UnrefundedAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>买手订单表ID</summary>
|
||||||
|
public long BuyerId { get; set; }
|
||||||
|
|
||||||
/// <summary>买手(外部)订单号;无买手订单时为空</summary>
|
/// <summary>买手(外部)订单号;无买手订单时为空</summary>
|
||||||
public string OutOrderSn { get; set; }
|
public string OutOrderSn { get; set; }
|
||||||
|
|
||||||
/// <summary>买手订单金额(分)</summary>
|
/// <summary>买手订单金额(分)</summary>
|
||||||
public int BuyerOutAmount { get; set; }
|
public int BuyerOutAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 买手退款表 id
|
||||||
|
/// </summary>
|
||||||
|
public long BuyerRefundId { get; set; }
|
||||||
/// <summary>买手订单退款金额(分)</summary>
|
/// <summary>买手订单退款金额(分)</summary>
|
||||||
public int BuyerRefundAmount { get; set; }
|
public int BuyerRefundAmount { get; set; }
|
||||||
|
|
||||||
/// <summary>买手订单退款状态</summary>
|
/// <summary>买手订单退款状态(更新成功后就地改为“退款成功”)</summary>
|
||||||
public string BuyerRefundStatusText { get; set; }
|
public string BuyerRefundStatusText
|
||||||
|
{
|
||||||
|
get => GetValue<string>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
|
public string Remark
|
||||||
|
{
|
||||||
|
get => GetValue<string>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
/// <summary>把接口返回的订单明细按买手订单展平成表格行</summary>
|
/// <summary>把接口返回的订单明细按买手订单展平成表格行</summary>
|
||||||
public static List<ShopOrderDetailRow> Flatten(IEnumerable<ShopOrderDetailResponse> list)
|
public static List<ShopOrderDetailRow> Flatten(IEnumerable<ShopOrderDetailResponse> list, ShopOrderDetailType detailType)
|
||||||
{
|
{
|
||||||
var rows = new List<ShopOrderDetailRow>();
|
var rows = new List<ShopOrderDetailRow>();
|
||||||
if (list == null)
|
if (list == null)
|
||||||
@@ -184,10 +222,20 @@ class ShopOrderDetailRow
|
|||||||
rows.Add(Create(item, null));
|
rows.Add(Create(item, null));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (detailType == ShopOrderDetailType.Profit)
|
||||||
|
{
|
||||||
|
// 利润订单只取最后一个买手订单
|
||||||
|
rows.Add(Create(item, item.BuyerOrders.LastOrDefault()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
foreach (var buyerOrder in item.BuyerOrders)
|
foreach (var buyerOrder in item.BuyerOrders)
|
||||||
|
{
|
||||||
rows.Add(Create(item, buyerOrder));
|
rows.Add(Create(item, buyerOrder));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,26 +248,38 @@ class ShopOrderDetailRow
|
|||||||
CreateTime = item.CreateTime,
|
CreateTime = item.CreateTime,
|
||||||
OrderPrice = item.OrderPrice,
|
OrderPrice = item.OrderPrice,
|
||||||
OrderRefundAmount = item.OrderRefundAmount,
|
OrderRefundAmount = item.OrderRefundAmount,
|
||||||
|
ProfitAmount = item.ProfitAmount,
|
||||||
|
PackageAmount = item.PackageAmount,
|
||||||
|
PlatformFee = item.PlatformFee,
|
||||||
OutAmount = item.OutAmount,
|
OutAmount = item.OutAmount,
|
||||||
UnrefundedAmount = item.UnrefundedAmount,
|
UnrefundedAmount = item.UnrefundedAmount,
|
||||||
|
BuyerId = buyerOrder == null ? 0 : buyerOrder.Id,
|
||||||
OutOrderSn = buyerOrder == null ? null : buyerOrder.OutOrderSn,
|
OutOrderSn = buyerOrder == null ? null : buyerOrder.OutOrderSn,
|
||||||
|
BuyerRefundId = buyerOrder == null ? 0 : buyerOrder.RefundId,
|
||||||
BuyerOutAmount = buyerOrder == null ? 0 : buyerOrder.OutAmount,
|
BuyerOutAmount = buyerOrder == null ? 0 : buyerOrder.OutAmount,
|
||||||
BuyerRefundAmount = buyerOrder == null ? 0 : buyerOrder.RefundAmount,
|
BuyerRefundAmount = buyerOrder == null ? 0 : buyerOrder.RefundAmount,
|
||||||
BuyerRefundStatusText = buyerOrder == null ? null : buyerOrder.RefundStatusText,
|
BuyerRefundStatusText = buyerOrder == null ? null : buyerOrder.RefundStatusText,
|
||||||
|
Remark = buyerOrder == null ? null : buyerOrder.Remark,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ShowOrderDialogViewModel : BindableBaseEx
|
class ShowOrderDialogViewModel : BindableBaseEx
|
||||||
{
|
{
|
||||||
|
private readonly ShopOrderDetailType _detailType;
|
||||||
|
private readonly IShopRevenueStatisticsService _statisticsService;
|
||||||
|
|
||||||
public ObservableCollection<ShopOrderDetailRow> Data { get; set; }
|
public ObservableCollection<ShopOrderDetailRow> Data { get; set; }
|
||||||
public ICollectionView DataView { get; private set; }
|
public ICollectionView DataView { get; private set; }
|
||||||
public ShowOrderDialogViewModel(List<ShopOrderDetailResponse> list)
|
public ShowOrderDialogViewModel(List<ShopOrderDetailResponse> list, ShopOrderDetailType detailType, IShopRevenueStatisticsService statisticsService)
|
||||||
{
|
{
|
||||||
// 按买手订单展平:一笔买手订单一一行,不合并
|
IsBuyerUnrefunded = detailType == ShopOrderDetailType.BuyerUnrefunded;
|
||||||
Data = new ObservableCollection<ShopOrderDetailRow>(ShopOrderDetailRow.Flatten(list));
|
// 按买手订单展平:一笔买手订单一一行, 利润明细合并,只展示一条
|
||||||
|
Data = new ObservableCollection<ShopOrderDetailRow>(ShopOrderDetailRow.Flatten(list, detailType));
|
||||||
DataView = CollectionViewSource.GetDefaultView(Data);
|
DataView = CollectionViewSource.GetDefaultView(Data);
|
||||||
DataView.Filter = FilterRow;
|
DataView.Filter = FilterRow;
|
||||||
|
_detailType = detailType;
|
||||||
|
_statisticsService = statisticsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool FilterRow(object obj)
|
private bool FilterRow(object obj)
|
||||||
@@ -238,6 +298,11 @@ class ShowOrderDialogViewModel : BindableBaseEx
|
|||||||
get => GetValue<string>();
|
get => GetValue<string>();
|
||||||
set => SetValue(value, () => DataView.Refresh());
|
set => SetValue(value, () => DataView.Refresh());
|
||||||
}
|
}
|
||||||
|
public bool IsBuyerUnrefunded
|
||||||
|
{
|
||||||
|
get => GetValue<bool>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>当前筛选后显示的行(按表格显示顺序)</summary>
|
/// <summary>当前筛选后显示的行(按表格显示顺序)</summary>
|
||||||
public List<ShopOrderDetailRow> GetFilteredRows()
|
public List<ShopOrderDetailRow> GetFilteredRows()
|
||||||
@@ -258,13 +323,9 @@ class ShowOrderDialogViewModel : BindableBaseEx
|
|||||||
list = GetFilteredRows();
|
list = GetFilteredRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
Window window = Application.Current.Windows
|
|
||||||
.OfType<Window>()
|
|
||||||
.FirstOrDefault(w => w.IsActive) ?? Application.Current.MainWindow;
|
|
||||||
|
|
||||||
if (list.Count == 0)
|
if (list.Count == 0)
|
||||||
{
|
{
|
||||||
ToastHelper.Show(window, "没有可复制的数据", type: ToastType.Warning);
|
ToastHelper.Show("没有可复制的数据", type: ToastType.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,38 +333,114 @@ class ShowOrderDialogViewModel : BindableBaseEx
|
|||||||
{
|
{
|
||||||
string text = BuildCopyText(list);
|
string text = BuildCopyText(list);
|
||||||
Application.Current.Dispatcher.Invoke(() => Clipboard.SetText(text));
|
Application.Current.Dispatcher.Invoke(() => Clipboard.SetText(text));
|
||||||
ToastHelper.Show(window, "复制成功");
|
ToastHelper.Show("复制成功");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ToastHelper.Show(window, "复制失败 " + ex.Message, type: ToastType.Error);
|
ToastHelper.Show("复制失败 " + ex.Message, type: ToastType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ICommand UpdateBuyerRefundStatusCommand => new AsyncDelegateCommand<ShopOrderDetailRow>(UpdateBuyerRefundStatus);
|
||||||
|
|
||||||
|
private async Task UpdateBuyerRefundStatus(ShopOrderDetailRow row)
|
||||||
|
{
|
||||||
|
if (row.BuyerRefundId == 0)
|
||||||
|
{
|
||||||
|
ToastHelper.Show("该行缺少买手订单ID,无法更新", type: ToastType.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var result = MessageBox.Show($"确定要把订单:{row.OrderId}\n设为已退款成功状态?", "提示",
|
||||||
|
MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
|
|
||||||
|
if (result != MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var ret = await _statisticsService.UpdateBuyerRefundStatusAsync(row.BuyerRefundId);
|
||||||
|
if (ret)
|
||||||
|
{
|
||||||
|
row.BuyerRefundStatusText = "退款成功";
|
||||||
|
ToastHelper.Show("操作成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw new Exception("状态更改失败");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ToastHelper.Show("操作失败 " + ex.Message, type: ToastType.Error);
|
||||||
|
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ICommand UpdateRemarkCommand => new AsyncDelegateCommand<ShopOrderDetailRow>(UpdateRemark);
|
||||||
|
|
||||||
|
private async Task UpdateRemark(ShopOrderDetailRow row)
|
||||||
|
{
|
||||||
|
string? remark = InputDialog.ShowText("请输入备注:", "备注", row.Remark, allowEmpty: true);
|
||||||
|
if (remark == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var ret = await _statisticsService.UpdateBuyerAfterOrderRemark(row.BuyerRefundId, remark);
|
||||||
|
if (ret)
|
||||||
|
{
|
||||||
|
row.Remark = remark;
|
||||||
|
ToastHelper.Show("操作成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw new Exception("备注更改失败");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ToastHelper.Show("操作失败 " + ex.Message, type: ToastType.Error);
|
||||||
|
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>把行拼成制表符分隔的文本(第一行是表头)</summary>
|
/// <summary>把行拼成制表符分隔的文本(第一行是表头)</summary>
|
||||||
private string BuildCopyText(IEnumerable<ShopOrderDetailRow> rows)
|
private string BuildCopyText(IEnumerable<ShopOrderDetailRow> rows)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
|
bool includeRemark = _detailType == ShopOrderDetailType.BuyerUnrefunded;
|
||||||
|
|
||||||
// 表头
|
// 表头
|
||||||
sb.AppendLine("店名\t订单\t创建时间\t金额\t退款金额\t外采金额\t未退回金额\t买手单号\t买手金额\t买手退款\t退款状态");
|
List<string> headers = ["店名", "订单", "创建时间", "金额", "退款金额", "平台费用", "利润","快递费", "买手单号", "外采金额", "买手退款", "退款状态"];
|
||||||
|
if (includeRemark)
|
||||||
|
headers.Add("备注");
|
||||||
|
sb.AppendLine(string.Join("\t", headers));
|
||||||
|
|
||||||
// 数据行
|
// 数据行
|
||||||
foreach (var item in rows)
|
foreach (var item in rows)
|
||||||
{
|
{
|
||||||
string shopName = CsvEscape(item.ShopName);
|
var cols = new List<string>
|
||||||
string orderId = item.OrderId;
|
{
|
||||||
string createTime = item.CreateTime.ToString("yyyy-MM-dd HH:mm");
|
CsvEscape(item.ShopName),
|
||||||
string orderPrice = (item.OrderPrice / 100m).ToString("0.00");
|
item.OrderId,
|
||||||
string refundAmount = (item.OrderRefundAmount / 100m).ToString("0.00");
|
item.CreateTime.ToString("yyyy-MM-dd HH:mm"),
|
||||||
string outAmount = (item.OutAmount / 100m).ToString("0.00");
|
(item.OrderPrice / 100m).ToString("0.00"),
|
||||||
string unrefundedAmount = (item.UnrefundedAmount / 100m).ToString("0.00");
|
(item.OrderRefundAmount / 100m).ToString("0.00"),
|
||||||
string buyerOrderSn = CsvEscape(item.OutOrderSn);
|
(item.PlatformFee / 100m).ToString("0.00"),
|
||||||
string buyerOutAmount = (item.BuyerOutAmount / 100m).ToString("0.00");
|
(item.ProfitAmount / 100m).ToString("0.00"),
|
||||||
string buyerRefundAmount = (item.BuyerRefundAmount / 100m).ToString("0.00");
|
(item.PackageAmount / 100m).ToString("0.00"),
|
||||||
string buyerRefundStatus = CsvEscape(item.BuyerRefundStatusText);
|
CsvEscape(item.OutOrderSn),
|
||||||
|
(item.BuyerOutAmount / 100m).ToString("0.00"),
|
||||||
sb.AppendLine($"{shopName}\t{orderId}\t{createTime}\t{orderPrice}\t{refundAmount}\t{outAmount}\t{unrefundedAmount}\t{buyerOrderSn}\t{buyerOutAmount}\t{buyerRefundAmount}\t{buyerRefundStatus}");
|
(item.BuyerRefundAmount / 100m).ToString("0.00"),
|
||||||
|
CsvEscape(item.BuyerRefundStatusText)
|
||||||
|
};
|
||||||
|
if (includeRemark)
|
||||||
|
cols.Add(CsvEscape(item.Remark));
|
||||||
|
sb.AppendLine(string.Join("\t", cols));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Common;
|
|
||||||
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
||||||
using _29WxOrderWpf.Ctrls.Statistics.Services;
|
using _29WxOrderWpf.Ctrls.Statistics.Services;
|
||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
@@ -10,6 +9,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
||||||
{
|
{
|
||||||
@@ -177,7 +177,11 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 查询条件
|
#region 查询条件
|
||||||
|
public bool StatPackages
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.StatPackages); }
|
||||||
|
set { this.SetValue(x => x.StatPackages, value); }
|
||||||
|
}
|
||||||
/// <summary>时间范围选项</summary>
|
/// <summary>时间范围选项</summary>
|
||||||
public ObservableCollection<TimeRangeOption> TimeRangeOptions { get; }
|
public ObservableCollection<TimeRangeOption> TimeRangeOptions { get; }
|
||||||
|
|
||||||
@@ -541,6 +545,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
StartDate = StartDate,
|
StartDate = StartDate,
|
||||||
EndDate = EndDate,
|
EndDate = EndDate,
|
||||||
ShopIds = BuildSelectedShopIds(),
|
ShopIds = BuildSelectedShopIds(),
|
||||||
|
StatPackages = StatPackages
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,7 +618,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
new DialogWindow()
|
new DialogWindow()
|
||||||
{
|
{
|
||||||
Title = "订单列表",
|
Title = "订单列表",
|
||||||
Content = new ShowOrderDialogView(showList),
|
Content = new ShowOrderDialogView(showList, detailType, _service),
|
||||||
DataContext = showList
|
DataContext = showList
|
||||||
}.ShowDialog();
|
}.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Common;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
||||||
using _29WxOrderWpf.Ctrls.Statistics.Services;
|
using _29WxOrderWpf.Ctrls.Statistics.Services;
|
||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
@@ -61,6 +61,11 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
|
|
||||||
InitializeAsync();
|
InitializeAsync();
|
||||||
}
|
}
|
||||||
|
public bool StatPackages
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.StatPackages); }
|
||||||
|
set { this.SetValue(x => x.StatPackages, value); }
|
||||||
|
}
|
||||||
|
|
||||||
#region 查询条件
|
#region 查询条件
|
||||||
|
|
||||||
@@ -288,6 +293,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
StartDate = StartDate,
|
StartDate = StartDate,
|
||||||
EndDate = EndDate,
|
EndDate = EndDate,
|
||||||
ShopIds = BuildSelectedShopIds(),
|
ShopIds = BuildSelectedShopIds(),
|
||||||
|
StatPackages = StatPackages,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,7 +339,6 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
{
|
{
|
||||||
var detailType = ParseDetailType(type);
|
var detailType = ParseDetailType(type);
|
||||||
List<ShopOrderDetailResponse> showList;
|
List<ShopOrderDetailResponse> showList;
|
||||||
// 明细接口数据量大、耗时长,期间显示页面统一的加载遮罩,避免点了没反应
|
|
||||||
IsLoading = true;
|
IsLoading = true;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -359,7 +364,7 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
new DialogWindow(GetWindow())
|
new DialogWindow(GetWindow())
|
||||||
{
|
{
|
||||||
Title = "订单列表",
|
Title = "订单列表",
|
||||||
Content = new ShowOrderDialogView(showList),
|
Content = new ShowOrderDialogView(showList, detailType, _service),
|
||||||
DataContext = showList
|
DataContext = showList
|
||||||
}.Show();
|
}.Show();
|
||||||
}
|
}
|
||||||
@@ -373,6 +378,8 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
|||||||
return ShopOrderDetailType.Refund; //退款订单
|
return ShopOrderDetailType.Refund; //退款订单
|
||||||
case "BuyerRefundRemainingAmount":
|
case "BuyerRefundRemainingAmount":
|
||||||
return ShopOrderDetailType.BuyerUnrefunded; //买手未退回金额的订单
|
return ShopOrderDetailType.BuyerUnrefunded; //买手未退回金额的订单
|
||||||
|
case "ProfitOrder":
|
||||||
|
return ShopOrderDetailType.Profit; //买手未退回金额的订单
|
||||||
default:
|
default:
|
||||||
return ShopOrderDetailType.Valid; //有效订单
|
return ShopOrderDetailType.Valid; //有效订单
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,47 @@
|
|||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
|
<Button
|
||||||
|
x:Name="btOrderSupport"
|
||||||
|
Click="bt_showOrderSupport"
|
||||||
|
IsEnabled="False"
|
||||||
|
Style="{StaticResource IconButtonStyle}"
|
||||||
|
ToolTip="客户工单">
|
||||||
|
<Grid Width="30" Height="30">
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="22"
|
||||||
|
Foreground="{StaticResource mainColorLightBrush}"
|
||||||
|
Style="{StaticResource TextBlockIcon}"
|
||||||
|
Text="{StaticResource txt-alert}" />
|
||||||
|
<Border
|
||||||
|
x:Name="borderOrderSupportUnread"
|
||||||
|
Height="16"
|
||||||
|
MinWidth="16"
|
||||||
|
Padding="4,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
d:Visibility="Visible"
|
||||||
|
Background="#E53935"
|
||||||
|
CornerRadius="8"
|
||||||
|
Visibility="Collapsed">
|
||||||
|
<TextBlock
|
||||||
|
x:Name="tbOrderSupportUnread"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="10"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Foreground="White"
|
||||||
|
Text="0" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
<Border
|
||||||
|
Width="1"
|
||||||
|
Height="20"
|
||||||
|
Margin="10,0"
|
||||||
|
Background="#b893b2" />
|
||||||
<Button Click="bt_setting" Style="{StaticResource IconButtonStyle}">
|
<Button Click="bt_setting" Style="{StaticResource IconButtonStyle}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
FontSize="22"
|
FontSize="22"
|
||||||
@@ -135,7 +176,7 @@
|
|||||||
d:Visibility="Visible"
|
d:Visibility="Visible"
|
||||||
Visibility="Collapsed" />
|
Visibility="Collapsed" />
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridPddBuyerOrderReadCtrl"
|
x:Name="gridTbBuyerOrderReadCtrl"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
d:Visibility="Visible"
|
d:Visibility="Visible"
|
||||||
Background="#7F000000"
|
Background="#7F000000"
|
||||||
@@ -147,6 +188,7 @@
|
|||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Background="White"
|
Background="White"
|
||||||
CornerRadius="10">
|
CornerRadius="10">
|
||||||
|
<Grid>
|
||||||
<buyerctrls:PDDBuyerOrderReadCtrl
|
<buyerctrls:PDDBuyerOrderReadCtrl
|
||||||
x:Name="pddBuyerOrderReadCtrl"
|
x:Name="pddBuyerOrderReadCtrl"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -155,6 +197,15 @@
|
|||||||
Panel.ZIndex="-1"
|
Panel.ZIndex="-1"
|
||||||
d:Visibility="Visible"
|
d:Visibility="Visible"
|
||||||
Visibility="Collapsed" />
|
Visibility="Collapsed" />
|
||||||
|
<buyerctrls:TbBuyerOrderReadCtrl
|
||||||
|
x:Name="tbBuyerOrderReadCtrl"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="1200"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Panel.ZIndex="-1"
|
||||||
|
d:Visibility="Collapsed"
|
||||||
|
Visibility="Collapsed" />
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<buyerctrls:PDDBuyerSelectCtrl
|
<buyerctrls:PDDBuyerSelectCtrl
|
||||||
@@ -171,8 +222,8 @@
|
|||||||
Background="#7F000000"
|
Background="#7F000000"
|
||||||
Visibility="Hidden">
|
Visibility="Hidden">
|
||||||
<Border
|
<Border
|
||||||
Width="500"
|
Width="850"
|
||||||
Height="600"
|
Height="650"
|
||||||
Background="White"
|
Background="White"
|
||||||
CornerRadius="4">
|
CornerRadius="4">
|
||||||
<shopctrls:ShopListCtrl
|
<shopctrls:ShopListCtrl
|
||||||
|
|||||||
+224
-13
@@ -14,6 +14,9 @@ using CefSharp;
|
|||||||
using NaiBa.Util;
|
using NaiBa.Util;
|
||||||
using NaiBa.Util.Extension;
|
using NaiBa.Util.Extension;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using OrderSupportTicket.Models;
|
||||||
|
using OrderSupportTicket.Services;
|
||||||
|
using OrderSupportTicket.Views;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -41,7 +44,11 @@ using System.Xml.Linq;
|
|||||||
using Work;
|
using Work;
|
||||||
using Work._29Tools.BLL;
|
using Work._29Tools.BLL;
|
||||||
using Work._29Tools.Forms.UserForms;
|
using Work._29Tools.Forms.UserForms;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
using WxOrder.Framework.Commons.Dialogs;
|
||||||
|
using WxOrder.Framework.Helpers;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||||
|
|
||||||
namespace _29WxOrderWpf
|
namespace _29WxOrderWpf
|
||||||
{
|
{
|
||||||
@@ -51,6 +58,12 @@ namespace _29WxOrderWpf
|
|||||||
public partial class MainWindow : BaseWindow, INotifyPropertyChanged
|
public partial class MainWindow : BaseWindow, INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
public static MainWindow Instance { get; private set; }
|
public static MainWindow Instance { get; private set; }
|
||||||
|
public static readonly object _orderLock = new object();
|
||||||
|
|
||||||
|
private readonly TicketRealtimeMonitor _ticketMonitor = TicketRealtimeMonitor.Current;
|
||||||
|
private readonly WorkOrderUnreadService _workOrderUnreadService = new WorkOrderUnreadService();
|
||||||
|
private TicketClientOptions _ticketOptions;
|
||||||
|
private OrderSupportTicketView _orderSupportView;
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
public string Balance { get { return "快递余额:" + BaseClass.Balance.ToString("0.00"); } set { OnPropertyChanged("Balance"); } }
|
public string Balance { get { return "快递余额:" + BaseClass.Balance.ToString("0.00"); } set { OnPropertyChanged("Balance"); } }
|
||||||
@@ -62,6 +75,10 @@ namespace _29WxOrderWpf
|
|||||||
Instance = this;
|
Instance = this;
|
||||||
|
|
||||||
gridUser.Visibility = Visibility.Collapsed;
|
gridUser.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
_ticketMonitor.NewMessageReceived += OnTicketNewMessageReceived;
|
||||||
|
_ticketMonitor.UnreadCountChanged += OnTicketUnreadCountChanged;
|
||||||
|
Closed += MainWindow_Closed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
@@ -87,10 +104,12 @@ namespace _29WxOrderWpf
|
|||||||
//shopListCtrl.Visibility = Visibility.Visible;
|
//shopListCtrl.Visibility = Visibility.Visible;
|
||||||
orderListCtrl.Visibility = Visibility.Visible;
|
orderListCtrl.Visibility = Visibility.Visible;
|
||||||
pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
|
tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||||
pddBuyerSelectCtrl.Visibility = Visibility.Visible;
|
pddBuyerSelectCtrl.Visibility = Visibility.Visible;
|
||||||
Task.Run(() =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
GetServerShop();
|
GetServerShop();
|
||||||
|
await StartTicketRealtimeMonitor();//启动工单监控
|
||||||
GetShopSupplier(GlobalConfig.ShopLoginList.ToList());
|
GetShopSupplier(GlobalConfig.ShopLoginList.ToList());
|
||||||
});
|
});
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
@@ -221,7 +240,10 @@ namespace _29WxOrderWpf
|
|||||||
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||||
{
|
{
|
||||||
if (BaseMsgWindow.ShowConfirm("是否关闭软件?", "退出微信小店订单管理").DialogResult == true)
|
if (BaseMsgWindow.ShowConfirm("是否关闭软件?", "退出微信小店订单管理").DialogResult == true)
|
||||||
|
{
|
||||||
|
_ticketMonitor.Dispose();
|
||||||
Process.GetCurrentProcess().Kill();
|
Process.GetCurrentProcess().Kill();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
@@ -236,16 +258,19 @@ namespace _29WxOrderWpf
|
|||||||
|
|
||||||
var tList = new ConcurrentList<Task>();
|
var tList = new ConcurrentList<Task>();
|
||||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||||
Dispatcher.Invoke(new Action(() =>
|
List<ShopLoginInfo> listTmp = new List<ShopLoginInfo>();
|
||||||
{
|
//Dispatcher.Invoke(new Action(() =>
|
||||||
}));
|
//{
|
||||||
|
//}));
|
||||||
isReadShop = true;
|
isReadShop = true;
|
||||||
int page = 0;
|
int page = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
Thread.Sleep(1);
|
||||||
|
|
||||||
page++;
|
page++;
|
||||||
var url = BaseClass.Build29WxObjString("shop/get_shop_list");
|
var url = BaseClass.Build29WxObjString("shop/get_shop_list");
|
||||||
var data = UserLogin.GetSignaturex() + "&page=" + page;
|
var data = UserLogin.GetSignaturex() + "&page=" + page + "&page_size=100";
|
||||||
data += "&is_get_erp_shop_id=true";
|
data += "&is_get_erp_shop_id=true";
|
||||||
var html = GetHtml.PostUtf8(url, data);
|
var html = GetHtml.PostUtf8(url, data);
|
||||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||||
@@ -277,12 +302,9 @@ namespace _29WxOrderWpf
|
|||||||
}
|
}
|
||||||
list.Add(shop);
|
list.Add(shop);
|
||||||
|
|
||||||
if (!GlobalConfig.ShopLoginList.Any(s => s.ShopId == shop.ShopId && !shop.is_point_shop_expire))
|
if (!listTmp.Any(s => s.ShopId == shop.ShopId && !shop.is_point_shop_expire))
|
||||||
{
|
{
|
||||||
Dispatcher.Invoke(new Action(() =>
|
listTmp.Add(shop);
|
||||||
{
|
|
||||||
GlobalConfig.ShopLoginList.Add(shop);
|
|
||||||
}));
|
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
@@ -317,11 +339,17 @@ namespace _29WxOrderWpf
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
List<oms_wei_order_info> orders;
|
||||||
|
lock (_orderLock)
|
||||||
|
{
|
||||||
|
orders = GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList();
|
||||||
|
}
|
||||||
|
foreach (var order in orders)
|
||||||
{
|
{
|
||||||
// 更新代发管理情况
|
// 更新代发管理情况
|
||||||
foreach (var orderItem in order.orderItems)
|
foreach (var orderItem in order.OrderItems)
|
||||||
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
|
orderItem.UpdateOrderItemBuyButton();
|
||||||
|
//Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -333,8 +361,12 @@ namespace _29WxOrderWpf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dispatcher.Invoke(new Action(() =>
|
Dispatcher.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
|
GlobalConfig.ShopLoginList = new AllBase.Util.ObservableCollectionThreadSafe<ShopLoginInfo>(list);
|
||||||
|
shopListCtrl.lbxShop.ItemsSource = GlobalConfig.ShopLoginList;
|
||||||
|
|
||||||
foreach (var shop in GlobalConfig.ShopLoginList.Where(s => !list.Any(ss => ss.ShopId == s.ShopId)).ToList())
|
foreach (var shop in GlobalConfig.ShopLoginList.Where(s => !list.Any(ss => ss.ShopId == s.ShopId)).ToList())
|
||||||
{
|
{
|
||||||
GlobalConfig.ShopLoginList.Remove(shop);
|
GlobalConfig.ShopLoginList.Remove(shop);
|
||||||
@@ -347,10 +379,13 @@ namespace _29WxOrderWpf
|
|||||||
isReadShop = false;
|
isReadShop = false;
|
||||||
hasReadShop = true;
|
hasReadShop = true;
|
||||||
|
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
while (tList.Where(ta => !ta.IsFaulted && !ta.IsCompleted).Count() >= 1)
|
while (tList.Where(ta => !ta.IsFaulted && !ta.IsCompleted).Count() >= 1)
|
||||||
{
|
{
|
||||||
tList.RemoveAll(ta => ta.IsFaulted || ta.IsCompleted || ta.IsCanceled); Thread.Sleep(100);
|
tList.RemoveAll(ta => ta.IsFaulted || ta.IsCompleted || ta.IsCanceled); Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetShopSupplier(List<ShopLoginInfo> shops)
|
public void GetShopSupplier(List<ShopLoginInfo> shops)
|
||||||
@@ -570,5 +605,181 @@ namespace _29WxOrderWpf
|
|||||||
view.ShowDialog();
|
view.ShowDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void bt_showOrderSupport(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
OpenOrderSupportTicket(_ticketMonitor.LatestNotification);
|
||||||
|
_ticketMonitor.MarkAllRead();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task StartTicketRealtimeMonitor()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var options = GetTicketOptions().Clone();
|
||||||
|
await _ticketMonitor.Start(options);
|
||||||
|
UpdateOrderSupportBadge();
|
||||||
|
_ = LoadHistoricalTicketUnreadAsync(options);
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
btOrderSupport.IsEnabled = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
NLogger.Instance.Error("TicketRealtimeStartError:" + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 启动后根据服务端工单列表和历史缓存补齐未读角标。
|
||||||
|
/// </summary>
|
||||||
|
private async Task LoadHistoricalTicketUnreadAsync(TicketClientOptions options)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var unreadByTicket = await _workOrderUnreadService
|
||||||
|
.GetUnreadByTicketAsync(options);
|
||||||
|
_ticketMonitor.MergeUnread(unreadByTicket);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
NLogger.Instance.Error("TicketUnreadLoadError:" + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private TicketClientOptions GetTicketOptions()
|
||||||
|
{
|
||||||
|
if (_ticketOptions != null)
|
||||||
|
return _ticketOptions;
|
||||||
|
|
||||||
|
_ticketOptions = new TicketClientOptions
|
||||||
|
{
|
||||||
|
UserName = BaseClass.UserName,
|
||||||
|
AppIds = GlobalConfig.ShopLoginList.Select(a => a.ShopId).ToList(),
|
||||||
|
Orders = []
|
||||||
|
};
|
||||||
|
//OrderSupportTicketView
|
||||||
|
// .CreateDefaultOptions(BaseClass.UserName)
|
||||||
|
// .Clone();
|
||||||
|
return _ticketOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenOrderSupportTicket(TicketRealtimeNotification notification)
|
||||||
|
{
|
||||||
|
var view = EnsureOrderSupportView();
|
||||||
|
view.ViewModel.ShowHistory();
|
||||||
|
|
||||||
|
if (notification != null)
|
||||||
|
{
|
||||||
|
view.OpenTicket(
|
||||||
|
notification.AppId,
|
||||||
|
notification.WechatOrderId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// DialogService 会复用同类型的已打开窗口,避免重复创建。
|
||||||
|
DialogService.ShowOrActivateWindow(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从订单行打开工单页面。若左侧列表已有相同订单号的工单,直接定位到该工单;
|
||||||
|
/// 否则在同一个工单页面中进入新建工单状态。
|
||||||
|
/// </summary>
|
||||||
|
public async Task CreateOrderSupportTicketAsync(TicketOrderOption order)
|
||||||
|
{
|
||||||
|
if (order == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var view = EnsureOrderSupportView();
|
||||||
|
await view.ViewModel.InitializeAsync();
|
||||||
|
|
||||||
|
var existing = view.ViewModel.FindTicketByOrderId(order.OrderId);
|
||||||
|
if (existing != null)
|
||||||
|
{
|
||||||
|
view.ViewModel.ApplyOrderInfo(order);
|
||||||
|
view.OpenTicket(existing.AppId, existing.WechatOrderId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
view.OpenNewTicket(order);
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogService.ShowOrActivateWindow(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
private OrderSupportTicketView EnsureOrderSupportView()
|
||||||
|
{
|
||||||
|
if (_orderSupportView == null)
|
||||||
|
{
|
||||||
|
_orderSupportView = new OrderSupportTicketView(
|
||||||
|
new TicketService(
|
||||||
|
new TicketApiService(),
|
||||||
|
_ticketMonitor.RealtimeService,
|
||||||
|
ownsRealtime: false),
|
||||||
|
GetTicketOptions().Clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
return _orderSupportView;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTicketNewMessageReceived(
|
||||||
|
object sender,
|
||||||
|
TicketInboxMessageEventArgs e)
|
||||||
|
{
|
||||||
|
if (!Dispatcher.CheckAccess())
|
||||||
|
{
|
||||||
|
Dispatcher.BeginInvoke(new Action(
|
||||||
|
() => OnTicketNewMessageReceived(sender, e)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var notification = e?.Notification;
|
||||||
|
if (notification == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UpdateOrderSupportBadge();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTicketUnreadCountChanged(
|
||||||
|
object sender,
|
||||||
|
TicketUnreadCountChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!Dispatcher.CheckAccess())
|
||||||
|
{
|
||||||
|
Dispatcher.BeginInvoke(new Action(
|
||||||
|
() => OnTicketUnreadCountChanged(sender, e)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
UpdateOrderSupportBadge(e?.UnreadCount ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateOrderSupportBadge()
|
||||||
|
{
|
||||||
|
UpdateOrderSupportBadge(_ticketMonitor.UnreadCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateOrderSupportBadge(int unreadCount)
|
||||||
|
{
|
||||||
|
if (borderOrderSupportUnread == null)
|
||||||
|
return;
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
borderOrderSupportUnread.Visibility = unreadCount > 0
|
||||||
|
? Visibility.Visible
|
||||||
|
: Visibility.Collapsed;
|
||||||
|
tbOrderSupportUnread.Text = unreadCount > 99
|
||||||
|
? "99+"
|
||||||
|
: unreadCount.ToString();
|
||||||
|
btOrderSupport.ToolTip = unreadCount > 0
|
||||||
|
? $"客户工单({unreadCount} 条未读消息)"
|
||||||
|
: "客户工单";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainWindow_Closed(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_ticketMonitor.NewMessageReceived -= OnTicketNewMessageReceived;
|
||||||
|
_ticketMonitor.UnreadCountChanged -= OnTicketUnreadCountChanged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,11 +7,11 @@ using System.Windows;
|
|||||||
// 有关程序集的一般信息由以下
|
// 有关程序集的一般信息由以下
|
||||||
// 控制。更改这些特性值可修改
|
// 控制。更改这些特性值可修改
|
||||||
// 与程序集关联的信息。
|
// 与程序集关联的信息。
|
||||||
[assembly: AssemblyTitle("29供应连-微信小店订单管理")]
|
[assembly: AssemblyTitle("29供应链-微信小店订单管理")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("29供应连-微信小店订单管理")]
|
[assembly: AssemblyProduct("29供应链-微信小店订单管理")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2026")]
|
[assembly: AssemblyCopyright("Copyright © 2026")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|||||||
@@ -43,11 +43,12 @@ public class ShipGiftService : SingleInstance<ShipGiftService>
|
|||||||
giftAmount = 1.55m;
|
giftAmount = 1.55m;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BaseClass.Setting.AutoSwitchGiftType && (item.product_price ?? 0) > 6 * 1000)
|
if (BaseClass.Setting.AutoSwitchGiftType && (item.product_price ?? 0) > 6 * 100)
|
||||||
{
|
{
|
||||||
|
giftType = GiftType._160;
|
||||||
giftAmount = 1.6m;
|
giftAmount = 1.6m;
|
||||||
}
|
}
|
||||||
decimal amount = giftAmount + BaseClass.OemGiftAmount;
|
decimal amount = giftAmount + BaseClass.OemGiftAmount + BaseClass.ParentOemGiftAmount;
|
||||||
|
|
||||||
|
|
||||||
string province = item.province_name;
|
string province = item.province_name;
|
||||||
@@ -80,7 +81,7 @@ public class ShipGiftService : SingleInstance<ShipGiftService>
|
|||||||
// amount = (int)(amount * 100),
|
// amount = (int)(amount * 100),
|
||||||
// oemAmount = (int)(BaseClass.OemGiftAmount * 100)
|
// oemAmount = (int)(BaseClass.OemGiftAmount * 100)
|
||||||
//});
|
//});
|
||||||
var ret = await _api.SendShipGift([orderId], (int)giftType, amount, BaseClass.OemGiftAmount);
|
var ret = await _api.SendShipGift([orderId], (int)giftType, amount, BaseClass.OemGiftAmount, BaseClass.ParentOemGiftAmount, BaseClass.OemId, BaseClass.ParentOemId);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+25
-2
@@ -1,10 +1,12 @@
|
|||||||
using _29WxOrderWpf.ViewModels;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
|
using _29WxOrderWpf.ViewModels;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.DouYinModel.Param.ConfigManage;
|
using AllBase.DouYinModel.Param.ConfigManage;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
using AllBase.Model.Config;
|
using AllBase.Model.Config;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
using NaiBa.Util;
|
using NaiBa.Util;
|
||||||
|
using NaiBa.Util.Extension;
|
||||||
using NaiBa.Util.Helper;
|
using NaiBa.Util.Helper;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
@@ -23,6 +25,7 @@ namespace _29WxOrderWpf
|
|||||||
GlobalConfig.BuyConfig = ConfigHelper.LoadConfig<BuyConfig>("buy_config_260708");
|
GlobalConfig.BuyConfig = ConfigHelper.LoadConfig<BuyConfig>("buy_config_260708");
|
||||||
if (GlobalConfig.BuyConfig == null)
|
if (GlobalConfig.BuyConfig == null)
|
||||||
GlobalConfig.BuyConfig = new BuyConfig();
|
GlobalConfig.BuyConfig = new BuyConfig();
|
||||||
|
GlobalConfig.BuyConfig.IsSyncDirectBuyOrderWaybill = false;
|
||||||
|
|
||||||
GlobalConfig.lstWXShopTokenInfo = ConfigHelper.LoadConfig<ConcurrentList<WXShopTokenInfo>>("wx_shop_token_list");
|
GlobalConfig.lstWXShopTokenInfo = ConfigHelper.LoadConfig<ConcurrentList<WXShopTokenInfo>>("wx_shop_token_list");
|
||||||
if (GlobalConfig.lstWXShopTokenInfo == null)
|
if (GlobalConfig.lstWXShopTokenInfo == null)
|
||||||
@@ -38,6 +41,7 @@ namespace _29WxOrderWpf
|
|||||||
|
|
||||||
BaseClass.Setting = NaiBa.Util.Helper.ConfigHelper.LoadConfig<SettingConfig>(SettingViewModel.SettingFileName);
|
BaseClass.Setting = NaiBa.Util.Helper.ConfigHelper.LoadConfig<SettingConfig>(SettingViewModel.SettingFileName);
|
||||||
if (BaseClass.Setting == null) BaseClass.Setting = new SettingConfig();
|
if (BaseClass.Setting == null) BaseClass.Setting = new SettingConfig();
|
||||||
|
BaseClass.Setting.AutoSwitchGiftType = true;
|
||||||
|
|
||||||
new WxOrder.Framework.Startup();
|
new WxOrder.Framework.Startup();
|
||||||
}
|
}
|
||||||
@@ -47,7 +51,7 @@ namespace _29WxOrderWpf
|
|||||||
ConfigHelper.SaveConfig("buy_config_260708", GlobalConfig.BuyConfig);
|
ConfigHelper.SaveConfig("buy_config_260708", GlobalConfig.BuyConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateBalance()
|
public static async Task UpdateBalance()
|
||||||
{
|
{
|
||||||
var url3 = BaseClass.Build29WxObjString("user/get_all_user");
|
var url3 = BaseClass.Build29WxObjString("user/get_all_user");
|
||||||
var data3 = UserLogin.GetSignaturex();
|
var data3 = UserLogin.GetSignaturex();
|
||||||
@@ -59,6 +63,25 @@ namespace _29WxOrderWpf
|
|||||||
{
|
{
|
||||||
BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance");
|
BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance");
|
||||||
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
||||||
|
|
||||||
|
// 更新下每单扣费金额
|
||||||
|
BaseClass.PostagePerOrder = Math.Max(2.2m, BaseRegex.GetDecimalJson(ref html, "postage_per_order"));
|
||||||
|
BaseClass.RefundPostagePerOrder = Math.Max(2.5m, BaseRegex.GetDecimalJson(ref html, "refund_postage_per_order"));
|
||||||
|
BaseClass.OemGiftAmount = BaseRegex.GetDecimalJson(ref html, "gift_oem_amount_per_order");
|
||||||
|
BaseClass.OemId = BaseRegex.GetStringJson(ref html, "oem_id");
|
||||||
|
BaseClass.OemName = BaseRegex.GetStringJson(ref html, "oem_name");
|
||||||
|
BaseClass.IsOemOwner = BaseRegex.GetBoolJson(ref html, "is_oem_owner");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await UserLogin.GetUserOemAmount(16);
|
||||||
|
await UserLogin.GetUserOemAmount(20);
|
||||||
|
await UserLogin.GetUserOemAmount(26);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("更新账户余额失败 " + ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.CefHelper;
|
using _29WxOrderWpf.CefHelper;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Ctrls.OrderCtrls;
|
using _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
@@ -8,6 +8,7 @@ using AllBase.Model.Result;
|
|||||||
using NaiBa.Util.Extension;
|
using NaiBa.Util.Extension;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NPOI.HSSF.Record;
|
using NPOI.HSSF.Record;
|
||||||
|
using Org.BouncyCastle.Crypto.Paddings;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -73,15 +74,26 @@ public class BuyMapSkuViewModel : PropertyNotifyObject
|
|||||||
if (orderItem != null)
|
if (orderItem != null)
|
||||||
{
|
{
|
||||||
this.ShopGoodsName = orderItem.title;
|
this.ShopGoodsName = orderItem.title;
|
||||||
this.ShopSkuName = orderItem.sku_attr_str;
|
this.ShopSkuName = orderItem.SkuAttrStr;
|
||||||
this.ShopSkuPrice = (orderItem.real_price * 0.01m).ParseToString();
|
this.ShopSkuPrice = (orderItem.real_price * 0.01m).ParseToString();
|
||||||
}
|
}
|
||||||
|
if (GlobalConfig.CurrentBuyPlatform == "pdd")
|
||||||
|
{
|
||||||
if (orderItem?.PddBuyMapSkus != null && orderItem?.PddBuyMapSkus.Count > 0)
|
if (orderItem?.PddBuyMapSkus != null && orderItem?.PddBuyMapSkus.Count > 0)
|
||||||
{
|
{
|
||||||
BuyMapSkus = new ObservableCollection<WXBuyMapSkusInfo>(orderItem.PddBuyMapSkus);
|
BuyMapSkus = new ObservableCollection<WXBuyMapSkusInfo>(orderItem.PddBuyMapSkus);
|
||||||
SetCurrentFrontSkuInfo3(BuyMapSkus?.FirstOrDefault());
|
SetCurrentFrontSkuInfo3(BuyMapSkus?.FirstOrDefault());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (GlobalConfig.CurrentBuyPlatform == "tb")
|
||||||
|
{
|
||||||
|
if (orderItem?.TbBuyMapSkus != null && orderItem?.TbBuyMapSkus.Count > 0)
|
||||||
|
{
|
||||||
|
BuyMapSkus = new ObservableCollection<WXBuyMapSkusInfo>(orderItem.TbBuyMapSkus);
|
||||||
|
SetCurrentFrontSkuInfo3(BuyMapSkus?.FirstOrDefault());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SetCurrentFrontSkuInfo3(WXBuyMapSkusInfo skuInfo)
|
public void SetCurrentFrontSkuInfo3(WXBuyMapSkusInfo skuInfo)
|
||||||
{
|
{
|
||||||
@@ -122,7 +134,11 @@ public class BuyMapSkuViewModel : PropertyNotifyObject
|
|||||||
|
|
||||||
public async Task SetOrderMapSku(frontSkuInfo3 upSku)
|
public async Task SetOrderMapSku(frontSkuInfo3 upSku)
|
||||||
{
|
{
|
||||||
var mapSkuProd = OrderItem.PddBuyMapSkus.FirstOrDefault(s => s.map_goods_id == upSku.goodsId.ParseToString());
|
WXBuyMapSkusInfo mapSkuProd = null;
|
||||||
|
if (GlobalConfig.CurrentBuyPlatform == "pdd")
|
||||||
|
mapSkuProd = OrderItem.PddBuyMapSkus.FirstOrDefault(s => s.map_goods_id == upSku.goodsId.ParseToString());
|
||||||
|
if (GlobalConfig.CurrentBuyPlatform == "tb")
|
||||||
|
mapSkuProd = OrderItem.TbBuyMapSkus.FirstOrDefault(s => s.map_goods_id == upSku.goodsId.ParseToString());
|
||||||
if (mapSkuProd == null)
|
if (mapSkuProd == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -135,26 +151,27 @@ public class BuyMapSkuViewModel : PropertyNotifyObject
|
|||||||
var mapGoodsId = mapSkuProd.map_goods_id;
|
var mapGoodsId = mapSkuProd.map_goods_id;
|
||||||
var mapSkuId = mapSku.skuId.ParseToString();
|
var mapSkuId = mapSku.skuId.ParseToString();
|
||||||
var sendProvince = mapSkuProd.map_send_address;
|
var sendProvince = mapSkuProd.map_send_address;
|
||||||
|
var platform = mapSkuProd.platform;
|
||||||
|
|
||||||
string cmbTransitWarehouse = "";
|
string cmbTransitWarehouse = "";
|
||||||
string txtBuyTransitWarehouse = "";
|
string txtBuyTransitWarehouse = "";
|
||||||
var transitWarehouse = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransId == mapSkuProd.transit_warehouse_id);
|
var transitWarehouse = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransId == mapSkuProd.transit_warehouse_id);
|
||||||
if (transitWarehouse != null)
|
if (transitWarehouse != null)
|
||||||
{
|
{
|
||||||
cmbTransitWarehouse = transitWarehouse?.TransName + " " + transitWarehouse?.TransDetailAddress;
|
cmbTransitWarehouse = transitWarehouse?.TransName + " " + transitWarehouse?.TransFullAddress;
|
||||||
txtBuyTransitWarehouse = transitWarehouse?.TransDetailAddress;
|
txtBuyTransitWarehouse = transitWarehouse?.TransFullAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
var spuCode = OrderItem.out_product_id.IsNullOrEmpty() ? OrderItem.product_id : OrderItem.out_product_id;
|
var spuCode = OrderItem.out_product_id.IsNullOrEmpty() ? OrderItem.product_id : OrderItem.out_product_id;
|
||||||
var skuCode = OrderItem.out_sku_id.IsNullOrEmpty() ? OrderItem.sku_attr_str : OrderItem.out_sku_id;
|
var skuCode = OrderItem.out_sku_id.IsNullOrEmpty() ? OrderItem.SkuAttrStr : OrderItem.out_sku_id;
|
||||||
if (spuCode.IsNullOrEmpty())
|
if (spuCode.IsNullOrEmpty())
|
||||||
spuCode = OrderItem.product_id;
|
spuCode = OrderItem.product_id;
|
||||||
if (await SaveSkuMap(spuCode, skuCode, mapGoodsName, mapSkuName, mapGoodsId, mapSkuId, transitWarehouse, sendProvince))
|
if (await SaveSkuMap(spuCode, skuCode, mapGoodsName, mapSkuName, mapGoodsId, mapSkuId, transitWarehouse, sendProvince, platform))
|
||||||
RequestClose?.Invoke();
|
RequestClose?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> SaveSkuMap(string spuCode, string skuCode, string mapGoodsName,
|
public async Task<bool> SaveSkuMap(string spuCode, string skuCode, string mapGoodsName,
|
||||||
string mapSkuName, string mapGoodsId, string mapSkuId, TransitWarehouseParam transitWarehouse, string sendProvince)
|
string mapSkuName, string mapGoodsId, string mapSkuId, TransitWarehouseParam transitWarehouse, string sendProvince, string platform)
|
||||||
{
|
{
|
||||||
if (transitWarehouse == null)
|
if (transitWarehouse == null)
|
||||||
{
|
{
|
||||||
@@ -175,6 +192,7 @@ public class BuyMapSkuViewModel : PropertyNotifyObject
|
|||||||
+ "&map_sku_id=" + mapSkuId
|
+ "&map_sku_id=" + mapSkuId
|
||||||
+ "&map_send_address=" + sendProvince
|
+ "&map_send_address=" + sendProvince
|
||||||
+ "&transit_warehouse_id=" + transitWarehouse?.TransId;
|
+ "&transit_warehouse_id=" + transitWarehouse?.TransId;
|
||||||
|
data += "&platform=" + platform;
|
||||||
|
|
||||||
url = BaseClass.Build29WxObjString("order/wx_add_mdy_buy_prod_map");
|
url = BaseClass.Build29WxObjString("order/wx_add_mdy_buy_prod_map");
|
||||||
var result = await GetHtml.PostUtf8Async(url, data);
|
var result = await GetHtml.PostUtf8Async(url, data);
|
||||||
@@ -218,12 +236,12 @@ public class BuyMapSkuViewModel : PropertyNotifyObject
|
|||||||
{
|
{
|
||||||
if (order.IsWaitBuy)
|
if (order.IsWaitBuy)
|
||||||
{
|
{
|
||||||
foreach (var item in order.orderItems)
|
foreach (var item in order.OrderItems)
|
||||||
{
|
{
|
||||||
if ((item.out_product_id == map.spu_code && item.out_sku_id == map.sku_code) ||
|
if ((item.out_product_id == map.spu_code && item.out_sku_id == map.sku_code) ||
|
||||||
(item.out_product_id == map.spu_code && item.sku_attr_str == map.sku_code) ||
|
(item.out_product_id == map.spu_code && item.SkuAttrStr == map.sku_code) ||
|
||||||
(item.product_id == map.spu_code && item.out_sku_id == map.sku_code) ||
|
(item.product_id == map.spu_code && item.out_sku_id == map.sku_code) ||
|
||||||
(item.product_id == map.spu_code && item.sku_attr_str == map.sku_code))
|
(item.product_id == map.spu_code && item.SkuAttrStr == map.sku_code))
|
||||||
{
|
{
|
||||||
item.PddBuyMap = map;
|
item.PddBuyMap = map;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
@@ -81,7 +81,7 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
{
|
{
|
||||||
IsChangeingPickNo = false;
|
IsChangeingPickNo = false;
|
||||||
string orderId = OrderItem.order_id;
|
string orderId = OrderItem.order_id;
|
||||||
ShopLoginInfo shop = OrderItem.Shop;
|
ShopLoginInfo shop = OrderItem.ItemOrder.Shop;
|
||||||
if (string.IsNullOrEmpty(PickNo))
|
if (string.IsNullOrEmpty(PickNo))
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowInfo("取件码不能为空");
|
BaseMsgWindow.ShowInfo("取件码不能为空");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.CefHelper;
|
using _29WxOrderWpf.CefHelper;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
using WPFCommon.Models;
|
using WPFCommon.Models;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.ViewModels;
|
namespace _29WxOrderWpf.ViewModels;
|
||||||
@@ -26,15 +27,35 @@ public class SettingViewModel : BindableBaseEx
|
|||||||
get => GetValue<bool>();
|
get => GetValue<bool>();
|
||||||
set => SetValue(value);
|
set => SetValue(value);
|
||||||
}
|
}
|
||||||
|
public bool SwitchEnableDirectBuy
|
||||||
|
{
|
||||||
|
get => GetValue<bool>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
|
public bool SwitchEnablePddTransitTraditionalAddress
|
||||||
|
{
|
||||||
|
get => GetValue<bool>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
|
public Visibility ShowEnablePddTransitTraditionalAddress
|
||||||
|
{
|
||||||
|
get => GetValue<Visibility>();
|
||||||
|
set => SetValue(value);
|
||||||
|
}
|
||||||
public void Assign(SettingConfig config)
|
public void Assign(SettingConfig config)
|
||||||
{
|
{
|
||||||
AutoSwitchGiftType = config.AutoSwitchGiftType;
|
AutoSwitchGiftType = config.AutoSwitchGiftType;
|
||||||
|
SwitchEnableDirectBuy = config.SwitchEnableDirectBuy;
|
||||||
|
SwitchEnablePddTransitTraditionalAddress = config.SwitchEnablePddTransitTraditionalAddress;
|
||||||
|
ShowEnablePddTransitTraditionalAddress = config.ShowEnablePddTransitTraditionalAddress ? Visibility.Visible : Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
public SettingConfig ToConfig()
|
public SettingConfig ToConfig()
|
||||||
{
|
{
|
||||||
return new SettingConfig
|
return new SettingConfig
|
||||||
{
|
{
|
||||||
AutoSwitchGiftType = AutoSwitchGiftType
|
AutoSwitchGiftType = AutoSwitchGiftType,
|
||||||
|
SwitchEnableDirectBuy = SwitchEnableDirectBuy,
|
||||||
|
SwitchEnablePddTransitTraditionalAddress = SwitchEnablePddTransitTraditionalAddress,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.CefHelper;
|
using _29WxOrderWpf.CefHelper;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
@@ -11,6 +11,8 @@ using NaiBa.Util.Extension;
|
|||||||
using Org.BouncyCastle.Asn1.Ocsp;
|
using Org.BouncyCastle.Asn1.Ocsp;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Policy;
|
using System.Security.Policy;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -35,6 +37,8 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
// 拼多多买手退货退款售后地址
|
// 拼多多买手退货退款售后地址
|
||||||
// https://mobile.yangkeduo.com/complaint.html?order_sn=260718-101481213440980&after_sales_reason=0&after_sales_type=2&after_sales_code=1002
|
// https://mobile.yangkeduo.com/complaint.html?order_sn=260718-101481213440980&after_sales_reason=0&after_sales_type=2&after_sales_code=1002
|
||||||
|
|
||||||
|
List<Process> cefSubProcesses = new List<Process>();
|
||||||
|
|
||||||
public static TaobaoLoginViewModel TaobaoLoginInstance { get; set; } = null;
|
public static TaobaoLoginViewModel TaobaoLoginInstance { get; set; } = null;
|
||||||
|
|
||||||
/// <summary>浏览器创建完成后触发(视图在此把浏览器加入可视树)</summary>
|
/// <summary>浏览器创建完成后触发(视图在此把浏览器加入可视树)</summary>
|
||||||
@@ -160,7 +164,6 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
}
|
}
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
|
|
||||||
AutoLogin();
|
AutoLogin();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -171,6 +174,125 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
_isWindowLoaded = false;
|
_isWindowLoaded = false;
|
||||||
|
|
||||||
|
// 1. 解除 JS 绑定
|
||||||
|
CefWebBrowser?.JavascriptObjectRepository?.UnRegisterAll();
|
||||||
|
CefWebBrowser?.CloseDevTools();
|
||||||
|
|
||||||
|
// 2. 优雅关闭浏览器
|
||||||
|
CefWebBrowser?.GetBrowser()?.CloseBrowser(false);
|
||||||
|
|
||||||
|
// 3. 清理残留子进程(按路径判断,避免误杀)
|
||||||
|
CleanupBrowserSubprocesses(this.cefSubProcesses);
|
||||||
|
|
||||||
|
// 4. 释放控件
|
||||||
|
CefWebBrowser?.Dispose();
|
||||||
|
CefWebBrowser = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetRenderProcessId()
|
||||||
|
{
|
||||||
|
int parentPid = Process.GetCurrentProcess().Id;
|
||||||
|
// 查找所有名为 CefSharp.BrowserSubprocess 且父进程为当前应用的进程
|
||||||
|
var subprocesses = Process.GetProcessesByName("CefSharp.BrowserSubprocess")
|
||||||
|
.Where(p =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return p.SessionId == Process.GetCurrentProcess().SessionId && GetParentProcessId(p.Id) == parentPid;
|
||||||
|
}
|
||||||
|
catch { return false; }
|
||||||
|
});
|
||||||
|
|
||||||
|
// 返回第一个匹配的 Render 进程 ID,实际可能有多个
|
||||||
|
return subprocesses.FirstOrDefault()?.Id ?? -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:获取父进程 ID (需引用 System.Management 或使用 P/Invoke)
|
||||||
|
private static int GetParentProcessId(int processId)
|
||||||
|
{
|
||||||
|
using (var query = new System.Management.ManagementObjectSearcher(
|
||||||
|
$"SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {processId}"))
|
||||||
|
{
|
||||||
|
using (var results = query.Get())
|
||||||
|
{
|
||||||
|
foreach (System.Management.ManagementObject obj in results)
|
||||||
|
{
|
||||||
|
return Convert.ToInt32(obj["ParentProcessId"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void CleanupBrowserSubprocesses(List<Process> processes = null)
|
||||||
|
{
|
||||||
|
// 有可能释放错误导致程序崩溃,废弃
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (processes == null)
|
||||||
|
processes = new List<Process>();
|
||||||
|
|
||||||
|
string appBasePath = AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\', '/');
|
||||||
|
Process[] subprocesses = Process.GetProcessesByName("CefSharp.BrowserSubprocess");
|
||||||
|
|
||||||
|
foreach (Process process in subprocesses)
|
||||||
|
{
|
||||||
|
bool shouldKill = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 安全地获取进程模块信息,进程可能在我们检查时已退出
|
||||||
|
if (process != null && !process.HasExited)
|
||||||
|
{
|
||||||
|
string moduleFileName = process.MainModule?.FileName;
|
||||||
|
if (!string.IsNullOrEmpty(moduleFileName))
|
||||||
|
{
|
||||||
|
// 判断进程是否从当前应用目录启动
|
||||||
|
string processDir = System.IO.Path.GetDirectoryName(moduleFileName);
|
||||||
|
if (!string.IsNullOrEmpty(processDir) &&
|
||||||
|
(processDir.Equals(appBasePath, StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| appBasePath.Contains(processDir) // 处理子目录情况
|
||||||
|
|| moduleFileName.Contains(appBasePath)))
|
||||||
|
{
|
||||||
|
if (!processes.Any(p => p.Handle.ParseToInt() == process.Handle.ParseToInt()))
|
||||||
|
shouldKill = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException)
|
||||||
|
{
|
||||||
|
// 进程可能在检查过程中已退出,忽略
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
catch (Win32Exception ex) when (ex.NativeErrorCode == 5) // 访问被拒绝
|
||||||
|
{
|
||||||
|
// 可能是权限问题或其他应用的进程,跳过
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shouldKill)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
process.Kill();
|
||||||
|
process.WaitForExit(500); // 等待最多500毫秒,确保进程终止
|
||||||
|
}
|
||||||
|
catch (Exception killEx)
|
||||||
|
{
|
||||||
|
// 记录日志,但通常进程已死
|
||||||
|
//System.Diagnostics.Debug.WriteLine($"终止进程时出错: {killEx.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// 这里最好不要用MessageBox,尤其是在关闭流程中,可能引发线程问题
|
||||||
|
// 建议记录到日志文件
|
||||||
|
//System.Diagnostics.Debug.WriteLine($"清理子进程时发生异常: {ex}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -184,6 +306,8 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
{
|
{
|
||||||
if (CefWebBrowser == null)
|
if (CefWebBrowser == null)
|
||||||
{
|
{
|
||||||
|
this.cefSubProcesses = Process.GetProcessesByName("CefSharp.BrowserSubprocess").ToList();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(InitUrl))
|
if (!string.IsNullOrEmpty(InitUrl))
|
||||||
CefWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser(InitUrl, false);
|
CefWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser(InitUrl, false);
|
||||||
else
|
else
|
||||||
@@ -221,16 +345,19 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
|
|
||||||
// cef138必须init后方可设置或删除cookie
|
// cef138必须init后方可设置或删除cookie
|
||||||
|
|
||||||
while (!CefWebBrowser.IsBrowserInitialized || !CefWebBrowser.GetBrowser().MainFrame.IsValid)
|
while (_isWindowLoaded && (!CefWebBrowser.IsBrowserInitialized || !CefWebBrowser.GetBrowser().MainFrame.IsValid))
|
||||||
await Task.Delay(20);
|
await Task.Delay(20);
|
||||||
WPFCEFBrowser.DeleteCookie(CefWebBrowser.GetCookieManager(null));
|
//await WPFCEFBrowser.DeleteCookieAsync(CefWebBrowser.GetCookieManager(null));
|
||||||
|
|
||||||
//cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager
|
//cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager
|
||||||
//await WPFCEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), CefWebBrowser.GetCookieManager(null));
|
//await WPFCEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), CefWebBrowser.GetCookieManager(null));
|
||||||
|
if (OpenType != EnumOpenType.login)
|
||||||
|
{
|
||||||
foreach (var cook in cookieLst)
|
foreach (var cook in cookieLst)
|
||||||
{
|
{
|
||||||
|
if (_isWindowLoaded)
|
||||||
await WPFCEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", CefWebBrowser.GetCookieManager(null));
|
await WPFCEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", CefWebBrowser.GetCookieManager(null));
|
||||||
//t.Wait(5000);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//根据登录的具体店铺设置local storage
|
//根据登录的具体店铺设置local storage
|
||||||
@@ -244,9 +371,9 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(InitUrl))
|
if (!string.IsNullOrEmpty(InitUrl))
|
||||||
CefWebBrowser.Load(InitUrl);
|
CefWebBrowser?.Load(InitUrl);
|
||||||
else
|
else
|
||||||
CefWebBrowser.Load(buyerMainUrl);
|
CefWebBrowser?.Load(buyerMainUrl);
|
||||||
|
|
||||||
//不是登录的话就此返回
|
//不是登录的话就此返回
|
||||||
if (OpenType != EnumOpenType.login)
|
if (OpenType != EnumOpenType.login)
|
||||||
@@ -256,14 +383,14 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
|
|
||||||
for (int i = 0; i < 50; i++)
|
for (int i = 0; i < 50; i++)
|
||||||
{
|
{
|
||||||
if (CefWebBrowser.IsLoading)
|
if (CefWebBrowser?.IsLoading == true)
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
}
|
}
|
||||||
await Task.Delay(Randomx.GetId(1500, 2000));
|
await Task.Delay(Randomx.GetId(1500, 2000));
|
||||||
if (!_isWindowLoaded)
|
if (!_isWindowLoaded)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (!CefWebBrowser.Address?.StartsWith(buyerLoginUrl) ?? false)
|
while (!CefWebBrowser?.Address?.StartsWith(buyerLoginUrl) ?? false)
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
if (!_isWindowLoaded)
|
if (!_isWindowLoaded)
|
||||||
@@ -300,7 +427,7 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
sb.Append("(function(){");
|
sb.Append("(function(){");
|
||||||
sb.Append("CefSharp.BindObjectAsync('shopObj');");
|
sb.Append("CefSharp.BindObjectAsync('shopObj');");
|
||||||
sb.Append("})();");
|
sb.Append("})();");
|
||||||
CefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
|
CefWebBrowser?.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
|
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
|
||||||
@@ -320,7 +447,7 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
// Task.Run(() => { CefWebBrowser.Load(buyerLoginUrl); });
|
// Task.Run(() => { CefWebBrowser.Load(buyerLoginUrl); });
|
||||||
//}
|
//}
|
||||||
var data = responseData;
|
var data = responseData;
|
||||||
if (data.Contains("karl_malone_32") || data.Contains("jtt_fan"))
|
//if (data.Contains("karl_malone_32") || data.Contains("jtt_fan"))
|
||||||
{
|
{
|
||||||
|
|
||||||
//https://h5api.m.taobao.com/h5/mtop.user.getusersimple/1.0/?jsv=2.7.2&appKey=12574478&t=1789984970076&sign=6bb7d3b5cd8bd3ab32bd97c1a0df1c0f&jsonpIncPrefix=tbnavnew&api=mtop.user.getUserSimple&v=1.0&dataType=json&type=originaljson&data=%7B%7D
|
//https://h5api.m.taobao.com/h5/mtop.user.getusersimple/1.0/?jsv=2.7.2&appKey=12574478&t=1789984970076&sign=6bb7d3b5cd8bd3ab32bd97c1a0df1c0f&jsonpIncPrefix=tbnavnew&api=mtop.user.getUserSimple&v=1.0&dataType=json&type=originaljson&data=%7B%7D
|
||||||
@@ -363,7 +490,10 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
{
|
{
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
|
|
||||||
List<Cookie> cookieList = WPFCEFBrowser.GetCookieList(shopCookieHead, CefWebBrowser.GetCookieManager(null));
|
if (!_isWindowLoaded)
|
||||||
|
return;
|
||||||
|
//List<Cookie> cookieList = WPFCEFBrowser.GetCookieList(shopCookieHead, CefWebBrowser.GetCookieManager(null));
|
||||||
|
List<Cookie> cookieList = WPFCEFBrowser.GetCookieList("", CefWebBrowser.GetCookieManager(null));
|
||||||
|
|
||||||
var buyerUrl = BaseClass.Build29WxObjString("user/add_taobao_buyer");
|
var buyerUrl = BaseClass.Build29WxObjString("user/add_taobao_buyer");
|
||||||
|
|
||||||
@@ -371,6 +501,7 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
this.buyer = GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(b => b.buyer_id == uid);
|
this.buyer = GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(b => b.buyer_id == uid);
|
||||||
if (this.buyer != null)
|
if (this.buyer != null)
|
||||||
{
|
{
|
||||||
|
this.buyer.status = "在线";
|
||||||
this.buyer.user_name = username;
|
this.buyer.user_name = username;
|
||||||
this.buyer.buyer_nick = nickname;
|
this.buyer.buyer_nick = nickname;
|
||||||
this.buyer.cookie = JsonHelper.SerializeObject(cookieList);
|
this.buyer.cookie = JsonHelper.SerializeObject(cookieList);
|
||||||
@@ -427,9 +558,9 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
if (CefWebBrowser != null)
|
if (CefWebBrowser != null)
|
||||||
{
|
{
|
||||||
if (Address != "about:blank")
|
if (Address != "about:blank")
|
||||||
CefWebBrowser.Load(Address);
|
CefWebBrowser?.Load(Address);
|
||||||
else
|
else
|
||||||
CefWebBrowser.Load(buyerMainUrl);
|
CefWebBrowser?.Load(buyerMainUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using _29WxOrderWpf.BaseWindows;
|
using _29WxOrderWpf.BaseWindows;
|
||||||
using _29WxOrderWpf.Commands;
|
using WxOrder.Framework.Commons;
|
||||||
using _29WxOrderWpf.Ctrls.OrderCtrls;
|
using _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
@@ -40,6 +40,11 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
get { return this.GetValue(x => x.OrderItem); }
|
get { return this.GetValue(x => x.OrderItem); }
|
||||||
set { this.SetValue(x => x.OrderItem, value); }
|
set { this.SetValue(x => x.OrderItem, value); }
|
||||||
}
|
}
|
||||||
|
public oms_wei_external_procurement_log_info TransitOrder
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.TransitOrder); }
|
||||||
|
set { this.SetValue(x => x.TransitOrder, value); }
|
||||||
|
}
|
||||||
public string purchaserNote
|
public string purchaserNote
|
||||||
{
|
{
|
||||||
get { return this.GetValue(x => x.purchaserNote); }
|
get { return this.GetValue(x => x.purchaserNote); }
|
||||||
@@ -98,7 +103,12 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
|
|
||||||
public void AddExtraPackages()
|
public void AddExtraPackages()
|
||||||
{
|
{
|
||||||
var transitOrder = OrderItem.ItemTransitOrder ?? OrderItem.ItemTransitOrderWithVoid;
|
if (TransitOrder == null)
|
||||||
|
{
|
||||||
|
//TransitOrder = OrderItem.ItemTransitOrder ?? OrderItem.ItemTransitOrderWithVoid;
|
||||||
|
BaseMsgWindow.ShowError("未找到云仓发货包裹,请确认包裹存在");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var transitExtraOrder = OrderItem.ItemTransitExtraOrders.FirstOrDefault(t => t.order_void_status != 1);
|
var transitExtraOrder = OrderItem.ItemTransitExtraOrders.FirstOrDefault(t => t.order_void_status != 1);
|
||||||
if (transitExtraOrder != null)
|
if (transitExtraOrder != null)
|
||||||
{
|
{
|
||||||
@@ -109,28 +119,32 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
string basePostageKey = WarehousePostageInfo.DicWarehousePostage.Keys.FirstOrDefault(pk => (OrderItem.ItemOrder?.province_name).ParseToString().Contains(pk));
|
string basePostageKey = WarehousePostageInfo.DicWarehousePostage.Keys.FirstOrDefault(pk => (OrderItem.ItemOrder?.province_name).ParseToString().Contains(pk));
|
||||||
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
||||||
JObject body = new JObject();
|
JObject body = new JObject();
|
||||||
body["oemAmount"] = (BaseClass.PostagePerOrderDiff * 100).ParseToInt().ParseToString();
|
body["parentOemId"] = BaseClass.ParentOemId;
|
||||||
body["postage"] = ((basePostage + BaseClass.PostagePerOrderDiff) * 100).ParseToInt().ParseToString();
|
body["parentOemAmount"] = (BaseClass.ParentPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
body["oemId"] = BaseClass.OemId;
|
||||||
|
body["oemAmount"] = (BaseClass.PostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
body["postage"] = ((basePostage + BaseClass.ParentPostageOemAmount + BaseClass.PostageOemAmount) * 100).ParseToInt().ParseToString();
|
||||||
|
|
||||||
body["packType"] = "2";
|
body["packType"] = "2";
|
||||||
body["batchId"] = transitOrder.order_code + "-" + ((OrderItem.ItemTransitExtraOrders?.Count).ParseToInt() + 1);
|
body["batchId"] = TransitOrder.order_code + "-" + ((OrderItem.ItemTransitExtraOrders?.Count).ParseToInt() + 1);
|
||||||
body["orderNo"] = OrderItem.order_id;
|
body["orderNo"] = OrderItem.order_id;
|
||||||
body["orderCode"] = transitOrder.order_code;
|
body["orderCode"] = TransitOrder.order_code;
|
||||||
|
|
||||||
// 未出库填上游物流,已出库填下游物流
|
// 未出库填上游物流,已出库填下游物流
|
||||||
if (transitOrder.warehouse_status != 2)
|
if (TransitOrder.warehouse_status != 2)
|
||||||
{
|
{
|
||||||
body["logisticsCode"] = transitOrder.express_1_company;
|
body["logisticsCode"] = TransitOrder.express_1_company;
|
||||||
body["logisticsExpressCode"] = transitOrder.express_1_waybill;
|
body["logisticsExpressCode"] = TransitOrder.express_1_waybill;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
body["logisticsCode"] = transitOrder.express_2_company;
|
body["logisticsCode"] = TransitOrder.express_2_company;
|
||||||
body["logisticsExpressCode"] = transitOrder.express_2_waybill;
|
body["logisticsExpressCode"] = TransitOrder.express_2_waybill;
|
||||||
}
|
}
|
||||||
|
|
||||||
body["accountUser"] = BaseClass.UserName;
|
body["userName"] = BaseClass.UserName; // 软件端用户名
|
||||||
body["purchaserNote"] = purchaserNote.ParseToString(); // 采购人备注
|
body["accountUser"] = BaseClass.UserName; // 后续改为买手昵称,滞留补发填空
|
||||||
|
body["purchaserNote"] = BaseClass.UserName + "-" + BaseClass.NickName; //purchaserNote.ParseToString(); // 采购人备注
|
||||||
body["orderPlatformCode"] = "WEISHOP";
|
body["orderPlatformCode"] = "WEISHOP";
|
||||||
|
|
||||||
var url = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/extra-packages/save";
|
var url = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/extra-packages/save";
|
||||||
@@ -142,7 +156,7 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
// <AjaxResult><msg>创建额外包裹异常: 用户账户余额不足,需至少 2.20 元用于中转仓取号, userId:17333276316, balance:0.85</msg><code>2</code></AjaxResult>
|
// <AjaxResult><msg>创建额外包裹异常: 用户账户余额不足,需至少 2.20 元用于中转仓取号, userId:17333276316, balance:0.85</msg><code>2</code></AjaxResult>
|
||||||
if (BaseRegex.GetStringXml(ref rst, "code") != "0" && BaseRegex.GetStringXml(ref rst, "code") != "200")
|
if (BaseRegex.GetStringXml(ref rst, "code") != "0" && BaseRegex.GetStringXml(ref rst, "code") != "200")
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowError(BaseRegex.GetStringXml(ref rst, "msg"));
|
BaseMsgWindow.ShowError("服务端返回:" + BaseRegex.GetStringXml(ref rst, "msg"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +170,7 @@ namespace _29WxOrderWpf.ViewModels
|
|||||||
// <AjaxResult><msg>额外信息已保存</msg><code>200</code></AjaxResult>
|
// <AjaxResult><msg>额外信息已保存</msg><code>200</code></AjaxResult>
|
||||||
if (BaseRegex.GetStringXml(ref rst, "code") != "0" && BaseRegex.GetStringXml(ref rst, "code") != "200")
|
if (BaseRegex.GetStringXml(ref rst, "code") != "0" && BaseRegex.GetStringXml(ref rst, "code") != "200")
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowError(BaseRegex.GetStringXml(ref rst, "msg"));
|
BaseMsgWindow.ShowError("服务端返回:" + BaseRegex.GetStringXml(ref rst, "msg"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:UserControls="clr-namespace:_29WxOrderWpf.UserControls"
|
xmlns:UserControls="clr-namespace:_29WxOrderWpf.UserControls"
|
||||||
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comn="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Views"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Views"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||||||
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comn="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:wpf="WPFCommon"
|
xmlns:wpf="WPFCommon"
|
||||||
|
|||||||
@@ -39,10 +39,15 @@ public partial class ChangeWaybillView : UserControl
|
|||||||
|
|
||||||
private void ChangeWaybillView_Loaded(object sender, RoutedEventArgs e)
|
private void ChangeWaybillView_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Window parentWindow = Window.GetWindow(this);
|
||||||
|
if (parentWindow != null)
|
||||||
|
{
|
||||||
|
parentWindow.Closed += ChangeWaybillView_Closed;
|
||||||
|
}
|
||||||
ViewModel.Start();
|
ViewModel.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChangeWaybillView_Closed(object sender, RoutedEventArgs e)
|
private void ChangeWaybillView_Closed(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ViewModel.Stop();
|
ViewModel.Stop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||||||
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comn="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:wpf="WPFCommon"
|
xmlns:wpf="WPFCommon"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||||||
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
|
xmlns:comn="WxOrder.Framework"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:wpf="WPFCommon"
|
xmlns:wpf="WPFCommon"
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ public partial class TransitExtraPackagesView : UserControl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public TransitExtraPackagesViewModel ViewModel { get; }
|
public TransitExtraPackagesViewModel ViewModel { get; }
|
||||||
|
|
||||||
public TransitExtraPackagesView(oms_wei_order_info _order, oms_wei_order_item_info _orderItem)
|
public TransitExtraPackagesView(oms_wei_order_info _order, oms_wei_order_item_info _orderItem, oms_wei_external_procurement_log_info transitOrder = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
ViewModel = new TransitExtraPackagesViewModel(_order, _orderItem);
|
ViewModel = new TransitExtraPackagesViewModel(_order, _orderItem) { TransitOrder = transitOrder };
|
||||||
ViewModel.RequestClose += ViewModel_RequestClose;
|
ViewModel.RequestClose += ViewModel_RequestClose;
|
||||||
DataContext = ViewModel;
|
DataContext = ViewModel;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
using _29WxOrderWpf.UserControls;
|
using _29WxOrderWpf.UserControls;
|
||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.DouYinModel.Param.LoginManage;
|
using AllBase.DouYinModel.Param.LoginManage;
|
||||||
using MAX.Core.Helpers;
|
|
||||||
using NaiBa.Util;
|
using NaiBa.Util;
|
||||||
using NaiBa.Util.Extension;
|
using NaiBa.Util.Extension;
|
||||||
using NaiBa.Util.Helper;
|
using NaiBa.Util.Helper;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@@ -23,6 +23,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using Work;
|
using Work;
|
||||||
using Work.BaseForms;
|
using Work.BaseForms;
|
||||||
|
using WxOrder.Framework.Commons;
|
||||||
|
|
||||||
namespace _29WxOrderWpf.Windows.LoginWindows
|
namespace _29WxOrderWpf.Windows.LoginWindows
|
||||||
{
|
{
|
||||||
@@ -44,7 +45,7 @@ namespace _29WxOrderWpf.Windows.LoginWindows
|
|||||||
if (!string.IsNullOrEmpty(BaseClass.ProgramName))
|
if (!string.IsNullOrEmpty(BaseClass.ProgramName))
|
||||||
{
|
{
|
||||||
lblAppName.Content = BaseClass.ProgramName;
|
lblAppName.Content = BaseClass.ProgramName;
|
||||||
MainWindow.Instance.lblAppName.Content = lblAppName.Content;
|
MainWindow.Instance.lblAppName.Content = BaseClass.ProgramName.Contains("-微信小店订单管理") ? BaseClass.ProgramName : BaseClass.ProgramName + "-微信小店订单管理";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Title = "用户登录";
|
this.Title = "用户登录";
|
||||||
@@ -99,7 +100,7 @@ namespace _29WxOrderWpf.Windows.LoginWindows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnLogin_Click(object sender, RoutedEventArgs e)
|
private async void btnLogin_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
UserLogin ul = new UserLogin();
|
UserLogin ul = new UserLogin();
|
||||||
ul.Mobile = cmbUserNameMobile.Text;
|
ul.Mobile = cmbUserNameMobile.Text;
|
||||||
@@ -128,7 +129,17 @@ namespace _29WxOrderWpf.Windows.LoginWindows
|
|||||||
BaseMsgForm.ShowError(message, "登录失败");
|
BaseMsgForm.ShowError(message, "登录失败");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
try
|
||||||
|
{
|
||||||
|
await UserLogin.GetUserOemAmount(16);
|
||||||
|
await UserLogin.GetUserOemAmount(20);
|
||||||
|
await UserLogin.GetUserOemAmount(26);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
BaseMsgWindow.ShowError("更新账户信息失败 " + ex.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (BaseClass.Remember)
|
if (BaseClass.Remember)
|
||||||
{
|
{
|
||||||
Initialization i = new Initialization();
|
Initialization i = new Initialization();
|
||||||
@@ -154,6 +165,7 @@ namespace _29WxOrderWpf.Windows.LoginWindows
|
|||||||
MainWindow.Instance.lblDebug.Content = "[Dev]";
|
MainWindow.Instance.lblDebug.Content = "[Dev]";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
||||||
this.IsLogin = true;
|
this.IsLogin = true;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,15 +288,15 @@
|
|||||||
Visibility="Collapsed" />
|
Visibility="Collapsed" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnAdd"
|
x:Name="btnAdd"
|
||||||
Grid.Row="9"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
MinWidth="48"
|
MinWidth="48"
|
||||||
Padding="4"
|
Padding="4"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Click="btnAdd_Click"
|
Click="btnAddReturnPackage_Click"
|
||||||
Content="添 加"
|
Content="添 加"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Style="{StaticResource BasePageButtonStyle}" />
|
Style="{StaticResource BasePageButtonStyle}" Height="28" Margin="0,53,0,0" Grid.RowSpan="2" VerticalAlignment="Top" />
|
||||||
<Image
|
<Image
|
||||||
x:Name="imgLoading"
|
x:Name="imgLoading"
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
|
|||||||
@@ -29,14 +29,25 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TransitAfterSaleWindow : BaseWindow
|
public partial class TransitAfterSaleWindow : BaseWindow
|
||||||
{
|
{
|
||||||
|
public int PackType { get; set; }
|
||||||
public oms_wei_order_item_info OrderItem { get; set; }
|
public oms_wei_order_item_info OrderItem { get; set; }
|
||||||
|
public oms_wei_order_item_transit_detail_info TransitInfo { get; set; }
|
||||||
|
public oms_wei_external_procurement_log_info TransitOrder { get; set; } = null;
|
||||||
|
public oms_wei_transfer_extra_package ExtraPackage { get; set; } = null;
|
||||||
|
|
||||||
public TransitAfterSaleWindow(oms_wei_order_item_info orderItem)
|
public TransitAfterSaleWindow(oms_wei_order_item_info orderItem, oms_wei_order_item_transit_detail_info _transitInfo)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
if (orderItem != null)
|
if (orderItem != null)
|
||||||
OrderItem = orderItem;
|
OrderItem = orderItem;
|
||||||
|
if (_transitInfo != null)
|
||||||
|
TransitInfo = _transitInfo;
|
||||||
|
if (_transitInfo?.oms_wei_external_procurement_log_info != null)
|
||||||
|
TransitOrder = _transitInfo?.oms_wei_external_procurement_log_info;
|
||||||
|
else if (_transitInfo?.oms_wei_transfer_extra_package != null)
|
||||||
|
ExtraPackage = _transitInfo?.oms_wei_transfer_extra_package;
|
||||||
|
PackType = _transitInfo?.TransitTypeStr == "额外包裹" ? 2 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void mainGrid_Loaded(object sender, RoutedEventArgs e)
|
private void mainGrid_Loaded(object sender, RoutedEventArgs e)
|
||||||
@@ -52,29 +63,38 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
this.cmbWareHouse.Items.Add(warehouse.TransName);
|
this.cmbWareHouse.Items.Add(warehouse.TransName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OrderItem != null)
|
if (OrderItem != null && TransitInfo != null)
|
||||||
{
|
{
|
||||||
this.cmbWareHouse.Text = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransId == OrderItem.ItemTransitOrder?.platform)?.TransName;
|
|
||||||
this.txtExpressName.Text = OrderItem.ItemTransitOrder?.express_2_company;
|
|
||||||
this.txtWarehouseWaybill.Text = OrderItem.ItemTransitOrder?.express_2_waybill;
|
|
||||||
|
|
||||||
if (OrderItem.ItemTransitOrderAfterSale != null)
|
if (ExtraPackage != null)
|
||||||
|
{
|
||||||
|
// 获取额外包裹对应的发货包裹或者发货包裹本身
|
||||||
|
var _transitOrder = OrderItem.ItemTransitOrders.FirstOrDefault(t => t.order_code == ExtraPackage?.order_code);
|
||||||
|
|
||||||
|
this.cmbWareHouse.Text = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransId == _transitOrder?.platform)?.TransName;
|
||||||
|
this.txtExpressName.Text = string.IsNullOrWhiteSpace(ExtraPackage.real_logistics_code) ? ExtraPackage.logistics_code : ExtraPackage?.real_logistics_code;
|
||||||
|
this.txtWarehouseWaybill.Text = string.IsNullOrWhiteSpace(ExtraPackage?.real_logistics_express_code) ? ExtraPackage?.logistics_express_code : ExtraPackage?.real_logistics_express_code;
|
||||||
|
|
||||||
|
var transitAfterSale = OrderItem.ItemTransitOrderAfterSales?.OrderByDescending(t => t.id)?.FirstOrDefault(t => t.order_code == ExtraPackage.order_code && t.order_void_status != 1 && t.pack_type == PackType);
|
||||||
|
if (transitAfterSale != null)
|
||||||
{
|
{
|
||||||
btnAdd.IsEnabled = false;
|
btnAdd.IsEnabled = false;
|
||||||
|
|
||||||
this.txtUser.Text = OrderItem.ItemTransitOrderAfterSale.recipient_name;
|
this.txtUser.Text = transitAfterSale.recipient_name;
|
||||||
this.txtMobile.Text = OrderItem.ItemTransitOrderAfterSale.recipient_phone;
|
this.txtMobile.Text = transitAfterSale.recipient_phone;
|
||||||
this.txtDetailAddress.Text = OrderItem.ItemTransitOrderAfterSale.refund_detail_address;
|
this.txtDetailAddress.Text = transitAfterSale.refund_detail_address;
|
||||||
//this.txtAddress.Text = OrderItem.ItemTransitOrderAfterSale.refund_province + "/" + OrderItem.ItemTransitOrderAfterSale.refund_city + "/" + OrderItem.ItemTransitOrderAfterSale.refund_county;
|
//this.txtAddress.Text = transitAfterSale.refund_province + "/" + transitAfterSale.refund_city + "/" + transitAfterSale.refund_county;
|
||||||
this.txtProvince.Text = OrderItem.ItemTransitOrderAfterSale.refund_province;
|
this.txtProvince.Text = transitAfterSale.refund_province;
|
||||||
this.txtCity.Text = OrderItem.ItemTransitOrderAfterSale.refund_city;
|
this.txtCity.Text = transitAfterSale.refund_city;
|
||||||
this.txtCounty.Text = OrderItem.ItemTransitOrderAfterSale.refund_county;
|
this.txtCounty.Text = transitAfterSale.refund_county;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
var pddBuyerAfterSale = OrderItem.PddBuyerAfterSales.FirstOrDefault(af => af.orderSn == _transitOrder?.out_order_no);
|
||||||
|
|
||||||
// 需要手动申请售后的,先去申请售后再提交拦截退回总店
|
// 需要手动申请售后的,先去申请售后再提交拦截退回总店
|
||||||
if (!string.IsNullOrEmpty(OrderItem.ItemTransitOrderWithVoid?.out_order_no) && OrderItem.PddBuyerAfterSaleAddressStr.IsNullOrEmpty() &&
|
if (!string.IsNullOrEmpty(_transitOrder?.out_order_no) && !string.IsNullOrEmpty(pddBuyerAfterSale?.afterSaleAddress) &&
|
||||||
OrderItem.TransitRefundStatusStr.Contains("需手动申请售后") || OrderItem.TransitRefundStatusStr.Contains("待用户发货"))
|
(_transitOrder.refund_status.ParseToString().Contains("需手动申请售后") || _transitOrder.refund_status.ParseToString().Contains("待用户发货")))
|
||||||
{
|
{
|
||||||
btnAdd.IsEnabled = false;
|
btnAdd.IsEnabled = false;
|
||||||
imgLoading.Visibility = Visibility.Visible;
|
imgLoading.Visibility = Visibility.Visible;
|
||||||
@@ -82,20 +102,85 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
var order = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == OrderItem.order_id);
|
var order = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == OrderItem.order_id);
|
||||||
if (order != null)
|
if (order != null)
|
||||||
{
|
{
|
||||||
var orderItemTmp = order.orderItems.FirstOrDefault(oi => oi.sku_id == OrderItem.sku_id);
|
var orderItemTmp = order.OrderItems.FirstOrDefault(oi => oi.sku_id == OrderItem.sku_id);
|
||||||
if (orderItemTmp != null)
|
if (orderItemTmp != null)
|
||||||
OrderItem = orderItemTmp;
|
OrderItem = orderItemTmp;
|
||||||
}
|
}
|
||||||
btnAdd.IsEnabled = true;
|
btnAdd.IsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OrderItem.PddBuyerAfterSale?.orderSn == OrderItem.ItemTransitOrder?.out_order_no && !string.IsNullOrEmpty(OrderItem.PddBuyerAfterSale?.afterSaleAddress))
|
pddBuyerAfterSale = OrderItem.PddBuyerAfterSales.FirstOrDefault(af => af.orderSn == _transitOrder?.out_order_no);
|
||||||
|
if (!string.IsNullOrEmpty(pddBuyerAfterSale?.afterSaleAddress))
|
||||||
|
{
|
||||||
|
txtAddressAnalysis.Text = pddBuyerAfterSale?.afterSaleAddress;
|
||||||
|
btnAddressAnalysis_Click(null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(TransitOrder != null)
|
||||||
|
{
|
||||||
|
this.cmbWareHouse.Text = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransId == TransitOrder?.platform)?.TransName;
|
||||||
|
this.txtExpressName.Text = string.IsNullOrWhiteSpace(TransitOrder?.express_2_waybill) ? TransitOrder?.express_1_company : TransitOrder?.express_2_company;
|
||||||
|
this.txtWarehouseWaybill.Text = string.IsNullOrWhiteSpace(TransitOrder?.express_2_waybill) ? TransitOrder?.express_1_waybill : TransitOrder?.express_2_waybill;
|
||||||
|
if (this.txtExpressName.Text.IsNullOrEmpty() || this.txtWarehouseWaybill.Text.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
this.txtExpressName.Text = OrderItem.PddBuyerOrders.FirstOrDefault(p => p.order_sn == TransitOrder?.out_order_no)?.outExpressCompanyCode;
|
||||||
|
this.txtWarehouseWaybill.Text = OrderItem.PddBuyerOrders.FirstOrDefault(p => p.order_sn == TransitOrder?.out_order_no)?.tracking_number;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.txtExpressName.Text) && !string.IsNullOrWhiteSpace(this.txtWarehouseWaybill.Text))
|
||||||
|
{
|
||||||
|
// 没物流信息的仓库单手动更新买手物流信息
|
||||||
|
JObject data = new JObject();
|
||||||
|
data["orderNo"] = OrderItem.order_id;
|
||||||
|
data["orderCode"] = TransitOrder?.order_code;
|
||||||
|
data["logisticsExpressCode"] = this.txtWarehouseWaybill.Text;
|
||||||
|
data["logisticsExpressCompany"] = this.txtExpressName.Text;
|
||||||
|
var updateTransitExpressUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/orders/updateLogisticsExpressCode";
|
||||||
|
var updateTransitExpressStr = JsonHelper.SerializeObject(data);
|
||||||
|
var updateTransitExpressRst = HttpResponseWXBLL.e57PostResponse(updateTransitExpressUrl, updateTransitExpressStr, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var transitAfterSale = OrderItem.ItemTransitOrderAfterSales?.OrderByDescending(t => t.id)?.FirstOrDefault(t => t.order_code == TransitOrder.order_code && t.order_void_status != 1 && t.pack_type == PackType);
|
||||||
|
if (transitAfterSale != null)
|
||||||
|
{
|
||||||
|
btnAdd.IsEnabled = false;
|
||||||
|
|
||||||
|
this.txtUser.Text = transitAfterSale.recipient_name;
|
||||||
|
this.txtMobile.Text = transitAfterSale.recipient_phone;
|
||||||
|
this.txtDetailAddress.Text = transitAfterSale.refund_detail_address;
|
||||||
|
//this.txtAddress.Text = transitAfterSale.refund_province + "/" + transitAfterSale.refund_city + "/" + transitAfterSale.refund_county;
|
||||||
|
this.txtProvince.Text = transitAfterSale.refund_province;
|
||||||
|
this.txtCity.Text = transitAfterSale.refund_city;
|
||||||
|
this.txtCounty.Text = transitAfterSale.refund_county;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 需要手动申请售后的,先去申请售后再提交拦截退回总店
|
||||||
|
if (!string.IsNullOrEmpty(TransitOrder?.out_order_no) && OrderItem.PddBuyerAfterSaleAddressStr.IsNullOrEmpty() &&
|
||||||
|
(TransitOrder.refund_status.ParseToString().Contains("需手动申请售后") || TransitOrder.refund_status.ParseToString().Contains("待用户发货")))
|
||||||
|
{
|
||||||
|
btnAdd.IsEnabled = false;
|
||||||
|
imgLoading.Visibility = Visibility.Visible;
|
||||||
|
await MainWindow.Instance.orderListCtrl.DoBuyerRefend(new List<oms_wei_order_item_info>() { OrderItem });
|
||||||
|
var order = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == OrderItem.order_id);
|
||||||
|
if (order != null)
|
||||||
|
{
|
||||||
|
var orderItemTmp = order.OrderItems.FirstOrDefault(oi => oi.sku_id == OrderItem.sku_id);
|
||||||
|
if (orderItemTmp != null)
|
||||||
|
OrderItem = orderItemTmp;
|
||||||
|
}
|
||||||
|
btnAdd.IsEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OrderItem.PddBuyerAfterSale?.orderSn == TransitOrder?.out_order_no && !string.IsNullOrEmpty(OrderItem.PddBuyerAfterSale?.afterSaleAddress))
|
||||||
{
|
{
|
||||||
txtAddressAnalysis.Text = OrderItem.PddBuyerAfterSale?.afterSaleAddress;
|
txtAddressAnalysis.Text = OrderItem.PddBuyerAfterSale?.afterSaleAddress;
|
||||||
btnAddressAnalysis_Click(null, null);
|
btnAddressAnalysis_Click(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
imgLoading.Visibility = Visibility.Collapsed;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 如果提交过工单,则显示已提交工单及提交时间。
|
// 如果提交过工单,则显示已提交工单及提交时间。
|
||||||
var workOrderInfo = await GetWorkOrder();
|
var workOrderInfo = await GetWorkOrder();
|
||||||
@@ -105,32 +190,19 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
{
|
{
|
||||||
lblWorkOrderMsg.Content = "已提交工单(" + createTime.ParseToString() + ")";
|
lblWorkOrderMsg.Content = "已提交工单(" + createTime.ParseToString() + ")";
|
||||||
}
|
}
|
||||||
|
imgLoading.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (OrderItem?.ItemTransitOrder?.warehouse_status != 0 && OrderItem?.ItemTransitOrder?.warehouse_status != 1)
|
private async void btnAddReturnPackage_Click(object sender, RoutedEventArgs e)
|
||||||
////if (OrderItem?.ItemTransitOrderWithVoid?.warehouse_status != 0 && OrderItem?.ItemTransitOrderWithVoid?.warehouse_status != 1)
|
|
||||||
//{
|
|
||||||
// btnAdd.IsEnabled = false;
|
|
||||||
// //BaseMsgWindow.ShowError("当前订单仓库状态不支持售后,请联系买家直接退回总店!");
|
|
||||||
// lblMsg.Content = "当前订单仓库状态不支持售后,请联系买家直接退回总店!";
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if ((OrderItem?.ItemTransitOrder?.warehouse_status).ParseToInt() < 1)
|
|
||||||
{
|
|
||||||
//btnAdd.IsEnabled = false;
|
|
||||||
lblMsg.Content = "当前订单仓库状态不支持拦截退回总店,建议联系买家直接退回总店!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(lblWorkOrderMsg.Content.ParseToString()))
|
if (string.IsNullOrEmpty(lblWorkOrderMsg.Content.ParseToString()))
|
||||||
{
|
{
|
||||||
var workOrder = AddWorkOrder();
|
// 后续为独立创建工单
|
||||||
|
// 创建拦截退货包裹工单
|
||||||
|
var workOrder = await AddWorkOrderAsync();
|
||||||
if (!workOrder.Contains("\"success\":true"))
|
if (!workOrder.Contains("\"success\":true"))
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowError("中转拦截包裹添加失败," + BaseRegex.GetStringJson(ref workOrder, "message"), "", this);
|
BaseMsgWindow.ShowError("拦截工单添加失败," + BaseRegex.GetStringJson(ref workOrder, "message"), "", this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,7 +223,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
|
|
||||||
JObject data = new JObject();
|
JObject data = new JObject();
|
||||||
data["orderNo"] = OrderItem.order_id;
|
data["orderNo"] = OrderItem.order_id;
|
||||||
data["orderCode"] = OrderItem.ItemTransitOrder?.order_code;
|
data["orderCode"] = TransitOrder?.order_code ?? ExtraPackage?.batchId; /* 发货单填写发货单code,额外包裹填写额外包裹新单号 */
|
||||||
data["refundProvince"] = txtProvince.Text.Trim();
|
data["refundProvince"] = txtProvince.Text.Trim();
|
||||||
data["refundCity"] = txtCity.Text.Trim();
|
data["refundCity"] = txtCity.Text.Trim();
|
||||||
data["refundCounty"] = txtCounty.Text.Trim();
|
data["refundCounty"] = txtCounty.Text.Trim();
|
||||||
@@ -160,6 +232,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
data["recipientPhone"] = txtMobile.Text.Trim();
|
data["recipientPhone"] = txtMobile.Text.Trim();
|
||||||
data["account_user"] = BaseClass.UserName;
|
data["account_user"] = BaseClass.UserName;
|
||||||
data["accountUser"] = BaseClass.UserName;
|
data["accountUser"] = BaseClass.UserName;
|
||||||
|
data["packType"] = PackType; /* 1正常发货拦截退回,2额外包裹拦截退回, */
|
||||||
//data["platform"] = "WEISHOP";
|
//data["platform"] = "WEISHOP";
|
||||||
|
|
||||||
if (GlobalConfig.BuyConfig.IsUseAppBalance)
|
if (GlobalConfig.BuyConfig.IsUseAppBalance)
|
||||||
@@ -168,26 +241,28 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
||||||
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
||||||
|
|
||||||
data["oemAmount"] = (BaseClass.RefundPostagePerOrderDiff * 100).ParseToInt().ParseToString();
|
data["parentOemId"] = BaseClass.ParentOemId;
|
||||||
data["postage"] = ((basePostage + BaseClass.RefundPostagePerOrderDiff) * 100).ParseToInt().ParseToString();
|
data["parentOemAmount"] = (BaseClass.ParentRefundPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
data["oemId"] = BaseClass.OemId;
|
||||||
|
data["oemAmount"] = (BaseClass.RefundPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
data["postage"] = ((basePostage + BaseClass.ParentRefundPostageOemAmount + BaseClass.RefundPostageOemAmount) * 100).ParseToInt().ParseToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var getTransitAfterSaleUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/createReturnPackage";
|
var getTransitAfterSaleUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/createReturnPackage";
|
||||||
var getTransitAfterSaleStr = JsonHelper.SerializeObject(data);
|
var getTransitAfterSaleStr = JsonHelper.SerializeObject(data);
|
||||||
var getTransitAfterSaleRst = HttpResponseWXBLL.e57PostResponse(getTransitAfterSaleUrl, getTransitAfterSaleStr, "");
|
var getTransitAfterSaleRst = await HttpResponseWXBLL.e57PostResponseAsync(getTransitAfterSaleUrl, getTransitAfterSaleStr);
|
||||||
if (!getTransitAfterSaleRst.ParseToString().Contains("<code>200</code>") && !getTransitAfterSaleRst.ParseToString().Contains("<code>0</code>"))
|
if (!getTransitAfterSaleRst.ParseToString().Contains("\"code\":0") && !getTransitAfterSaleRst.ParseToString().Contains("\"code\":200"))
|
||||||
{
|
{
|
||||||
string msg = BaseRegex.GetStringXml(ref getTransitAfterSaleRst, "msg");
|
string msg = BaseRegex.GetStringJsonByRegs(ref getTransitAfterSaleRst, getTransitAfterSaleRst, "msg");
|
||||||
if (msg.IsNullOrEmpty())
|
BaseMsgWindow.ShowError("拦截退货包裹添加失败,服务端返回 " + msg, "", this);
|
||||||
msg = getTransitAfterSaleRst;
|
|
||||||
BaseMsgWindow.ShowError("中转售后添加失败,服务端返回 " + msg, "", this);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//<AjaxResult><msg>创建退货包裹成功</msg><code>0</code></AjaxResult>
|
//<AjaxResult><msg>创建退货包裹成功</msg><code>0</code></AjaxResult>
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
await MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
Task.Run(() => { MainWindow.Instance.orderListCtrl.FilterOrders(); });
|
//MainWindow.Instance.orderListCtrl.FilterOrders();
|
||||||
BaseMsgWindow.ShowInfo("添加退货包裹成功", "", this);
|
StartUp.UpdateBalance();
|
||||||
|
BaseMsgWindow.ShowInfo("添加拦截退货包裹成功", "", this);
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,27 +322,28 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public string AddWorkOrder()
|
public async Task<string> AddWorkOrderAsync()
|
||||||
{
|
{
|
||||||
if (OrderItem.ItemTransitOrder?.warehouse_status == 3)
|
if (TransitOrder?.warehouse_status == 3)
|
||||||
return "\"success\":true,\"message\":\"已到仓,无需拦截工单\"";
|
return "\"success\":true,\"message\":\"已到仓,无需拦截工单\"";
|
||||||
|
|
||||||
string url = HttpResponseTransitWorkOrderBLL.WorkOrderUrl + "/api/open/v1/customer-work-orders/intercept-return-cloud-warehouse-after-outbound";
|
string url = HttpResponseTransitWorkOrderBLL.WorkOrderUrl + "/api/open/v1/customer-work-orders/intercept-return-cloud-warehouse-after-outbound";
|
||||||
JObject obj = new JObject();
|
JObject obj = new JObject();
|
||||||
obj["appId"] = this.OrderItem.Shop.ShopId;
|
obj["appId"] = this.OrderItem.ItemOrder?.Shop?.ShopId;
|
||||||
obj["wechatOrderNo"] = this.OrderItem.order_id;
|
obj["wechatOrderNo"] = this.OrderItem.order_id;
|
||||||
obj["purchaseOrderNo"] = this.OrderItem.PddBuyerAfterSale?.orderSn;
|
//obj["purchaseOrderNo"] = this.OrderItem.PddBuyerAfterSale?.orderSn;
|
||||||
|
obj["purchaseOrderNo"] = TransitOrder?.order_code;
|
||||||
obj["creator"] = BaseClass.UserName;
|
obj["creator"] = BaseClass.UserName;
|
||||||
obj["remark"] = "客户要求拦截并退回云仓";
|
obj["remark"] = "客户要求拦截并退回云仓";
|
||||||
|
|
||||||
var rst = HttpResponseTransitWorkOrderBLL.PostResponse(this.OrderItem.Shop, url, JsonHelper.SerializeObject(obj), "");
|
var rst = await HttpResponseTransitWorkOrderBLL.PostResponseAsync(this.OrderItem.ItemOrder?.Shop, url, JsonHelper.SerializeObject(obj), "");
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> GetWorkOrder()
|
public async Task<string> GetWorkOrder()
|
||||||
{
|
{
|
||||||
string url = HttpResponseTransitWorkOrderBLL.WorkOrderUrl + "/api/open/v1/customer-work-orders?wechatOrderNo=" + this.OrderItem.order_id;
|
string url = HttpResponseTransitWorkOrderBLL.WorkOrderUrl + "/api/open/v1/customer-work-orders?wechatOrderNo=" + this.OrderItem.order_id;
|
||||||
var rst = await HttpResponseTransitWorkOrderBLL.GetResponseAsync(this.OrderItem.Shop, url, "");
|
var rst = await HttpResponseTransitWorkOrderBLL.GetResponseAsync(this.OrderItem.ItemOrder?.Shop, url, "");
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
txtShopName.Text = OrderItem.ItemOrder?.shop_name;
|
txtShopName.Text = OrderItem.ItemOrder?.shop_name;
|
||||||
txtGoodsName.Text = OrderItem.title;
|
txtGoodsName.Text = OrderItem.title;
|
||||||
txtSpuId.Text = OrderItem.product_id.ParseToString();
|
txtSpuId.Text = OrderItem.product_id.ParseToString();
|
||||||
txtSpecName.Text = OrderItem.sku_attr_str;
|
txtSpecName.Text = OrderItem.SkuAttrStr;
|
||||||
|
|
||||||
txtWaybillId.Text = OrderItem.ItemRefund?.return_waybill_id;
|
txtWaybillId.Text = OrderItem.ItemRefund?.return_waybill_id;
|
||||||
foreach (var cmbItem in cmbExpressName.Items)
|
foreach (var cmbItem in cmbExpressName.Items)
|
||||||
@@ -130,12 +130,12 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
private async void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (OrderItem?.ItemOrder?.OrderBuyType == "云仓" && (OrderItem?.ItemTransitOrder?.warehouse_status).ParseToInt() < 1)
|
if (OrderItem?.ItemOrder?.OrderBuyType == "云仓" && (OrderItem?.ItemTransitOrder?.warehouse_status).ParseToInt() < 1)
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowError("当前订单仓库状态不支持创建退货订单!");
|
//BaseMsgWindow.ShowError("当前订单仓库状态不支持创建退货订单!");
|
||||||
return;
|
//return;
|
||||||
}
|
}
|
||||||
if (txtWaybillId.Text.Trim().IsNullOrEmpty() || PddBuyerOrderLiteInfo.GetPddToTransitWarehouseExpressCompanyCode(cmbExpressName.SelectedItem.ParseToString()).IsNullOrEmpty())
|
if (txtWaybillId.Text.Trim().IsNullOrEmpty() || PddBuyerOrderLiteInfo.GetPddToTransitWarehouseExpressCompanyCode(cmbExpressName.SelectedItem.ParseToString()).IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
@@ -184,14 +184,17 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
||||||
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
||||||
|
|
||||||
jObj["oemAmount"] = (BaseClass.RefundPostagePerOrderDiff * 100).ParseToInt().ParseToString();
|
jObj["parentOemId"] = BaseClass.ParentOemId;
|
||||||
jObj["firstWeightFee"] = ((basePostage + BaseClass.RefundPostagePerOrderDiff) * 100).ParseToInt().ParseToString();
|
jObj["parentOemAmount"] = (BaseClass.ParentRefundPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
jObj["oemId"] = BaseClass.OemId;
|
||||||
|
jObj["oemAmount"] = (BaseClass.RefundPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
jObj["firstWeightFee"] = ((basePostage + BaseClass.ParentRefundPostageOemAmount + BaseClass.RefundPostageOemAmount) * 100).ParseToInt().ParseToString();
|
||||||
|
|
||||||
JObject jItemObj = new JObject();
|
JObject jItemObj = new JObject();
|
||||||
jItemObj["spuCode"] = OrderItem.product_id.ParseToString();
|
jItemObj["spuCode"] = OrderItem.product_id.ParseToString();
|
||||||
jItemObj["spuName"] = OrderItem.title;
|
jItemObj["spuName"] = OrderItem.title;
|
||||||
jItemObj["skuCode"] = OrderItem.sku_id.ParseToString();
|
jItemObj["skuCode"] = OrderItem.sku_id.ParseToString();
|
||||||
jItemObj["specInfo"] = OrderItem.sku_attr_str;
|
jItemObj["specInfo"] = OrderItem.SkuAttrStr;
|
||||||
jItemObj["skuUrl"] = OrderItem.thumb_img;
|
jItemObj["skuUrl"] = OrderItem.thumb_img;
|
||||||
jItemObj["picUrl"] = OrderItem.thumb_img;
|
jItemObj["picUrl"] = OrderItem.thumb_img;
|
||||||
jItemObj["returnQuantity"] = OrderItem.sku_cnt;
|
jItemObj["returnQuantity"] = OrderItem.sku_cnt;
|
||||||
@@ -199,7 +202,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
(jObj["orderDetailsList"] as JArray).Add(jItemObj);
|
(jObj["orderDetailsList"] as JArray).Add(jItemObj);
|
||||||
|
|
||||||
|
|
||||||
var returnOrders = OrderListCtrl.GetTransitReturnOrderList(OrderItem.order_id);
|
var returnOrders = await OrderGetOrderListHelper.GetTransitReturnOrderList(OrderItem.order_id);
|
||||||
OrderItem.DistribReturnOrderInfos = returnOrders;
|
OrderItem.DistribReturnOrderInfos = returnOrders;
|
||||||
if (btnAdd.Content.ToString() == "添 加" && OrderItem.DistribReturnOrderInfo == null)
|
if (btnAdd.Content.ToString() == "添 加" && OrderItem.DistribReturnOrderInfo == null)
|
||||||
{
|
{
|
||||||
@@ -211,18 +214,18 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
string msg = BaseRegex.GetStringXml(ref getTransitAfterSaleRst, "msg");
|
string msg = BaseRegex.GetStringXml(ref getTransitAfterSaleRst, "msg");
|
||||||
if (msg.IsNullOrEmpty())
|
if (msg.IsNullOrEmpty())
|
||||||
msg = getTransitAfterSaleRst;
|
msg = getTransitAfterSaleRst;
|
||||||
BaseMsgWindow.ShowError("中转仓退货订单添加失败,服务端返回 " + msg);
|
BaseMsgWindow.ShowError("订单 " + OrderItem.order_id + " 中转仓退货订单添加失败,服务端返回 " + msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
returnOrders = OrderListCtrl.GetTransitReturnOrderList(OrderItem.order_id);
|
returnOrders = await OrderGetOrderListHelper.GetTransitReturnOrderList(OrderItem.order_id);
|
||||||
OrderItem.DistribReturnOrderInfos = returnOrders;
|
OrderItem.DistribReturnOrderInfos = returnOrders;
|
||||||
var orderCode = OrderItem.DistribReturnOrderInfo.order_code;
|
var orderCode = OrderItem.DistribReturnOrderInfo.order_code;
|
||||||
if (string.IsNullOrEmpty(orderCode))
|
if (string.IsNullOrEmpty(orderCode))
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowError("中转仓退货订单创建失败,售后单获取失败");
|
BaseMsgWindow.ShowError("订单 " + OrderItem.order_id + " 中转仓退货订单创建失败,售后单获取失败");
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
await MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var createReturnOrderUrl = "https://po.e57.cn/prod-api/api/oms-api/api/distribution/returns/createReturnOrder";
|
var createReturnOrderUrl = "https://po.e57.cn/prod-api/api/oms-api/api/distribution/returns/createReturnOrder";
|
||||||
@@ -239,17 +242,17 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
if (msg.IsNullOrEmpty())
|
if (msg.IsNullOrEmpty())
|
||||||
msg = createReturnOrderRst;
|
msg = createReturnOrderRst;
|
||||||
BaseMsgWindow.ShowError("中转仓退货订单创建失败,服务端返回 " + msg);
|
BaseMsgWindow.ShowError("中转仓退货订单创建失败,服务端返回 " + msg);
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
await MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
await MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
StartUp.UpdateBalance();
|
StartUp.UpdateBalance();
|
||||||
BaseMsgWindow.ShowInfo("中转仓退货订单创建成功", "", this);
|
BaseMsgWindow.ShowInfo("中转仓退货订单创建成功", "", this);
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AddReturnOrder(oms_wei_order_item_info OrderItem)
|
public static async Task AddReturnOrder(oms_wei_order_item_info OrderItem)
|
||||||
{
|
{
|
||||||
// 订单不存在或已作废的,直接返回
|
// 订单不存在或已作废的,直接返回
|
||||||
if (OrderItem == null || OrderItem.ItemRefund == null)
|
if (OrderItem == null || OrderItem.ItemRefund == null)
|
||||||
@@ -310,14 +313,17 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
||||||
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
||||||
|
|
||||||
jObj["oemAmount"] = (BaseClass.RefundPostagePerOrderDiff * 100).ParseToInt().ParseToString();
|
jObj["parentOemId"] = BaseClass.ParentOemId;
|
||||||
jObj["firstWeightFee"] = ((basePostage + BaseClass.RefundPostagePerOrderDiff) * 100).ParseToInt().ParseToString();
|
jObj["parentOemAmount"] = (BaseClass.ParentRefundPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
jObj["oemId"] = BaseClass.OemId;
|
||||||
|
jObj["oemAmount"] = (BaseClass.RefundPostageOemAmount * 100).ParseToInt().ParseToString();
|
||||||
|
jObj["firstWeightFee"] = ((basePostage + BaseClass.ParentRefundPostageOemAmount + BaseClass.RefundPostageOemAmount) * 100).ParseToInt().ParseToString();
|
||||||
|
|
||||||
JObject jItemObj = new JObject();
|
JObject jItemObj = new JObject();
|
||||||
jItemObj["spuCode"] = OrderItem.product_id.ParseToString();
|
jItemObj["spuCode"] = OrderItem.product_id.ParseToString();
|
||||||
jItemObj["spuName"] = OrderItem.title;
|
jItemObj["spuName"] = OrderItem.title;
|
||||||
jItemObj["skuCode"] = OrderItem.sku_id.ParseToString();
|
jItemObj["skuCode"] = OrderItem.sku_id.ParseToString();
|
||||||
jItemObj["specInfo"] = OrderItem.sku_attr_str;
|
jItemObj["specInfo"] = OrderItem.SkuAttrStr;
|
||||||
jItemObj["skuUrl"] = OrderItem.thumb_img;
|
jItemObj["skuUrl"] = OrderItem.thumb_img;
|
||||||
jItemObj["picUrl"] = OrderItem.thumb_img;
|
jItemObj["picUrl"] = OrderItem.thumb_img;
|
||||||
jItemObj["returnQuantity"] = OrderItem.sku_cnt;
|
jItemObj["returnQuantity"] = OrderItem.sku_cnt;
|
||||||
@@ -325,7 +331,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
(jObj["orderDetailsList"] as JArray).Add(jItemObj);
|
(jObj["orderDetailsList"] as JArray).Add(jItemObj);
|
||||||
|
|
||||||
|
|
||||||
var returnOrders = OrderListCtrl.GetTransitReturnOrderList(OrderItem.order_id);
|
var returnOrders = await OrderGetOrderListHelper.GetTransitReturnOrderList(OrderItem.order_id);
|
||||||
OrderItem.DistribReturnOrderInfos = returnOrders;
|
OrderItem.DistribReturnOrderInfos = returnOrders;
|
||||||
if (OrderItem.DistribReturnOrderInfo == null)
|
if (OrderItem.DistribReturnOrderInfo == null)
|
||||||
{
|
{
|
||||||
@@ -337,18 +343,18 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
string msg = BaseRegex.GetStringXml(ref getTransitAfterSaleRst, "msg");
|
string msg = BaseRegex.GetStringXml(ref getTransitAfterSaleRst, "msg");
|
||||||
if (msg.IsNullOrEmpty())
|
if (msg.IsNullOrEmpty())
|
||||||
msg = getTransitAfterSaleRst;
|
msg = getTransitAfterSaleRst;
|
||||||
BaseMsgWindow.ShowAnimateMessage("中转仓退货订单添加失败,服务端返回 " + msg, "Error", 5);
|
BaseMsgWindow.ShowAnimateMessage("订单 " + OrderItem.order_id + " 中转仓退货订单添加失败,服务端返回 " + msg, "Error", 5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
returnOrders = OrderListCtrl.GetTransitReturnOrderList(OrderItem.order_id);
|
returnOrders = await OrderGetOrderListHelper.GetTransitReturnOrderList(OrderItem.order_id);
|
||||||
OrderItem.DistribReturnOrderInfos = returnOrders;
|
OrderItem.DistribReturnOrderInfos = returnOrders;
|
||||||
var orderCode = OrderItem.DistribReturnOrderInfo.order_code;
|
var orderCode = OrderItem.DistribReturnOrderInfo.order_code;
|
||||||
if (string.IsNullOrEmpty(orderCode))
|
if (string.IsNullOrEmpty(orderCode))
|
||||||
{
|
{
|
||||||
BaseMsgWindow.ShowAnimateMessage("中转仓退货订单创建失败,售后单获取失败", "Error", 5);
|
BaseMsgWindow.ShowAnimateMessage("订单 " + OrderItem.order_id + " 中转仓退货订单创建失败,售后单获取失败", "Error", 5);
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
await MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var createReturnOrderUrl = "https://po.e57.cn/prod-api/api/oms-api/api/distribution/returns/createReturnOrder";
|
var createReturnOrderUrl = "https://po.e57.cn/prod-api/api/oms-api/api/distribution/returns/createReturnOrder";
|
||||||
@@ -363,16 +369,16 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
string msg = BaseRegex.GetStringXml(ref createReturnOrderRst, "msg");
|
string msg = BaseRegex.GetStringXml(ref createReturnOrderRst, "msg");
|
||||||
if (msg.IsNullOrEmpty())
|
if (msg.IsNullOrEmpty())
|
||||||
msg = createReturnOrderRst;
|
msg = createReturnOrderRst;
|
||||||
BaseMsgWindow.ShowAnimateMessage("中转仓退货订单创建失败,服务端返回 " + msg, "Error", 5);
|
BaseMsgWindow.ShowAnimateMessage("订单 " + OrderItem.order_id + " 中转仓退货订单创建失败,服务端返回 " + msg, "Error", 5);
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
await MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
//MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
returnOrders = OrderListCtrl.GetTransitReturnOrderList(OrderItem.order_id);
|
returnOrders = await OrderGetOrderListHelper.GetTransitReturnOrderList(OrderItem.order_id);
|
||||||
OrderItem.DistribReturnOrderInfos = returnOrders;
|
OrderItem.DistribReturnOrderInfos = returnOrders;
|
||||||
StartUp.UpdateBalance();
|
StartUp.UpdateBalance();
|
||||||
BaseMsgWindow.ShowAnimateMessage("中转仓退货订单创建成功", "Msg", 2);
|
BaseMsgWindow.ShowAnimateMessage("订单 " + OrderItem.order_id + " 中转仓退货订单创建成功", "Msg", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnAddressAnalysis_Click(object sender, RoutedEventArgs e)
|
private void btnAddressAnalysis_Click(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
<!-- Framework assemblies not already implied by UseWindowsForms/UseWPF -->
|
<!-- Framework assemblies not already implied by UseWindowsForms/UseWPF -->
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Web.Services" />
|
<Reference Include="System.Web.Services" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
+31
-4
@@ -22,6 +22,8 @@ namespace AllBase
|
|||||||
#region oem贴牌参数
|
#region oem贴牌参数
|
||||||
public static string OemId { get; set; } = "";
|
public static string OemId { get; set; } = "";
|
||||||
public static string OemName { get; set; } = "";
|
public static string OemName { get; set; } = "";
|
||||||
|
public static string ParentOemId { get; set; } = "";
|
||||||
|
public static string ParentOemName { get; set; } = "";
|
||||||
public static bool IsOemOwner { get; set; } = false;
|
public static bool IsOemOwner { get; set; } = false;
|
||||||
public static string AgentName { get; set; } = "";
|
public static string AgentName { get; set; } = "";
|
||||||
public static string AgentCode { get; set; } = "";
|
public static string AgentCode { get; set; } = "";
|
||||||
@@ -31,15 +33,29 @@ namespace AllBase
|
|||||||
/// 礼品单oem额外价格
|
/// 礼品单oem额外价格
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static decimal OemGiftAmount { get; set; } = 0;
|
public static decimal OemGiftAmount { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 礼品单一级代理oem额外价格
|
||||||
|
/// </summary>
|
||||||
|
public static decimal ParentOemGiftAmount { get; set; } = 0;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本ID
|
/// 版本ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public static int VersionCount = 309;
|
public static int VersionCount = 397;
|
||||||
|
|
||||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
//public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||||
|
public static string ServerUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var url = "http://1.13.195.131:9000";
|
||||||
|
//if (Randomx.GetId(3) < 2)
|
||||||
|
// url = "http://119.45.29.75:9000";
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
}
|
||||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||||
|
|
||||||
|
|
||||||
@@ -203,10 +219,20 @@ namespace AllBase
|
|||||||
public static int ShopPointsPerMonth { get; set; } = 30;
|
public static int ShopPointsPerMonth { get; set; } = 30;
|
||||||
public static decimal RechargeAmountTotal { get; set; } = 0;
|
public static decimal RechargeAmountTotal { get; set; } = 0;
|
||||||
public static decimal Balance { get; set; } = 0;
|
public static decimal Balance { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 发货每笔费用
|
||||||
|
/// </summary>
|
||||||
public static decimal PostagePerOrder { get; set; } = 2.2m;
|
public static decimal PostagePerOrder { get; set; } = 2.2m;
|
||||||
public static decimal PostagePerOrderDiff { get { return Math.Max(0, PostagePerOrder - 2.2m); } }
|
static decimal? postageOemAmount = null;
|
||||||
|
public static decimal PostageOemAmount { set { postageOemAmount = value; } get { return postageOemAmount ?? Math.Max(0, PostagePerOrder - 2.2m); } }
|
||||||
|
public static decimal ParentPostageOemAmount { get; set; } = 0m;
|
||||||
|
/// <summary>
|
||||||
|
/// 退货每笔费用
|
||||||
|
/// </summary>
|
||||||
public static decimal RefundPostagePerOrder { get; set; } = 2.5m;
|
public static decimal RefundPostagePerOrder { get; set; } = 2.5m;
|
||||||
public static decimal RefundPostagePerOrderDiff { get { return Math.Max(0, RefundPostagePerOrder - 2.5m); } }
|
static decimal? refundPostageOemAmount = null;
|
||||||
|
public static decimal RefundPostageOemAmount { set { refundPostageOemAmount = value; } get { return refundPostageOemAmount ?? Math.Max(0, RefundPostagePerOrder - 2.5m); } }
|
||||||
|
public static decimal ParentRefundPostageOemAmount { get; set; } = 0m;
|
||||||
public static int AlimamaPageCount = 0;
|
public static int AlimamaPageCount = 0;
|
||||||
public static bool CloudTitle = false;
|
public static bool CloudTitle = false;
|
||||||
public static bool CloudBrand = false;
|
public static bool CloudBrand = false;
|
||||||
@@ -594,6 +620,7 @@ namespace AllBase
|
|||||||
|
|
||||||
public static string PassWordBak { get; set; }
|
public static string PassWordBak { get; set; }
|
||||||
public static string Mobile { get; set; }
|
public static string Mobile { get; set; }
|
||||||
|
public static bool AllowTraditionalBuyAddress { get; set; }
|
||||||
public static string ParentAuthority { get; set; }
|
public static string ParentAuthority { get; set; }
|
||||||
public static string ForbiddenPage { get; set; }
|
public static string ForbiddenPage { get; set; }
|
||||||
public static string UserAuthority { get; set; }
|
public static string UserAuthority { get; set; }
|
||||||
|
|||||||
@@ -150,11 +150,18 @@ namespace AllBase.Helper
|
|||||||
public static SolidColorBrush GrayBrush = new SolidColorBrush(Color.FromArgb(255, 127, 127, 127));
|
public static SolidColorBrush GrayBrush = new SolidColorBrush(Color.FromArgb(255, 127, 127, 127));
|
||||||
|
|
||||||
public static SolidColorBrush GreenTextBrush = new SolidColorBrush(Color.FromArgb(255, 103, 194, 58));
|
public static SolidColorBrush GreenTextBrush = new SolidColorBrush(Color.FromArgb(255, 103, 194, 58));
|
||||||
|
public static SolidColorBrush GreenTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 103, 194, 58));
|
||||||
|
public static SolidColorBrush GreenTextBrush26 = new SolidColorBrush(Color.FromArgb(26, 103, 194, 58));
|
||||||
public static SolidColorBrush RedTextBrush = new SolidColorBrush(Color.FromArgb(255, 250, 71, 51));
|
public static SolidColorBrush RedTextBrush = new SolidColorBrush(Color.FromArgb(255, 250, 71, 51));
|
||||||
public static SolidColorBrush RedTextBrush205 = new SolidColorBrush(Color.FromArgb(205, 250, 71, 51));
|
public static SolidColorBrush RedTextBrush205 = new SolidColorBrush(Color.FromArgb(205, 250, 71, 51));
|
||||||
public static SolidColorBrush RedTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 71, 51));
|
public static SolidColorBrush RedTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 71, 51));
|
||||||
|
public static SolidColorBrush RedTextBrush26 = new SolidColorBrush(Color.FromArgb(26, 250, 71, 51));
|
||||||
public static SolidColorBrush LightRedTextBrush = new SolidColorBrush(Color.FromArgb(255, 245, 108, 108));
|
public static SolidColorBrush LightRedTextBrush = new SolidColorBrush(Color.FromArgb(255, 245, 108, 108));
|
||||||
public static SolidColorBrush LightOrangeTextBrush = new SolidColorBrush(Color.FromArgb(255, 230, 162, 60));
|
public static SolidColorBrush LightOrangeTextBrush = new SolidColorBrush(Color.FromArgb(255, 230, 162, 60));
|
||||||
|
|
||||||
|
public static SolidColorBrush CyanBrush = new SolidColorBrush(Color.FromArgb(255, 3, 151, 181));
|
||||||
|
public static SolidColorBrush CyanBrush50 = new SolidColorBrush(Color.FromArgb(50, 3, 151, 181));
|
||||||
|
public static SolidColorBrush CyanBrush26 = new SolidColorBrush(Color.FromArgb(26, 3, 151, 181));
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+90
-2
@@ -1,10 +1,14 @@
|
|||||||
using System;
|
using CefSharp.DevTools.IO;
|
||||||
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
@@ -385,7 +389,7 @@ namespace AllBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BitmapImage LoadBitmipImageFromUrl(string url)
|
public static BitmapImage LoadBitmipImageFromUrl(string url, int? width = null, int? height = null)
|
||||||
{
|
{
|
||||||
BitmapImage bitmap = new BitmapImage();
|
BitmapImage bitmap = new BitmapImage();
|
||||||
|
|
||||||
@@ -398,6 +402,90 @@ namespace AllBase
|
|||||||
{
|
{
|
||||||
stream.Position = 0; // 重置流的位置到开始处
|
stream.Position = 0; // 重置流的位置到开始处
|
||||||
bitmap.BeginInit();
|
bitmap.BeginInit();
|
||||||
|
if (width != null && height != null)
|
||||||
|
{
|
||||||
|
bitmap.DecodePixelWidth = width.Value;
|
||||||
|
bitmap.DecodePixelHeight = height.Value;
|
||||||
|
}
|
||||||
|
bitmap.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
|
||||||
|
bitmap.CacheOption = BitmapCacheOption.OnLoad; // 或者使用 BitmapCacheOption.OnLoad 以减少内存使用
|
||||||
|
bitmap.UriSource = null; // 清除可能的旧UriSource,防止缓存问题
|
||||||
|
bitmap.StreamSource = stream;
|
||||||
|
bitmap.EndInit();
|
||||||
|
bitmap.Freeze(); // 防止后续更改,提高性能
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// 处理异常,例如打印错误信息或设置一个默认图片等
|
||||||
|
//Console.WriteLine("Error loading image: " + ex.Message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<BitmapImage> LoadBitmipImageFromUrlAsync(string url, int? width = null, int? height = null)
|
||||||
|
{
|
||||||
|
BitmapImage bitmap = new BitmapImage();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//using (WebClient webClient = new WebClient())
|
||||||
|
//{
|
||||||
|
//webClient.DownloadDataCompleted += (sender, e) =>
|
||||||
|
//{
|
||||||
|
// if (e.Cancelled)
|
||||||
|
// {
|
||||||
|
// //Console.WriteLine("下载已取消");
|
||||||
|
// bitmap = null;
|
||||||
|
// }
|
||||||
|
// else if (e.Error != null)
|
||||||
|
// {
|
||||||
|
// //Console.WriteLine("下载出错: " + e.Error.Message);
|
||||||
|
// bitmap = null;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// byte[] data = (byte[])e.Result;
|
||||||
|
// //string text = System.Text.Encoding.UTF8.GetString(data);
|
||||||
|
// //Console.WriteLine(text);
|
||||||
|
|
||||||
|
// // 下载图片数据到内存流
|
||||||
|
// using (MemoryStream stream = new MemoryStream(data))
|
||||||
|
// {
|
||||||
|
// stream.Position = 0; // 重置流的位置到开始处
|
||||||
|
// bitmap.BeginInit();
|
||||||
|
// if (width != null && height != null)
|
||||||
|
// {
|
||||||
|
// bitmap.DecodePixelWidth = width.Value;
|
||||||
|
// bitmap.DecodePixelHeight = height.Value;
|
||||||
|
// }
|
||||||
|
// bitmap.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
|
||||||
|
// bitmap.CacheOption = BitmapCacheOption.OnLoad; // 或者使用 BitmapCacheOption.OnLoad 以减少内存使用
|
||||||
|
// bitmap.UriSource = null; // 清除可能的旧UriSource,防止缓存问题
|
||||||
|
// bitmap.StreamSource = stream;
|
||||||
|
// bitmap.EndInit();
|
||||||
|
// bitmap.Freeze(); // 防止后续更改,提高性能
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//};
|
||||||
|
//await webClient.DownloadDataAsync(new Uri(url));
|
||||||
|
//}
|
||||||
|
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
// 下载图片数据到内存流
|
||||||
|
using (MemoryStream stream = new MemoryStream(await client.GetByteArrayAsync(url)))
|
||||||
|
{
|
||||||
|
stream.Position = 0; // 重置流的位置到开始处
|
||||||
|
bitmap.BeginInit();
|
||||||
|
if (width != null && height != null)
|
||||||
|
{
|
||||||
|
bitmap.DecodePixelWidth = width.Value;
|
||||||
|
//bitmap.DecodePixelHeight = height.Value;
|
||||||
|
}
|
||||||
bitmap.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
|
bitmap.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
|
||||||
bitmap.CacheOption = BitmapCacheOption.OnLoad; // 或者使用 BitmapCacheOption.OnLoad 以减少内存使用
|
bitmap.CacheOption = BitmapCacheOption.OnLoad; // 或者使用 BitmapCacheOption.OnLoad 以减少内存使用
|
||||||
bitmap.UriSource = null; // 清除可能的旧UriSource,防止缓存问题
|
bitmap.UriSource = null; // 清除可能的旧UriSource,防止缓存问题
|
||||||
|
|||||||
@@ -15,4 +15,19 @@ public class SettingConfig
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AutoSwitchGiftType { get; set; } = true;
|
public bool AutoSwitchGiftType { get; set; } = true;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 拍单
|
||||||
|
/// <summary>
|
||||||
|
/// 允许直发拍单
|
||||||
|
/// </summary>
|
||||||
|
public bool SwitchEnableDirectBuy { get; set; } = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 拼多多仓库订单使用随机繁体字
|
||||||
|
/// </summary>
|
||||||
|
public bool SwitchEnablePddTransitTraditionalAddress { get; set; } = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示使用随机繁体字配置(不显示则不可使用繁体字)
|
||||||
|
/// </summary>
|
||||||
|
public bool ShowEnablePddTransitTraditionalAddress { get; set; } = false;
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,15 @@ namespace AllBase.Model.DBModel
|
|||||||
public string LoginStatusStr
|
public string LoginStatusStr
|
||||||
{
|
{
|
||||||
get { return this.GetValue(x => x.LoginStatusStr); }
|
get { return this.GetValue(x => x.LoginStatusStr); }
|
||||||
set { this.SetValue(x => x.LoginStatusStr, value); }
|
set { this.SetValue(x => x.LoginStatusStr, value);
|
||||||
|
//LoginStatusStrColor = value == "在线" ? new SolidColorBrush(Color.FromRgb(50, 180, 50)) : new SolidColorBrush(Color.FromRgb(255, 50, 50));
|
||||||
|
LoginStatusStrColor = value == "在线" ? GlobalConfig.GreenTextBrush : GlobalConfig.RedTextBrush;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public SolidColorBrush LoginStatusStrColor
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.LoginStatusStrColor); }
|
||||||
|
set { this.SetValue(x => x.LoginStatusStrColor, value); }
|
||||||
}
|
}
|
||||||
public string LoginStatus
|
public string LoginStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,25 +28,93 @@ namespace AllBase.Model.DBModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 详细地址
|
/// 详细地址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TransDetailAddress { get; set; }
|
public string TransDetail { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 完整地址
|
||||||
|
/// </summary>
|
||||||
|
public string TransFullAddress { get; set; }
|
||||||
|
|
||||||
public int province_id { get; set; }
|
public int province_id { get; set; }
|
||||||
public int city_id { get; set; }
|
public int city_id { get; set; }
|
||||||
public int district_id { get; set; }
|
public int district_id { get; set; }
|
||||||
public string province_name { get;set; }
|
public string province_name { get;set; }
|
||||||
public string city_name { get; set; }
|
public string city_name { get; set; }
|
||||||
|
public string district_name { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TransitWarehouseData
|
public class TransitWarehouseData
|
||||||
{
|
{
|
||||||
|
public static Dictionary<string, string> dicWarehouseIdName = new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "XDYBJC", "北京仓" },
|
||||||
|
{ "XDYGZC", "广州仓" },
|
||||||
|
{ "XDYWHC", "武汉2仓" },
|
||||||
|
{ "XDYSHANDC", "山东2仓" },
|
||||||
|
{ "XDYSHC", "上海新仓" },
|
||||||
|
{ "XDYSZC", "深圳仓" },
|
||||||
|
{ "XDYYWC", "义乌仓" },
|
||||||
|
{ "XDYJJC", "晋江仓" },
|
||||||
|
{ "XDYCDC", "成都仓" },
|
||||||
|
{ "XDYCHONGQC", "重庆2仓" },
|
||||||
|
{ "XDYHEBC", "哈尔滨仓" },
|
||||||
|
{ "XDYXA", "西安仓" },
|
||||||
|
{ "XDYGYC", "贵阳仓" },
|
||||||
|
{ "XDYKMC", "昆明仓" },
|
||||||
|
{ "XDYSSC", "河北仓" },
|
||||||
|
{ "XDYZZC", "郑州仓" },
|
||||||
|
{ "XDYFJSSC", "福建仓" },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
public static string TransitWarehouseDataStr = @"
|
public static string TransitWarehouseDataStr = @"
|
||||||
XDYBJC ;北京仓 ;胡萍 ;18565773752 ;北京市顺义区光明街道滨河小区七区1号楼 ;2 ;52 ;511 ;北京市 ;北京市
|
XDYBJC ;北京仓 ;胡萍 ;18565773752 ;北京市顺义区光明街道滨河小区七区1号楼 ;2 ;52 ;511 ;北京市 ;北京市 ;顺义区 ;光明街道 ;滨河小区七区1号楼108室
|
||||||
XDYGZC ;广州仓 ;何外华 ;13826339849 ;广州市增城区朱村街道育山一路68号国际物流园 ;6 ;76 ;702 ;广东省 ;广州市
|
XDYGZC ;广州仓 ;何外华 ;13826339849 ;广州市增城区朱村街道育山一路68号国际物流园 ;6 ;76 ;702 ;广东省 ;广州市 ;增城区 ;朱村街道 ;育山一路68号国际物流园
|
||||||
XDYWHC ;武汉2仓 ;杨先生 ;13044121071 ;湖北省武汉市江汉区民族街道沿江大道轮渡龙王庙码头 ;13 ;180 ;1546 ;湖北省 ;武汉市
|
XDYWHC ;武汉2仓 ;杨先生 ;13044121071 ;湖北省武汉市江汉区民族街道沿江大道轮渡龙王庙码头 ;13 ;180 ;1546 ;湖北省 ;武汉市 ;江汉区 ;民族街道 ;沿江大道轮渡龙王庙码头
|
||||||
XDYSHANDC ;山东2仓 ;鸿鹄小申 ;13044121239 ;山东省临沂市费县南外环东转盘往东200米顺通快递有限公司(仓库二楼) ;22 ;292 ;2415 ;山东省 ;临沂市
|
XDYSHANDC ;山东2仓 ;鸿鹄小申 ;13044121239 ;山东省临沂市费县南外环东转盘往东200米顺通快递有限公司(仓库二楼) ;22 ;292 ;2415 ;山东省 ;临沂市 ;费县 ;费城街道 ;南外环东转盘往东200米顺通快递有限公司(仓库二楼)
|
||||||
XDYSHC ;上海新仓 ;纪先生 ;13044121150 ;上海市上海市普陀区真如镇街道真北路2653弄T区 ;25 ;321 ;2709 ;上海市 ;上海市
|
XDYSHC ;上海新仓 ;纪先生 ;13044121150 ;上海市徐汇区徐家汇街道虹桥路616号A座T区 ;25 ;321 ;2706 ;上海市 ;上海市 ;徐汇区 ;徐家汇街道 ;虹桥路616号A座
|
||||||
XDYSZC ;深圳仓 ;峰峰 ;15343351331 ;广东省东莞市凤岗镇浸校塘东良巷逸乐轩E栋5号楼 ;6 ;79 ;732 ;广东省 ;东莞市
|
XDYSZC ;深圳仓 ;峰峰 ;15343351331 ;广东省东莞市凤岗镇浸校塘东良巷逸乐轩E栋5号楼 ;6 ;79 ;732 ;广东省 ;东莞市 ;凤岗镇 ;凤岗街道 ;浸校塘东良巷逸乐轩E栋5号楼
|
||||||
XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市北苑街道西站大道妈妈商贸18号库39号楼誉达 ;31 ;386 ;3409 ;浙江省 ;金华市";
|
XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市后宅街道金城高尔夫二期别墅区401栋 ;31 ;386 ;3409 ;浙江省 ;金华市 ;义乌市 ;后宅街道 ;金城高尔夫二期别墅区401栋
|
||||||
|
XDYFJSSC ;福建仓 ;小张 ;13799125513 ;福建省泉州市晋江市青阳街道中堡电商园一栋 ;4 ;58 ;568 ;福建省 ;泉州市 ;晋江市 ;青阳街道 ;中堡电商园一栋";
|
||||||
|
|
||||||
|
public static Dictionary<char, List<char>> dicChineseNumberChar = new Dictionary<char, List<char>>()
|
||||||
|
{
|
||||||
|
{ '1', new List<char> { '一', '壹' } },
|
||||||
|
{ '2', new List<char> { '二', '贰' } },
|
||||||
|
{ '3', new List<char> { '三', '叁' } },
|
||||||
|
{ '4', new List<char> { '四', '肆' } },
|
||||||
|
{ '5', new List<char> { '五', '伍' } },
|
||||||
|
{ '6', new List<char> { '六', '陆' } },
|
||||||
|
{ '7', new List<char> { '七', '柒' } },
|
||||||
|
{ '8', new List<char> { '八', '捌' } },
|
||||||
|
{ '9', new List<char> { '九', '玖' } },
|
||||||
|
{ '0', new List<char> { '零', '〇' } },
|
||||||
|
{ '一', new List<char> { '壹' } },
|
||||||
|
{ '二', new List<char> { '贰' } },
|
||||||
|
{ '三', new List<char> { '叁' } },
|
||||||
|
{ '四', new List<char> { '肆' } },
|
||||||
|
{ '五', new List<char> { '伍' } },
|
||||||
|
{ '六', new List<char> { '陆' } },
|
||||||
|
{ '七', new List<char> { '柒' } },
|
||||||
|
{ '八', new List<char> { '捌' } },
|
||||||
|
{ '九', new List<char> { '玖' } },
|
||||||
|
{ '零', new List<char> { '〇' } },
|
||||||
|
};
|
||||||
|
|
||||||
|
// public static string TransitWarehouseDataStrTraditional = @"
|
||||||
|
//XDYBJC ;北京仓 ;胡萍 ;18565773752 ;北京市順義區光明街道濱河小區七區一號樓 ;2 ;52 ;511 ;北京市 ;北京市 ;顺义区 ;光明街道 ;濱河小區七區一號樓一零八室
|
||||||
|
//XDYGZC ;广州仓 ;何外华 ;13826339849 ;廣州市增城區朱村街道育山一路六八號國際物流園 ;6 ;76 ;702 ;广东省 ;广州市 ;增城区 ;朱村街道 ;育山一路六八號國際物流園
|
||||||
|
//XDYWHC ;武汉2仓 ;杨先生 ;13044121071 ;湖北省武漢市江漢區民族街道沿江大道輪渡龍王廟碼頭 ;13 ;180 ;1546 ;湖北省 ;武汉市 ;江汉区 ;民族街道 ;沿江大道輪渡龍王廟碼頭
|
||||||
|
//XDYSHANDC ;山东2仓 ;鸿鹄小申 ;13044121239 ;山東省臨沂市費縣南外環東轉盤往東二零零米順通快遞有限公司(倉庫二樓) ;22 ;292 ;2415 ;山东省 ;临沂市 ;费县 ;費城街道 ;南外環東轉盤往東二零零米順通快遞有限公司(倉庫二樓)
|
||||||
|
//XDYSHC ;上海新仓 ;纪先生 ;13044121150 ;上海市徐匯區徐家匯街道虹橋路六一六號A座 ;25 ;321 ;2706 ;上海市 ;上海市 ;徐汇区 ;徐家匯街道 ;虹橋路六一六號A座
|
||||||
|
//XDYSZC ;深圳仓 ;峰峰 ;15343351331 ;廣東省東莞市鳳崗鎮浸校塘東良巷逸樂軒E棟五號樓 ;6 ;79 ;732 ;广东省 ;东莞市 ;凤岗镇 ;鳳崗街道 ;浸校塘東良巷逸樂軒E棟五號樓
|
||||||
|
//XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市後宅街道金城高爾夫二期別墅區四零一棟 ;31 ;386 ;3409 ;浙江省 ;金华市 ;义乌市 ;後宅街道 ;金城高爾夫二期別墅區四零一棟
|
||||||
|
//XDYFJSSC ;福建仓 ;小张 ;13799125513 ;福建省泉州市晋江市青陽街道中堡電商園一棟 ;4 ;58 ;568 ;福建省 ;泉州市 ;晋江市 ;青陽街道 ;中堡電商園一棟";
|
||||||
|
|
||||||
|
//XDYSHC ;上海新仓 ;纪先生 ;13044121150 ;上海市上海市徐汇区徐家汇街道虹桥路616号A座 ;25 ;321 ;2706 ;上海市 ;上海市 ;徐汇区 ;徐家汇街道 ;虹桥路616号A座
|
||||||
|
//XDYSHC ;上海新仓 ;纪先生 ;13044121150 ;上海市上海市普陀区真如镇街道真北路2653弄T区 ;25 ;321 ;2709 ;上海市 ;上海市 ;普陀区 ;真如镇街道 ;真北路2653弄T区
|
||||||
|
//XDYFJSSC 石狮仓 福建省/泉州市/晋江市青阳街道中堡电商园一栋
|
||||||
|
//XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市北苑街道西站大道妈妈商贸18号库39号楼誉达 ;31 ;386 ;3409 ;浙江省 ;金华市 ;义乌市 ;北苑街道 ;西站大道妈妈商贸18号库39号楼誉达
|
||||||
//XDYJJC ;晋江仓 ;安群 ;19905951984 ;福建省泉州市南安市霞美镇温山村431号鸿鹄大厦 ;4 ;58 ;569 ;福建省 ;泉州市
|
//XDYJJC ;晋江仓 ;安群 ;19905951984 ;福建省泉州市南安市霞美镇温山村431号鸿鹄大厦 ;4 ;58 ;569 ;福建省 ;泉州市
|
||||||
//XDYCDC ;成都仓 ;谢春虹 ;15828201479 ;四川省资阳市乐至县仙鹤大道桑都街15-19号仓库(不要放驿站,送到仓库) ;26 ;340 ;2898 ;四川省 ;资阳市
|
//XDYCDC ;成都仓 ;谢春虹 ;15828201479 ;四川省资阳市乐至县仙鹤大道桑都街15-19号仓库(不要放驿站,送到仓库) ;26 ;340 ;2898 ;四川省 ;资阳市
|
||||||
//XDYCHONGQC ;重庆2仓 ;翁桂柱 ;18923911055 ;重庆市九龙坡区中梁山街道云飞九龙香山(二纵线东50米)重庆九龙坡区渝州公司 ;32 ;394 ;3339
|
//XDYCHONGQC ;重庆2仓 ;翁桂柱 ;18923911055 ;重庆市九龙坡区中梁山街道云飞九龙香山(二纵线东50米)重庆九龙坡区渝州公司 ;32 ;394 ;3339
|
||||||
@@ -88,12 +156,14 @@ XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市北
|
|||||||
TransName = arr[1].Trim(),
|
TransName = arr[1].Trim(),
|
||||||
TransUserName = arr[2].Trim(),
|
TransUserName = arr[2].Trim(),
|
||||||
TransMobile = arr[3].Trim(),
|
TransMobile = arr[3].Trim(),
|
||||||
TransDetailAddress = arr[4].Trim(),
|
TransDetail = arr[12].Trim(),
|
||||||
|
TransFullAddress = arr[4].Trim(),
|
||||||
province_id = arr[5].Trim().ParseToInt(),
|
province_id = arr[5].Trim().ParseToInt(),
|
||||||
city_id = arr[6].Trim().ParseToInt(),
|
city_id = arr[6].Trim().ParseToInt(),
|
||||||
district_id = arr[7].Trim().ParseToInt(),
|
district_id = arr[7].Trim().ParseToInt(),
|
||||||
province_name = arr[8].Trim(),
|
province_name = arr[8].Trim(),
|
||||||
city_name = arr[9].Trim(),
|
city_name = arr[9].Trim(),
|
||||||
|
district_name = arr[10].Trim(),
|
||||||
};
|
};
|
||||||
transitWarehouseList.Add(tw);
|
transitWarehouseList.Add(tw);
|
||||||
}
|
}
|
||||||
@@ -105,5 +175,7 @@ XDYYWC ;义乌仓 ;小田 ;19058117371 ;浙江省金华市义乌市北
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static List<TransitWarehouseParam> transitWarehouseTList = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,5 +97,26 @@ namespace AllBase.Model.DBModel
|
|||||||
/// 下游快递公司编码
|
/// 下游快递公司编码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string downstream_express_code { get; set; }
|
public string downstream_express_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 订单初始费用(分)
|
||||||
|
/// </summary>
|
||||||
|
public int? postage { get; set; }
|
||||||
|
public DateTime? pickup_time { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 货架号
|
||||||
|
/// </summary>
|
||||||
|
public string location_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 货架写入时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? location_write_time { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 1商品退货包裹2额外退货包裹
|
||||||
|
/// </summary>
|
||||||
|
public int? pack_type { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 作废状态 1作废成功 2作废失败
|
||||||
|
/// </summary>
|
||||||
|
public int? order_void_status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
using AllBase.Model.MvvmBaseClasses;
|
using AllBase.Helper;
|
||||||
|
using AllBase.Model.MvvmBaseClasses;
|
||||||
|
using NaiBa.Util.Extension;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
namespace AllBase.Model.DBModel
|
namespace AllBase.Model.DBModel
|
||||||
{
|
{
|
||||||
@@ -11,18 +14,54 @@ namespace AllBase.Model.DBModel
|
|||||||
{
|
{
|
||||||
public string OutOrderNumStr
|
public string OutOrderNumStr
|
||||||
{
|
{
|
||||||
get { return out_order_no; }
|
get {
|
||||||
set { }
|
if (this.order_no == "3739906242901888256")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
return this.GetValue(x => x.OutOrderNumStr);
|
||||||
|
}
|
||||||
|
set { this.SetValue(x => x.OutOrderNumStr, value); }
|
||||||
}
|
}
|
||||||
public string OutOrderBuyerStr
|
public string OutOrderBuyerStr
|
||||||
{
|
{
|
||||||
get { return buyer_account; }
|
get { return this.GetValue(x => x.OutOrderBuyerStr); }
|
||||||
set { }
|
set { this.SetValue(x => x.OutOrderBuyerStr, value); }
|
||||||
|
}
|
||||||
|
public string OutOrderBuyerIdStr
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.OutOrderBuyerIdStr); }
|
||||||
|
set { this.SetValue(x => x.OutOrderBuyerIdStr, value); }
|
||||||
|
}
|
||||||
|
public void SetOutOrderBuyerStr()
|
||||||
|
{
|
||||||
|
if (!out_order_no.ParseToString().StartsWith("tb_"))
|
||||||
|
{
|
||||||
|
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_id == buyer_account);
|
||||||
|
OutOrderBuyerStr = buyer?.buyer_name ?? buyer_account;
|
||||||
|
OutOrderBuyerIdStr = buyer?.buyer_id ?? buyer_account;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var buyer = GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(b => b.buyer_id == buyer_account);
|
||||||
|
OutOrderBuyerStr = buyer?.buyer_name ?? buyer_account;
|
||||||
|
OutOrderBuyerIdStr = buyer?.buyer_id ?? buyer_account;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public long id { get; set; }
|
public long id { get; set; }
|
||||||
public string out_order_no { get; set; }
|
public string out_order_no
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.out_order_no); }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (this.order_no == "3739906242901888256")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
this.SetValue(x => x.out_order_no, value); OutOrderNumStr = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
public string order_no { get; set; }
|
public string order_no { get; set; }
|
||||||
public string order_sku_id { get; set; }
|
public string order_sku_id { get; set; }
|
||||||
public string buyer_account { get; set; }
|
public string buyer_account { get; set; }
|
||||||
@@ -119,5 +158,29 @@ namespace AllBase.Model.DBModel
|
|||||||
/// 拦截退回操作信息/回调信息
|
/// 拦截退回操作信息/回调信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string intercept_return_info { get; set; }
|
public string intercept_return_info { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否手动发货:0自动发货,1手动发货
|
||||||
|
/// </summary>
|
||||||
|
public int is_manual_shipment { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 手动发货处理状态:0未处理,1成功,2失败
|
||||||
|
/// </summary>
|
||||||
|
public int? manual_shipment_status { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 货架号
|
||||||
|
/// </summary>
|
||||||
|
public string location_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 货架写入时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? location_write_time { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 虚拟快递单号
|
||||||
|
/// </summary>
|
||||||
|
public string virtual_waybill_no { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 虚拟快递公司
|
||||||
|
/// </summary>
|
||||||
|
public string virtual_express_company { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded 100 of 230 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user