Procházet zdrojové kódy

add 回收事务页面

haveyou před 1 rokem
rodič
revize
3d511db65d

+ 65 - 0
src/views/recycleAffairs/auditor/components/page-search.vue

@@ -0,0 +1,65 @@
+<!-- 搜索表单 -->
+<template>
+  <ele-card :body-style="{ paddingBottom: '8px' }">
+    <ProSearch
+      :items="formItems"
+      ref="searchRef"
+      @search="search"
+      :initKeys="initKeys"
+      :offset="1"
+    ></ProSearch>
+  </ele-card>
+</template>
+
+<script setup>
+  import { reactive, ref, defineEmits } from 'vue';
+  import ProSearch from '@/components/CommonPage/ProSearch2.vue';
+
+  let { proxy } = getCurrentInstance();
+  const emit = defineEmits(['search']);
+
+  const godownList = ref([]);
+  const formItems = computed(() => {
+    return [
+      { type: 'input', label: 'ISBN', prop: 'isbn' },
+      { type: 'input', label: '审核员', prop: 'auditName' },
+      { type: 'input', label: '录入员', prop: 'auditName' },
+      {
+        type: 'datetimerange',
+        label: ' ',
+        prop: 'time',
+        props: {
+          format: 'YYYY-MM-DD HH:mm:ss',
+          valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          onChange: (value) => {
+            initKeys.startTime = value ? value[0] : '';
+            initKeys.endTime = value ? value[1] : '';
+            searchRef.value?.setData(initKeys);
+          }
+        },
+        colProps: {
+          span: 6
+        }
+      }
+    ];
+  });
+
+  const initKeys = reactive({
+    startTime: '',
+    endTime: '',
+    godownId: ''
+  });
+
+  function getStoreList(name = '') {
+    return proxy.$http.post(`/baseinfo/godown/searchGodown?name=${name}`);
+  }
+  getStoreList().then((res) => {
+    godownList.value = res.data.data;
+  });
+
+  const searchRef = ref(null);
+  /** 搜索 */
+  const search = (data) => {
+    emit('search', { ...data });
+  };
+</script>

+ 50 - 0
src/views/recycleAffairs/auditor/index.vue

@@ -0,0 +1,50 @@
+<template>
+  <ele-page flex-table>
+    <page-search @search="reload"></page-search>
+
+    <common-table
+      ref="pageRef"
+      :pageConfig="pageConfig"
+      :columns="columns"
+      :tools="false"
+    >
+    </common-table>
+  </ele-page>
+</template>
+
+<script setup>
+  import { ref, reactive } from 'vue';
+  import CommonTable from '@/components/CommonPage/CommonTable.vue';
+  import pageSearch from './components/page-search.vue';
+
+  defineOptions({ name: 'auditorList' });
+
+  /** 表格列配置 */
+  const columns = ref([
+    { label: 'ISBN', prop: 'isbn', align: 'center' },
+    { label: '审核员', prop: 'godownName', align: 'center' },
+    { label: '录入员', prop: 'godownName', align: 'center' },
+    { label: '订单编号', prop: 'godownName', align: 'center' },
+    { label: '录入时间', prop: 'createTime', align: 'center' }
+  ]);
+
+  /** 页面组件实例 */
+  const pageRef = ref(null);
+
+  const pageConfig = reactive({
+    pageUrl: '/baseinfo/godown/pagelist',
+    exportUrl: '/baseinfo/godown/export',
+    fileName: '审核员查询',
+    cacheKey: 'auditorTable'
+  });
+
+  //刷新表格
+  function reload(where) {
+    pageRef.value?.reload(where);
+  }
+
+  //导出excel
+  function handleExportExcel() {
+    pageRef.value?.exportData('审核员查询');
+  }
+</script>

+ 177 - 0
src/views/recycleAffairs/intercept/index.vue

