| | |
| | | icon="search" |
| | | style="margin-left: 8px" |
| | | @click=";(queryParam.pageNum = 1), (pagination.current = page), getlist()" |
| | | >查询 |
| | | >查询 |
| | | </a-button> |
| | | |
| | | <a-button |
| | |
| | | </a-date-picker> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="12" :lg="12" :sm="12"> |
| | | <a-form-item label="上市时间" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker |
| | | show-time |
| | | style="width: 100%" |
| | | @change="getListDate" |
| | | v-decorator="['listDate', { rules: [{ required: true, message: '请填写上市时间' }] }]" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | > |
| | | </a-date-picker> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :md="12" :lg="12" :sm="12"> |
| | | <a-form-item label="预估价格" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input |
| | |
| | | import pick from 'lodash.pick' |
| | | export default { |
| | | name: 'Shares', |
| | | data() { |
| | | data () { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '新股名称 / 新股代码', |
| | | dataIndex: 'name', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'name' }, |
| | | scopedSlots: { customRender: 'name' } |
| | | }, |
| | | { |
| | | title: '最大购买数量', |
| | | dataIndex: 'orderNumber', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | // { |
| | | // title: '预估价格', |
| | |
| | | { |
| | | title: '价格', |
| | | dataIndex: 'price', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '是否显示', |
| | | dataIndex: 'zt', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'zt' }, |
| | | scopedSlots: { customRender: 'zt' } |
| | | }, |
| | | { |
| | | title: '新股模式', |
| | | dataIndex: 'type', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'type' }, |
| | | scopedSlots: { customRender: 'type' } |
| | | }, |
| | | { |
| | | title: '股票类型', |
| | | dataIndex: 'stockType', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'stockType' }, |
| | | scopedSlots: { customRender: 'stockType' } |
| | | }, |
| | | |
| | | { |
| | |
| | | align: 'center', |
| | | customRender: (text, row, index) => { |
| | | return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: '认缴时间', |
| | |
| | | align: 'center', |
| | | customRender: (text, row, index) => { |
| | | return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: '上市时间', |
| | |
| | | align: 'center', |
| | | customRender: (text, row, index) => { |
| | | return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', |
| | | key: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | disabledDate: true, |
| | | // 表头 |
| | |
| | | pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据 |
| | | onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示 |
| | | onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件 |
| | | showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据 |
| | | showTotal: (total) => `共有 ${total} 条数据` // 分页中显示总的数据 |
| | | }, |
| | | loading: false, |
| | | queryParam: { |
| | |
| | | code: '', |
| | | name: '', |
| | | zt: undefined, |
| | | type: undefined, |
| | | type: undefined |
| | | }, |
| | | datalist: [], |
| | | labelCol: { |
| | | xs: { span: 8 }, |
| | | sm: { span: 8 }, |
| | | md: { span: 8 }, |
| | | md: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 14 }, |
| | | sm: { span: 14 }, |
| | | md: { span: 14 }, |
| | | md: { span: 14 } |
| | | }, |
| | | addUserform: this.$form.createForm(this), |
| | | addUserdialog: false, |
| | |
| | | 'stockType', |
| | | 'code', |
| | | 'pe', |
| | | 'listDate', |
| | | 'listDate' |
| | | ], |
| | | currentdetail: '', |
| | | subscribeTime: '', |
| | | subscriptionTime: '', |
| | | subscriptionTime: '' |
| | | } |
| | | }, |
| | | created() { |
| | | created () { |
| | | this.getlist() |
| | | }, |
| | | methods: { |
| | | getdeleteStock(val) { |
| | | getdeleteStock (val) { |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '提示', |
| | | content: '确认删除该新股吗?此操作不可恢复!', |
| | | onOk() { |
| | | onOk () { |
| | | var data = { |
| | | id: val.newlistId, |
| | | id: val.newlistId |
| | | } |
| | | subscribedel(data).then((res) => { |
| | | if (res.status == 0) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | onCancel () { |
| | | console.log('Cancel') |
| | | }, |
| | | } |
| | | }) |
| | | }, |
| | | getsubscribeTime(date, dateString) { |
| | | getsubscribeTime (date, dateString) { |
| | | this.subscribeTime = dateString |
| | | }, |
| | | getsubscriptionTime(date, dateString) { |
| | | getsubscriptionTime (date, dateString) { |
| | | this.subscriptionTime = dateString |
| | | }, |
| | | geteditStock(val) { |
| | | getListDate (date, dateString) { |
| | | this.listDate = dateString |
| | | }, |
| | | geteditStock (val) { |
| | | this.currentdetail = val |
| | | this.addUserdialog = true |
| | | var currentTime = new Date() |
| | |
| | | this.addUserform.setFieldsValue({ |
| | | subscriptionTime: moment(val.subscriptionTime ? val.subscriptionTime : currentTime).format( |
| | | 'YYYY-MM-DD HH:mm:ss' |
| | | ), |
| | | ) |
| | | }) |
| | | this.addUserform.setFieldsValue({ |
| | | subscribeTime: moment(val.subscribeTime ? val.subscribeTime : currentTime).format('YYYY-MM-DD HH:mm:ss'), |
| | | listDate: moment(val.listDate ? val.listDate : currentTime).format( |
| | | 'YYYY-MM-DD HH:mm:ss' |
| | | ) |
| | | }) |
| | | this.addUserform.setFieldsValue({ |
| | | subscribeTime: moment(val.subscribeTime ? val.subscribeTime : currentTime).format('YYYY-MM-DD HH:mm:ss') |
| | | }) |
| | | // this.subscribeTime = moment(val.subscribeTime).format('YYYY-MM-DD HH:mm:ss') |
| | | // this.subscriptionTime = moment(val.subscriptionTime).format('YYYY-MM-DD HH:mm:ss') |
| | | }, |
| | | CanceladdUserdialog() { |
| | | CanceladdUserdialog () { |
| | | this.addUserdialog = false |
| | | const form = this.$refs.addUserform.form |
| | | form.resetFields() |
| | | }, |
| | | OkaddUserdialog() { |
| | | OkaddUserdialog () { |
| | | const form = this.$refs.addUserform.form |
| | | |
| | | form.validateFields((errors, values) => { |
| | |
| | | this.addUserDialogloading = true |
| | | values.newlistId = this.currentdetail.newlistId |
| | | values.subscriptionTime = this.subscriptionTime |
| | | values.listDate = this.listDate |
| | | values.subscribeTime = this.subscribeTime |
| | | subscribeupdate(values).then((res) => { |
| | | if (res.status == 0) { |
| | |
| | | } else { |
| | | this.addUserDialogloading = true |
| | | values.subscriptionTime = this.subscriptionTime |
| | | values.listDate = this.listDate |
| | | values.subscribeTime = this.subscribeTime |
| | | subscribeadd(values).then((res) => { |
| | | if (res.status == 0) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getqueryParam() { |
| | | getqueryParam () { |
| | | this.queryParam = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | code: '', |
| | | name: '', |
| | | zt: undefined, |
| | | type: undefined, |
| | | type: undefined |
| | | } |
| | | }, |
| | | getinit() { |
| | | getinit () { |
| | | this.getqueryParam() |
| | | this.pagination.current = 1 |
| | | this.getlist() |
| | | }, |
| | | getlist() { |
| | | getlist () { |
| | | this.loading = true |
| | | subscribelist(this.queryParam).then((res) => { |
| | | this.datalist = res.data.list |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | onPageChange(page, pageSize) { |
| | | onPageChange (page, pageSize) { |
| | | this.queryParam.pageNum = page |
| | | this.pagination.current = page |
| | | this.getlist() |
| | | }, |
| | | onSizeChange(current, pageSize) { |
| | | onSizeChange (current, pageSize) { |
| | | this.queryParam.pageNum = current |
| | | this.pagination.current = page |
| | | this.queryParam.pageSize = pageSize |
| | | this.getlist() |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |