zouyu
2023-09-11 7965761658b890fce87de832a1ae76cc82a3c33b
Merge branch 'master' of http://192.168.0.22:9001/r/mom-before
已修改5个文件
已添加2个文件
324 ■■■■■ 文件已修改
src/assets/api/controller.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/rawInsDetail.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/rawUnqualified/raw.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-box/bomClickAdd.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-table/bom.vue 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard.vue 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/unqualifiedManagement.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -27,7 +27,8 @@
}
//不合格原材料
const unqualifiedaa ={
    selectUnRawInspectsList: "/inspectUnaccepted/selectURawMaterials"
    selectUnRawInspectsList: "/inspectUnaccepted/selectURawMaterials", // æŸ¥è¯¢åŽŸææ–™ä¸åˆæ ¼å“æ£€éªŒå•åˆ—è¡¨
    evaluatePassOrNo: "/inspectUnaccepted/evaluatePassOrNo" // è¯„审
}
// æŸ¥è¯¢æˆå“ä¸åˆæ ¼å“ç®¡ç†
const unRawInspects ={
src/components/view/rawInsDetail.vue
@@ -118,7 +118,7 @@
          <el-col :span="7">
            <el-form-item label="供应商名称:">
              <el-input
                :placeholder="detailId !== null ? '' : '请输入检验数量'"
                :placeholder="detailId !== null ? '' : '请输入供应商名称'"
                :disabled="detailId !== null"
                v-model="detailInfo.supplier"
              ></el-input>
@@ -274,7 +274,7 @@
      <el-table :data="conclusionTable" style="100%">
        <el-table-column prop="code" label="物料编号"> </el-table-column>
        <el-table-column prop="name" label="物料名称"> </el-table-column>
        <el-table-column prop="uName" label="检验员">
        <el-table-column v-if="detailId != null" prop="uName" label="检验员">
          <template slot-scope="scope">
            <span
              v-for="item in scope.row.uName"
@@ -439,7 +439,11 @@
          this.projectTable = res.data.children;
          this.projectTable.forEach(i => {
            // è§£å†³é‡æ–°èµ‹å€¼æ— æ³•编辑操作
            this.$set(i, "testValueList", i.testValue.split(","));
            if (i.testValue == null) {
              this.$set(i, "testValueList", []);
            } else {
              this.$set(i, "testValueList", i.testValue.split(","));
            }
            // å–最长的列表数
            if (i.testValueList.length > this.empiricalValueAdd) {
              this.empiricalValueAdd = i.testValueList.length;
src/components/view/rawUnqualified/raw.vue
@@ -108,25 +108,61 @@
          </el-table-column>
          <el-table-column prop="deal_reasult" label="处理结果" width="100">
            <template slot-scope="scope">
              <span style="color:#34BD66;" v-if="scope.row.deal_reasult == 1"
              <span style="color:#E84738;" v-if="scope.row.deal_reasult == 0"
                >不通过</span
              >
              <span
                style="color:#E84738;"
                v-else-if="scope.row.deal_reasult == 0"
                style="color:#34BD66;"
                v-else-if="scope.row.deal_reasult == 1"
                >通过</span
              >
            </template>
          </el-table-column>
          <el-table-column label="操作" width="100">
            <template>
            <template slot-scope="scope">
              <div style="display: flex;">
                <el-button type="text" siae="small" size="mini">评审</el-button>
                <el-popover
                  placement="left"
                  width="160"
                  :ref="`popover-${scope.$index}`"
                >
                  <div style="padding: 6px">评审是否通过?</div>
                  <div style="text-align: right; margin: 6px;">
                    <el-button
                      size="mini"
                      type="text"
                      style="color: #E84738;"
                      @click="
                        scope._self.$refs[`popover-${scope.$index}`].doClose();
                        rawEvaluate(scope.row, 0);
                      "
                      >不通过</el-button
                    >
                    <el-button
                      type="text"
                      style="color: #34bd66;"
                      size="mini"
                      @click="
                        scope._self.$refs[`popover-${scope.$index}`].doClose();
                        rawEvaluate(scope.row, 1);
                      "
                      >通过</el-button
                    >
                  </div>
                  <el-button
                    slot="reference"
                    type="text"
                    siae="small"
                    size="mini"
                    >评审</el-button
                  >
                </el-popover>
                <el-button
                  type="text"
                  siae="small"
                  size="mini"
                  style=" color:87, 138, 193 ;"
                  style=" color:87, 138, 193 ; margin-left: 10px;"
                  >查看</el-button
                >
              </div>
@@ -165,7 +201,8 @@
        supplier: "" // ä¾›åº”商
      },
      unqualifiedTable: [], // é¡µé¢è¡¨æ ¼æ•°æ®
      total: 0
      total: 0,
      visible: false
    };
  },
  mounted() {
@@ -200,6 +237,17 @@
        supplier: "" // ä¾›åº”商
      };
      this.getDetailInfo();
    },
    rawEvaluate(row, passOrNo) {
      this.$axios
        .post(this.$api.url.evaluatePassOrNo, {
          rawId: row.id,
          passOrNo: passOrNo
        })
        .then(res => {
          this.unqualifiedTable = [];
          this.getDetailInfo();
        });
    }
  }
};
src/components/view/standard-box/bomClickAdd.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
<template>
    <div>
        1
    </div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/components/view/standard-table/bom.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,107 @@