@@ -0,0 +1,177 @@
+<template>
+  <order-page ref="pageRef" :pageConfig="pageConfig">
+    <template #toolbar>
+      <el-button
+        type="warning"
+        plain
+        v-permission="'recycleOrder:awaitDelivery:batchAudit'"
+        @click="handleBatchAudit"
+      >
+        批量初审
+      </el-button>
+      <el-button
+        type="success"
+        plain
+        v-permission="'recycleOrder:awaitDelivery:batchReceive'"
+        @click="handleBatchReceive()"
+      >
+        批量确认收货
+      </el-button>
+    </template>
+
+    <template #action="{ row }">
+      <div>
+        <el-button
+          type="success"
+          link
+          v-permission="'recycleOrder:awaitDelivery:detail'"
+          @click="toOrderDetail(row)"
+        >
+          [订单详情]
+        </el-button>
+        <el-button
+          type="warning"
+          link
+          v-permission="'recycleOrder:awaitDelivery:log'"
+          @click="openOrderLog(row)"
+        >
+          [订单日志]
+        </el-button>
+        <el-button
+          type="danger"
+          link
+          v-permission="'recycleOrder:awaitDelivery:cancel'"
+          @click="cancelOrder(row)"
+        >
+          [取消订单]
+        </el-button>
+        <el-button
+          type="primary"
+          link
+          v-permission="'recycleOrder:awaitDelivery:fallback'"
+          @click="fallbackOrder(row)"
+        >
+          [回退状态]
+        </el-button>
+        <el-button
+          type="warning"
+          link
+          v-permission="'recycleOrder:awaitDelivery:userTag'"
+          @click="openEditUserTag(row)"
+        >
+          [用户标签]
+        </el-button>
+        <el-button
+          type="success"
+          link
+          v-permission="'recycleOrder:awaitDelivery:receive'"
+          @click="handleBatchReceive(row)"
+        >
+          [确认收货]
+        </el-button>
+        <el-button
+          type="danger"
+          link
+          v-permission="'recycleOrder:awaitDelivery:interception'"
+          @click="applyForInterception(row)"
+        >
+          [申请拦截退回]
+        </el-button>
+      </div>
+    </template>
+
+    <order-log ref="orderLogRef" />
+    <userBindTag ref="userTagRef" />
+  </order-page>
+</template>
+
+<script setup>
+  import { ref, reactive } from 'vue';
+  import { ElMessageBox } from 'element-plus/es';
+  import { EleMessage } from 'ele-admin-plus/es';
+  import { DownloadOutlined } from '@/components/icons';
+  import OrderPage from '@/views/recycleOrder/components/order-page.vue';
+  import { useDictData } from '@/utils/use-dict-data';
+  import { useRouter } from 'vue-router';
+
+  //订单日志
+  import orderLog from '@/views/recycleOrder/components/order-log.vue';
+  //用户标签
+  import userBindTag from '@/views/recycleOrder/components/user-bind-tag.vue';
+
+  defineOptions({ name: 'recycleOrderawaitDelivery' });
+
+  let router = useRouter();
+  /** 页面组件实例 */
+  const pageRef = ref(null);
+
+  const pageConfig = reactive({
+    pageUrl: '',
+    exportUrl: '',
+    fileName: '待签收订单',
+    cacheKey: 'awaitDeliveryTable'
+  });
+
+  //批量初审
+  function handleBatchAudit() {
+    pageRef.value?.operatBatch({
+      title: '确认批量审核?',
+      url: '/recycleOrder/batchAudit'
+    });
+  }
+
+  //批量取消订单
+  function handleBatchReceive(row) {
+    pageRef.value?.operatBatch({
+      title: '确认收货?',
+      row,
+      url: '/recycleOrder/batchAudit'
+    });
+  }
+
+  //订单详情
+  function toOrderDetail(row) {
+    router.push({ path: '/recycleOrder/detail', query: { id: row.postId } });
+  }
+
+  //订单日志
+  const orderLogRef = ref(null);
+  function openOrderLog(row) {
+    console.log(row, orderLogRef.value, 'row');
+
+    orderLogRef.value?.handleOpen(row);
+  }
+
+  //用户绑定标签
+  const userTagRef = ref(null);
+  function openEditUserTag(row) {
+    userTagRef.value?.handleOpen(row);
+  }
+
+  function messageBoxConfirm({ message, url, row }) {
+    ElMessageBox.confirm(message, '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '关闭',
+      type: 'warning'
+    }).then(() => {
+      console.log(row, 'row');
+    });
+  }
+
+  //取消订单
+  function cancelOrder(row) {
+    messageBoxConfirm({ message: '确认取消?', url: '', row });
+  }
+  //回退状态
+  function fallbackOrder(row) {
+    messageBoxConfirm({ message: '确认回退状态?', url: '', row });
+  }
+  //确认收货
+  function materialPickup(row) {
+    messageBoxConfirm({ message: '确认收货?', url: '', row });
+  }
+  //申请拦截退回
+  function applyForInterception(row) {
+    messageBoxConfirm({ message: '确认申请拦截退回?', url: '', row });
+  }
+</script>