Переглянути джерело

Merge branch 'master' of http://172.16.100.139/new-business/drp-web

黄梓星 2 роки тому
батько
коміт
68de7fc567

+ 66 - 0
src/api/material/basic.js

@@ -101,6 +101,64 @@ const planList = (data) => {
   })
 }
 
+// 获取利润中心信息列表 
+const centerList = (data) => {
+  return request({
+    url: `/system/center/list`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 获取利润中心详细信息 
+const centerDetails = (id) => {
+  return request({
+    url: `/system/center/details/${id}`,
+    method: 'get',
+    params: {}
+  })
+}
+
+// 获取采购信息列表  
+const purchaseList = (data) => {
+  return request({
+    url: `/system/purchase/list`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 获取采购详细信息 
+const purchaseDetails = (id) => {
+  return request({
+    url: `/system/purchase/details/${id}`,
+    method: 'get',
+    params: {}
+  })
+}
+
+// 获取库存信息列表  
+const inventoryList = (data) => {
+  return request({
+    url: `/system/inventory/list`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 获取库存详细信息 
+const inventoryDetails = (id) => {
+  return request({
+    url: `/system/inventory/details/${id}`,
+    method: 'get',
+    params: {}
+  })
+}
+
+
+
+
+
 export default {
   materialList,
   tagList,
@@ -113,4 +171,12 @@ export default {
   unitDetails,
   unitList,
   planList,
+  centerList,
+  centerDetails,
+  purchaseList,
+  purchaseDetails,
+  inventoryList,
+  inventoryDetails,
+
+
 }

+ 31 - 0
src/router/index.js

@@ -93,6 +93,37 @@ export const constantRoutes = [
       }
     ]
   },
+
+
+  // 物料申请单
+  {
+    path: '/material/requisition',
+    component: Layout,
+    hidden: true,
+    // permissions:['system:material:query'],
+    children: [
+      {
+        path: `detail`,
+        component: () => import('@/views/material/requisition/details')
+      }
+
+    ]
+  },
+  // 物料基础信息
+  {
+    path: '/material/basicFile',
+    component: Layout,
+    hidden: true,
+    permissions: ['system:material:query'],
+    children: [
+      {
+        path: `detail/:id`,
+        component: () => import('@/views/material/basicFile/details')
+      }
+
+    ]
+  }
+
 ]
 
 // 动态路由,基于用户权限动态去加载

+ 679 - 0
src/views/material/basicFile/details copy.vue

@@ -0,0 +1,679 @@
+<!-- 物料信息基础档案——详情 -->
+<template>
+  <el-card class="material-details">
+
+    <el-row type="flex" justify="space-between">
+      <el-col :span="6">
+        <el-button size="small" @click="handleBack" :disabled="headerParam.isEdit">返回</el-button>
+      </el-col>
+      <el-col :span="6" style="text-align: right;">
+        <!-- 附件管理 -->
+        <el-button-group>
+          <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button>
+        </el-button-group>
+
+        <!-- 切换 -->
+        <el-button-group>
+          <el-button size="small" icon="el-icon-d-arrow-left" :disabled="headerParam.isEdit"
+            @click="handleChangePage('first')"></el-button>
+          <el-button size="small" icon="el-icon-arrow-left" :disabled="headerParam.isEdit"
+            @click="handleChangePage('pre')"></el-button>
+          <el-button size="small" icon="el-icon-arrow-right" :disabled="headerParam.isEdit"
+            @click="handleChangePage('next')"></el-button>
+          <el-button size="small" icon="el-icon-d-arrow-right" :disabled="headerParam.isEdit"
+            @click="handleChangePage('end')"></el-button>
+        </el-button-group>
+      </el-col>
+    </el-row>
+
+    <div class="md-content">
+      <el-form :inline="true" label-position="right" :model="basicData.value">
+      <!-- <el-form-item label="所属组织">
+          <el-input v-model="basicData.value.orgName":readonly="!headerParam.isEdit" placeholder="所属组织"></el-input>
+                                                                                                                                                                                                                      </el-form-item> -->
+        <el-form-item label="物料编码">
+          <el-input v-model="basicData.value.code" size="small" :readonly="!headerParam.isEdit"
+            placeholder="物料编码"></el-input>
+        </el-form-item>
+        <el-form-item label="物料名称">
+          <el-input v-model="basicData.value.name" size="small" :readonly="!headerParam.isEdit"
+            placeholder="物料名称"></el-input>
+        </el-form-item>
+        <el-form-item label="英文名称">
+          <el-input v-model="basicData.value.enName" size="small" :readonly="!headerParam.isEdit"
+            placeholder="英文名称"></el-input>
+        </el-form-item>
+      <!-- <el-form-item label="版本号">
+          <el-input v-model="basicData.value.version" :readonly="!headerParam.isEdit" placeholder="版本号"></el-input>
+                                                                                                                                                                                                     </el-form-item> -->
+
+      </el-form>
+
+      <dr-tabs :tabList="detailsTabs" :handleTabClick="handleMainTabClick">
+        <template #tabContent>
+
+          <div class="md-basic">
+
+            <!-- 主信息 -->
+            <div class="md-main">
+
+              <!-- 基本信息展示表单 -->
+              <el-form v-if="activeMainTab == 'material'" :inline="true" label-position="right"
+                :hide-required-asterisk="true" :model="basicData.value">
+
+                <el-row :gutter="10">
+                  <el-col :span="8" v-for="f in basicData.form" style="text-align: right;">
+                    <template v-if="f.show">
+
+                      <!-- 多选框 -->
+                      <el-form-item v-if="f.attribute == 'checkbox'">
+                        <el-checkbox :label="f.name" name="type" v-model="basicData.value[f.prop]"
+                          :disabled="!(headerParam.isEdit && f.edit)">
+                        </el-checkbox>
+                      </el-form-item>
+
+                      <!-- 下拉框 -->
+                      <el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
+
+                        <el-select v-model="basicData.value[f.prop]" :placeholder="f.name"
+                          :disabled="!(headerParam.isEdit && f.edit)">
+                          <el-option v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
+                            :value="d.dictValue">
+                          </el-option>
+                        </el-select>
+                      </el-form-item>
+
+                      <el-form-item v-else-if="f.attribute == 'image'" :label="f.name">
+                        <el-image v-if="!(headerParam.isEdit && f.edit)" :src="basicData.value[f.prop]" fit="contain">
+                        </el-image>
+
+                      </el-form-item>
+
+                      <!--attribute 文本 数字 文本域 为null -->
+                      <el-form-item v-else :label="f.name">
+                        <el-input size="small" v-model="basicData.value[f.prop]" :type="f.attribute || 'text'"
+                          :readonly="!(headerParam.isEdit && f.edit)" :placeholder="f.name">
+                        </el-input>
+                      </el-form-item>
+                    </template>
+                  </el-col>
+                </el-row>
+
+              </el-form>
+
+              <!-- 其他展示为列表 -->
+              <el-table v-else :data="mainMsg.value" @cell-dblclick="handledbClick" class="material-table">
+                <!-- <el-table-column type="selection" width="55" /> -->
+                <el-table-column type="index" label="序号" width="55" align="center" />
+                <el-table-column v-for="m in  mainMsg.form" v-if="m.show" :label="m.name" align="center" :prop="m.prop"
+                  show-overflow-tooltip />
+              </el-table>
+
+            </div>
+
+            <!-- 副信息 -->
+            <div class="md-vice">
+
+              <dr-tabs v-if="activeMainTab == 'material'" :tabList="basicMessage" :handleTabClick="handleViceTabClick">
+
+                <template #tabContent>
+
+                  <el-form v-if="activeViceTab == 'material_medcine'" :inline="true" label-position="right"
+                    :hide-required-asterisk="true" :model="medcineData.value" class="md-vice-content">
+
+
+                    <el-row :gutter="10">
+                      <el-col :span="8" v-for="m in medcineData.form" style="text-align: right;">
+
+                        <template v-if="m.show">
+
+                          <!-- 多选框 -->
+                          <el-form-item v-if="m.attribute == 'checkbox'">
+                            <el-checkbox :label="m.name" name="type" v-model="medcineData.value[m.prop]"
+                              :disabled="!(headerParam.isEdit && m.edit)">
+                            </el-checkbox>
+                          </el-form-item>
+
+                          <!-- 下拉框 -->
+                          <el-form-item v-else-if="m.attribute == 'select'" :label="m.name">
+
+                            <el-select v-model="medcineData.value[m.prop]" :placeholder="m.name"
+                              :disabled="!(headerParam.isEdit && m.edit)">
+                              <el-option v-for="d in m.dictValue" :key="d.dictValue" :label="d.dictLabel"
+                                :value="d.dictValue">
+                              </el-option>
+                            </el-select>
+                          </el-form-item>
+
+                          <!-- 图片 -->
+                          <el-form-item v-else-if="m.attribute == 'image'" :label="m.name">
+                            <el-image v-if="!(headerParam.isEdit && m.edit)" :src="medcineData.value[m.prop]"
+                              fit="contain">
+                            </el-image>
+                          </el-form-item>
+
+                          <!-- 文本、数字、textarae -->
+                          <el-form-item v-else :label="m.name">
+                            <el-input size="small" v-model="medcineData.value[m.prop]" :type="m.attribute || 'text'"
+                              :readonly="!(headerParam.isEdit && m.edit)" :placeholder="m.name">
+                            </el-input>
+                          </el-form-item>
+                        </template>
+
+                      </el-col>
+                    </el-row>
+
+
+                  </el-form>
+
+                  <!-- 其他展示为列表 -->
+                  <el-table v-else :data="viceMsg.value" class="material-table">
+                    <el-table-column type="index" label="序号" width="55" align="center" />
+                    <el-table-column v-for="v in  viceMsg.form" v-if="v.show" :label="v.name" align="center"
+                      :prop="v.prop" show-overflow-tooltip />
+                  </el-table>
+                </template>
+              </dr-tabs>
+
+              <!-- 其他展示为列表 -->
+            <!-- <el-table v-else :data="viceMsg.value" class="material-table">
+                 <el-table-column type="selection" width="55" /> 
+                <el-table-column type="index" label="序号" width="55" align="center" />
+                <el-table-column v-for="v in  viceMsg.form" v-if="v.show" :label="v.name" align="center" :prop="v.prop"
+                  show-overflow-tooltip />
+                                                               </el-table> -->
+            </div>
+
+            <!-- 基本信息 - 审计信息 -->
+            <div class="md-auditInfo" v-if="activeMainTab == 'material'">
+              <el-divider content-position="left">审计信息</el-divider>
+              <el-form :inline="true" label-position="right" :model="basicData.value">
+                <el-form-item label="创建人">
+                  <el-input v-model="basicData.value.createBy" size="small" readonly placeholder="创建人"></el-input>
+                </el-form-item>
+                <el-form-item label="创建时间">
+                  <el-input v-model="basicData.value.createTime" size="small" readonly placeholder="创建时间"></el-input>
+                </el-form-item>
+                <el-form-item label="最后修改人">
+                  <el-input v-model="basicData.value.updateBy" size="small" readonly placeholder="最后修改人"></el-input>
+                </el-form-item>
+                <el-form-item label="最后修改时间">
+                  <el-input v-model="basicData.value.updateTime" size="small" readonly placeholder="最后修改时间"></el-input>
+                </el-form-item>
+
+              </el-form>
+
+            </div>
+
+          </div>
+        </template>
+      </dr-tabs>
+
+    </div>
+
+  </el-card>
+</template>
+
+<script>
+import drTabs from '../components/dr-tabs.vue';
+import detailsTabs from '../config/detailsTabs';
+import materialApi from '@/api/material/basic';
+import { getDicts as getDicts } from '@/api/system/dict/data'
+
+export default {
+  name: 'material-details',
+  props: ['headerParams'],
+  // dicts: [''],
+  data() {
+    return {
+      // 详情固定标签页
+      detailsTabs,
+      // 标签页当前激活状态
+      activeMainTab: 'material',
+      activeViceTab: 'material_medcine',
+      headerParam: this.$props.headerParams,
+      // 基本信息下的页签
+      basicMessage: [
+        {
+          label: '医药行业',
+          code: 'material_medcine',
+          isShow: true,
+        },
+        {
+          label: '辅计量管理',
+          code: 'material_unit',
+          isShow: true,
+        },
+        {
+          label: '辅助属性',
+          code: 'material_property',
+          isShow: true,
+        },
+      ],
+      // 基本信息
+      basicData: {
+        value: {},
+        form: []
+      },
+      // 医药行业
+      medcineData: {
+        value: {},
+        form: []
+      },
+      // 主标签信息
+      mainMsg: {
+        form: [],
+        value: []
+      },
+      // 副信息
+      viceMsg: {
+        form: [],
+        value: []
+      },
+
+    }
+  },
+  components: {
+    drTabs
+
+  },
+  methods: {
+    // 返回
+    handleBack() {
+      // this.$emit("actionBar", "materiaList")
+      let bar = {
+        address: 'materiaList',
+        id: ''
+      }
+      this.$emit("actionBar", JSON.stringify(bar))
+
+    },
+    // 附件按钮
+    handleFile() {
+      console.log('附件按钮');
+    },
+    // 改变分页情况 
+    handleChangePage(type) {
+      switch (type) {
+        case 'first':
+          console.log('第一页');
+          break;
+        case 'pre':
+          console.log('上一页');
+          break;
+        case 'next':
+          console.log('下一页');
+          break;
+        case 'end':
+          console.log('最后页');
+          break;
+      }
+    },
+    // 切换主信息标签
+    handleMainTabClick(e) {
+
+      this.activeMainTab = detailsTabs[e.index].code;
+
+      this.$emit('headerOption', JSON.stringify({ activeMainTab: this.activeMainTab }))
+
+      switch (this.activeMainTab) {
+
+        // 基本信息
+        case 'material':
+          this.getTagList('material', (form) => {
+            this.basicData.form = form;
+            this.getMaterialDetails(this.headerParam.materialId, 'material');
+          })
+          break;
+        // 财物信息
+        case 'material_finance':
+          this.getTagList('material_finance', (form) => {
+            this.mainMsg.form = form;
+            this.getFinanceList('');
+          });
+          break;
+        // 利润中心信息
+        case 'profit_center':
+          this.getTagList('profit_center', (form) => {
+            this.mainMsg.form = form;
+            this.getCenterList('');
+          });
+          break;
+        // 采购信息
+        case 'material_purchase':
+          this.getTagList('material_purchase', (form) => {
+            this.mainMsg.form = form;
+            this.getPurchaseList();
+          });
+          break;
+        // 库存信息
+        case 'material_inventory':
+          this.getTagList('material_inventory', (form) => {
+            this.mainMsg.form = form;
+            this.getInventoryList();
+          });
+          break;
+        // 计划信息
+        case 'material_plan':
+          this.getTagList('material_plan', (form) => {
+            this.mainMsg.form = form;
+            this.getPlanList('');
+          });
+          break;
+        // 成本信息
+        case 'material_cost':
+          this.getTagList('material_cost', (form) => {
+            this.mainMsg.form = form;
+            this.getCostList('');
+          });
+          break;
+
+
+        default:
+
+          break;
+      }
+
+    },
+    // 切换副表信息
+    handleViceTabClick(e) {
+      console.log(this.basicMessage[e.index], '切换标签');
+      this.activeViceTab = this.basicMessage[e.index].code;
+
+      switch (this.activeViceTab) {
+
+        // 医药行业
+        case 'material_medcine':
+          this.getTagList('material_medcine', (form) => {
+            this.medcineData.form = form;
+            this.getMedcineDetails(this.headerParam.materialId, 'material_medcine');
+          })
+          break;
+        // 辅计量管理
+        case 'material_unit':
+          this.getTagList('material_unit', (form) => {
+            console.log(form, 'form');
+            this.viceMsg.form = form;
+          });
+          break;
+        // 辅助属性
+        case 'material_property':
+          this.getTagList('material_property', (form) => {
+
+            this.viceMsg.form = form;
+          });
+          break;
+
+        default:
+          break;
+      }
+    },
+    handledbClick() { },
+    // 获取物料基本信息详细信息
+    getMaterialDetails(id, templateCode) {
+      materialApi.materialDetails(
+        id,
+        templateCode,
+      ).then(res => {
+        console.log(res, '物料基本信息');
+        let { code, data } = res;
+        if (code == 200) {
+          this.basicData.value = data.data;
+          // this.basicData.form = data.form;
+
+        }
+      })
+    },
+
+    // 查询财务信息列表
+    getFinanceList(materialId) {
+      materialApi.financeList({ materialId }).then(res => {
+        console.log(res, '查询财务信息列表');
+        if (res.code == 200) {
+          this.mainMsg.value = res.rows;
+        }
+      })
+    },
+    // 查询计划信息列表
+    getPlanList(materialId) {
+      materialApi.planList({ materialId }).then(res => {
+        console.log(res, '查询计划信息列表');
+        if (res.code == 200) {
+          this.mainMsg.value = res.data.tableBody.rows;
+        }
+      })
+    },
+    // 查询成本信息列表
+    getCostList(materialId) {
+      materialApi.costList({ materialId }).then((res) => {
+        console.log(res, '成本信息列表+表头');
+        if (res.code == 200) {
+          this.mainMsg.value = res.data.tableBody.rows;
+        }
+      })
+    },
+    // 查询利润中心信息
+    getCenterList(materialId) {
+      materialApi.centerList({ materialId }).then(res => {
+        console.log(res, '查询利润中心信息');
+        if (res.code == 200) {
+          this.mainMsg.value = res.data.tableBody.rows;
+        }
+      })
+    },
+    // 查询采购中心
+    getPurchaseList(materialId) {
+      materialApi.purchaseList({ materialId }).then(res => {
+        console.log(res, '查询采购中心');
+        if (res.code == 200) {
+          this.mainMsg.value = res.data.tableBody.rows;
+        }
+      })
+    },
+    // 获取库存信息列表 
+    getInventoryList(materialId) {
+      materialApi.inventoryList({ materialId }).then(res => {
+        console.log(res, '获取库存信息列表');
+      })
+    },
+
+    /* 二级标签页 */
+    // 获取医药行业信息详细信息+表单属性
+    getMedcineDetails(id, templateCode) {
+
+      console.log(id, templateCode);
+      materialApi.medcineDetails(
+        id,
+        templateCode,
+      ).then((res) => {
+
+        console.log(res, '医药行业');
+        let { code, data } = res;
+        if (code == 200) {
+          this.medcineData.value = data.data || {};
+          // this.medcineData.form = data.form;
+        }
+      })
+    },
+    // 获取物料辅助属性详细信息+表单列段属性
+    getPropertyDetails() {
+      materialApi.propertyDetails().then(res => {
+        console.log(res, '物料辅助属性详细信息');
+      })
+    },
+    // 查询物料辅助属性列表+表头字段
+    getPropertyList() {
+      materialApi.propertyList().then(res => {
+        console.log(res, '料辅助属性列表');
+      })
+    },
+    //获取辅助计量单位基本信息+表单列段属性 
+    getUnitDetails() {
+      materialApi.unitDetails().then(res => {
+        console.log(res, '辅助计量单位基本信息');
+      })
+    },
+    //获取辅计量管理列表信息+表头字段
+    getUnitList() {
+      materialApi.unitList().then(res => {
+        console.log(res, '辅计量管理列表信息');
+      })
+    },
+
+    // 获取物料列表表头
+    getTagList(templateCode, cb) {
+      let _this = this
+      materialApi.tagList({ templateCode }).then(res => {
+        console.log(res, `获取${templateCode}表头`);
+        let dictIdList = [];
+        if (res.code == 200) {
+
+          res.data.map(item => {
+
+            if (item.dictId) {
+              // 通过接口获取有dict的对应的数据
+              getDicts(item.dictId).then(res => {
+                if (res.data) {
+                  item['dictValue'] = res.data;
+                }
+              })
+            }
+          })
+
+
+          // 动态更改dict
+          // res.data.forEach(item => {
+          //   if (item.dictId) {
+          //     // 请求接口
+          //     dictIdList.push(item.dictId);
+          //   }
+          // })
+          // console.log(dictIdList, 'dictIdList');
+          // _this.dict = Array.from(new Set([..._this.dict, ...dictIdList]));
+
+          // console.log(_this.dicts, 'dicts');
+
+          return cb(res.data);
+        }
+      })
+    },
+
+
+  },
+  created() {
+    // 基本信息
+    this.getTagList('material', (form) => {
+      this.basicData.form = form;
+      this.getMaterialDetails(this.headerParam.materialId, 'material');
+    })
+    // 医疗行业
+    this.getTagList('material_medcine', (form) => {
+      this.medcineData.form = form;
+      this.getMedcineDetails(this.headerParam.materialId, 'material_medcine');
+    })
+  },
+
+}
+</script>
+
+<style lang="scss">
+.material-details {
+  height: calc(100vh - 158px);
+  box-sizing: border-box;
+
+  .el-card__body {
+    height: calc(100vh - 160px);
+    box-sizing: border-box;
+    padding: 12px;
+  }
+
+  .md-content {
+    margin-top: 12px;
+    height: calc(100vh - 260px);
+    box-sizing: border-box;
+
+    .md-basic {
+      overflow: auto;
+
+      .md-main {
+        height: calc(100vh - 625px);
+        // max-height: 290px;
+        margin-bottom: 10px;
+        overflow-y: auto;
+        overflow-x: hidden;
+      }
+
+      .md-vice-content {
+        height: 140px;
+        overflow-y: auto;
+        overflow-x: hidden;
+      }
+    }
+
+    .md-auditInfo {
+
+      .el-divider--horizontal {
+        margin: 20px 0px 15px;
+      }
+    }
+
+  }
+
+}
+</style>
+
+<style scoped>
+.md-content>>>.el-form-item {
+  margin-bottom: 10px;
+}
+
+.md-content>>>.el-tabs--border-card>.el-tabs__content {
+  padding-bottom: 8px;
+}
+
+.md-content .md-auditInfo>>>.el-form-item {
+  margin-bottom: 0px;
+}
+
+.md-main>>>.el-form-item,
+.md-vice>>>.el-form-item {
+  width: 100%;
+  box-sizing: border-box;
+}
+
+.md-main>>>.el-form-item__label,
+.md-vice>>>.el-form-item__label {
+  width: 40%;
+}
+
+.md-main>>>.el-form-item__content,
+.md-vice>>>.el-form-item__content {
+  width: 60%;
+}
+
+.md-content>>>.el-form-item__label {
+  font-weight: normal;
+  /* text-align: left;
+  width: 28%; */
+  white-space: nowrap;
+  /* IE6 需要定义宽度 */
+  overflow: hidden;
+
+  -o-text-overflow: ellipsis;
+  /* Opera */
+  text-overflow: ellipsis;
+  /* IE, Safari (WebKit) */
+  /* -moz-binding: url('ellipsis.xml#ellipsis'); */
+  /* Firefox */
+}
+
+.md-main>>>.material-table {
+  height: 100%;
+}
+
+.md-vice>>>.material-table {
+  height: 140px;
+  overflow-y: auto;
+  overflow-x: auto;
+}
+</style>

Різницю між файлами не показано, бо вона завелика
+ 753 - 138
src/views/material/basicFile/details.vue


+ 269 - 0
src/views/material/basicFile/index copy.vue

@@ -0,0 +1,269 @@
+<!-- 物料信息基础档案 -->
+<template>
+  <div class="material-basic">
+
+    <!-- 操作栏 -->
+    <el-row :gutter="10" class="mb10" v-if="!headerParams.isEdit || mainTabCode == 'material'">
+      <!-- 新增、修改、删除、复制 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleInster">新增</el-button>
+          <el-button size="small" @click="handleEdit">修改</el-button>
+          <el-button size="small" @click="handleDel">删除</el-button>
+          <el-button size="small" @click="handleCopy">复制</el-button>
+        </el-button-group>
+      </el-col>
+
+      <!-- 查询、刷新、过滤 -->
+      <el-col :span="1.5">
+        <el-button-group>
+
+          <el-dropdown size="small" v-if="isComponent == 'materiaList'" @command="handleFilter">
+            <el-button size="small">
+              过滤<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="filterCondition('stop')">显示停用</el-dropdown-item>
+              <el-dropdown-item :command="filterCondition('allot')">显示已分配</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-button size="small" @click="handleQuery">查询</el-button>
+          <el-button size="small" @click="handleRefresh">刷新</el-button>
+
+        </el-button-group>
+      </el-col>
+
+      <!-- 启用 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-dropdown split-button size="small" @click="handleIsInvoke(true)" @command="handleIsInvoke">
+            启用
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="isInvoke(true)">启用</el-dropdown-item>
+              <el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button-group>
+      </el-col>
+
+      <!-- 申请单查询 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleQueryForm">申请单查询</el-button>
+        </el-button-group>
+      </el-col>
+
+      <!-- 导入导出 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleImport">批量导入</el-button>
+          <el-button size="small" @click="handleExport">批量导出</el-button>
+        </el-button-group>
+      </el-col>
+
+    </el-row>
+
+    <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
+    <el-row :gutter="10" class="mb10" v-else-if="headerParams.isEdit">
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleSave">保存</el-button>
+          <el-button size="small" @click="handleSaveAdd" disabled>保存新增</el-button>
+          <el-button size="small" @click="handleUpdateImport">更新导入</el-button>
+        </el-button-group>
+      </el-col>
+
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleCancel">取消</el-button>
+        </el-button-group>
+      </el-col>
+    </el-row>
+
+    <el-dialog title="操作提示" :visible.sync="optionDialog.show" width="30%" center top="50vh">
+      <span>是否确认{{ optionDialog.op }}?</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleOptionShow('option', false)">取 消</el-button>
+        <el-button type="primary" @click="handleComfirmOption('cancal')">确 定</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- <keep-alive include="materiaDetails" :max="15"> -->
+    <component :is="isComponent" @actionBar="handleActionBar" :headerParams="headerParams"
+      @headerOption="handleHeaderOption">
+    </component>
+    <!-- </keep-alive> -->
+
+  </div>
+</template>
+
+<script>
+import './style/index.scss';
+import materiaList from './list.vue';
+import materiaDetails from './details.vue';
+export default {
+  name: "material-basic",
+  components: {
+    materiaList,
+    materiaDetails
+  },
+  data() {
+    return {
+      isComponent: 'materiaList',
+      // 头部数据
+      headerParams: {
+        // 物料id
+        materialId: '',
+        // 是否编辑
+        isEdit: false,
+        activeMainTab: 'material',
+      },
+
+      // 列表选中数据
+      checkedList: [],
+      // 操作弹窗
+      optionDialog: {
+        show: false,
+        op: ''
+      },
+      // details中主标签页的code
+      mainTabCode: '',
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    // 新增
+    handleInster() {
+      this.$message({
+        message: '物料只能通过申请审批增加,不能在节点直接录入!',
+        type: 'warning'
+      });
+    },
+    // 修改
+    handleEdit() {
+      if (this.isComponent == 'materiaList' && this.checkedList.length == 1) {
+        this.headerParams.isEdit = true;
+        let bar = JSON.stringify({
+          address: 'materiaDetails',
+          id: this.checkedList[0].id
+        })
+        this.handleActionBar(bar);
+      } else if (this.isComponent == 'materiaList' && this.checkedList.length > 1) {
+        this.$message({
+          message: '修改只能选择单个数据!',
+          type: 'warning'
+        });
+      } else if (this.isComponent == 'materiaDetails') {
+        this.headerParams.isEdit = true;
+        console.log('详情修改');
+      } else {
+        this.$message({
+          message: '请选择需要修改的信息!',
+          type: 'warning'
+        });
+      }
+    },
+    // 删除
+    handleDel() {
+      console.log('删除');
+    },
+    // 复制
+    handleCopy() {
+      console.log('复制');
+    },
+    //查询 
+    handleQuery() {
+
+    },
+    // 刷新
+    handleRefresh() {
+      console.log('刷新');
+    },
+    // 过滤
+    handleFilter(e) {
+      console.log(e, '过滤');
+    },
+    filterCondition(type) {
+      return {
+        type
+      }
+    },
+    // 启用
+    handleIsInvoke(e) {
+      console.log('启用', e);
+    },
+    isInvoke(val) {
+      return val;
+    },
+    // 申请单查询
+    handleQueryForm() {
+      console.log('申请单查询');
+    },
+    // 批量导入
+    handleImport() {
+      console.log('批量导入');
+    },
+    // 批量导出
+    handleExport() {
+      console.log('批量导出');
+    },
+
+    // 取消保存
+    handleCancel() {
+      console.log('取消保存');
+      this.optionDialog.op = '取消';
+      this.handleOptionShow('option', true);
+    },
+    // 保存修改
+    handleSave() {
+      console.log('保存修改');
+    },
+    // 保存修改并新增
+    handleSaveAdd() {
+      console.log('保存修改并新增');
+    },
+    // 更新导入
+    handleUpdateImport() {
+      console.log('更新导入');
+    },
+    // 头部数据处理
+    handleHeaderOption(params) {
+      let query = JSON.parse(params);
+      console.log(query, 'query');
+      this.checkedList = query.checkedList || [];
+      this.headerParams.activeMainTab = query.activeMainTab || 'material';
+    },
+    // 触发动态组件
+    handleActionBar(params) {
+      let bar = JSON.parse(params);
+      console.log(bar);
+      this.isComponent = bar.address;
+      this.headerParams.materialId = bar.id;
+    },
+    // 操作弹窗显隐
+    handleOptionShow(type, val) {
+      switch (type) {
+        case 'option':
+          this.optionDialog.show = val;
+          break;
+      }
+    },
+    // 操作弹窗确认按钮
+    handleComfirmOption(op) {
+      switch (op) {
+        case 'cancal':
+          this.handleOptionShow('option', false);
+          this.headerParams.isEdit = false;
+          break;
+      }
+    },
+
+
+  }
+
+};
+</script>
+

+ 103 - 73
src/views/material/basicFile/index.vue

@@ -3,7 +3,7 @@
   <div class="material-basic">
 
     <!-- 操作栏 -->
-    <el-row :gutter="10" class="mb10" v-if="!headerParams.isEdit">
+    <el-row :gutter="10" class="mb10">
       <!-- 新增、修改、删除、复制 -->
       <el-col :span="1.5">
         <el-button-group>
@@ -18,7 +18,7 @@
       <el-col :span="1.5">
         <el-button-group>
 
-          <el-dropdown size="small" v-if="isComponent == 'materiaList'" @command="handleFilter">
+          <el-dropdown size="small" @command="handleFilter">
             <el-button size="small">
               过滤<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
@@ -64,21 +64,6 @@
 
     </el-row>
 
-    <el-row :gutter="10" class="mb10" v-else>
-      <el-col :span="1.5">
-        <el-button-group>
-          <el-button size="small" @click="handleSave">保存</el-button>
-          <el-button size="small" @click="handleSaveAdd" disabled>保存新增</el-button>
-          <el-button size="small" @click="handleUpdateImport">更新导入</el-button>
-        </el-button-group>
-      </el-col>
-
-      <el-col :span="1.5">
-        <el-button-group>
-          <el-button size="small" @click="handleCancel">取消</el-button>
-        </el-button-group>
-      </el-col>
-    </el-row>
 
     <el-dialog title="操作提示" :visible.sync="optionDialog.show" width="30%" center top="50vh">
       <span>是否确认{{ optionDialog.op }}?</span>
@@ -88,34 +73,35 @@
       </span>
     </el-dialog>
 
-    <component :is="isComponent" @actionBar="handleActionBar" :headerParams="headerParams"
-      @headerOption="handleHeaderOption">
-    </component>
+    <el-card class="material-list">
+      <el-table v-loading="loading" :data="taskList" @cell-dblclick="handledbClick"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" />
+        <el-table-column type="index" label="序号" width="55" align="center" />
+        <el-table-column v-for="h in  tableHeader" v-if="h.show" :label="h.name" align="center" :prop="h.prop"
+          show-overflow-tooltip />
+      </el-table>
+
+      <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+        @pagination="getMaterialList" />
+    </el-card>
 
   </div>
 </template>
 
 <script>
 import './style/index.scss';
-import materiaList from './list.vue';
-import materiaDetails from './details.vue';
+import materialApi from '@/api/material/basic';
+
 export default {
   name: "material-basic",
-  components: {
-    materiaList,
-    materiaDetails
-  },
   data() {
     return {
-      isComponent: 'materiaList',
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
+      // 物料基本信息数据
+      taskList: [],
       // 总条数
-      total: 0,
+      total: 1,
+      loading: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -123,27 +109,20 @@ export default {
         code: null,
         name: null
       },
-      // 头部数据
-      headerParams: {
-        // 物料id
-        materialId: '',
-        // 是否编辑
-        isEdit: false,
-      },
-
-
+      // 表头
+      tableHeader: [],
+      // 多选数组
+      checkedList: [],
       // 列表选中数据
       checkedList: [],
       // 操作弹窗
       optionDialog: {
         show: false,
         op: ''
-      }
+      },
     }
   },
-  created() {
-    // this.getList();
-  },
+
   methods: {
     // 新增
     handleInster() {
@@ -154,21 +133,14 @@ export default {
     },
     // 修改
     handleEdit() {
-      if (this.isComponent == 'materiaList' && this.checkedList.length == 1) {
-        this.headerParams.isEdit = true;
-        let bar = JSON.stringify({
-          address: 'materiaDetails',
-          id: this.checkedList[0].id
-        })
-        this.handleActionBar(bar);
-      } else if (this.isComponent == 'materiaList' && this.checkedList.length > 1) {
+      console.log(this.checkedList, 'this.checkedList');
+      if (this.checkedList.length == 1) {
+        this.$router.push(`/material/basicFile/detail/${this.checkedList[0].id}`);
+      } else if (this.checkedList.length > 1) {
         this.$message({
           message: '修改只能选择单个数据!',
           type: 'warning'
         });
-      } else if (this.isComponent == 'materiaDetails') {
-        this.headerParams.isEdit = true;
-        console.log('详情修改');
       } else {
         this.$message({
           message: '请选择需要修改的信息!',
@@ -239,19 +211,8 @@ export default {
     handleUpdateImport() {
       console.log('更新导入');
     },
-    // 头部数据处理
-    handleHeaderOption(params) {
-      let query = JSON.parse(params);
-      console.log(query, 'query');
-      this.checkedList = query.checkedList || [];
-    },
-    // 触发动态组件
-    handleActionBar(params) {
-      let bar = JSON.parse(params);
-      console.log(bar);
-      this.isComponent = bar.address;
-      this.headerParams.materialId = bar.id;
-    },
+
+
     // 操作弹窗显隐
     handleOptionShow(type, val) {
       switch (type) {
@@ -265,13 +226,82 @@ export default {
       switch (op) {
         case 'cancal':
           this.handleOptionShow('option', false);
-          this.headerParams.isEdit = false;
           break;
       }
     },
 
-  }
+
+
+    // 双击行
+    handledbClick(e) {
+      console.log(e, '双击行');
+      this.$router.push({
+        path: `/material/basicFile/detail/${e.id}`,
+      });
+    },
+    // 选中数据改变
+    handleSelectionChange(list) {
+      this.checkedList = list;
+      this.$emit('headerOption', JSON.stringify({ checkedList: [...list] }))
+    },
+    // 获取物料列表信息
+    getMaterialList(templateCode) {
+      this.loading = true;
+      materialApi.materialList({ templateCode }).then((res) => {
+        this.loading = false;
+        console.log(res, '获取物料列表信息以及表头字段');
+        let { code, data } = res;
+        if (code == 200) {
+          this.taskList = data.tableBody.rows;
+          this.total = data.tableBody.total;
+
+        }
+      })
+    },
+    // 获取物料列表表头
+    getTagList(templateCode) {
+      materialApi.tagList({ templateCode }).then(res => {
+        console.log(res, '获取物料列表表头');
+        if (res.code == 200) {
+          this.tableHeader = res.data;
+        }
+      })
+    },
+
+
+
+
+
+
+  },
+  created() {
+    this.getMaterialList('material');
+    this.getTagList('material');
+  },
 
 };
 </script>
 
+
+<style lang="scss">
+.material-list {
+  height: calc(100% - 42px);
+
+  .el-card__body {
+    height: 100%;
+    box-sizing: border-box;
+
+    .el-table {
+      height: calc(100% - 70px);
+
+      .el-table__body-wrapper {
+        height: calc(100% - 137px);
+
+        // .el-table__body {
+        //   height: 100%;
+        // }
+      }
+    }
+  }
+}
+</style>

+ 114 - 0
src/views/material/basicFile/list copy.vue

@@ -0,0 +1,114 @@
+<!-- 物料基础信息——列表 -->
+
+<template>
+  <el-card class="material-list">
+    <el-table v-loading="loading" :data="taskList" @cell-dblclick="handledbClick"
+      @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" />
+      <el-table-column type="index" label="序号" width="55" align="center" />
+      <el-table-column v-for="h in  tableHeader" v-if="h.show" :label="h.name" align="center" :prop="h.prop"
+        show-overflow-tooltip />
+    </el-table>
+
+    <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+      @pagination="getMaterialList" />
+  </el-card>
+</template>
+
+<script>
+import materialApi from '@/api/material/basic';
+
+export default {
+  name: 'material-list',
+  data() {
+    return {
+      // 物料基本信息数据
+      taskList: [],
+      // 总条数
+      total: 1,
+
+      loading: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        code: null,
+        name: null
+      },
+      // 表头
+      tableHeader: [],
+      // 多选数组
+      checkedList: [],
+    }
+  },
+  methods: {
+    // 双击行
+    handledbClick(e) {
+      
+      let bar = {
+        address: 'materiaDetails',
+        id: e.id,
+        list: this.checkedList
+      }
+      this.$emit("actionBar", JSON.stringify(bar))
+    },
+    // 选中数据改变
+    handleSelectionChange(list) {
+      this.checkedList = list;
+      this.$emit('headerOption', JSON.stringify({ checkedList: [...list] }))
+    },
+    // 获取物料列表信息
+    getMaterialList(templateCode) {
+      this.loading = true;
+      materialApi.materialList({ templateCode }).then((res) => {
+        this.loading = false;
+        console.log(res, '获取物料列表信息以及表头字段');
+        let { code, data } = res;
+        if (code == 200) {
+          this.taskList = data.tableBody.rows;
+          this.total = data.tableBody.total;
+
+        }
+      })
+    },
+    // 获取物料列表表头
+    getTagList(templateCode) {
+      materialApi.tagList({ templateCode }).then(res => {
+        console.log(res, '获取物料列表表头');
+        if (res.code == 200) {
+          this.tableHeader = res.data;
+        }
+      })
+    },
+  },
+  created() {
+
+    this.getMaterialList('material');
+    this.getTagList('material');
+  }
+}
+</script>
+
+<style lang="scss">
+.material-list {
+  height: calc(100% - 42px);
+
+  .el-card__body {
+    height: 100%;
+    box-sizing: border-box;
+
+    .el-table {
+      height: calc(100% - 70px);
+
+      .el-table__body-wrapper {
+        height: calc(100% - 137px);
+
+        // .el-table__body {
+        //   height: 100%;
+        // }
+      }
+    }
+  }
+}
+</style>

+ 21 - 5
src/views/material/basicFile/list.vue

@@ -10,7 +10,6 @@
         show-overflow-tooltip />
     </el-table>
 
-    <!-- v-show="total > 0" -->
     <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
       @pagination="getMaterialList" />
   </el-card>
@@ -21,7 +20,6 @@ import materialApi from '@/api/material/basic';
 
 export default {
   name: 'material-list',
-
   data() {
     return {
       // 物料基本信息数据
@@ -47,6 +45,7 @@ export default {
   methods: {
     // 双击行
     handledbClick(e) {
+      
       let bar = {
         address: 'materiaDetails',
         id: e.id,
@@ -91,8 +90,25 @@ export default {
 }
 </script>
 
-<style>
-.material-list>>>.el-table__body-wrapper {
-  height: 100%;
+<style lang="scss">
+.material-list {
+  height: calc(100% - 42px);
+
+  .el-card__body {
+    height: 100%;
+    box-sizing: border-box;
+
+    .el-table {
+      height: calc(100% - 70px);
+
+      .el-table__body-wrapper {
+        height: calc(100% - 137px);
+
+        // .el-table__body {
+        //   height: 100%;
+        // }
+      }
+    }
+  }
 }
 </style>

+ 1 - 1
src/views/material/components/dr-tabs.vue

@@ -1,7 +1,7 @@
 <!-- 标签页 -->
 <template>
   <el-tabs type="border-card" @tab-click="handleTabchange">
-    <el-tab-pane v-for="t in tabList" :label="t.label" v-if="t.isShow">
+    <el-tab-pane v-for="t in tabList" :label="t.label" v-if="t.isShow" :disabled="t.disabled">
       <slot name="tabContent"></slot>
     </el-tab-pane>
   </el-tabs>

+ 1 - 0
src/views/material/requisition/details.vue

@@ -1,6 +1,7 @@
 <!-- 物料申请单——详情 -->
 <template>
   <el-card class="request-details">
+    1111111111
 
     <el-row type="flex" justify="space-between">
       <el-col :span="6">

+ 173 - 0
src/views/material/requisition/index copy.vue

@@ -0,0 +1,173 @@
+<!-- 物料申请单 -->
+<template>
+  <div class="material-requisition">
+    <!-- 操作栏 -->
+    <el-row :gutter="10" class="mb10">
+      <!-- 新增、修改、删除、复制 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleInster">新增</el-button>
+          <el-button size="small" @click="handleEdit">修改</el-button>
+          <el-button size="small" @click="handleDel">删除</el-button>
+          <el-button size="small" @click="handleCopy">复制</el-button>
+        </el-button-group>
+      </el-col>
+
+      <!-- 查询、刷新 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" @click="handleQuery">查询</el-button>
+          <el-button size="small" @click="handleRefresh">刷新</el-button>
+        </el-button-group>
+      </el-col>
+
+      <!-- 提交、收回  审批、取消审批、查看审批意见 -->
+      <el-col :span="1.5">
+        <el-button-group>
+
+          <el-dropdown split-button size="small" @click="handleSubmit(true)" @command="handleSubmit">
+            提交
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="isSubmit(true)">提交</el-dropdown-item>
+              <el-dropdown-item :command="isSubmit(false)">收回</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-dropdown split-button size="small" @click="handleApproval('approval')" @command="handleApproval">
+            审批
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="approvalState('approval')">审批</el-dropdown-item>
+              <el-dropdown-item :command="approvalState('cancel')">取消审批</el-dropdown-item>
+              <el-dropdown-item :command="approvalState('view')">查看审批意见</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button-group>
+      </el-col>
+
+      <!-- 附件管理 -->
+      <el-col :span="1.5">
+        <el-button-group>
+          <el-button size="small" v-if="isComponent == 'requestDetails'">附件管理</el-button>
+          <!-- <el-button size="small">维护物料</el-button> -->
+
+        </el-button-group>
+      </el-col>
+    </el-row>
+
+    <component :is="isComponent" @actionBar="handleActionBar" :headerParams="headerParams"></component>
+  </div>
+</template>
+
+<script>
+import './style/index.scss';
+
+import requestList from './list.vue';
+import requestDetails from './details.vue';
+
+import Store from '@/store/index'
+export default {
+  name: "material-requisition",
+  components: {
+    requestList,
+    requestDetails,
+  },
+  data() {
+    return {
+      isComponent: 'requestList',
+      // 头部参数
+      headerParams: {
+        // 是否编辑
+        isEdit: false,
+      },
+      // 总条数
+      total: 1,
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        code: null,
+        name: null
+      },
+    };
+  },
+  created() {
+    this.getList();
+    console.log(Store.state.user, 'Store');
+  },
+  methods: {
+    // 新增
+    handleInster() {
+      console.log('新增');
+      this.isComponent = 'requestDetails';
+    },
+    // 修改
+    handleEdit() {
+      console.log('修改');
+    },
+    // 删除
+    handleDel() {
+      console.log('删除');
+    },
+    // 复制
+    handleCopy() {
+      console.log('复制');
+    },
+    // 查询
+    handleQuery() {
+      console.log('查询');
+    },
+    // 刷新
+    handleRefresh() {
+      console.log('刷新');
+    },
+    // 提交
+    handleSubmit(val) {
+      console.log(val, '提交');
+    },
+    isSubmit(type) {
+      return type
+    },
+    // 审批
+    handleApproval(val) {
+      console.log(val, '审批');
+    },
+    approvalState(type) {
+      return type
+    },
+    // 触发动态组件
+    handleActionBar(params) {
+      console.log(`需要更换至${params}~~~`);
+      this.isComponent = params;
+    },
+
+    handleClick() { },
+    /** 查询【请填写功能名称】列表 */
+    getList() {
+
+    },
+    // 取消按钮
+    cancel() {
+
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+
+
+  }
+};
+</script>

+ 50 - 2
src/views/material/requisition/index.vue

@@ -3,6 +3,7 @@
   <div class="material-requisition">
     <!-- 操作栏 -->
     <el-row :gutter="10" class="mb10">
+      <!-- 新增、修改、删除、复制 -->
       <el-col :span="1.5">
         <el-button-group>
           <el-button size="small" @click="handleInster">新增</el-button>
@@ -12,6 +13,7 @@
         </el-button-group>
       </el-col>
 
+      <!-- 查询、刷新 -->
       <el-col :span="1.5">
         <el-button-group>
           <el-button size="small" @click="handleQuery">查询</el-button>
@@ -19,6 +21,7 @@
         </el-button-group>
       </el-col>
 
+      <!-- 提交、收回  审批、取消审批、查看审批意见 -->
       <el-col :span="1.5">
         <el-button-group>
 
@@ -41,6 +44,7 @@
         </el-button-group>
       </el-col>
 
+      <!-- 附件管理 -->
       <el-col :span="1.5">
         <el-button-group>
           <el-button size="small" v-if="isComponent == 'requestDetails'">附件管理</el-button>
@@ -50,7 +54,27 @@
       </el-col>
     </el-row>
 
-    <component :is="isComponent" @actionBar="handleActionBar" :headerParams="headerParams"></component>
+    <el-card class="request-list">
+      <!-- v-loading="loading" @selection-change="handleSelectionChange" -->
+      <el-table :data="taskList" @cell-dblclick="handledbClick" class="request-table">
+        <el-table-column type="index" label="序号" width="55" align="center" />
+        <el-table-column label="主键" align="center" prop="id" />
+        <el-table-column label="编码" align="center" prop="code" />
+        <el-table-column label="名称" align="center" prop="name" />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+              v-hasPermi="['system:task:edit']">修改</el-button>
+            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+              v-hasPermi="['system:task:remove']">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <!-- v-show="total > 0" -->
+      <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+        @pagination="getList" />
+    </el-card>
   </div>
 </template>
 
@@ -86,6 +110,23 @@ export default {
         code: null,
         name: null
       },
+      // 物料基本信息数据
+      taskList: [
+        {
+          id: 1,
+          code: '001',
+          name: '名称'
+        }
+      ],
+      // 总条数
+      total: 0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        code: null,
+        name: null
+      },
     };
   },
   created() {
@@ -162,7 +203,14 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-
+    // 双击行
+    handledbClick(e) {
+      console.log(e, '双击行');
+      // console.log(this.$tab.openPage('测试', '/material/requisition/detail'), 'this.$tab');
+      console.log(this.$router.push('/material/requisition/detail'), 'this.$tab');
+      // this.$emit("actionBar", "requestDetails")
+    },
+    handleSelectionChange() { },
 
   }
 };

+ 2 - 1
vue.config.js

@@ -37,7 +37,8 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/ruoyi-admin`, //生产
-        target: `http://172.16.63.202:8000/drp-admin`, //测试
+        // target: `http://172.16.63.202:8000/drp-admin`, //测试
+        target: `http://172.16.13.47:8000/drp-admin`, //本地
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''

Деякі файли не було показано, через те що забагато файлів було змінено