<template>
    <div class="standard">
      <div>
            <el-table :data="tableData" height="800" row-key="id" border
            :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}"
              @selection-change="handleSelectionChange" default-expand-all
              :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
              <el-table-column type="selection" width="55">
              </el-table-column>
              <el-table-column type="index" width="60" label="序号">
              </el-table-column>
              <el-table-column prop="father" label="工序" sortable width="200px">
                <template slot-scope="scope">
                      <el-tag v-if="scope.row.children" type="primary">01</el-tag>
                      <span style="color: black">
                        {{ scope.row.father }}
                      </span>
              </template>
              </el-table-column>
              <el-table-column sortable label="工艺名称">
                <template slot-scope="scope">
                  <el-tag type="success" v-if="!scope.row.children">02</el-tag>
                  <span style="color: black">{{ scope.row.name  }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="mname" label="材料名称">
              </el-table-column>
              <el-table-column prop="specifications" label="规格">
              </el-table-column>
              <el-table-column prop="unit" label="单位">
              </el-table-column>
              <el-table-column prop="num" label="数量">
              </el-table-column>
              <!-- <el-table-column label="操作">
                <el-button style="color: rgb(137, 137, 229);">编辑</el-button>
              </el-table-column> -->
            </el-table>
          </div>
    </div>
  </template>
  <script>
    export default {
      data() {
        return {
          selects: []
        }
      },
      props:['tableData','tableType'],
      created() {
        console.log(this.tableData)
      },
      mounted() {
      },
      methods: {
        handleSelectionChange(val) {
          this.selects = val;
        }
      }
    }
  </script>
  <style scoped>
    .standard {
      width: 100%;
      height: 100%;
    }
  </style>
  <style>
    .standard * {
      font-size: 14px;
    }
    .standard .has-gutter .el-table__cell {
      background-color: #F0F1F5 !important;
      color: #333;
    }
    .standard .has-gutter .el-table__cell .cell {
      font-size: 16px;
      font-weight: 500;
    }
    .standard .cell {
      color: #333;
      padding-left: 17px !important;
    }
    .standard {
      width: 100%;
      height: 100%;
      overflow: auto;
    }
    .standard .el-table__body-wrapper {
      height: 100%;
    }
    .standard .el-table__body {
      height: 100%;
    }
    .standard .el-table .el-table__row:not([class*="el-table__row--level-"]) td:nth-child(3){
      padding-left: 23px !important;
     }
  </style>
src/components/view/standard.vue
@@ -7,15 +7,21 @@
          <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;"
            @click="bomAddModelVisible = true">新增</el-button>
          <el-button icon="el-icon-plus">新增版本</el-button>
          <el-button icon="el-icon-edit-outline">修改</el-button>
          <el-button icon="el-icon-delete">删除</el-button>
          <el-button @click="bomRightUp=true" icon="el-icon-edit-outline">修改</el-button>
          <el-button @click="bomRightDl=true" icon="el-icon-delete">删除</el-button>
        </el-col>
      </el-row>
    </div>
    <div class="thing">
      <div class="left">
        <el-input v-model="search" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable></el-input>
        <el-row>
          <el-col :span="21">
            <el-input v-model="search" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable></el-input>
          </el-col>
          <el-col :span="2">
            <el-button  size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button>
          </el-col>
        </el-row>
        <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
          node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current>
          <div class="custom-tree-node" slot-scope="{ node, data }">
@@ -59,21 +65,55 @@
          <target :tableType="tableType" :tableData="tableData"></target>
        </div>
        <div v-if="this.typeselect == 2">
          <material  :tableType="tableType" :tableData="tableData"></material>
          <bom  :tableType="tableType" :tableData="tableData"></bom>
        </div>
        <div v-if="this.typeselect == 3">生产工艺</div>
      </div>
    </div>
    <div class="bom-add-model">
      <el-dialog title="BOM新增" :visible.sync="bomAddModelVisible" width="30%">
        <el-form>
        </el-form>
        <div>
          <!-- ç‰©æ–™æ¸…单新增 -->
          <bomClickAdd v-if="typeselect===2"/>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button @click="bomAddModelVisible = false">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="bomAddModelVisible = false">ç¡® å®š</el-button>
        </span>
      </el-dialog>
      <!-- å·¦ä¾§ç‚¹å‡»+按钮 -->
      <el-dialog title="BOM新增" :visible.sync="bomLeftAdd" width="29%">
        <el-form ref="leftAdd" :model="leftAdd">
            <el-form-item label="类型">
              <el-cascader v-model="leftAdd.type" size="mini" style="width: 93%;" :options="formTypeOptions" :props="{ checkStrictly: true }" clearable></el-cascader>
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="bomLeftAdd = false">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="bomLeftAdd = false">ç¡® å®š</el-button>
        </span>
      </el-dialog>
            <!-- å³ä¸Šä¾§ç‚¹å‡»ä¿®æ”¹æŒ‰é’® -->
      <el-dialog title="BOM修改" :visible.sync="bomRightUp" width="30%">
        <el-form>
            ä¿®æ”¹
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="bomRightUp = false">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="bomRightUp = false">ç¡® å®š</el-button>
        </span>
      </el-dialog>
        <!-- å³ä¸Šä¾§ç‚¹å‡»åˆ é™¤æŒ‰é’® -->
      <el-dialog title="BOM删除" :visible.sync="bomRightDl" width="30%">
        <el-form>
            åˆ é™¤
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="bomRightDl = false">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="bomRightDl = false">ç¡® å®š</el-button>
        </span>
      </el-dialog>
    </div>
@@ -83,9 +123,11 @@
<script>
import technology from "./standard-table/technology.vue"
import material from "./standard-table/material.vue"
import target from "./standard-table/target.vue"
import bom from "./standard-table/bom.vue"
import bomClickAdd from '@/components/view/standard-box/bomClickAdd'
export default {
  components: { technology,material,target },
  components: { technology,material,bom,bomClickAdd },
  data() {
    return {
      // BOM树数据结构
@@ -96,14 +138,25 @@
      checkTreeNode: {},// ç‚¹å‡»é€‰ä¸­æ ‘节点
      tableData: [],
      bomAddModelVisible: false,// æŽ§åˆ¶bom新增模态框是否显示
      bomLeftAdd: false,
      bomRightUp: false,
      bomRightDl: false,
      formTypeOptions: null,
      typeselect: 0,
      returntree: {
        id:28,
      },
      version: {},
      leftAdd:{
        type: null,
        father: null,
        standard: null,
        name: null,
        specifications: null
      },
      VER: {},
      verdata: {},
      character: 0,
      character: 0
    }
  },
  // watch: {
@@ -120,6 +173,9 @@
    this.selectVersion()
  },
  methods: {
    startLeftAdd(){
    },
    selectDataList() {
                this.list.forEach(a => {
                    a.code = '[1]'
@@ -149,13 +205,14 @@
    },
    TYPE(val) {//类型.数据
      console.log(val);
      // console.log(val);
      this.typeselect = val
      // console.log(this.typeselect);
      this.selectVersion()
    },
    handleNodeClick(val) {//树的值
      console.log(val);
      // console.log(val);
      this.returntree = val
    },
    async selectVersion() {//版本
@@ -174,7 +231,6 @@
      })
      this.character=v
      this.VER="v"+v
      console.log(this.character);
      this.selectAll()
    },
    //右侧数据
@@ -187,7 +243,9 @@
        }
      }).then(res => {
        let arr = res.data;
        this.formatData(arr)
        for(var i=0;i<arr.length;i++){
            arr[i].id = "0" + i;
        }
        this.tableData = arr;
      })
    },
