大宝管理后台代码
xxx
dcc
2024-05-07 abcf89c0931fc453f4fd8e1d4d48b8b469d0f3c7
src/views/newshares/newshareslist.vue
@@ -221,6 +221,18 @@
              </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
@@ -246,12 +258,12 @@
          title: '新股名称 / 新股代码',
          dataIndex: 'name',
          align: 'center',
          scopedSlots: { customRender: 'name' },
          scopedSlots: { customRender: 'name' }
        },
        {
          title: '最大购买数量',
          dataIndex: 'orderNumber',
          align: 'center',
          align: 'center'
        },
        // {
        //     title: '预估价格',
@@ -261,25 +273,25 @@
        {
          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' }
        },
        {
@@ -288,7 +300,7 @@
          align: 'center',
          customRender: (text, row, index) => {
            return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
          },
          }
        },
        {
          title: '认缴时间',
@@ -296,7 +308,7 @@
          align: 'center',
          customRender: (text, row, index) => {
            return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
          },
          }
        },
        {
          title: '上市时间',
@@ -304,14 +316,14 @@
          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,
      // 表头
@@ -323,7 +335,7 @@
        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: {
@@ -332,18 +344,18 @@
        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,
@@ -361,11 +373,11 @@
        'stockType',
        'code',
        'pe',
        'listDate',
        'listDate'
      ],
      currentdetail: '',
      subscribeTime: '',
      subscriptionTime: '',
      subscriptionTime: ''
    }
  },
  created() {
@@ -379,7 +391,7 @@
        content: '确认删除该新股吗?此操作不可恢复!',
        onOk() {
          var data = {
            id: val.newlistId,
            id: val.newlistId
          }
          subscribedel(data).then((res) => {
            if (res.status == 0) {
@@ -392,7 +404,7 @@
        },
        onCancel() {
          console.log('Cancel')
        },
        }
      })
    },
    getsubscribeTime(date, dateString) {
@@ -400,6 +412,9 @@
    },
    getsubscriptionTime(date, dateString) {
      this.subscriptionTime = dateString
    },
    getListDate (date, dateString) {
      this.listDate = dateString
    },
    geteditStock(val) {
      this.currentdetail = val
@@ -410,10 +425,15 @@
      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')
@@ -432,6 +452,7 @@
            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) {
@@ -447,6 +468,7 @@
          } else {
            this.addUserDialogloading = true
            values.subscriptionTime = this.subscriptionTime
            values.listDate = this.listDate
            values.subscribeTime = this.subscribeTime
            subscribeadd(values).then((res) => {
              if (res.status == 0) {
@@ -470,7 +492,7 @@
        code: '',
        name: '',
        zt: undefined,
        type: undefined,
        type: undefined
      }
    },
    getinit() {
@@ -496,7 +518,7 @@
      this.pagination.current = page
      this.queryParam.pageSize = pageSize
      this.getlist()
    },
  },
    }
  }
}
</script>