Browse Source

Merge remote-tracking branch 'origin/dev' into dev

shiy 1 year ago
parent
commit
492b983310
38 changed files with 3532 additions and 1109 deletions
  1. 9 0
      src/api/business/ehr/pm/flow.js
  2. 45 0
      src/api/business/ehr/pm/performance.js
  3. 27 0
      src/api/business/ehr/pm/psnrelation.js
  4. 28 1
      src/api/business/ehr/pm/stage.js
  5. 8 0
      src/api/business/purchase/task.js
  6. 9 0
      src/api/business/spd/goal_management/monthSaleGoalDetails.js
  7. 19 0
      src/api/purchase/equipmentData.js
  8. 8 0
      src/api/sso/ssoLogin.js
  9. 208 0
      src/components/PopDialog/index2.vue
  10. 1 1
      src/permission.js
  11. 5 0
      src/router/index.js
  12. 37 15
      src/views/WMS/historical-route/index.vue
  13. 201 0
      src/views/business/ehr/pm/mark/index.vue
  14. 95 36
      src/views/business/ehr/pm/performance/detail.vue
  15. 35 7
      src/views/business/ehr/pm/performance/index.vue
  16. 185 0
      src/views/business/ehr/pm/psnrelation/detail.vue
  17. 129 0
      src/views/business/ehr/pm/psnrelation/index.vue
  18. 67 16
      src/views/business/ehr/pm/stagecontrol/detail.vue
  19. 6 7
      src/views/business/ehr/pm/stagecontrol/index.vue
  20. 164 0
      src/views/business/ehr/pm/verify/index.vue
  21. 56 2
      src/views/business/spd/target/MonthSaleGoal.vue
  22. 50 0
      src/views/ehrentrance.vue
  23. 6 0
      src/views/material/changeApply/columns.js
  24. 152 145
      src/views/material/changeApply/index.vue
  25. 6 1
      src/views/material/requisition/columns.js
  26. 473 431
      src/views/material/requisition/index.vue
  27. 186 0
      src/views/purchase/equipmentData/add.vue
  28. 279 0
      src/views/purchase/equipmentData/index.vue
  29. 248 248
      src/views/purchase/purchase-order/add/column.js
  30. 56 55
      src/views/purchase/purchase-order/add/index.vue
  31. 423 95
      src/views/purchase/purchase-order/column.js
  32. 51 38
      src/views/purchase/purchase-order/edit/index.vue
  33. 11 9
      src/views/purchase/purchase-order/index.vue
  34. 2 2
      src/views/purchase/purchase-order/see/index.vue
  35. 112 0
      src/views/purchase/purchase-order/zhuan-pai/record.vue
  36. 16 0
      src/views/purchase/task/columns.js
  37. 7 0
      src/views/purchase/task/index.vue
  38. 112 0
      src/views/purchase/task/zhuan-pai/record.vue

+ 9 - 0
src/api/business/ehr/pm/flow.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+// 查询阶段详细
+export function getFlow(id) {
+  return request({
+    url: '/ehr/pm/flow/' + id,
+    method: 'get'
+  })
+}

+ 45 - 0
src/api/business/ehr/pm/performance.js

@@ -16,3 +16,48 @@ export function getPerformance(id) {
     method: 'get'
   })
 }
+
+// 保存绩效
+export function savePerformance(data) {
+  return request({
+    url: '/ehr/pm/performance/save',
+    method: 'put',
+    data: data
+  })
+}
+
+// 填写完成
+export function fillinFinish(data) {
+  return request({
+    url: '/ehr/pm/performance/fillinFinish',
+    method: 'post',
+    data: data
+  })
+}
+
+//绩效确认
+export function verify(data) {
+  return request({
+    url: '/ehr/pm/performance/verify',
+    method: 'post',
+    data: data
+  })
+}
+
+// 自评完成
+export function selfestimate(data) {
+  return request({
+    url: '/ehr/pm/performance/selfestimate',
+    method: 'post',
+    data: data
+  })
+}
+
+// 上级评论
+export function superiorevaluation(data) {
+  return request({
+    url: '/ehr/pm/performance/superiorevaluation',
+    method: 'post',
+    data: data
+  })
+}

+ 27 - 0
src/api/business/ehr/pm/psnrelation.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 查询人员关系列表
+export function listPsnrelation(query) {
+  return request({
+    url: '/ehr/pm/psnrelation/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询人员关系详细
+export function getPsnrelation(id) {
+  return request({
+    url: '/ehr/pm/psnrelation/' + id,
+    method: 'get'
+  })
+}
+
+// 保存人员关系
+export function savePsnrelation(data) {
+  return request({
+    url: '/ehr/pm/psnrelation',
+    method: 'post',
+    data: data
+  })
+}

+ 28 - 1
src/api/business/ehr/pm/stage.js

@@ -50,4 +50,31 @@ export function publishStage(data) {
     method: 'post',
     data: data
   })
-}
+}
+
+// 填写结束
+export function fillinFinish(data) {
+  return request({
+    url: '/ehr/pm/stage/fillinFinish',
+    method: 'post',
+    data: data
+  })
+}
+
+//开始自评
+export function startSelfEvaluation(data) {
+  return request({
+    url: '/ehr/pm/stage/startSelfEvaluation',
+    method: 'post',
+    data: data
+  })
+}
+
+//结束自评
+export function finishSelfEvaluation(data) {
+  return request({
+    url: '/ehr/pm/stage/finishSelfEvaluation',
+    method: 'post',
+    data: data
+  })
+}

+ 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,
+  });
+}
+

+ 9 - 0
src/api/business/spd/goal_management/monthSaleGoalDetails.js

@@ -53,4 +53,13 @@ export function importData(data) {
       'Content-Type': 'multipart/form-data'
     }
   })
+}
+
+//查询物料
+export function getMaterialRangeList(data) {
+  return request({
+    url: `/goal_management/monthSaleGoalDetails/getMaterialRangeList`,
+    method: 'post',
+    data: data
+  })
 }

