|
@@ -0,0 +1,125 @@
|
|
|
|
+<template>
|
|
|
|
+ <div id="form-1">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
|
+ <el-col class="top_btn">
|
|
|
|
+ <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="one" v-if="data"> <span>发货清单</span> </el-col>
|
|
|
|
+ <el-col :span="24" class="two" v-if="data">
|
|
|
|
+ <el-col :span="12" v-for="(item, index) in data" :key="index">
|
|
|
|
+ <el-card class="box-card">
|
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
|
+ <el-col class="shop">{{ item.shop.name }}</el-col>
|
|
|
|
+ <el-col>买家:{{ item.customer.name }}</el-col>
|
|
|
|
+ <el-col>收货人:{{ item.address.name }},{{ item.address.phone }}</el-col>
|
|
|
|
+ <el-col>收货人地址:{{ item.address.province }},{{ item.address.city }},{{ item.address.area }},{{ item.address.address }}</el-col>
|
|
|
|
+ <el-button style="float: right" type="primary" @click="toFile()">导出</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <el-table border :data="item.goods" style="width: 100%">
|
|
|
|
+ <el-table-column prop="goods.name" label="商品姓名" width="180"> </el-table-column>
|
|
|
|
+ <el-table-column prop="name" label="商品规格"> </el-table-column>
|
|
|
|
+ <el-table-column prop="buy_num" label="商品数量"> </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <el-col>
|
|
|
|
+ <!-- <data-table :fields="fields" :data="item.goods"> </data-table> -->
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+const _ = require('lodash');
|
|
|
|
+const moment = require('moment');
|
|
|
|
+import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const { mapActions } = createNamespacedHelpers('order');
|
|
|
|
+export default {
|
|
|
|
+ name: 'form-1',
|
|
|
|
+ props: {},
|
|
|
|
+ components: {},
|
|
|
|
+ data: function () {
|
|
|
|
+ return {
|
|
|
|
+ fields: [
|
|
|
|
+ { label: '商品名称', model: 'goods.name' },
|
|
|
|
+ { label: '商品规格', model: 'name' },
|
|
|
|
+ { label: '商品数量', model: 'buy_num' },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ async created() {
|
|
|
|
+ await this.search();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...mapActions(['query', 'fetch', 'create', 'update']),
|
|
|
|
+ // 查询
|
|
|
|
+ async search() {
|
|
|
|
+ console.log(this.data);
|
|
|
|
+ },
|
|
|
|
+ toFile() {
|
|
|
|
+ this.$message({ message: '导出成功', type: 'success' });
|
|
|
|
+ },
|
|
|
|
+ // 返回
|
|
|
|
+ toBack() {
|
|
|
|
+ window.history.go('-1');
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ data() {
|
|
|
|
+ return this.$route.query.data;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ metaInfo() {
|
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ test: {
|
|
|
|
+ deep: true,
|
|
|
|
+ immediate: true,
|
|
|
|
+ handler(val) {},
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.main {
|
|
|
|
+ .top_btn {
|
|
|
|
+ margin: 0 0 10px 0;
|
|
|
|
+ }
|
|
|
|
+ .one {
|
|
|
|
+ margin: 0 0 10px 0;
|
|
|
|
+
|
|
|
|
+ span:nth-child(1) {
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .two {
|
|
|
|
+ // margin: 5px;
|
|
|
|
+ .box-card {
|
|
|
|
+ margin: 5px;
|
|
|
|
+ }
|
|
|
|
+ .shop {
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ }
|
|
|
|
+ .item {
|
|
|
|
+ margin-bottom: 18px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .clearfix:before,
|
|
|
|
+ .clearfix:after {
|
|
|
|
+ display: table;
|
|
|
|
+ content: '';
|
|
|
|
+ }
|
|
|
|
+ .clearfix:after {
|
|
|
|
+ clear: both;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|