Browse Source

订单操作日志

lxf 1 year ago
parent
commit
54b88ce3b7
1 changed files with 66 additions and 0 deletions
  1. 66 0
      src/views/process/processApproval/index.vue

+ 66 - 0
src/views/process/processApproval/index.vue

@@ -19,6 +19,14 @@
             v-preReClick>
             包装配置
           </el-button>
+          <el-button
+            type="primary"
+            size="small"
+            @click="clickOrderLog()"
+            v-if="queryData.query.processType && ['10', '20'].includes(queryData.query.processType) && queryData.query.flowKey == 'order'"
+            v-preReClick>
+            订单操作日志
+          </el-button>
         </div>
         <div class="line"></div>
         <Subscribe :queryData="detailsData.data" v-if="queryData.query.flowKey == 'apply_buy'" ref="makeDom"></Subscribe>
@@ -263,10 +271,15 @@
         <el-button @click="openViewPackaging = false">关 闭</el-button>
       </template>
     </el-dialog>
+
+    <el-drawer v-model="drawerOrderLog" :direction="'rtl'">
+      <byTable :hidePagination="true" :source="logsList.data" :pagination="logsList.pagination" :config="configLogs"> </byTable>
+    </el-drawer>
   </div>
 </template>
 
 <script setup>
+import byTable from "/src/components/byTable/index";
 import useTagsViewStore from "/src/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
 import { ElMessage, ElMessageBox } from "element-plus";
@@ -690,6 +703,59 @@ const clickViewPackaging = () => {
   }
   openViewPackaging.value = true;
 };
+const logsList = ref({
+  data: [],
+  pagination: {
+    pageNum: 1,
+    pageSize: 999,
+    id: route.query.id,
+  },
+});
+const drawerOrderLog = ref(false);
+const logType = ref([
+  { dictKey: "10", dictValue: "新增订单" },
+  { dictKey: "20", dictValue: "图稿上传" },
+  { dictKey: "21", dictValue: "修改税率" },
+  { dictKey: "30", dictValue: "删除订单" },
+]);
+const configLogs = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "操作时间",
+        prop: "createTime",
+        width: 160,
+        align: "center",
+      },
+    },
+    {
+      attrs: {
+        label: "操作人",
+        prop: "userName",
+        align: "center",
+      },
+    },
+    {
+      attrs: {
+        label: "行为",
+        prop: "type",
+        width: 100,
+        align: "center",
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, logType.value);
+      },
+    },
+  ];
+});
+const clickOrderLog = () => {
+  if (route.query.id) {
+    proxy.post("/orderOperatingLog/page", logsList.value.pagination).then((res) => {
+      logsList.value.data = res.rows;
+    });
+  }
+  drawerOrderLog.value = true;
+};
 </script>
 <style lang="scss" scoped>
 .processApproval {