Fixiaobai
2023-11-09 45e7495fe17c3b390a6d0e2461f0b8f965d46f6f
	modified:   src/api/basic/param.js
modified: src/views/basic/company/index.vue
modified: src/views/basic/division/index.vue
modified: src/views/basic/factory/index.vue
modified: src/views/basic/param/index.vue
modified: src/views/basic/part/index.vue
modified: src/views/basic/template/index.vue
modified: src/views/common/param.vue
modified: src/views/common/ztt-table.vue
modified: src/views/technology/completeproductstructure/completeproductstructure-form.vue
modified: src/views/technology/completeproductstructure/index.vue
modified: src/views/technology/structure/index.vue
modified: src/views/technology/structure/single-structure-form.vue
已修改13个文件
288 ■■■■■ 文件已修改
src/api/basic/param.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/company/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/division/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/factory/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/param/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/part/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/template/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/param.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/ztt-table.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/completeproductstructure/completeproductstructure-form.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/completeproductstructure/index.vue 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/structure/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/structure/single-structure-form.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basic/param.js
@@ -24,6 +24,13 @@
    params: query
  })
}
export function pageInModel(query) {
  return request({
    url: '/mes/param/pageInModel',
    method: 'get',
    params: query
  })
}
export function getTechnologyParamPage(query, id) {
  return request({
    url: '/mes/param/param/page/' + id,
src/views/basic/company/index.vue
@@ -34,7 +34,7 @@
        multipleSelection: [],
        uploadInfo:{//是否展示上传EXCEL以及对应的url
          isShow:false,
          url:''
          url:'/mes/company/upload'
        },
        prelang:"operation",
        options: {
@@ -48,7 +48,8 @@
          seqNo:true,
          isShowHide:true,//是否显示显影按钮
          isSearch:false,//高级查询按钮
          isCopy: true,
          isCopy: false,
          isRefresh: true,
          defaultOrderBy:{column:'createTime',direction:'desc'}
        },
        table: {
src/views/basic/division/index.vue
@@ -40,6 +40,7 @@
        seqNo: true,
        isShowHide: true, // 是否显示显影按钮
        isSearch: false, // 高级查询按钮
        isRefresh: true,
        defaultOrderBy: { column: 'createTime', direction: 'desc' }
      },
      table: {
src/views/basic/factory/index.vue
@@ -39,7 +39,7 @@
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: false,
        url: ''
        url: '/mes/factory/'
      },
      prelang: 'operation',
      options: {
@@ -53,6 +53,7 @@
        seqNo: true,
        isShowHide: true, // 是否显示显影按钮
        isSearch: false, // 高级查询按钮
        isRefresh: true,
        defaultOrderBy: { column: 'createTime', direction: 'desc' }
      },
      table: {
src/views/basic/param/index.vue
@@ -267,32 +267,42 @@
      this.option.column.forEach(item => {
        if (row.paramItemThree == "" && item.prop == 'paramItemThree') {
          item.display = false
        }else if(row.paramItemThree != "" && item.prop == 'paramItemThree'){
          item.display = true
        }
        if (row.paramItemTwo == "" && item.prop == 'paramItemTwo') {
          item.display = false
        }else if(row.paramItemTwo != "" && item.prop == 'paramItemTwo'){
          item.display = true
        }
      })
      console.log(row);
      // let type=this.typeOptions.filter(t=>{
      //   return t.label==row.paramType
      // })[0]
      // row.paramType=type.value
      this.$refs.crud.rowEdit(row, index)
    },
    showDel(row, index) {
      this.$refs.crud.rowDel(row, index)
    },
    updateParam(row, index, done, loading) {
      // console.log(row);
      // this.formDisabled = true
      let data = {
        dict: '',
        id: 0,
        id: '',
        parameterFormat: '',
        parameterItem: '',
        type: row.paramType,
        unit: row.unit,
      }
      row.paramType == '2' ? data.dict = row.paramFormat : data.parameterFormat = row.paramFormat
      if (row.threeId) {
      if (row.threeId!="null") {
        data.id = row.threeId
        data.parameterItem = row.paramItemThree
      } else {
        if (row.twoId) {
        if (row.twoId!="null") {
          data.id = row.twoId
          data.parameterItem = row.paramItemTwo
        } else {
@@ -300,7 +310,14 @@
          data.parameterItem = row.paramItem
        }
      }
      console.log(data)
      if(data.type=='文本格式'){
        let type=this.typeOptions.filter(t=>{
        return t.label==row.paramType
      })[0]
      data.type=type.value
      }
      // console.log(data);
      // return
      putObj(data).then(res => {
        if (res.data.data.code == 0) {
          this.$message.success("更新成功")
@@ -353,6 +370,7 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      console.log("1111",row);
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row == null ? null : row.id)
src/views/basic/part/index.vue
@@ -5,10 +5,10 @@
        :prelang="prelang" :options="options" :bottomOffset="125" :ajaxFun="ajaxFun" ref="partTable">
        <template #toolbar></template>
      </ttable>
      <el-upload :headers="{'Authorization': 'Bearer ' + yourToken}" class="upload-demo" action="/mes/part/uploadExcel" :on-preview="handlePreview"
      <!-- <el-upload :headers="{'Authorization': 'Bearer ' + yourToken}" class="upload-demo" action="/mes/part/uploadExcel" :on-preview="handlePreview"
        :on-remove="handleRemove" :file-list="fileList" :on-success="fileUpload"  :limit="1">
        <el-button size="small" type="primary">点击Excel导入</el-button>
      </el-upload>
      </el-upload> -->
      <!-- 弹窗, 新增 / 修改 -->
      <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>
      <PrintLabelForm :currshowlist.sync="showPrintLabelForm" :printLabelInfo="printLabelInfo" />
@@ -52,7 +52,7 @@
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: true,
        url: '/mes/part/upload'
        url: '/mes/part/uploadExcel'
      },
      prelang: 'operation',
      options: {
@@ -66,6 +66,7 @@
        seqNo: true,
        isShowHide: true, // 是否显示显影按钮
        isSearch: false, // 高级查询按钮
        isRefresh: true,
        defaultOrderBy: { column: 'id', direction: 'desc' }
      },
      table: {
@@ -749,3 +750,8 @@
  }
}
</script>
<style>
.el-upload-dragger {
  width: 300px !important;
}
</style>
src/views/basic/template/index.vue
@@ -67,7 +67,7 @@
                align="center"
              >
              </el-table-column>
              <el-table-column
              <!-- <el-table-column
                label="参数类型"
                prop="type"
                align="center"
@@ -106,7 +106,7 @@
              </el-table-column>
              <el-table-column label="单位" prop="unit" align="center">
              </el-table-column>
              </el-table-column> -->
              <el-table-column label="操作" align="center">
                <template slot-scope="scope">
                  <el-button
@@ -444,6 +444,7 @@
    },
    // 添加
    relateOperationParam() {
      console.log(11111);
      if (this.templateId !== 0) {
        // 筛选出当前页面已有的参数
        this.paramSelArr = []
src/views/common/param.vue
@@ -31,7 +31,7 @@
  </el-dialog>
</template>
<script>
import { fetchList, delObj } from '@/api/basic/param'
import { fetchList, delObj ,pageInModel} from '@/api/basic/param'
import ttable from '@/views/common/ztt-table.vue'
import { mapGetters } from 'vuex'
import { remote } from '../../api/admin/dict'
@@ -59,7 +59,7 @@
  },
  data() {
    return {
      ajaxFun: fetchList,
      ajaxFun: pageInModel,
      currentRow: false,
      typeOptions: [],
      innerVisible: false,
@@ -110,37 +110,37 @@
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'type',
            label: '参数类型',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'select',
            formatter: this.getParam,
            optList: () => {
              return this.typeOptions
            }
          },
          {
            minWidth: '120',
            prop: 'parameterFormat',
            label: '参数格式',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'unit',
            label: '单位',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '140',
          //   prop: 'type',
          //   label: '参数类型',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'select',
          //   formatter: this.getParam,
          //   optList: () => {
          //     return this.typeOptions
          //   }
          // },
          // {
          //   minWidth: '120',
          //   prop: 'parameterFormat',
          //   label: '参数格式',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '120',
          //   prop: 'unit',
          //   label: '单位',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          {
            minWidth: '200',
            prop: 'createUser',
src/views/common/ztt-table.vue
@@ -480,10 +480,10 @@
    </el-dialog>
    <el-dialog title="导入" :visible.sync="importDialogVisible" width="22%">
      <span>
        <div>
          <div>
        <div style="width: 100%;">
          <div style="width: 100%;">
            <el-upload
              style="margin-left:8px;display: inline;"
              style="margin-left:8px;display: inline;width: 100%;"
              class="upload-demo"
              drag
              :headers="headers"
@@ -503,7 +503,7 @@
              <i class="el-icon-upload"></i>
              <div class="el-upload__text"><em>点击导入数据</em></div>
              <div class="el-upload__tip" slot="tip">
                只能上传xlsx/xls文件,且不超过10M<el-button
                只能上传xlsx/xls文件,且不超过30M<el-button
                  type="text"
                  style="font-size:15px;text-decoration: underline;"
                  @click="downDataTemplate"
@@ -1540,14 +1540,14 @@
      this.colSelectDialogVisible = true
      this.handleCheckedCol()
    },
    // 限制文件上传大小,目前限制为10M(另可以加类型限制)
    // 限制文件上传大小,目前限制为30M(另可以加类型限制)
    beforeAvatarUpload(file) {
      const fileName = file.name
      const fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
      const isLt10M = file.size / 1024 / 1024 < 10
      if (fileType !== 'xlsx' && fileType !== 'xls') {
        this.$message.error('文件格式只能为xlsx或xls,请删除后重新上传')
      const isLt10M = file.size / 1024 / 1024 < 30
      if (fileType !== 'xlsx' && fileType !== 'xls'&&fileType!=='csv') {
        this.$message.error('文件格式只能为xlsx或xls、csv,请删除后重新上传')
      }
      if (!isLt10M) {
        this.$message({
@@ -1568,6 +1568,7 @@
          type: 'success'
        })
        this.getDataList()
        this.importDialogVisible=false
      }
      this.$refs.uploadScan.clearFiles()
    },
@@ -1873,4 +1874,10 @@
  font-size: 14px;
  visibility: hidden;
}
.upload-demo{
  width: 100%;
}
.el-upload-dragger {
  width: 300px !important;
}
</style>
src/views/technology/completeproductstructure/completeproductstructure-form.vue
@@ -133,9 +133,9 @@
            :row-class-name="tableRowClassName"
          >
            <el-table-column type="selection" width="55"> </el-table-column>
            <el-table-column prop="partName" label="零件名" width="400">
            <el-table-column prop="partName" label="零件名" width="430">
            </el-table-column>
            <el-table-column prop="partNo" label="零件号" width="100">
            <el-table-column prop="partNo" label="零件号" width="120">
            </el-table-column>
            <el-table-column
              prop="originalQpa"
@@ -257,7 +257,7 @@
            default-expand-all
            class="preView-structure-table"
          >
            <el-table-column prop="partName" label="零件名" width="400">
            <el-table-column prop="partName" label="零件名" width="430">
            </el-table-column>
            <el-table-column
              prop="partNo"
src/views/technology/completeproductstructure/index.vue
@@ -140,58 +140,58 @@
            searchInfoType: 'text'
          },
          // 替代号
          {
            minWidth: '120',
            prop: 'alternativeNo',
            label: '替代号',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // // 替代号
          // {
          //   minWidth: '120',
          //   prop: 'alternativeNo',
          //   label: '替代号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 替代描述
          {
            minWidth: '120',
            prop: 'alternativeDesc',
            label: '替代描述',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // // 替代描述
          // {
          //   minWidth: '120',
          //   prop: 'alternativeDesc',
          //   label: '替代描述',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 绝缘颜色
          {
            minWidth: '120',
            prop: 'insulationColor',
            label: '绝缘颜色',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 护套颜色
          {
            minWidth: '120',
            prop: 'sheathColor',
            label: '护套颜色',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // // 绝缘颜色
          // {
          //   minWidth: '120',
          //   prop: 'insulationColor',
          //   label: '绝缘颜色',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // // 护套颜色
          // {
          //   minWidth: '120',
          //   prop: 'sheathColor',
          //   label: '护套颜色',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 特性1
          {
            minWidth: '120',
            prop: 'characteristicOne',
            label: '特性1',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'characteristicOne',
          //   label: '特性1',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 创建人
          {
            minWidth: '120',
src/views/technology/structure/index.vue
@@ -157,6 +157,15 @@
          // 零件号
          {
            minWidth: '140',
            prop: 'custom',
            label: '客户名称',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
          },
          {
            minWidth: '140',
            prop: 'partNo',
            label: '零件号',
            sort: true,
@@ -487,10 +496,11 @@
        this.$message.warning(response.msg)
      } else {
        this.$message({
          message: '上传成功',
          message: '上传成功,后台正在导入,请稍后重新刷新!',
          type: 'success'
        })
        this.getData()
        this.importStructureVisible=false
        // this.getData()
      }
      this.$refs.zhuangbeiUploadScan.clearFiles()
    },
src/views/technology/structure/single-structure-form.vue
@@ -10,10 +10,10 @@
      </div>
    </div>
    <div class="page-main">
      <div class="single-structure-basic" style="height: 22%;">
        <el-form :inline="true" :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes">
      <div class="single-structure-basic" style="height: 40%;width: 100%;">
        <el-form :inline="true" style="width: 100%;"  label-position="left" :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes">
          <el-row>
            <el-col :span="24">
            <el-col :span="24" style="display: flex; justify-content: space-around;">
              <el-form-item label="零件号" prop="partNo">
                <el-input v-model="dataForm.partNo" placeholder="请选择零件" @blur="checkPartNo()">
                  <el-button slot="append" icon="el-icon-search" @click="openPartDialog()"></el-button>
@@ -23,6 +23,10 @@
                <el-input v-model="dataForm.partName" placeholder="零件名称" :readonly="true">
                </el-input>
              </el-form-item>
              <el-form-item label="客户名称" prop="custom">
                <el-input v-model="dataForm.custom" placeholder="客户名称" :readonly="true">
                </el-input>
              </el-form-item>
              <el-form-item label="结构类型" prop="bomTypeDb">
                <el-select v-model="dataForm.bomTypeDb" placeholder="请选择结构类型" style="width:100%">
                  <el-option v-for="(item, index) in bomTypeDbOptions" :label="item.label" :value="item.value"
@@ -30,6 +34,7 @@
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
              <!-- <el-form-item label="替代" prop="alternativeNo">
                <el-input v-model="dataForm.alternativeNo"></el-input>
              </el-form-item>
@@ -40,6 +45,7 @@
                  v-model="dataForm.alternativeDesc"
                ></el-input>
              </el-form-item> -->
              <el-col :span="24" style="display: flex; justify-content: space-around;">
              <el-form-item label="版本号" prop="version">
                <el-input v-model="dataForm.version" disabled></el-input>
              </el-form-item>
@@ -52,6 +58,8 @@
              <el-form-item label="克重(kg)" prop="gramWeight">
                <el-input v-model="dataForm.gramWeight"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24" style="display: flex; justify-content: space-around;">
              <el-form-item label="浇口(kg)" prop="gateGramWeight">
                <el-input v-model="dataForm.gateGramWeight"></el-input>
              </el-form-item>
@@ -64,6 +72,8 @@
              <el-form-item label="回料比例(%)" prop="scale">
                <el-input v-model="dataForm.scale"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24" style="display: flex; justify-content: space-around;">
              <el-form-item label="烘料时间(h)" prop="dryingTime">
                <el-input v-model="dataForm.dryingTime"></el-input>
              </el-form-item>
@@ -76,13 +86,15 @@
              <el-form-item label="备注" prop="remark">
                <el-input type="textarea" :autosize="{ minRows: 1, maxRows: 3 }" v-model="dataForm.remark"></el-input>
              </el-form-item>
            </el-col>
              <!-- <el-form-item label="已同步至IFS" prop="ifsSync">
                <span
                  style="width: 146px;display: inline-block;font-size:12px;font-weight:bold;"
                  >{{ dataForm.ifsSync ? '是' : '否' }}</span
                >
              </el-form-item> -->
              <el-form-item label="默认结构" prop="master">
            <el-col :span="24" style="display: flex; justify-content: left;">
              <el-form-item label="默认结构" style="margin-left: 5%;" prop="master">
                <el-checkbox v-model="dataForm.master"></el-checkbox>
              </el-form-item>
            </el-col>
@@ -297,6 +309,7 @@
        partNo: null,
        partId: null,
        partName: null,
        custom: null,
        remark: null,
        bomTypeDb: 'M',
        alternativeNo: '*',
@@ -386,6 +399,7 @@
            if (resCode === 0) {
              this.dataForm.id = resData.id
              this.dataForm.partNo = resData.partNo
              this.dataForm.custom=resData.custom
              this.dataForm.partId = resData.partId
              this.dataForm.partName = resData.partName
              this.dataForm.remark = resData.remark