ZZJ
2022-06-01 f3bf27d9bc7c8c6484be4f37edcc57df5490ecbe
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<template>
  <div class="OserDetail">
    <div class="header">
      <span class="iconfont" @click="back">&#xe62c;</span> 订单详情
    </div>
    <div class="content">
      <div class="title">基本信息</div>
      <div class="infoArea">
        <div class="infoItem">
          <div class="label">订单编号</div>
          <div class="data">{{ orderInfo.sn }}</div>
        </div>
        <div class="infoItem">
          <div class="label">创建时间</div>
          <div class="data">{{ orderInfo.createTime }}</div>
        </div>
        <div class="infoItem">
          <div class="label">创建人</div>
          <div class="data">{{ orderInfo.createUserName }}</div>
        </div>
        <div class="infoItem">
          <div class="label">付款方式</div>
          <div class="data" v-if="orderInfo.payMethod == 0">线下付款</div>
          <div class="data" v-if="orderInfo.payMethod == 1">支付宝</div>
          <div class="data" v-if="orderInfo.payMethod == 2">微信</div>
        </div>
        <div class="infoItem">
          <div class="label">订单状态</div>
          <div class="data" v-if="orderInfo.orderStatus == -1">已取消</div>
          <div class="data" v-if="orderInfo.orderStatus == 0">未下单</div>
          <div class="data" v-if="orderInfo.orderStatus == 1">待支付</div>
          <div class="data" v-if="orderInfo.orderStatus == 2">已支付</div>
          <div class="data" v-if="orderInfo.orderStatus == 11">
            支付凭证待审核
          </div>
        </div>
        <div class="infoItem">
          <div class="label">订单金额</div>
          <div class="data">{{ orderInfo.orderMoney }}</div>
        </div>
      </div>
    </div>
 
    <div class="content">
      <div class="title">订单详情</div>
      <div class="table-area">
        <el-table
          id="multipleTable"
          ref="multipleTable"
          :data="orderInfo.products"
          tooltip-effect="dark"
          :fit="true"
        >
          <el-table-column
            prop="productName"
            label="产品名称"
          ></el-table-column>
          <el-table-column
            prop="productTypeName"
            label="产品类型"
          ></el-table-column>
          <el-table-column prop="productVersion" label="版本号">
          </el-table-column>
          <el-table-column prop="setting" label="配置详情" min-width="133">
            <template slot-scope="scope">
              <div style="text-align: left">
                <p
                  v-if="
                    scope.row.productType != 3 &&
                    scope.row.productType != 4 &&
                    scope.row.modules &&
                    scope.row.modules.length
                  "
                >
                  模块:
                  <span v-for="item in scope.row.modules" :key="item">{{
                    item + " "
                  }}</span>
                </p>
                <p v-if="scope.row.productBaseDetail.hasChUnitPrice">
                  通道数量:
                  <span>{{ scope.row.ChCount }}</span>
                </p>
                <p v-if="scope.row.productBaseDetail.hasAuthPrice">
                  授权数量:
                  <span>{{ scope.row.authCount }}</span>
                </p>
                <p
                  v-if="
                    scope.row.productType != 3 &&
                    scope.row.productType != 4 &&
                    scope.row.sdks &&
                    scope.row.sdks.length
                  "
                >
                  算法:
                  <span v-for="item in scope.row.sdks" :key="item">{{
                    item + " "
                  }}</span>
                </p>
                <p>
                  服务时长:
                  <span>{{ scope.row.serveYear + "年" }}</span>
                </p>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="devCount" label="数量"></el-table-column>
          <el-table-column label="服务起止时间" min-width="178">
            <template slot-scope="scope">
              <div class="row">起:{{ orderInfo.createTime }}</div>
              <div class="row">止:{{ getEndYear(scope.row.serveYear) }}</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="productPrice"
            label="产品金额"
          ></el-table-column>
          <el-table-column label="划线金额">
            <template slot-scope="scope">
              {{ scope.row.productPrice * 1.2 }}
            </template>
          </el-table-column>
          <el-table-column label="总计">
            <template slot-scope="scope">
              {{ scope.row.productPrice * scope.row.devCount }}
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
 
    <div class="content">
      <div class="title">支付信息</div>
      <div class="table-area">
        <el-table
          id="multipleTable"
          ref="multipleTable"
          :data="payInfo"
          tooltip-effect="dark"
          :fit="true"
        >
          <el-table-column label="支付渠道">
            <template slot-scope="scope">
              <div v-if="scope.row.payMethod == 1">线下汇款</div>
              <div v-if="scope.row.payMethod == 2">支付宝</div>
              <div v-if="scope.row.payMethod == 3">微信</div>
            </template>
          </el-table-column>
          <el-table-column prop="updateTime" label="付款时间"></el-table-column>
          <el-table-column prop="payMoney" label="付款金额"></el-table-column>
          <el-table-column prop="payAccount" label="付款账号"></el-table-column>
          <el-table-column
            prop="payUser"
            label="付款单位/姓名"
          ></el-table-column>
          <el-table-column label="付款凭证">
            <template slot-scope="scope">
              <div class="link" @click="openImg(scope.row.appendix)">
                查看订单详情
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="status" label="审核状态">
            <template> - </template>
          </el-table-column>
          <el-table-column label="操作">
            <template> - </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>
 