+ 19 - 0
src/api/purchase/equipmentData.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 设备产品数据库列表
+export function getEquipmentDataList(data) {
+  return request({
+    url: `device/origin/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 设备产品数据库模板下载
+export function downLoadMb(data) {
+  return request({
+    url: `device/origin/download`,
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}

+ 8 - 0
src/api/sso/ssoLogin.js

@@ -7,4 +7,12 @@ export function sso(data) {
     method: 'post',
     data: data
   })
+}
+
+//根据员工工号获取token
+export function ehrLogin(code) {
+  return request({
+    'url': '/login/ehr/' + code,
+    'method': 'get',
+  })
 }

+ 208 - 0
src/components/PopDialog/index2.vue

@@ -0,0 +1,208 @@
+<template>
+  <div>
+    <el-dialog title="物料编码选择" width="1000px" :close-on-click-modal="false" :append-to-body="true" v-dialogDrag
+      class="userDialog" :visible.sync="visible">
+      <el-container style="height: 500px">
+        <el-container>
+          <el-header style="text-align: left; font-size: 12px; height: 30px">
+            <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()"
+              @submit.native.prevent>
+              <el-form-item prop="code">
+                <el-input size="small" v-model.trim="searchForm.code" placeholder="请输入物料编号查询" clearable></el-input>
+              </el-form-item>
+              <el-form-item prop="name">
+                <el-input size="small" v-model="searchForm.name" placeholder="请输入物料名称查询" clearable></el-input>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+              </el-form-item>
+            </el-form>
+          </el-header>
+          <el-main>
+            <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable"
+              @select="handleSelectionChange" :selection="selectedRows"  height="calc(100% - 40px)" style="width: 100%">
+              <el-table-column type="selection" header-align="center" align="center" width="50">
+              </el-table-column>
+              <el-table-column prop="code" header-align="center" align="center" sortable="custom" min-width="90"
+                label="物料编码">
+              </el-table-column>
+              <el-table-column prop="name" header-align="center" align="center" sortable="custom" min-width="90"
+                label="物料名称">
+              </el-table-column>
+              <el-table-column prop="specification" header-align="center" align="center" sortable="custom" min-width="90"
+                label="规格">
+              </el-table-column>
+              <el-table-column prop="model" header-align="center" align="center" sortable="custom" min-width="90"
+                label="型号">
+              </el-table-column>
+              <el-table-column prop="manufacturerIdName" header-align="center" align="center" sortable="custom" min-width="90"
+                label="生产厂家">
+              </el-table-column>
+            </el-table>
+
+            <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
+              :current-page="searchForm.pageNo" :page-sizes="[5, 10, 15, 20]" :page-size="searchForm.pageSize"
+              :total="total" layout="total, sizes, prev, pager, next, jumper">
+            </el-pagination>
+          </el-main>
+        </el-container>
+      </el-container>
+      <span slot="footer">
+        <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+        <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import axios from 'axios'
+import { getMaterialList } from '@/api/changeApply/basic'
+export default {
+  data() {
+    return {
+      searchForm: {
+        code: '',
+        name: '',
+        isSync: '',
+        pageNo: 1,
+        pageSize: 10,
+      },
+      dataListAllSelections: [], // 所有选中的数据包含跨页数据
+      idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+      dataList: [],
+      total: 0,
+      orders: [],
+      loading: false,
+      visible: false,
+      selectedRows:[]
+    };
+  },
+  props: {
+    selectData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // 是否启用单选
+    single: {
+      type: Boolean,
+      default: true
+    }
+  },
+  methods: {
+    init(val) {
+      this.visible = true;
+      this.searchForm.isSync = val
+      this.$nextTick(() => {
+        this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData));
+        this.resetSearch();
+      });
+    },
+    // 获取数据列表
+    refreshList() {
+      this.loading = true;
+      // axios({
+      //   url: "http://172.16.62.241:8000/drp-admin/system/material/list", // 自己的接口路径
+      //   method: "post",
+      //   data: {
+      //     // current: this.pageNo,
+      //     size: this.pageSize,
+      //     // orders: this.orders,
+      //     // ...this.searchForm,
+      //   },
+      let params = {
+        ...this.searchForm,
+        // 默认查询已启用
+        isEnable: '0'
+      }
+      getMaterialList(params).then(({ data }) => {
+        console.log('data', data)
+        this.dataList = data.tableBody.rows;
+        this.total = data.tableBody.total;
+        this.loading = false;
+        this.$nextTick(() => {
+          this.setSelectRow();
+        });
+      });
+    },
+    // 每页数
+    sizeChangeHandle(val) {
+      console.log('每页数:', val)
+      this.searchForm.pageSize = val;
+      this.refreshList();
+    },
+    // 当前页
+    currentChangeHandle(val) {
+      console.log('当前页:', val)
+      this.searchForm.pageNo = val;
+      this.refreshList();
+    },
+    // 排序
+    resetSearch() {
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
+      this.refreshList();
+    },
+    watchSel(rows) {
+      console.log('监听得到选中吗', rows)
+      this.dataListAllSelections = rows
+    },
+    // 表格选中数据
+    rowSelect(row) {
+      // this.$refs.contractTable.clearSelection();
+      // this.$refs.contractTable.toggleRowSelection(row);
+      // this.dataListAllSelections = this.single ? [row] : selection
+      this.$refs.contractTable.toggleRowSelection(row);
+    },
+    // 选中数据
+    handleSelectionChange(selection, row) {
+      console.log('selection',selection)
+      console.log('row',[row])
+      if (this.single && selection.length > 1) {
+        this.$refs.contractTable.clearSelection();
+        this.$refs.contractTable.toggleRowSelection(row);
+      }
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
+    // 设置选中的方法
+    setSelectRow() {
+      this.$refs.contractTable.clearSelection();
+      if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+        return;
+      }
+      for (let i = 0; i < this.dataList.length; i++) {
+        if (this.dataListAllSelections.some(item => item[this.idKey] == this.dataList[i][this.idKey])) {
+          // 设置选中,记住table组件需要使用ref="table"
+          this.$refs.contractTable.toggleRowSelection(this.dataList[i], true);
+        }
+      }
+    },
+    doSubmit() {
+      this.visible = false;
+      console.log('选择的数据?', this.dataListAllSelections)
+      this.$emit("doSubmit", this.dataListAllSelections);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.userDialog {
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+
+  .el-main {
+    padding: 20px 20px 5px 20px;
+
+    .el-pagination {
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 1 - 1
src/permission.js

@@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
 
 NProgress.configure({ showSpinner: false })
 
-const whiteList = ['/login', '/register', '/test01', '/canteenAddFood', '/canteenAddMenu', '/menuScreen', '/foodScreen','/business/wms/historical-route']
+const whiteList = ['/login', '/register', '/test01', '/ehrentrance', '/canteenAddFood', '/canteenAddMenu', '/menuScreen', '/foodScreen','/business/wms/historical-route']
 
 router.beforeEach((to, from, next) => {
   NProgress.start()

+ 5 - 0
src/router/index.js

@@ -57,6 +57,11 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/ehrentrance',
+    component: () => import('@/views/ehrentrance'),
+    hidden: true
+  },
+  {
     path: '/canteenAddFood',
     component: () => import('@/views/canteen/addFood'),
     hidden: true

+ 37 - 15
src/views/WMS/historical-route/index.vue

@@ -213,6 +213,7 @@
                 data: [],
                 type: "line",
                 smooth: true,
+                showSymbol: false,
                 label: {
                   show: true,
                   position: "top",
@@ -245,6 +246,7 @@
                   data: [],
                   type: "line",
                   smooth: true,
+                  showSymbol: false,
                   label: {
                     show: true,
                     position: "top",
@@ -266,7 +268,7 @@
               }
               console.log(this.option.series, 'this.option.series');
             }
-            // 如果车辆温度数组为空,则其它数组前移一位
+            //如果车辆温度数组为空,则其它数组前移一位
             for (let i = 1;;) {
               if (this.option.series[0].data.length == 0) {
                 for (let j = 0; j < this.option.series.length - i; j++) {
@@ -299,16 +301,22 @@
       //地图初始化
       initMap() {
         AMapLoader.load({
-            key: 'f953210b2d5276ffbf5a2bc01ef80f55', // 申请好的Web端开发者Key,首次调用 load 时必填
-            version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
-            plugins: [''] // 需要使用的的插件列表,如比例尺'AMap.Scale'等
+            //申请好的Web端开发者Key,首次调用 load 时必填
+            key: 'f953210b2d5276ffbf5a2bc01ef80f55',
+            //指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+            version: '2.0',
+            //需要使用的的插件列表,如比例尺'AMap.Scale'等
+            plugins: ['']
           })
           .then(AMap => {
             this.map = new AMap.Map('container', {
               //设置地图容器id
-              viewMode: '3D', //是否为3D地图模式
-              zoom: 13, //初始化地图级别
-              center: [112.976376, 28.195318] //初始化地图中心点位置
+              //是否为3D地图模式
+              viewMode: '3D',
+              //初始化地图级别
+              zoom: 13,
+              //初始化地图中心点位置
+              center: [112.976376, 28.195318]
             })
           })
           .catch(e => {
@@ -322,8 +330,10 @@
           resizeEnable: true
         });
         map.plugin("AMap.DragRoute", function () {
-          route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE); //构造拖拽导航类
-          route.search(); //查询导航路径并开启拖拽导航
+          //构造拖拽导航类
+          route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE);
+          //查询导航路径并开启拖拽导航
+          route.search();
         });
       },
       //图表属性赋值
@@ -342,23 +352,35 @@
           xAxis: {
             data: this.xData
           },
-          legend: { // 图例
+          //图例
+          legend: {
             data: [],
             // bottom: "0%"
           },
           yAxis: {},
-          dataZoom: [ //加上dataZoom可实现缩放
-            {
-              type: 'slider', //x轴
+          //加上dataZoom可实现缩放
+          dataZoom: [{
+              //x轴
+              type: 'slider',
               xAxisIndex: 0,
 
             },
             {
-              type: 'inside', //x轴
+              //x轴
+              type: 'inside',
               xAxisIndex: 0,
-              zoomOnMouseWheel: 'true', //如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。'shift':表示按住 shift 和鼠标滚轮能触发缩放。'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。
+              /**
+               * 如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。
+               * 'shift':表示按住 shift和鼠标滚轮能触发缩放。
+               * 'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。
+               */
+              zoomOnMouseWheel: 'true',
             },
           ],
+          /**
+           * series中的参数:
+           * smooth:是否曲线,showSymbol:是否显示数据和数据点
+           */
           series: [],
         }
       },

+ 201 - 0
src/views/business/ehr/pm/mark/index.vue

@@ -0,0 +1,201 @@
+<template>
+  <div>
+    <el-card v-if="flow.staff == this.$store.state.user.name">
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效考核表</span>
+        <div style="float: right; padding: 3px 0" type="text" v-if="flow.status == 0">
+          <el-button size="mini" plain @click="btnTurnDown(1)">驳回</el-button>
+          <el-button size="mini" type="primary" plain @click="btnverify(2)">评写完成</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-descriptions :column="6 ">
+          <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+          <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+          <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+          <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+          <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+          <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+          <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
+          <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
+        </el-descriptions>
+        <el-descriptions v-if="form.status > 3">
+          <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
+        </el-descriptions>
+        <div>
+          评语<el-input type="textarea" v-model="form.comment"></el-input>
+        </div>
+        <div style="float:right">
+          <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
+        </div>
+        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+            </template>
+          </el-table-column>
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions" />
+          <el-table-column width="100" label="角色" align="center" prop="role">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
+            </template>
+          </el-table-column>
+          <el-table-column width="80" label="权重" align="center" prop="weight"/>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard" />
+          <el-table-column width="100" label="数据来源" align="center" prop="source" />
+          <el-table-column width="80" label="自评分" align="center" prop="selfScoring"/>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment"/>
+          <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring">
+            <template slot-scope="scope">
+              <el-input size="mini" v-model="scope.row.leaderScoring"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment">
+            <template slot-scope="scope">
+              <el-input size="mini" type="textarea" v-model="scope.row.leaderComment"></el-input>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-card>
+
+    <el-dialog title="" :visible.sync="turnDownOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
+      <el-form size="mini" label-position="right" ref="flow" :model="flow" :rules="flowRules" label-width="80px">
+        <el-form-item label="驳回原因" prop="result">
+          <el-input type="textarea" v-model="flow.result"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="btnTurnDownClose">取 消</el-button>
+        <el-button size="mini" type="primary" @click="btnTurnDownConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getPerformance,superiorevaluation,savePerformance} from "@/api/business/ehr/pm/performance";
+import { getFlow} from "@/api/business/ehr/pm/flow";
+
+export default {
+  name: "verify",
+  dicts: ['ehr_pm_aspect','ehr_pm_role'],
+  data() {
+    return {
+      //遮罩层
+      loading: true,
+      //表单
+      form:{},
+      //流程数据
+      flow:{},
+      //流程数据规则
+      flowRules:{
+        result: [
+          { required: true, message: "驳回原因不能为空", trigger: "blur" },
+        ],
+      },
+      //是否展开
+      isUnfold:false,
+      //是否显驳回弹出层
+      turnDownOpen:false,
+    };
+  },
+  created() {
+    console.log("this.$route.query.code",this.$route.query.code);
+    console.log("this.$route.query.performanceId",this.$route.query.performanceId);
+    console.log("this.$route.query.flowId",this.$route.query.flowId);
+    this.fetchPerformance(this.$route.query.performanceId);
+    this.fetchFlow(this.$route.query.flowId);
+  },
+  methods: {
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //查询流程详情
+    async fetchFlow(id){
+      this.loading = true;
+      await getFlow(id).then(res => {
+        if (res.code === 200) {
+          this.flow = res.data;
+         }
+         this.loading = false;
+      })
+    },
+    //展开/收起
+    btnUnfold(){
+      this.isUnfold = !this.isUnfold;
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let val = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = val;
+      return ['合计','','','',val];
+    },
+    //驳回
+    btnTurnDown(){
+      this.turnDownOpen = true;
+    },
+    //驳回取消
+    btnTurnDownClose(){
+      this.turnDownOpen = false;
+    },
+    //驳回确认
+    btnTurnDownConfirm(){
+      this.$refs["flow"].validate(valid => {
+        if (valid) {
+          this.btnverify(1);
+          this.turnDownOpen = false;
+        }
+      });
+    },
+    //评写完成
+    async btnverify(val){
+      if(val == 2){
+        let v = false;
+        this.form.performanceItem.forEach((item) => {
+          if(!item.leaderScoring || !item.leaderComment){
+            v = true;
+          }
+        });
+        if(v){
+          this.$modal.msgWarning("请评分后再提交!");
+          return;
+        }
+        if(!this.form.comment){
+          this.$modal.msgWarning("请填写评语再提交!");
+          return;
+        }
+      }
+      //保存绩效数据
+      let r = await savePerformance(this.form);
+      console.log("r",r);
+      this.flow.status = val;
+      await superiorevaluation(this.flow).then(res => {
+        if (res.code === 200) {
+          this.fetchPerformance(this.$route.query.performanceId);
+          this.fetchFlow(this.$route.query.flowId);
+          this.$modal.msgSuccess("已确认");
+        }
+        this.loading = false;
+      })
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 95 - 36
src/views/business/ehr/pm/performance/detail.vue

@@ -5,63 +5,77 @@
         <span style="font-weight:bold">绩效考核表</span>
         <div style="float: right; padding: 3px 0" type="text">
           <el-button size="mini" plain @click="btnBack">返回</el-button>
-          <el-button size="mini" plain @click="btnSubmit">提交</el-button>
-          <el-button size="mini" plain @click="btnCopyItem">复制指标</el-button>
-          <el-button size="mini" plain @click="btnLog">指标修改记录</el-button>
-          <el-button size="mini" plain @click="btnPreviou">上一个</el-button>
-          <el-button size="mini" plain @click="btnNext">下一个</el-button>
+          <el-button size="mini" plain @click="btnSubmit" v-if="this.$store.state.user.name == form.staff && (form.status == '0' || form.status == '3')">提交</el-button>
+          <el-button size="mini" plain @click="btnCopyItem"  v-if="this.$store.state.user.name == form.staff && form.status == '0'">复制指标</el-button>
+          <!-- <el-button size="mini" plain @click="btnLog">指标修改记录</el-button> -->
+          <el-button size="mini" plain @click="btnApproveLog">指标审批记录</el-button>
+          <el-button size="mini" plain @click="btnPreviou" v-if="ids">上一个</el-button>
+          <el-button size="mini" plain @click="btnNext" v-if="ids">下一个</el-button>
         </div>
       </div>
       <div v-loading="loading">
-        <el-descriptions :column="4">
+        <el-descriptions :column="6 ">
           <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
-          <el-descriptions-item label="一级部门">{{form.year}}</el-descriptions-item>
-          <el-descriptions-item label="二级部门">{{form.startTime}}</el-descriptions-item>
-          <el-descriptions-item label="三级部门">{{form.deadlineTime}}</el-descriptions-item>
-          <el-descriptions-item label="职位">{{form.deadlineTime}}</el-descriptions-item>
-          <el-descriptions-item label="评估周期">{{form.year}}</el-descriptions-item>
+          <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+          <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
           <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
         </el-descriptions>
-        <el-descriptions :column="4">
-          <el-descriptions-item label="个人总结">{{form.deadlineTime}}</el-descriptions-item>
+        <el-descriptions v-if="form.status > 3">
+          <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
         </el-descriptions>
-        <el-descriptions :column="4">
-          <el-descriptions-item label="评语">{{form.year}}</el-descriptions-item>
+        <div v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+          个人总结<el-input type="textarea" v-model="form.summary"></el-input>
+        </div>
+        <el-descriptions v-if="form.status > 4">
+          <el-descriptions-item label="评语">{{form.comment}}</el-descriptions-item>
         </el-descriptions>
         <div style="float:right">
-          <el-button type="primary" size="mini" @click="btnAddRow">增加指标</el-button>
+          <el-button type="primary" size="mini" @click="btnAddRow" v-if="this.$store.state.user.name == form.staff && form.status == '0'">增加指标</el-button>
           <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
         </div>
         <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
-          <el-table-column label="评估方面" align="center" prop="aspect">
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
             </template>
           </el-table-column>
-          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
           <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions" />
-          <!-- <el-table-column label="评估指标" align="center" prop="target" />
-          <el-table-column label="评估说明" align="center" prop="instructions" /> -->
-          <el-table-column label="角色" align="center" prop="role">
+          <el-table-column width="100" label="角色" align="center" prop="role">
             <template slot-scope="scope">
-              <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.aspect"/>
+              <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
             </template>
           </el-table-column>
-          <el-table-column label="权重(%)" align="center" prop="weight" sortable/>
+          <el-table-column width="80" label="权重" align="center" prop="weight"/>
           <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard" />
-          <!-- <el-table-column label="绩效标准" align="center" prop="standard" /> -->
-          <el-table-column label="数据来源" align="center" prop="source" />
-          <el-table-column label="自评分(0-100)" align="center" prop="selfScoring" />
-          <el-table-column label="自评语" align="center" prop="selfComment" />
-          <el-table-column label="上级评分(0-100)" align="center" prop="leaderScoring" />
-          <el-table-column label="上级评语" align="center" prop="leaderComment" />
-          <el-table-column label="加权得分" align="center" prop="weightedScore" />
-          <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
-          <template slot-scope="scope">
+          <el-table-column width="100" label="数据来源" align="center" prop="source" />
+
+          <el-table-column width="80" label="自评分" align="center" prop="selfScoring" v-if="form.status > 3"/>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment" v-if="form.status > 3"/>
+          <el-table-column width="80" label="自评分" align="center" prop="selfScoring" v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+            <template slot-scope="scope">
+              <el-input size="mini" v-model="scope.row.selfScoring"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment" v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+            <template slot-scope="scope">
+              <el-input size="mini" type="textarea" v-model="scope.row.selfComment"></el-input>
+            </template>
+          </el-table-column>
+
+          <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring" v-if="form.status > 4"/>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment" v-if="form.status > 4"/>
+          <el-table-column width="80" label="加权得分" align="center" prop="weightedScore" v-if="form.status > 4"/>
+        
+          <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" v-if="this.$store.state.user.name == form.staff && form.status == '0'">
+            <template slot-scope="scope">
               <el-button size="mini" type="text" @click="btnEdit(scope.row)">修改</el-button>
               <el-button size="mini" type="text" @click="btnDelete(scope.row)">删行</el-button>
             </template>
@@ -121,8 +135,8 @@
 </template>
 
 <script>
-import { getPerformance} from "@/api/business/ehr/pm/performance";
-import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
+import { getPerformance,fillinFinish,selfestimate} from "@/api/business/ehr/pm/performance";
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,batchUpdatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
 
 export default {
   name: 'detail',
@@ -282,8 +296,49 @@ export default {
     },
     //提交
     btnSubmit(){
-      if(this.weightSum != 100){
-        this.$modal.msgWarning("权重不为100%无法提交!");
+      if(this.form.status == '0'){
+        if(this.weightSum != 100){
+          this.$modal.msgWarning("权重不为100%无法提交!");
+          return;
+        }
+        this.$confirm('确认提交吗?', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'success'
+        }).then(() => {
+          fillinFinish(this.form).then(response => {
+            this.$modal.msgSuccess("保存成功");
+            this.fetchPerformance(this.id);
+          });
+        }).catch(() => {      
+        });
+      }
+      if(this.form.status == '3'){
+        let v = false;
+        this.form.performanceItem.forEach((item) => {
+          if(!item.selfScoring || !item.selfComment){
+            v = true;
+          }
+        });
+        if(v){
+          this.$modal.msgWarning("请自评后再提交!");
+          return;
+        }
+        if(!this.form.summary){
+          this.$modal.msgWarning("请填写个人总结再提交!");
+          return;
+        }
+        this.$confirm('确认提交吗?', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'success'
+        }).then(() => {
+          selfestimate(this.form).then(response => {
+            this.$modal.msgSuccess("保存成功");
+            this.fetchPerformance(this.id);
+          });
+        }).catch(() => {      
+        });
       }
     },
     //复制指标
@@ -294,6 +349,10 @@ export default {
     btnLog(){
 
     },
+    //指标审批记录
+    btnApproveLog(){
+      
+    }
   }
 }
 </script>

+ 35 - 7
src/views/business/ehr/pm/performance/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="app-container" v-if="isList">
-      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" label-width="68px">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
         <el-form-item label="员工" prop="staffName">
           <el-input
             v-model="queryParams.staffName"
@@ -9,6 +9,28 @@
             @keyup.enter.native="btnSearch"
           />
         </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-select
+            size="mini"
+            v-model="queryParams.status"
+            placeholder=""
+            clearable
+          >
+            <el-option
+              v-for="dict in dict.type.ehr_pm_status"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="月份" prop="month">
+          <el-date-picker type="month" value-format="yyyy-MM" v-model="queryParams.month">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="只看自己的">
+          <el-checkbox v-model="queryParams.params.oneself"></el-checkbox>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="btnSearch">搜索</el-button>
           <el-button icon="el-icon-refresh" size="mini" @click="btnResetQuery">重置</el-button>
@@ -16,19 +38,20 @@
       </el-form>
       <div style="float:right">
         <el-button type="primary" size="mini" @click="btnResetQuery">本月绩效</el-button>
+        <el-button type="primary" size="mini" @click="btnResetQuery">下月绩效</el-button>
       </div>
       <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnDetails">
+        <el-table-column label="编号" align="center" prop="id" />
         <el-table-column label="员工姓名" align="center" prop="staffName" />
         <el-table-column label="评估周期" align="center" prop="name" />
-        <el-table-column label="开始日期" align="center" prop="" />
-        <el-table-column label="结束日期" align="center" prop="" />
+        <el-table-column label="月度" align="center" prop="month" />
         <el-table-column label="权重" align="center" prop="weight" />
         <el-table-column label="得分" align="center" prop="mark" />
         <el-table-column label="等级" align="center" prop="grade" />
         <el-table-column label="绩效系数" align="center" prop="" />
-        <el-table-column label="状态" align="center" prop="result" >
+        <el-table-column label="状态" align="center" prop="status" >
           <template slot-scope="scope">
-            <dict-tag :options="dict.type.mk_bo_behavior_res" :value="scope.row.result"/>
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
           </template>
         </el-table-column>
         <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
@@ -62,7 +85,7 @@ import { listPerformance} from "@/api/business/ehr/pm/performance";
 
 export default {
   name: "assess",
-  dicts: ['mk_bo_behavior_res','mk_bo_behavior_type','sys_yes_no','mk_bo_behavior_goal','mk_bo_signintype'],
+  dicts: ['ehr_pm_status'],
   components: {detail},
   data() {
     return {
@@ -84,7 +107,12 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        params:{
+          oneself: true,
+        },
         staffName: null,
+        status: null,
+        month: null,
       },
       // 查询日期范围
       dateRange: [],
@@ -124,12 +152,12 @@ export default {
     };
   },
   created() {
-    // this.queryParams.params = {source:"list"};
     this.getList();
   },
   methods: {
     /** 查询绩效列表 */
     getList() {
+      console.log('this.queryParams',this.queryParams);
       this.loading = true;
       listPerformance(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         this.listData = response.rows;

+ 185 - 0
src/views/business/ehr/pm/psnrelation/detail.vue

@@ -0,0 +1,185 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">评估关系</span>
+        <div style="float: right; padding: 3px 0" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <el-button size="mini" plain @click="btnPreviou">上一个</el-button>
+          <el-button size="mini" plain @click="btnNext">下一个</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-descriptions :column="6 ">
+          <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+          <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+        </el-descriptions>
+
+        <el-table size="mini" :data="form.psnrelationItem" v-if="pageState == 'see'">
+          <el-table-column width="50" label="序号" align="center" type="index" />
+          <el-table-column width="300" label="评估人编码" align="center" prop="staff" />
+          <el-table-column width="300" label="评估人名称" align="center" prop="staffName" />
+        </el-table>
+
+        <div style="float:right" v-if="pageState != 'see'">
+          <el-button type="primary" size="mini" @click="btnAddRow">新增</el-button>
+        </div>
+        <el-table size="mini" :data="form.psnrelationItem" v-if="pageState != 'see'">
+          <el-table-column width="50" label="序号" align="center" type="index" />
+          <el-table-column width="300" label="评估人编码" align="center" prop="staff" />
+          <el-table-column width="300" label="评估人名称" align="center">
+            <template slot-scope="scope">
+              <el-popover-select-v2 size="mini" v-model="form.psnrelationItem[scope.$index].staffName" title="员工" valueKey="name"
+                referName="CONTACTS_PARAM" :dataMapping="{staff:'code',staffName: 'name'}"
+                :source.sync="form.psnrelationItem[scope.$index]">
+              </el-popover-select-v2>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button size="mini" type="text" @click="btnMoveUp(scope.row)">上移</el-button>
+              <el-button size="mini" type="text" @click="btnMoveDown(scope.row)">下移</el-button>
+              <el-button size="mini" type="text" @click="btnDelete(scope.row)">删行</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="footer">
+        <el-button type="primary" size="mini" plain @click="btnEdit" v-if="pageState == 'see'">修改</el-button>
+        <el-button size="mini" plain @click="btnCancel" v-if="pageState != 'see'">取消</el-button>
+        <el-button type="primary" size="mini" plain @click="btnSave" v-if="pageState != 'see'">保存</el-button>
+      </div>
+    </el-card>
+
+  </div>
+</template>
+
+<script>
+import { getPsnrelation,savePsnrelation} from "@/api/business/ehr/pm/psnrelation";
+  import ElPopoverSelectV2 from "@/components/popover-select-v2"
+export default {
+  name: 'detail',
+  dicts: ['ehr_pm_aspect','ehr_pm_role'],
+  props: ['enterState','rowId',"ids"],
+  components: { ElPopoverSelectV2},
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return {
+      //id
+      id:null,
+      //表单
+      form:{},
+      //表单校验规则
+      formRules:{
+      },
+      //遮罩
+      loading: false,
+      //页面状态
+      pageState: null,
+    }
+  },
+  async created() {
+    this.pageState = this.enterState;
+    this.id = this.rowId;
+    this.fetchPsnrelation(this.id);
+    if(this.enterState == 'add'){
+    }
+    if(this.enterState == 'edit' || this.enterState == 'see') {
+    }
+  },
+  watch: {
+  },
+  methods: {
+    //返回
+    btnBack(){
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    //查询详情
+    async fetchPsnrelation(id){
+      this.loading = true;
+      await getPsnrelation(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //新增
+    btnAddRow(){
+      this.form.psnrelationItem.push({delFlag: 0});
+    },
+    //上移
+    btnMoveUp(){
+
+    },
+    //下移
+    btnMoveDown(){
+
+    },
+    //删除
+    btnDelete(){
+
+    },
+    //修改
+    btnEdit(){
+      this.pageState = "edit";
+    },
+    //取消
+    btnCancel(){
+      if(this.enterState == 'add'){
+        this.btnBack();
+      }else{
+        this.fetchPsnrelation(this.id);
+        this.pageState = "see";
+      }
+    },
+    //保存
+    btnSave(){
+      savePsnrelation(this.form).then(response => {
+        this.$modal.msgSuccess("保存成功");
+        this.pageState = "see";
+      });
+    },
+    //上一个
+    btnPreviou(){
+      let i = this.ids.indexOf(this.id) - 1;
+      if(i > -1){
+        let id = this.ids[i];
+        this.fetchPsnrelation(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页第一条了!");
+      }
+    },
+    //下一个
+    btnNext(){
+      let i = this.ids.indexOf(this.id) + 1;
+      if(i < this.ids.length){
+        let id = this.ids[i];
+        this.fetchPsnrelation(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页最后一条了!");
+      }
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.footer {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  text-align: right;
+}
+.hang ::v-deep .el-form-item__content {
+  margin-left: 0px !important;
+}
+</style>

+ 129 - 0
src/views/business/ehr/pm/psnrelation/index.vue

@@ -0,0 +1,129 @@
+<template>
+  <div>
+    <div class="app-container" v-if="isList">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-form-item label="员工" prop="staffName">
+          <el-input
+            v-model="queryParams.staffName"
+            clearable
+            @keyup.enter.native="btnSearch"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="btnSearch">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="btnResetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnDetails">
+        <el-table-column label="员工编号" align="center" prop="staff" />
+        <el-table-column label="员工姓名" align="center" prop="staffName" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnDetails(scope.row)"
+            >详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="paginationClass">
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+    <detail v-model="isList" v-if="!isList" :enterState="page" :rowId="rowId" :ids="ids" @refresh="refresh" />
+  </div>
+</template>
+
+<script>
+import detail from './detail.vue'
+import { listPsnrelation} from "@/api/business/ehr/pm/psnrelation";
+export default {
+  name: "psnrelation",
+  components: {detail},
+  data() {
+    return {
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // id集合
+      ids: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        staffName: null,
+      },
+      //页面显示
+      isList: true,
+      //页面状态
+      page: '',
+      //详情id
+      rowId: '',
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPsnrelation(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.ids = response.rows.map(item => item.id);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    btnSearch() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    btnResetQuery() {
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.btnSearch();
+    },
+    /** 刷新 */
+    refresh(){
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.getList();
+    },
+    /** 进入详情 */
+    btnDetails(row){
+      this.rowId = row.id;
+      this.page = 'see';
+      this.isList = false;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 67 - 16
src/views/business/ehr/pm/stagecontrol/detail.vue

@@ -5,7 +5,10 @@
         <span style="font-weight:bold">阶段控制</span>
         <div style="float: right; padding: 3px 0" type="text" v-if="pageState == 'see'">
           <el-button size="mini" plain @click="btnBack">返回</el-button>
-          <el-button size="mini" type="primary" plain @click="btnPublish" v-if="form.stage == '0'">发布</el-button>
+          <el-button size="mini" type="primary" plain @click="btnPublish" v-if="form.isPublish == 'N'">发布</el-button>
+          <el-button size="mini" type="primary" plain @click="btnFillinFinish" v-if="form.isPublish == 'Y' && form.stage == '0'">结束填写</el-button>
+          <el-button size="mini" type="primary" plain @click="btnStartSelfEvaluation" v-if="form.stage == '2'">开始自评</el-button>
+          <el-button size="mini" type="primary" plain @click="btnFinishSelfEvaluation" v-if="form.stage == '3'">结束自评</el-button>
           <el-button size="mini" plain @click="btnPreviou">上一个</el-button>
           <el-button size="mini" plain @click="btnNext">下一个</el-button>
         </div>
@@ -14,7 +17,11 @@
         <el-descriptions :column="4" v-if="pageState == 'see'">
           <el-descriptions-item label="名称">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="月份">{{form.month}}</el-descriptions-item>
-          <el-descriptions-item label="阶段">{{form.stage}}</el-descriptions-item>
+          <el-descriptions-item label="阶段" style="margin-left:27px">
+            <div v-for="dict in dict.type.ehr_pm_status" v-if="form.stage == dict.value">
+              <div>{{ dict.label }}</div>
+            </div>
+          </el-descriptions-item>
         </el-descriptions>
         <el-form size="mini" label-position="right" ref="form" :model="form" :rules="formRules" :inline="true" class="demo-form-inline" v-if="pageState != 'see'">
           <el-row>
@@ -25,13 +32,13 @@
             </el-col>
             <el-col span="6">
               <el-form-item label="月份" prop="yearMonth">
-                <el-date-picker type="month" v-model="form.month">
+                <el-date-picker type="month" value-format="yyyy-MM" v-model="form.month">
                 </el-date-picker>
               </el-form-item>
             </el-col>
           </el-row>
         </el-form>
-        <div class="foot">
+        <div class="footer" v-if="form.isPublish == 'N'">
           <el-button type="primary" size="mini" plain @click="btnEdit" v-if="pageState == 'see'">修改</el-button>
           <el-button size="mini" plain @click="btnCancel" v-if="pageState != 'see'">取消</el-button>
           <el-button type="primary" size="mini" plain @click="btnSave" v-if="pageState != 'see'">保存</el-button>
@@ -43,11 +50,11 @@
 </template>
 
 <script>
-import { getStage,addStage,updateStage,publishStage} from "@/api/business/ehr/pm/stage";
+import { getStage,addStage,updateStage,publishStage,fillinFinish,startSelfEvaluation,finishSelfEvaluation} from "@/api/business/ehr/pm/stage";
 
 export default {
   name: 'detail',
-  dicts: ['ehr_pm_aspect',],
+  dicts: ['ehr_pm_status',],
   props: ['enterState','rowId',"ids"],
   model: {
     prop: 'isList',
@@ -78,6 +85,7 @@ export default {
     this.pageState = this.enterState;
     if(this.enterState == 'add'){
       this.form.stage = 0;
+      this.form.isPublish = 'N';
     }
     if(this.enterState == 'edit' || this.enterState == 'see') {
       this.id = this.rowId;
@@ -125,16 +133,59 @@ export default {
     },
     //发布
     btnPublish(){
-      publishStage(this.form).then(response => {
-        this.$modal.msgSuccess("发布成功");
+      this.$confirm('确认要发布吗?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'success'
+      }).then(() => {
+        publishStage(this.form).then(response => {
+          this.fetchStage(this.id);
+          this.$modal.msgSuccess("发布成功");
+        });
+      }).catch(() => {      
+      });
+    },
+    //填写结束
+    btnFillinFinish(){
+      this.$confirm('确认要结束填写吗?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'success'
+      }).then(() => {
+        fillinFinish(this.form).then(response => {
+          this.fetchStage(this.id);
+          this.$modal.msgSuccess("保存成功");
+        });
+      }).catch(() => {      
+      });
+    },
+    //开始自评
+    btnStartSelfEvaluation(){
+      this.$confirm('确认要开启自评吗?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'success'
+      }).then(() => {
+        startSelfEvaluation(this.form).then(response => {
+          this.fetchStage(this.id);
+          this.$modal.msgSuccess("开启成功");
+        });
+      }).catch(() => {      
+      });
+    },
+    //结束自评
+    btnFinishSelfEvaluation(){
+      this.$confirm('确认要结束评分吗?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'success'
+      }).then(() => {
+        finishSelfEvaluation(this.form).then(response => {
+          this.fetchStage(this.id);
+          this.$modal.msgSuccess("结束成功");
+        });
+      }).catch(() => {      
       });
-      // console.log(111);
-      // this.$modal.confirm('确认要发布吗?').then(function() {
-      //   console.log(222);
-      //   return publishStage(this.form);
-      // }).then(() => {
-      //   this.$modal.msgSuccess("发布成功");
-      // }).catch(() => {});
     },
     //修改
     btnEdit(){
@@ -171,7 +222,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.foot {
+.footer {
   z-index: 500;
   position: fixed;
   bottom: 10px;

+ 6 - 7
src/views/business/ehr/pm/stagecontrol/index.vue

@@ -20,14 +20,13 @@
       <el-table size="mini" v-loading="loading" :data="listData" height="500px" @row-dblclick="btnDetails">
         <el-table-column label="编号" align="center" prop="id" />
         <el-table-column label="名称" align="center" prop="name" />
-        <el-table-column label="阶段" align="center" prop="stage" />
-        <el-table-column label="创建时间" align="center" prop="createTime" />
-        <el-table-column label="创建人" align="center" prop="createBy" />
-        <!-- <el-table-column label="阶段" align="center" prop="result" >
+        <el-table-column label="阶段" align="center" prop="stage" >
           <template slot-scope="scope">
-            <dict-tag :options="dict.type.mk_bo_behavior_res" :value="scope.row.result"/>
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.stage"/>
           </template>
-        </el-table-column> -->
+        </el-table-column>
+        <el-table-column label="创建时间" align="center" prop="createTime" />
+        <el-table-column label="创建人" align="center" prop="createBy" />
         <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
             <el-button
@@ -63,7 +62,7 @@ import { listStage,delStage} from "@/api/business/ehr/pm/stage";
 
 export default {
   name: "assess",
-  dicts: [],
+  dicts: ['ehr_pm_status'],
   components: {detail},
   data() {
     return {

+ 164 - 0
src/views/business/ehr/pm/verify/index.vue

@@ -0,0 +1,164 @@
+<template>
+  <div>
+    <el-card v-if="flow.staff == this.$store.state.user.name">
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效考核表</span>
+        <div style="float: right; padding: 3px 0" type="text" v-if="flow.status == 0">
+          <el-button size="mini" plain @click="btnTurnDown(1)">驳回</el-button>
+          <el-button size="mini" type="primary" plain @click="btnverify(2)">通过</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-descriptions :column="6 ">
+          <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+          <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+          <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+          <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+          <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+          <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+          <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
+          <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
+        </el-descriptions>
+        <div style="float:right">
+          <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
+        </div>
+        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+            </template>
+          </el-table-column>
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions" />
+          <el-table-column width="100" label="角色" align="center" prop="role">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
+            </template>
+          </el-table-column>
+          <el-table-column width="80" label="权重" align="center" prop="weight"/>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard" />
+          <el-table-column width="100" label="数据来源" align="center" prop="source" />
+        </el-table>
+      </div>
+    </el-card>
+
+    <el-dialog title="" :visible.sync="turnDownOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
+      <el-form size="mini" label-position="right" ref="flow" :model="flow" :rules="flowRules" label-width="80px">
+        <el-form-item label="驳回原因" prop="result">
+          <el-input type="textarea" v-model="flow.result"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="btnTurnDownClose">取 消</el-button>
+        <el-button size="mini" type="primary" @click="btnTurnDownConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getPerformance,verify} from "@/api/business/ehr/pm/performance";
+import { getFlow} from "@/api/business/ehr/pm/flow";
+
+export default {
+  name: "verify",
+  dicts: ['ehr_pm_aspect','ehr_pm_role'],
+  data() {
+    return {
+      //遮罩层
+      loading: true,
+      //表单
+      form:{},
+      //流程数据
+      flow:{},
+      //流程数据规则
+      flowRules:{
+        result: [
+          { required: true, message: "驳回原因不能为空", trigger: "blur" },
+        ],
+      },
+      //是否展开
+      isUnfold:false,
+      //是否显驳回弹出层
+      turnDownOpen:false,
+    };
+  },
+  created() {
+    console.log("this.$route.query.code",this.$route.query.code);
+    console.log("this.$route.query.performanceId",this.$route.query.performanceId);
+    console.log("this.$route.query.flowId",this.$route.query.flowId);
+    this.fetchPerformance(this.$route.query.performanceId);
+    this.fetchFlow(this.$route.query.flowId);
+  },
+  methods: {
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //查询流程详情
+    async fetchFlow(id){
+      this.loading = true;
+      await getFlow(id).then(res => {
+        if (res.code === 200) {
+          this.flow = res.data;
+         }
+         this.loading = false;
+      })
+    },
+    //展开/收起
+    btnUnfold(){
+      this.isUnfold = !this.isUnfold;
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let val = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = val;
+      return ['合计','','','',val];
+    },
+    //驳回
+    btnTurnDown(){
+      this.turnDownOpen = true;
+    },
+    //驳回取消
+    btnTurnDownClose(){
+      this.turnDownOpen = false;
+    },
+    //驳回确认
+    btnTurnDownConfirm(){
+      this.$refs["flow"].validate(valid => {
+        if (valid) {
+          this.btnverify(1);
+          this.turnDownOpen = false;
+        }
+      });
+    },
+    //绩效确认
+    async btnverify(val){
+      this.flow.status = val;
+      await verify(this.flow).then(res => {
+        if (res.code === 200) {
+          this.fetchPerformance(this.$route.query.performanceId);
+          this.fetchFlow(this.$route.query.flowId);
+          this.$modal.msgSuccess("已确认");
+        }
+        this.loading = false;
+      })
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 56 - 2
src/views/business/spd/target/MonthSaleGoal.vue

@@ -224,9 +224,21 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="6">
+            <el-form-item label="时间范围" prop="materialRange">
+              <el-select v-model="materialRange" placeholder="请选择获取物料的时间范围">
+                <el-option v-for="item in dateOptions" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
         <div>
-          <el-row :gutter="10" class="mb8" style="margin-left: 75%">
+          <el-row :gutter="10" class="mb8" style="margin-left: 67%">
+            <el-col :span="1.5">
+              <el-button type="primary" icon="el-icon-search" size="mini" @click="getMaterialList">查询物料
+              </el-button>
+            </el-col>
             <el-col :span="1.5">
               <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleTemplateDownload">模板下载
               </el-button>
@@ -435,7 +447,8 @@
   import {
     getMonthSaleGoalDetails,
     delMonthSaleGoalDetails,
-    importData
+    importData,
+    getMaterialRangeList
   } from "@/api/business/spd/goal_management/monthSaleGoalDetails"
   import {
     getToken
@@ -651,6 +664,21 @@
         },
         //打开状态
         openStatus: null,
+        //物料来源时间
+        dateOptions: [{
+          value: '0',
+          label: '近一个月'
+        }, {
+          value: '1',
+          label: '近三个月'
+        }, {
+          value: '2',
+          label: '近半年'
+        }, {
+          value: '3',
+          label: '近一年'
+        }],
+        materialRange: '',
       };
     },
     created() {
@@ -1166,6 +1194,32 @@
           this.loading = false;
         })
       },
+      //查询该时间范围内对应客户的物料数据
+      getMaterialList() {
+        this.loading = true;
+        let data = {
+          customCode: this.form.customCode,
+          type: this.materialRange
+        }
+        console.log(data, 'data')
+        getMaterialRangeList(data).then((res) => {
+          console.log(res, 'res')
+          this.monthSaleGoalDetailsList = res;
+          for (const item of this.monthSaleGoalDetailsList) {
+            item.saleOrg = this.$store.state.user.orgName,
+            item.saleZone = this.form.saleZone,
+            item.custom = this.form.custom,
+            item.dept = this.form.dept,
+            item.creator = this.form.creator
+            item.monthly = new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString().padStart(2,
+            '0')
+          }
+        }).catch((e) => {
+          this.$message.error(e.message)
+        }).finally((e) => {
+          this.loading = false;
+        })
+      }
     }
   }
 

+ 50 - 0
src/views/ehrentrance.vue

@@ -0,0 +1,50 @@
+<template>
+  <div>
+  </div>
+</template>
+
+<script>
+import { setToken,getToken } from '@/utils/auth'
+import { ehrLogin } from '@/api/sso/ssoLogin';
+export default {
+  data () {
+    return {
+    }
+  },
+  created() {
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.jump()
+    })
+  },
+  methods: {
+    jump() {
+      var code = this.GetQueryString('code')
+      var jumpPath = this.GetQueryString('path')
+      let str = jumpPath + window.location.search;
+      if(getToken()){
+        this.$router.push({ path: str});
+      }else{
+        ehrLogin(code).then(res => {
+          if (res.code === 200) {
+            let token = res.token
+            setToken(token)
+            this.$store.commit('SET_TOKEN', token)
+            this.$store.dispatch("GetInfo").then(() => {})
+            console.log("str", str)
+            this.$store.dispatch("GenerateRoutes").then(
+              this.$router.push({ path: str}).catch(()=>{})
+            )
+          }
+        })
+      }
+    },
+    GetQueryString(name) {
+      var  reg = new  RegExp( "(^|&)" + name + "=([^&]*)(&|$)" );
+      var  r = window.location.search.substr(1).match(reg);
+      if (r!= null ) return   unescape(r[2]); return  null ;
+    }
+  }
+}
+</script>

+ 6 - 0
src/views/material/changeApply/columns.js

@@ -28,6 +28,12 @@ export default function useColumns() {
       attr: {  },
     },
     { item: { key: "updateTime", title: "最后修改时间" }, attr: {} },
+    
+    { 
+      item:{ key: "approveUser", title: "当前审批人" ,},
+      attr:{
+      },
+    },
    
   ].map(({ item, attr }) => ({
     attr,

+ 152 - 145
src/views/material/changeApply/index.vue

@@ -1,11 +1,13 @@
 <template>
-
-  <el-card 
-    v-loading="loading" 
-    style="width: calc(100% - 24px); height: 100%; margin: 10px;padding: 10px;" 
-    :body-style="{ padding: 0 }"
+  <el-card
+    v-loading="loading"
+    :body-style="{
+      height: '100%',
+      padding: 0,
+      display: 'flex',
+      'flex-direction': 'column',
+    }"
   >
-
     <AddChangeOrders
       ref="addChangeOrders"
       :size="size"
@@ -20,135 +22,138 @@
       @success="useReset"
     ></SeeChangeOrders>
 
-    <div>
-
-      <el-super-search
-        v-model="params"
-        :size="size"
-        :dict="dict"
-        :columns="SearchColumns"
-        @reset="useReset"
-        @row-dblclick="useSee"
-        @submit="useQuery(params, page)"
-      ></el-super-search>
-
-      <el-row 
-        :gutter="10" 
-        class="mb10" 
-        type="flex" 
-        justify="end"
-        style="margin-top: 20px;"
-      >
-        <el-col :span="1.5">
-          <el-button type="primary" size="mini" @click="newAdd">新增</el-button>
-          <!-- <BatchImport></BatchImport> -->
-        </el-col>
-      </el-row>
-
-      <!-- <div style="height: 600px; display:flex;"> -->
-        <el-super-ux-table
-          v-model="tableList"
-          :dict="dict"
-          :size="size"
-          pagination
-          :page="page"
-          :height="tableHeight"
-          :columns="TableColumns"
-          @pagination="useQuery(params, page)"
-          @row-dblclick="useSee"
-        >
-          <ux-table-column fixed="right" title="操作" width="180" align="center">
-            <template slot-scope="scope">
-              <el-button type="text" size="small" @click.stop="useSee(scope.row)">查看</el-button>
-              <el-button 
-                v-if="scope.row.status == '1'" 
-                type="text" 
-                size="mini"
-                @click.stop="handleBack(scope.row)"
-              >收回</el-button>
-              <el-button  
-                v-if="scope.row.oaId && scope.row.oaId !=''" 
-                @click.stop="jumpFlow(scope.row)" 
-                type="text"
-                :size="size"
-              >流程跳转</el-button>
-              <el-button @click.stop="handleEdit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">编辑</el-button>
-              <el-button type="text" size="small" @click.stop="deleteRow(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3">删除</el-button>
-            </template>
-          </ux-table-column>
-        </el-super-ux-table>
-      <!-- </div> -->
-    </div>
-</el-card>
+    <el-super-search
+      v-model="params"
+      :size="size"
+      :dict="dict"
+      :columns="SearchColumns"
+      @reset="useReset"
+      @row-dblclick="useSee"
+      @submit="useQuery(params, page)"
+    ></el-super-search>
+
+    <el-row
+      :gutter="10"
+      class="mb10"
+      type="flex"
+      justify="end"
+      style="margin-top: 20px"
+    >
+      <el-col :span="1.5">
+        <el-button type="primary" size="mini" @click="newAdd">新增</el-button>
+        <!-- <BatchImport></BatchImport> -->
+      </el-col>
+    </el-row>
 
+    <el-super-ux-table
+      v-model="tableList"
+      :dict="dict"
+      :size="size"
+      pagination
+      :page="page"
+      :columns="TableColumns"
+      storage-key="MaterialApplySuperTable"
+      @pagination="useQuery(params, page)"
+      @row-dblclick="useSee"
+    >
+      <ux-table-column fixed="right" title="操作" width="180" align="center">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click.stop="useSee(scope.row)"
+            >查看</el-button
+          >
+          <el-button
+            v-if="scope.row.status == '1'"
+            type="text"
+            size="mini"
+            @click.stop="handleBack(scope.row)"
+            >收回</el-button
+          >
+          <el-button
+            v-if="scope.row.oaId && scope.row.oaId != ''"
+            @click.stop="jumpFlow(scope.row)"
+            type="text"
+            :size="size"
+            >流程跳转</el-button
+          >
+          <el-button
+            @click.stop="handleEdit(scope.row)"
+            v-if="scope.row.status == 0 || scope.row.status == 3"
+            type="text"
+            size="small"
+            >编辑</el-button
+          >
+          <el-button
+            type="text"
+            size="small"
+            @click.stop="deleteRow(scope.row)"
+            v-if="scope.row.status == 0 || scope.row.status == 3"
+            >删除</el-button
+          >
+        </template>
+      </ux-table-column>
+    </el-super-ux-table>
+  </el-card>
 </template>
 
 <script>
 import { dicts } from "./dicts";
-import { getChangeList , deleteChangeList,toOA} from '@/api/changeApply/basic';
+import { getChangeList, deleteChangeList, toOA } from "@/api/changeApply/basic";
 // 流程收回通用接口
-import {oaBack} from '@/api/requisition/basic';
-import useColumns from './columns';
+import { oaBack } from "@/api/requisition/basic";
+import useColumns from "./columns";
 export default {
-  name: 'changeApply',
-  dicts:[...dicts, 'oa_templete_id'],
+  name: "changeApply",
+  dicts: [...dicts, "oa_templete_id"],
   components: {
-    AddChangeOrders:() => import('./add/index.vue'),
-    SeeChangeOrders:() => import('./see/index.vue'),
-    BatchImport:() => import('./batchImport/index.vue'),
+    AddChangeOrders: () => import("./add/index.vue"),
+    SeeChangeOrders: () => import("./see/index.vue"),
+    BatchImport: () => import("./batchImport/index.vue"),
     ElSuperTable: () => import("@/components/super-table/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
   },
 
-  data(){
-    const {TableColumns,SearchColumns} = useColumns();
+  data() {
+    const { TableColumns, SearchColumns } = useColumns();
     const params = this.$init.params(SearchColumns);
     return {
-      loading:false,
-      size:'mini',
+      loading: false,
+      size: "mini",
       tableList: [],
-      TableColumns:TableColumns,
+      TableColumns: TableColumns,
       page: { pageNum: 1, pageSize: 50, total: 0 },
-      params:params,
-      SearchColumns:SearchColumns,
-      optionType:'add',
-
-
-    }
+      params: params,
+      SearchColumns: SearchColumns,
+      optionType: "add",
+    };
   },
-  methods:{
-    async jumpFlow (row){
-
-      const {name} = this.$store.state.user;
+  methods: {
+    async jumpFlow(row) {
+      const { name } = this.$store.state.user;
 
       try {
+        let { code, msg, oaUrl } = await toOA(name, row.oaId);
 
-        let {code,msg,oaUrl} = await toOA(name,row.oaId);
-
-        if(code == 200){
-          window.open(oaUrl)
+        if (code == 200) {
+          window.open(oaUrl);
         }
-        
       } catch (error) {
-        
-      }finally{
-
+      } finally {
       }
     },
-    
+
     //流程收回
-    async handleBack(row){
-      console.log('row', row)
-      console.log('this.dicts.type', this.dict)
+    async handleBack(row) {
+      console.log("row", row);
+      console.log("this.dicts.type", this.dict);
       try {
         const { msg, code } = await oaBack({
-          fdTemplateId: this.dict.type.oa_templete_id.find(item => {
-            return item.label == "物料变更单"
+          fdTemplateId: this.dict.type.oa_templete_id.find((item) => {
+            return item.label == "物料变更单";
           }).value,
           fdId: row.oaId,
           billCode: row.code,
-          billMaker: row.createBy
+          billMaker: row.createBy,
         });
         if (code === 200) {
           this.$emit("success");
@@ -161,67 +166,61 @@ export default {
       }
     },
 
-    useReset(){
+    useReset() {
       this.page.pageNum = 1;
       this.page.pageSize = 10;
       this.params = this.$init.params(this.SearchColumns);
       this.useQuery(this.params, this.page);
     },
-    
-    // 
+
+    //
     openAddChangeOrders(row) {
-    
-      const {setVisible,fetchItem} = this.$refs.addChangeOrders;
+      const { setVisible, fetchItem } = this.$refs.addChangeOrders;
 
       setVisible(true);
 
       row && fetchItem(row);
     },
 
-    async newAdd(){
-      this.optionType = 'add';
+    async newAdd() {
+      this.optionType = "add";
       await this.openAddChangeOrders();
     },
 
-    async handleEdit(row){  
-      this.optionType = 'edit';
+    async handleEdit(row) {
+      this.optionType = "edit";
       await this.openAddChangeOrders(row);
-
     },
 
-    async useQuery(params,page) {
+    async useQuery(params, page) {
       try {
         this.loading = true;
-        let {code,rows,total} = await getChangeList({...params,...page});
+        let { code, rows, total } = await getChangeList({ ...params, ...page });
         if (code === 200) {
-          this.tableList = rows
+          this.tableList = rows;
           this.page.total = total;
         }
       } catch (error) {
-        
-      }finally{
+      } finally {
         this.loading = false;
       }
     },
-   
 
-    async useSee(row){
-      const {setVisible,fetchItem} = this.$refs.seeChangeOrders;
+    async useSee(row) {
+      const { setVisible, fetchItem } = this.$refs.seeChangeOrders;
       await setVisible(true);
       await fetchItem(row);
-
     },
-    deleteRow(row){
-      this.$confirm('是否删除此条数据?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async() => {
-
+    deleteRow(row) {
+      this.$confirm("是否删除此条数据?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(async () => {
         try {
-          let {code,msg} = await deleteChangeList({id: row.id});
+          let { code, msg } = await deleteChangeList({ id: row.id });
 
-          if(code == 200){
+          if (code == 200) {
             this.$notify.success({
               // title: '成功',
               message: msg,
@@ -229,23 +228,31 @@ export default {
             await this.useQuery(this.params, this.page);
           }
         } catch (error) {}
-      })
+      });
     },
- 
   },
   computed: {
-      tableHeight:{
-        get(){
-          console.log(window,'window');
-          return window.innerHeight - 220;
-        },
-        set(){},
-      }
+    tableHeight: {
+      get() {
+        console.log(window, "window");
+        return window.innerHeight - 220;
+      },
+      set() {},
     },
-  created(){
-    this.params.code = this.$route.query.billCode
+  },
+  created() {
+    this.params.code = this.$route.query.billCode;
     this.useQuery(this.params, this.page);
   },
-}
+};
+</script>
 
-</script>
+<style scoped lang="scss">
+.el-card {
+  width: calc(100% - 32px);
+  height: calc(100vh - 32px);
+  margin: 16px;
+  padding: 16px;
+  border-radius: 8px;
+}
+</style>

+ 6 - 1
src/views/material/requisition/columns.js

@@ -33,7 +33,12 @@
     { item: { key: "updateTime", title: "最后修改时间" ,width:150,}, attr: {} },
     { item: { key: "reviewedName", title: "最后审批人" ,width:150,}, attr: {} },
      { item: { key: "auditTime", title: "最后审批时间" ,width:150,}, attr: {} },
-    // { item: { key: "orgName", title: "审批语" ,width:150,}, attr: {} },
+     { 
+      item:{ key: "approveUser", title: "当前审批人" ,},
+      attr:{
+      },
+    },
+     // { item: { key: "orgName", title: "审批语" ,width:150,}, attr: {} },
 
 
 

+ 473 - 431
src/views/material/requisition/index.vue

@@ -1,76 +1,107 @@
 <template>
   <div class="requisition" v-loading="failLoad">
     <div class="applyList" v-if="isList">
-     
-      <el-card>
-
-      <el-super-search
-        v-model="params"
-        :size="size"
-        :dict="dict"
-        :columns="SearchColumns"
-        @reset="reset"
-        @submit="getList"
-      ></el-super-search>
-
-      <el-row :gutter="10" class="mb10" type="flex" justify="end" style="margin-top: 15px;">
-        <el-col :span="1.5">
-          <el-button type="primary" :size="size" plain @click="newAdd">新增</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button :size="size" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="primary" :size="size" plain
-                     @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
-          </el-button>
-        </el-col>
-        <el-col :span="1.5">
-          
-          <el-button-group >
-            <el-button :size="size" @click="handleImport">批量导入</el-button>
-            <!-- <el-button  
+      <el-card
+        :body-style="{
+          height: '100%',
+          padding: 0,
+          display: 'flex',
+          'flex-direction': 'column',
+        }"
+      >
+        <el-super-search
+          v-model="params"
+          :size="size"
+          :dict="dict"
+          :columns="SearchColumns"
+          @reset="reset"
+          @submit="getList"
+        ></el-super-search>
+
+        <el-row
+          :gutter="10"
+          class="mb10"
+          type="flex"
+          justify="end"
+          style="margin-top: 15px"
+        >
+          <el-col :span="1.5">
+            <el-button type="primary" :size="size" plain @click="newAdd"
+              >新增</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              :size="size"
+              :disabled="checkedList.length != 1"
+              @click="handleCopy"
+              >复制</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              :size="size"
+              plain
+              @click="
+                download(
+                  '/system/apply/material/download',
+                  {},
+                  '申请单模板.xlsx'
+                )
+              "
+              >模板下载
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button-group>
+              <el-button :size="size" @click="handleImport">批量导入</el-button>
+              <!-- <el-button  
             :size="size"
               @click="handleDownload" 
               v-hasPermi="['system:apply:export']"
             >批量导出</el-button> -->
-            <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button>
-          </el-button-group>
-        </el-col>
-        <!-- 导入弹窗 -->
-        <el-dialog 
-          title="批量导入" 
-          :visible.sync="importData.show" 
-          width="35%" 
-          center
-          :before-close="handlefileDialogColse"
-        >
-          <div class="mb-import">
-            <el-upload 
-              accept=".xls, .xlsx" 
-              ref="upload" 
-              action="#" 
-              :on-remove="handleFileRemove"
-              :file-list="importData.list" 
-              :auto-upload="false" 
-              :on-change="handleChangeFile" 
-              :limit="1"
-              style="text-align: center;"
-            >
-              <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
-              <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
-            </el-upload>
-
-          </div>
-          <span slot="footer">
-        <el-button @click="handleImportData('cancal')">取 消</el-button>
-        <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
-      </span>
-        </el-dialog>
-      </el-row>
-
-      <div style="height: 600px;display: flex;">
-        <el-super-table
+              <el-button :size="size" @click="handleBatchSubmit"
+                >批量提交</el-button
+              >
+            </el-button-group>
+          </el-col>
+          <!-- 导入弹窗 -->
+          <el-dialog
+            title="批量导入"
+            :visible.sync="importData.show"
+            width="35%"
+            center
+            :before-close="handlefileDialogColse"
+          >
+            <div class="mb-import">
+              <el-upload
+                accept=".xls, .xlsx"
+                ref="upload"
+                action="#"
+                :on-remove="handleFileRemove"
+                :file-list="importData.list"
+                :auto-upload="false"
+                :on-change="handleChangeFile"
+                :limit="1"
+                style="text-align: center"
+              >
+                <el-button slot="trigger" size="small" type="primary"
+                  >选取文件</el-button
+                >
+                <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
+              </el-upload>
+            </div>
+            <span slot="footer">
+              <el-button @click="handleImportData('cancal')">取 消</el-button>
+              <el-button type="primary" @click="handleImportData('confirm')"
+                >确 定</el-button
+              >
+            </span>
+          </el-dialog>
+        </el-row>
+
+        <el-super-ux-table
           v-model="tableList"
           :dict="dict"
           :columns="TableColumns"
@@ -80,431 +111,442 @@
           checkbox
           convenitentOperation
           :page="pageStatus"
+          storage-key="MaterialRequisitionSuperTable"
           @pagination="getList"
           @row-dblclick="check"
           @selection-change="handleSelectionChange"
           @select="handleSelect"
         >
-          <el-table-column
+          <ux-table-column
             fixed="right"
-            label="操作"
+            title="操作"
             align="center"
             width="180"
           >
             <template slot-scope="scope">
-              <el-button 
-                type="text" 
-                :size="size" 
-                @click.stop="check(scope.row)"
-              >查看</el-button>
-              <el-button 
-                @click.stop="edit(scope.row)" 
-                v-if="scope.row.status == 0 || scope.row.status == 3" 
+              <el-button type="text" :size="size" @click.stop="check(scope.row)"
+                >查看</el-button
+              >
+              <el-button
+                @click.stop="edit(scope.row)"
+                v-if="scope.row.status == 0 || scope.row.status == 3"
                 type="text"
                 :size="size"
-              >编辑</el-button>
-              <el-button 
-                @click.stop="jumpFlow(scope.row)" 
-                v-if="scope.row.oaId && scope.row.oaId !=''" 
+                >编辑</el-button
+              >
+              <el-button
+                @click.stop="jumpFlow(scope.row)"
+                v-if="scope.row.oaId && scope.row.oaId != ''"
                 type="text"
                 :size="size"
-              >流程跳转</el-button>
-              <el-button 
-                type="text" 
+                >流程跳转</el-button
+              >
+              <el-button
+                type="text"
                 :size="size"
                 @click.stop="deleteRow(scope.row)"
                 v-if="scope.row.status == 0 || scope.row.status == 3"
-              >删除</el-button>
-              <el-button 
-                v-if="scope.row.status == '1'" 
-                type="text" 
+                >删除</el-button
+              >
+              <el-button
+                v-if="scope.row.status == '1'"
+                type="text"
                 size="mini"
                 @click.stop="handleBack(scope.row)"
-              >流程收回</el-button>
+                >流程收回</el-button
+              >
             </template>
-          </el-table-column>
-        </el-super-table>
-      </div>
-       
-
+          </ux-table-column>
+        </el-super-ux-table>
       </el-card>
     </div>
 
-    <component 
-      :is="isComponent" 
-      v-model="isList" 
-      :pageStu="page" 
-      :disable="disable" 
-      :row="rowDetail" 
+    <component
+      :is="isComponent"
+      v-model="isList"
+      :pageStu="page"
+      :disable="disable"
+      :row="rowDetail"
       @refresh="getList"
-      v-if="!isList
-    "/>
+      v-if="!isList"
+    />
   </div>
 </template>
 
 <script>
-  import addReq from './add.vue';
-  import {getReqList, delReq, importData, fileImport,betchSubmit,toOA,oaBack} from '@/api/requisition/basic';
-  import {saveAs} from "file-saver";
-  import { blobValidate } from "@/utils/ruoyi";
-  import { SearchColumns, TableColumns } from './columns';
-  import { initDicts } from "@/utils/init.js";
-
-
-  export default {
-    name: 'requisition',
-    dicts:[...initDicts([...SearchColumns,...TableColumns]),'oa_templete_id'],
-    components: {
+import addReq from "./add.vue";
+import {
+  getReqList,
+  delReq,
+  importData,
+  fileImport,
+  betchSubmit,
+  toOA,
+  oaBack,
+} from "@/api/requisition/basic";
+import { saveAs } from "file-saver";
+import { blobValidate } from "@/utils/ruoyi";
+import { SearchColumns, TableColumns } from "./columns";
+import { initDicts } from "@/utils/init.js";
+
+export default {
+  name: "requisition",
+  dicts: [...initDicts([...SearchColumns, ...TableColumns]), "oa_templete_id"],
+  components: {
     addReq,
     ElSuperTable: () => import("@/components/super-table/index.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
-},
-    data() {
-      const params = this.$init.params(SearchColumns);
-      return {
-        failLoad: false,
-        tableList: [],
-        size:'mini',
-        params:params,
-        SearchColumns:SearchColumns,
-        TableColumns:TableColumns,
-        pageStatus: { pageNum: 1, pageSize: 50, total: 0 },
-        queryParams: {
-          billCode: '',
-          name: '',
-          status: '',
-          pageNum: 1,
-          pageSize: 10
+  },
+  data() {
+    const params = this.$init.params(SearchColumns);
+    return {
+      failLoad: false,
+      tableList: [],
+      size: "mini",
+      params: params,
+      SearchColumns: SearchColumns,
+      TableColumns: TableColumns,
+      pageStatus: { pageNum: 1, pageSize: 50, total: 0 },
+      queryParams: {
+        billCode: "",
+        name: "",
+        status: "",
+        pageNum: 1,
+        pageSize: 10,
+      },
+      options: [
+        {
+          value: 0,
+          label: "未提交",
         },
-        options: [{
-          value: 0, label: '未提交'
-        }, {
-          value: 1, label: '审批中'
-        }, {
-          value: 2, label: '已完成'
-        }, {
-          value: 3, label: '已驳回'
-        },],
-        total: 0,
-        // isComponent
-        isComponent: 'addReq',
-        isList: true,
-        // 页面状态
-        page: '',
-        rowDetail: {},
-        disable: false,
-        checkedList: [],
-        importData: {
-          show: false,
-          list: []
+        {
+          value: 1,
+          label: "审批中",
         },
-      }
-    },
-    created() {
-
-    },
-    mounted() {
-      this.params.billCode = this.$route.query.billCode
-      this.getList(this.queryParams)
-    },
-    methods: {
-      // 操作提示弹窗
-    handleConfirmTips(success){
-
-      this.$confirm('是否继续此操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-
+        {
+          value: 2,
+          label: "已完成",
+        },
+        {
+          value: 3,
+          label: "已驳回",
+        },
+      ],
+      total: 0,
+      // isComponent
+      isComponent: "addReq",
+      isList: true,
+      // 页面状态
+      page: "",
+      rowDetail: {},
+      disable: false,
+      checkedList: [],
+      importData: {
+        show: false,
+        list: [],
+      },
+    };
+  },
+  created() {},
+  mounted() {
+    this.params.billCode = this.$route.query.billCode;
+    this.getList(this.queryParams);
+  },
+  methods: {
+    // 操作提示弹窗
+    handleConfirmTips(success) {
+      this.$confirm("是否继续此操作?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
           success();
-
-        }).catch(() => {        
-        });
+        })
+        .catch(() => {});
     },
-      // 批量提交
-      async handleBatchSubmit(){
-          let filterList = this.checkedList.filter(item => !(item.status === '0' || item.status === '3') )
-          
-          console.log(filterList,'filterList',this.checkedList.length);
-
-          if(!filterList.length &&  this.checkedList.length){  
-
-            this.handleConfirmTips(async() =>{
-
-              try {
-
-                this.failLoad = true;
+    // 批量提交
+    async handleBatchSubmit() {
+      let filterList = this.checkedList.filter(
+        (item) => !(item.status === "0" || item.status === "3")
+      );
 
-                let ids = this.checkedList.map( item => Number(item.id));
+      console.log(filterList, "filterList", this.checkedList.length);
 
-                let {code,msg} = await betchSubmit({ids});
+      if (!filterList.length && this.checkedList.length) {
+        this.handleConfirmTips(async () => {
+          try {
+            this.failLoad = true;
 
-                if(code == 200){
-                  this.reset();
-                }
-
-                this.$notify({
-                  title: code == 200 ? msg : 'error',
-                  type: code == 200 ? 'success' :'error',
-                  message: code == 200 ?'' :msg,
-                });
+            let ids = this.checkedList.map((item) => Number(item.id));
 
-                } catch (error) {
+            let { code, msg } = await betchSubmit({ ids });
 
-                }finally{
-                this.failLoad = false;
-                }
-
-            })
+            if (code == 200) {
+              this.reset();
+            }
 
-          }else{
-            this.$notify.warning({
-              title: '警告',
-              message: '存在不符合提交条件数据或未选择数据!',
+            this.$notify({
+              title: code == 200 ? msg : "error",
+              type: code == 200 ? "success" : "error",
+              message: code == 200 ? "" : msg,
             });
+          } catch (error) {
+          } finally {
+            this.failLoad = false;
           }
-      },
-
-      async jumpFlow (row){
-
-        const {name} = this.$store.state.user;
-
-        try {
+        });
+      } else {
+        this.$notify.warning({
+          title: "警告",
+          message: "存在不符合提交条件数据或未选择数据!",
+        });
+      }
+    },
 
-          let {code,msg,oaUrl} = await toOA(name,row.oaId);
+    async jumpFlow(row) {
+      const { name } = this.$store.state.user;
 
-          if(code == 200){
-            window.open(oaUrl)
-          }
-          
-        } catch (error) {
-          
-        }finally{
+      try {
+        let { code, msg, oaUrl } = await toOA(name, row.oaId);
 
+        if (code == 200) {
+          window.open(oaUrl);
         }
-      },
-
-      reset() {
-        // this.queryParams.billCode = ''
-        // this.queryParams.name = ''
-        // this.queryParams.status = ''
-        // this.queryParams.pageNum = 1
-        this.pageStatus.pageNum = 1;
-        this.pageStatus.pageSize = 10;
-        this.params = this.$init.params(SearchColumns);
-        this.getList(this.queryParams)
-      },
-      newAdd() {
-        this.isList = false
-        this.isComponent = 'addReq'
-        this.page = 'add'
-        this.disable = false
-      },
-      // 复制
-      handleCopy() {
-        this.isList = false;
-        this.isComponent = 'addReq';
-        this.page = 'copy';
-        this.rowDetail = this.checkedList[0];
-        this.disable = false;
-      },
-      // 导入
-      handleImport() {
-        this.importData.show = true
-      },
-      // 导出
-      handleDownload(){
-        let params = {
-          ...this.params
-        };
-        this.download('/system/apply/material/export', {...params}, `物料申请单${new Date().getTime()}.xlsx`);
-      },
-      // 删除文件
-      handleFileRemove(file, fileList) {
-        // console.log('删除文件', file, 'file', fileList, 'fileList');
-        this.importData.list = fileList;
-      },
-      // 文件发生改变
-      handleChangeFile(file, fileList) {
-        this.importData.list = fileList;
-      },
-      // 导入弹窗操作
-      handleImportData(type) {
-        switch (type) {
-          // 取消
-          case 'cancal':
-            this.importData.list = [];
-            this.importData.show = false;
-            break;
-          // 确认
-          case 'confirm':
-            if (this.importData.list.length) {
-
-              let formData = new FormData();
-
-              formData.append('file', this.importData.list[0].raw);
-              importData(formData).then(res => {
-                if (res.code == 200) {
-                  this.importData.show = false;
-                  this.importData.list = [];
-                  if (res.data.flag) {
-                    this.failLoad = true;
-                    // console.log(res.data.datas)
-                    let param = {failDatas: res.data.datas}
-                    if (null != param) {
+      } catch (error) {
+      } finally {
+      }
+    },
 
-                      fileImport(param).then(res => {
-                        console.log('res',res)
-                        const isBlob = blobValidate(res);
-                        if (isBlob) {
-                          const blob = new Blob([res]);
-                          saveAs(blob, '导入失败的物料申请单数据.xlsx');
-                        }
-                        this.failLoad = false;
-                        this.reset();
-                      })
-                    }
+    reset() {
+      // this.queryParams.billCode = ''
+      // this.queryParams.name = ''
+      // this.queryParams.status = ''
+      // this.queryParams.pageNum = 1
+      this.pageStatus.pageNum = 1;
+      this.pageStatus.pageSize = 10;
+      this.params = this.$init.params(SearchColumns);
+      this.getList(this.queryParams);
+    },
+    newAdd() {
+      this.isList = false;
+      this.isComponent = "addReq";
+      this.page = "add";
+      this.disable = false;
+    },
+    // 复制
+    handleCopy() {
+      this.isList = false;
+      this.isComponent = "addReq";
+      this.page = "copy";
+      this.rowDetail = this.checkedList[0];
+      this.disable = false;
+    },
+    // 导入
+    handleImport() {
+      this.importData.show = true;
+    },
+    // 导出
+    handleDownload() {
+      let params = {
+        ...this.params,
+      };
+      this.download(
+        "/system/apply/material/export",
+        { ...params },
+        `物料申请单${new Date().getTime()}.xlsx`
+      );
+    },
+    // 删除文件
+    handleFileRemove(file, fileList) {
+      // console.log('删除文件', file, 'file', fileList, 'fileList');
+      this.importData.list = fileList;
+    },
+    // 文件发生改变
+    handleChangeFile(file, fileList) {
+      this.importData.list = fileList;
+    },
+    // 导入弹窗操作
+    handleImportData(type) {
+      switch (type) {
+        // 取消
+        case "cancal":
+          this.importData.list = [];
+          this.importData.show = false;
+          break;
+        // 确认
+        case "confirm":
+          if (this.importData.list.length) {
+            let formData = new FormData();
+
+            formData.append("file", this.importData.list[0].raw);
+            importData(formData).then((res) => {
+              if (res.code == 200) {
+                this.importData.show = false;
+                this.importData.list = [];
+                if (res.data.flag) {
+                  this.failLoad = true;
+                  // console.log(res.data.datas)
+                  let param = { failDatas: res.data.datas };
+                  if (null != param) {
+                    fileImport(param).then((res) => {
+                      console.log("res", res);
+                      const isBlob = blobValidate(res);
+                      if (isBlob) {
+                        const blob = new Blob([res]);
+                        saveAs(blob, "导入失败的物料申请单数据.xlsx");
+                      }
+                      this.failLoad = false;
+                      this.reset();
+                    });
                   }
-                  this.$message({
-                    message: res.data.msg,
-                    type: res.data.flag ? 'warning' : 'success'
-                  });
-                } else {
-                  this.$message({
-                    message: res.msg,
-                    type: res.code == 200 ? 'success' : 'warning'
-                  });
                 }
-              })
-            } else {
-              this.$message({
-                message: '请上传文件之后在确认!',
-                type: 'warning'
-              });
-            }
-            break;
-        }
-      },
-      handlefileDialogColse(done){
-        this.importData.list = [];
-        done();
-      },
-      // Select框
-      handleSelect(selection, row) {
-
-        this.checkedList = selection;
-
-        // console.log(this.checkedList, 'this.checkedList');
-
-      },
-      getList(val) {
-        // console.log('val', val)
-        this.failLoad = true;
-        
-        getReqList({...this.params,...this.pageStatus}).then(res => {
-          this.failLoad = false;
-          if (res.code === 200) {
-            this.tableList = res.rows;
-            // this.total = res.total;
-            this.pageStatus.total = res.total;
+                this.$message({
+                  message: res.data.msg,
+                  type: res.data.flag ? "warning" : "success",
+                });
+              } else {
+                this.$message({
+                  message: res.msg,
+                  type: res.code == 200 ? "success" : "warning",
+                });
+              }
+            });
+          } else {
+            this.$message({
+              message: "请上传文件之后在确认!",
+              type: "warning",
+            });
           }
-        })
-        // this.checkedList = [];
-      },
-      // 表格内状态栏判断值
-      statusJug(row) {
-        if (row.status == 0) {
-          return '未提交'
-        } else if (row.status == 1) {
-          return '审批中'
-        } else if (row.status == 2) {
-          return '已完成'
-        } else if (row.status == 3) {
-          return '已驳回'
+          break;
+      }
+    },
+    handlefileDialogColse(done) {
+      this.importData.list = [];
+      done();
+    },
+    // Select框
+    handleSelect(selection, row) {
+      this.checkedList = selection;
+
+      // console.log(this.checkedList, 'this.checkedList');
+    },
+    getList(val) {
+      // console.log('val', val)
+      this.failLoad = true;
+
+      getReqList({ ...this.params, ...this.pageStatus }).then((res) => {
+        this.failLoad = false;
+        if (res.code === 200) {
+          this.tableList = res.rows;
+          // this.total = res.total;
+          this.pageStatus.total = res.total;
         }
-      },
-      //
-      handleSelectionChange(selection) {
-        this.checkedList = selection;
-      },
-      check(row) {
-        console.log('xxxx',this.dict.type)
-        // console.log('查看详情', row)
-        this.isList = false
-        this.isComponent = 'addReq'
-        this.page = 'check'
-        this.rowDetail = row
-        this.disable = true
-      },
-      edit(row) {
-        // console.log('修改先加载详情', row)
-        this.isList = false
-        this.isComponent = 'addReq'
-        this.page = 'edit'
-        this.rowDetail = row
-        this.disable = false
-      },
-      commit(row) {
-        // console.log('row', row)
-      },
-      deleteRow(row) {
-        this.$confirm('是否删除此条数据?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          delReq(row.id).then(res => {
+      });
+      // this.checkedList = [];
+    },
+    // 表格内状态栏判断值
+    statusJug(row) {
+      if (row.status == 0) {
+        return "未提交";
+      } else if (row.status == 1) {
+        return "审批中";
+      } else if (row.status == 2) {
+        return "已完成";
+      } else if (row.status == 3) {
+        return "已驳回";
+      }
+    },
+    //
+    handleSelectionChange(selection) {
+      this.checkedList = selection;
+    },
+    check(row) {
+      console.log("xxxx", this.dict.type);
+      // console.log('查看详情', row)
+      this.isList = false;
+      this.isComponent = "addReq";
+      this.page = "check";
+      this.rowDetail = row;
+      this.disable = true;
+    },
+    edit(row) {
+      // console.log('修改先加载详情', row)
+      this.isList = false;
+      this.isComponent = "addReq";
+      this.page = "edit";
+      this.rowDetail = row;
+      this.disable = false;
+    },
+    commit(row) {
+      // console.log('row', row)
+    },
+    deleteRow(row) {
+      this.$confirm("是否删除此条数据?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          delReq(row.id).then((res) => {
             if (res.code === 200) {
               this.$message({
                 message: res.msg,
-                type: 'success'
+                type: "success",
               });
-              this.getList(this.queryParams)
+              this.getList(this.queryParams);
             }
-          })
-        }).catch(() => {
-        })
-      },
-      // handleSizeChange(val) {
-      //   console.log(`每页 ${val} 条`);
-      //   this.queryParams.pageSize = val
-      //   this.getList(this.queryParams)
-      // },
-      // handleCurrentChange(val) {
-      //   console.log(`当前页: ${val}`);
-      //   this.queryParams.pageNum = val
-      //   this.getList(this.queryParams)
-      // }
-      //流程收回
-      async handleBack(row){
-        try {
-          const { msg, code } = await oaBack({
-            fdTemplateId: this.dict.type.oa_templete_id.find(item => {
-              return item.label == "物料申请单"
-            }).value,
-            fdId: row.oaId,
-            billCode: row.billCode,
-            billMaker: row.createBy
           });
-          if (code === 200) {
-            this.$emit("success");
-            this.$notify.success(msg);
-          }
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.getList(this.queryParams);
+        })
+        .catch(() => {});
+    },
+    // handleSizeChange(val) {
+    //   console.log(`每页 ${val} 条`);
+    //   this.queryParams.pageSize = val
+    //   this.getList(this.queryParams)
+    // },
+    // handleCurrentChange(val) {
+    //   console.log(`当前页: ${val}`);
+    //   this.queryParams.pageNum = val
+    //   this.getList(this.queryParams)
+    // }
+    //流程收回
+    async handleBack(row) {
+      try {
+        const { msg, code } = await oaBack({
+          fdTemplateId: this.dict.type.oa_templete_id.find((item) => {
+            return item.label == "物料申请单";
+          }).value,
+          fdId: row.oaId,
+          billCode: row.billCode,
+          billMaker: row.createBy,
+        });
+        if (code === 200) {
+          this.$emit("success");
+          this.$notify.success(msg);
         }
-      },
-    }
-  }
+      } catch (err) {
+        console.error(err);
+      } finally {
+        this.getList(this.queryParams);
+      }
+    },
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .requisition {
-    // height: calc(100vh - 84px);
-    padding: 12px;
-    box-sizing: border-box;
-  }
+.requisition {
+  // height: calc(100vh - 84px);
+  // padding: 12px;
+  // box-sizing: border-box;
+}
+.el-card {
+  width: calc(100% - 32px);
+  height: calc(100vh - 32px);
+  margin: 16px;
+  padding: 16px;
+  border-radius: 8px;
+}
 </style>

+ 186 - 0
src/views/purchase/equipmentData/add.vue

@@ -0,0 +1,186 @@
+<template>
+  <div id="addEquipment">
+    <el-card style="position: relative;">
+      <span>基本信息</span>
+      <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto" :show-message="false">
+        <el-row :gutter="10">
+
+          <el-col :span="1.5">
+            <el-form-item label="物料编码" prop="materialCode">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.materialCode">
+                <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial()"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="物料名称" prop="materialName">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.materialName">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :span="1.5">
+            <el-form-item label="设备类别" prop="deviceCategory">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.deviceCategory">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="厂家名称" prop="deviceCategory">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.deviceCategory">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="型号" prop="model">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.model">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="价格" prop="price">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.price">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="省份" prop="province">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.province">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="大区负责人" prop="largeZoneCommander">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.largeZoneCommander">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="业务经理" prop="serviceManager">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.serviceManager">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="售后工程师" prop="afterSalesEngineer">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.afterSalesEngineer">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="参数" prop="parameters">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.parameters">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="备注" prop="parameters">
+              <el-input clearable :disabled="sonDisable" size="mini" v-model="basicForm.parameters">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+
+        </el-row>
+      </el-form>
+
+      <div class="btn_group">
+        <el-button type="primary" size="mini"  @click="editPage" v-if="sonPageStu == 'check' && row.status == '0'">编辑</el-button>
+        <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
+        <el-button size="mini" plain @click="back">返回</el-button>
+      </div>
+    </el-card>
+
+    <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
+  </div>
+</template>
+
+<script>
+export default {
+  components: {
+    popDialog: () => import("@/components/PopDialog/index2.vue"),
+  },
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return {
+      // 不能直接改变props传来的值
+      sonPageStu: this.pageStu,
+      sonDisable: this.disable,
+      basicForm: {
+        materialCode: '',
+        materialName: '',
+        materialId: '',
+        deviceCategory: '',
+        factoryName: '',
+        model: '',
+        price: '',
+        parameters: '',
+        province: '',
+        largeZoneCommander: '',
+        serviceManager: '',
+        afterSalesEngineer: '',
+        remark: '',
+      },
+      basicRules: {},
+    }
+  },
+  created() {
+    if(this.pageStu == 'check') {
+      console.log('数据', this.row)
+      this.getDetails(this.row)
+    } else if(this.pageStu == 'edit') {
+      this.getDetails(this.row)
+    } else if (this.pageStu == 'add') {
+
+    }
+  },
+  methods: {
+    getDetails() {
+
+    },
+    editPage() {},
+    save() {},
+    back() {
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    // 选择物料编码带出数据
+    chooseMaterial() {
+      // 传0只展示同步NC了的物料
+      this.$refs.materialRefer.init(0)
+    },
+    selectMaterial(selection) {
+      console.log('选中的物料', selection)
+      this.basicForm.materialCode = selection[0].code
+      this.basicForm.materialName = selection[0].name
+      this.basicForm.materialId = selection[0].id
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  // width: 100%;
+  // margin: 20px 0;
+  display: flex;
+  justify-content: space-between;
+  position: absolute;
+  top: 10px;right: 20px;
+
+}  
+</style>

+ 279 - 0
src/views/purchase/equipmentData/index.vue

@@ -0,0 +1,279 @@
+<template>
+  <div id="equipmentData">
+    <div v-if="isList">
+      <el-card
+        v-loading="loading"
+        style="position: relative;"
+      >
+      <!-- <span>设备产品数据库</span> -->
+      <el-form class="search_area" label-width="100px">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="物料编码">
+                <el-input
+                  v-model.trim="params.materialCode"
+                  size="mini"
+                  clearable
+                  style="width: 200px"
+                />
+              </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="物料名称">
+                <el-input
+                  v-model.trim="params.materialName"
+                  size="mini"
+                  clearable
+                  style="width: 200px"
+                />
+              </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="设备类别">
+                <el-input
+                  v-model.trim="params.deviceCategory"
+                  size="mini"
+                  clearable
+                  style="width: 200px"
+                />
+              </el-form-item>
+          </el-col>
+        </el-row>
+
+        <div style="position: absolute;top: 10px;right: 10px;">
+          <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
+          <el-button size="mini" plain @click="resetList">重置</el-button>
+        </div>
+      </el-form>
+
+      <div class="btn_grooup">
+        <el-button type="primary" size="mini" @click="addDivision">新增</el-button>
+        <el-button type="primary" size="mini" @click="downLoadMb">下载模板</el-button>
+        <el-button type="primary" size="mini" @click="upload.open = true">导入数据</el-button>
+      </div>
+      <el-super-ux-table
+        v-model="tableData"
+        :size="size"
+        :dict="dict"
+        :page="pageInfo"
+        :height=500
+        :columns="TableColumns"
+        pagination
+        convenitentOperation
+        storage-key="equipmentDataSuperTable"
+        @row-dblclick="useSee"
+        @row-select="useSelect"
+        @pagination="useQuery(params, pageInfo)"
+      >
+        <ux-table-column
+          fixed="right"
+          title="操作"
+          align="center"
+          width="100"
+          >
+          <template slot-scope="scope">
+            <el-button type="text" size="mini" v-if="scope.row.status == '1' && scope.row.flowId" @click="reback(scope.row)">收回</el-button>
+          </template>
+        </ux-table-column>
+      </el-super-ux-table>
+      </el-card>
+    </div>
+
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="searchList"/>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog title="数据导入" :visible.sync="upload.open" width="400px">
+      <el-upload
+      ref="upload"
+      :limit="1"
+      accept=".xlsx, .xls"
+      :headers="upload.headers"
+      :action="upload.url + '?updateSupport=' + upload.updateSupport"
+      :disabled="upload.isUploading"
+      :on-progress="handleFileUploadProgress"
+      :on-success="handleFileSuccess"
+      :on-error="errorFile"
+      :auto-upload="false"
+      drag
+      >
+      <i class="el-icon-upload"></i>
+      <div class="el-upload__text">
+        将文件拖到此处,或
+        <em>点击上传</em>
+      </div>
+      <!-- <div class="el-upload__tip" slot="tip">
+        <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
+      </div> -->
+      <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer">
+      <el-button size="mini" type="primary" @click="submitFileForm">确 定</el-button>
+      <el-button size="mini" @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// 导入的token
+import { getToken } from "@/utils/auth";
+import { getEquipmentDataList, downLoadMb } from '@/api/purchase/equipmentData.js'
+export default {
+  name: "equipmentData",
+  dicts: [],
+  components: {
+    Add: () => import("./add.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+  },
+  data() {
+    return {
+      // 导入参数
+      upload: {
+        // 是否显示弹出层(导入)
+        open: false,
+        // 弹出层标题(导入)
+        title: "数据导入",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 1,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/device/origin/importData"
+      },
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      disable: false,
+      rowDetail: {},
+
+      size: "mini",
+      loading: false,
+      params: {
+        materialCode: '',
+        materialName: '',
+        deviceCategory: ''
+      },
+      pageInfo: {
+        pageNum: 1,
+        pageSize: 20,
+        total: 0
+      },
+      tableData: [],
+      selectData: [],
+      // SearchColumns: SearchColumns,
+      TableColumns: [
+        { item: { key: "materialCode", title: "物料编码", width: 150 }, attr: {} },
+        { item: { key: "materialName", title: "物料名称", width: 150 }, attr: {} },
+        { item: { key: "deviceCategory", title: "设备类别", width: 150 }, attr: {} },
+        { item: { key: "factoryName", title: "厂家名称", width: 150 }, attr: {} },
+        { item: { key: "model", title: "型号", width: 150 }, attr: {} },
+        { item: { key: "price", title: "价格", width: 150 }, attr: {} },
+        { item: { key: "parameters", title: "参数", width: 150 }, attr: {} },
+        { item: { key: "province", title: "省份", width: 150 }, attr: {} },
+        { item: { key: "largeZoneCommander", title: "大区负责人", width: 150 }, attr: {} },
+        { item: { key: "serviceManager", title: "业务经理", width: 150 }, attr: {} },
+        { item: { key: "afterSalesEngineer", title: "售后工程师", width: 150 }, attr: {} },
+        { item: { key: "remark", title: "备注", width: 150 }, attr: {} },
+      ],
+    }
+  },
+  created() {
+    this.useQuery(this.params, this.pageInfo)
+  },
+  methods: {
+    useSee() {},
+    useSelect() {},
+    // 加载列表
+    async useQuery(prop, page) {
+      let params = {...prop, ...page}
+      await getEquipmentDataList(params).then(res => {
+        if( res.code === 200 ) {
+          this.tableData = res.rows
+          this.pageInfo.total = res.total
+        }
+      })
+    },
+    // 新增
+    addDivision() {
+      this.isList = false
+      this.page = 'add'
+      this.disable = false
+    },
+    // 下载模板
+    async downLoadMb() {
+      this.$modal.loading("正在下载模板,请稍后...");
+      downLoadMb().then(res => {
+        this.$modal.closeLoading();
+        const blob = new Blob([res], {
+          type: "application/vnd.ms-excel;charset=UTF-8",
+        });// 创建一个类文件对象:Blob对象表示一个不可变的、原始数据的类文件对象
+        const downloadElement = document.createElement("a"); //创建a标签
+        const href = window.URL.createObjectURL(blob); // 创建下载的链接
+        // var temp = res.headers["content-disposition"]; 
+        // var fileName = decodeURIComponent(temp.split("filename=")[1]); // 中文需要转码 (前端乱码)
+        // var name = fileName.split(";")[0]; //切割成文件名
+        downloadElement.href = href;  //下载地址
+        downloadElement.download = '设备产品数据库模板'+ this.parseTime(new Date().getTime()) + ".xlsx"; // 下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); // 点击下载
+        document.body.removeChild(downloadElement); // 下载完成移除元素
+        window.URL.revokeObjectURL(href); // 释放blob对象
+        this.download.open = false
+      }).catch(err => {
+        this.$modal.closeLoading();
+      })
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+      this.$modal.loading("正在导入数据,请稍后...");
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.$modal.closeLoading();
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+      this.useQuery(this.params, this.pageInfo)
+    },
+    errorFile(err) {
+      this.$modal.closeLoading();
+      this.$modal.notifyError("文件已变动,请重新上传");
+    },
+        // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    searchList() {
+      this.useQuery(this.params, this.pageInfo)
+    },
+    resetList() {
+      this.params = {
+        materialCode: '',
+        materialName: '',
+        deviceCategory: '',
+      }
+      this.useQuery(this.params, this.pageInfo)
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#equipmentData {
+  padding: 12px;
+  box-sizing: border-box;
+  overflow-y: scroll;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>

+ 248 - 248
src/views/purchase/purchase-order/add/column.js

@@ -614,130 +614,130 @@ const PurchaseTabColumns =[
       },
     ]
   },
-  {
-    title: '执行结果',
-    key: 'puOrderExecuteList',
-    tableColumns: [
-      // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
-      {
-        key: "rowno",
-        title: "行号",
-        inputType: "Input",
-        disabled:true,
-        require:false,
-      },
-      {
-        key: "materialName",
-        title: "物料",
-        inputType: "PopoverSelect",
-        width: 180,
-        require: true,
-        valueKey: "id",
-        referName: "MATERIAL_PARAM",
-        dataMapping: {
-          material: "id",
-          materialName: "name",
-          materialCode: "code",
-          // materialClassify:'classifyIdName',
-          materialManufacturersCode:'manufacturersMaterialCode',
-          specification:'specification',
-          model:'model',
-          isMedcine:'isMedicine',
-          manufacturer:'manufacturerId',
-          manufacturerName:'manufacturerIdName',
-          unit:'unitId',
-          unitName:'unitIdName',
-          // tax:'materialRateName',
-          storageCondition:'storageCondition',
-          carriageCondition:'transportationCondition',
-          materialClassifyOneName:'oneClass',
-          materialClassifyTwoName:'twoClass',
-          materialClassifyThreeName:'threeClass',
-          materialClassifyFourName:'fourClass',
-          registration:'registrationNo',
-          isDrug:'isDrug',
-        },
-        queryParams: () => ({}),
-        width:180,
-      },
-      {
-        key: "specification",
-        title: "规格",
-        inputType: "Input",
-        disabled:true,
-        readonly:true,
-      },
-      {
-        key: "qty",
-        title: "数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        require: true,
-        isSummary:true,
-      },
-      {
-        key: "stroageQty",
-        title: "累计到货主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "stockQty",
-        title: "累计入库主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "invoiceQty",
-        title: "累计开票主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "rollbackQty",
-        title: "累计退货主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "backStockQty",
-        title: "累计退库主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "floatQty",
-        title: "未到货数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      // {
-      //   key: "createByName",
-      //   title: "创建人",
-      //   inputType: "Input",
-      //   width: 120
-      // },
-      // {
-      //   key: "updateByName",
-      //   title: "更新人",
-      //   inputType: "Input",
-      //   width: 120
-      // },
-    ]
-  },
+  // {
+  //   title: '执行结果',
+  //   key: 'puOrderExecuteList',
+  //   tableColumns: [
+  //     // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
+  //     {
+  //       key: "rowno",
+  //       title: "行号",
+  //       inputType: "Input",
+  //       disabled:true,
+  //       require:false,
+  //     },
+  //     {
+  //       key: "materialName",
+  //       title: "物料",
+  //       inputType: "PopoverSelect",
+  //       width: 180,
+  //       require: true,
+  //       valueKey: "id",
+  //       referName: "MATERIAL_PARAM",
+  //       dataMapping: {
+  //         material: "id",
+  //         materialName: "name",
+  //         materialCode: "code",
+  //         // materialClassify:'classifyIdName',
+  //         materialManufacturersCode:'manufacturersMaterialCode',
+  //         specification:'specification',
+  //         model:'model',
+  //         isMedcine:'isMedicine',
+  //         manufacturer:'manufacturerId',
+  //         manufacturerName:'manufacturerIdName',
+  //         unit:'unitId',
+  //         unitName:'unitIdName',
+  //         // tax:'materialRateName',
+  //         storageCondition:'storageCondition',
+  //         carriageCondition:'transportationCondition',
+  //         materialClassifyOneName:'oneClass',
+  //         materialClassifyTwoName:'twoClass',
+  //         materialClassifyThreeName:'threeClass',
+  //         materialClassifyFourName:'fourClass',
+  //         registration:'registrationNo',
+  //         isDrug:'isDrug',
+  //       },
+  //       queryParams: () => ({}),
+  //       width:180,
+  //     },
+  //     {
+  //       key: "specification",
+  //       title: "规格",
+  //       inputType: "Input",
+  //       disabled:true,
+  //       readonly:true,
+  //     },
+  //     {
+  //       key: "qty",
+  //       title: "数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       require: true,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "stroageQty",
+  //       title: "累计到货主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "stockQty",
+  //       title: "累计入库主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "invoiceQty",
+  //       title: "累计开票主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "rollbackQty",
+  //       title: "累计退货主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "backStockQty",
+  //       title: "累计退库主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "floatQty",
+  //       title: "未到货数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     // {
+  //     //   key: "createByName",
+  //     //   title: "创建人",
+  //     //   inputType: "Input",
+  //     //   width: 120
+  //     // },
+  //     // {
+  //     //   key: "updateByName",
+  //     //   title: "更新人",
+  //     //   inputType: "Input",
+  //     //   width: 120
+  //     // },
+  //   ]
+  // },
 ];
 
 // 事业发展部
@@ -1404,130 +1404,130 @@ const CauseTabColumns =[
 
     ]
   },
-  {
-    title: '执行结果',
-    key: 'puOrderExecuteList',
-    tableColumns: [
-      // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
-      {
-        key: "rowno",
-        title: "行号",
-        inputType: "Input",
-        disabled:true,
-        require:false,
-      },
-      {
-        key: "materialName",
-        title: "物料",
-        inputType: "PopoverSelect",
-        width: 180,
-        require: true,
-        valueKey: "id",
-        referName: "MATERIAL_PARAM",
-        dataMapping: {
-          material: "id",
-          materialName: "name",
-          materialCode: "code",
-          // materialClassify:'classifyIdName',
-          materialManufacturersCode:'manufacturersMaterialCode',
-          specification:'specification',
-          model:'model',
-          isMedcine:'isMedicine',
-          manufacturer:'manufacturerId',
-          manufacturerName:'manufacturerIdName',
-          unit:'unitId',
-          unitName:'unitIdName',
-          // tax:'materialRateName',
-          storageCondition:'storageCondition',
-          carriageCondition:'transportationCondition',
-          materialClassifyOneName:'oneClass',
-          materialClassifyTwoName:'twoClass',
-          materialClassifyThreeName:'threeClass',
-          materialClassifyFourName:'fourClass',
-          registration:'registrationNo',
-          isDrug:'isDrug',
-        },
-        queryParams: () => ({}),
-        width:180,
-      },
-      {
-        key: "specification",
-        title: "规格",
-        inputType: "Input",
-        disabled:true,
-        readonly:true,
-      },
-      {
-        key: "qty",
-        title: "数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        require: true,
-        isSummary:true,
-      },
-      {
-        key: "stroageQty",
-        title: "累计到货主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "stockQty",
-        title: "累计入库主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "invoiceQty",
-        title: "累计开票主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "rollbackQty",
-        title: "累计退货主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "backStockQty",
-        title: "累计退库主数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      {
-        key: "floatQty",
-        title: "未到货数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180,
-        isSummary:true,
-      },
-      // {
-      //   key: "createByName",
-      //   title: "创建人",
-      //   inputType: "Input",
-      //   width: 120
-      // },
-      // {
-      //   key: "updateByName",
-      //   title: "更新人",
-      //   inputType: "Input",
-      //   width: 120
-      // },
-    ]
-  },
+  // {
+  //   title: '执行结果',
+  //   key: 'puOrderExecuteList',
+  //   tableColumns: [
+  //     // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
+  //     {
+  //       key: "rowno",
+  //       title: "行号",
+  //       inputType: "Input",
+  //       disabled:true,
+  //       require:false,
+  //     },
+  //     {
+  //       key: "materialName",
+  //       title: "物料",
+  //       inputType: "PopoverSelect",
+  //       width: 180,
+  //       require: true,
+  //       valueKey: "id",
+  //       referName: "MATERIAL_PARAM",
+  //       dataMapping: {
+  //         material: "id",
+  //         materialName: "name",
+  //         materialCode: "code",
+  //         // materialClassify:'classifyIdName',
+  //         materialManufacturersCode:'manufacturersMaterialCode',
+  //         specification:'specification',
+  //         model:'model',
+  //         isMedcine:'isMedicine',
+  //         manufacturer:'manufacturerId',
+  //         manufacturerName:'manufacturerIdName',
+  //         unit:'unitId',
+  //         unitName:'unitIdName',
+  //         // tax:'materialRateName',
+  //         storageCondition:'storageCondition',
+  //         carriageCondition:'transportationCondition',
+  //         materialClassifyOneName:'oneClass',
+  //         materialClassifyTwoName:'twoClass',
+  //         materialClassifyThreeName:'threeClass',
+  //         materialClassifyFourName:'fourClass',
+  //         registration:'registrationNo',
+  //         isDrug:'isDrug',
+  //       },
+  //       queryParams: () => ({}),
+  //       width:180,
+  //     },
+  //     {
+  //       key: "specification",
+  //       title: "规格",
+  //       inputType: "Input",
+  //       disabled:true,
+  //       readonly:true,
+  //     },
+  //     {
+  //       key: "qty",
+  //       title: "数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       require: true,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "stroageQty",
+  //       title: "累计到货主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "stockQty",
+  //       title: "累计入库主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "invoiceQty",
+  //       title: "累计开票主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "rollbackQty",
+  //       title: "累计退货主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "backStockQty",
+  //       title: "累计退库主数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     {
+  //       key: "floatQty",
+  //       title: "未到货数量",
+  //       inputType: "InputNumber",
+  //       controlsPosition: "right",
+  //       width: 180,
+  //       isSummary:true,
+  //     },
+  //     // {
+  //     //   key: "createByName",
+  //     //   title: "创建人",
+  //     //   inputType: "Input",
+  //     //   width: 120
+  //     // },
+  //     // {
+  //     //   key: "updateByName",
+  //     //   title: "更新人",
+  //     //   inputType: "Input",
+  //     //   width: 120
+  //     // },
+  //   ]
+  // },
 ];
 // export const initTabColumns = () => tabColumns;
 

+ 56 - 55
src/views/purchase/purchase-order/add/index.vue

@@ -57,7 +57,8 @@ export default {
       params: {
         ...initParams(NewColumns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // 执行结果
+        // puOrderExecuteList: [],
       },
       tabColumns: NewTabColumns,
       tabName: "puOrderItemList",
@@ -91,26 +92,28 @@ export default {
     },
   },
   watch: {
-    "params.puOrderItemList": {
-      handler(nVal, oVal) {
-        this.visible &&
-          this.handleSynchronousMaterial(
-            "puOrderItemList",
-            "puOrderExecuteList"
-          );
-      },
-      deep: true,
-    },
-    "params.puOrderExecuteList": {
-      handler(nVal, oVal) {
-        this.visible &&
-          this.handleSynchronousMaterial(
-            "puOrderExecuteList",
-            "puOrderItemList"
-          );
-      },
-      deep: true,
-    },
+    // 同步物料信息与执行结果
+    // "params.puOrderItemList": {
+    //   handler(nVal, oVal) {
+    //     this.visible &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderItemList",
+    //         "puOrderExecuteList"
+    //       );
+    //   },
+    //   deep: true,
+    // },
+    // 执行结果监听
+    // "params.puOrderExecuteList": {
+    //   handler(nVal, oVal) {
+    //     this.visible &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderExecuteList",
+    //         "puOrderItemList"
+    //       );
+    //   },
+    //   deep: true,
+    // },
     "params.billType": {
       handler(nVal, oVal) {
         // let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
@@ -137,6 +140,23 @@ export default {
         this.count++;
       },
     },
+    "params.isBack": {
+      handler(nVal, oVal) {
+        console.log(nVal, "val");
+        if (nVal === "Y") {
+          this.rules.retReasonName = [
+            { required: true, message: "退换原因不能为空", trigger: "change" },
+          ];
+          this.rules.processTypeName = [
+            { required: true, message: "处理方式不能为空", trigger: "change" },
+          ];
+        } else {
+          this.rules.retReasonName = null;
+          this.rules.processTypeName = null;
+        }
+        this.count++;
+      },
+    },
   },
   methods: {
     beforeOpen() {
@@ -209,7 +229,8 @@ export default {
 
           for (const key in this.params) {
             // if (Array.isArray(this.params[key])) {
-            if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+            // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+            if (key === "puOrderItemList") {
               this.params[key].forEach((v) => {
                 v.id = "";
                 v.demandCode = "";
@@ -234,7 +255,8 @@ export default {
     addTableRow(prop) {
       for (const key in this.params) {
         // if (Array.isArray(this.params[key])) {
-        if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        if (key === "puOrderItemList") {
           const arr = this.tabColumns.find(
             (element) => element.key === key
           ).tableColumns;
@@ -344,7 +366,7 @@ export default {
       this.params = {
         ...initParams(this.columns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       };
       this.setVisible(false);
     },
@@ -353,8 +375,8 @@ export default {
       this.$refs["orderAddForm"].validate(async (valid) => {
         if (valid) {
           if (
-            !this.params["puOrderItemList"].length ||
-            !this.params["puOrderExecuteList"].length
+            !this.params["puOrderItemList"].length
+            // || !this.params["puOrderExecuteList"].length
           ) {
             this.$notify.error({
               title: "错误",
@@ -590,7 +612,7 @@ export default {
         this.handleGetPrice();
       }
       this.$refs.puOrderItemList[0].updateFooter();
-      this.$refs.puOrderExecuteList[0].updateFooter();
+      // this.$refs.puOrderExecuteList[0].updateFooter();
 
       // if(this.role === 'syfz-purchaseorder' && row.material && (type == "qty" ||type === "taxPrice" )){
 
@@ -638,7 +660,7 @@ export default {
 
         let tabList = {
           puOrderItemList: [...this.params.puOrderItemList],
-          puOrderExecuteList: [...this.params.puOrderExecuteList],
+          // puOrderExecuteList: [...this.params.puOrderExecuteList],
         };
 
         const blob = new Blob([JSON.stringify(tabList)], {
@@ -757,8 +779,8 @@ export default {
   mounted() {},
   updated() {
     this.$nextTick(() => {
-      this.$refs.puOrderExecuteList &&
-        this.$refs.puOrderExecuteList[0].doLayout();
+      // this.$refs.puOrderExecuteList &&
+      //   this.$refs.puOrderExecuteList[0].doLayout();
       this.$refs.puOrderItemList && this.$refs.puOrderItemList[0].doLayout();
     });
   },
@@ -951,18 +973,6 @@ export default {
             :label="column.title"
             :name="column.key"
           >
-            <!-- <virtual-scroll 
-            :data="params[column.key]" 
-            :item-size="53" 
-            :key-prop="column.key === 'puOrderItemList' ? 'rowNo' :'rowno'" 
-            @change="(virtualList) => tableData = virtualList" 
-            :virtualized="true"
-          >
-              <template slot-scope="{ headerCellFixedStyle, cellFixedStyle }"> -->
-
-            <!-- :headerCellStyle="headerCellFixedStyle"
-                :cellStyle="cellFixedStyle"
-                  -->
             <ux-grid
               border
               use-virtual
@@ -980,12 +990,7 @@ export default {
                 color: '#515a6e',
               }"
             >
-              <!-- :edit-config="{trigger: 'click', mode: 'cell'}" -->
-              <!-- :row-height="rowHeight" -->
-              <!-- :row-key="column.key === 'puOrderItemList' ? 'rowNo' :'rowno'" -->
-
               <template slot="empty">暂无数据</template>
-
               <ux-table-column
                 v-for="(cColumn, cIndex) in column.tableColumns"
                 :key="cIndex"
@@ -994,7 +999,6 @@ export default {
                 :field="cColumn.key"
                 resizable
               >
-                <!-- :edit-render="!cColumn.disabled" -->
                 <template slot="header" slot-scope="scope">
                   <span v-if="cColumn.require" style="color: #ff4949">*</span>
                   <span>
@@ -1002,7 +1006,6 @@ export default {
                   </span>
                 </template>
 
-                <!-- v-slot:edit="scope" -->
                 <template slot-scope="scope">
                   <el-form-item label-width="0">
                     <el-tag v-if="cColumn.key === 'index'">
@@ -1038,15 +1041,15 @@ export default {
                     <el-input-number
                       v-if="cColumn.inputType === 'InputNumber'"
                       v-model="scope.row[cColumn.key]"
+                      :disabled="cColumn.disabled"
+                      :clearable="cColumn.clearable"
                       :precision="cColumn.precision"
-                      :controls-position="cColumn.controlsPosition"
                       :placeholder="cColumn.placeholder"
-                      @change="handleInputChange(scope.row, cColumn.key)"
-                      :clearable="cColumn.clearable"
-                      :disabled="cColumn.disabled"
+                      :controls-position="cColumn.controlsPosition"
                       :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
                       size="mini"
                       style="width: 100%"
+                      @change="handleInputChange(scope.row, cColumn.key)"
                     ></el-input-number>
 
                     <el-select
@@ -1094,8 +1097,6 @@ export default {
                 </template>
               </ux-table-column>
             </ux-grid>
-            <!-- </template>
-          </virtual-scroll> -->
           </el-tab-pane>
         </el-tabs>
         <el-row style="position: absolute; top: 20px; right: 20px">

+ 423 - 95
src/views/purchase/purchase-order/column.js

@@ -1,6 +1,6 @@
 import Cookies from "js-cookie";
 
-// 集采中心
+// 集采中心-新修
 const PurColumns = [
   { 
     item:{ 
@@ -111,6 +111,24 @@ const PurColumns = [
     width:100,
   },
   { 
+    item:{ key: "approveUser", title: "当前审批人" ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
+    item:{ key: "redeployName", title: "转派人" , width:100 ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
+    item:{ key: "redeployDate", title: "转派时间" ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
     item:{ key: "remark", title: "备注" ,},
     attr:{
       isHidden:true,
@@ -203,7 +221,7 @@ const PurColumns = [
   item: { ...item, hidden: true, fixed: false },
 }));
 
-// 事业发展部
+// 事业发展部(原本格式)
 const CauseColumns = [
   { 
     item:{ 
@@ -683,6 +701,24 @@ const CauseColumns = [
     },
   },
   { 
+    item:{ key: "approveUser", title: "当前审批人" ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
+    item:{ key: "redeployName", title: "转派人" , width: 100,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
+    item:{ key: "redeployDate", title: "转派时间" ,},
+    attr:{
+      isHidden:true,
+    },
+  },
+  { 
     item:{ key: "remark", title: "备注" ,},
     attr:{
       isHidden:true,
@@ -694,6 +730,298 @@ const CauseColumns = [
   item: { ...item, hidden: true, fixed: false },
 }));
 
+// 集采中心
+const PurTabColumns = [
+
+  {
+    title: '物料信息',
+    key: 'puOrderItemList',
+    tableColumns: [
+      { 
+        item:{key: "customerName", title: "收货客户" ,width:100,},
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
+        item:{
+          key: "rowNo", title: "行号",width:80,},
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
+        item:{key: "materialCode", title: "物料编码", width:150,  },
+        attr:{
+          isHidden:true,
+        },
+       
+      },
+      { 
+        item:{key: "materialName", title: "物料名称",width:150,  },
+        attr:{
+          isHidden:true,
+        },
+        
+      },
+      { 
+        item:{key: "specification", title: "规格",width:100,  },
+        attr:{
+          isHidden:true,
+        },
+        
+      },
+      { 
+        item:{key: "model", title: "型号",width: 100  },
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
+        item:{key: "manufacturerName", title: "生产厂家代理人", width:150, },
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
+        item:{key: "unitName", title: "单位", width: 80 },
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
+        item:{key: "qty", title: "数量",width:120, },
+        attr:{
+          isHidden:true,
+          isSummary:true,
+        },
+      },
+      { 
+        item:{key: "taxPrice", title: "含税单价" ,width:120,},
+        attr:{
+        },
+      },
+      { 
+        item:{key: "money", title: "价税合计" ,width:120, },
+        attr:{
+          isSummary:true,
+        },
+      },
+      {
+        item:{
+          
+          key: "isGift",
+          title: "赠品",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      { 
+        item:{
+          key: "nitemdiscountrate", 
+          title: "折扣(%)", 
+          width:80, 
+        },
+        attr:{},
+       },
+      { 
+        item:{key: "taxDeductMoneya", title: "折扣金额", width:80,  },
+        attr:{
+          isSummary:true,
+        },
+      },
+      { 
+        item:{key: "discountRule", title: "折扣规则编码", width:100,  },
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
+        item:{key: "tax", title: "税率" ,width:120, },
+        attr:{
+        },
+      },
+      { 
+        item:{key: "registration", title: "注册证号", width:100, },
+        attr:{
+          isHidden:true,
+        },
+        
+      },
+      { 
+        item:{ key: "demandCode", title:"采购需求单号",width:150,},
+        attr:{
+          isHidden:true,
+        },
+        
+      },
+      {
+        item:{
+          
+          key: "isReplenishment",
+          title: "补单标识",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      { 
+        item:{
+          key: "isUrgency", 
+          title: "紧急标识" ,
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      {
+        item:{
+          
+          key: "priceType",
+          title: "价格类型"
+          , width:100,
+        },
+        attr:{
+          is: "el-dict-tag",
+          dictName: "sys_price_type",
+        }
+      },
+      { 
+        item:{
+          
+          key: "isDistributionPrice", 
+          title: "配送价",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+       },
+       { 
+        item:{key: "unarrivedQty", title: "未到货数量" , width:80,},
+        attr:{
+          isSummary:true,
+        },
+      },
+      {
+        item:{
+          
+          key: "isArrival",
+          title: "到货关闭",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      {
+        item:{
+          key: "isStorage",
+          title: "入库关闭",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      {
+        item:{
+          
+          key: "isPayment",
+          title: "付款关闭",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      {
+        item:{
+          
+          key: "isInvoice",
+          title: "开票关闭",
+          inputType: 'Checkbox',
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      {
+        item:{
+          key: "isMedcine",
+          title: "医药物料",
+          width:80,
+        },
+        attr:{
+          is: "el-checkbox",
+          'true-label':"Y",
+          'false-label':"N",
+          disabled:true,
+        },
+      },
+      { 
+        item:{key: "originalQty", title: "原始数量" ,width:80,},
+        attr:{
+          isHidden:true,
+          isSummary:true,
+        },
+      },
+      { 
+        item:{
+          key: "originalMoney", 
+          title: "原始金额" ,
+          width:80,
+        },
+        attr:{
+          isSummary:true,
+        },
+      },
+      
+    ].map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true, fixed: false },
+    }))
+  },
+  
+];
+
+// 事业发展部
 const CommonTabColumns = [
 
   {
@@ -1260,92 +1588,92 @@ const CommonTabColumns = [
       item: { ...item, hidden: true, fixed: false },
     }))
   },
-  {
-    title: '执行结果',
-    key: 'puOrderExecuteList',
-    tableColumns: [
-      // { item:{key: "orderId", title: "采购订单ID",  },
-      { 
-        item:{key: "rowno", title: "行号",width:80, },
-        attr:{
-          isHidden:true,
-        },
-      },
-      { 
-        item:{key: "material", title: "物料ID", width:1, },
-        attr:{
-          isHidden:true,
-        },
-      },
-      { 
-        item:{key: "materialName", title: "物料名称", width:150, },
-        attr:{
-          isHidden:true,
-        },
-      },
-      { 
-        item:{key: "specification", title: "规格", width:100, },
-        attr:{
-          isHidden:true,
-        },
-      },
-      { 
-        item:{key: "qty", title: "数量",width:120, },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      { 
-        item:{key: "stroageQty", title: "累计到货主数量",width:120,  },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      { 
-        item:{key: "stockQty", title: "累计入库主数量",width:120,  },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      { 
-        item:{key: "invoiceQty", title: "累计开票主数量",width:120,  },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      { 
+  // {
+  //   title: '执行结果',
+  //   key: 'puOrderExecuteList',
+  //   tableColumns: [
+  //     // { item:{key: "orderId", title: "采购订单ID",  },
+  //     { 
+  //       item:{key: "rowno", title: "行号",width:80, },
+  //       attr:{
+  //         isHidden:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "material", title: "物料ID", width:1, },
+  //       attr:{
+  //         isHidden:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "materialName", title: "物料名称", width:150, },
+  //       attr:{
+  //         isHidden:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "specification", title: "规格", width:100, },
+  //       attr:{
+  //         isHidden:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "qty", title: "数量",width:120, },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "stroageQty", title: "累计到货主数量",width:120,  },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "stockQty", title: "累计入库主数量",width:120,  },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "invoiceQty", title: "累计开票主数量",width:120,  },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     { 
         
-        item:{key: "rollbackQty", title: "累计退货主数量",width:120,  },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      { 
-        item:{key: "backStockQty", title: "累计退库主数量",width:120,  },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      { 
-        item:{key: "floatQty", title: "未到货数量",width:120, },
-        attr:{
-          isHidden:true,
-          isSummary:true,
-        },
-      },
-      // { item:{key: "createByName", title: "创建人", },
-      // { item:{key: "updateByName", title: "更新人", },
-    ].map(({ item, attr }) => ({
-      attr,
-      item: { ...item, hidden: true, fixed: false },
-    }))
-  },
+  //       item:{key: "rollbackQty", title: "累计退货主数量",width:120,  },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "backStockQty", title: "累计退库主数量",width:120,  },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     { 
+  //       item:{key: "floatQty", title: "未到货数量",width:120, },
+  //       attr:{
+  //         isHidden:true,
+  //         isSummary:true,
+  //       },
+  //     },
+  //     // { item:{key: "createByName", title: "创建人", },
+  //     // { item:{key: "updateByName", title: "更新人", },
+  //   ].map(({ item, attr }) => ({
+  //     attr,
+  //     item: { ...item, hidden: true, fixed: false },
+  //   }))
+  // },
 ];
 
 export const SearchColumns = [
@@ -1616,17 +1944,17 @@ export const SearchColumns = [
 
 export const judgeColumns = () =>{
 
-  // let Columns =  _.cloneDeep(PurColumns);
-  // let TabColumns =  _.cloneDeep(CommonTabColumns);
+  let Columns =  _.cloneDeep(PurColumns);
+  let TabColumns =  _.cloneDeep(PurTabColumns);
 
-  // let roles =  Cookies.get('roles').split(',');
-  // let role = roles.find(item => item === "syfz-purchaseorder") || "procurementManager";
+  let roles =  Cookies.get('roles').split(',');
+  let role = roles.find(item => item === "syfz-purchaseorder") || "procurementManager";
 
-  // if(role === "syfz-purchaseorder"){
+  if(role === "syfz-purchaseorder"){
     // 事业发展部
-    let Columns =  _.cloneDeep(CauseColumns);
-    let TabColumns =  _.cloneDeep(CommonTabColumns);
-  // }
+    // Columns =  _.cloneDeep(PurColumns);
+    TabColumns =  _.cloneDeep(CommonTabColumns);
+  }
 
   return { Columns,TabColumns }
 

+ 51 - 38
src/views/purchase/purchase-order/edit/index.vue

@@ -31,7 +31,7 @@ export default {
       params: {
         ...initParams(editColumns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       },
 
       tabColumns: editTabColumns,
@@ -72,28 +72,28 @@ export default {
       const { id } = this.params;
       // this.fetchTable(id, newProp);
     },
-    "params.puOrderItemList": {
-      handler(nVal, oVal) {
-        this.params.source == 3 &&
-          this.handleSynchronousMaterial(
-            "puOrderItemList",
-            "puOrderExecuteList"
-          );
-      },
-      deep: true,
-      immediate: true,
-    },
-    "params.puOrderExecuteList": {
-      handler(nVal, oVal) {
-        this.params.source == 3 &&
-          this.handleSynchronousMaterial(
-            "puOrderExecuteList",
-            "puOrderItemList"
-          );
-      },
-      deep: true,
-      immediate: true,
-    },
+    // "params.puOrderItemList": {
+    //   handler(nVal, oVal) {
+    //     this.params.source == 3 &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderItemList",
+    //         "puOrderExecuteList"
+    //       );
+    //   },
+    //   deep: true,
+    //   immediate: true,
+    // },
+    // "params.puOrderExecuteList": {
+    //   handler(nVal, oVal) {
+    //     this.params.source == 3 &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderExecuteList",
+    //         "puOrderItemList"
+    //       );
+    //   },
+    //   deep: true,
+    //   immediate: true,
+    // },
     "params.billType": {
       handler(nVal, oVal) {
         // let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
@@ -114,6 +114,23 @@ export default {
         this.count++;
       },
     },
+    "params.isBack": {
+      handler(nVal, oVal) {
+        console.log(nVal, "val");
+        if (nVal === "Y") {
+          this.rules.retReasonName = [
+            { required: true, message: "退换原因不能为空", trigger: "change" },
+          ];
+          this.rules.processTypeName = [
+            { required: true, message: "处理方式不能为空", trigger: "change" },
+          ];
+        } else {
+          this.rules.retReasonName = null;
+          this.rules.processTypeName = null;
+        }
+        this.count++;
+      },
+    },
   },
   methods: {
     setVisible(prop) {
@@ -186,8 +203,8 @@ export default {
     // 新增行
     addTableRow(prop) {
       for (const key in this.params) {
-        // if (Array.isArray(this.params[key])) {
-        if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        if (key === "puOrderItemList") {
           const arr = this.tabColumns.find(
             (element) => element["key"] === key
           ).tableColumns;
@@ -243,15 +260,11 @@ export default {
         });
       } else {
         for (const key in this.params) {
-          if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          if (key === "puOrderItemList") {
             this.params[key].forEach((item, index) => {
               let flag = key === "puOrderItemList" ? "rowNo" : "rowno";
 
-              // if(item.id && item.id === row.id){
-              //   console.log('删除已有ID的');
-              //   item['delFlag'] = '2';
-              // }
-
               if (item[flag] && item[flag] === row[delNo]) {
                 item.id
                   ? (item["delFlag"] = "2")
@@ -273,7 +286,7 @@ export default {
       this.params = {
         ...initParams(this.columns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       };
       this.setVisible(false);
     },
@@ -417,8 +430,8 @@ export default {
       // 组织
       if (type === "ORG_PARAM") {
         for (const key in this.params) {
-          // if (Array.isArray(this.params[key])) {
-          if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          if (key === "puOrderItemList") {
             this.params[key] = [];
           } else if (key === "sysFileRecordList") {
             this.params[key] = [];
@@ -535,7 +548,7 @@ export default {
         }
 
         this.$refs.puOrderItemList[0].updateFooter();
-        this.$refs.puOrderExecuteList[0].updateFooter();
+        // this.$refs.puOrderExecuteList[0].updateFooter();
       }
 
       // // 物料数量变化----询价
@@ -622,7 +635,7 @@ export default {
 
         let tabList = {
           puOrderItemList: [...this.params.puOrderItemList],
-          puOrderExecuteList: [...this.params.puOrderExecuteList],
+          // puOrderExecuteList: [...this.params.puOrderExecuteList],
         };
 
         const blob = new Blob([JSON.stringify(tabList)], {
@@ -734,8 +747,8 @@ export default {
   mounted() {},
   updated() {
     this.$nextTick(() => {
-      this.$refs.puOrderExecuteList &&
-        this.$refs.puOrderExecuteList[0].doLayout();
+      // this.$refs.puOrderExecuteList &&
+      //   this.$refs.puOrderExecuteList[0].doLayout();
       this.$refs.puOrderItemList && this.$refs.puOrderItemList[0].doLayout();
     });
   },

+ 11 - 9
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() {
@@ -708,10 +709,10 @@ export default {
     <!-- 操作 -->
     <el-row :gutter="24" type="flex" justify="end" style="margin: 20px 0 12px">
       <el-col :span="24" style="text-align: right">
-        <query-scheme
+        <!-- <query-scheme
           :candidate="candidate"
           @submit="queryScheme"
-        ></query-scheme>
+        ></query-scheme> -->
         <el-button
           :size="size"
           type="primary"
@@ -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>
@@ -786,7 +788,7 @@ export default {
       convenitentOperation
       :columns="tableColumns"
       :selectable="setSelectable"
-      storage-key="PuchaseOrderSuperTable1"
+      storage-key="PuchaseOrderSuperTable"
       @select="handleSelect"
       @row-click="handleDetailsData"
       @row-dblclick="handleOpenSeeDrawer"

+ 2 - 2
src/views/purchase/purchase-order/see/index.vue

@@ -49,7 +49,7 @@ export default {
       params: {
         ...initParams(NewColumns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       },
 
       tabColumns: NewTabColumns,
@@ -110,7 +110,7 @@ export default {
       this.params = {
         ...initParams(this.columns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       };
       this.setVisible(false);
     },

+ 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>

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

@@ -57,6 +57,10 @@ export default function useColumns() {
       attr: {},
     },
     { item: { key: "code", title: "订单生成单号",width :160 }, attr: {} },
+    { 
+      item: { key: "createTime", title: "创建时间",width :160 }, 
+      attr: {} 
+    },
     // {
     //   item: { key: "demandOrgName", title: "需求组织" ,width :100},
     //   attr: {},
@@ -81,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>