zouyu
2024-01-03 03be129c50068164b8cc4186d4d4e5b860503476
包装检验-默认检验项目
已修改2个文件
已添加1个文件
521 ■■■■■ 文件已修改
src/const/defaultPackageInspect.js 419 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/packageInspect-form.vue 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/rawMaterial-form.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/const/defaultPackageInspect.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,419 @@
//包装检验默认检验项
export const inspect1 = [
    {
        name: "产品型号核对",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "与装箱清单型号一致",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "产品数量清点",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "与装箱清单数量一致",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "产品啧头检查",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "与装箱清单内容一致,粘贴于显眼位置,没有损坏",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "产品包装检查",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "同一个型号产品单独包装",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "连帽颜色与文件要求一致",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "纸箱使用透明胶带或拉伸膜裹紧",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "木箱内部必须垫好泡沫纸。钉紧木箱,钢带扎紧",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "使用珍珠棉板固定插头、插座位置,固定插座尾线位置,用拉神膜将产品固定在珍珠面板内",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "发出产品不得出现任何形式的供应商信息,包括缆盘上的标签、电缆上供应商名称等",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
]
export const inspect2 = [
    {
        name: "外观(油漆件)",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "油漆面无明显破损、脏污等问题",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "零件型号",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "各类零件型号满足装箱清单上规定要求",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "零件数量",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "各零件数量满足装箱清单上规定的要求",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "有效期",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "对于有有效期的产品(胶水、发泡剂等),有效期需剩余6个月或者1/2总有效期",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            }
        ],
    },
    {
        name: "产品包装",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "所有零件均需进行单独包装(牛皮纸、自封袋、原装袋等)",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "包装袋无褶皱、破损、乱涂乱画,原装袋需去除产品信息",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "油状、液体、膏状物需有塑料瓶或者铁罐进行密封包装",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "电子元器件包装需有防静电功能,且外部有防震要求",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "有防潮要求的零件,包装内应添置干燥剂",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "如为定制化大物件,用拉伸膜或者珍珠棉进行全覆盖包裹",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
    {
        name: "产品装箱",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "如箱内物料在长度、宽度或高度方向含纸箱木箱内活动间隙>25mm时,需增加适量填充物",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "如产品为喷涂件需用泡面珍珠棉进行分隔保护",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "耐压、保护性低的零件在下部,需保护物品在上部",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
    {
        name: "标签标识",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "标签内容正确,包含(序号、零件描述、数量、型号、项目名称)",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "标签内容字体须清晰、统一,不得有重影、人为涂改",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "不得多贴或少贴,有外包装的产品,同一批次产品的标签粘贴位置和方向均一致",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
    {
        name: "唛头标识",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "唛头信息正确、内容包含(项目名称、产品型号、订单日期、生产日期、包装尺寸、数量、出厂、编号、单位、重量)",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "唛头印刷清晰,无重影、模糊、涂改等问题,切口平整,无弯曲、皱缩等现象",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "纸箱唛头粘贴在中间1/2H的高度区间内,横向居中",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "木箱唛头在木箱两侧,左上角张贴,禁止将啧头粘贴于木箱盖板上",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
    {
        name: "清单标识",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "清单信息内容(项目名称、产品名称、编号、箱号)与唛头对应一致",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "唛头粘贴应平整、不歪斜、不翘起、表面无损伤、无污染",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "木箱清单粘贴要求:清单塑封后粘贴在木箱前侧,张贴位置为左上角",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "纸箱清单粘贴要求:清单塑封后粘贴纸箱前侧(唛头旁边)",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
    {
        name: "其他",
        isEdit: false,
        randomId: Math.random(),
        children: [
            {
                required: "外包装纸箱封口时,如包装箱长度<700mm时,顶面、底面采用“工”字型封口,包装箱长度>700mm时,顶面、底面采用“王”字型封口(或采用“工”字型封箱)",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
            {
                required: "木箱一律用钢带打包,打包方式单排居中或双排平行,打包钢带应分布均匀、平行排放,不得歪斜",
                note: null,
                pid: null,
                presult: null,
                userName: null,
                randomId: Math.random(),
                isEdit: false,
            },
        ],
    },
]
src/views/quality/packageinspect/packageInspect-form.vue
@@ -63,13 +63,20 @@
        </el-form>
      </div>
      <div class="packageInspect-detail">
        <el-row :gutter="10" style="width:100%;z-index: 10;height:50px;">
            <el-col :sm="18" :lg="20">检验项目</el-col>
            <el-col :sm="3" :lg="2" >
              <el-button v-if="resultVal=='' || resultVal==null" size="small" @click="clickAddLine()">添加检验项目</el-button>
            </el-col>
            <el-col :sm="3" :lg="2">
              <el-button v-if="resultVal=='' || resultVal==null" style="width:100%" type="primary"  size="small"
        <el-row :gutter="10" style="width:100%;z-index: 10;height:30px;">
            <el-col :span="12">检验项目</el-col>
            <el-col :span="12" style="text-align: right;">
                <el-dropdown @command="handleCommand">
                    <el-button size="mini" style="margin-right: 10px;" type="primary" >
                        åˆ‡æ¢é»˜è®¤æ£€éªŒé¡¹<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="1">检验项目1</el-dropdown-item>
                        <el-dropdown-item divided command="2">检验项目2</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
              <el-button v-if="resultVal=='' || resultVal==null" size="mini" @click="clickAddLine()">添加检验项目</el-button>
              <el-button v-if="resultVal=='' || resultVal==null" type="primary" size="mini"
              @click="savePackIns()">保存</el-button>
            </el-col>
        </el-row>
@@ -90,19 +97,22 @@
                  </el-table-column>
                  <el-table-column prop="name" label="项目" width="160">
                    <template slot-scope="scope">
                        <el-input :readonly="resultVal!=null" v-if="scope.row.children" class="inline-input" style="width:80%;" v-model="scope.row.name"
                        <el-input :readonly="resultVal!=null || !scope.row.isEdit" v-if="scope.row.children" class="inline-input" style="width:80%;" v-model="scope.row.name"
                          placeholder="请输入项目名称"></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="required" label="要求" width="160" show-overflow-tooltip>
                  <el-table-column prop="required" label="要求" width="160">
                    <template slot-scope="scope">
                      <div v-if="!scope.row.children">
                      <el-input :readonly="resultVal!=null" v-model="scope.row.required"
                        <el-tooltip :content="scope.row.required">
                            <el-input :readonly="resultVal!=null || !scope.row.isEdit"
                            v-model="scope.row.required"
                        placeholder="请输入要求"></el-input>
                        </el-tooltip>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="note" label="检验描述" width="160" show-overflow-tooltip>
                  <el-table-column prop="note" label="检验描述" width="160">
                    <template slot-scope="scope">
                      <div v-if="!scope.row.children">
                        <el-input :readonly="resultVal!=null" v-model="scope.row.note" placeholder="检验描述"></el-input>
@@ -119,10 +129,10 @@
                  </el-table-column>
                  <el-table-column v-if="resultVal=='' || resultVal==null" fixed="right" style="background-color: white;" label="操作" width="200">
                    <template slot-scope="scope">
                      <el-button v-if="scope.row.children" icon="el-icon-circle-plus-outline" type="text" @click="clickAddChildren(scope.row,scope.$index)">添加行</el-button>
                      <el-button v-if="!scope.row.children" icon="el-icon-circle-close" type="text"
                      <el-button v-if="scope.row.children && scope.row.isEdit" icon="el-icon-circle-plus-outline" type="text" @click="clickAddChildren(scope.row,scope.$index)">添加行</el-button>
                      <el-button v-if="!scope.row.children && scope.row.isEdit" icon="el-icon-circle-close" type="text"
                      @click="clickDelLine(scope.row,scope.$index,scope.row.children!=null)">取消</el-button>
                      <el-button v-if="scope.row.children" icon="el-icon-circle-close" type="text"
                      <el-button v-if="scope.row.children && scope.row.isEdit" icon="el-icon-circle-close" type="text"
                      @click="clickDelLine(scope.row,scope.$index,scope.row.children!=null)">删除项目</el-button>
                    </template>
@@ -184,6 +194,7 @@
  updatePackageInspectById,
  getCustomer,
} from '@/api/quality/packageInspect'
import {inspect1,inspect2} from '@/const/defaultPackageInspect'
export default {
    computed:{},
    components:{
@@ -250,6 +261,16 @@
      }
    },
    methods:{
      handleCommand(command) {
        switch(command){
            case "1":
                this.init(inspect1)
            break;
            case "2":
                this.init(inspect2)
            break;
        }
      },
      changeResult(){
        let result = ''
        let data = this.list
@@ -322,12 +343,14 @@
          this.list.push({
            name: '',
            randomId: Math.random(),
            isEdit: true,
            children: [{
              name: '',
              note: '',
              required: '',
              result: '',
              randomId: Math.random(),
              isEdit: true,
            }]
          })
      },
@@ -339,6 +362,7 @@
            required: '',
            result: '',
            randomId: Math.random(),
            isEdit: true,
        })
      },
      // åˆ é™¤è¡Œ
@@ -392,22 +416,27 @@
          })
        }
      },
      init(){
        if(this.dataForm.id){
          fetchListById(this.dataForm.id).then(res=>{
      init(dataList){
        const _than = this
        if(_than.dataForm.id){
          fetchListById(_than.dataForm.id).then(res=>{
            let data = res.data.data
            this.dataForm.packInsNo = data.packInsNo
            this.dataForm.packageNo = data.packageNo
            this.dataForm.contractNo = data.contractNo
            this.dataForm.customerName = data.customerName
            this.dataForm.projectName = data.projectName
            this.dataForm.createTime = data.createTime
            this.dataForm.createUser = data.createUser
            this.list = []
            _than.dataForm.packInsNo = data.packInsNo
            _than.dataForm.packageNo = data.packageNo
            _than.dataForm.contractNo = data.contractNo
            _than.dataForm.customerName = data.customerName
            _than.dataForm.projectName = data.projectName
            _than.dataForm.createTime = data.createTime
            _than.dataForm.createUser = data.createUser
            _than.list = []
            let userNameList = []
            if(dataList){
                _than.list = JSON.parse(JSON.stringify(dataList))
            }
            data.packageInsProductS.forEach(item => {
              if (item.children) {
                    let ele = {
                      isEdit: true,
                      randomId: Math.random(),
                      name: null,
                      children: []
@@ -420,6 +449,7 @@
                      let o = {
                        name: item.name,
                        randomId: Math.random(),
                        isEdit: true,
                        required: obj.required,
                        pid: obj.pid,
                        note: obj.note?obj.note:'',
@@ -427,24 +457,24 @@
                      }
                      ele.children.push(o)
                    })
                    this.list.push(ele)
                    _than.list.push(ele)
                }
              })
              this.conclusionTable = [{
              _than.conclusionTable = [{
                packageNo: data.packageNo,
                userName: Array.from(new Set(userNameList)).join(','),
                result: null
              }]
              this.$nextTick(()=>{
                if(this.list.length>0){
                  this.changeResult()
              _than.$nextTick(()=>{
                if(_than.list.length>0){
                    _than.changeResult()
                }
              })
          }).catch(error=>{
            this.$message.error("获取失败",error)
            _than.$message.error("获取失败",error)
          })
        }else{
          this.conclusionTable = []
            _than.conclusionTable = []
        }
      },
    },
src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -115,14 +115,10 @@
        <el-tabs class="rawMaterial-detail" @tab-click="tabsClick">
          <el-tab-pane label="检验项目">
            <el-row style="width:100%;z-index: 10;height:50px;" v-if="resultVal==null">
                <el-col :sm="15" :lg="18"></el-col>
                <el-col :sm="3" :lg="2" style="text-align: right;">
                <el-col :span="12"></el-col>
                <el-col :span="12" style="text-align: right;">
                  <el-button v-if="dataForm.id==null" size="small" @click="clickAddLine()">添加检验项目</el-button>
                </el-col>
                <el-col :sm="3" :lg="2" style="text-align: right;">
                  <el-button class="pad-addcol-btn" v-if="resultVal==null || dataForm.id==null" size="small" @click="addTeatValueColumn()">添加检测值列</el-button>
                </el-col>
                <el-col :sm="3" :lg="2" style="text-align: right;">
                  <el-button v-if="resultVal==null || dataForm.id==null" size="small" @click="delTeatValueColumn()">删除检测值列</el-button>
                </el-col>
            </el-row>