<script>
import { devInfoStatistic } from "@/api/order";
export default {
  created() {
    this.getOrderInfo();
  },
  data() {
    return {
      orderInfo: {},
      payInfo: [],
    };
  },
  methods: {
    back() {
      this.$router.back();
    },
    async getOrderInfo() {
      const res = await devInfoStatistic(this.$route.query.id);
      if (res && res.success) {
        this.orderInfo = res.data.orderInfo;
        this.payInfo = res.data.orderInfo.payCerts.map((item) => {
          return {
            appendix: item.appendix,
            payMethod: res.data.orderInfo.payMethod,
            payTime: res.data.orderInfo.payTime,
            updateTime: item.updateTime,
            payAccount: item.payAccount,
            payMoney: item.payMoney,
            payUser: item.payUser,
            tradeNo: res.data.orderInfo.tradeNo,
            orderStatus: res.data.orderInfo.orderStatus,
          };
        });
      }
    },
    getEndYear(years) {
      let dateList = this.orderInfo.createTime.split("-");
      dateList[0] = parseInt(dateList[0]) + parseInt(years);
      return dateList.join("-");
    },
    openImg(url) {
      var reg = /^[0-9]/;
      if (!reg.test(url)) {
        window.open(url);
        return;
      }
      window.open("http://" + url);
    },
  },
};
</script>
 
<style lang="scss" scoped>
.OserDetail {
  background-color: rgb(243, 245, 248);
  .header {
    margin-bottom: 24px;
    padding: 0 24px;
    height: 50px;
    font-size: 16px;
    color: #666666;
    line-height: 50px;
    background: #ffffff;
    vertical-align: middle;
    font-weight: 700;
 
    .iconfont {
      margin-right: 10px;
      font-size: 18px;
      cursor: pointer;
    }
  }
 
  .content {
    margin: 0 24px 24px 24px;
    padding: 20px;
    background-color: #fff;
 
    .title {
      padding-left: 10px;
      height: 20px;
      font-size: 16px;
      font-weight: 700;
      color: #3d3d3d;
      border-left: 4px solid #0064ff;
    }
 
    .infoArea {
      display: flex;
      flex-wrap: wrap;
 
      .infoItem {
        display: flex;
        margin-top: 30px;
        width: 320px;
        font-size: 14px;
        color: #3d3d3d;
        font-weight: 700;
 
        .label {
          width: 90px;
          font-weight: 400;
          color: #666666;
        }
      }
    }
 
    .link {
      color: #0064ff;
      cursor: pointer;
    }
  }
}
</style>