Authored by lzhy

一件代发

  1 +import ReturnedListTable from './returned-list-table';
  2 +import ReturnedGoodsInfo from './returned-goods-info';
  3 +import ModalReject from './modal-reject';
  4 +
  5 +export { ReturnedListTable, ReturnedGoodsInfo, ModalReject };
  1 +<template>
  2 + <Modal v-model="showModal" :title="title" width="600">
  3 + <div class="deliver-modal">
  4 + <div class="deliver-info">
  5 + <Row class-name="info-row">
  6 + <Col span="5" class-name="info-col">拒绝原因*:</Col>
  7 + <Col span="19">
  8 + <Select v-model="rejectReason">
  9 + <Option v-for="(item, idx) in refuseReasonList" :key="idx" :value="item.id">
  10 + {{ item.reason }}
  11 + </Option>
  12 + </Select>
  13 + </Col>
  14 + </Row>
  15 + </div>
  16 + </div>
  17 + <div slot="footer">
  18 + <Button type="text" size="large" @click="hide">取消</Button>
  19 + <Button type="primary" size="large" :loading="showLoading" @click="submit()">提交</Button>
  20 + </div>
  21 + </Modal>
  22 +</template>
  23 +
  24 +<script>
  25 +export default {
  26 + name: 'ModalReject',
  27 + data() {
  28 + return {
  29 + rejectReason: 0,
  30 + title: '商家驳回售后申请',
  31 + showModal: false,
  32 + showLoading: false,
  33 + refuseReasonList: [],
  34 + };
  35 + },
  36 + methods: {
  37 + show(refuseReasonList) {
  38 + this.showModal = true;
  39 + this.refuseReasonList = refuseReasonList;
  40 + },
  41 + hide() {
  42 + this.showLoading = false;
  43 + this.showModal = false;
  44 + },
  45 + //提交
  46 + submit() {
  47 + this.showLoading = true;
  48 + this.$emit('submitReject', this.rejectReason);
  49 + },
  50 + },
  51 +};
  52 +</script>
  53 +
  54 +<style lang="scss">
  55 +.deliver-modal {
  56 + padding: 30px;
  57 +
  58 + .info-row {
  59 + line-height: 40px;
  60 + }
  61 +
  62 + .info-tip {
  63 + margin-top: 20px;
  64 + color: #f00;
  65 + text-align: center;
  66 + }
  67 +
  68 + .ivu-modal {
  69 + width: 50%;
  70 + }
  71 +}
  72 +</style>
  1 +<template>
  2 + <table cellspacing="0" cellpadding="0" class="order-table">
  3 + <thead>
  4 + <tr>
  5 + <template v-for="(cols, index) in tableCols">
  6 + <th :key="index" :style="'width:' + cols.width">{{ cols.title }}</th>
  7 + </template>
  8 + </tr>
  9 + </thead>
  10 + <tbody>
  11 + <template v-for="(item, index) in tableData">
  12 + <tr :key="index">
  13 + <td colspan="12" style="text-align: left">
  14 + <span>订单号:{{ item.orderCode }}</span>
  15 + <span>父订单号:{{ item.parentOrderCode }}</span>
  16 + <span>创建时间:{{ item.createTime }}</span>
  17 + </td>
  18 + </tr>
  19 + <template v-for="(goods, key) in item.returnedGoodsListBoArray">
  20 + <tr :key="key">
  21 + <td>
  22 + <img
  23 + :src="
  24 + 'http://shopmanage.yohobuy.com/platform/product/getRemoteImageUrlBySku?sku_id=' +
  25 + goods.productSku +
  26 + '&size=40x60'
  27 + "
  28 + />
  29 + </td>
  30 + <td style="text-align: left">
  31 + <p>{{ goods.prodcutName }}</p>
  32 + <p>{{ goods.prodcutCode }}</p>
  33 + <p>尺码:{{ goods.sizeName }} 颜色:{{ goods.colorName }}</p>
  34 + </td>
  35 + <td>{{ goods.lastPrice }}</td>
  36 + <td>{{ goods.buyNums }}</td>
  37 + <td>{{ goods.productSkn }}</td>
  38 + <td>{{ goods.productSku }}</td>
  39 + <template v-if="key == 0">
  40 + <td :rowspan="item.returnedGoodsListBoArray.length">{{ item.consigneeName }}</td>
  41 + <td :rowspan="item.returnedGoodsListBoArray.length">{{ item.paymentStatus }}</td>
  42 + <td :rowspan="item.returnedGoodsListBoArray.length">{{ item.realAmount }}</td>
  43 + <td :rowspan="item.returnedGoodsListBoArray.length">{{ item.orderStatus }}</td>
  44 + <td :rowspan="item.returnedGoodsListBoArray.length">
  45 + <i-button type="default" size="small" @click="goToDetail(item.orderCode)">查看订单</i-button>
  46 + <i-button type="primary" size="small" @click="goToHandle(item.id, item.orderCode)">处理</i-button>
  47 + </td>
  48 + </template>
  49 + </tr>
  50 + </template>
  51 + </template>
  52 + </tbody>
  53 + </table>
  54 +</template>
  55 +
  56 +<script>
  57 +export default {
  58 + name: 'ReturnedListTable',
  59 + props: ['tableData'],
  60 + data() {
  61 + return {
  62 + tableCols: [
  63 + { title: '图片', width: '8%' },
  64 + { title: '商品信息', width: '20%' },
  65 + { title: '单价', width: '8%' },
  66 + { title: '数量', width: '5%' },
  67 + { title: 'SKN', width: '5%' },
  68 + { title: 'SKU', width: '5%' },
  69 + { title: '收货人', width: '5%' },
  70 + { title: '支付状态', width: '5%' },
  71 + { title: '实收金额', width: '5%' },
  72 + { title: '订单状态', width: '5%' },
  73 + { title: '操作', width: '10%' },
  74 + ],
  75 + };
  76 + },
  77 + methods: {
  78 + goToDetail(code) {
  79 + this.$router.push({
  80 + name: 'order.detail',
  81 + params: {},
  82 + query: {
  83 + orderCode: code,
  84 + },
  85 + });
  86 + },
  87 + goToHandle(operateId, code) {
  88 + this.$router.push({
  89 + name: 'order.returned.operate',
  90 + params: {},
  91 + query: {
  92 + id: operateId,
  93 + orderCode: code,
  94 + },
  95 + });
  96 + },
  97 + },
  98 +};
  99 +</script>
  100 +<style lang="scss">
  101 +table.order-table {
  102 + width: 100%;
  103 + height: auto;
  104 + thead {
  105 + background: #000000;
  106 + th {
  107 + padding: 8px 0;
  108 + border: 1px solid #cccccc;
  109 + color: #ffffff;
  110 + text-align: center;
  111 + }
  112 + }
  113 + tbody {
  114 + tr {
  115 + height: 35px;
  116 + td {
  117 + border: 1px solid #cccccc;
  118 + border-top: none;
  119 + border-right: none;
  120 + text-align: center;
  121 + padding: 5px;
  122 + span {
  123 + margin-left: 10px;
  124 + margin-right: 20px;
  125 + }
  126 + }
  127 + td:last-child {
  128 + border-right: 1px solid #cccccc;
  129 + }
  130 + }
  131 + }
  132 +}
  133 +</style>