xwh il y a 4 ans
Parent
commit
cfaea89d99

+ 84 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/goodsexportpdf.html

@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Monthly Sales Growth</title>
+    #parse("sys/header.html")
+    <style>
+        .coldiv {
+            background-color: #f8f8f9;
+        }
+
+        body {
+            color: #515a6e;
+        }
+
+        #refreshTime, #storeId, #categoryId {
+            width: 100px;
+        }
+
+        #merchSn {
+            width: 300px;
+        }
+
+        i {
+            font-size: 20px;
+        }
+
+        input {
+            border: 1px #dcdee2 solid;
+            border-radius: 5px;
+            outline-color: #5cadff;
+        }
+    </style>
+</head>
+<body>
+<div id="rrapp" v-cloak>
+<header class="main-header">
+    <div class="container-fluid  coldiv">
+        <Row :gutter="16">
+        <div class="row" style="border:0;margin-bottom:10px">
+            <i-button  v-bind:disabled="selectButtonDisabled"  @click="selectLabelHead" >选择标签头</i-button>
+            <i-button type="primary" @click="exportPdf"><i class="fa fa-cloud-download"></i>&nbsp;导出pdf</i-button>
+            <i-col span="3">
+                <i-select v-model="q.storeId" placeholder="门店" filterable label-in-value>
+                    <i-option v-for="store in stores" :value="store.id"
+                              :key="store.id">{{store.storeName}}
+                    </i-option>
+                </i-select>
+            </i-col>
+
+            <i-col span="3">
+                <i-input v-model="q.sku"  placeholder="sku"/>
+            </i-col>
+
+            <i-col span="3">
+                <i-input v-model="q.barCode"  placeholder="条形码"/>
+            </i-col>
+
+            <i-col span="3">
+                <i-select v-model="q.isHead" placeholder="是否标签头" @on-change="changeHead" filterable label-in-value>
+                    <i-option v-for="isHead in isHeads" :value="isHead.id"
+                              :key="isHead.id">{{isHead.name}}
+                    </i-option>
+                </i-select>
+            </i-col>
+
+            <i-col span="3">
+                <i-select v-model="q.pdfType" placeholder="打印规格" filterable label-in-value>
+                    <i-option v-for="pdfType in pdfTypes" :value="pdfType.id"
+                              :key="pdfType.id">{{pdfType.name}}
+                    </i-option>
+                </i-select>
+            </i-col>
+            <i-input v-model="q.headUrl" type="hidden"/>
+
+        </div>
+        </Row>
+    </div>
+</header>
+
+<script src="${rc.contextPath}/js/shop/goodsexportpdf.js"></script>
+</div>
+</body>
+</html>

+ 83 - 0
kmall-admin/src/main/webapp/js/shop/goodsexportpdf.js

@@ -0,0 +1,83 @@
+$(function () {
+
+});
+
+let vm = new Vue({
+    el: '#rrapp',
+    data: {
+        selectButtonDisabled:true,
+        q: {
+            storeId: '',
+            barCode: '',
+            sku: '',
+            isHead: '0',
+            pdfType: '36',
+            headUrl: ''
+        },
+        stores: [],
+        isHeads: [{
+            id: '0',
+            name: '无标签头'
+        }, {
+        	id: '1',
+			name: '有标签头'
+        }],
+
+        pdfTypes: [ {id: '36',
+            name: '36规格'}
+        ]
+
+
+    },
+    methods: {
+        changeHead:function(){
+            console.log(vm.q)
+            console.log(vm.selectButtonDisabled)
+            if (vm.q.isHead=='0'){
+                vm.pdfTypes=[ {id: '36',
+                    name: '36规格'}
+                ];
+                vm.q.pdfType='36';
+                vm.selectButtonDisabled=!vm.selectButtonDisabled;
+            }else {
+                vm.pdfTypes=[{
+                    id: '1',
+                    name: '1规格'
+                }, {
+                    id: '2',
+                    name: '2规格'
+                }, {
+                    id: '4',
+                    name: '4规格'
+                }, {
+                    id: '9',
+                    name: '9规格'
+                }, {
+                    id: '12',
+                    name: '12规格'
+                }, {
+                    id: '18',
+                    name: '18规格'
+                }, {id: '36',
+                    name: '36规格'}
+                ]
+                vm.selectButtonDisabled=!vm.selectButtonDisabled;
+            }
+
+        },
+		selectLabelHead: function () {
+			alert("selectLabelHead")
+		},
+
+		exportPdf: function () {
+			alert("exportPdf")
+		}
+
+	},
+    mounted() {
+        $.get("../store/queryAll", function (r) {
+            vm.stores = r.list;
+        });
+    }
+
+});