Просмотр исходного кода

Merge branch 'dev' into 'master'

Dev to master

See merge request new-business/drp-web!9
黄梓星 2 лет назад
Родитель
Сommit
37bd2575a5

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

@@ -1,679 +0,0 @@
-<!-- 物料信息基础档案——详情 -->
-<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>

+ 14 - 12
src/views/material/basicFile/details.vue

@@ -29,7 +29,7 @@
               </el-dropdown-menu>
             </el-dropdown>
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <el-button size="small" @click="handleQuery">查询</el-button> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <el-button size="small" @click="handleQuery">查询</el-button> -->
             <el-button size="small" @click="handleRefresh">刷新</el-button>
 
           </el-button-group>
@@ -47,7 +47,7 @@
               启用
               <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-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item></el-dropdown-menu></el-dropdown> -->
           </el-button-group>
         </el-col>
 
@@ -56,7 +56,7 @@
           <el-button-group>
             <el-button size="small" @click="handleQueryForm">申请单查询</el-button>
           </el-button-group>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </el-col> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </el-col> -->
 
         <!-- 导入导出 -->
       <!-- <el-col :span="1.5">
@@ -64,7 +64,7 @@
             <el-button size="small" @click="handleImport">批量导入</el-button>
             <el-button size="small" @click="handleExport">批量导出</el-button>
           </el-button-group>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </el-col> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </el-col> -->
 
       </el-row>
 
@@ -109,7 +109,7 @@
         <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 size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
 
           <!-- 切换 -->
         <!-- <el-button-group>
@@ -120,7 +120,7 @@
             <el-button size="small" icon="el-icon-arrow-right" :disabled="!handleBasicEdit"
               @click="handleChangePage('next')" />
             <el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
-                                          @click="handleChangePage('end')" /></el-button-group> -->
+                                                                  @click="handleChangePage('end')" /></el-button-group> -->
         </el-col>
       </el-row>
 
@@ -193,6 +193,7 @@
                             <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
                               :value="d.dictValue">
                             </el-option>
+
                           </el-select>
 
                         </el-form-item>
@@ -281,7 +282,7 @@
                                 @focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
 
                               <!-- <el-option v-if="m.dictId" v-for="d in m.dictValue" :key="d.dictValue"
-                                                                                                                                                                                                                                                                                                                    :label="d.dictLabel" :value="d.dictValue"></el-option> -->
+                                                                                                                                                                                                                                                                                                                                            :label="d.dictLabel" :value="d.dictValue"></el-option> -->
 
                                 <div slot="empty"></div>
                               </el-select>
@@ -434,7 +435,7 @@
               <el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
                 :value="d.dictValue">
               </el-option>
-                                                                                                                                                                                                                                                                                                                                      </el-select> -->
+                                                                                                                                                                                                                                                                                                                                                              </el-select> -->
 
             <!-- 其他类型 -->
 
@@ -486,7 +487,7 @@
           <el-collapse-item title="物料基本信息" name="basic">
             <el-form :inline="true" label-position="right" :model="basicData.value">
             <!-- <el-form-item label="所属组织">
-                                                                                                                                                                                                                                                                                                                                                                                              <el-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input></el-form-item> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                      <el-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input></el-form-item> -->
               <el-form-item label="物料编码">
                 <el-input v-model="basicData.value.code" size="small" readonly placeholder="物料编码"></el-input>
               </el-form-item>
@@ -497,7 +498,7 @@
                 <el-input v-model="basicData.value.enName" size="small" readonly placeholder="英文名称"></el-input>
               </el-form-item>
             <!-- <el-form-item label="版本号">
-                                                                                                                                                                                                                                                                                                                                                                                            <el-input v-model="basicData.value.version"  placeholder="版本号"></el-input></el-form-item> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                    <el-input v-model="basicData.value.version"  placeholder="版本号"></el-input></el-form-item> -->
 
             </el-form>
           </el-collapse-item>
