王震
2023-09-12 9959d8447176df07707d8e19339c234c4d9d957e
订单bom
已修改7个文件
412 ■■■■ 文件已修改
src/assets/api/controller.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/equipmentmaintain.vue 321 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/laboratoryManagement.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/mbom.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/record-content.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/technical.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/technology.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -79,6 +79,7 @@
  deleteIdorFather: "/device/deleteIdorFather" // 删除树模块数据
}
//search_class:codeNameModel
// QMS计量管理
const measure = {
    measureLedgerPageTable: "/measureLedger/metering_table", // 计量预测-->分页表格
@@ -114,6 +115,7 @@
    selectAllMbom:"/mbomModel/selectAllMbom",//物料维护--》右边
    addMbom:"/mbomModel/addMbom",//物料--->新增
    material:"/mbomModel/delMbomById",//物料清单删除
    delAllMbom:"/mbom/delAllMbom",//批量删除
    selectAllTeque:"/techniqueModel/selectAllTeque",//生产工艺维护---。右边
@@ -135,6 +137,8 @@
    addQeMode:"/techniqueModel/addQeMode",//新增----》传参
    delQueById:"/techniqueModel/delQueById",//删除
    delAllQue:"/techniqueModel/delAllQue",//批量删除
    selecQueById:"/techniqueModel/selecQueById",//编辑
}
const url = {
    enter: "user/enter", //登录
src/components/view/equipmentmaintain.vue
@@ -17,12 +17,11 @@
            <el-dialog
            title="技术指标编辑"
            :visible.sync="modifyevent"
            width="40%"
            :before-close="handleClose">
            width="40%">
            <el-form ref="form" :model="form" label-width="80px">
                <el-form-item label="类型">
                    <template>
                        <el-select v-model="form.type" placeholder="请选择" >
                        <el-select v-model="edit.type" disabled placeholder="请选择"  style="width: 560px;">
                            <el-option label="橡胶连接器" :value="0"></el-option>
                            <el-option label="金属连接器" :value="1"></el-option>
                            <el-option label="湿插拔电连接器" :value="2"></el-option>
@@ -34,7 +33,7 @@
                    <el-col :span="11">
                        <el-form-item label="工序">
                            <template>
                        <el-select v-model="form.work"
                        <el-select v-model="edit.techFather"  disabled
                        placeholder="请选择" >
                            <el-option
                            v-for="item in process"
@@ -46,28 +45,63 @@
                        </template>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <el-form-item label="工艺">
                            <el-input v-model="edit.techName" :disabled="true" placeholder="请选择"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="设备">
                            <el-input v-model="form.father"  placeholder="请选择"></el-input>
                            <el-input v-model="edit.dname" disabled placeholder="请选择"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <el-form-item label="项目">
                            <el-input v-model="form.name"  placeholder="请输入项目"></el-input>
                            <!-- <el-input v-model="edit.father" :disabled="true" placeholder="请输入项目"></el-input> -->
                            <template>
                            <el-select v-model="edit.father" @change="projectApi" placeholder="请选择" >
                            <el-option
                            v-for="item in project"
                            :key="item.name"
                            :label="item.name"
                            :value="item.name">
                            </el-option>
                        </el-select>
                        </template>
                        </el-form-item>
                     </el-col>
                </el-row>
                <el-form-item label="单位">
                    <el-input v-model="form.unit"  placeholder="请输入单位" style="width: 220px;"></el-input>
                </el-form-item>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="指标">
                            <template>
                            <el-select v-model="edit.name" @change="scale" placeholder="请选择" >
                            <el-option
                            v-for="item in quota"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id">
                            </el-option>
                        </el-select>
                    </template>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <el-form-item label="单位">
                            <el-input v-model="unitrow" :value="unitrow" :disabled="true" placeholder="请输入项目"></el-input>
                        </el-form-item>
                     </el-col>
                </el-row>
                </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="modifyevent = false">取 消</el-button>
                <el-button type="primary" @click="modifyevent = false">确 定</el-button>
                <el-button type="primary" @click="editApi">确 定</el-button>
            </span>
            </el-dialog>
            </div>
@@ -76,12 +110,11 @@
            <el-dialog
            title="技术指标新增"
            :visible.sync="dialogVisible"
            width="40%"
            :before-close="handleClose">
            width="40%">
            <el-form ref="form" :model="form" label-width="80px">
                <el-form-item label="类型">
                    <template>
                        <el-select v-model="form.type" placeholder="请选择" style="width: 480px;">
                        <el-select v-model="form.type" placeholder="请选择" @change="edittype" style="width: 480px;">
                            <el-option label="橡胶连接器" :value="0"></el-option>
                            <el-option label="金属连接器" :value="1"></el-option>
                            <el-option label="湿插拔电连接器" :value="2"></el-option>
@@ -93,13 +126,27 @@
                    <el-col :span="11">
                        <el-form-item label="工序">
                            <template>
                        <el-select v-model="form.father"
                        <el-select v-model="form.father" @change="workevent"
                        placeholder="请选择" >
                            <el-option
                            v-for="item in process"
                            :key="item.name"
                            :label="item.name"
                            :value="item.name">
                            </el-option>
                        </el-select>
                        </template>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <el-form-item label="工艺名称">
                            <template>
                        <el-select v-model="form.craft" placeholder="请选择" >
                            <el-option
                            v-for="item in craftapi"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id">
                            </el-option>
                        </el-select>
                        </template>
@@ -113,9 +160,9 @@
                        <el-select v-model="form.work" placeholder="请选择" >
                            <el-option
                            v-for="item in higherlevel"
                            :key="item.name"
                            :key="item.devId"
                            :label="item.name"
                            :value="item.name">
                            :value="item.devId">
                            </el-option>
                        </el-select>
                        </template>
@@ -123,14 +170,47 @@
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <el-form-item label="项目">
                            <el-input v-model="form.name"  placeholder="请输入项目"></el-input>
                            <template>
                        <el-select v-model="form.ee" @change="projectApi" placeholder="请选择" >
                            <el-option
                            v-for="item in project"
                            :key="item.name"
                            :label="item.name"
                            :value="item.name">
                            </el-option>
                        </el-select>
                        </template>
                        </el-form-item>
                     </el-col>
                </el-row>
                <el-form-item label="单位">
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="指标">
                            <template>
                            <el-select v-model="form.aa" @change="scale" placeholder="请选择" >
                            <el-option
                            v-for="item in quota"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id">
                            </el-option>
                        </el-select>
                        </template>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <el-form-item label="单位">
                            <template>
                        <el-input v-model="unitrow" :disabled="true" placeholder="请输入单位" style="width: 200px;"></el-input>
                        </template>
                        </el-form-item>
                     </el-col>
                </el-row>
                <!-- <el-form-item label="单位">
                    <el-input v-model="form.unit"  placeholder="请输入单位" style="width: 220px;"></el-input>
                </el-form-item>
                </el-form-item> -->
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">取 消</el-button>
@@ -160,11 +240,14 @@
        <!-- 主体左 -->
            <div  class="left">
                <el-input v-model="search.technology" 
                @input="query"
                suffix-icon="el-icon-search" 
                placeholder="请输入搜索内容" 
                size="small" clearable ></el-input>
                    <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" highlight-current node-key="id" default-expand-all
                        highlight-current  :filter-node-method="filterNode"
                    <el-tree :data="list" ref="tree"
                    style="height: 500px;overflow-y: auto;"
                    :props="{children: 'children',label: 'name'}" highlight-current node-key="name" default-expand-all
                        @node-click="handleNodeClick"
                        >
                    <div class="custom-tree-node" slot-scope="{ node, data }">
@@ -197,30 +280,28 @@
                    <el-table-column
                    label="设备名称"
                    sortable
                    prop="dname"
                    width="300px">
                        <template slot-scope="scope">
                        <el-tag>
                        <!-- <el-tag>
                            <div class="firstDiv" :style="`color: ${scope.row.children ? '#16a7ff' : '#58c173'}`">
                            {{ scope.row.children  ? "01" : "02" }}
                            </div>
                        </el-tag>
                        <span style="children: black">{{ scope.row.name }}</span>
                        <span style="children: black">{{ scope.row.name }}</span> -->
                        <el-tag v-if="scope.row.children" type="primary">01</el-tag>
                        <span style="color: black" v-if="scope.row.children">
                        {{ scope.row.dname }}
                        </span>
                        </template>
                        </el-table-column>
                    <el-table-column
                    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>
                        <el-tag type="success" v-if="!scope.row.children">02</el-tag>
                        <span style="color: black" v-if="!scope.row.children">{{ scope.row.father  }}</span>
                        </template>
                        </el-table-column>
                        <el-table-column
@@ -228,7 +309,7 @@
                        label="单位">
                        </el-table-column>
                        <el-table-column
                        prop="address"
                        prop="name"
                        label="指标">
                        </el-table-column>
                        <el-table-column
@@ -236,9 +317,11 @@
                        label="操作"
                        width="200px">
                        <template slot-scope="scope" style="text-align: center;">
                        <el-button type="text" size="mini" @click="childrenClick(scope)">编辑</el-button>
                        <el-button type="text" size="mini" @click="deleteRow(scope.$index, tableData)">删除</el-button>
                        </template>
                            <div v-if="!scope.row.children">
                        <el-button type="text" size="mini" @click="childrenClick(scope.row)">编辑</el-button>
                        <el-button type="text" size="mini" @click="deleteRow(scope.$index, scope.row)">删除</el-button>
                            </div>
                    </template>
                    </el-table-column>
                </el-table>
            </div>
@@ -258,12 +341,17 @@
              options:[],
              process:[],
              list: [],
              TYpe:'',
              selects:'',
              process:{},
              options:{},
              craftapi:{},
              project:{},
              edit:{},
              upData:{
              },
              checkTreeNode:{
                id:2,
                id:1,
              },
                form:{
                    type:'',
@@ -271,13 +359,16 @@
                    work:'',
                    name:'',
                    unit:'',
                },
                modifyevent:false,
                dialogVisible:false,
                tableData: [],
                higherlevel:{},
                quota:{},
                unitrow:'',
            }
            
        },
