Browse Source

采购订单维护、采购订单生成:增加转派人、转派时间以及转派记录

002390 1 year ago
parent
commit
bdf508e953

+ 8 - 0
src/api/business/purchase/task.js

@@ -81,3 +81,11 @@ export function ROWClOSE(data) {
   });
 }
 
+export function RECORD(data) {
+  return request({
+    url: "/pu/record/list",
+    method: "POST",
+    data: data,
+  });
+}
+

+ 24 - 0
src/views/purchase/purchase-order/column.js

@@ -117,6 +117,18 @@ const PurColumns = [
     },
   },
   { 
+    item:{ key: "redeployName", title: "转派人" , width:100 ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
+    item:{ key: "redeployDate", title: "转派时间" ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
     item:{ key: "remark", title: "备注" ,},
     attr:{
       isHidden:true,
@@ -695,6 +707,18 @@ const CauseColumns = [
     },
   },
   { 
+    item:{ key: "redeployName", title: "转派人" , width: 100,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
+    item:{ key: "redeployDate", title: "转派时间" ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
     item:{ key: "remark", title: "备注" ,},
     attr:{
       isHidden:true,

+ 8 - 7
src/views/purchase/purchase-order/index.vue

@@ -32,6 +32,7 @@ export default {
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
     Retrieve: () => import("@/components/Retrieve/index.vue"),
     ZpButton: () => import("./zhuan-pai/index.vue"),
+    ZpjlButton: () => import("./zhuan-pai/record.vue"),
     QueryScheme: () => import("@/components/query-scheme/index.vue"),
   },
   data() {
@@ -722,13 +723,13 @@ export default {
 
         <el-button-group style="margin-left: 10px">
           <el-button
-            type="primary"
+          
             :size="size"
             :disabled="checkedList.length != 1"
             @click="handleCopy"
             >复制</el-button
           >
-          <el-button type="primary" :size="size" @click="handleBatchSubmit"
+          <el-button :size="size" @click="handleBatchSubmit"
             >批量提交</el-button
           >
         </el-button-group>
@@ -738,13 +739,13 @@ export default {
           :key="checkedList.length + 1"
         >
           <el-button
-            type="primary"
+          
             :size="size"
             @click="handleAllReturn"
             :disabled="judgeIsAllReturn()"
             >整单退回</el-button
           >
-          <!-- <el-button type="primary" :size="size" @click="handleAllClose" :disabled="judgeIsAllClose()">整单关闭</el-button> -->
+          <!-- <el-button :size="size" @click="handleAllClose" :disabled="judgeIsAllClose()">整单关闭</el-button> -->
         </el-button-group>
 
         <el-button-group style="margin: 0 10px">
@@ -753,10 +754,10 @@ export default {
             :key="checkedList.length"
             @click="handlePurchaseReturn"
           >采购退货</el-button> -->
-          <el-button type="primary" size="mini" @click="handlePaymentRequest"
+          <el-button size="mini" @click="handlePaymentRequest"
             >付款申请</el-button
           >
-          <el-button type="primary" size="mini" @click="handleDownload"
+          <el-button size="mini" @click="handleDownload"
             >批量导出</el-button
           >
         </el-button-group>
@@ -767,6 +768,7 @@ export default {
             @success="handleQueryList"
           >
           </zp-button>
+          <zpjl-button :size="size" :select-data="checkedList"> </zpjl-button>
         </el-button-group>
       </el-col>
     </el-row>
@@ -793,7 +795,6 @@ export default {
       @pagination="fetchList(params, page)"
       @selection-change="handleSelectionChange"
     >
-      
       <ux-table-column fixed="right" title="操作" width="180">
         <template slot-scope="scope">
           <el-button

+ 112 - 0
src/views/purchase/purchase-order/zhuan-pai/record.vue

@@ -0,0 +1,112 @@
+<!-- 转派记录 -->
+<script>
+import { RECORD } from "@/api/business/purchase/task";
+export default {
+  name: "Record",
+  props: {
+    selectData: {
+      type: [Array],
+      default: () => [],
+    },
+  },
+  components: {
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+  },
+  data() {
+    return {
+      title: "转派记录",
+      visible: false,
+      columns: [
+        {
+          item: {
+            title: "转派人名称",
+            key: "redeployName",
+          },
+          attr: {},
+        },
+        {
+          item: {
+            title: "被转派人名称",
+            key: "redeployByName",
+          },
+          attr: {},
+        },
+        {
+          item: {
+            title: "来源单据号",
+            key: "source",
+          },
+          attr: {},
+        },
+        {
+          item: {
+            title: "改派时间",
+            key: "createTime",
+          },
+          attr: {},
+        },
+      ],
+      record: [],
+    };
+  },
+  computed: {
+    disabled: {
+      get() {
+        return this.selectData.length !== 1;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    async open() {
+      try {
+        let { code, rows } = await RECORD({ source: this.selectData[0].code });
+
+        if (code == 200) {
+          this.record = rows;
+
+          rows.length && (this.visible = true);
+
+          !rows.length &&
+            this.$notify.warning({
+              title: "无转派记录",
+            });
+        }
+      } catch (error) {}
+    },
+    close() {
+      this.visible = false;
+    },
+  },
+  created() {},
+};
+</script>
+
+<template>
+  <el-button :size="$attrs.size" @click="open" :disabled="disabled">
+    {{ title }}
+    <el-dialog
+      class="zhuan-pai-record"
+      :title="title"
+      :visible.sync="visible"
+      append-to-body
+      @close="close"
+    >
+      <el-super-ux-table
+        v-model="record"
+        index
+        :size="$attrs.size"
+        :height="300"
+        :columns="columns"
+        style="width: 100%"
+      >
+      </el-super-ux-table>
+    </el-dialog>
+  </el-button>
+</template>
+
+<style lang="scss" scoped>
+::v-deep.zhuan-pai-record .el-dialog__body {
+  padding: 10px 20px 20px;
+}
+</style>

+ 12 - 0
src/views/purchase/task/columns.js

@@ -85,6 +85,18 @@ export default function useColumns() {
       item: { key: "demandDeptName", title: "需求部门",width :100 },
       attr: {},
     },
+    { 
+      item:{ key: "redeployName", title: "转派人" , width:100 ,},
+      attr:{
+        isHidden:true,
+      },
+    },
+    { 
+      item:{ key: "redeployDate", title: "转派时间" ,},
+      attr:{
+        isHidden:true,
+      },
+    },
     // {
     //   item: { 
     //     key: "isUrgency", 

+ 7 - 0
src/views/purchase/task/index.vue

@@ -13,6 +13,7 @@ export default {
     ThxqButton: () => import("./tui-hui-xu-qiu/index.vue"),
     XyzcButton: () => import("./xie-yi-zhi-cai/index.vue"),
     lcButton: () => import("./line-close/index.vue"),
+    ZpjlButton: () => import("./zhuan-pai/record.vue"),
     ElSuperTable: () => import("@/components/super-table/index.vue"),
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
@@ -156,6 +157,12 @@ export default {
           @success="useQuery(params, page)"
         >
         </zp-button>
+        <zpjl-button
+          :size="size"
+          :select-data="selectData"
+        >
+        </zpjl-button>
+
         <lc-button
           :size="size"
           :select-data="selectData"

+ 112 - 0
src/views/purchase/task/zhuan-pai/record.vue

@@ -0,0 +1,112 @@
+<!-- 转派记录 -->
+<script>
+import { RECORD } from "@/api/business/purchase/task";
+export default {
+  name: "Record",
+  props: {
+    selectData: {
+      type: [Array],
+      default: () => [],
+    },
+  },
+  components: {
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+  },
+  data() {
+    return {
+      title: "转派记录",
+      visible: false,
+      columns: [
+        {
+          item: {
+            title: "转派人名称",
+            key: "redeployName",
+          },
+          attr: {},
+        },
+        {
+          item: {
+            title: "被转派人名称",
+            key: "redeployByName",
+          },
+          attr: {},
+        },
+        {
+          item: {
+            title: "来源单据号",
+            key: "source",
+          },
+          attr: {},
+        },
+        {
+          item: {
+            title: "改派时间",
+            key: "createTime",
+          },
+          attr: {},
+        },
+      ],
+      record: [],
+    };
+  },
+  computed: {
+    disabled: {
+      get() {
+        return this.selectData.length !== 1;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    async open() {
+      try {
+        let { code, rows } = await RECORD({ source: this.selectData[0].code });
+
+        if (code == 200) {
+          this.record = rows;
+
+          rows.length && (this.visible = true);
+
+          !rows.length &&
+            this.$notify.warning({
+              title: "无转派记录",
+            });
+        }
+      } catch (error) {}
+    },
+    close() {
+      this.visible = false;
+    },
+  },
+  created() {},
+};
+</script>
+
+<template>
+  <el-button :size="$attrs.size" @click="open" :disabled="disabled">
+    {{ title }}
+    <el-dialog
+      class="zhuan-pai-record"
+      :title="title"
+      :visible.sync="visible"
+      append-to-body
+      @close="close"
+    >
+      <el-super-ux-table
+        v-model="record"
+        index
+        :size="$attrs.size"
+        :height="300"
+        :columns="columns"
+        style="width: 100%"
+      >
+      </el-super-ux-table>
+    </el-dialog>
+  </el-button>
+</template>
+
+<style lang="scss" scoped>
+::v-deep.zhuan-pai-record .el-dialog__body {
+  padding: 10px 20px 20px;
+}
+</style>