Răsfoiți Sursa

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

001295 1 an în urmă
părinte
comite
be014cd325
45 a modificat fișierele cu 4417 adăugiri și 4823 ștergeri
  1. 8 0
      src/api/business/purchase/task.js
  2. 9 0
      src/api/business/spd/goal_management/annualSaleGoal.js
  3. 9 0
      src/api/business/spd/goal_management/monthSaleGoalDetails.js
  4. 19 0
      src/api/purchase/equipmentData.js
  5. 208 0
      src/components/PopDialog/index2.vue
  6. 3 1
      src/components/popover-select-v2/multiple.vue
  7. 1 1
      src/components/query-scheme/colums.js
  8. 257 79
      src/components/query-scheme/index.vue
  9. 147 107
      src/components/query-scheme/sizer/index.vue
  10. 99 64
      src/components/super-ux-table/index.vue
  11. 37 15
      src/views/WMS/historical-route/index.vue
  12. 42 2
      src/views/business/spd/bo/plan/add.vue
  13. 23 3
      src/views/business/spd/target/AnnualSaleGoal.vue
  14. 7 6
      src/views/business/spd/target/AnnualSaleGoalMerge.vue
  15. 7 7
      src/views/business/spd/target/MonthGoalMerge.vue
  16. 3 3
      src/views/business/spd/target/MonthReturnGoal.vue
  17. 3 5
      src/views/business/spd/target/MonthReturnMerge.vue
  18. 58 4
      src/views/business/spd/target/MonthSaleGoal.vue
  19. 7 5
      src/views/business/spd/target/targetTemplate/detail.vue
  20. 6 0
      src/views/material/changeApply/columns.js
  21. 152 145
      src/views/material/changeApply/index.vue
  22. 6 1
      src/views/material/requisition/columns.js
  23. 473 431
      src/views/material/requisition/index.vue
  24. 22 14
      src/views/monitor/system/index.vue
  25. 1 1
      src/views/purchase/DemandSummary/index.vue
  26. 1 1
      src/views/purchase/PurchaseDemandList/index.vue
  27. 4 1
      src/views/purchase/apply/add/index.vue
  28. 4 1
      src/views/purchase/apply/copy/index.vue
  29. 4 1
      src/views/purchase/apply/edit/index.vue
  30. 0 1
      src/views/purchase/apply/index.vue
  31. 186 0
      src/views/purchase/equipmentData/add.vue
  32. 279 0
      src/views/purchase/equipmentData/index.vue
  33. 248 248
      src/views/purchase/purchase-order/add/column.js
  34. 0 1055
      src/views/purchase/purchase-order/add/columnCopy.js
  35. 0 1036
      src/views/purchase/purchase-order/add/index copy.vue
  36. 347 369
      src/views/purchase/purchase-order/add/index.vue
  37. 423 96
      src/views/purchase/purchase-order/column.js
  38. 342 369
      src/views/purchase/purchase-order/edit/index.vue
  39. 301 342
      src/views/purchase/purchase-order/index.vue
  40. 322 287
      src/views/purchase/purchase-order/see/index.vue
  41. 112 0
      src/views/purchase/purchase-order/zhuan-pai/record.vue
  42. 16 0
      src/views/purchase/task/columns.js
  43. 18 9
      src/views/purchase/task/index.vue
  44. 91 113
      src/views/purchase/task/xie-yi-zhi-cai/index.vue
  45. 112 0
      src/views/purchase/task/zhuan-pai/record.vue

+ 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/annualSaleGoal.js

@@ -50,4 +50,13 @@ export function submit(id) {
     method: 'post',
     data: id
   })
+}
+
+//重新提交
+export function resubmit(id) {
+  return request({
+    url: '/goal_management/annualSaleGoal/resubmit',
+    method: 'post',
+    data: id
+  })
 }

+ 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'
+  })
+}

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

+ 3 - 1
src/components/popover-select-v2/multiple.vue

