王震
2023-09-08 eec77847922467a0ed5631794dbfe9ea2e367032
设备维护,标准Bom
已修改6个文件
129 ■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/laboratoryManagement.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-table/technology.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/technical.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -13,6 +13,7 @@
    //订单BOM
    delDevice:"/device/delDeviceById",//订单Bom
    compile:"/orders/compile",//编制
}
// 原材料检验
const raw = {
src/components/view/laboratoryManagement.vue
@@ -427,7 +427,7 @@
        equr:1,
      },
      delete:{},
      equip:[],
      equip:1,
      rules: {
        name: [
          { required: true, message: "请输入仪器设备编号", trigger: "blur" },
@@ -465,12 +465,20 @@
      }
    };
  },
  mounted() {
    // 初始化调用二级树
    this.twoTreeApi();
    // 初始化调用表格数据
    // this.tableDataApi();
    this.selectDevice()//右边
  },
  methods: {
    selectDevice() {//右边数据
      console.log(this.$api.url.selectDevice);
      console.log(this.ruleForm.treedata.father);
      console.log(this.equip);
      this.$axios.get(this.$api.url.selectDevice,{
        params:{
          father:this.treedata.father,
          father:this.ruleForm.treedata.father,
          type:this.equip,
        }
      }).then(res =>{
@@ -582,7 +590,7 @@
    },
    handleNodeClick(data) {
      console.log(data);
        this.treedata = data
        // this.treedata = data
        this.selectDevice()
    },
    handlerDeptList() {
@@ -720,13 +728,7 @@
        });
    }
  },
  mounted() {
    // 初始化调用二级树
    this.twoTreeApi();
    // 初始化调用表格数据
    this.tableDataApi();
    this.selectDevice()//右边
  },
  watch: {
    "ruleForm.rawInsProductId": {
      //监听ruleForm.rawInsProductId
src/components/view/standard-table/technology.vue
@@ -44,7 +44,7 @@
<template>
  <div class="standard">
    <el-table  :data="tableData" border style="width: 100%"  row-key="id"
    <!-- <el-table  :data="tableData" border style="width: 100%"  row-key="id"
      :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
      <el-table-column type="selection" width="50">
      </el-table-column>
@@ -80,7 +80,38 @@
        <el-table-column prop="quota" label="工时定额">
        </el-table-column>
      </template>
    </el-table>
    </el-table> -->
    <div>
          <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border
            @selection-change="handleSelectionChange" default-expand-all
            :tree-props="{ children: 'name', hasChildren: 'children' }">
            <el-table-column type="selection" width="55">
            </el-table-column>
            <el-table-column type="index" width="50" label="序号">
            </el-table-column>
            <el-table-column prop="name" label="工序" sortable width="300px">
              <template slot-scope="scope">
                        <el-tag>
                            <div class="firstDiv" :style="`color: ${scope.row.children? '#16a7ff' : '#58c173'}`">
                            {{ scope.row.children ? "01" : "02" }}
                            </div>
                        </el-tag>
                        <span style="color: black">{{ scope.row.name }}</span>
                        </template>
            </el-table-column>
            <el-table-column prop="" sortable label="工艺名称">
            </el-table-column>
            <el-table-column prop="" label="指标名称">
            </el-table-column>
            <el-table-column prop="" label="单位">
            </el-table-column>
            <el-table-column prop="" label="内控值">
            </el-table-column>
            <el-table-column prop="unit" label="标准值">
            </el-table-column>
          </el-table>
        </div>
  </div>
</template>
src/components/view/standard.vue
@@ -52,7 +52,20 @@
              询</span></el-button>
        </div>
        <div>
        <!-- <div v-if="this.typeselect == 0">
          工艺路线
        </div>
        <div v-if="this.typeselect == 1">
          技术指标
        </div>
        <div v-if="this.typeselect == 2">
          物料清单
        </div>
        <div v-if="this.typeselect == 3">
          生产工艺
        </div> -->
        <!-- <div>
          <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border
            @selection-change="handleSelectionChange" default-expand-all
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
@@ -61,7 +74,7 @@
            <el-table-column type="index" width="50" label="序号">
            </el-table-column>
            <el-table-column prop="name" label="工序" sortable width="300px">
              <!-- <template slot-scope="scope">
              <template slot-scope="scope">
                        <el-tag>
                            <div class="firstDiv" :style="`color: ${scope.row.children? '#16a7ff' : '#58c173'}`">
                            {{ scope.row.children ? "01" : "02" }}
@@ -69,7 +82,7 @@
                        </el-tag>
                        <span style="color: black">{{ scope.row.name }}</span>
                        </template> -->
                        </template>
            </el-table-column>
            <el-table-column prop="" sortable label="工艺名称">
            </el-table-column>
@@ -82,7 +95,8 @@
            <el-table-column prop="unit" label="标准值">
            </el-table-column>
          </el-table>
        </div>
        </div> -->
        <div class="table">
          <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology>
        </div>
@@ -93,7 +107,7 @@
    <div class="bom-add-model">
      <el-dialog title="BOM新增" :visible.sync="bomAddModelVisible" width="30%">
        <el-form>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="bomAddModelVisible = false">取 消</el-button>
@@ -119,12 +133,14 @@
      tableData: [],
      bomAddModelVisible: false,// 控制bom新增模态框是否显示
      list: [],
      typeselect: {},
      returntree: {},
      typeselect: 0,
      returntree: {
        id:28,
      },
      version: {},
      VER: {},
      verdata: {},
      character: '',
      character: 0,
    }
  },
  // watch: {