@@ -201,9 +259,9 @@
        }
    },
    verevent(val) {
      console.log(val);
      // console.log(val);
      let cc = val.replace('v', '')
      console.log(cc);
      // console.log(cc);
      this.character = cc
      this.selectAll()
      // const { v, ...newObj } = val;
@@ -213,7 +271,7 @@
    //五级树
    selectMaterialTree() {
      this.$axios.get(this.$api.url.selectTreeByMaterial).then( res => {
        this.list = res.data
        this.list=res.data
        this.list.forEach((el, idx, arr) => {
          if (idx == 0) {
            arr[idx].name = '成品'
@@ -240,6 +298,7 @@
      })
    },
    getDefault(arr, index) {
      console.log(arr);
            for (const item of arr) {
                if (item.children && item.children.length > 0) {
                    // æœ‰å­èŠ‚ç‚¹
@@ -289,7 +348,33 @@
          this.tableData = productList
          break;
      }
    },
    replaceProp(arr){
      for (let index = 0; index < arr.length; index++) {
        let element = arr[index];
        element.label=element.name
        element.value=element.name
        // if()
      }
    }
  },
  watch:{
    leftAdd: {
      handler(newVal, oldVal) {
      console.log("新的",newVal);
      console.log("旧的",oldVal);
      },
     deep: true // æ·±åº¦ç›‘听对象内部属性的变化,可选的
  },
  bomLeftAdd:{
    handler(newval,oldVal){
      if(newval){
       let treeOptions = JSON.parse(JSON.stringify(this.list));
       console.log(treeOptions);
      }
    }
  }
  }
}
</script>
src/components/view/unqualifiedManagement.vue
@@ -97,12 +97,12 @@
          </el-table-column>
          <el-table-column prop="deal_reasult" label="处理结果" width="100">
            <template slot-scope="scope">
              <span style="color:#34BD66;" v-if="scope.row.deal_reasult == 1"
              <span style="color:#E84738;" v-if="scope.row.deal_reasult == 0"
                >不通过</span
              >
              <span
                style="color:#E84738;"
                v-else-if="scope.row.deal_reasult == 0"
                style="color:#34BD66;"
                v-else-if="scope.row.deal_reasult == 1"
                >通过</span
              >
            </template>