|
@@ -0,0 +1,191 @@
|
|
|
+<template>
|
|
|
+ <a-modal
|
|
|
+ :title="modalTitle"
|
|
|
+ :width="1300"
|
|
|
+ :visible="visible"
|
|
|
+ :confirmLoading="confirmLoading"
|
|
|
+ class="ant-modal2"
|
|
|
+ @cancel="handleCancel"
|
|
|
+ >
|
|
|
+ <a-card :bordered="false">
|
|
|
+ <s-table
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ rowKey="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :alert="options.alert"
|
|
|
+ :customRow="options.customRow"
|
|
|
+ :rowSelection="options.rowSelection"
|
|
|
+ :scroll="{ x: 1300, y: BaseTool.Constant.scrollY }"
|
|
|
+ showPagination="auto"
|
|
|
+ >
|
|
|
+ <span slot="status" slot-scope="text">
|
|
|
+ <badge :status="DictCache.COLOR.SB_INFO_STATUS[text]" :text="statusMap[text]" />
|
|
|
+ </span>
|
|
|
+ </s-table>
|
|
|
+ </a-card>
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">取消</a-button>
|
|
|
+ <a-button :loading="confirmLoading" type="primary" @click="handleSelect()">选择</a-button>
|
|
|
+ </template>
|
|
|
+ </a-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getPurchaseOrderList } from '@/api/purchase/purchase-order'
|
|
|
+import { STable, Ellipsis } from '@/components'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'SbInfoSelectModal',
|
|
|
+ components: {
|
|
|
+ STable
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ confirmLoading: false,
|
|
|
+ modalTitle: null,
|
|
|
+ visible: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParam: {
|
|
|
+ },
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'index',
|
|
|
+ checked: true,
|
|
|
+ width: 70,
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '请购单号',
|
|
|
+ width: 100,
|
|
|
+ checked: true,
|
|
|
+ dataIndex: 'ctrackNo'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '请购单行号',
|
|
|
+ dataIndex: 'itrackRowNo',
|
|
|
+ width: 100,
|
|
|
+ checked: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '业务类型',
|
|
|
+ width: 100,
|
|
|
+ checked: true,
|
|
|
+ dataIndex: 'cbusType'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '请购单号',
|
|
|
+ width: 100,
|
|
|
+ checked: true,
|
|
|
+ dataIndex: 'ccode'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '请购日期',
|
|
|
+ dataIndex: 'dpodate',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '存货名称',
|
|
|
+ dataIndex: 'cinvName',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '存货分类名称',
|
|
|
+ dataIndex: 'cinvCName',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单位',
|
|
|
+ dataIndex: 'ccomUnitName',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '规格型号',
|
|
|
+ dataIndex: 'cinvStd',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '请购数量',
|
|
|
+ dataIndex: 'iquantity',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '已采购数量',
|
|
|
+ dataIndex: 'iposum',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '入库数量',
|
|
|
+ dataIndex: 'irdsum',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单据审核状态',
|
|
|
+ dataIndex: 'istatus',
|
|
|
+ checked: true,
|
|
|
+ width: 100
|
|
|
+ }
|
|
|
+ // {
|
|
|
+ // title: '操作',
|
|
|
+ // key: 'action',
|
|
|
+ // width: '200px',
|
|
|
+ // align: 'center',
|
|
|
+ // fixed: 'right',
|
|
|
+ // scopedSlots: { width: 200, customRender: 'action' }
|
|
|
+ // }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ parameter = {
|
|
|
+ ...parameter,
|
|
|
+ yongYouId: this.yongYouId
|
|
|
+ }
|
|
|
+ return getPurchaseOrderList(parameter)
|
|
|
+ .then(res => {
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectedRowKeys: [],
|
|
|
+ selectedRows: [],
|
|
|
+
|
|
|
+ options: {
|
|
|
+ alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ rowSelection: {
|
|
|
+ selectedRowKeys: this.selectedRowKeys,
|
|
|
+ onChange: this.onSelectChange
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yongYouId: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ base (record) {
|
|
|
+ this.visible = true
|
|
|
+ this.yongYouId = record.yongYouId
|
|
|
+ this.modalTitle = '请购单'
|
|
|
+ console.log(this.$refs)
|
|
|
+ console.log(this.$refs.table.refresh)
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ handleCancel () {
|
|
|
+ this.visible = false
|
|
|
+ this.confirmLoading = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|