@@ -137,6 +153,8 @@
  // },
  mounted() {
    this.selectMaterialTree()
    this.selectVersion()
    this.selectAll()
  },
  methods: {
    handleSelectionChange() {
@@ -145,14 +163,15 @@
    TYPE(val) {//类型.数据
      console.log(val);
      this.typeselect = val
      console.log(this.typeselect);
      // console.log(this.typeselect);
      this.selectVersion()
    },
    handleNodeClick(val) {//树的值
      console.log(val);
      this.returntree = val
    },
    selectVersion() {
    selectVersion() {//版本
      this.$axios.get(this.$api.url.selectVersion, {
        params: {
          specificationsId: this.returntree.id,
src/components/view/technical.vue
@@ -74,20 +74,22 @@
            label="交货日期">
          </el-table-column>
          <el-table-column
            prop="type"
            label="状态"
            width="85"
            >
            <template slot-scope="scope">
              {{scope.state==0?'待编制':'已编制'}}
              <span  :style="{'color': scope.row.type==0 ? 'red':'green'}">
                {{scope.row.type==0?'待编制':'已编制'}}
              </span>
            </template>
          </el-table-column>
          <el-table-column
              label="操作"
              width="194">
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="showDetails(scope.row)">查看详情</el-button>
                <el-button type="text" size="small">编辑附件</el-button>
                <!-- <el-button type="text" size="small" @click="showDetails(scope.row)">查看详情</el-button>
                <el-button type="text" size="small">编辑附件</el-button> -->
                <el-button type="text" size="small" @click="authorizedstrength(scope.row)">编制</el-button>
              </template>
            </el-table-column>
      </el-table>
@@ -222,6 +224,7 @@
        id:'',
        date:''
       },
       compiledata:{},
       technicalTable: [],
       showDetail: false,
       selectedRow: {},
@@ -236,6 +239,22 @@
    this.getTechnicalTableData()
  },
  methods: {
      authorizedstrength(row) {
        this.compiledata = row
        this.compile()
        // let ccc = row
        // console.log(row);
      },
      //编制
      compile() {
        console.log();
        this.$axios.post(this.$api.url.compile,{
              id:this.compiledata.id
        }).then( res =>{
        this.$message.success('编制完成')
      })
        this.getTechnicalTableData()
      },
      async showDetails(row){
        this.showDetail = true
        const res = await this.$axios.get(this.$api.url.selectOrderById,{params:{id:row.id}})
src/main.js
@@ -23,8 +23,7 @@
Vue.use(qs);
Vue.use(api);
// const javaApi = 'http://127.0.0.1:8001/'
const javaApi = 'http://127.0.0.1:8001/'
const javaApi = 'http://192.168.0.23:8001'