@@ -633,7 +634,7 @@ import arrayUtils from '../tools/arrayUtils';
 
 export default {
   name: 'material-details',
-  // dicts: [''],
+  // dicts: [],
   components: {
     drTabs
   },
@@ -1319,9 +1320,10 @@ export default {
           //   }
           // })
           // console.log(dictIdList, 'dictIdList');
+          // _this.dict = [..._this.dict, ...dictIdList];
           // _this.dict = Array.from(new Set([..._this.dict, ...dictIdList]));
 
-          // console.log(_this.dicts, 'dicts');
+          // console.log(_this.dict, 'dicts');
 
           return cb(res.data);
         }

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

@@ -1,269 +0,0 @@
-<!-- 物料信息基础档案 -->
-<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>
-

+ 81 - 76
src/views/material/basicFile/index.vue

@@ -3,22 +3,23 @@
   <div class="material-basic">
 
     <!-- 操作栏 -->
-    <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-dropdown size="small" @command="handleFilter">
+    <div>
+      <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-dropdown size="small" @command="handleFilter">
             <el-button size="small">
               过滤<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
@@ -26,73 +27,77 @@
               <el-dropdown-item :command="filterCondition('stop')">显示停用</el-dropdown-item>
               <el-dropdown-item :command="filterCondition('allot')">显示已分配</el-dropdown-item>
             </el-dropdown-menu>
-                                                        </el-dropdown> -->
+                                                                </el-dropdown> -->
 
-          <!-- <el-button size="small" @click="handleQuery">查询</el-button> -->
-          <el-button size="small" @click="handleRefresh">刷新</el-button>
+            <!-- <el-button size="small" @click="handleQuery">查询</el-button> -->
+            <el-button size="small" @click="handleRefresh">刷新</el-button>
 
-        </el-button-group>
-      </el-col>
+          </el-button-group>
+        </el-col>
 
-      <!-- 启用 -->
-      <el-col :span="1.5">
-        <el-button-group>
-          <el-button size="small" @click="handleIsInvoke" :disabled="checkedList.length != 1"
-            v-hasPermi="['system:material:add']">
-            <!-- 0:启用  2:停用 -->
-            {{ handleJudgeIsUsing() ? '停用' : '启用' }}
-          </el-button>
-        <!-- <el-dropdown :disabled="checkedList.length != 1 && handleJudgeIsUsing" 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="handleIsInvoke" :disabled="checkedList.length != 1"
+              v-hasPermi="['system:material:add']">
+              <!-- 0:启用  2:停用 -->
+              {{ handleJudgeIsUsing() ? '停用' : '启用' }}
+            </el-button>
+          </el-button-group>
+        </el-col>
 
-      <!-- 申请单查询 -->
-    <!-- <el-col :span="1.5">
+        <!-- 申请单查询 -->
+      <!-- <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" v-hasPermi="['system:material:import']">批量导入</el-button>
-          <el-button size="small" @click="handleExport" v-hasPermi="['system:material:export']">批量导出</el-button>
-        </el-button-group>
-      </el-col>
-
-      <!-- 查询框 -->
-      <el-col :span="1.5">
-        <el-form :inline="true" :model="queryForm" class="mb-query" @submit.native.prevent>
-          <el-form-item label="物料编码">
-            <el-input size="small" v-model="queryForm.code" placeholder="物料编码" clearable></el-input>
-          </el-form-item>
-          <el-form-item label="物料名称">
-            <el-input size="small" v-model="queryForm.name" placeholder="物料名称" clearable></el-input>
-          </el-form-item>
-          <el-form-item label="启用状态">
-            <!-- 0=已启用,2=已停用 -->
-            <el-select size="small" v-model="queryForm.isEnable" placeholder="请选择" clearable>
-              <el-option key="0" label="已启用" value="0"></el-option>
-              <el-option key="2" label="已停用" value="2"></el-option>
-            </el-select>
-          </el-form-item>
-
-          <el-form-item>
-            <el-button size="small" type="primary" @click="handleQuery">查询</el-button>
-            <el-button size="small" @click="handleResetQuery">重置</el-button>
-          </el-form-item>
-        </el-form>
-      </el-col>
-
-    </el-row>
+                                                                                                                                                                                                                        </el-col> -->
+
+        <!-- 导入导出 -->
+        <el-col :span="1.5">
+          <el-button-group>
+            <el-button size="small" @click="handleImport" v-hasPermi="['system:material:import']">批量导入</el-button>
+            <el-button size="small" @click="handleExport" v-hasPermi="['system:material:export']">批量导出</el-button>
+          </el-button-group>
+        </el-col>
+
+
+      </el-row>
+
+      <!-- 查询条件 -->
+      <el-row :gutter="10" >
+        <el-col :span="1.5">
+          <el-form :inline="true" :model="queryForm" class="mb-query" @submit.native.prevent>
+            <el-form-item label="物料编码">
+              <el-input size="small" v-model="queryForm.code" placeholder="物料编码" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="物料名称">
+              <el-input size="small" v-model="queryForm.name" placeholder="物料名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="启用状态">
+              <!-- 0=已启用,2=已停用 -->
+              <el-select size="small" v-model="queryForm.isEnable" placeholder="请选择" clearable>
+                <el-option key="0" label="已启用" value="0"></el-option>
+                <el-option key="2" label="已停用" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="是否同步NC">
+              <!-- 是否同步;2=否,0=是 -->
+              <el-select size="small" v-model="queryForm.isSync" placeholder="请选择" clearable>
+                <el-option key="0" label="是" value="0"></el-option>
+                <el-option key="2" label="否" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button size="small" type="primary" @click="handleQuery">查询</el-button>
+              <el-button size="small" @click="handleResetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+
+      </el-row>
+    </div>
 
     <!-- 主体列表 -->
     <el-card class="material-list" v-loading="loading">

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

@@ -1,114 +0,0 @@
-<!-- 物料基础信息——列表 -->
-
-<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>

+ 3 - 2
src/views/material/requisition/add.vue

@@ -569,7 +569,8 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="启用状态" prop="isEnable">
-                <el-input disabled v-model="basicForm.isEnable"></el-input>
+                <el-input v-show="false" disabled v-model="basicForm.isEnable"></el-input>
+                <el-input disabled value="启用"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -1045,7 +1046,7 @@ export default {
         purchasingOrganization: '',
         // 新增业务部门
         businessDepartment: '',
-        isEnable: '',
+        isEnable: '0',
         safeStock: '',
         mediumPackageUnitId: '',
         remark: '',