فهرست منبع

工作台概述

黄梓星 1 سال پیش
والد
کامیت
e8fd2aa37d
1فایلهای تغییر یافته به همراه129 افزوده شده و 7 حذف شده
  1. 129 7
      src/views/purchase/workSpace/index.vue

+ 129 - 7
src/views/purchase/workSpace/index.vue

@@ -50,7 +50,7 @@
         @row-dblclick="doubleClick"
         ref="tables"
       >
-        <el-table-column type="selection" width="55" />
+        <!-- <el-table-column type="selection" width="55" /> -->
         <el-table-column label="序号" type="index" align="center" width="50px"/>
         <el-table-column show-overflow-tooltip label="标题" align="center" prop="docSubject"/>
         <el-table-column show-overflow-tooltip label="创建人" align="center" prop="docCreate"/>
@@ -94,7 +94,13 @@
           style="font-size: 12px;"
         >
           <el-table-column label="序号" type="index" align="center" width="50px"/>
-          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode"/>
+            <el-table-column v-for="(col,index) in cols" :key="index"
+              :prop="col.prop"
+              :label="col.label"
+              :formatter="col.formatter"
+            >
+            </el-table-column>
+          <!-- <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode"/>
           <el-table-column show-overflow-tooltip label="物料名称" align="center" prop="materialName"/>
           <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
           <el-table-column show-overflow-tooltip label="型号" align="center" prop="model"/>
@@ -104,7 +110,7 @@
           <el-table-column show-overflow-tooltip label="调出货位" align="center" prop="deliveryAllocationName"/>
           <el-table-column show-overflow-tooltip label="数量" align="center" prop="qty"/>
           <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName"/>
-          <el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName"/>
+          <el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName"/> -->
         </el-table>
 
         <el-pagination
