| | |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handlePrint(record)" |
| | | >打印二维码</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | |
| | | |
| | | <inbound-model ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></inbound-model> |
| | | <inbound-apply-model-list ref="inboundApplyModelList"></inbound-apply-model-list> |
| | | <div id="printArea" style="display: block;"> |
| | | <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> |
| | | <p>{{ item.onlyCode }}</p> |
| | | <p>{{ item.toolName }}</p> |
| | | <img :src="item.base64" alt="QR Code"> |
| | | </div> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ParaBladeList from '.././baseTools/ParaBladeList' |
| | | import InboundModel from './InboundModel' |
| | | import InboundApplyModelList from './InboundApplyModelList.vue' |
| | | import printJS from 'print-js'; |
| | | |
| | | export default { |
| | | name: 'InboundListRight', |
| | |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/inStoreDetail/list", |
| | |
| | | exportXlsUrl: "/tms/baseTools/exportXls", |
| | | importExcelUrl: "tms/baseTools/importExcel", |
| | | queryParaByToolCode:"/tms/baseTools/queryByToolCode", |
| | | queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode" |
| | | queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode", |
| | | print:'/tms/inStoreDetail/print' |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | nodeSelected: {}, // 当前选中的节点数据 |
| | | paraTypeFlag:'', |
| | | disableMixinCreated:true |
| | | disableMixinCreated:true, |
| | | qrList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.$refs.paraTurningToolsList.visable = false |
| | | this.$refs.paraBladeList.visable = false |
| | | this.$refs.toolsConfigPropertyList.visable = false |
| | | } |
| | | }, |
| | | handlePrint(record){ |
| | | this.loading = true |
| | | getAction(this.url.print, {onlyCode:record.onlyCode}) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.qrList = res.result.map((content, i) => ({ |
| | | onlyCode:res.result[i].onlyCode, |
| | | toolName:res.result[i].toolName, |
| | | base64: res.result[i].image |
| | | })); |
| | | this.handleBacthPrint(); |
| | | this.$emit('ok', new Date()) |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | this.close() |
| | | }) |
| | | }, |
| | | // 执行打印 |
| | | handleBacthPrint() { |
| | | this.$nextTick(() => { |
| | | printJS({ |
| | | printable: 'printArea', |
| | | type: 'html', |
| | | style: ` |
| | | .qrcode-item { |
| | | page-break-inside: avoid; |
| | | margin: 10px; |
| | | text-align: center; |
| | | } |
| | | img { width: 100px; height: 100px; } |
| | | `, |
| | | scanStyles: false |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | } |