123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <template>
- <a-modal
- centered
- class="record-detail-modal"
- :footer="null"
- :maskClosable="false"
- v-model="isShow"
- :title="modalTit"
- @cancle="isShow=false"
- width="60%">
- <a-spin :spinning="spinning" tip="Loading...">
- <div class="common-main">
- <a-descriptions :column="2">
- <a-descriptions-item label="销售单号">
- {{ tipData&&tipData.buyerName }}
- </a-descriptions-item>
- <a-descriptions-item label="备货单号">
- {{ tipData&&tipData.buyerName }}
- </a-descriptions-item>
- <a-descriptions-item label="客户名称">
- {{ tipData&&tipData.buyerName }}
- </a-descriptions-item>
- <a-descriptions-item label="收货客户名称">
- {{ tipData&&tipData.buyerName }}
- </a-descriptions-item>
- </a-descriptions>
- <div>
- <a-table :columns="columns" :data-source="tableData" bordered>
- </a-table>
- </div>
- <div class="btn-box">
- <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
- </div>
- </div>
- </a-spin>
- </a-modal>
- </template>
- <script>
- import { STable, VSelect } from '@/components'
- export default {
- name: 'CommonModal',
- components: { STable, VSelect },
- props: {
- openModal: { // 弹框显示状态
- type: Boolean,
- default: false
- },
- modalTit: { // 弹框标题
- type: String,
- default: null
- },
- cancelText: { // 取消 按钮文字
- type: String,
- default: '关闭'
- },
- isCancel: { // 是否显示 取消 按钮
- type: Boolean,
- default: true
- }
- },
- data () {
- return {
- isShow: this.openModal, // 是否打开弹框
- disabled: false,
- spinning: false,
- detail: [],
- queryParam: {
- },
- tableData: [],
- columns: [
- { title: '序号', dataIndex: 'no', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
- { title: '打印时间', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
- { title: '打印人', dataIndex: 'buyerName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
- { title: 'IP', dataIndex: 'buyerName1', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
- { title: '打印方式', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
- ]
- }
- },
- methods: {
- setData (data) {
- this.detail = data
- },
- // 取消
- handleCommonCancel () {
- this.$emit('cancel')
- }
- },
- watch: {
- // 父页面传过来的弹框状态
- openModal (newValue, oldValue) {
- this.isShow = newValue
- },
- // 重定义的弹框状态
- isShow (newValue, oldValue) {
- if (!newValue) {
- this.$emit('cancel')
- }
- }
- }
- }
- </script>
- <style lang="less">
- .record-detail-modal{
- .common-main{
- .btn-box{
- text-align: center;
- margin-top: 30px;
- .ant-btn{
- margin:0 10px;
- }
- }
- }
- }
- </style>
|