@@ -303,12 +394,12 @@
                this.upIndex++
            },
            elForm() {},
            //新增
            choosePro() {//工序
            // //新增
            choosePro() {//项目
            this.$axios.get(this.$api.url.choosePro,{
                params:{techTemId:this.checkTreeNode.id}
            }).then(res => {
                this.process = res.data;
                this.project = res.data;
                console.log(this.process);
            }, {
                headers: {
@@ -328,6 +419,44 @@
                      }
            })
            },
            //新增
            edittype(val) {
                this.typeselect = val
                this.chooseTechFath()
            },
            projectApi(val) {
                console.log(val);
                let idx = this.project.findIndex(el => el.name === val)
                this.quota = this.project[idx].children
                console.log( this.quota);
            },
            scale(val) {
                console.log(val);
                let cc = this.quota.findIndex(el => el.id === val)
                console.log(cc);
                this.unitrow = this.quota[cc].unit
                console.log(this.unitrow);
            },
            workevent(val){
                console.log(val);
                let idx = this.process.findIndex(el => el.name === val)
                this.craftapi = this.process[idx].children
                console.log( this.craftapi);
            },
            chooseTechFath() {
            this.$axios.get(this.$api.url.chooseTechFath,{
                params:{type:this.typeselect}
            }).then(res => {
                this.process = res.data;
                console.log(this.process);
            }, {
                headers: {
                        "Content-Type": "application/json"
                      }
            }).then(res =>{
            })
            },
             //新增
             event(){
                this.dialogVisible = true
@@ -337,21 +466,54 @@
            //确认
            add() { 
                this.dialogVisible = false
                this.addQeMode()
            },
            addQeMode(){
                this.$axios.get(this.$api.url.addQeMode,{
                    devId:this.form.xxx,
                    techTemId:this.form.xxx,
                    technicalModelId:this.form.xxx,
                this.$axios.post(this.$api.url.addQeMode,{
                    devId:this.form.work,
                    techTemId:this.form.craft,
                    technicalModelId:this.form.aa,
                }, {headers: {"Content-Type": "application/json"}
                }).then(res =>{
                    this.selectAllTeque()
                    this.form = {}
                    this.unitrow = ""
                })
            },
           
            //编辑
            childrenClick() {
            childrenClick(ob) {
                this.modifyevent=true
                this.chooseTechFath()
                this.upData = ob
                this.selecQueById()
                this.choosePro()
            },
            TYpe() {
            //编辑 selecQueById
            selecQueById() {
                this.$axios.get(this.$api.url.selecQueById,{
                    params:{id:this.upData.id}
                }).then(res => {
                    console.log(res);
                    this.edit = res.data[0]
                    console.log(this.edit);
                    this.unitrow = this.edit.unit
                })
            },
            editApi() {
                this.modifyevent = false
                this.writeQueById()
            },
            writeQueById() {
                this.$axios.post(this.$api.url.writeQueById,{
                    devId:this.edit.did,
                    techTemId:this.edit.tid,
                    technicalModelId:this.edit.name,
                }, {headers: {"Content-Type": "application/json"}
                }).then(res =>{
                })
            },
            //========================
            TYpe(val) {
                this.typeselect = val
                this.selectAllleft()
            },
@@ -361,17 +523,24 @@
                this.selectAllTeque()
            },
             //查询
             query(val) {
                this.selectAllleft()
            },
             //主体左
             selectAllleft() {
            this.$axios.get(this.$api.url.selectAllleft,{
                params:{type:this.typeselect}
                params:{type:this.typeselect,message:this.search.technology}
            }).then(res => {
                this.list = res.data;
                console.log(this.list);
                this.selectDataList()
                this.$nextTick(() => {
                this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个
            })
            })
            },
            //主体右
            selectAllTeque() {
            this.$axios.get(this.$api.url.selectAllTeque,{
@@ -385,12 +554,34 @@
            modify(){
                this.modifyevent = true
            },
            deleteRow(index, rows) {
                rows.splice(index, 1);
            //delQueById
            delQueById() {
                this.$axios.post(this.$api.url.delQueById,{
                        id:this.upData.id
                }).then(res =>{
                    this.selectAllTeque()
                    this.$message.success('删除完成')
                })
            },
            deleteRow(index, row) {
                this.tableData.splice(index,1)
                this.upData.id = row.id
                console.log(this.upData.id);
                this.delQueById()
            },
            handleSelectionChange(val) {
                this.selects = val
            },
            //批量删除
            delAllQue() {
                this.$axios.post(this.$api.url.delAllQue,{
                        ids:this.delete
                }).then(res =>{
                    this.selectAllTeque()
                    this.$message.success('删除完成')
                })
            },
            dels() {
                this.selects.forEach(a => {
                    for (var b = 0; b < this.tableData.length; b++) {
@@ -400,18 +591,24 @@
                        }
                    }
                })
                let cc = this.selects.map(el => {
                    return el.id
                })
                this.delete = cc.join(',')
                console.log(this.delete);
                this.delAllQue()
                this.$message.success('删除完成')
            },
            handleClose(){
                        this.$confirm('确认关闭?')
                .then(_ => {
                    done();
                })
                .catch(_ => {})
            },
            filterNode(){
            // handleClose(){
            // //             this.$confirm('确认关闭?')
            // //     .then(_ => {
            // //         done();
            // //     })
            // //     .catch(_ => {})
            // // },
            // // filterNode(){
            },
            // },
          
        }
    }
src/components/view/laboratoryManagement.vue
@@ -555,7 +555,7 @@
    twoTreeApi() {
      this.$axios.get(this.$api.url.towTree,{
        params:{
            type:this.equip
            type:this.equip,
        }
      }).then(res => {
        // let list = res.data;
src/components/view/mbom.vue
@@ -136,10 +136,15 @@
        </div>
        <div class="thing">
            <div class="left">
                <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable ></el-input>
                <el-tree :data="list" ref="tree"  highlight-current
                <el-input v-model="search.technology" @input="query" suffix-icon="el-icon-search" placeholder="请输入搜索内容"  size="small" clearable ></el-input>
                <el-tree
                :data="list" ref="tree"
                style="height: 500px;overflow-y: auto;"
                highlight-current
                :props="{children: 'children',label: 'name'}" 
                node-key="id" default-expand-all  @node-click="handleNodeClick" >
                node-key="name"
                default-expand-all
                @node-click="handleNodeClick" >
                    <div class="custom-tree-node" slot-scope="{ node, data }">
                        <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i>
                            {{data.code}} {{ data.name }}</span>
@@ -183,7 +188,7 @@
            return {
              search:{
                    type: 0,
                    technology: null
                    technology: ''
                },
              list:[],
                process:{},
@@ -284,14 +289,22 @@
                this.typeselect = val
                this.selectAllleft()
            },
            query() {
                this.selectAllleft()
            },
            //左边
            selectAllleft() {
            this.$axios.get(this.$api.url.selectAllleft,{
                params:{type:this.typeselect}
                params:{type:this.typeselect,
                        message:this.search.technology
                }
            }).then(res => {
                this.list = res.data;
                console.log(this.list);
                this.selectDataList()
                this.$nextTick(() => {
                this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个
            })
            }, {
                headers: {
                        "Content-Type": "application/json"
@@ -347,6 +360,14 @@
                
                this.dialogVisible = false
            },
            //delAllMbom 批量删除
            delAllMbom() {
                this.$axios.post(this.$api.url.delAllMbom,{
                    ids:this.delete
                }).then(res =>{
                    this.selectAllMbom()
                })
            },
            dels() {
                this.selects.forEach(a => {
                    for (var b = 0; b < this.tableData.length; b++) {
@@ -356,6 +377,12 @@
                        }
                    }
                })
                let cc = this.selects.map(el => {
                    return el.id
                })
                this.delete = cc.join(',')
                console.log(this.delete);
                this.delAllMbom()
                this.$message.success('删除完成')
            },
            handleSelectionChange(val) {
src/components/view/record-content.vue
@@ -464,12 +464,13 @@
                        "Content-Type": "application/json"
                      }
                }
                )
                ).then(res =>{
                    this.selectjilu()
                })
            },
            add() {
                this.dialogVisible = false
                this.addRecord()
                this.selectjilu()
                this.form = {};
            },
            query() {
src/components/view/technical.vue
@@ -11,7 +11,7 @@
    <div class="search-header">
      <el-form v-model="searchData" :inline="true">
        <el-form-item label="订单号:">
          <el-input v-model="searchData.id"></el-input>
          <el-input v-model="searchData.id" ></el-input>
        </el-form-item>
        <el-form-item label="下单日期:">
          <el-date-picker
@@ -21,7 +21,16 @@
            placeholder="选择日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item>
        <el-form-item label="产品名称:">
          <el-input v-model="searchData.name" @input="query"></el-input>
        </el-form-item>
        <el-form-item label="编制状态:" >
          <el-select v-model="searchData.type" placeholder="全部" style="width: 310px;">
              <el-option label="待编制" :value="0"></el-option>
                            <el-option label="已编制" :value="1"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item >
                <el-button  plain @click="resetBtn">重 置</el-button>
                <el-button  @click="searchTechnical">查 询</el-button>
        </el-form-item>
@@ -222,7 +231,9 @@
    return {
       searchData:{
        id:'',
        date:''
        date:'',
        name:'',
        condition:'',
       },
       compiledata:{},
       technicalTable: [],
@@ -242,8 +253,6 @@
      authorizedstrength(row) {
        this.compiledata = row
        this.compile()
        // let ccc = row
        // console.log(row);
      },
      //编制
      compile() {
@@ -255,23 +264,35 @@
      })
        this.getTechnicalTableData()
      },
      async showDetails(row){
        this.showDetail = true
        const res = await this.$axios.get(this.$api.url.selectOrderById,{params:{id:row.id}})
        this.selectedRow = res.data
        console.log(this.selectedRow)
      },
      async  getTechnicalTableData() {
        const res = await this.$axios.get(this.$api.url.selectAllOrder,{
          params:{
            pageSize:(this.pageParams.pageNo-1),
            countSize:this.pageParams.pageSize,...this.searchData}})
            countSize:this.pageParams.pageSize,...this.searchData,
            orderCode:this.searchData.id,
            time:this.searchData.date,
            name:this.searchData.name,
            type:this.searchData.type,
          }
        })
        this.technicalTable = res.data.row
        this.pageParams.total = res.data.total
      },
      // 头部条件查询-重置
      resetBtn() {
        this.searchData={}
        this.getTechnicalTableData()
      },
      // 头部条件查询-查询
      searchTechnical() {
@@ -294,6 +315,9 @@
    height: 100%;
    width: 100%;
  }
  .el-form-item__label{
    padding: 0 60px 0;
  }
  .technical .title .el-button {
    height: 32px;
    border: 1px solid rgba(190, 190, 190, 0.44);
@@ -311,9 +335,12 @@
  background: #fff;
  padding: 24px 32px;
}
.search-header .el-form-item__label{
  padding: 0 30px 0 0;
}
.search-header .el-form-item{
  margin: 0px;
  font-size: 14px;
  font-size: 20px;
}
.search-header .el-form-item:nth-child(1){
  margin-right: 48px;
src/components/view/technology.vue
@@ -275,7 +275,7 @@
            <el-select
              v-model="edit.children"
              style="width: 310px"
              disabled
              multiple
              placeholder="请选择"
            >