Blame view

application/admin/view/antis/yonyou_bip/test.html 6.76 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
  <link href="__CDN__/assets/addons/antis/css/common.css?v={$Think.config.site.version}" rel="stylesheet">
  
  <style>
      .test-panel {
          margin-bottom: 20px;
      }
      .config-info {
          background: #f5f5f5;
          padding: 15px;
          border-radius: 4px;
          margin-bottom: 20px;
      }
      .config-item {
          margin-bottom: 10px;
      }
      .config-label {
          font-weight: bold;
          display: inline-block;
          width: 150px;
      }
      .status-badge {
          display: inline-block;
          padding: 3px 8px;
          border-radius: 3px;
          font-size: 12px;
      }
      .status-success {
          background: #5cb85c;
          color: white;
      }
      .status-warning {
          background: #f0ad4e;
          color: white;
      }
      .status-danger {
          background: #d9534f;
          color: white;
      }
      .test-section {
          margin-top: 30px;
          padding-top: 20px;
          border-top: 1px solid #ddd;
      }
      .btn-test {
          margin-right: 10px;
      }
  </style>
  
  <div class="panel panel-default panel-intro">
      <div class="panel-heading">
          <h3 class="panel-title">用友BIP集成测试页面</h3>
      </div>
      <div class="panel-body">
          
          <!-- 配置信息 -->
          <div class="test-panel">
              <h4>配置信息</h4>
              <div class="config-info">
                  <div class="config-item">
                      <span class="config-label">服务地址:</span>
                      <span>{$config.base_url|default='未配置'}</span>
                  </div>
                  <div class="config-item">
                      <span class="config-label">AppKey:</span>
                      <span>{$config.app_key|default='未配置'}</span>
                  </div>
                  <div class="config-item">
                      <span class="config-label">AppSecret:</span>
                      <span>{$config.app_secret|default='未配置'}</span>
                  </div>
                  <div class="config-item">
                      <span class="config-label">租户ID:</span>
                      <span>{$config.tenant_id|default='未配置'}</span>
                  </div>
              </div>
              
              <button type="button" class="btn btn-primary btn-test" id="btn-test-connection">
                  <i class="fa fa-plug"></i> 测试连接
              </button>
              <button type="button" class="btn btn-success btn-test" id="btn-sync-base-data">
                  <i class="fa fa-refresh"></i> 同步基础数据
              </button>
          </div>
  
          <!-- 订单同步测试 -->
          <div class="test-section">
              <h4>销售订单同步测试</h4>
              
              <div class="table-responsive">
                  <table id="order-table" class="table table-striped table-bordered table-hover">
                      <thead>
                          <tr>
                              <th width="50"><input type="checkbox" id="checkAll"></th>
                              <th>订单编号</th>
                              <th>客户名称</th>
                              <th>订单日期</th>
                              <th>订单金额</th>
                              <th>同步状态</th>
                              <th>操作</th>
                          </tr>
                      </thead>
                      <tbody>
                          {volist name="orderList" id="order"}
                          <tr>
                              <td><input type="checkbox" class="order-checkbox" value="{$order.id}"></td>
                              <td>{$order.purchase_code|default='-'}</td>
                              <td>
                                  {if condition="isset($order.customers) && !empty($order.customers)"}
                                      {$order.customers.customer_name|default='-'}
                                  {else/}
                                      -
                                  {/if}
                              </td>
                              <td>
                                  {if condition="isset($order.purchase_time) && !empty($order.purchase_time)"}
                                      {if condition="is_numeric($order.purchase_time)"}
                                          {$order.purchase_time|date='Y-m-d H:i:s',###}
                                      {else/}
                                          {$order.purchase_time}
                                      {/if}
                                  {else/}
                                      -
                                  {/if}
                              </td>
                              <td>{$order.all_money|default=0}</td>
                              <td>
                                  {if condition="isset($order.bip_sync_status) && $order.bip_sync_status == 1"}
                                  <span class="status-badge status-success">已同步</span>
                                  {else/}
                                  <span class="status-badge status-warning">未同步</span>
                                  {/if}
                              </td>
                              <td>
                                  <button type="button" class="btn btn-xs btn-primary btn-sync-single" data-id="{$order.id}">
                                      <i class="fa fa-cloud-upload"></i> 同步
                                  </button>
                                  <button type="button" class="btn btn-xs btn-info btn-check-status" data-id="{$order.id}">
                                      <i class="fa fa-info-circle"></i> 状态
                                  </button>
                              </td>
                          </tr>
                          {/volist}
                          {empty name="orderList"}
                          <tr>
                              <td colspan="7" class="text-center text-muted">暂无订单数据</td>
                          </tr>
                          {/empty}
                      </tbody>
                  </table>
              </div>
              
              <div style="margin-top: 15px;">
                  <button type="button" class="btn btn-success" id="btn-sync-selected">
                      <i class="fa fa-cloud-upload"></i> 同步选中订单
                  </button>
                  <button type="button" class="btn btn-info" id="btn-refresh">
                      <i class="fa fa-refresh"></i> 刷新列表
                  </button>
              </div>
          </div>
  
          <!-- 日志显示区域 -->
          <div class="test-section">
              <h4>操作日志</h4>
              <div id="log-area" style="background: #f5f5f5; padding: 15px; border-radius: 4px; max-height: 300px; overflow-y: auto;">
                  <p class="text-muted">等待操作...</p>
              </div>
          </div>
  
      </div>
  </div>
  
  <script src="__CDN__/assets/js/backend/antis/yonyou_bip/test.js?v={$Think.config.site.version}"></script>