From 4711a8556c09f13c37ce45135902b613255c968d Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Mon, 6 Aug 2018 23:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9F=BA=E7=A1=80=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E3=80=81DetailList=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/detail/BasicDetail.vue | 200 +++++++++++++++++++++++++- src/components/tool/DetailList.vue | 102 +++++++++++++ 2 files changed, 296 insertions(+), 6 deletions(-) create mode 100644 src/components/tool/DetailList.vue diff --git a/src/components/detail/BasicDetail.vue b/src/components/detail/BasicDetail.vue index 85b7e18..da227ee 100644 --- a/src/components/detail/BasicDetail.vue +++ b/src/components/detail/BasicDetail.vue @@ -1,9 +1,36 @@ @@ -12,12 +39,173 @@ import ACard from 'vue-antd-ui/es/card/Card' import ATooltip from 'vue-antd-ui/es/tooltip/Tooltip' import AAvatar from 'vue-antd-ui/es/avatar/Avatar' +import DetailList from '../tool/DetailList' +import ADivider from 'vue-antd-ui/es/divider/index' +import ATable from 'vue-antd-ui/es/table' + +const DetailListItem = DetailList.Item + +const goodsColumns = [ + { + title: '商品编号', + dataIndex: 'id', + key: 'id' + }, + { + title: '商品名称', + dataIndex: 'name', + key: 'name' + }, + { + title: '商品条码', + dataIndex: 'barcode', + key: 'barcode' + }, + { + title: '单价', + dataIndex: 'price', + key: 'price', + align: 'right' + }, + { + title: '数量(件)', + dataIndex: 'num', + key: 'num', + align: 'right' + }, + { + title: '金额', + dataIndex: 'amount', + key: 'amount', + align: 'right' + } +] + +const goodsData = [ + { + id: '1234561', + name: '矿泉水 550ml', + barcode: '12421432143214321', + price: '2.00', + num: '1', + amount: '2.00' + }, + { + id: '1234562', + name: '凉茶 300ml', + barcode: '12421432143214322', + price: '3.00', + num: '2', + amount: '6.00' + }, + { + id: '1234563', + name: '好吃的薯片', + barcode: '12421432143214323', + price: '7.00', + num: '4', + amount: '28.00' + }, + { + id: '1234564', + name: '特别好吃的蛋卷', + barcode: '12421432143214324', + price: '8.50', + num: '3', + amount: '25.50' + } +] + +const scheduleColumns = [ + { + title: '时间', + dataIndex: 'time', + key: 'time' + }, + { + title: '当前进度', + dataIndex: 'rate', + key: 'rate' + }, + { + title: '状态', + dataIndex: 'status', + key: 'status' + }, + { + title: '操作员ID', + dataIndex: 'operator', + key: 'operator' + }, + { + title: '耗时', + dataIndex: 'cost', + key: 'cost' + } +] + +const scheduleData = [ + { + key: '1', + time: '2017-10-01 14:10', + rate: '联系客户', + status: 'processing', + operator: '取货员 ID1234', + cost: '5mins' + }, + { + key: '2', + time: '2017-10-01 14:05', + rate: '取货员出发', + status: 'success', + operator: '取货员 ID1234', + cost: '1h' + }, + { + key: '3', + time: '2017-10-01 13:05', + rate: '取货员接单', + status: 'success', + operator: '取货员 ID1234', + cost: '5mins' + }, + { + key: '4', + time: '2017-10-01 13:00', + rate: '申请审批通过', + status: 'success', + operator: '系统', + cost: '1h', + }, + { + key: '5', + time: '2017-10-01 12:00', + rate: '发起退货申请', + status: 'success', + operator: '用户', + cost: '5mins' + } +] + export default { name: 'BasicDetail', - components: {AAvatar, ATooltip, ACard} + components: {ATable, ADivider, DetailListItem, DetailList, AAvatar, ATooltip, ACard}, + data () { + return { + goodsColumns, + goodsData, + scheduleColumns, + scheduleData + } + } } - diff --git a/src/components/tool/DetailList.vue b/src/components/tool/DetailList.vue new file mode 100644 index 0000000..781e098 --- /dev/null +++ b/src/components/tool/DetailList.vue @@ -0,0 +1,102 @@ + + + + +