| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | |
| | | <div id="printMe" class="main"> |
| | | <div style="text-align: center"> |
| | | <h1 style="font-size: 40px">æåå
¥åºæ è¯å¡</h1> |
| | | </div> |
| | | <div class="container"> |
| | | <div class="block">æ¥æ</div> |
| | | <div class="block"> <el-input v-model="form.value1" /></div> |
| | | <div class="block">ç产åå·</div> |
| | | <div class="block"> <el-input v-model="form.value2" /></div> |
| | | |
| | | <div class="block">åå·</div> |
| | | <div class="block"> <el-input v-model="form.value3" /></div> |
| | | <div class="block">线å«</div> |
| | | <div class="block"> <el-input v-model="form.value4" /></div> |
| | | |
| | | <div class="block">é¢è²</div> |
| | | <div class="block"> <el-input v-model="form.value5" /></div> |
| | | <div class="block" style="border-right: none">å°æ°/ææ°:</div> |
| | | <div class="block" style="border-left: none"> <el-input v-model="form.value6" /></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display: flex;margin:100px 805px;"> |
| | | <el-button type="info" @click="reset">æ¸
空</el-button> |
| | | <el-button v-print="printObj" type="primary">æ å°</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'WarehouseEntryIdCard', |
| | | data() { |
| | | return { |
| | | |
| | | form: { |
| | | value1: '', |
| | | value2: '', |
| | | value3: '', |
| | | value4: '', |
| | | value5: '', |
| | | value6: '' |
| | | }, |
| | | |
| | | printObj: { |
| | | id: 'printMe', |
| | | popTitle: 'æå°æ¨¡æ¿', |
| | | preview: false, |
| | | extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>', |
| | | closeCallback(vue) { // å
³éæå°çåè°äºä»¶ï¼æ æ³ç¡®å®ç¹å»çæ¯ç¡®è®¤è¿æ¯åæ¶ï¼ |
| | | console.log('11212', vue) |
| | | // vue.dialogVisible = false |
| | | // vue.dialogVisibleApprove = false |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | | // vue.printLoading = true |
| | | console.log('æå¼ä¹å') |
| | | console.log() |
| | | }, |
| | | openCallback(vue) { |
| | | // vue.printLoading = false |
| | | console.log('æ§è¡äºæå°') |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | reset() { |
| | | this.form.value1 = '' |
| | | this.form.value2 = '' |
| | | this.form.value3 = '' |
| | | this.form.value4 = '' |
| | | this.form.value5 = '' |
| | | this.form.value6 = '' |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 800px; |
| | | height: 600px; |
| | | padding: 20px 20px; |
| | | } |
| | | |
| | | .container { |
| | | width: 100%; |
| | | height: 100%; |
| | | border: 1px solid #000; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .block { |
| | | width: 25%; |
| | | height: 33.3%; |
| | | border: 1px solid #000; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | .block:nth-child(odd) { |
| | | width: 20%; |
| | | } |
| | | |
| | | .block:nth-child(even) { |
| | | width: 30%; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner{ |
| | | border: none; |
| | | font-weight: 700; |
| | | font-size: 24px; |
| | | } |
| | | </style> |
| | | <style media="print"> |
| | | /*@media print {*/ |
| | | @page { |
| | | size: auto; |
| | | margin: 1mm; |
| | | } |
| | | |
| | | </style> |