@@ -149,7 +155,20 @@ export default {
       checkRow: {
         billCode: '',
         type: ''
-      }
+      },
+      cols: [
+        {label: '物料编码',  prop: 'materialCode'},
+        {label: '物料名称',  prop: 'materialName'},
+        {label: '规格',  prop: 'specification'},
+        {label: '型号',  prop: 'model'},
+        {label: '单位',  prop: 'unitName'},
+        {label: '生产厂家/代理人',  prop: 'manufacturerName'},
+        {label: '调出仓库',  prop: 'deliveryWarehouseName'},
+        {label: '调出货位',  prop: 'deliveryAllocationName'},
+        {label: '数量',  prop: 'qty'},
+        {label: '调入仓库',  prop: 'storageWarehouseName'},
+        {label: '调入货位',  prop: 'storageAllocationName'},
+      ]
     }
   },
   created() {
@@ -185,13 +204,112 @@ export default {
       this.ids = selection
       // console.log('选中数组', this.ids.join())
     },
-    rowSelect(row) {
-      this.$refs.tables.toggleRowSelection(row);
-    },
     doubleClick(row) {
+      // this.$refs.tables.toggleRowSelection(row);
+      this.rowSelect(row)
+    },
+    rowSelect(row) {
       // this.check(row)
       // 选择行存储便于子表分页
       this.checkRow = row
+      // 采购需求单
+      if(row.type == 'PU_DEMAND_RULE') {
+        this.cols = [
+          {label: '物料编码',  prop: 'materialCode'},
+          {label: '物料名称',  prop: 'materialName'},
+          {label: '规格',  prop: 'specification'},
+          {label: '型号',  prop: 'model'},
+          {label: '单位',  prop: 'unitName'},
+          {label: '生产厂家/代理人',  prop: 'manufacturerName'},
+          {label: '实际(业务)需求量',  prop: 'qty'},
+          {label: '月均销量',  prop: 'averageQtyMonth'},
+          {label: '需求可用周期',  prop: 'demandPeriod'},
+          {label: '业务备注',  prop: 'remark'},
+          {label: '紧急标识',  prop: 'isUrgency',
+            formatter: function(row, column, cellValue, index) {
+              return row.isUrgency == 'Y' ? '是' : '否'
+            }
+          },
+          {label: '补单标识',  prop: 'isReplenishment',
+            formatter: function(row, column, cellValue, index) {
+              return row.isReplenishment == 'Y' ? '是' : '否'
+            }
+          },
+        ]
+        // 调拨订单
+      } else if (row.type == 'ALLOT_RULE') {
+        this.cols = [
+          {label: '物料编码',  prop: 'materialCode'},
+          {label: '物料名称',  prop: 'materialName'},
+          {label: '规格',  prop: 'specification'},
+          {label: '型号',  prop: 'model'},
+          {label: '单位',  prop: 'unitName'},
+          {label: '生产厂家/代理人',  prop: 'manufacturerName'},
+          {label: '调出仓库',  prop: 'deliveryWarehouseName'},
+          {label: '调出货位',  prop: 'deliveryAllocationName'},
+          {label: '数量',  prop: 'qty'},
+          {label: '调入仓库',  prop: 'storageWarehouseName'},
+          {label: '调入货位',  prop: 'storageAllocationName'},
+        ]
+        // 物料申请单
+      } else if (row.type == 'MATERIAL_APPLY_RULE') {
+        this.cols = [
+          {label: '物料一级分类',  prop: 'classOneName'},
+          {label: '物料基本分类',  prop: 'classifyName'},
+          {label: '物料名称',  prop: 'materialName'},
+          {label: '型号',  prop: 'model'},
+          {label: '规格',  prop: 'specification'},
+          {label: '生产厂家/代理人',  prop: 'manufacturerName'},
+          {label: '注册证号',  prop: 'registrationNo'},
+          {label: '注册人',  prop: 'registrant'},
+          {label: '存储条件',  prop: 'storageCondition'},
+          {label: '运输条件',  prop: 'transportationCondition'},
+          {label: '是否医药物料',  prop: 'isMedicine',
+            formatter: function(row, column, cellValue, index) {
+              return row.isMedicine == '0' ? '是' : '否'
+            }
+          },
+          {label: '是否药品',  prop: 'isDrug',
+            formatter: function(row, column, cellValue, index) {
+              return row.isDrug == '0' ? '是' : '否'
+            }
+          },
+        ]
+        // 价格申报单
+      } else if (row.type == 'PU_PRICE_APPLY_RULE') {
+        this.cols = [
+          {label: '物料编码',  prop: 'materialCode'},
+          {label: '物料名称',  prop: 'materialName'},
+          {label: '型号',  prop: 'model'},
+          {label: '规格',  prop: 'specification'},
+          {label: '生产厂家/代理人',  prop: 'manufacturerName'},
+          {label: '含税单价',  prop: 'taxPrice'},
+          {label: '最近价格',  prop: 'recentlyPrice'},
+          {label: '单价差',  prop: 'priceDiffer'},
+          {label: '客户',  prop: 'customerName'},
+          {label: '供应商名称1',  prop: 'supplierName1'},
+          {label: '单价1',  prop: 'unitPrice1'},
+        ]
+        // 采购订单
+      } else if (row.type == 'PU_ORDER_RULE') {
+        this.cols = [
+          {label: '收货客户',  prop: 'customerName'},
+          {label: '物料编码',  prop: 'materialCode'},
+          {label: '物料名称',  prop: 'materialName'},
+          {label: '生产厂家',  prop: 'manufacturerName'},
+          {label: '医药物料',  prop: 'isMedcine'},
+          {label: '数量',  prop: 'qty'},
+          {label: '含税单价',  prop: 'taxPrice'},
+          {label: '价税合计',  prop: 'money'},
+          {label: '赠品',  prop: 'isGift',
+            formatter: function(row, column, cellValue, index) {
+              return row.isGift == 'Y' ? '是' : '否'
+            }        
+          },
+          {label: '折扣%',  prop: 'nitemdiscountrate'},
+          {label: '价格类型',  prop: 'priceType'},
+        ]
+      }
       this.getDetailList(this.checkRow)
     },
     audits() {
@@ -248,6 +366,7 @@ export default {
     },
     // 获取单据概述列表
     getDetailList (row) {
+      this.$modal.loading("加载中...");
       let param = {
         billCode: row.billCode,
         type: row.type,
@@ -257,7 +376,10 @@ export default {
         if(res.code === 200) {
           this.sonTableList = res.rows
           this.sonTotal = res.total
+          this.$modal.closeLoading();
         }
+      }).catch(err => {
+        this.$modal.closeLoading();
       })
     },
   }