Browse Source

采购订单维护:
1.去掉执行结果页签
2.列表表头与表体根据集采中心和事业发展部模板区分渲染

002390 1 year ago
parent
commit
937db15d85

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

+ 35 - 30
src/views/purchase/purchase-order/add/index.vue

@@ -57,7 +57,8 @@ export default {
       params: {
         ...initParams(NewColumns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // 执行结果
+        // puOrderExecuteList: [],
       },
       tabColumns: NewTabColumns,
       tabName: "puOrderItemList",
@@ -91,26 +92,28 @@ export default {
     },
   },
   watch: {
-    "params.puOrderItemList": {
-      handler(nVal, oVal) {
-        this.visible &&
-          this.handleSynchronousMaterial(
-            "puOrderItemList",
-            "puOrderExecuteList"
-          );
-      },
-      deep: true,
-    },
-    "params.puOrderExecuteList": {
-      handler(nVal, oVal) {
-        this.visible &&
-          this.handleSynchronousMaterial(
-            "puOrderExecuteList",
-            "puOrderItemList"
-          );
-      },
-      deep: true,
-    },
+    // 同步物料信息与执行结果
+    // "params.puOrderItemList": {
+    //   handler(nVal, oVal) {
+    //     this.visible &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderItemList",
+    //         "puOrderExecuteList"
+    //       );
+    //   },
+    //   deep: true,
+    // },
+    // 执行结果监听
+    // "params.puOrderExecuteList": {
+    //   handler(nVal, oVal) {
+    //     this.visible &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderExecuteList",
+    //         "puOrderItemList"
+    //       );
+    //   },
+    //   deep: true,
+    // },
     "params.billType": {
       handler(nVal, oVal) {
         // let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
@@ -209,7 +212,8 @@ export default {
 
           for (const key in this.params) {
             // if (Array.isArray(this.params[key])) {
-            if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+            // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+            if (key === "puOrderItemList") {
               this.params[key].forEach((v) => {
                 v.id = "";
                 v.demandCode = "";
@@ -234,7 +238,8 @@ export default {
     addTableRow(prop) {
       for (const key in this.params) {
         // if (Array.isArray(this.params[key])) {
-        if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        if (key === "puOrderItemList") {
           const arr = this.tabColumns.find(
             (element) => element.key === key
           ).tableColumns;
@@ -344,7 +349,7 @@ export default {
       this.params = {
         ...initParams(this.columns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       };
       this.setVisible(false);
     },
@@ -353,8 +358,8 @@ export default {
       this.$refs["orderAddForm"].validate(async (valid) => {
         if (valid) {
           if (
-            !this.params["puOrderItemList"].length ||
-            !this.params["puOrderExecuteList"].length
+            !this.params["puOrderItemList"].length
+            // || !this.params["puOrderExecuteList"].length
           ) {
             this.$notify.error({
               title: "错误",
@@ -590,7 +595,7 @@ export default {
         this.handleGetPrice();
       }
       this.$refs.puOrderItemList[0].updateFooter();
-      this.$refs.puOrderExecuteList[0].updateFooter();
+      // this.$refs.puOrderExecuteList[0].updateFooter();
 
       // if(this.role === 'syfz-purchaseorder' && row.material && (type == "qty" ||type === "taxPrice" )){
 
@@ -638,7 +643,7 @@ export default {
 
         let tabList = {
           puOrderItemList: [...this.params.puOrderItemList],
-          puOrderExecuteList: [...this.params.puOrderExecuteList],
+          // puOrderExecuteList: [...this.params.puOrderExecuteList],
         };
 
         const blob = new Blob([JSON.stringify(tabList)], {
@@ -757,8 +762,8 @@ export default {
   mounted() {},
   updated() {
     this.$nextTick(() => {
-      this.$refs.puOrderExecuteList &&
-        this.$refs.puOrderExecuteList[0].doLayout();
+      // this.$refs.puOrderExecuteList &&
+      //   this.$refs.puOrderExecuteList[0].doLayout();
       this.$refs.puOrderItemList && this.$refs.puOrderItemList[0].doLayout();
     });
   },

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

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

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

@@ -31,7 +31,7 @@ export default {
       params: {
         ...initParams(editColumns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       },
 
       tabColumns: editTabColumns,
@@ -72,28 +72,28 @@ export default {
       const { id } = this.params;
       // this.fetchTable(id, newProp);
     },
-    "params.puOrderItemList": {
-      handler(nVal, oVal) {
-        this.params.source == 3 &&
-          this.handleSynchronousMaterial(
-            "puOrderItemList",
-            "puOrderExecuteList"
-          );
-      },
-      deep: true,
-      immediate: true,
-    },
-    "params.puOrderExecuteList": {
-      handler(nVal, oVal) {
-        this.params.source == 3 &&
-          this.handleSynchronousMaterial(
-            "puOrderExecuteList",
-            "puOrderItemList"
-          );
-      },
-      deep: true,
-      immediate: true,
-    },
+    // "params.puOrderItemList": {
+    //   handler(nVal, oVal) {
+    //     this.params.source == 3 &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderItemList",
+    //         "puOrderExecuteList"
+    //       );
+    //   },
+    //   deep: true,
+    //   immediate: true,
+    // },
+    // "params.puOrderExecuteList": {
+    //   handler(nVal, oVal) {
+    //     this.params.source == 3 &&
+    //       this.handleSynchronousMaterial(
+    //         "puOrderExecuteList",
+    //         "puOrderItemList"
+    //       );
+    //   },
+    //   deep: true,
+    //   immediate: true,
+    // },
     "params.billType": {
       handler(nVal, oVal) {
         // let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
@@ -186,8 +186,8 @@ export default {
     // 新增行
     addTableRow(prop) {
       for (const key in this.params) {
-        // if (Array.isArray(this.params[key])) {
-        if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+        if (key === "puOrderItemList") {
           const arr = this.tabColumns.find(
             (element) => element["key"] === key
           ).tableColumns;
@@ -243,15 +243,12 @@ export default {
         });
       } else {
         for (const key in this.params) {
-          if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          if (key === "puOrderItemList") {
             this.params[key].forEach((item, index) => {
+              
               let flag = key === "puOrderItemList" ? "rowNo" : "rowno";
 
-              // if(item.id && item.id === row.id){
-              //   console.log('删除已有ID的');
-              //   item['delFlag'] = '2';
-              // }
-
               if (item[flag] && item[flag] === row[delNo]) {
                 item.id
                   ? (item["delFlag"] = "2")
@@ -273,7 +270,7 @@ export default {
       this.params = {
         ...initParams(this.columns),
         puOrderItemList: [],
-        puOrderExecuteList: [],
+        // puOrderExecuteList: [],
       };
       this.setVisible(false);
     },
@@ -417,8 +414,8 @@ export default {
       // 组织
       if (type === "ORG_PARAM") {
         for (const key in this.params) {
-          // if (Array.isArray(this.params[key])) {
-          if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          // if (key === "puOrderItemList" || key === "puOrderExecuteList") {
+          if (key === "puOrderItemList" ) {
             this.params[key] = [];
           } else if (key === "sysFileRecordList") {
             this.params[key] = [];
@@ -535,7 +532,7 @@ export default {
         }
 
         this.$refs.puOrderItemList[0].updateFooter();
-        this.$refs.puOrderExecuteList[0].updateFooter();
+        // this.$refs.puOrderExecuteList[0].updateFooter();
       }
 
       // // 物料数量变化----询价
@@ -622,7 +619,7 @@ export default {
 
         let tabList = {
           puOrderItemList: [...this.params.puOrderItemList],
-          puOrderExecuteList: [...this.params.puOrderExecuteList],
+          // puOrderExecuteList: [...this.params.puOrderExecuteList],
         };
 
         const blob = new Blob([JSON.stringify(tabList)], {
@@ -734,8 +731,8 @@ export default {
   mounted() {},
   updated() {
     this.$nextTick(() => {
-      this.$refs.puOrderExecuteList &&
-        this.$refs.puOrderExecuteList[0].doLayout();
+      // this.$refs.puOrderExecuteList &&
+      //   this.$refs.puOrderExecuteList[0].doLayout();
       this.$refs.puOrderItemList && this.$refs.puOrderItemList[0].doLayout();
     });
   },

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

@@ -793,6 +793,7 @@ export default {
       @pagination="fetchList(params, page)"
       @selection-change="handleSelectionChange"
     >
+      
       <ux-table-column fixed="right" title="操作" width="180">
         <template slot-scope="scope">
           <el-button

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

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