ZY
2024-09-25 2191824072549f0da35d73686a075e59b0196321
zy-asrs-admin/src/views/out/platform/index.vue
File was renamed from zy-asrs-admin/src/views/base/cacheSite/index.vue
@@ -11,7 +11,7 @@
const router = useRouter();
const TABLE_KEY = 'table-cacheSite';
const TABLE_KEY = 'table-platform';
let currentPage = 1;
let pageSize = 10;
const searchInput = ref("")
@@ -32,77 +32,49 @@
const columns = [
  {
    title: formatMessage('db.man_cache_site.channel', '通道'),
    dataIndex: 'channel',
    title: formatMessage('db.man_platform.platform_no', '集货编号'),
    dataIndex: 'platformNo',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('channel'),
    ...getColumnSearchProps('platformNo'),
  },
  {
    title: formatMessage('db.man_cache_site.site_no', '站点编号'),
    dataIndex: 'siteNo',
    title: formatMessage('db.man_platform.status', '状态'),
    dataIndex: 'status$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('siteNo'),
    ...getColumnSearchProps('status$'),
  },
  {
    title: formatMessage('db.man_cache_site.site_status', '站点状态'),
    dataIndex: 'siteStatus$',
    title: formatMessage('db.man_platform.create_time', '添加时间'),
    dataIndex: 'createTime$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('siteStatus$'),
    ...getColumnSearchProps('createTime$'),
  },
  {
    title: formatMessage('db.man_cache_site.order_id', '订单ID'),
    dataIndex: 'orderId$',
    title: formatMessage('db.man_platform.create_by', '添加人员'),
    dataIndex: 'createBy$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('orderId$'),
    ...getColumnSearchProps('createBy$'),
  },
  {
    title: formatMessage('db.man_cache_site.order_no', '订单编号'),
    dataIndex: 'orderNo',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('orderNo'),
  },
  // {
  //   title: formatMessage('db.man_cache_site.status', '状态'),
  //   dataIndex: 'status$',
  //   width: 140,
  //   ellipsis: true,
  //   ...getColumnSearchProps('status$'),
  // },
  // {
  //   title: formatMessage('db.man_cache_site.create_time', '添加时间'),
  //   dataIndex: 'createTime$',
  //   width: 140,
  //   ellipsis: true,
  //   ...getColumnSearchProps('createTime$'),
  // },
  // {
  //   title: formatMessage('db.man_cache_site.create_by', '添加人员'),
  //   dataIndex: 'createBy$',
  //   width: 140,
  //   ellipsis: true,
  //   ...getColumnSearchProps('createBy$'),
  // },
  {
    title: formatMessage('db.man_cache_site.update_time', '修改时间'),
    title: formatMessage('db.man_platform.update_time', '修改时间'),
    dataIndex: 'updateTime$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('updateTime$'),
  },
  {
    title: formatMessage('db.man_cache_site.update_by', '修改人员'),
    title: formatMessage('db.man_platform.update_by', '修改人员'),
    dataIndex: 'updateBy$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('updateBy$'),
  },
  {
    title: formatMessage('db.man_cache_site.memo', '备注'),
    title: formatMessage('db.man_platform.memo', '备注'),
    dataIndex: 'memo',
    width: 140,
    ellipsis: true,
@@ -114,7 +86,7 @@
    name: 'oper',
    dataIndex: 'oper',
    key: 'oper',
    width: 140,
    width: 200,
    fixed: 'right',
  },
];
@@ -135,7 +107,7 @@
function getPage() {
  state.loading = true;
  post('/api/cacheSite/page', {
  post('/api/platform/page', {
    current: currentPage,
    pageSize: pageSize,
    condition: searchInput.value
@@ -169,7 +141,7 @@
    onOk: async () => {
      const hide = message.loading(formatMessage('common.loading', '请求中'));
      try {
        post('/api/cacheSite/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => {
        post('/api/platform/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => {
          let result = resp.data;
          if (result.code === 200) {
            message.success(result.msg);
@@ -187,7 +159,7 @@
}
const handleExport = async (intl) => {
  postBlob('/api/cacheSite/export', {}).then(result => {
  postBlob('/api/platform/export', {}).then(result => {
    const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
    window.location.href = window.URL.createObjectURL(blob);
    return true;
@@ -209,11 +181,38 @@
  getPage()
}
const handleShipped = (item) => {
  Modal.confirm({
    title: formatMessage('page.shipped', '发货'),
    content: formatMessage('page.shipped.confirm', '确定发货吗?'),
    maskClosable: true,
    onOk: async () => {
      const hide = message.loading(formatMessage('common.loading', '请求中'));
      try {
        post('/api/platform/shipped', {
          platformId: item.id,
        }).then(resp => {
          let result = resp.data;
          if (result.code === 200) {
            message.success(result.msg);
          } else {
            message.error(result.msg);
          }
          getPage()
          hide()
        })
      } catch (error) {
        message.error(formatMessage('common.fail', '请求失败'));
      }
    },
  });
}
</script>
<script>
export default {
  name: '播种站点'
  name: '集货管理'
}
</script>
@@ -236,6 +235,8 @@
      <template #bodyCell="{ column, text, record }">
        <template v-if="column.dataIndex === 'oper'">
          <div style="display: flex;justify-content: space-evenly;">
            <a-button type="link" primary @click="handleShipped(record)">{{ formatMessage('page.platform.shipped', '发货')
              }}</a-button>
            <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑') }}</a-button>
            <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除')
              }}</a-button>