大宝管理后台代码
xxx
dcc
2024-05-07 abcf89c0931fc453f4fd8e1d4d48b8b469d0f3c7
src/views/newshares/newsharesrecord.vue
@@ -18,7 +18,7 @@
                    icon="search"
                    style="margin-left: 8px"
                    @click=";(queryParam.pageNum = 1), (pagination.current = 1), getlist()"
                    >查询
                  >查询
                  </a-button>
                  <a-button
                    type="primary"
@@ -61,28 +61,28 @@
                  record.status == 1
                    ? 'pink'
                    : record.status == 2
                    ? 'red'
                    : record.status == 3
                    ? 'green'
                    : record.status == 4
                    ? 'blue'
                    : record.status == 5
                    ? 'purple'
                    : 'orange'
                      ? 'red'
                      : record.status == 3
                        ? 'green'
                        : record.status == 4
                          ? 'blue'
                          : record.status == 5
                            ? 'purple'
                            : 'orange'
                "
              >
                {{
                  record.status == 1
                    ? '已认购'
                    : record.status == 2
                    ? '未中签'
                    : record.status == 3
                    ? '已中签'
                    : record.status == 4
                    ? '已缴纳'
                    : record.status == 5
                    ? '已转持仓'
                    : ''
                      ? '未中签'
                      : record.status == 3
                        ? '已中签'
                        : record.status == 4
                          ? '已缴纳'
                          : record.status == 5
                            ? '已转持仓'
                            : ''
                }}</a-tag
              >
            </div>
@@ -175,73 +175,73 @@
import pick from 'lodash.pick'
export default {
  name: 'Shares',
  data() {
  data () {
    return {
      columns: [
        {
          title: '用户名称(ID)',
          dataIndex: 'realName',
          align: 'center',
          scopedSlots: { customRender: 'realName' },
          scopedSlots: { customRender: 'realName' }
        },
        {
          title: '用户手机号',
          dataIndex: 'phone',
          align: 'center',
          align: 'center'
        },
        {
          title: '新股名称',
          dataIndex: 'newName',
          align: 'center',
          align: 'center'
        },
        {
          title: '新股代码',
          dataIndex: 'newCode',
          align: 'center',
          align: 'center'
        },
        {
          title: '买入价格',
          dataIndex: 'buyPrice',
          align: 'center',
          align: 'center'
        },
        {
          title: '保证金',
          dataIndex: 'bond',
          align: 'center',
          align: 'center'
        },
        {
          title: '买入数量',
          dataIndex: 'applyNums',
          align: 'center',
          align: 'center'
        },
        {
          title: '中签数量',
          dataIndex: 'applyNumber',
          align: 'center',
          align: 'center'
        },
        {
          title: '申购时间',
          dataIndex: 'addTime',
          align: 'center',
          align: 'center'
        },
        {
          title: '状态',
          dataIndex: 'status',
          align: 'center',
          scopedSlots: { customRender: 'status' },
          scopedSlots: { customRender: 'status' }
        },
        {
          title: '新股模式',
          dataIndex: 'type',
          align: 'center',
          scopedSlots: { customRender: 'type' },
          scopedSlots: { customRender: 'type' }
        },
        {
          title: '操作',
          key: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' },
        },
          scopedSlots: { customRender: 'action' }
        }
      ],
      // 表头
      pagination: {
@@ -252,44 +252,44 @@
        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: {
        pageNum: 1,
        pageSize: 10,
        keyword: '',
        keyword: ''
      },
      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,
      addUserDialogloading: false,
      fields: ['phone', 'newCode', 'applyNums', 'applyNumber', 'status'],
      currentdetail: '',
      currentdetail: ''
    }
  },
  created() {
  created () {
    this.getlist()
  },
  methods: {
    getzhuan(val) {
    getzhuan (val) {
      var that = this
      this.$confirm({
        title: '提示',
        content: '确认转入持仓吗?此操作不可恢复!',
        onOk() {
        onOk () {
          var data = {
            id: val.id,
            id: val.id
          }
          addUserPosition(data).then((res) => {
            if (res.status == 0) {
@@ -300,19 +300,19 @@
            }
          })
        },
        onCancel() {
        onCancel () {
          console.log('Cancel')
        },
        }
      })
    },
    getdeleteStock(val) {
    getdeleteStock (val) {
      var that = this
      this.$confirm({
        title: '提示',
        content: '确认删除该新股吗?此操作不可恢复!',
        onOk() {
        onOk () {
          var data = {
            id: val.id,
            id: val.id
          }
          delStockSubscribe(data).then((res) => {
            if (res.status == 0) {
@@ -323,23 +323,23 @@
            }
          })
        },
        onCancel() {
        onCancel () {
          console.log('Cancel')
        },
        }
      })
    },
    geteditStock(val) {
    geteditStock (val) {
      this.currentdetail = val
      this.addUserdialog = true
      this.fields.forEach((v) => this.addUserform.getFieldDecorator(v))
      this.addUserform.setFieldsValue(pick(val, this.fields))
    },
    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) => {
        if (!errors) {
@@ -361,19 +361,19 @@
        }
      })
    },
    getqueryParam() {
    getqueryParam () {
      this.queryParam = {
        pageNum: 1,
        pageSize: 10,
        keyword: '',
        keyword: ''
      }
    },
    getinit() {
    getinit () {
      this.getqueryParam()
      this.pagination.current = 1
      this.getlist()
    },
    getlist() {
    getlist () {
      this.loading = true
      getStockSubscribeList(this.queryParam).then((res) => {
        this.datalist = res.data.list
@@ -381,17 +381,17 @@
        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>