@@ -244,9 +244,9 @@ export default {
     >
       <el-tag
         v-for="(tag, index) in lastSelectData"
-        :size="size"
         hit
         closable
+        :size="size"
         @close="useDelete(index)"
         style="margin-right: 5px"
       >
@@ -258,6 +258,7 @@ export default {
 <style scoped>
 .popover-select-v2 .el-input {
   width: inherit;
+  height: 100%;
 }
 .popover-select-v2 .el-input .el-icon-search {
   cursor: pointer;
@@ -273,4 +274,5 @@ export default {
 ::v-deep .el-table--mini .el-table__cell {
   height: 50px;
 }
+
 </style>

+ 1 - 1
src/components/query-scheme/colums.js

@@ -17,7 +17,7 @@ export const Columns = [
   {
     item:{
       key: 'value',
-      title:'值'
+      title:'值',
     },
     attr:{
       is:'el-input',

+ 257 - 79
src/components/query-scheme/index.vue

@@ -1,78 +1,177 @@
-
 <script>
-import { Columns } from './colums';
+import { Columns } from "./colums";
 export default {
-  name:'Inquire',
-  components:{
-    Sizer: () => import('./sizer/index.vue'),
+  name: "Inquire",
+  components: {
+    Sizer: () => import("./sizer/index.vue"),
   },
-  props:{
-    size:{
-      type:String,
-      default:'mini',
+  props: {
+    size: {
+      type: String,
+      default: "mini",
     },
     // 候选条件
-    candidate:{
-      type:Array,
-      default: () =>[]
+    candidate: {
+      type: Array,
+      default: () => [],
     },
   },
-  data(){
+  data() {
     return {
-      title: '查询方案',
+      title: "查询方案",
       visible: false,
-      tableData:[ 
-        { 
-          candidate: "orderCode", 
-          options: "like", 
-          value: "12315465416546", 
-          operators: [ { "label": "等于", "value": "eq" }, { "label": "模糊", "value": "like" } ],
-          attr:{ is: 'el-input'}
-        }, 
-        { 
-          candidate: "date", 
-          options: "range", 
-          value: "3333", 
-          operators: [ { "label": "范围", "value": "range" } ] ,
-          attr:{ is: 'el-input'}
-        }, 
-      ]
-      
-    }
+      menuVisible: false,
+      testModeCode: {},
+      CurrentRow: {},
+      schemeData: [
+        {
+          id: 1,
+          name: "方案1",
+        },
+        {
+          id: 2,
+          name: "方案2",
+        },
+        {
+          id: 3,
+          name: "方案3",
+        },
+        {
+          id: 4,
+          name: "方案4",
+        },
+      ],
+      tableData: [
+        {
+          candidate: "orderCode",
+          options: "like",
+          value: "12315465416546",
+          operators: [
+            { label: "等于", value: "eq" },
+            { label: "模糊", value: "like" },
+          ],
+          attr: { is: "el-input" },
+        },
+        {
+          candidate: "date",
+          options: "range",
+          value: "3333",
+          operators: [{ label: "范围", value: "range" }],
+          attr: { is: "el-input" },
+        },
+      ],
+    };
   },
-  computed:{
-    $dicts:{
-      get(){
-        console.log(this.tableData,'tableData');
-        console.log(this.candidate,'candidate');
-        return []
+  computed: {
+    $dicts: {
+      get() {
+        console.log(this.tableData, "tableData");
+        console.log(this.candidate, "candidate");
+        return [];
       },
-      set(){}
-    }
+      set() {},
+    },
   },
-  methods:{
-    open(){
+  methods: {
+    open() {
       this.visible = true;
     },
-    onClose(){
+    onClose() {
       this.visible = false;
     },
-    addCase(){
-      console.log('addCase');
+    // 清空值
+    onReset() {
+      this.tableData = this.tableData.map((item) => {
+        return {
+          ...item,
+          value: "",
+        };
+      });
+    },
+    // 新增方案
+    addCase() {
+      this.$prompt("请输入方案名称", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /\s*\S+?/,
+        inputErrorMessage: "方案名称不能为空",
+      })
+        .then(({ value }) => {
+          let caseData = this.tableData.map((item) => {
+            return {
+              ...item,
+              value: "",
+            };
+          });
+          console.log(value, caseData, "caseData");
+        })
+        .catch(() => {});
+    },
+    // 重命名
+    renameRow(prop) {
+      console.log(prop, "renameRow");
+      this.$prompt("请输入新方案名称", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /\s*\S+?/,
+        inputErrorMessage: "方案名称不能为空",
+      })
+        .then(({ value }) => {})
+        .catch(() => {});
+    },
+    // 删除方案
+    deleteRow(prop) {
+      console.log(prop, "deleteRow");
+    },
+    // 设置为默认方案
+    setRow(prop) {
+      console.log(prop, "setRow");
+    },
+    onClick(row) {
+      console.log(row);
+    },
+    // 方案右键
+    rightClick(row, column, event) {
+      this.testModeCode = row.testModeCode;
+
+      // 先把模态框关死,目的是 第二次或者第n次右键鼠标的时候 它默认的是true
+      this.menuVisible = false;
+      // 显示模态窗口,跳出自定义菜单栏
+      this.menuVisible = true;
+      //关闭浏览器右键默认事件
+      event.preventDefault();
+
+      this.CurrentRow = row;
+
+      var menu = document.querySelector(".menu");
+
+      this.styleMenu(menu, event);
+    },
+    foo() {
+      // 取消鼠标监听事件 菜单栏
+      this.menuVisible = false;
+
+      // 关掉监听
+      document.removeEventListener("click", this.foo);
+    },
+    styleMenu(menu) {
+      menu.style.left = event.offsetX + 18 + "px";
+
+      menu.style.top = event.clientY - 50 + "px";
+
+      // 给整个document新增监听鼠标事件,点击任何位置执行foo方法
+      document.addEventListener("click", this.foo);
     },
   },
-  created(){},
-}
+  created() {},
+};
 </script>
 
 <template>
-  <el-button
-    :size="size"
-    @click="open"
-  >
+  <el-button :size="size" @click="open">
     {{ title }}
     <el-dialog
-      width="72%"
+      width="850px"
       class="inquire"
       append-to-body
       :visible.sync="visible"
@@ -81,61 +180,140 @@ export default {
       :close-on-press-escape="false"
     >
       <div slot="title" style="display: flex; justify-content: space-between">
-        <h4 style="margin: 0;">{{ title }}</h4>
+        <h4 style="margin: 0">{{ title }}</h4>
         <div>
-          <el-button 
-            type="primary" 
-            :size="size" 
+          <el-button
+            type="primary"
+            :size="size"
             icon="el-icon-search"
-            @click.native.prevent="$emit('submit',tableData)"
-          >筛 选</el-button>
-          <el-button :size="size" @click.native.prevent="onClose">取 消</el-button>
+            @click.native.prevent="$emit('submit', tableData)"
+            >筛 选</el-button
+          >
+          <el-button
+            :size="size"
+            icon="el-icon-refresh-right"
+            @click.native.prevent="onReset"
+            >清 空</el-button
+          >
+          <el-button :size="size" @click.native.prevent="onClose"
+            >取 消</el-button
+          >
         </div>
       </div>
       <el-container>
-        <el-aside 
-          width="200px" 
-          style="height: 350px;
-          position: relative;
-          border-right: 1px solid rgb(228, 228, 228);
-          background-color: rgb(255, 255, 255)"
+        <el-aside
+          width="220px"
+          style="
+            height: 350px;
+            border-right: 1px solid rgb(228, 228, 228);
+            background-color: rgb(255, 255, 255);
+          "
         >
-          Aside
-          <el-row style="position: absolute; bottom: 0;left: 10;">
+          <el-table
+            :data="schemeData"
+            :show-header="false"
+            :height="320"
+            empty-text=" "
+            show-overflow-tooltip
+            highlight-current-row
+            @cell-click="onClick"
+            @row-contextmenu="rightClick"
+          >
+            <el-table-column prop="name">
+              <template slot-scope="scope">
+                <i class="el-icon-document"></i>
+                {{ scope.row.name }}
+              </template>
+            </el-table-column>
+          </el-table>
+
+          <div id="contextmenu" class="menu" v-show="menuVisible">
+            <div class="contextmenu__item" @click="renameRow(CurrentRow)">
+              重命名
+            </div>
+            <div class="contextmenu__item" @click="deleteRow(CurrentRow)">
+              删除
+            </div>
+            <div class="contextmenu__item" @click="setRow(CurrentRow)">
+              设置为默认方案
+            </div>
+          </div>
+
+          <el-row style="position: absolute; bottom: 16px; left: 10">
             <el-col>
-              <el-button 
+              <el-button
                 type="primary"
                 :size="size"
                 @click.native.prevent="addCase"
-              >保存方案
+                >保存方案
               </el-button>
             </el-col>
           </el-row>
         </el-aside>
-        
-          <Sizer
-            v-model="tableData"
-            :size="size"
-            :candidate="candidate" 
-          ></Sizer>
 
+        <Sizer v-model="tableData" :size="size" :candidate="candidate"></Sizer>
       </el-container>
-      
     </el-dialog>
   </el-button>
 </template>
 
 <style lang="scss" scoped>
-::v-deep.inquire .el-dialog__header{
+::v-deep.inquire .el-dialog__header {
   padding: 15px 15px 10px;
 }
-::v-deep.inquire .el-dialog__body{
+::v-deep.inquire .el-dialog__body {
   padding: 5px;
   .el-aside,
-  .el-main{
+  .el-main {
     padding: 0 10px;
   }
 }
 
+::v-deep.el-table::before {
+  display: none;
+}
+
+::v-deep.el-table {
+  th,
+  td,
+  th.is-leaf {
+    border: none;
+  }
+
+  .el-table__cell {
+    padding: 2px 0;
+  }
+}
 
+// 菜单样式
+.contextmenu__item {
+  display: block;
+  line-height: 28px;
+  text-align: center;
+}
+.contextmenu__item:not(:last-child) {
+  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+}
+.menu {
+  position: absolute;
+  background-color: #fff;
+  width: 100px;
+  /*height: 106px;*/
+  font-size: 12px;
+  color: #444040;
+  border-radius: 4px;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  border-radius: 3px;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  white-space: nowrap;
+  z-index: 1000;
+}
+.contextmenu__item:hover {
+  cursor: pointer;
+  background: #66b1ff;
+  border-color: #66b1ff;
+  color: #fff;
+}
 </style>

+ 147 - 107
src/components/query-scheme/sizer/index.vue

@@ -1,20 +1,20 @@
 <script>
-import { getOperators } from './operators';
-import { Columns } from '../colums';
-import { getDicts as getDicts } from '@/api/system/dict/data'
+import { getOperators } from "./operators";
+import { Columns } from "../colums";
+import { getDicts as getDicts } from "@/api/system/dict/data";
 export default {
-  name:'Sizer',
-  props:{
-    value:{
-      type:[Array],
-      require:true,
+  name: "Sizer",
+  props: {
+    value: {
+      type: [Array],
+      require: true,
     },
-    candidate:{
-      type:[Array],
-      require:true,
+    candidate: {
+      type: [Array],
+      require: true,
     },
   },
-  components:{
+  components: {
     ElDraggable: () => import("@/components/draggable/index.vue"),
     ElFileUpload: () => import("@/components/FileUpload/index.vue"),
     ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue"),
@@ -25,115 +25,108 @@ export default {
     ElPopoverMultipleTreeSelect: () =>
       import("@/components/popover-tree-select/multiple.vue"),
     ElDateWrapper: () => import("@/components/date-wrapper/index.vue"),
-  
   },
-  computed:{
-    innerValue:{
-      get(){
+  computed: {
+    innerValue: {
+      get() {
         return this.$props.value;
       },
-      set(value){
-        this.$emit("input",value);
+      set(value) {
+        this.$emit("input", value);
       },
-    }
+    },
   },
-  data(){
+  data() {
     return {
-      showColumns:Columns,
-    }
+      showColumns: Columns,
+    };
   },
-  methods:{
-
+  methods: {
     // 增
-    onRowAdd(){
-
+    onRowAdd() {
       this.innerValue.push({
-       ...this.$init.params([...this.showColumns]),
-       attr: {
-         is: 'el-input'
-       }
+        ...this.$init.params([...this.showColumns]),
+        attr: {
+          is: "el-input",
+        },
       });
     },
     // 删
-    onRowRemove(prop){
-      console.log(prop,'prop');
+    onRowRemove(prop) {
+      console.log(prop, "prop");
       const { $index, row } = prop;
-      this.innerValue.splice($index,1)
+      this.innerValue.splice($index, 1);
     },
     // 条件选择
-    canidateChange(prop){
-      
-      let {$index, row} = prop;
+    canidateChange(prop) {
+      let { $index, row } = prop;
 
-      let selectValue = this.candidate.filter(({item}) => item.key === row.candidate)[0];
-    
-      let operators = selectValue ? getOperators(this.judgeOperatorType(selectValue.attr)) : [];
-      
-      let attr = selectValue.attr ?  selectValue.attr : { is: 'el-input'};
-      console.log(attr.is,'attr');
+      let selectValue = this.candidate.filter(
+        ({ item }) => item.key === row.candidate
+      )[0];
 
-      // 方案存储
-      this.innerValue = this.innerValue.map((tableItem,index) =>{
+      let operators = selectValue
+        ? getOperators(this.judgeOperatorType(selectValue.attr))
+        : [];
 
-        if(row.candidate === tableItem.candidate && $index === index){
+      let attr = selectValue.attr ? selectValue.attr : { is: "el-input" };
+      console.log(attr.is, "attr");
 
-          tableItem.options = '';
+      // 方案存储
+      this.innerValue = this.innerValue.map((tableItem, index) => {
+        if (row.candidate === tableItem.candidate && $index === index) {
+          tableItem.options = "";
 
-          tableItem.value = '';
+          tableItem.value = "";
 
           tableItem.operators = operators;
 
-          tableItem.attr = attr
-        
+          tableItem.attr = attr;
         }
 
-        return tableItem
-       
-      })
+        return tableItem;
+      });
 
       // 值框的选择
       // this.showColumns = this.showColumns
-
     },
     // 操作选择
-    optionChange(prop){
-      console.log(prop,'prop');
+    optionChange(prop) {
+      console.log(prop, "prop");
       // this.$emit("update:value",this.innerValue);
     },
-    judgeOperatorType(type){
-
+    judgeOperatorType(type) {
       switch (type.is) {
+        case "el-popover-multiple-select-v2":
+          return "array";
 
-        case 'el-popover-multiple-select-v2':
-          return 'array';
-
-        case 'el-popover-multiple-tree-select':
-          return 'array';
+        case "el-popover-multiple-tree-select":
+          return "array";
 
-        case 'el-input-number':
-          return 'number';
+        case "el-input-number":
+          return "number";
 
-        case 'el-date-picker':
-          return 'datetime';
+        case "el-date-picker":
+          return "datetime";
 
-        case 'el-select':
+        case "el-select":
           let dictName = type.dictName;
-          if(dictName === 'sys_number_yes_no' 
-            || dictName === 'sys_yes_no' 
-            || dictName === 'sys_true_false' ){
-            return 'boolean';
+          if (
+            dictName === "sys_number_yes_no" ||
+            dictName === "sys_yes_no" ||
+            dictName === "sys_true_false"
+          ) {
+            return "boolean";
           }
-          return 'string';
+          return "string";
 
         default:
-          return 'string';
-
-        }
+          return "string";
+      }
     },
   },
-  created(){
-  }
-}
+  created() {},
+};
 </script>
 
 <template>
@@ -147,8 +140,8 @@ export default {
       v-bind="$attrs"
       v-on="$listeners"
     >
-      <el-table-column 
-        v-for="({item,attr},index) in showColumns"
+      <el-table-column
+        v-for="({ item, attr }, index) in showColumns"
         :key="item.key + index"
         :prop="item.key"
         :label="item.title"
@@ -157,10 +150,9 @@ export default {
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-  
-          <el-select 
+          <el-select
             v-if="item.key === 'candidate'"
-            v-model="scope.row[item.key]" 
+            v-model="scope.row[item.key]"
             :size="$attrs.size"
             filterable
             placeholder="请选择"
@@ -174,9 +166,9 @@ export default {
             ></el-option>
           </el-select>
 
-          <el-select 
+          <el-select
             v-if="item.key === 'options'"
-            v-model="scope.row[item.key]" 
+            v-model="scope.row[item.key]"
             :size="$attrs.size"
             placeholder="请选择"
             @change="optionChange"
@@ -185,10 +177,11 @@ export default {
               v-for="op in scope.row['operators']"
               :key="op.value"
               :label="op.label"
-              :value="op.value">
+              :value="op.value"
+            >
             </el-option>
           </el-select>
-        
+
           <template v-if="item.key === 'value'">
             <component
               v-if="scope.row.attr.is === 'el-select'"
@@ -206,18 +199,60 @@ export default {
                 </el-option>
               </template>
             </component>
+
+            <component
+              v-if="scope.row.attr.is === 'el-popover-select-v2'"
+              v-bind="scope.row.attr"
+              v-model="scope.row[item.key]"
+              :title="item.title"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              style="width: 100%"
+            ></component>
+
             <component
-              v-else-if="scope.row.attr.is === 'el-popover-select-v2'"
+              v-if="scope.row.attr.is === 'el-popover-multiple-select-v2'"
               v-bind="scope.row.attr"
               v-model="scope.row[item.key]"
               :title="item.title"
               :size="$attrs.size"
               :source.sync="scope.row"
               style="width: 100%"
+            ></component>
+
+            <component
+              v-if="scope.row.attr.is === 'el-popover-tree-select'"
+              v-bind="scope.row.attr"
+              v-model="scope.row[item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              @change="$emit('submit')"
+              style="width: 100%"
+            >
+            </component>
+
+            <component
+              v-if="scope.row.attr.is === 'el-popover-multiple-tree-select'"
+              v-bind="scope.row.attr"
+              v-model="scope.row[item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              style="width: 100%"
+            >
+            </component>
+
+            <component
+              v-if="scope.row.attr.is === 'el-date-wrapper'"
+              v-bind="scope.row.attr"
+              v-model="scope.row[item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              style="width: 100%"
             >
             </component>
+
             <component
-              v-else
+              v-if="scope.row.attr.is === 'el-input'"
               v-bind="scope.row.attr"
               :size="$attrs.size"
               v-model="scope.row[item.key]"
@@ -225,50 +260,55 @@ export default {
             >
             </component>
           </template>
-          
         </template>
-        
-      
       </el-table-column>
       <el-table-column label="操作" width="50">
         <template slot-scope="scope">
-          <i class="el-icon-delete" 
+          <i
+            class="el-icon-delete"
             @click.prevent="onRowRemove(scope)"
-            style="cursor: pointer;"
+            style="cursor: pointer"
           ></i>
         </template>
       </el-table-column>
     </el-table>
     <el-row>
-      <el-col style="padding-left: 10px;">
-        <el-button 
-          type="text" 
-          @click.native.prevent="onRowAdd"
-        >
+      <el-col style="padding-left: 10px">
+        <el-button type="text" @click.native.prevent="onRowAdd">
           <i class="el-icon-plus"></i>
           新增筛选条件
         </el-button>
       </el-col>
     </el-row>
   </el-main>
-
 </template>
 
 <style lang="scss" scoped>
-::v-deep.el-table::before{
+::v-deep.el-table::before {
   display: none;
 }
 
 ::v-deep.el-table {
-
-  th,td,th.is-leaf{
-    border:none;
+  th,
+  td,
+  th.is-leaf {
+    border: none;
   }
 
-  .el-table__cell{
+  .el-table__cell {
     padding: 2px 0;
   }
+  .popover-select-v2 .popover-select-v2_tags,
+  .popover-tree-select .popover-tree-select_tags {
+    left: 15px;
+  }
+  .el-scrollbar__view {
+    padding: 6px 0 0 3px !important;
+  }
 
+  .el-scrollbar__wrap {
+    overflow-x: hidden;
+    margin-right: -2px !important;
+  }
 }
-
-</style>
+</style>

+ 99 - 64
src/components/super-ux-table/index.vue

@@ -56,15 +56,18 @@ export default {
     storageKey: {
       type: String,
     },
-    showSummary:{
-      type:Boolean,
-      default:false,
-    },
-    height:{
-      type:[String,Number],
-      default:()=>'auto',
-    }
-
+    showSummary: {
+      type: Boolean,
+      default: false,
+    },
+    height: {
+      type: [String, Number],
+      require: false,
+    },
+    firstSummary: {
+      type: Boolean,
+      default: false,
+    },
   },
   components: {
     ElDictTag: () => import("@/components/DictTag/index.vue"),
@@ -105,6 +108,7 @@ export default {
       filterState: false,
       count: 0,
       scrollTop: 0,
+      resizeHeight: 0,
     };
   },
   computed: {
@@ -138,12 +142,13 @@ export default {
       },
       set() {},
     },
-    // height:{
-    //   get(){
-    //     return 100% - 
-    //   },
-    //   set(){},
-    // }
+    tableHeight: {
+      get() {
+        let { height } = this.$props;
+        return height ? height : this.resizeHeight;
+      },
+      set() {},
+    },
   },
   watch: {
     filterRules: {
@@ -164,17 +169,45 @@ export default {
         this.filterData = multiFilter(this.$props.value, newValue);
       },
     },
-    value:{
+    value: {
       handler: function (newValue) {
-        if(this.value.length > 0){
+        if (this.value.length > 0) {
           this.$refs.superUxTable && this.$refs.superUxTable.clearSelection();
         }
       },
       immediate: true,
-      deep:true
-    }
+      deep: true,
+    },
+  },
+  directives: {
+    // 使用局部注册指令的方式
+    resize: {
+      // 指令的名称
+      bind(el, binding) {
+        // el为绑定的元素,binding为绑定给指令的对象
+        let width = "",
+          height = "";
+        function isReize() {
+          const style = document.defaultView.getComputedStyle(el);
+          if (width !== style.width || height !== style.height) {
+            binding.value(); // 关键
+          }
+          width = style.width;
+          height = style.height;
+        }
+        el.__vueSetInterval__ = setInterval(isReize, 300);
+      },
+      unbind(el) {
+        clearInterval(el.__vueSetInterval__);
+      },
+    },
   },
   methods: {
+    resize() {
+      this.resizeHeight =
+        document.getElementsByClassName("el-super-ux-table")[0].offsetHeight -
+        55;
+    },
     //
     onSelectionChange(value) {
       this.selectData = value;
@@ -182,7 +215,6 @@ export default {
     },
     //
     onRowClick(row, column, event) {
-      
       const { radio, checkbox } = this.$props;
       // 单选
       if (radio) {
@@ -190,13 +222,13 @@ export default {
       }
       // 多选
       if (checkbox) {
-        this.$refs.superUxTable.toggleRowSelection(
-          [this.innerValue.find((item) => item.id === row.id)]
-        );
+        this.$refs.superUxTable.toggleRowSelection([
+          this.innerValue.find((item) => item.id === row.id),
+        ]);
       }
     },
     // 宽度
-    onWidth({ column}) {
+    onWidth({ column }) {
       this.innerColumns = this.innerColumns.map(({ item, attr }) => ({
         attr,
         item: {
@@ -250,7 +282,6 @@ export default {
         }
         this.count++;
       });
-     
     },
     // 过滤
     onFilter() {
@@ -290,37 +321,42 @@ export default {
         }
       }
     },
-    getSummaries({ columns, data }){
-      
-      const means = [] // 合计
+    getSummaries({ columns, data }) {
+      const means = []; // 合计
+
+      let { firstSummary } = this.$props;
+
       columns.forEach((column, columnIndex) => {
-          if (columnIndex === 0) {
-              means.push('合计')
-          } else {
-              const values = data.map(item => Number(item[column.property]));
-              
-              let sumColumn = this.showColumns.filter(({item,attr}) => attr.isSummary && item.key === column.property);
+        if (!firstSummary && columnIndex === 0) {
+          means.push("合计");
+        } else {
+          const values = data.map((item) => Number(item[column.property]));
+
+          let sumColumn = this.showColumns.filter(
+            ({ item, attr }) => attr.isSummary && item.key === column.property
+          );
 
-              // 合计
-              // if (!values.every(value => isNaN(value))) {
-              if (sumColumn.length) {
-                  means[columnIndex] = values.reduce((prev, curr) => {
-                      const value = Number(curr);
-                      if (!isNaN(value)) {
-                          return prev + curr;
-                      } else {
-                          return prev;
-                      }
-                  }, 0);
-                  means[columnIndex] = means[columnIndex].toFixed(2); 
+          // 合计
+          // if (!values.every(value => isNaN(value))) {
+          if (sumColumn.length) {
+            means[columnIndex] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+
+              if (!isNaN(value)) {
+                return prev + curr;
               } else {
-                  means[columnIndex] = '';
+                return prev;
               }
-            }
-      })
+            }, 0);
+
+            means[columnIndex] = means[columnIndex].toFixed(2);
+          } else {
+            means[columnIndex] = "";
+          }
+        }
+      });
       // sums[index] = sums[index] && sums[index].toFixed(2); // 保留2位小数,解决小数合计列
-      return [means]
-			
+      return [means];
     },
   },
   created() {},
@@ -328,16 +364,16 @@ export default {
     this.extendMethod();
   },
   updated() {
-    this.$nextTick(()=>{
+    this.$nextTick(() => {
       this.$refs.superUxTable.doLayout();
-    })
+    });
   },
   destroyed() {},
 };
 </script>
 
 <template>
-  <div class="el-super-ux-table" :key="count">
+  <div class="el-super-ux-table" :key="count" v-resize="resize">
     <ux-grid
       border
       row-key
@@ -345,19 +381,18 @@ export default {
       keep-source
       show-overflow
       beautify-table
-      :height="height"
       ref="superUxTable"
       v-bind="$attrs"
+      :height="tableHeight"
       v-on="$listeners"
       :data="innerValue"
       :show-summary="showSummary"
       :summary-method="getSummaries"
-      highlight-current-row
       @row-click="onRowClick"
       @header-dragend="onWidth"
       @selection-change="onSelectionChange"
       :header-row-style="{
-        color: '#515a6e' ,
+        color: '#515a6e',
       }"
       style="flex: 1"
     >
@@ -371,8 +406,7 @@ export default {
         resizable
         reserve-selection
         :column-key="rowKey"
-      >
-      </ux-table-column>
+      ></ux-table-column>
       <!-- 序号 -->
       <ux-table-column
         v-if="index"
@@ -383,14 +417,13 @@ export default {
         align="center"
         class="is-index"
         resizable
-      >
-      </ux-table-column>
+      ></ux-table-column>
       <ux-table-column
         v-for="({ item, attr }, index) in showColumns"
         :key="item.key + index"
         :field="item.key"
         :title="item.title"
-        :fixed="item.fixed ? 'left' :undefined"
+        :fixed="item.fixed ? 'left' : undefined"
         :width="item.width || 180"
         resizable
         show-overflow
@@ -500,7 +533,7 @@ export default {
         </template>
       </ux-table-column>
       <slot></slot>
-    <!-- </el-table> -->
+      <!-- </el-table> -->
     </ux-grid>
     <div
       style="
@@ -568,7 +601,9 @@ export default {
   }
 }
 
-::v-deep.uxbeautifyTableClass .elx-header--column .elx-resizable.is--line:before{
+::v-deep.uxbeautifyTableClass
+  .elx-header--column
+  .elx-resizable.is--line:before {
   height: 100%;
   background-color: #dfe6ec;
 }

+ 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: [],
         }
       },

+ 42 - 2
src/views/business/spd/bo/plan/add.vue

@@ -54,8 +54,8 @@
             <el-form-item label="开始时间" prop="startDate"
               :rules="{ required: true, message: '请选择开始时间', trigger: 'blur' }">
               <el-date-picker v-model="basicForm.startDate" :disabled="sonDisable" clearable type="date"
-                value-format="yyyy-MM-dd 00:00:00" :picker-options="pickerOptionsStart" size="mini" style="width: 200px"
-                placeholder="选择开始时间">
+                @change="setDateRange(basicForm.startDate)" value-format="yyyy-MM-dd 00:00:00"
+                :picker-options="pickerOptionsStart" size="mini" style="width: 200px" placeholder="选择开始时间">
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -697,6 +697,46 @@
           h('span', ' ' + column.label)
         ];
       },
+      //改变开始时间时其它时间字段随之改变
+      setDateRange(startDate) {
+        console.log(startDate);
+        let newDate = new Date(startDate);
+        newDate.setDate(newDate.getDate() + this.basicForm.mkBoPlanItemList.length - 1);
+        this.basicForm.deadlineTime = this.formatDateTime(newDate, 'yyyy-MM-dd 00:00:00');
+        console.log(startDate);
+        let newDateGoal = new Date(startDate);
+        for (let i = 0; i < this.basicForm.mkBoPlanItemList.length; i++) {
+          this.basicForm.mkBoPlanItemList[i].date = this.formatDateTime(newDateGoal, 'yyyy-MM-dd 00:00:00');
+          newDateGoal.setDate(newDateGoal.getDate() + 1);
+        }
+      },
+      //日期名称格式化
+      formatDateTime(date, format) {
+        const o = {
+          'M+': date.getMonth() + 1, // 月份
+          'd+': date.getDate(), // 日
+          'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, // 小时
+          'H+': date.getHours(), // 小时
+          'm+': date.getMinutes(), // 分
+          's+': date.getSeconds(), // 秒
+          'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+          S: date.getMilliseconds(), // 毫秒
+          a: date.getHours() < 12 ? '上午' : '下午', // 上午/下午
+          A: date.getHours() < 12 ? 'AM' : 'PM', // AM/PM
+        };
+        if (/(y+)/.test(format)) {
+          format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+        }
+        for (let k in o) {
+          if (new RegExp('(' + k + ')').test(format)) {
+            format = format.replace(
+              RegExp.$1,
+              RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
+            );
+          }
+        }
+        return format;
+      },
     }
   }
 

+ 23 - 3
src/views/business/spd/target/AnnualSaleGoal.vue

@@ -207,7 +207,7 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="6">
-            <el-form-item label="目标合计(元)" prop="goalTotal">
+            <el-form-item label="目标合计(元)" prop="goalTotal" label-width="120px">
               <el-input v-model="form.goalTotal" placeholder="目标合计自动计算" clearable disabled />
             </el-form-item>
           </el-col>
@@ -227,7 +227,7 @@
         </el-row>
 
         <div id="addDetails">
-          <el-row :gutter="10" class="mb8" style="margin-left: 80%">
+          <el-row :gutter="10" class="mb8" style="margin-left: 75%">
             <el-col :span="1.5">
               <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleTemplateDownload">模板下载
               </el-button>
@@ -248,7 +248,7 @@
           <el-tabs v-model="activeName">
             <el-tab-pane label="年销售目标填报明细" name="annualSaleGoalDetails">
 
-              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading"
+              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="annualSaleGoalDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
                 <el-table-column label="销售组织" align="center" width="180"
@@ -659,6 +659,7 @@
     addAnnualSaleGoal,
     updateAnnualSaleGoal,
     submit,
+    resubmit,
   } from "@/api/business/spd/goal_management/annualSaleGoal";
   import {
     delAnnualSaleGoalDetails,
@@ -1321,6 +1322,25 @@
           this.$modal.closeLoading();
         }
       },
+      //重新提交
+      async handleResubmit(row) {
+        this.$modal.loading("提交中...");
+        try {
+          const {
+            msg,
+            code
+          } = await resubmit(row.id);
+          if (code === 200) {
+            this.$modal.notifySuccess("提交成功");
+            this.$modal.closeLoading();
+            row.status = '1'
+            // this.getList(this.queryParams)
+          }
+        } catch (err) {
+          console.error(err);
+          this.$modal.closeLoading();
+        }
+      },      
       //收回
       handleReback(row) {
         this.$modal.loading("收回中...");

+ 7 - 6
src/views/business/spd/target/AnnualSaleGoalMerge.vue

@@ -213,14 +213,14 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="目标分类" prop="goalCategory">
-              <el-select v-model="form.goalCategory" placeholder="请选择" @change="changeGoalCategoryForm">
+              <el-select :disabled="this.openStatus == 'edit'" v-model="form.goalCategory" placeholder="请选择" @change="changeGoalCategoryForm">
                 <el-option v-for="item in goalCategoryList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="目标值汇总(元)" prop="goalTotal">
+            <el-form-item label="目标合计(元)" prop="goalTotal" label-width="120px">
               <el-input v-model="form.goalTotal" placeholder="目标值汇总自动计算" disabled />
             </el-form-item>
           </el-col>
@@ -268,7 +268,7 @@
           </el-row>
           <el-tabs v-model="activeName" @tab-click="getNewTwoArray">
             <el-tab-pane label="年销售目标合并明细" name="annualSaleGoalMergeDetails">
-              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading"
+              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="annualSaleGoalMergeDetailsList" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
                 <el-table-column label="销售组织" align="center" width="180">
@@ -1026,7 +1026,7 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.openStatus = 'edit';
+        this.openStatus = 'add';
         this.reset();
         this.annualSaleGoalMergeDetailsList = []
         this.areaDetailList = []
@@ -1408,7 +1408,7 @@
       // 合并数据
       clickMerge() {
         if (this.form.id !== null) {
-          this.form.oldAnnualGoalMergeDetailsList = JSON.parse(JSON.stringify(this.annualGoalMergeDetailsList))
+          this.form.oldAnnualGoalMergeDetailsList = JSON.parse(JSON.stringify(this.form.annualGoalMergeDetailsList))
         }
         if (this.activeName !== 'annualSaleGoalMergeDetails') {
           return this.$message.error('当前标签不是年销售目标合并明细')
@@ -1431,8 +1431,9 @@
             return this.$message.error('请输入二级分类')
           }
         }
+        console.log(query, 'query')
         mergeAnnualSaleMergeDetails(query).then(response => {
-          console.log(response);
+          console.log(response, 'response');
           if (response.data.consolidatedDetail.length > 0) {
             // for (const consolidatedDetail of response.data.consolidatedDetail) {
             //   consolidatedDetail.totalGoal = consolidatedDetail.totalGoal.toFixed(2)

+ 7 - 7
src/views/business/spd/target/MonthGoalMerge.vue

@@ -223,7 +223,7 @@
           <el-col :span="6">
             <el-form-item label="目标类型" prop="goalCategory">
               <el-select v-model="form.goalCategory" placeholder="请输入目标类型" @change="changeGoalCategoryForm"
-                @keyup.enter.native="handleQuery">
+                @keyup.enter.native="handleQuery" :disabled="this.openStatus == 'edit'">
                 <el-option v-for="item in goalCategoryList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
@@ -232,7 +232,7 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="6">
-            <el-form-item label="目标合计(元)" prop="goalSum">
+            <el-form-item label="目标合计(元)" prop="goalSum" label-width="120px">
               <el-input v-model="form.goalSum" placeholder="目标值合计自动计算" disabled />
             </el-form-item>
           </el-col>
@@ -278,7 +278,7 @@
           </el-row>
           <el-tabs v-model="activeName" @tab-click="getNewTwoArray">
             <el-tab-pane label="月销售目标合并明细" name="monthGoalMergeDetails">
-              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading"
+              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="monthGoalMergeDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
                 <el-table-column label="销售组织" align="center" prop="saleOrg" width="180">
@@ -325,7 +325,7 @@
                     </el-popover-select-v2>
                   </template>
                 </el-table-column>
-                <el-table-column label="科室" align="center" prop="department" width="180">
+                <el-table-column label="科室" align="center" width="180">
                   <template slot-scope="scope">
                     <el-input v-model="monthGoalMergeDetailsList[scope.$index].department" placeholder="请输入科室" disabled>
                     </el-input>
@@ -838,7 +838,7 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.openStatus = 'edit';
+        this.openStatus = 'add';
         this.reset();
         this.monthGoalMergeDetailsList = []
         this.customGoalSumList = []
@@ -1243,7 +1243,7 @@
       // 合并数据
       clickMerge() {
         if (this.form.id !== null) {
-          this.form.oldMonthMergeDetailsList = JSON.parse(JSON.stringify(this.monthGoalMergeDetailsList))
+          this.form.oldMonthMergeDetailsList = JSON.parse(JSON.stringify(this.form.monthMergeDetailsList))
         }
         if (this.activeName !== 'monthGoalMergeDetails') {
           return this.$message.error('当前标签不是月销售目标合并明细')
@@ -1270,7 +1270,7 @@
           }
         }
         mergeMonthSaleMergeDetails(query).then(response => {
-          console.log(response);
+          console.log(response, 'response');
           if (response.data.monthGoalMergeDetails.length > 0) {
             this.monthGoalMergeDetailsList = response.data.monthGoalMergeDetails
             this.computeTotal()

+ 3 - 3
src/views/business/spd/target/MonthReturnGoal.vue

@@ -204,7 +204,7 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="6">
-            <el-form-item label="目标合计(元)" prop="goalSum">
+            <el-form-item label="目标合计(元)" prop="goalSum" label-width="120px">
               <el-input v-model="form.goalSum" placeholder="目标合计自动计算" disabled />
             </el-form-item>
           </el-col>
@@ -223,7 +223,7 @@
           </el-col>
         </el-row>
         <div>
-          <el-row :gutter="10" class="mb8" style="margin-left: 80%">
+          <el-row :gutter="10" class="mb8" style="margin-left: 75%">
             <el-col :span="1.5">
               <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleTemplateDownload">模板下载
               </el-button>
@@ -243,7 +243,7 @@
           </el-row>
           <el-tabs v-model="activeName">
             <el-tab-pane label="月回款目标明细" name="monthReturnGoalDetails">
-              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading"
+              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="monthReturnGoalDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
                 <el-table-column label="销售组织" align="center" width="180" :render-header="addRedStar">

+ 3 - 5
src/views/business/spd/target/MonthReturnMerge.vue

@@ -124,7 +124,7 @@
       <el-table-column label="制单人" align="center" prop="creator" width="180" />
       <el-table-column label="部门" align="center" prop="dept" width="180" />
       <el-table-column label="目标类型" align="center" prop="goalCategory" width="180" />
-      <el-table-column label="目标合计(元)" align="center" prop="goalSum" width="180" />
+      <el-table-column label="目标合计(元)" align="center" prop="goalSum" width="180" />
       <el-table-column show-overflow-tooltip label="状态" align="center" width="100" prop="status">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_status" :value="scope.row.status" />
@@ -223,12 +223,10 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="目标合计(元)" prop="goalSum">
+            <el-form-item label="目标合计(元)" prop="goalSum" label-width="120px">
               <el-input v-model="form.goalSum" placeholder="目标值合计自动计算" disabled />
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="20">
           <el-col :span="6">
             <el-form-item label="单据状态" prop="type">
               <el-select v-model="form.status" placeholder="" disabled>
@@ -247,7 +245,7 @@
           </el-row>
           <el-tabs v-model="activeName" @tab-click="getNewTwoArray">
             <el-tab-pane label="月回款目标合并明细" name="monthReturnMergeDetails">
-              <el-table max-height="300" show-summary :summary-method="getSummaries" v-loading="loading"
+              <el-table max-height="300" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="monthReturnMergeDetailsList" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="55" align="center" fixed />
                 <el-table-column label="销售组织" align="center" width="180">

+ 58 - 4
src/views/business/spd/target/MonthSaleGoal.vue

@@ -207,7 +207,7 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="6">
-            <el-form-item label="目标合计(元)" prop="goalSum">
+            <el-form-item label="目标合计(元)" prop="goalSum" label-width="120px">
               <el-input v-model="form.goalSum" placeholder="目标合计自动计算" disabled />
             </el-form-item>
           </el-col>
@@ -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: 80%">
+          <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>
@@ -246,7 +258,7 @@
           </el-row>
           <el-tabs v-model="activeName">
             <el-tab-pane label="月销售目标明细" name="monthSaleGoalDetails">
-              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading"
+              <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="monthSaleGoalDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
                 <el-table-column label="销售组织" align="center" width="180" :render-header="addRedStar">
@@ -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;
+        })
+      }
     }
   }
 

+ 7 - 5
src/views/business/spd/target/targetTemplate/detail.vue

@@ -127,12 +127,12 @@
                     <el-tab-pane label="周期" name="cycles">
                         <el-table :data="form.cycles" height="600px" size="size" v-horizontal-scroll>
                             <el-table-column label="序号" type="index" width="50" align="center" fixed/>
-                            <el-table-column show-overflow-tooltip label="周期" align="center" width="200" prop="name">
+                            <el-table-column show-overflow-tooltip label="周期" align="center" width="250" prop="name">
                                 <template slot-scope="scope">
                                     <el-input
                                         size="mini"
                                         v-model="scope.row.name"
-                                        style="width: 150px"
+                                        style="width: 200px"
                                         clearable
                                     />
                                 </template>
@@ -415,7 +415,7 @@ export default {
       deadline.setHours( 0, 0, 0);
       if(this.form.cycle == 'period'){
         cycles.push({
-          name:'目标期间',
+          name:this.formatDateTime(start, 'yyyy-MM-dd') + '到' + this.formatDateTime(deadline, 'yyyy-MM-dd'),
           startTime:this.formatDateTime(start, 'yyyy-MM-dd'),
           deadlineTime:this.formatDateTime(deadline, 'yyyy-MM-dd'),
         });
@@ -432,10 +432,11 @@ export default {
           }
           if(this.form.cycle == 'week'){
             var cy = {};
-            cy.name = this.formatDateTime(start, 'yyyy-MM-dd');
+            let date = this.formatDateTime(start, 'yyyy-MM-dd');
             cy.startTime = this.formatDateTime(start, 'yyyy-MM-dd');
             start.setDate(start.getDate()+6);
             cy.deadlineTime = this.formatDateTime(start, 'yyyy-MM-dd');
+            cy.name = date + '到' + this.formatDateTime(start, 'yyyy-MM-dd');
             cycles.push(cy);
             start.setDate(start.getDate()+1);
           }
@@ -452,10 +453,11 @@ export default {
           }
           if(this.form.cycle == 'season'){
             var cy = {};
-            cy.name = this.formatDateTime(start, 'yyyy-MM');
+            let date = this.formatDateTime(start, 'yyyy-MM');
             cy.startTime = this.formatDateTime(start, 'yyyy-MM-dd');
             start.setDate(start.getDate()+90);
             cy.deadlineTime = this.formatDateTime(start, 'yyyy-MM-dd');
+            cy.name = date + '到' + this.formatDateTime(start, 'yyyy-MM');
             cycles.push(cy);
             start.setDate(start.getDate()+1);
           }

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

+ 22 - 14
src/views/monitor/system/index.vue

@@ -1,14 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="OA对应单据信息" prop="oaIdentity">
-        <el-input
-          v-model="queryParams.oaIdentity"
-          placeholder="请输入OA对应单据信息"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="来源系统">
         <el-select clearable v-model="queryParams.busDomain" size="mini" style="width: 200px"
                    @keyup.enter.native="handleQuery" clearable>
@@ -17,15 +9,21 @@
           </el-option>
         </el-select>
       </el-form-item>
-
+      <el-form-item label="OA单据信息" prop="oaIdentity">
+        <el-input
+          v-model="queryParams.oaIdentity"
+          placeholder="请输入OA对应单据信息"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery" plain>搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" type="info" @click="resetQuery" plain>重置</el-button>
         <el-button icon="el-icon-video-play" size="mini" type="success" @click="getDatas" plain>更新数据</el-button>
       </el-form-item>
-
     </el-form>
-    <el-table v-loading="loading" :data="serviceList">
+    <el-table v-loading="loading" :data="serviceList" border :height="tableHeight">
       <el-table-column label="业务域" min-width="120" align="center" prop="busDomain" :formatter="formatterBusDomain"/>
       <el-table-column label="业务类型" min-width="120" align="center" prop="monitorType">
         <template slot-scope="scope">
@@ -34,8 +32,7 @@
         </template>
       </el-table-column>
       <el-table-column label="OA单据信息" min-width="80" align="center" prop="oaIdentity"/>
-      <el-table-column label="业务域单据信息" min-width="120" align="center" prop="docIdentity"
-                       :show-overflow-tooltip="true"/>
+      <el-table-column label="业务域单据信息" min-width="120" align="center" prop="docIdentity"/>
       <el-table-column label="所属模块" min-width="80" align="center" prop="busModule" :show-overflow-tooltip="true"/>
       <el-table-column label="状态释意" min-width="80" align="center" prop="busStatusName"/>
       <el-table-column label="问题原因" min-width="150" align="center" prop="errorMsg"/>
@@ -67,6 +64,15 @@
 
   export default {
     dicts: ['oa_todo_type', 'oa_nc_bill_type', 'oa_flow_status', 'oa_busdomian_desc'],
+    computed: {
+      tableHeight:{
+        get(){
+          console.log(window,'window');
+          return window.innerHeight - 220;
+        },
+        set(){},
+      }
+    },
     data() {
       return {
         //遮罩层
@@ -163,6 +169,8 @@
       },
       //重置
       resetQuery() {
+        this.queryParams.busDomain = ''
+        this.queryParams.oaIdentity = ''
         this.resetForm("queryForm");
         this.handleQuery();
       }

+ 1 - 1
src/views/purchase/DemandSummary/index.vue

@@ -214,7 +214,7 @@
               </el-col>
 
             <el-col :span="1.5">
-              <el-form-item label="供应商">
+              <el-form-item label="补单供应商">
                 <el-select clearable size="mini" v-model="queryParams.additionalSupplier" @focus="chooseRefer('SUPPLIER_PARAM', true, '供应商')" style="width: 200px">
                   <el-option v-for="item in supplierOptions" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>

+ 1 - 1
src/views/purchase/PurchaseDemandList/index.vue

@@ -139,7 +139,7 @@
 
           <el-row>
             <el-col :span="1.5">
-              <el-form-item label="供应商">
+              <el-form-item label="补单供应商">
                 <el-select clearable size="mini" v-model="queryParams.additionalSupplier" @focus="chooseOrg('SUPPLIER_PARAM', true, '供应商')" style="width: 200px">
                   <el-option v-for="item in supplierOptions" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>

+ 4 - 1
src/views/purchase/apply/add/index.vue

@@ -175,6 +175,7 @@
         this.visible = false;
         this.params = this.$init.params([...TabColumns, ...TableColumns]);
         this.$emit("success");
+        this.delDemandItemList = []
       },
       //
       async onRowAdd(prop, pushParams = {}) {
@@ -224,7 +225,7 @@
               param.priceApplyItems.forEach((item, index) => {
                 item.$index = index
               });
-              let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.priceDiffer !== 0)})
+              let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.delFlag == '0' && item.priceDiffer !== 0)})
               // console.log('筛选', tishi)
               let tishiMsg = tishi.map(item => {
                 return `第${item.$index+1}行为价格调整`
@@ -282,6 +283,8 @@
               if (res.code === 200) {
                 rowList = res.rows
               }
+            }).catch(err => {
+              this.$modal.closeLoading();
             })
             const {
               puOrg,

+ 4 - 1
src/views/purchase/apply/copy/index.vue

@@ -220,6 +220,7 @@
         this.visible = false;
         this.params = this.$init.params([...TabColumns, ...TableColumns]);
         this.$emit("success");
+        this.delDemandItemList = []
       },
       //
       async onRowAdd(prop, pushParams = {}) {
@@ -270,7 +271,7 @@
               param.priceApplyItems.forEach((item, index) => {
                 item.$index = index
               });
-              let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.priceDiffer !== 0)})
+              let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.delFlag == '0' && item.priceDiffer !== 0)})
               console.log('筛选', tishi)
               let tishiMsg = tishi.map(item => {
                 return `第${item.$index+1}行为价格调整`
@@ -328,6 +329,8 @@
               if (res.code === 200) {
                 rowList = res.rows
               }
+            }).catch(err => {
+              this.$modal.closeLoading();
             })
             const {
               puOrg,

+ 4 - 1
src/views/purchase/apply/edit/index.vue

@@ -230,6 +230,7 @@
         this.visible = false;
         this.params = this.$init.params([...TabColumns, ...TableColumns]);
         this.$emit("success");
+        this.delDemandItemList = []
       },
       //
       async onRowAdd(prop, pushParams = {}) {
@@ -286,7 +287,7 @@
               let param = JSON.parse(JSON.stringify(this.params))
               // console.log('深拷贝对象',param);
               param.priceApplyItems = list
-              let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.priceDiffer !== 0)})
+              let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.delFlag == '0' && item.priceDiffer !== 0)})
               console.log('筛选', tishi)
               let tishiMsg = tishi.map(item => {
                 return `第${item.$index+1}行为价格调整`
@@ -344,6 +345,8 @@
               if (res.code === 200) {
                 rowList = res.rows
               }
+            }).catch(err => {
+              this.$modal.closeLoading();
             })
             const {
               puOrg,

+ 0 - 1
src/views/purchase/apply/index.vue

@@ -286,7 +286,6 @@
       :dict="dict"
       :page="page"
       :columns="TableColumns"
-      :height="tableHeight"
       index
       checkbox
       pagination

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

+ 0 - 1055
src/views/purchase/purchase-order/add/columnCopy.js

@@ -1,1055 +0,0 @@
-export const Columns = [
-  {
-    key: "puOrgName",
-    title: "采购组织",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "ORG_PARAM",
-    dataMapping: {
-      puOrg: "id",
-      puOrgName: "name",
-    },
-    queryParams: () => ({}),
-    require: true,
-    isShow:true,
-  },
-  {
-    key: "billType",
-    title: "订单类型",
-    inputType: "Select",
-    referName: "sys_order_type", // 字典名
-    isShow:true,
-    require: true,
-  },
-  { 
-    key: "oaDemandNo", 
-    title: "OA需求单号", 
-    inputType: "Input",  
-    isShow:true,
-    
-  },
-  { 
-    key: "erpOrderCode", 
-    title: "erp订单编号", 
-    inputType: "Input",  
-    readonly: true,
-    disabled: true,
-    isShow:true,
-  },
-  {
-    key: "code",
-    title: "订单编号",
-    inputType: "Input",
-    readonly: true,
-    disabled: true,
-    isShow:true,
-  },
-  {
-    key: "billDate",
-    title: "订单日期",
-    inputType: "DatePicker",
-    valueFormat: "yyyy-MM-dd",
-    width: 200, 
-    require: true,
-    isShow:true,
-  },
-  {
-    key: "supplierName",
-    title: "供应商",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "SUPPLIER_PARAM",
-    dataMapping: {
-      supplier: "id",
-      supplierName: "name",
-      paymentAgreement: 'paymentId',
-      paymentAgreementName: 'paymentName',
-    },
-    queryParams: () => ({}),
-    require: true,
-    isShow:true,
-  },
-  {
-    key: "paymentAgreementName",
-    title: "付款协议",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "PAYAGREEMENT_PARAM",
-    dataMapping: {
-      paymentAgreement: 'id',
-      paymentAgreementName: 'name'
-    },
-    queryParams: () => ({}),
-    isShow:true,
-    disabled:true,
-    require: true,
-  },
-  {
-    key: "finalTypeName",
-    title: "结算方式",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "BALATYPE_PARAM",
-    dataMapping: {
-      finalType: 'id',
-      finalTypeName: 'name'
-    },
-    queryParams: () => ({}),
-    isShow:true,
-    disabled:true,
-  },
-  {
-    key: "buyerName",
-    title: "采购员",
-    inputType: "PopoverSelect",
-    valueKey: "code",
-    referName: "CONTACTS_PARAM",
-    dataMapping: {
-      buyer: 'code',
-      buyerName: 'name'
-    },
-    queryParams: () => ({}),
-    require: true,
-    isShow:true,
-  },
-  {
-    key: "puDeptName",
-    title: "采购部门",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "DEPT_PARAM",
-    dataMapping: {
-      puDept: 'id',
-      puDeptName: 'name'
-    },
-    queryParams: () => ({}),
-    require: true,
-    isShow:true,
-  },
-  {
-    key: "customerName",
-    title: "收货客户",
-    inputType: "PopoverSelect",
-    width: 200,
-    valueKey: "id",
-    referName: "CUSTOMER_PARAM",
-    dataMapping: {
-      customer: 'id',
-      customerName: 'name'
-    },
-    queryParams: () => ({}),
-    isShow:true,
-  },
-  {
-    key: "qty",
-    title: "总数量",
-    inputType: "InputNumber",
-    controlsPosition: "right",
-    isShow:true,
-    disabled:true,
-  },
-  {
-    key: "originalQty",
-    title: "原始总数量",
-    inputType: "InputNumber",
-    controlsPosition: "right",
-    isShow:true,
-    disabled:true,
-  },
-  { 
-    key: "money", 
-    title: "价税合计", 
-    inputType: "InputNumber",
-    controlsPosition: "right", 
-    // precision:2,
-    isShow:true, 
-    disabled:true,
-  },
-  { 
-    key: "originalMoney", 
-    title: "原始总金额", 
-    inputType: "InputNumber",
-    controlsPosition: "right", 
-    // precision:2,
-    isShow:true, 
-    disabled:true,
-  },
-  { 
-    key: "notaxMoney", 
-    title: "无税金额", 
-    inputType: "InputNumber",  
-    controlsPosition: "right",
-    // precision:2,
-    isShow:true, 
-    disabled:true,
-  },
-  {
-    key: "status",
-    title: "单据状态",
-    inputType: "Select",
-    referName: "documents_status", // 字典名
-    disabled: true,
-    isShow:true,
-  },
-  // { key: "freezeCause", title: "冻结原因", inputType: "Checkbox", isShow:true, },
-  { key: "isBack", title: "退货", inputType: "Input", inputType: "Checkbox",  isShow:true,},
-  // { key: "isMarketing", title: "已协同生成销售订单", inputType: "Checkbox",  isShow:true,},
-  // { key: "isMarketingSource", title: "由销售订单协同生成", inputType: "Checkbox",  isShow:true,},
-  {
-    key: "warehouseName",
-    title: "WMS入库仓库", 
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "WAREHOUSE_PARAM",
-    dataMapping: {
-      warehouse: 'id',
-      warehouseName: 'name',
-    },
-    queryParams: (params) => ({
-      pkOrg: params.puOrg,
-    }),
-    isShow:true,
-    
-    // require: true,
-  },
-  {
-    key: "goodsAllocationName",
-    title: "货位",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "ALLOCATION_PARAM",
-    dataMapping: {
-      goodsAllocation: 'id',
-      goodsAllocationName: 'name',
-      
-    },
-     isShow:true,
-    queryParams: (params) => ({
-      stordocId: params.warehouse,
-    }),
-    width: 200,
-  },
-  // { key: "isSendSrm", title: "是否同步SRM", inputType: "Checkbox",isShow:true, },
-  { 
-    key: "isInvoice", 
-    title: "发票标识", 
-    inputType: "Checkbox", 
-    isShow:true,
-    disabled:true,
-  },
-  { key: "supplierOrderNo", title: "供应商订单号", inputType: "Input",isShow:true, },
-  { 
-    key: "rebateMoney", 
-    title: "订单使用返利金额", 
-    inputType: "InputNumber",
-    controlsPosition: "right",
-    // precision:2,
-    isShow:true, 
-    require: true,
-  },
-  { 
-    key: "deductionMoney", 
-    title: "订单抵扣余款金额", 
-    inputType: "InputNumber",
-    controlsPosition: "right",
-    // precision:2,
-    isShow:true, 
-    require: true,
-  },
-  { 
-    key: "goodsWarehouseName",
-    title: "收货仓库",
-    inputType: "Input",
-    isShow:true,
-    disabled:true,
-    require: true,
-  },
-  { 
-    key: "address",
-    title: "收货地址",
-    inputType: "PopoverSelect",
-    valueKey: "address",
-    referName: "ADDRESS_PARAM",
-    require: true,
-    isShow:true,
-    dataMapping: {
-      // address: 'address',
-      // addressName: '',
-      goodsWarehouse:'id',
-      goodsWarehouseName:'name',
-      contacts:'contactsName',
-      contactsPhone:'contactsPhone'
-    },
-    queryParams: () => ({}),
-    width: 180
-  },
-  { 
-    key: "contacts", 
-    title: "收货联系人", 
-    inputType: "Input",
-    isShow:true, 
-    disabled:true,
-  },
-  { 
-    key: "contactsPhone", 
-    title: "收货联系人电话", 
-    inputType: "Input",
-    isShow:true, 
-    disabled:true,
-  },
-  {
-    key: "customerDeptName",
-    title: "客户部门",
-    inputType: "PopoverSelect",
-    width: 200,
-    valueKey: "id",
-    referName: "CUSTOMERDEPT_PARAM",
-    dataMapping: {
-      customerDept: 'id',
-      customerDeptName: 'name'
-    },
-     isShow:true,
-    queryParams: () => ({}),
-
-  },
-  {
-    key: "supplierContactsName",
-    title: "供应商业务联系人",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "SUPPLIERCONTACTS_PARAM",
-    dataMapping: {
-      supplierContacts: 'id',
-      supplierContactsName: 'name'
-    },
-     isShow:true,
-    queryParams: (params) => ({
-      supplierId:params.supplier
-    }),
-    width: 200,
-  },
-  { 
-    key: "isUrgency", 
-    title: "紧急程度", 
-    inputType: "Checkbox",
-    isShow:true,
-    disabled:true,
-   },
-  { 
-    key: "isSendWms", 
-    title: "已同步WMS", 
-    inputType: "Checkbox",
-    isShow:true,
-    disabled:true,
-   },
-  // { key: "agent", title: "代理人", inputType: "Input", }, // 建议删除
-  // {
-  //   key: "agentName",
-  //   title: "代理人",
-  //   inputType: "PopoverSelect",
-  //   valueKey: "code",
-  //   referName: "CONTACTS_PARAM",
-  //   dataMapping: {
-  //     agent: 'code',
-  //     agentName: 'name'
-  //   },
-  //    isShow:true,
-  //   queryParams: () => ({}),
-  //   width: 200,
-  // },
-
-  { 
-    key: "isClose", 
-    title: "最终关闭", 
-    inputType: "Checkbox", 
-    isShow:true,
-    disabled:true,
-   },
-  {
-    key: "closeTime",
-    title: "最终关闭日期",
-    inputType: "DatePicker",
-    valueFormat: "yyyy-MM-dd",
-    isShow:true,
-    disabled:true,
-  },
-  { 
-    key: "applyPaymentMoney", 
-    title: "累计付款申请金额", 
-    inputType: "InputNumber", 
-    controlsPosition: "right",
-    // precision:2,
-    isShow:true,
-    disabled:true,
-  },
-  { 
-    key: "paymentMoney", 
-    title: "累计付款金额", 
-    inputType: "InputNumber", 
-    controlsPosition: "right",
-    // precision:2,
-    isShow:true,
-  },
-  { 
-    key: "invoiceMoney", 
-    title: "发票金额", 
-    inputType: "InputNumber",
-    controlsPosition: "right",
-    // precision:2,
-    isShow:true,
-   },
-  {
-    key: "supplierPersonalName",
-    title: "供应商业务员",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    // referName: "SUPPLIERCONTACTS_PARAM",
-    referName: "PSNLICENSE_PARAM",
-    dataMapping: {
-      supplierPersonal: 'id',
-      supplierPersonalName: 'name'
-    },
-     isShow:true,
-    queryParams: (params) => ({
-      // 组织、供应商id
-      pkOrg: params.puOrg,
-      supplierId:params.supplier
-    }),
-  },
-  // { key: "isDeliver", title: "是否发货", inputType: "Checkbox",  isShow:true,},
-  {
-    key: "retReasonName",
-    title: "退换原因",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "RETREASON_PARAM",
-    dataMapping: {
-      retReason: 'id',
-      retReasonName: 'name'
-    },
-     isShow:true,
-    queryParams: () => ({}),
-  },
-  {
-    key: "processTypeName",
-    title: "处理方式",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "PROCESSTYPE_PARAM",
-    dataMapping: {
-      processType: 'id',
-      processTypeName: 'name'
-    },
-     isShow:true,
-    queryParams: () => ({}),
-  },
-  { key: "isEnd", title: "整单关闭标识", inputType: "Checkbox", isShow:true, },
-  {
-    key: "projectNowName",
-    title: "在建工程项目",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "PROJECT_PARAM",
-    dataMapping: {
-      projectNow: 'id',
-      projectNowName: 'name'
-    },
-     isShow:true,
-    queryParams: () => ({}),
-  },
-  {
-    key: "operatingItemsName",
-    title: "经营性项目",
-    inputType: "PopoverSelect",
-    valueKey: "id",
-    referName: "OPERATING_PARAM",
-    dataMapping: {
-      operatingItems: 'id',
-      operatingItemsName: 'name'
-    },
-     isShow:true,
-    queryParams: () => ({}),
-
-  },
-  { key: "isArrivalReson", title: "到货超期原因", inputType: "Input", isShow:true, },
-  // { key: "midOrderNo", title: "中台采购订单号", inputType: "Input", isShow:true, },
-  { key: "marketingCode", title: "销售订单号", inputType: "Input", isShow:true, },
-  { key: "isArrival", title: "到货超期", inputType: "Checkbox",  isShow:true,},
-  { key: "createByName", title: "创建人", inputType: "Input", isShow:false, },
-  {
-    key: "approveTime",
-    title: "提交时间",
-    inputType: "DatePicker",
-    valueFormat: "yyyy-MM-dd",
-    isShow:false,
-  },
-  { key: "approverName", title: "审批人", inputType: "Input", isShow:false, },
-  {
-    key: "approverFinishTime",
-    title: "审批时间",
-    inputType: "DatePicker",
-    valueFormat: "yyyy-MM-dd",
-    isShow:false,
-  },
-  { key: "updateByName", title: "更新人", inputType: "Input", isShow:false, },
-  // { key: "flowId", title: "OA流程ID", inputType: "Input", isShow:false, },
-  {
-    key: "sysFileRecordList",
-    title: "附件",
-    inputType: "Upload",
-    // fileType: ["pdf",""],
-    span: 24,
-    isShow:true,
-  },
-  { 
-    key: "remark",
-    title: "备注",
-    inputType: "Textarea",
-    isShow:true,
-   },
-
-];
-
-// export const initColumns = () => columns;
-
-export const TabColumns = [
-  {
-    title: '物料信息',
-    key: 'puOrderItemList',
-    tableColumns: [
-      { 
-        key: "rowNo", 
-        title: "行号", 
-        inputType: "Input", 
-        disabled:true,
-        require:false,
-      },
-      { 
-        key: "demandCode",
-        title:"采购需求单号",
-        inputType: "Input", 
-        width: 180,
-        disabled:true,
-        require:false,
-      },
-      { 
-        key: "contractNo",
-        title:"合同编号",
-        inputType: "Input", 
-        width: 180,
-        disabled:true,
-        require:false,
-      },
-      // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
-      // {key: "material",title: "物料",inputType: "Input",   },
-      {
-        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:'isMedicineYN',
-          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: () => ({}),
-      },
-      {
-        key: "materialCode",
-        title: "物料编码",
-        inputType: "Input",
-        require: true,
-        width: 180,
-        disabled:true,
-        readonly:true,
-      },
-      // { //classifyIdName   classifyId
-      //   key: "materialClassify",
-      //   title: "物料分类", 
-      //   inputType: "Input",
-      //   width: 180,
-      //   disabled:true,
-      //   readonly:true, 
-      // },
-      { // manufacturersMaterialCode  manufacturersMaterialName
-        key: "materialManufacturersCode",
-         title: "厂家物料编码", 
-         inputType: "Input",
-          width: 180,
-          disabled:true,
-        readonly:true,
-         },
-      { //specification
-        key: "specification",
-        title: "规格", 
-        inputType: "Input",
-        width: 180 ,
-        disabled:true,
-        readonly:true,
-        },
-      { //model
-        key: "model",
-        title: "型号", 
-        inputType: "Input",
-        disabled:true,
-        readonly:true,
-      },
-      { //isMedicine  isMedicineValue
-        key: "isMedcine",
-        title: "医药物料", 
-        inputType: "Checkbox", 
-        disabled:true,
-        readonly:true,
-        },
-      { // manufacturerId  manufacturerIdName
-        key: "manufacturerName",
-        title: "生产厂家代理人",
-        inputType: "Input",
-        width: 180,
-        disabled:true,
-        readonly:true,
-      },
-      { 
-        key: "isDrug",
-         title: "物料药品属性", 
-         inputType: "Checkbox", 
-         disabled:true,
-      },
-      { //unitId  unitIdName
-        key: "unitName", 
-        title: "单位", 
-        inputType: "Input",
-        disabled:true,
-        readonly:true,
-       },
-      {
-        key: "qty",
-        title: "数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 120,
-        require: true,
-      },
-      {
-        key: "currencyName",
-        title: "币种",
-        inputType: "PopoverSelect",
-        valueKey: "id",
-        referName: "CURRENCY_PARAM",
-        dataMapping: {
-          currency: 'id',
-          currencyName: 'name'
-        },
-        queryParams: () => ({}),
-        width: 180,
-      },
-      {
-        key: "priceType",
-        title: "价格类型",
-        inputType: "Select",
-        referName: "sys_price_type", // 字典名
-        width: 180,
-      },
-      { 
-        key: "taxPrice", 
-        title: "含税单价", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        // precision:2,
-        require: true,
-        disabled:true,
-        width: 180,
-       },
-      { 
-        key: "money", 
-        title: "价税合计", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-       },
-      { //materialRate  materialRateName
-        key: "tax", 
-        title: "税率",
-        // inputType: "Input",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-      },
-      { 
-        key: "taxDeductMoneya", 
-        title: "折扣金额", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-       },
-      { 
-        key: "nitemdiscountrate", 
-        title: "折扣(%)", 
-        inputType: "Input",
-        // precision:2,
-        disabled:true,
-        width: 180,
-       },
-      { 
-        key: "ntaxnetprice", 
-        title: "含税净价", 
-        inputType: "Input",
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-       },
-      { 
-        key: "arrivalQty",
-        title: "已到货数量",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        disabled:true,
-        width: 180,
-      },
-      { 
-        key: "unarrivedQty", 
-        title: "未到货数量", 
-        inputType: "InputNumber", 
-        controlsPosition: "right",
-        disabled:true,
-        width: 180,
-      },
-      { 
-        key: "price",
-        title: "无税单价",
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-      },
-      { 
-        key: "notaxMoney", 
-        title: "无税金额", 
-        inputType: "InputNumber", 
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-      },
-      // { key: "priceSource", title: "价格目录ID", inputType: "Input", },
-      { key: "isStorage", title: "入库关闭", inputType: "Checkbox", disabled:true, },
-      { key: "isInvoice", title: "开票关闭", inputType: "Checkbox", disabled:true, },
-      { key: "isArrival", title: "到货关闭", inputType: "Checkbox", disabled:true,},
-      { key: "isPayment", title: "付款关闭", inputType: "Checkbox", disabled:true, },
-      { key: "isGift", title: "赠品", inputType: "Checkbox", },
-      {
-        key: "goodsWarehouseName",
-        title: "收货仓库", 
-        inputType: "Input",
-        width: 200,
-        disabled:true,
-      },
-      // { key: "place", title: "收货地点", inputType: "Input", width: 180 },
-      { 
-        key: "address",
-        title: "收货地址",
-        inputType: "PopoverSelect",
-        valueKey: "address",
-        referName: "ADDRESS_PARAM",
-        width: 180,
-        dataMapping:{
-          // address: 'address',
-          // addressName: '',
-          goodsWarehouse:'id',
-          goodsWarehouseName:'name',
-          contacts:'contactsName',
-          contactsPhone:'contactsPhone'
-        }
-      },
-      { 
-        key: "customerName",
-        title: "收货客户", 
-        inputType: "PopoverSelect",
-        valueKey: "id",
-        referName: "CUSTOMER_PARAM",
-        width: 180,
-        dataMapping:{
-          customer:'id',
-          customerName:'name',
-        },
-      },
-      { key: "productBatch", title: "产品批号", inputType: "Input", width: 180 },
-      { key: "manufactureDate", title: "生产日期", inputType: "Input", width: 180 },
-      { 
-        key: "efficacyLoseDate", 
-        title: "有效期至/失效日期", 
-        inputType: "Input",
-         width: 180
-         },
-      { 
-        key: "approvalNumber",
-         title: "批准文号",
-          inputType: "Input", 
-          width: 180
-         },
-      { 
-        key: "registration",
-         title: "注册证号", 
-         inputType: "Input", 
-         width: 180 ,
-         disabled:true,
-        },
-
-      { //storageCondition storageConditionName
-        key: "storageCondition",
-        title: "存储条件",
-        inputType: "Select",
-        referName: "sys_storage_condition", // 字典名
-        width: 180,
-        disabled:true,
-        readonly:true,
-      },
-      { // transportationCondition  transportationConditionName
-        key: "carriageCondition",
-        title: "运输条件",
-        inputType: "Select",
-        referName: "sys_conditions_carriage", // 字典名
-        width: 180,
-        disabled:true,
-        readonly:true,
-      },
-
-      { key: "isBatchLock", title: "批号锁定标识", inputType: "Checkbox", },
-      { key: "isReplenishment", title: "补单标识", inputType: "Checkbox", },
-      { key: "isUrgency", title: "紧急标识", inputType: "Checkbox", },
-      { 
-        key: "originalQty", 
-        title: "原始数量", 
-        inputType: "InputNumber", 
-        controlsPosition: "right",
-        disabled:true,
-        width: 180 ,
-      },
-      { 
-        key: "originalMoney", 
-        title: "原始金额", 
-        inputType: "InputNumber", 
-        controlsPosition: "right",
-        // precision:2,
-        disabled:true,
-        width: 180,
-      },
-      { key: "directProductBatch", title: "直运产品批号", inputType: "Input", width: 180 },
-      { key: "discountRule", title: "折扣规则编码", inputType: "Input", width: 180 },
-      { 
-        key: "reservedQty", 
-        title: "预留数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180 ,
-       },
-      { key: "reservedPeriod", title: "预留周期", inputType: "Input", },
-      { 
-        key: "taxDeductClassify", 
-        title: "扣税类别", 
-        inputType: "Select",
-        referName: "tax_deduction_category", // 字典名
-        width: 180,
-       },
-      { key: "exchangeRate", title: "折本汇率", inputType: "Input", },
-      { key: "source", title: "上游单据号", inputType: "Input", width: 180 },
-      // { key: "sourceId", title: "上游单据ID", inputType: "Input", width: 180 },
-      // { key: "demandCode", title: "采购需求单号", inputType: "Input", width: 180 },
-      { key: "arrivalDatePlan", title: "计划到货日期", inputType: "Input", width: 180 },
-     
-      { key: "isDistributionPrice", title: "配送价", inputType: "Checkbox", },
-     
-      { //threeClass
-        key: "materialClassifyOneName", 
-        title: "物料一级分类", 
-        inputType: "Input",
-        width: 180,
-        disabled:true,
-        readonly:true, 
-      },
-      { //twoClass
-        key: "materialClassifyTwoName",
-        title: "物料二级分类", 
-        inputType: "Input",
-        width: 180,
-        disabled:true,
-        readonly:true, 
-      },
-      { //threeClass
-        key: "materialClassifyThreeName", 
-        title: "物料三级分类", 
-        inputType: "Input", 
-        width: 180,
-        disabled:true,
-        readonly:true,
-      },
-      { //fourClass
-        key: "materialClassifyFourName", 
-        title: "物料四级分类",
-        inputType: "Input", 
-        width: 180,
-        disabled:true,
-        readonly:true,
-      },
-      // { key: "createByName", title: "创建人", inputType: "Input", },
-      // { key: "updateByName", title: "更新人", inputType: "Input", },
-      
-    ]
-  },
-  {
-    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,
-      },
-      { 
-        key: "stroageQty", 
-        title: "累计到货主数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180, 
-      },
-      { 
-        key: "stockQty", 
-        title: "累计入库主数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180, 
-      },
-      { 
-        key: "invoiceQty", 
-        title: "累计开票主数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180, 
-      },
-      { 
-        key: "rollbackQty", 
-        title: "累计退货主数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180, 
-      },
-      { 
-        key: "backStockQty", 
-        title: "累计退库主数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180, 
-      },
-      { 
-        key: "floatQty", 
-        title: "未到货数量", 
-        inputType: "InputNumber",
-        controlsPosition: "right",
-        width: 180, 
-      },
-      // { 
-      //   key: "createByName", 
-      //   title: "创建人", 
-      //   inputType: "Input", 
-      //   width: 120 
-      // },
-      // { 
-      //   key: "updateByName", 
-      //   title: "更新人", 
-      //   inputType: "Input", 
-      //   width: 120 
-      // },
-    ]
-  },
-];
-
-
-// 集采中心
-const PurColumns =[];
-const PurchaseTabColumns =[];
-
-// 事业发展部
-const CauseColumns =[];
-const CauseTabColumns =[];
-// export const initTabColumns = () => tabColumns;

+ 0 - 1036
src/views/purchase/purchase-order/add/index copy.vue

@@ -1,1036 +0,0 @@
-<script>
-import orderApi from "@/api/business/purchase/purchase-order";
-import { initColumns, initDicts, initRules, initParams } from "@/utils/init/index.js";
-// import { Columns, TabColumns } from "./column";
-import judgeColumns from "./column";
-import { tax, currency } from "@/components/popover-select-v2/fetch";
-import VirtualScroll from 'el-table-virtual-scroll';
-import { VirtualColumn } from 'el-table-virtual-scroll';
-
-const {Columns,TabColumns} = judgeColumns();
-    
-const NewColumns = initColumns(Columns);
-const NewTabColumns = TabColumns.map((element) => ({
-  ...element,
-  tableColumns: initColumns(element.tableColumns),
-}));
-
-const SelectColumns = NewColumns.filter(
-  (column) => column.inputType === "Select"
-);
-NewTabColumns.forEach((column) => {
-  SelectColumns.push(
-    ...column.tableColumns.filter((cColumn) => cColumn.inputType === "Select")
-  );
-});
-
-export default {
-  name: "AddPurchaseOrderDrawer",
-  props:{
-    // roles:{
-    //   type:[Array,String,Object],
-    //   require:true,
-    // }
-  },
-  dicts: initDicts(SelectColumns),
-  components: {
-    'virtual-scroll':VirtualScroll,VirtualColumn,
-    FileUploadCenter: () => import("../components/FileUploadCenter/index.vue"),
-    popDialog: () => import("@/components/PopDialog/index.vue"),
-    BatchImport: () => import("@/components/BatchImport/index.vue"),
-  },
-  
-
-  data() {
-
-    return {
-      visible: false,
-      loading:false,
-      tabLoading:false,
-      columns: NewColumns,
-      rules: initRules(NewColumns),
-      count:0,
-      params: {
-        ...initParams(NewColumns),
-        puOrderItemList: [],
-        puOrderExecuteList: [],
-      },
-      tabColumns: NewTabColumns,
-      tabName: "puOrderItemList",
-      isCopy:false,
-      tableData:[],  //虚拟滚动加载显示的数据
-    };
-  },
-  computed: {
-    role:{
-      get(){
-        let {roles} = this.$store.state.user;
-        return roles.find(item => item === "syfz-purchaseorder") || "procurementManager";
-        
-      },
-      set(){}
-    }
-  },
-  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.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'];
-        
-        if(billList.find(item => item === nVal)){
-          this.rules.warehouseName = [
-            { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
-          ];
-        }else{
-          this.rules.warehouseName = null;
-        }
-
-        this.count++;
-      }
-    }
-  },
-  methods: {
-    beforeOpen() {
-      if(!this.isCopy){
-
-        const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
-        this.params.puOrg = orgId;
-        this.params.puOrgName = orgName;
-        this.params.buyer = name;
-        this.params.buyerName = nickName;
-        this.params.puDept = deptId;
-        this.params.puDeptName = deptName;
-        this.params.billDate = new Date().Format('yyyy-MM-dd');
-        this.params.createTime = new Date().Format('yyyy-MM-dd HH:mm:ss');
-        console.log(this.params,'this.params');
-        // this.addTableRow();
-      }
-    },
-    setVisible(prop,iscopy) {
-      this.visible = prop;
-
-      this.isCopy = iscopy;
-
-      if(!this.visible){
-        this.$refs['orderAddForm'].clearValidate();
-      }
-    },
-    // 复制赋值
-    async setCopyParams(id) {
-
-      try {
-        this.loading = true;
-        const { code, msg, data } = await orderApi.details(id);
-
-        if (code === 200) {
-
-          this.params = {
-            ...data,
-            id: "",
-            code: "",
-            isEnd:'N',
-            status: "0",
-            source: "3",
-            isClose:'N',
-            billDate: new Date().Format('yyyy-MM-dd'),
-            createTime : new Date().Format('yyyy-MM-dd HH:mm:ss'),
-            closeTime:'',
-            oaDemandNo:'',
-            isInvoice:'N',
-            isSendWms:'N',
-            rebateMoney:'',
-            invoiceMoney:'',
-            paymentMoney:'',
-            applyPaymentMoney:'',
-            erpOrderCode:'',
-
-          };
-
-          try {
-            const { code, rows} = await orderApi.REFER(
-              {
-                type:'WAREHOUSE_PARAM',
-                search:  this.params.warehouseName,
-                isPage: true,
-              }, {pageNum: 1 , pageSize: 10} );
-
-              if(code ==200){
-                this.judgeGoodsAllocation(rows[0].csFlag);
-              }
-
-
-          } catch (error) {
-            
-          }
-
-          for (const key in this.params) {
-            // if (Array.isArray(this.params[key])) {
-            if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
-              this.params[key].forEach((v) => {
-                v.id = "";
-                v.demandCode = "";
-                v['isInvoice'] && (v['isInvoice'] = 'N');
-                v['isStorage'] && (v['isStorage'] = 'N');
-                v['isArrival'] && (v['isArrival'] = 'N');
-                v['isPayment'] && (v['isPayment'] = 'N');
-              });
-
-            }
-          }
-          // 清空   累计本币开票金额、
-          // 累计付款金额、累计付款申请金额、累计开票主数量、最终关闭时间
-          // 、最终关闭、已同步WMS 、订单抵扣余额金额、订单使用返利金额、 发票标识
-          
-
-        }
-      } catch (err) {
-        //
-      } finally {
-        this.loading = false;
-      }
-    },
-    // 增行
-    addTableRow(prop) {
-      for (const key in this.params) {
-
-        // if (Array.isArray(this.params[key])) {
-        if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
-
-          const arr = this.tabColumns.find(
-
-            (element) => element.key === key
-
-          ).tableColumns;
-
-          let rowData = initParams(arr, "key", "value");
-         
-
-          "rowno" in rowData &&
-            (rowData["rowno"] = this.params[key].length ? 
-              this.params[key][this.params[key].length - 1]['rowno'] +1 :
-               this.params[key].length + 1
-            );
-
-            // 物料
-            if("rowNo" in rowData){
-              
-              rowData["rowNo"] = this.params[key].length ? 
-              this.params[key][this.params[key].length - 1]['rowNo'] +1 :
-               this.params[key].length + 1;
-              // 扣税类别
-              rowData["taxDeductClassify"] = '1';
-              // 折本汇率
-              rowData["exchangeRate"] = '1';
-              // 价格类型
-              rowData["priceType"] = 'order';
-              // 币种
-              rowData["currency"] = '1002Z0100000000001K1';
-              rowData["currencyName"] = '人民币';
-            }
-          
-
-          // 是否完成询价,新增明细行需默认明细为false
-          // rowData["whetherCompleteInquiry"] = false;
-          this.params[key].push(rowData);
-        }
-      }
-
-      // const arr = this.tabColumns.find(
-      //   (element) => element.key === this.tabName
-      // ).tableColumns;
-      // prop.push(initParams(arr, "key", "value"));
-    },
-    // 删行
-    async delTableRow(prop, index) {
-
-     
-      for (const key in this.params) {
-        // if (Array.isArray(this.params[key])) {
-        if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
-          this.params[key].splice(index, 1);
-        }
-      }
-
-      await this.handleGetPrice();
-      // prop.splice(index, 1);
-    },
-    // 同步子表物料
-    handleSynchronousMaterial(tableOne, tableTwo) {
-      let _this = this;
-      // this.params[tableOne]-- -> this.params[tableTwo]
-      this.params[tableOne] &&
-
-        this.params[tableOne].forEach((item, index) => {
-
-          for (const key in item) {
-
-            if(!_this.params[tableTwo][index]){
-
-               const arr = _this.tabColumns.find(
-                  (element) => element.key === tableTwo
-                ).tableColumns;
-
-                _this.params[tableTwo].push(initParams(arr, "key", "value"));
-            }
-            
-            if (key in _this.params[tableTwo][index]) {
-
-              _this.params[tableTwo][index].material = item.material;
-
-              key !== 'id' && ( _this.params[tableTwo][index][key] = item[key]);
-
-            }
-          }
-        });
-    },
-    // 取消
-    handleCancel() {
-      this.params = {
-        ...initParams(this.columns),
-        puOrderItemList: [],
-        puOrderExecuteList: [],
-      };
-      this.setVisible(false);
-    },
-    // 判断保存条件
-    judgeSaveCondition(cb){
-      this.$refs['orderAddForm'].validate(async (valid) => {
-        if (valid) {
-
-          if(!this.params['puOrderItemList'].length || !this.params['puOrderExecuteList'].length){
-            this.$notify.error({
-              title: '错误',
-              message: '请填写订单行!'
-            });
-            return false;
-          }
-
-          // puOrderItemList
-        //  let isPrice =  this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
-
-         
-
-        //  if(isPrice.length && this.role === 'procurementManager'){
-
-        //     this.$notify.error({
-        //       title: '错误',
-        //       message: '询价失败!'
-        //     });
-        //     return false
-
-        //  }
-        //  console.log(isPrice,'isPrice');
-          cb();
-        } else {
-          this.$notify.error({
-              title: '错误',
-              message: '存在必填项未填写'
-            });
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    // 保存
-     handleSava() {
-     console.log(this.params,'this.params---------');
-      this.judgeSaveCondition(async()=>{
-        try {
-            this.loading = true;
-            const { code, msg } = await orderApi.create(this.params);
-            if (code === 200) {
-              this.handleCancel();
-            }
-          } catch (err) {
-            //
-          } finally {
-            this.loading = false;
-          }
-      })
-    },
-    judgeGoodsAllocation(porp){
-      if(porp === 'Y'){
-        this.rules.goodsAllocationName = [
-          { required: true, message: "货位不能为空", trigger: "change" },
-        ];
-      } else{ 
-        this.rules.goodsAllocationName = null;
-      }
-      this.count++;
-   },
-    // 主表参照改变之后
-   async handleReferChange(val, type, source){
-     let page = { pageNum: 1 , pageSize: 10 };
-      // 供应商选择  
-      if( type === 'SUPPLIER_PARAM' ){
-
-
-        let relevanceRefer = [
-          {
-            // 供应商联系人
-            key:'supplierContacts',
-            params:{
-              type:'SUPPLIERCONTACTS_PARAM',
-              supplierId:val.id,
-            }
-          },
-          {
-            // 供应商业务员
-            key:'supplierPersonal',
-            params:{
-              type:'PSNLICENSE_PARAM',
-              supplierId:val.id,
-              pkOrg: source.puOrg,
-            }
-          }
-        ]
-        
-        try {
-
-          let promiseArr =  relevanceRefer.map( (refer) =>{
-
-            return new Promise((resolve,reject)=>{
-
-               orderApi.REFER(
-                {
-                  ...refer.params,
-                  search: "",
-                  isPage: true,
-                }, page ).then(res=>{
-
-                  let {code,rows} = res;
-                  if (code === 200) {
-                    
-                    source[refer.key] = rows[0]? rows[0].id :'';
-                    
-                    source[`${refer.key}Name`] = rows[0] ? rows[0].name :'';
-                    
-                    resolve();
-                  }
-              })
-            })
-          })
-
-          Promise.all(promiseArr).then(async()=>{
-            // 明细不为空的情况下进行询价
-            let detailList = this.params['puOrderItemList'].filter(item => (
-                item.material && item.material != '' 
-              ))
-              
-              if(detailList.length){
-
-                await this.handleGetPrice();
-              }
-          })
-        } catch (error) {}
-      }
-
-      // 组织
-      if(type === 'ORG_PARAM'){
-
-          for (const key in this.params) {
-
-            // if (Array.isArray(this.params[key])) {
-            if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
-
-              this.params[key] = [];
-
-            }
-            else if(key === 'sysFileRecordList'){
-              this.params[key] = [];
-            }
-             else if (
-              key != "puOrg" &&
-              key != "puOrgName" &&
-              key != "buyer" &&
-              key != "buyerName" &&
-              key != "puDept" &&
-              key != "puDeptName" &&
-              key != "status" &&
-              key != "billDate" &&
-              key != "createTime" 
-            ) {
-              this.params[key] = "";
-            } else {
-            }
-          }
-        
-
-      }
-
-      // WMS仓库
-      if(type === 'WAREHOUSE_PARAM'){
-        this.judgeGoodsAllocation(val.csFlag);
-        source.goodsAllocation = ''
-        source.goodsAllocationName = ''
-        // this.count++
-      }
-    },
-
-    // 下拉框选择改变
-    handleSelectChange(val,typeName){
-
-      if(val === 'billType'){
-
-      this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
-
-      }
-
-    },
-
-
-    // 子表参照改变之后
-   async handleTabReferChange(val,  type, source) {
-
-      // 触发物料参照询价 
-      if (type == "MATERIAL_PARAM" && source.qty && source.qty != "") {
-
-        source['qty'] = 0;
-
-        // source['whetherCompleteInquiry'] = false;
-
-        source['taxPrice'] = 0;
-
-        source['money'] = 0;
-
-        source['taxDeductMoneya'] = 0;
-
-        source['price'] = 0;
-        
-        source['notaxMoney'] = 0;
-
-        source['tax'] = 0;
-
-        this.params['qty'] = 0;
-        this.params['originalQty'] = 0;
-        this.params['money'] = 0;
-        this.params['originalMoney'] = 0;
-        this.params['notaxMoney'] = 0;
-        source.isDrug = val.materialMedcine.isDrug  == '0' ? 'Y' : 'N';
-
-        // await this.handleGetPrice();
-
-      }
-
-      // 物料触发税率
-      if( type == "MATERIAL_PARAM"){
-        let {rateCode} = source;
-        try {
-          // try
-          this.loading = true;
-          const { ntaxrate } = await tax(rateCode);
-          source.tax = ntaxrate === "0E-8" ? 0 : ntaxrate;
-        } catch (err) {
-          // catch
-          console.error(err);
-        } finally {
-          // finally
-          this.loading = false;
-        }
-      }
-
-    },
-
-    // 子表下拉框改变
-    async handleTabSelectChange(type,row){
-     
-      if(type == 'priceType' && row.material && row.qty && row.qty != ""){
-
-        // row['whetherCompleteInquiry'] = false;
-
-        await this.handleGetPrice();
-      }
-    },
-
-    // 子表inputNumber
-    handleInputChange(row, type) {
-      // 物料数量变化----询价
-      if ((type == "qty" || type == "taxPrice" || type == 'taxDeductMoneya')&& row.material) {
-
-        // row['whetherCompleteInquiry'] = false;
-
-        
-       this.handleGetPrice();
-
-      }
-
-      // if(this.role === 'syfz-purchaseorder' && row.material && (type == "qty" ||type === "taxPrice" )){
-
-      //   row.money = row.qty * row.taxPrice;
-      // }
-
-    },
-
-    // 子表多选框改变
-    handleTabCheckbox(type,source){
-
-      // 勾选赠品,价税合计更新为0,含税单价、无税单价更新为0
-      if(type === 'isGift' && source.material && source.qty && source.qty != ""){
-
-        // source['whetherCompleteInquiry'] = false;
-
-        this.handleGetPrice()
-      }
-
-    },
-    // 询价 getPrice
-    async handleGetPrice() {
-
-        try {
-          
-          // action:insert(新增)、revise(修订)、update(编辑)
-          let { code, data } = await orderApi.getPrice({ ...this.params,action: 'insert' });
-  
-          if (code == 200) {
-  
-            this.params = data;
-  
-          }
-  
-        } catch (error) {} 
-      
-
-    
-    },
-
-    async handelImport(fileList){
-
-      try {
-
-        let formData = new FormData();
-
-        formData.append('file',fileList[0].raw);
-
-        this.$modal.loading("正在上传文件,请稍候...");
-
-        let {code,data} = await orderApi.orderImport(formData);
-
-        if(code == 200) {
-          this.tabLoading = true;
-          // puOrderExecuteList puOrderItemList
-
-          // let size = 20;
-          // let num = 1;
-          // let total = Math.ceil(data['puOrderItemList'].length / size);
-
-          // let resultData = {...data};
-          
-          // let intervalPush = setInterval(()=>{
-
-          //   if(num > total){
-              
-          //     clearInterval(intervalPush);
-
-          //     this.tabLoading = false;
-            
-          //     this.handleGetPrice();
-          //   } 
-    
-          //   for (const key in resultData) {
-
-          //     resultData[key].slice(size*(num-1), (size*num) ).forEach(item =>{
-            
-
-          //       this.params[key].push(item);
-
-          //     })
-
-          //   }
-
-          //   num++;
-
-          // },200);
-
-          for (const key in data) {
-
-            this.params[key].push(...data[key]);
-
-          }
-
-          
-          let {setVisible} =  this.$refs.batchImport;
-          
-          setVisible(false);
-          
-            
-          
-        }
-        
-      } catch (error) {
-        
-      }finally{
-        this.$modal.closeLoading();
-        
-      }
-      
-    },
-    
-    async handleTemDownload(){
-
-      this.download('/pu/order/downloadFailData',{}, `采购订单物料信息模板${new Date().getTime()}.xlsx`);
-    },
-
-    // judgeRole(){
-    //   let {roles} = this.$store.state.user;
-    //   let role =  roles.find(item => item === "syfz-purchaseorder") || "procurementManager";
-    //   return role;
-    // },
-
-
-  },
-  created() {
-    console.log("ADD CREATED", this.params);
-  },
-  mounted() {},
-  destroyed() {},
-};
-</script>
-<template>
-  <el-drawer
-    direction="btt"
-    size="100%"
-    :with-header="false"
-    :visible.sync="visible"
-    @open="beforeOpen"
-    @close="$emit('close')"
-    v-loading="loading"
-  >
-    <el-form
-      size="mini"
-      label-position="right"
-      ref="orderAddForm"
-      label-width="140px"
-      :model="params"
-      :rules="rules"
-      :key="count"
-    >
-      <el-card
-        :body-style="{
-          padding: '20px',
-          display: 'flex',
-          'flex-wrap': 'wrap',
-        }"
-        style="margin: 10px"
-      >
-        <div
-          slot="header"
-          style="
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-          "
-        >
-          <h3>新增</h3>
-          <div style="text-align: right">
-            <el-button 
-              size="mini" 
-              type="primary"
-              @click="handleSava"
-            >保存</el-button>
-            <el-button size="mini" @click="handleCancel">取消</el-button>
-          </div>
-        </div>
-        <el-row style="display: flex; flex-wrap: wrap">
-          <el-col
-            v-for="(column, index) in columns"
-            :key="index"
-            :span="column.span || 6"
-          >
-            <el-form-item
-              :prop="column.key"
-              :label="column.title"
-              v-if="column.isShow"
-            >
-              <el-input
-                v-if="column.inputType === 'Input'"
-                v-model="params[column.key]"
-                :placeholder="column.placeholder"
-                :clearable="column.clearable"
-                :disabled="column.disabled"
-                style="width: 100%;"
-              >
-              </el-input>
-              <dr-popover-select
-                v-if="column.inputType === 'PopoverSelect'"
-                v-model="params[column.key]"
-                :value-key="column.valueKey"
-                :source.sync="params"
-                :title="column.title"
-                :type="column.referName"
-                :disabled="column.disabled"
-                :multiple="column.multiple"
-                :placeholder="column.placeholder"
-                :data-mapping="column.dataMapping"
-                :query-params="column.queryParams"
-                @change="handleReferChange"
-              ></dr-popover-select>
-
-              <el-input
-                v-if="column.inputType === 'Textarea'"
-                v-model="params[column.key]"
-                type="textarea"
-                :placeholder="column.placeholder"
-                :clearable="column.clearable"
-                :disabled="column.disabled"
-                style="width: 100%"
-              ></el-input>
-
-              <el-input-number
-                v-if="column.inputType === 'InputNumber'"
-                v-model="params[column.key]"
-                :precision="column.precision"
-                :controls-position="column.controlsPosition"
-                :placeholder="column.placeholder"
-                :clearable="column.clearable"
-                :disabled="column.disabled"
-                style="width: 100%"
-              >
-              </el-input-number>
-              <el-select
-                v-if="column.inputType === 'Select'"
-                v-model="params[column.key]"
-                :disabled="column.disabled"
-                :clearable="column.clearable"
-                :placeholder="column.placeholder"
-                style="width: 100%"
-                filterable
-                @change="handleSelectChange(column.key,column.referName)"
-              >
-                <el-option
-                  v-for="item in dict.type[column.referName]"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-              <el-select
-                v-if="column.inputType === 'TagSelect'"
-                v-model="params[column.key]"
-                multiple
-                clearable
-                collapse-tags
-                :placeholder="column.placeholder"
-                :clearable="column.clearable"
-                :disabled="column.disabled"
-                style="width: 100%"
-              >
-                <template #prefix>
-                  <el-icon
-                    class="el-icon-view"
-                    style="cursor: pointer"
-                    @click.stop="$message.info(234)"
-                  >
-                  </el-icon>
-                </template>
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-              <el-date-picker
-                v-if="column.inputType === 'DatePicker'"
-                v-model="params[column.key]"
-                :type="column.type"
-                :placeholder="column.placeholder"
-                :clearable="column.clearable"
-                :disabled="column.disabled"
-                :picker-options="column.pickerOptions"
-                style="width: 100%"
-              ></el-date-picker>
-              <el-checkbox
-                v-if="column.inputType === 'Checkbox'"
-                v-model="params[column.key]"
-                :disabled="column.disabled"
-                true-label="Y"
-                false-label="N"
-              ></el-checkbox>
-              <file-upload-center
-                v-if="column.inputType === 'Upload'"
-                v-model="params[column.key]"
-                :file-type="column.fileType"
-              ></file-upload-center>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-card>
-
-      <el-card
-        :body-style="{
-          padding: '20px',
-          display: 'flex',
-          'flex-wrap': 'wrap',
-          position: 'relative',
-        }"
-        style="margin: 10px"
-      >
-        <el-tabs v-model="tabName" style="width: 100%" v-loading="tabLoading">
-          <el-tab-pane
-            v-for="(column, index) in tabColumns"
-            :key="index"
-            :label="column.title"
-            :name="column.key"
-          >
-
-          <virtual-scroll :data="resultData" 
-                    :item-size="53" 
-                    key-prop="id" 
-                    @change="(virtualList) => tableData = virtualList" 
-                    :virtualized="true" @selection-change="handleSelectionChange">
-      <!-- row-key绑定列唯一值,height一定要设置否则会滚动条滚动位置不对且数据滚动全部加载完后会出现白板-->
-          </virtual-scroll>
-
-
-            <el-table 
-              :data="params[column.key]" 
-              style="width: 100%"
-              :height="params[column.key].length ? 300 : 100"
-              border
-            >
-              <el-table-column
-                v-for="(cColumn, cIndex) in column.tableColumns"
-                :key="cIndex"
-                :label="cColumn.title"
-                :width="cColumn.width || 80"
-              >
-              <template slot="header" slot-scope="scope">
-                <span v-if="cColumn.require" style="color: #ff4949">*</span>
-                <span>
-                  {{ cColumn.title }}
-                </span>
-              </template>
-                <template slot-scope="scope">
-                  <el-form-item 
-                    label-width="0" 
-                    :prop="`${column.key}.${scope.$index}.${[cColumn.key]}`"
-                    :rules="{ required: cColumn.require || false, message: `${cColumn.title}不能为空`, trigger: 'change' }"
-                  >
-                    <el-tag v-if="cColumn.key === 'index'" >
-                      {{ scope.$index + 1 }}
-                    </el-tag>
-                    <el-input
-                      v-if="cColumn.inputType === 'Input'"
-                      v-model="scope.row[cColumn.key]"
-                      :placeholder="cColumn.placeholder"
-                      :clearable="cColumn.clearable"
-                      :disabled="cColumn.disabled"
-                      size="mini"
-                      style="width: 100%"
-                    ></el-input>
-
-                    <!--  -->
-                    <dr-popover-select
-                      v-if="cColumn.inputType === 'PopoverSelect'"
-                      v-model="scope.row[cColumn.key]"
-                      :source.sync="scope.row"
-                      :title="cColumn.title"
-                      :value-key="cColumn.valueKey"
-                      :type="cColumn.referName"
-                      :disabled="cColumn.disabled"
-                      :multiple="cColumn.multiple"
-                      :placeholder="cColumn.placeholder"
-                      :data-mapping="cColumn.dataMapping"
-                      :query-params="cColumn.queryParams"
-                      @change="handleTabReferChange"
-                      size="mini"
-                    >
-                    </dr-popover-select>
-
-                    <el-input-number
-                      v-if="cColumn.inputType === 'InputNumber'"
-                      v-model="scope.row[cColumn.key]"
-                      :precision="cColumn.precision"
-                      :controls-position="cColumn.controlsPosition"
-                      :placeholder="cColumn.placeholder"
-                      @change="handleInputChange(scope.row, cColumn.key)"
-                      :clearable="cColumn.clearable"
-                      :disabled="cColumn.disabled"
-                      :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
-                      size="mini"
-                      style="width: 100%"
-                    ></el-input-number>
-
-                    <el-select
-                      v-if="cColumn.inputType === 'Select'"
-                      v-model="scope.row[cColumn.key]"
-                      filterable
-                      size="mini"
-                      :disabled="cColumn.disabled"
-                      :clearable="cColumn.clearable"
-                      :placeholder="cColumn.placeholder"
-                      style="width: 100%"
-                      @change="handleTabSelectChange(cColumn.key,scope.row)"
-                    >
-                      <el-option
-                        v-for="item in dict.type[cColumn.referName]"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
-                      ></el-option>
-                    </el-select>
-
-                    <el-checkbox
-                      v-if="cColumn.inputType === 'Checkbox'"
-                      v-model="scope.row[cColumn.key]"
-                      :disabled="cColumn.disabled"
-                      true-label="Y"
-                      false-label="N"
-                      @change="handleTabCheckbox(cColumn.key,scope.row)"
-                    ></el-checkbox>
-                  </el-form-item>
-                </template>
-              </el-table-column>
-
-              <el-table-column fixed="right" label="操作" width="80">
-                <template slot-scope="scope">
-                  <el-button
-                    @click.native.prevent="
-                      delTableRow(params[tabName], scope.$index)
-                    "
-                    type="text"
-                    size="small"
-                  >
-                    删行
-                  </el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-          </el-tab-pane>
-        </el-tabs>
-        <el-row style="position: absolute; top: 20px; right: 20px">
-          <el-button size="mini" @click="addTableRow(params[tabName])"
-            >增行</el-button>
-         
-            <!-- v-if="role === 'procurementManager'" -->
-          <BatchImport
-            ref="batchImport"
-            @import="handelImport"
-            @temDownload="handleTemDownload"
-          ></BatchImport>
-        </el-row>
-      </el-card>
-    </el-form>
-  </el-drawer>
-</template>
-

Fișier diff suprimat deoarece este prea mare
+ 347 - 369
src/views/purchase/purchase-order/add/index.vue


+ 423 - 96
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,8 +730,299 @@ const CauseColumns = [
   item: { ...item, hidden: true, fixed: false },
 }));
 
-const CommonTabColumns = [
+// 集采中心
+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 = [
 
   {
     title: '物料信息',
@@ -1261,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 = [
@@ -1617,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 }
 

Fișier diff suprimat deoarece este prea mare
+ 342 - 369
src/views/purchase/purchase-order/edit/index.vue


Fișier diff suprimat deoarece este prea mare
+ 301 - 342
src/views/purchase/purchase-order/index.vue


+ 322 - 287
src/views/purchase/purchase-order/see/index.vue

@@ -10,8 +10,8 @@ import {
 import orderApi from "@/api/business/purchase/purchase-order";
 import { PRINT } from "@/api/business/purchase/task";
 import judgeColumns from "../add/column";
-import VirtualScroll from 'el-table-virtual-scroll';
-import { VirtualColumn } from 'el-table-virtual-scroll';
+import VirtualScroll from "el-table-virtual-scroll";
+import { VirtualColumn } from "el-table-virtual-scroll";
 
 const { Columns, TabColumns } = judgeColumns();
 
@@ -20,63 +20,62 @@ const NewTabColumns = TabColumns.map((element) => ({
   ...element,
   tableColumns: initColumns(element.tableColumns),
 }));
-// 
-const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
-NewTabColumns.forEach(column => {
-  SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
+//
+const SelectColumns = NewColumns.filter(
+  (column) => column.inputType === "Select"
+);
+NewTabColumns.forEach((column) => {
+  SelectColumns.push(
+    ...column.tableColumns.filter((cColumn) => cColumn.inputType === "Select")
+  );
 });
 
-
 export default {
   name: "SeePurchaseOrderDrawer",
   dicts: initDicts(SelectColumns),
   components: {
-    'virtual-scroll':VirtualScroll,VirtualColumn,
-    FileUploadCenter: () => import('../components/FileUploadCenter/index.vue'),
-    FilePrint:() => import('../print/index.vue'),
+    "virtual-scroll": VirtualScroll,
+    VirtualColumn,
+    FileUploadCenter: () => import("../components/FileUploadCenter/index.vue"),
+    FilePrint: () => import("../print/index.vue"),
   },
   data() {
     return {
       visible: false,
       loading: false,
       columns: NewColumns,
-      printData:{},
+      printData: {},
       rules: initRules(NewColumns),
       params: {
         ...initParams(NewColumns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       },
 
       tabColumns: NewTabColumns,
       tabName: "puOrderItemList",
-      tableData:[],  //虚拟滚动加载显示的数据
+      tableData: [], //虚拟滚动加载显示的数据
     };
   },
   computed: {
-    tabHeight:{
-      get(){
-        let length = this.params['puOrderItemList'].filter(item => item.delFlag === '0').length;
-        return `${length ? 
-                  (length > 8 ? 500 :  (length *60) +170)
-                : 120}px`
+    tabHeight: {
+      get() {
+        let length = this.params["puOrderItemList"].filter(
+          (item) => item.delFlag === "0"
+        ).length;
+        return `${length ? (length > 8 ? 500 : length * 36 + 120) : 120}px`;
       },
-      set(){}
+      set() {},
     },
   },
   watch: {},
   methods: {
-    
     setVisible(prop) {
-
       this.visible = prop;
 
-      if(!this.visible){
-
-        this.$refs['orderSeeForm'].clearValidate();
-
+      if (!this.visible) {
+        this.$refs["orderSeeForm"].clearValidate();
       }
-
     },
 
     //查询详情
@@ -94,16 +93,16 @@ export default {
       }
 
       try {
-          this.loading = true;
-          const { data, code } = await PRINT({ id: this.params.id || 628 });
-          if (code === 200) {
-            this.printData = data;
-            this.loading = false;
-          }
-        } catch (err) {
-          alert(err);
-        } finally {
+        this.loading = true;
+        const { data, code } = await PRINT({ id: this.params.id || 628 });
+        if (code === 200) {
+          this.printData = data;
+          this.loading = false;
         }
+      } catch (err) {
+        alert(err);
+      } finally {
+      }
     },
     // 取 消
     handleCancel() {
@@ -111,43 +110,38 @@ export default {
       this.params = {
         ...initParams(this.columns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
-      }
+        // puOrderExecuteList: [],
+      };
       this.setVisible(false);
     },
-    handleRefresh(){
-      let {id} = this.params;
+    handleRefresh() {
+      let { id } = this.params;
       this.fetchItem(id);
     },
     // 发送NC
-    async handleSendNC(){
-      console.log('发送NC');
+    async handleSendNC() {
+      console.log("发送NC");
 
       try {
-        let {code} = await orderApi.toNc({ puOrderId:this.params.id});
+        let { code } = await orderApi.toNc({ puOrderId: this.params.id });
 
-        if(code == 200){
+        if (code == 200) {
           this.handleRefresh();
         }
       } catch (error) {
-        
-      }finally{
-
+      } finally {
       }
     },
     // 判断是否能发送NC
-    judgeIsToNC(){
-
-      let {source,status,deliveryStatus} = this.params;
+    judgeIsToNC() {
+      let { source, status, deliveryStatus } = this.params;
 
       // 自制 & 状态为:自由态、驳回
       // if(source === '3' &&(status === '0' || status === '3')){
-      if(status === '2'){
-
+      if (status === "2") {
         // 发送NC之后展示 SUCCESS("0","成功"),SEND_IN("1","发送中"),FAILURE("2","失败");
         //    未发送                发送过但未成功
-        if(!deliveryStatus || (deliveryStatus && deliveryStatus !== '0')){
-
+        if (!deliveryStatus || (deliveryStatus && deliveryStatus !== "0")) {
           return true;
         }
 
@@ -156,80 +150,83 @@ export default {
 
       return false;
     },
-    beforeOpen() { 
-      
-    },
-    getSummaries({ columns, data }){
-      
-      const means = [] // 合计
+    beforeOpen() {},
+    getSummaries({ columns, data }) {
+      const means = []; // 合计
       let { tabColumns, tabName } = this;
       columns.forEach((column, columnIndex) => {
-          if (columnIndex === 0) {
-              means.push('合计')
-          } else {
-              const values = data.map(item => Number(item[column.property]));
-              
-              let sumColumn = tabColumns.find(tab => tab.key === tabName).tableColumns.filter(({key,isSummary}) => isSummary && key === column.property);
-
-              // 合计
-              // if (!values.every(value => isNaN(value))) {
-              if (sumColumn.length) {
-                  means[columnIndex] = values.reduce((prev, curr) => {
-                      const value = Number(curr);
-                      if (!isNaN(value)) {
-                          return prev + curr;
-                      } else {
-                          return prev;
-                      }
-                  }, 0);
-                  means[columnIndex] = means[columnIndex].toFixed(2); 
+        if (columnIndex === 0) {
+          means.push("合计");
+        } else {
+          const values = data.map((item) => Number(item[column.property]));
+
+          let sumColumn = tabColumns
+            .find((tab) => tab.key === tabName)
+            .tableColumns.filter(
+              ({ key, isSummary }) => isSummary && key === column.property
+            );
+
+          // 合计
+          // if (!values.every(value => isNaN(value))) {
+          if (sumColumn.length) {
+            means[columnIndex] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
               } else {
-                  means[columnIndex] = '';
+                return prev;
               }
-            }
-      })
+            }, 0);
+            means[columnIndex] = means[columnIndex].toFixed(2);
+          } else {
+            means[columnIndex] = "";
+          }
+        }
+      });
       // sums[index] = sums[index] && sums[index].toFixed(2); // 保留2位小数,解决小数合计列
-      return [means]
-			
-    }
-  },
-  created() { 
-
+      return [means];
+    },
   },
-  mounted() { },
-  destroyed() { },
+  created() {},
+  mounted() {},
+  destroyed() {},
 };
 </script>
 <template>
-  <el-drawer 
-    direction="btt" 
-    size="100%" 
-    :with-header="false" 
-    :visible.sync="visible" 
+  <el-drawer
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
     @open="beforeOpen"
     @close="$emit('close')"
     v-loading="loading"
   >
-    <el-form 
-      size="mini" 
-      label-position="right" 
-      label-width="140px" 
-      :model="params" 
+    <el-form
+      size="mini"
+      label-position="right"
+      label-width="140px"
+      :model="params"
       :rules="rules"
       ref="orderSeeForm"
-      class="orderSeeForm" 
+      class="orderSeeForm"
     >
-        
-      <el-card :body-style="{
-        padding: '20px',
-        display: 'flex',
-        'flex-wrap': 'wrap',
-      }" style="margin: 10px">
-        <div slot="header" style="
+      <el-card
+        :body-style="{
+          padding: '20px',
+          display: 'flex',
+          'flex-wrap': 'wrap',
+        }"
+        style="margin: 10px"
+      >
+        <div
+          slot="header"
+          style="
             display: flex;
             justify-content: space-between;
             align-items: center;
-          ">
+          "
+        >
           <h3>查看</h3>
           <div style="text-align: right">
             <!-- <FilePrint :id="params.id"></FilePrint> -->
@@ -243,139 +240,162 @@ export default {
                 :content="params.deliveryMsg"
                 placement="bottom-end"
               >
-                <el-button 
+                <el-button
                   :key="params.deliveryStatus"
-                  :disabled="params.deliveryStatus === '1' "
-                  size="mini" 
+                  :disabled="params.deliveryStatus === '1'"
+                  size="mini"
                   type="primary"
                   @click="handleSendNC"
-                >{{  params.deliveryStatus === '1' ? '发送中' :
-                    (params.deliveryStatus === '2'? '重新发送NC' : '发送NC')
-                }}</el-button>
+                  >{{
+                    params.deliveryStatus === "1"
+                      ? "发送中"
+                      : params.deliveryStatus === "2"
+                      ? "重新发送NC"
+                      : "发送NC"
+                  }}</el-button
+                >
               </el-tooltip>
             </template>
-            
+
             <el-button size="mini" @click="handleCancel">取 消</el-button>
           </div>
         </div>
-        <el-row style="display:flex; flex-wrap: wrap;">
-          <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 6">
+        <el-row style="display: flex; flex-wrap: wrap">
+          <el-col
+            v-for="(column, index) in columns"
+            :key="index"
+            :span="column.span || 6"
+          >
             <el-form-item :prop="column.key" :label="column.title">
-
-              <el-input v-if="column.inputType === 'Input'" 
-                v-model="params[column.key]" 
+              <el-input
+                v-if="column.inputType === 'Input'"
+                v-model="params[column.key]"
                 :placeholder="column.placeholder"
-                :clearable="column.clearable" 
-                readonly 
+                :clearable="column.clearable"
+                readonly
                 style="width: 100%"
               ></el-input>
-              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" 
-                v-model="params[column.key]" 
+              <dr-popover-select
+                v-if="column.inputType === 'PopoverSelect'"
+                v-model="params[column.key]"
                 disabled
-                :value-key="column.valueKey" 
-                :source.sync="params" 
-                :title="column.title" 
+                :value-key="column.valueKey"
+                :source.sync="params"
+                :title="column.title"
                 :type="column.referName"
-                :multiple="column.multiple" 
-                :placeholder="column.placeholder" 
+                :multiple="column.multiple"
+                :placeholder="column.placeholder"
                 :data-mapping="column.dataMapping"
                 :query-params="column.queryParams"
               ></dr-popover-select>
 
-              <el-input v-if="column.inputType === 'Textarea'" 
-                v-model="params[column.key]" 
+              <el-input
+                v-if="column.inputType === 'Textarea'"
+                v-model="params[column.key]"
                 type="textarea"
-                :placeholder="column.placeholder" 
-                :clearable="column.clearable" 
-                readonly 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                readonly
                 style="width: 100%"
               ></el-input>
 
-              <el-input-number v-if="column.inputType === 'InputNumber'" 
+              <el-input-number
+                v-if="column.inputType === 'InputNumber'"
                 v-model="params[column.key]"
-                :controls-position="column.controlsPosition" 
+                :controls-position="column.controlsPosition"
                 :placeholder="column.placeholder"
-                :clearable="column.clearable" 
+                :clearable="column.clearable"
                 :precision="column.precision"
-                disabled 
+                disabled
                 style="width: 100%"
               ></el-input-number>
-              <el-select v-if="column.inputType === 'Select'" 
-                v-model="params[column.key]" 
-                disabled 
+              <el-select
+                v-if="column.inputType === 'Select'"
+                v-model="params[column.key]"
+                disabled
                 size="mini"
-                :clearable="column.clearable" 
-                :placeholder="column.placeholder" 
-                style="width: 100%">
-                <el-option 
-                  v-for="item in dict.type[column.referName]" 
-                  :key="item.value" 
+                :clearable="column.clearable"
+                :placeholder="column.placeholder"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in dict.type[column.referName]"
+                  :key="item.value"
                   :label="item.label"
                   :value="item.value"
                 >
                 </el-option>
               </el-select>
-              <el-select v-if="column.inputType === 'TagSelect'" 
-                v-model="params[column.key]" 
-                multiple 
+              <el-select
+                v-if="column.inputType === 'TagSelect'"
+                v-model="params[column.key]"
+                multiple
                 clearable
-                collapse-tags 
-                :placeholder="column.placeholder" 
-                :clearable="column.clearable" 
+                collapse-tags
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
                 disabled
-                style="width: 100%">
+                style="width: 100%"
+              >
                 <template #prefix>
-                  <el-icon class="el-icon-view" 
-                    style="cursor: pointer" 
-                    @click.stop="$message.info(234)">
+                  <el-icon
+                    class="el-icon-view"
+                    style="cursor: pointer"
+                    @click.stop="$message.info(234)"
+                  >
                   </el-icon>
                 </template>
-                <el-option 
-                  v-for="item in options" 
-                  :key="item.value" 
-                  :label="item.label" 
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
                   :value="item.value"
                 >
                 </el-option>
               </el-select>
-              <el-date-picker v-if="column.inputType === 'DatePicker'" 
-                v-model="params[column.key]" 
+              <el-date-picker
+                v-if="column.inputType === 'DatePicker'"
+                v-model="params[column.key]"
                 :type="column.type"
-                :placeholder="column.placeholder" 
-                :clearable="column.clearable" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
                 readonly
-                :picker-options="column.pickerOptions" 
+                :picker-options="column.pickerOptions"
                 style="width: 100%"
               ></el-date-picker>
-              <el-checkbox v-if="column.inputType === 'Checkbox'" 
-                v-model="params[column.key]" 
-                disabled 
+              <el-checkbox
+                v-if="column.inputType === 'Checkbox'"
+                v-model="params[column.key]"
+                disabled
                 true-label="Y"
                 false-label="N"
               ></el-checkbox>
-              <file-upload-center v-if="column.inputType === 'Upload'" 
+              <file-upload-center
+                v-if="column.inputType === 'Upload'"
                 v-model="params[column.key]"
-                :file-type="column.fileType" 
+                :file-type="column.fileType"
                 :disabled="true"
               ></file-upload-center>
             </el-form-item>
           </el-col>
         </el-row>
       </el-card>
-      <el-card :body-style="{
-        padding: '20px',
-        display: 'flex',
-        'flex-wrap': 'wrap',
-        position: 'relative',
-      }" style="margin: 10px">
+      <el-card
+        :body-style="{
+          padding: '20px',
+          display: 'flex',
+          'flex-wrap': 'wrap',
+          position: 'relative',
+        }"
+        style="margin: 10px"
+      >
         <el-tabs v-model="tabName" style="width: 100%">
-          <el-tab-pane 
-            v-for="(column, index) in tabColumns" 
-            :key="index" 
-            :label="column.title" 
+          <el-tab-pane
+            v-for="(column, index) in tabColumns"
+            :key="index"
+            :label="column.title"
             :name="column.key"
           >
-
             <!-- <virtual-scroll 
               :data="params[column.key].filter(item => item.delFlag === '0')" 
               :item-size="53" 
@@ -384,119 +404,134 @@ export default {
               :virtualized="true"
             >
               <template slot-scope="{ headerCellFixedStyle, cellFixedStyle }"> -->
-                <ux-grid 
-                  border
-                  use-virtual
-                  show-summary
-                  show-overflow
-                  keep-source
-                  :ref="column.key"
-                  :height="tabHeight"
-                  style="width: 100%"
-                  :data="params[column.key].filter(item => item.delFlag === '0')" 
-                  :summary-method="getSummaries"
-                >
-                
-                  <ux-table-column title="序号" type="index" width="60"></ux-table-column>
-                  <ux-table-column 
-                    v-for="(cColumn, cIndex) in column.tableColumns" 
-                    :key="cIndex" 
-                    :field="cColumn.key"
-                    :title="cColumn.title" 
-                    :width="cColumn.width || 80"
-                    resizable
-                  >
-                    <template slot="header" slot-scope="scope">
-                      <span v-if="cColumn.require" style="color: #ff4949">*</span>
-                      <span>
-                        {{ cColumn.title }}
-                      </span>
-                    </template>
-                    <template slot-scope="scope">
-                      <el-form-item  label-width="0">
-                        <span v-if="!cColumn.inputType">
-                          {{ scope.row[cColumn.key] }}
-                        </span>
-                        
-                        <el-input v-if="cColumn.inputType === 'Input'" 
-                          v-model="scope.row[cColumn.key]"
-                          :placeholder="cColumn.placeholder" 
-                          :clearable="cColumn.clearable" 
-                          readonly 
-                          size="mini"
-                          style="width: 100%"
-                        ></el-input>
-
-                        <!--  -->
-                        <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'"
-                          v-model="scope.row[cColumn.key]"
-                          :source.sync="scope.row" 
-                          :title="cColumn.title" 
-                          :value-key="cColumn.valueKey" 
-                          disabled
-                          :type="cColumn.referName" 
-                          :multiple="cColumn.multiple" 
-                          :placeholder="cColumn.placeholder"
-                          :data-mapping="cColumn.dataMapping" 
-                          :query-params="cColumn.queryParams" 
-                          size="mini" 
-                        ></dr-popover-select>
-
-                        <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
-                          v-model="scope.row[cColumn.key]"
-                          :precision="cColumn.precision"
-                          :controls-position="cColumn.controlsPosition" 
-                          :placeholder="cColumn.placeholder"
-                          :clearable="cColumn.clearable" 
-                          disabled 
-                          size="mini" 
-                          style="width: 100%"
-                        ></el-input-number>
-
-                        <el-select v-if="cColumn.inputType === 'Select'" 
-                          v-model="scope.row[cColumn.key]" 
-                          disabled 
-                          size="mini"
-                          :clearable="cColumn.clearable" 
-                          :placeholder="cColumn.placeholder" 
-                          style="width: 100%">
-                          <el-option 
-                            v-for="item in dict.type[cColumn.referName]" 
-                            :key="item.value" 
-                            :label="item.label"
-                            :value="item.value"
-                          ></el-option>
-                        </el-select>
-
-                        <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
-                          v-model="scope.row[cColumn.key]" 
-                          disabled
-                          true-label="Y" 
-                          false-label="N"
-                        ></el-checkbox>
-
-
-                      </el-form-item>
-                      
-                    </template>
-                  </ux-table-column>
-                </ux-grid>
-              <!-- </template>
+            <ux-grid
+              border
+              use-virtual
+              keep-source
+              show-summary
+              show-overflow
+              beautify-table
+              :size="'mini'"
+              :ref="column.key"
+              :height="tabHeight"
+              style="width: 100%"
+              :data="params[column.key].filter((item) => item.delFlag === '0')"
+              :summary-method="getSummaries"
+              :header-row-style="{
+                color: '#515a6e',
+              }"
+            >
+              <ux-table-column
+                title="序号"
+                type="index"
+                width="60"
+              ></ux-table-column>
+              <ux-table-column
+                v-for="(cColumn, cIndex) in column.tableColumns"
+                :key="cIndex"
+                :field="cColumn.key"
+                :title="cColumn.title"
+                :width="cColumn.width || 80"
+                resizable
+              >
+                <template slot="header" slot-scope="scope">
+                  <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                  <span>
+                    {{ cColumn.title }}
+                  </span>
+                </template>
+                <template slot-scope="scope">
+                  <el-form-item label-width="0">
+                    <span v-if="!cColumn.inputType">
+                      {{ scope.row[cColumn.key] }}
+                    </span>
+
+                    <el-input
+                      v-if="cColumn.inputType === 'Input'"
+                      v-model="scope.row[cColumn.key]"
+                      :placeholder="cColumn.placeholder"
+                      :clearable="cColumn.clearable"
+                      readonly
+                      size="mini"
+                      style="width: 100%"
+                    ></el-input>
+
+                    <!--  -->
+                    <dr-popover-select
+                      v-if="cColumn.inputType === 'PopoverSelect'"
+                      v-model="scope.row[cColumn.key]"
+                      :source.sync="scope.row"
+                      :title="cColumn.title"
+                      :value-key="cColumn.valueKey"
+                      disabled
+                      :type="cColumn.referName"
+                      :multiple="cColumn.multiple"
+                      :placeholder="cColumn.placeholder"
+                      :data-mapping="cColumn.dataMapping"
+                      :query-params="cColumn.queryParams"
+                      size="mini"
+                    ></dr-popover-select>
+
+                    <el-input-number
+                      v-if="cColumn.inputType === 'InputNumber'"
+                      v-model="scope.row[cColumn.key]"
+                      :precision="cColumn.precision"
+                      :controls-position="cColumn.controlsPosition"
+                      :placeholder="cColumn.placeholder"
+                      :clearable="cColumn.clearable"
+                      disabled
+                      size="mini"
+                      style="width: 100%"
+                    ></el-input-number>
+
+                    <el-select
+                      v-if="cColumn.inputType === 'Select'"
+                      v-model="scope.row[cColumn.key]"
+                      disabled
+                      size="mini"
+                      :clearable="cColumn.clearable"
+                      :placeholder="cColumn.placeholder"
+                      style="width: 100%"
+                    >
+                      <el-option
+                        v-for="item in dict.type[cColumn.referName]"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      ></el-option>
+                    </el-select>
+
+                    <el-checkbox
+                      v-if="cColumn.inputType === 'Checkbox'"
+                      v-model="scope.row[cColumn.key]"
+                      disabled
+                      true-label="Y"
+                      false-label="N"
+                    ></el-checkbox>
+                  </el-form-item>
+                </template>
+              </ux-table-column>
+            </ux-grid>
+            <!-- </template>
           </virtual-scroll> -->
-            
           </el-tab-pane>
         </el-tabs>
       </el-card>
-
     </el-form>
   </el-drawer>
 </template>
 
 <style scoped>
-  .orderSeeForm>>>.el-form-item{
-    margin-bottom: 12px;
-  }
-::v-deep .singleTable .el-form-item{
+.orderSeeForm >>> .el-form-item {
+  margin-bottom: 12px;
+}
+::v-deep .singleTable .el-form-item {
   margin-bottom: 0px;
 }
+::v-deep.uxbeautifyTableClass
+  .elx-header--column
+  .elx-resizable.is--line:before {
+  height: 100%;
+  background-color: #dfe6ec;
+}
 </style>

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

+ 18 - 9
src/views/purchase/task/index.vue

@@ -13,7 +13,9 @@ 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"),
   },
   data() {
@@ -36,8 +38,8 @@ export default {
   created() {
     this.params = {
       ...this.params,
-      statusList:['0','2','3']
-    }
+      statusList: ["0", "2", "3"],
+    };
     this.useQuery(this.params, this.page);
   },
   methods: {
@@ -155,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"
@@ -171,21 +179,22 @@ export default {
         ></dc-button>
       </el-button-group> -->
     </div>
-    <el-super-table
+    <el-super-ux-table
       v-model="tableData"
-      :size="size"
-      :dict="dict"
-      :page="page"
-      :columns="TableColumns"
       index
       checkbox
       pagination
-      convenitentOperation
       showSummary
+      :size="size"
+      :dict="dict"
+      :page="page"
+      convenitentOperation
+      :columns="TableColumns"
+      storage-key="PuchaseTaskSuperTable"
       @row-select="useSelect"
       @pagination="useQuery(params, page)"
     >
-    </el-super-table>
+    </el-super-ux-table>
   </el-card>
 </template>
 <style scoped lang="scss">

+ 91 - 113
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -1,5 +1,5 @@
 <script>
-import { TableColumns ,BasicColumns} from "./column";
+import { TableColumns, BasicColumns } from "./column";
 import { initDicts } from "@/utils/init.js";
 import { FIRSTDIRECT, ADD } from "@/api/business/purchase/task";
 export default {
@@ -14,6 +14,7 @@ export default {
   components: {
     ElSuperTable: () => import("@/components/super-table/index.vue"),
     ElDictTag: () => import("@/components/DictTag/index.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     ElComputedInputV2: () => import("@/components/computed-input-v2/index.vue"),
   },
   data() {
@@ -24,11 +25,11 @@ export default {
       visible: false,
       loading: false,
       tableColumns: TableColumns,
-      basicColumns:BasicColumns,
+      basicColumns: BasicColumns,
       data: [],
-      showData:[],
-      supplier:'',
-      size:'mini',
+      showData: [],
+      supplier: "",
+      size: "mini",
     };
   },
   computed: {
@@ -38,32 +39,29 @@ export default {
       },
       set() {},
     },
-    restaurants:{
-      get(){
+    restaurants: {
+      get() {
         let allSupplier = [];
-        this.data.forEach(item =>{
-
-          let orderPriceVos = item.orderPriceVos.map(order => ({
-            value:order.supplierName,
-            id:order.supplier
-          }))
+        this.data.forEach((item) => {
+          let orderPriceVos = item.orderPriceVos.map((order) => ({
+            value: order.supplierName,
+            id: order.supplier,
+          }));
           allSupplier.push(...orderPriceVos);
-
-        })
-        allSupplier = this.uniqueFunc(allSupplier,'id');
-        console.log(allSupplier,'allSupplier');
+        });
+        allSupplier = this.uniqueFunc(allSupplier, "id");
+        console.log(allSupplier, "allSupplier");
         return allSupplier;
       },
-      set(){},
-    }
-  },
-  watch: {
+      set() {},
+    },
   },
+  watch: {},
   methods: {
     //
     async open(prop) {
       this.visible = await this.fetchItem(prop);
-      this.supplier = '';
+      this.supplier = "";
     },
     //
     hide() {
@@ -80,15 +78,18 @@ export default {
             ...item,
             orderPriceVos: item.orderPriceVos.map((cItem) => ({
               ...item,
-              customerName:'',
-              customer:'',
+              customerName: "",
+              customer: "",
               ...cItem,
-              purchaseQuantity: item.orderPriceVos.length === 1 ? (item.puQty - item.executeQty) : undefined
+              purchaseQuantity:
+                item.orderPriceVos.length === 1
+                  ? item.puQty - item.executeQty
+                  : undefined,
             })),
           }));
 
-          console.log(this.data,'this.data');
-          this.showData =  _.cloneDeep(this.data);
+          console.log(this.data, "this.data");
+          this.showData = _.cloneDeep(this.data);
           return true;
         } else {
           return false;
@@ -111,9 +112,9 @@ export default {
           ),
         }))
         .filter((item) => item.orderPriceVos.length);
-        console.log(params,'params');
-        try {
-          this.loading = true;
+      console.log(params, "params");
+      try {
+        this.loading = true;
         // try
         const { msg, code } = await ADD(params);
         if (code === 200) {
@@ -125,38 +126,34 @@ export default {
         // catch
       } finally {
         // finally
-          this.loading = false;
+        this.loading = false;
       }
     },
-    hide(){
+    hide() {
       this.visible = false;
     },
-    supplierChange(value){
-      console.log(value,'value');
+    supplierChange(value) {
+      console.log(value, "value");
     },
     // 建议值
-    querySearch(queryString, cb){
-
+    querySearch(queryString, cb) {
       let results = this.restaurants;
 
       results = queryString
         ? results.filter(this.createFilter(queryString))
         : results;
 
-    //cb是回调函数,返回筛选出的结果数据到输入框下面的输入列表
+      //cb是回调函数,返回筛选出的结果数据到输入框下面的输入列表
       cb(results);
-
     },
     createFilter(queryString) {
-
       return (item) => {
         return item.value.toUpperCase().match(queryString.toUpperCase());
       };
-
     },
-    
-    handleSelect(prop){
-      console.log(this.data,'handleSelect');
+
+    handleSelect(prop) {
+      console.log(this.data, "handleSelect");
 
       // this.tableColumns = this.tableColumns.map(({ item, attr }) =>{
 
@@ -168,7 +165,7 @@ export default {
       //     item: {...item},
       //     attr: {...attr},
       //   }
-        
+
       // })
 
       // this.$refs.superTable.forEach(item =>{
@@ -189,36 +186,35 @@ export default {
       //   onFilter();
       // })
 
-      this.showData = this.data.map(item => {
+      this.showData = this.data.map((item) => {
         return {
           ...item,
-          orderPriceVos:item.orderPriceVos.filter(order => order.supplier === prop.id),
-        }
-      })
+          orderPriceVos: item.orderPriceVos.filter(
+            (order) => order.supplier === prop.id
+          ),
+        };
+      });
     },
-    handleClear(){
-      this.showData =  _.cloneDeep(this.data);
+    handleClear() {
+      this.showData = _.cloneDeep(this.data);
     },
     // 对象数组去重
-    uniqueFunc(arr, uniId){
+    uniqueFunc(arr, uniId) {
       const res = new Map();
-      return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1));
+      return arr.filter(
+        (item) => !res.has(item[uniId]) && res.set(item[uniId], 1)
+      );
     },
-    changeQuantity(prop,value){
-
-      this.data = this.data.map(item =>{
-
-        if(item.id === prop.id){
-
-          item.orderPriceVos = item.orderPriceVos.map(order =>{
-
-            if(order.id === value.id){
-
+    changeQuantity(prop, value) {
+      this.data = this.data.map((item) => {
+        if (item.id === prop.id) {
+          item.orderPriceVos = item.orderPriceVos.map((order) => {
+            if (order.id === value.id) {
               return value;
             }
 
             return order;
-          })
+          });
 
           // item.orderPriceVos.forEach(order =>{
 
@@ -233,50 +229,39 @@ export default {
           // })
         }
         return item;
-      })
+      });
 
+      // 实时统计
+      this.$refs.superTable[0].updateFooter();
     },
-    changeDatePlan(prop,value){
-
-      this.data = this.data.map(item =>{
-
-        if(item.id === prop.id){
-
-          item.orderPriceVos = item.orderPriceVos.map(order =>{
-
-            if(order.id === value.id){
-
+    changeDatePlan(prop, value) {
+      this.data = this.data.map((item) => {
+        if (item.id === prop.id) {
+          item.orderPriceVos = item.orderPriceVos.map((order) => {
+            if (order.id === value.id) {
               return value;
             }
 
             return order;
-          })
-
+          });
         }
         return item;
-      })
+      });
     },
-    changeNote(prop,value){
-
-      this.data = this.data.map(item =>{
-
-        if(item.id === prop.id){
-
-          item.orderPriceVos = item.orderPriceVos.map(order =>{
-
-            if(order.id === value.id){
-
+    changeNote(prop, value) {
+      this.data = this.data.map((item) => {
+        if (item.id === prop.id) {
+          item.orderPriceVos = item.orderPriceVos.map((order) => {
+            if (order.id === value.id) {
               return value;
             }
 
             return order;
-          })
-
+          });
         }
         return item;
-      })
+      });
     },
-
   },
   created() {},
   mounted() {},
@@ -313,16 +298,12 @@ export default {
           v-loading="loading"
           >确 认</el-button
         >
-        <el-button
-          :size="$attrs.size"
-          @click="hide"
-          v-loading="loading"
+        <el-button :size="$attrs.size" @click="hide" v-loading="loading"
           >取 消</el-button
         >
-        
       </template>
 
-      <el-row style="padding: 0 16px;">
+      <el-row style="padding: 0 16px">
         <el-col>
           <el-autocomplete
             class="inline-input"
@@ -337,12 +318,10 @@ export default {
         </el-col>
       </el-row>
 
-
       <div v-for="(item, index) in showData" :key="index" class="m-4">
-
         <template v-if="item.orderPriceVos.length">
           <el-descriptions :column="4">
-            <template slot="title" >
+            <template slot="title">
               <template>
                 <span style="margin-right: 10px">{{ item.materialName }}</span>
                 <span style="color: tomato">{{ item.puQty }}</span>
@@ -352,28 +331,28 @@ export default {
                 >) <span> {{ item.puUnitName }}</span>
               </template>
             </template>
-  
-            <el-descriptions-item 
-              v-for="(basic,bIndex) in basicColumns"
+
+            <el-descriptions-item
+              v-for="(basic, bIndex) in basicColumns"
               :key="bIndex"
               :label="basic.item.title"
-            >{{ item[basic.item.key] }}
+              >{{ item[basic.item.key] }}
             </el-descriptions-item>
-            <el-descriptions-item 
-              label="需求数量"
-            >{{ item.puQty - (item.executeQty || 0) }}
+            <el-descriptions-item label="需求数量"
+              >{{ item.puQty - (item.executeQty || 0) }}
             </el-descriptions-item>
-            
           </el-descriptions>
-          
-          <el-super-table
+
+          <el-super-ux-table
             v-if="visible"
             ref="superTable"
             v-model="item.orderPriceVos"
+            height="auto"
             :columns="tableColumns"
             :size="$attrs.size"
             :dict="dict"
             showSummary
+            firstSummary
           >
             <!-- showSummary -->
             <template slot="purchaseQuantity" slot-scope="scope">
@@ -382,7 +361,7 @@ export default {
                 v-model="scope.row[scope.item.key]"
                 :size="$attrs.size"
                 :max="scope.attr.max(scope.row)"
-                @change="changeQuantity(item,scope.row)"
+                @change="changeQuantity(item, scope.row)"
               >
               </component>
             </template>
@@ -404,9 +383,8 @@ export default {
               >
               </component>
             </template>
-          </el-super-table>
+          </el-super-ux-table>
         </template>
-        
       </div>
     </el-drawer>
   </el-button>

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

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff