zss
2024-01-11 17f0e644be8c98b547f6994a7e827d328e7b532e
Merge remote-tracking branch 'origin/master'
已修改9个文件
已添加4个文件
1247 ■■■■ 文件已修改
src/api/plan/manufacturingorder.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/packageInspectTemp.js 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/processinspect-part.vue 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/equipment/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/productorder-form.vue 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/productionschedul/index.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/index.vue 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageInspectTemplate/index.vue 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageInspectTemplate/inspect-detail.vue 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/packageInspect-form.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processInspect/processInspect-form.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/routing/routing-form.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/manufacturingorder.js
@@ -24,6 +24,15 @@
    data: obj
  })
}
export function changeOrder(obj) {
  return request({
    url: '/mes/plan/manufacturingOrder/changeOrder',
    method: 'post',
    data: obj
  })
}
export function refreshIfsOrderNo(obj) {
  return request({
    url: '/mes/plan/manufacturingOrder/refreshIfsOrderNo',
src/api/quality/packageInspectTemp.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
import request from '@/router/axios'
export function getList(query){
    return request({
        url: '/mes/qualityPackageInspectTemp/page',
        method: 'get',
        params: query
    })
}
export function getInspectList(id){
    return request({
        url: '/mes/qualityPackageInspectTemp/pageInspect/'+id,
        method: 'get',
    })
}
export function getAllTemplateByEnable(){
    return request({
        url: '/mes/qualityPackageInspectTemp/getAllTemplateByEnable',
        method: 'get',
    })
}
export function addTemplate(data){
    return request({
        url: '/mes/qualityPackageInspectTemp/addTemplate',
        method: 'post',
        params: data
    })
}
export function updateTemplate(data){
    return request({
        url: '/mes/qualityPackageInspectTemp/updateTemplate',
        method: 'post',
        params: data
    })
}
export function addInspect(data){
    return request({
        url: '/mes/qualityPackageInspectTemp/addInspect',
        method: 'post',
        params: data
    })
}
export function updateInspect(data){
    return request({
        url: '/mes/qualityPackageInspectTemp/updateInspect',
        method: 'post',
        params: data
    })
}
export function delTemplate(id){
    return request({
        url: '/mes/qualityPackageInspectTemp/deleteTemplate/'+id,
        method: 'post',
    })
}
export function deleteInspect(id){
    return request({
        url: '/mes/qualityPackageInspectTemp/deleteInspect/'+id,
        method: 'post',
    })
}
src/views/common/processinspect-part.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,258 @@
<template>
    <div class="body">
      <el-dialog
        v-diadrag
        width="60%"
        title="报检信息"
        top="5vh"
        :visible.sync="innerVisible"
        append-to-body
        @close="$emit('update:currshowlist', false)"
        :show="currshowlist"
        class="part-dialog"
        id="rawMaterial-part-dialog"
      >
        <ttable
          :table="table"
          @handleSelectionChange="handleSelectionChange"
          @currentChange="handleCurrentChange"
          :uploadInfo="uploadInfo"
          :prelang="prelang"
          :options="options"
          :bottomOffset="150"
          :ajaxFun="ajaxFun"
          :paramObj="paramObj"
          :isShowPagination="false"
          ref="rawPartTable"
        >
          <template #toolbar></template>
        </ttable>
        <div slot="footer" class="dialog-footer">
          <el-button @click="innerVisible = false">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="saveSelectRow">ç¡® å®š</el-button>
        </div>
      </el-dialog>
    </div>
    </template>
    <script>
    import ttable from '@/views/common/ztt-table'
    import { chooseIFS } from '@/api/quality/rawMaterial'
    export default {
      props: {
        currshowlist: {
          type: Boolean,
          default: false
        },
        paramObj: {
          type: Object,
          default: () => {
            return {}
          }
        },
        multiSelect: {
          type: Boolean,
          default: false
        },
        parentSelectedObj: {
          type: Object,
          default: null
        },
        parentSelectedIndex: {
          type: Number,
          default: null
        }
      },
      data() {
        return {
          ajaxFun: chooseIFS,
          innerVisible: false,
          currentRow: null,
          multipleSelection: [],
          uploadInfo: {
            // æ˜¯å¦å±•示上传EXCEL以及对应的url
            isShow: false,
            url: ''
          },
          prelang: 'operation',
          options: {
            height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
            stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
            highlightCurrentRow: false, // æ˜¯å¦è¦é«˜äº®å½“前行
            border: true, // æ˜¯å¦æœ‰çºµå‘边框
            lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
            fit: true, // åˆ—的宽度是否自撑开
            multiSelect: false, //
            seqNo: true,
            isGeneralSearch: false,
            isRefresh: false, // æ˜¯å¦æ˜¾ç¤ºåˆ·æ–°æŒ‰é’®
            isShowHide: false, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®
            isSearch: false, // é«˜çº§æŸ¥è¯¢æŒ‰é’®
            defaultOrderBy: { column: 'formTime', direction: 'desc' }
          },
          table: {
            total: 0,
            currentPage: 1,
            pageSize: 20,
            data: [],
            // æ ‡é¢˜
            column: [
              {
                minWidth: '100',
                prop: 'message',
                label: 'message',
                isTrue: false,
              },
              {
                minWidth: '100',
                prop: 'code',
                label: '零件号',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '120',
                prop: 'projectName',
                label: '项目名称',
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
             },
              {
                minWidth: '100',
                prop: 'name',
                label: '原材料名称',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'formTime',
                label: '来料日期',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'specs',
                label: '规格型号',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'unit',
                label: '单位',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'supplier',
                label: '供应商',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'number',
                label: '数量',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
            ],
          },
        }
      },
      components: {
        ttable
      },
      created(){
      },
      mounted() {
        console.log(this.currshowlist,"开");
      },
      // props:['currentRow'],
      methods: {
        getData() {
          if (this.$refs.rawPartTable !== undefined) {
            this.$refs.rawPartTable.getDataList()
          }
        },
        saveSelectRow() {
          if (this.multiSelect) {
            this.$emit('handleSelectionChange', this.multipleSelection)
          } else {
            this.$emit(
              'listenToPartEvent',
              this.currentRow,
              this.parentSelectedObj,
              this.parentSelectedIndex
            )
          }
          this.innerVisible = false
          this.$parent.costPlannedAmountChange(this.currentRow)
        },
        handleCurrentChange(row) {
          this.currentRow = row
        },
        handleSelectionChange(val) {
          // å¤šè¡Œé€‰ä¸­
          this.multipleSelection = val
        },
      },
      watch: {
        currshowlist() {
            console.log(this.currshowlist,"开?");
          this.innerVisible = this.currshowlist
          if (this.currshowlist) {
            this.$nextTick(() => {
              // this.table.data=[]
              this.getData()
            })
          }
        }
      },
    }
    </script>
    <style>
    .part-dialog .el-dialog__header {
      padding: 10px 20px 10px;
    }
    .part-dialog .el-dialog__header .el-dialog__headerbtn {
      top: 10px;
    }
    .part-dialog .el-dialog__body {
      padding: 5px 20px;
    }
    .part-dialog .el-dialog__footer {
      padding: 5px 20px 10px;
    }
    .part-dialog .el-dialog__body .avue-crud__pagination {
      margin-top: 0px;
      margin-bottom: 5px;
    }
    /* @media screen and (max-width: 800px) {
      .el-dialog {
        height: 600px !important;
      }
    } */
    </style>
src/views/equipment/equipment/index.vue
@@ -306,7 +306,7 @@
                printable: 'printRaw',//页面
                type: "html",//文档类型
                  maxWidth:450,
                  targetStyles:['*'],
                  targetStyles:['*'],
                  style: `@page {
                    margin:0;
                    padding: 0;
@@ -329,7 +329,7 @@
    pullEquipFun(){
      this.table.toolbar.find((e) => e.text === '同步').loading = true
      pullEquip().then(res=>{
        this.$message.success(res.data.data.msg)
        this.$message.success(res.data.msg)
        this.table.toolbar.find((e) => e.text === '同步').loading = false
      }).catch(error=>{
        this.$message.error("同步失败",error)
src/views/plan/manufacturingorder/productorder-form.vue
@@ -265,11 +265,22 @@
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="24" class="productorder-operates-col">
                        <el-card class="productorder-operates">
                          <el-table
                        <el-card class="productorder-operates" >
                          <el-row>
                            <el-col :span="2" class="frame1">序号
                            </el-col>
                            <el-col :span="4" class="frame1">工序号
                            </el-col>
                            <el-col :span="5" class="frame1">工序描述
                            </el-col>
                            <el-col :span="9" class="frame1">零件
                            </el-col>
                            <el-col :span="3" class="frame1">操作
                            </el-col>
                          </el-row>
                          <!-- <el-table
                            ref="operationTable"
                            :data="operations"
                            style="width: 100%;"
@@ -317,10 +328,56 @@
                                </el-button>
                              </template>
                            </el-table-column>
                          </el-table>
                          </el-table> -->
                          <zttdraggable
                            :forceFallback="true"
                            :list="operations"
                            :animation="200"
                            fallbackClass="fallbackStyle"
                            ghostClass="item_ghost"
                            @end="dragEnd"
                          >
                            <div
                              :class="{ dragItem: true, active: x.active }"
                              v-for="(x, i) in operations"
                              :key="i"
                            >
                              <!-- <div class="dragBody">
                                <div class="info">{{ x.operationNo }}</div>
                                <div class="info">{{ x.operationName }}</div>
                                <div class="info">{{ x.partName }}</div>
                              </div> -->
                              <el-row>
                                <el-col :span="2" class="frame">{{ i+1 }}
                                </el-col>
                                <el-col :span="4" class="frame">{{ x.operationNo  }}
                                </el-col>
                                <el-col :span="5" class="frame">{{ x.operationName }}
                                </el-col>
                                <el-col :span="9" class="frame">{{ x.partName }}
                                </el-col>
                                <el-col :span="3" class="frame">
                                    <el-button
                                      type="text"
                                      size="mini"
                                      @click="openOrderOperation(x)"
                                      >编辑
                                    </el-button>
                                </el-col>
                              </el-row>
                            </div>
                          </zttdraggable>
                        </el-card>
                      </el-col>
                    </el-row>
                  </el-col>
                  <el-col :span="16">
                    <el-tabs type="card" ref="paramTabs">
@@ -926,7 +983,27 @@
    />
  </div>
</template>
<style>
<style lang="scss">
.frame{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    // border-width: 1px;
    // border-color: rgb(129, 129, 129);
    // border-style: solid;
    font-size: 15px;
}
.frame1{
  display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    // border-width: 1px;
    // border-color: rgb(129, 129, 129);
    // border-style: solid;
    font-size: 15px;
}
.productorder-basic {
  background-color: #fff;
  height: 150px;
@@ -965,6 +1042,7 @@
.productorder-operates {
  height: 605px;
  border: 1px solid #ddd;
  overflow: auto;
}
.productorder-params-template {
@@ -1016,7 +1094,8 @@
  addRoutingTemplateParamLedForOrder,
  updateMoBom,
  delMoBom,
  bomSelectChange
  bomSelectChange,
  changeOrder,
} from '@/api/plan/manufacturingorder'
import { qryMoSamplingRule, delMoSamplingRule } from '@/api/plan/mosamplingrule'
import {
@@ -1046,7 +1125,7 @@
import spotCheckRule from './orderSpotCheckRule'
import spotCheckRuleEdit from './orderSpotCheckRuleEdit'
import { mapGetters } from 'vuex'
import zttdraggable from 'vuedraggable'
export default {
  components: {
    CustomerOrder,
@@ -1062,7 +1141,8 @@
    operationDialog,
    insertOperationDialog,
    spotCheckRule,
    spotCheckRuleEdit
    spotCheckRuleEdit,
    zttdraggable
  },
  data() {
@@ -1332,6 +1412,28 @@
    }
  },
  methods: {
    dragEnd(e){
      this.operations.forEach((e, i) => {
        e.index = i + 1
        e.operationOrder = i+1
      })
      console.log(this.operations,"拖拽结束kk");
      this.dragEndstart()
    },
    dragEndstart(){
        let data = this.operations.map(el =>{
            return {
              id:el.id,
              operationOrder:el.operationOrder,
            }
        })
      console.log(data,"id");
        changeOrder(data).then((res) =>{
            console.log(res,"回调");
        }).catch(error => {
                    console.error(error)
                });
    },
    getSysParam(paramKey) {
      getSysParam(paramKey).then((response) => {
        var paramVal = response.data.data
src/views/plan/productionschedul/index.vue
@@ -10,37 +10,37 @@
                <div>
                  <el-button @click="tagFinished" size="mini" round type="success">标记已完成</el-button>
                  <el-button size="mini" round type="primary"
                  v-if="permissions.plan_productionschedul_edit_line"
                  v-if="permissions.plan_productionschedul_edit_line"
                  @click="openEditDialog">编辑时间线</el-button>
                  <el-tooltip content="刷新">
                    <el-button circle icon="el-icon-refresh" @click="getDataList"></el-button>
                  </el-tooltip>
                </div>
              </div>
              <avue-crud
              <avue-crud
              class="unfinished-crud"
              :data="tableData"
              ref="crud"
              :option="option"
              :span-method="spanMethod"
              :data="tableData"
              ref="crud"
              :option="option"
              :span-method="spanMethod"
              @refresh-change="getDataList"
              @current-change="handleCurrentChange"
              @size-change="handleSizeChange"
              :page="page"
              :page="page"
              @selection-change="selectionRow"
              :table-loading="loading">
              <template #menu="{ row, index }">
                <el-button
                v-if="permissions.plan_productionschedul_edit"
                type="text"
                icon="el-icon-edit"
                size="small"
                <el-button
                v-if="permissions.plan_productionschedul_edit"
                type="text"
                icon="el-icon-edit"
                size="small"
                @click="editHandle(row, index)">编辑</el-button>
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                @click="deleteHandle(row, index)">删除</el-button>
              </template>
              </avue-crud>
@@ -51,23 +51,23 @@
              <div style="display:flex;height:36px;justify-content: space-between;align-items:center;">
                <div><span style="color:#34BD66;font-weight: bold;">已完成</span></div>
              </div>
              <avue-crud
              <avue-crud
              class="finished-crud"
              :data="finishedTableData"
              ref="finished"
              :option="finishedOption"
              :span-method="spanMethod"
              :data="finishedTableData"
              ref="finished"
              :option="finishedOption"
              :span-method="spanMethod"
              @refresh-change="getFinishedData"
              @current-change="handleCurrentChange"
              @size-change="handleSizeChange"
              :page="finishedPage"
              :page="finishedPage"
              @selection-change="selectionFinishedRow">
              <!-- <template #menu="{ row, index }">
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                @click="deleteHandle(row, index)">删除</el-button>
              </template> -->
              </avue-crud>
@@ -129,7 +129,7 @@
                      style="width:100%"
                      v-model="item.planTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      type="datetime"
                      placeholder="选择日期时间">
                    </el-date-picker>
                  </el-col>
@@ -143,7 +143,7 @@
                      style="width:100%"
                      v-model="item.actualTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      type="datetime"
                      placeholder="选择日期时间">
                    </el-date-picker>
                  </el-col>
@@ -454,7 +454,7 @@
      }, {
        prop: 'contractNo',
        span: []
      },
      },
      {
        prop: 'orderTime',
        span: []
src/views/quality/Packaging_ledger/index.vue
@@ -33,7 +33,7 @@
                    </el-col>
                    <el-col :span="2">
                    <el-button
                        v-if="permissions.quality_packaging_ledger_info_save"
                        v-if="!isCheck && permissions.quality_packaging_ledger_info_add"
                        style="float: right; padding: 3px 0"
                        type="text"
                        @click="addpreserve"
@@ -52,75 +52,75 @@
                </el-row>
                </div>
                <el-table
              :data="testStandardParams"
              id="testStandardParamTable"
              ref="testStandardParam"
                    :data="testStandardParams"
                    id="testStandardParamTable"
                    ref="testStandardParam"
              highlight-current-row
              height="700"
              style="width: 100%"
              class="l-mes-table"
              border
              stripe
            >
              <el-table-column
                type ="index"
                label="序号"
                align="center"
                width="50"
              />
              <el-table-column
                label="产品"
                prop="product"
                show-overflow-tooltip
                align="center"
              />
              <el-table-column
                label="产品编号"
                prop="productNo"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="批次号"
                prop="outBatchNo"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="规格型号"
                prop="specs"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="单位"
                prop="unit"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="数量"
                prop="number"
                align="center"
                show-overflow-tooltip
                width="80"
              ></el-table-column>
              <el-table-column
                v-if="permissions.quality_packaging_ledger_info_operate"
                fixed="right"
                label="操作"
                align="center"
                width="80">
                <template slot-scope="scope">
                  <el-button type="text" @click="deleteadd(scope.row)" icon="el-icon-delete"  size="small">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
                    highlight-current-row
                    height="700"
                    style="width: 100%"
                    class="l-mes-table"
                    border
                    stripe
                  >
                    <el-table-column
                      type ="index"
                      label="序号"
                      align="center"
                      width="50"
                    />
                    <el-table-column
                      label="产品"
                      prop="product"
                      show-overflow-tooltip
                      align="center"
                    />
                    <el-table-column
                      label="产品编号"
                      prop="productNo"
                      show-overflow-tooltip
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column
                      label="批次号"
                      prop="outBatchNo"
                      show-overflow-tooltip
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column
                      label="规格型号"
                      prop="specs"
                      show-overflow-tooltip
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column
                      label="单位"
                      prop="unit"
                      show-overflow-tooltip
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column
                      label="数量"
                      prop="number"
                      align="center"
                      show-overflow-tooltip
                      width="80"
                    ></el-table-column>
                    <el-table-column
                      v-if="permissions.quality_packaging_ledger_info_operate"
                      fixed="right"
                      label="操作"
                      align="center"
                      width="80">
                      <template slot-scope="scope">
                        <el-button type="text" @click="deleteadd(scope.row)" icon="el-icon-delete"  size="small">删除</el-button>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-card>
            </el-col>
        </el-row>
@@ -184,6 +184,7 @@
          isCheck: false,
          dataway:{},
          goid:'',
          datalist:[],
          testStandardParams: [],
          packageBoxId:{},
            prelang: 'operation',
@@ -435,18 +436,21 @@
        }
      },
      preserve(datalist){
        this.testStandardParams = datalist
       this.testStandardParams = this.testStandardParams.concat(datalist);
       console.log(this.testStandardParams,"---------start");
       this.datalist = datalist
      },
      //右边保存
      addpreserve(){
         this.testStandardParams.forEach(el => {
         this.datalist.forEach(el => {
              el.packageBoxId =this.goid
         });
         console.log(this.testStandardParams);
         console.log(this.datalist);
  //       return
        saveList(this.testStandardParams).then((res) =>{
        saveList(this.datalist).then((res) =>{
          if(res.status===200){
            this.$message.success('保存成功')
            this.datalist = null
            this.rightquery()
          }
        }).catch(error=>{
src/views/quality/packageInspectTemplate/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,211 @@
<template>
  <div>
    <basic-container>
        <avue-crud
        :data="list"
        style="width:98%"
        :option="option"
        :page="page"
        @row-save="saveTemplate"
        @current-change="currentChange"
        @size-change="sizeChange">
            <template slot="state" slot-scope="scope">
                <el-tag :type="scope.row.state ? 'success':'danger'">{{scope.row.state ? '启用':'禁用'}}</el-tag>
            </template>
            <template slot="stateForm" slot-scope="scope">
                <el-switch
                    v-model="scope.row.state"
                    active-color="#13ce66"
                    :active-value="true"
                    :inactive-value="false">
                </el-switch>
            </template>
            <template #menu="{size,row,index}">
                <el-button class="menu-button" :size="size" @click="showInspectDialog(size,row,index)" type="text" icon="el-icon-set-up">检验项</el-button>
                <el-button class="menu-button" :size="size" @click="updateTemplate(size,row,index)" type="text" icon="el-icon-edit">编辑</el-button>
                <el-button class="menu-button" :size="size" @click="deleteTemplate(size,row,index)" type="text" icon="el-icon-delete">删除</el-button>
            </template>
        </avue-crud>
    </basic-container>
    <el-dialog
    title="编辑模板信息"
    :visible.sync="updateDialog"
    width="40%">
        <el-form :model="updateData" label-width="100px" :inline="true"
            label-position="right" ref="updateTemplate" :rules="updateRules">
            <el-form-item label="模板名称" prop="templateName">
                <el-input v-model="updateData.templateName" placeholder="请输入模板名称"></el-input>
            </el-form-item>
            <el-form-item label="是否启用" prop="state">
                <el-switch
                    v-model="updateData.state"
                    active-color="#13ce66"
                    :active-value="true"
                    :inactive-value="false">
                </el-switch>
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button type="primary" icon="el-icon-circle-plus-outline" @click="confirmUpdate">保 å­˜</el-button>
            <el-button icon="el-icon-remove-outline" @click="updateDialog = false">取 æ¶ˆ</el-button>
        </span>
    </el-dialog>
    <inspectDetail v-if="isShow" :paramObj="paramObj" :currshowlist.sync="showDetail"></inspectDetail>
  </div>
</template>
<script>
import inspectDetail from './inspect-detail'
import {getList,addTemplate,updateTemplate,delTemplate} from '@/api/quality/packageInspectTemp'
export default {
    data(){
        return {
            isShow: false,
            paramObj:{
                id: null,
            },
            showDetail: false,
            updateData:{
                templateName: null,
                state: null,
            },
            updateRules:{
                templateName:[{required:true,message:'请输入模板名称',trigger:'blur'}]
            },
            updateDialog: false,
            list: [],
            page:{
                currentPage: 1,
                pageSize: 20,
                total: 0
            },
            option: {
                dialogWidth: '40%',
                menu: true,
                addBtn: true,
                editBtn: false,
                delBtn: false,
                border: true,
                index: true,
                height: 400,
                indexLabel: '序号',
                align: 'center',
                refreshBtn: false,
                columnBtn: false, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®H
                headerAlign: 'center',
                column: [{
                    label: '模板名称',
                    prop: 'templateName',
                    overHidden: true,
                    rules:[{required:true,message:'模板名称不能为空',trigger:'blur'}]
                }, {
                    label: '是否启用',
                    prop: 'state',
                    overHidden: true,
                    slot: true,
                    formslot: true,
                    value: true,
                }]
            }
        }
    },
    created(){
        this.getDataList()
    },
    components:{
        inspectDetail
    },
    methods:{
        deleteTemplate(size,row,index){
            const _than = this
            this.$confirm('此操作将永久删除该模板, æ˜¯å¦ç»§ç»­?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
            type: 'warning'
            }).then(() => {
                delTemplate(row.id).then(res=>{
                    if(res.status===200){
                        _than.$message.success("删除成功")
                        _than.getDataList()
                    }
                }).catch(error=>{
                    console.error(error)
                })
            }).catch(() => {});
        },
        showInspectDialog(size,row,index){
            this.paramObj.id = row.id
            this.isShow = true
            this.$nextTick(()=>{
                this.showDetail = true
            })
        },
        updateTemplate(size,row,index){
            console.log(row);
            this.updateData = JSON.parse(JSON.stringify(row))
            this.updateDialog  =true
        },
        confirmUpdate(){
            const _than = this
            this.$refs.updateTemplate.validate(valid=>{
                if(valid){
                    let data = {
                        id:this.updateData.id,
                        templateName:this.updateData.templateName,
                        state:this.updateData.state
                    }
                    updateTemplate(data).then(res=>{
                        if(res.status===200){
                            _than.$message.success("更新成功")
                            _than.getDataList()
                            _than.updateDialog = false
                        }
                    }).catch(error=>{
                        console.error(error)
                    })
                }
            })
        },
        saveTemplate(row, done, loading){
            addTemplate(row).then(res=>{
                if(res.status===200){
                    this.$message.success("添加成功")
                    this.getDataList()
                }
            }).catch(error=>{
                console.error(error)
            })
            setTimeout(()=>{
                done()
            },1000)
        },
        sizeChange(pageSize) {
            this.page.pageSize = pageSize;
            this.getList();
        },
        currentChange(currentPage) {
            this.page.currentPage = currentPage;
            this.getList();
        },
        getDataList() {
            getList({
                current: this.page.currentPage,
                size: this.page.pageSize,
                templateType: '0'
            }).then(res=>{
                if(res.status===200){
                    this.list = res.data.data.records
                    this.page.total = res.data.data.total
                }
            }).catch(error=>{
                console.error(error)
            })
        },
    }
}
</script>
<style scoped>
.menu-button{
    margin: 0px 5px;
}
</style>
src/views/quality/packageInspectTemplate/inspect-detail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,256 @@
<template>
    <div>
    <el-dialog
    title="检验项管理"
    top="5vh"
    :visible.sync="inspectDialog"
    @close="$emit('update:currshowlist', false)"
    :show="currshowlist"
    width="80%">
        <avue-crud
        ref="inspectDetail"
        :data="dataList"
        :option="option"
        @row-save="addInspectHandler"
        @row-del="delInspectHandler"
        :page="page">
            <template #menu="{size,row,index}">
                <el-button v-if="row.children!=null" class="menu-button" :size="size" @click="addChildren(size,row,index)" type="text" icon="el-icon-circle-plus-outline">添加子项目</el-button>
                <el-button v-if="row.children==null" class="menu-button" :size="size" @click="showUpdateDialog(size,row,index)" type="text" icon="el-icon-edit">编辑</el-button>
                <el-button v-if="row.children==null" class="menu-button" :size="size" @click="delInspectHandler(size,row,index)" type="text" icon="el-icon-delete">删除</el-button>
            </template>
        </avue-crud>
    </el-dialog>
    <el-dialog
    title="编辑"
    :visible.sync="updateVisible"
    width="50%">
        <el-form :model="editForm" label-position="right" label-width="100px" ref="editForm">
            <el-form-item label="检验项" prop="inspectName" :rules="{required:true,message:'检验项不能为空',trigger:'blur'}">
                <el-input
                disabled
                placeholder="请输入检验项目名称"
                type="textarea"
                v-model="editForm.inspectName"
                :rows="2" />
            </el-form-item>
            <el-form-item label="检验标准" prop="inspectRequired" :rules="{required:true,message:'检验标准不能为空',trigger:'blur'}">
                <el-input
                placeholder="请输入检验标准"
                type="textarea"
                v-model="editForm.inspectRequired"
                :rows="2" />
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button @click="updateVisible = false">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="updateInspectHandler">ç¡® å®š</el-button>
        </span>
    </el-dialog>
    <el-dialog
    title="添加子项目"
    :visible.sync="addChildrenVisible"
    width="50%">
        <el-form :model="addChildrenForm" label-position="right"
        label-width="100px" ref="addChildrenForm">
            <el-form-item label="检验项" prop="inspectName">
                <el-input
                placeholder="请输入检验项目名称"
                type="textarea"
                disabled
                v-model="addChildrenForm.inspectName"
                :rows="2" />
            </el-form-item>
            <el-form-item label="检验标准" prop="inspectRequired" :rules="{required:true,message:'检验标准不能为空',trigger:'blur'}">
                <el-input
                placeholder="请输入检验标准"
                type="textarea"
                v-model="addChildrenForm.inspectRequired"
                :rows="2" />
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button @click="addChildrenVisible = false">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="addInspectHandler">ç¡® å®š</el-button>
        </span>
    </el-dialog>
</div>
</template>
<script>
import {getInspectList,addInspect,updateInspect,deleteInspect} from '@/api/quality/packageInspectTemp'
export default {
    props: {
        currshowlist: {
            type: Boolean,
            default: false
        },
        paramObj: {
            type: Object,
            default: ()=>{
                return null
            }
        }
    },
    watch: {
        updateVisible(newVal){
            if(!newVal){
                this.$refs.editForm.resetFields()
            }
        },
        addChildrenVisible(newVal){
            if(!newVal){
                this.$refs.addChildrenForm.resetFields()
            }
        },
        currshowlist() {
            this.inspectDialog = this.currshowlist
            if (this.currshowlist) {
                this.$nextTick(() => {
                    this.getData()
                })
            }
        }
    },
    data(){
        return {
            addChildrenVisible: false,
            addChildrenForm: {
                inspectName: null,
                inspectRequired: null,
            },
            editForm: {
                inspectName: null,
                inspectRequired: null,
            },
            updateVisible: false,
            inspectDialog: false,
            dataList: [],
            page:{
                currentPage: 1,
                pageSize: 20,
                total: 0
            },
            option: {
                rowKey: 'id',
                rowParentKey: 'id',
                defaultExpandAll: true,
                dialogWidth: '60%',
                menu: true,
                addBtn: true,
                editBtn: false,
                delBtn: false,
                border: true,
                index: true,
                height: 350,
                indexLabel: '序号',
                align: 'center',
                refreshBtn: false,
                columnBtn: false, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®H
                headerAlign: 'center',
                column: [{
                    label: '检验项',
                    prop: 'inspectName',
                    overHidden: true,
                    formslot: true,
                }, {
                    label: '检验标准',
                    prop: 'inspectRequired',
                    overHidden: true,
                    formslot: true,
                }]
            },
        }
    },
    methods:{
        addChildren(size,row,index){
            console.log(row);
            this.addChildrenForm.inspectName = row.inspectName
            this.addChildrenVisible = true
        },
        delInspectHandler(size,row,index){
            const _than = this
            this.$confirm('此操作将永久删除该检验项, æ˜¯å¦ç»§ç»­?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                deleteInspect(row.id).then(res=>{
                    if(res.status===200){
                        _than.$message.success("删除成功")
                        _than.getData()
                    }
                }).catch(error=>{
                    console.error(error)
                })
            }).catch(() => {});
        },
        showUpdateDialog(size,row,index){
            this.editForm = {
                id: row.id,
                inspectName: row.templateName,
                inspectRequired: row.inspectRequired
            }
            this.updateVisible = true
        },
        updateInspectHandler(){
            this.$refs.editForm.validate(valid=>{
                if(valid){
                    updateInspect(this.editForm).then(res=>{
                        if(res.status===200){
                            this.$message.success("修改成功")
                            this.getData()
                            this.updateVisible = false
                        }
                    }).catch(error=>{
                        console.error(error)
                    })
                }
            })
        },
        addInspectHandler(){
            const _than = this
            this.$refs.addChildrenForm.validate(valid=>{
                if(valid){
                    let obj = {
                        parentId: this.paramObj.id,
                        ...this.addChildrenForm
                    }
                    addInspect(obj).then(res=>{
                        if(res.status===200){
                            _than.getData()
                            _than.$message.success("添加成功")
                            _than.addChildrenVisible = false
                        }
                    }).catch(error=>{
                        console.error(error)
                    })
                }
            })
        },
        getData(){
            getInspectList(this.paramObj.id).then(res=>{
                if(res.status===200){
                    let dataList = res.data.data.records
                    dataList.forEach(ele=>{
                        ele.id = Math.random()
                    })
                    this.dataList = dataList
                    this.page.total = res.data.data.total
                }
            }).catch(error=>{
                console.error(error)
            })
        },
    }
}
</script>
<style scope>
.avue-crud__pagination {
    position: relative;
    padding: 0px 0 0px 20px;
    text-align: right;
    z-index: 10;
}
</style>
src/views/quality/packageinspect/packageInspect-form.vue
@@ -68,11 +68,10 @@
            <el-col :span="12" style="text-align: right;">
                <el-dropdown @command="handleCommand" v-if="!isShow && resultVal==null">
                    <el-button size="mini" style="margin-right: 10px;" type="primary" >
                        åˆ‡æ¢é»˜è®¤æ£€éªŒé¡¹<i class="el-icon-arrow-down el-icon--right"></i>
                        åˆ‡æ¢æ£€éªŒé¡¹æ¨¡æ¿<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-item :key="index" v-for="(item,index) in inspectMoulds" :command="item.father">{{item.father}}</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
              <el-button v-if="resultVal=='' || resultVal==null" size="mini" @click="clickAddLine()">添加检验项目</el-button>
@@ -124,6 +123,7 @@
                        <el-select style="width:100%" :disabled="resultVal!=null" @change="changeResult" v-model="scope.row.result" v-if="!scope.row.children">
                            <el-option label="合格" value="合格"></el-option>
                            <el-option label="不合格" value="不合格"></el-option>
                            <el-option label="不适用" value="不适用"></el-option>
                        </el-select>
                    </template>
                  </el-table-column>
@@ -194,6 +194,7 @@
  updatePackageInspectById,
  getCustomer,
} from '@/api/quality/packageInspect'
import {getAllTemplateByEnable} from '@/api/quality/packageInspectTemp'
import {inspect1,inspect2} from '@/const/defaultPackageInspect'
export default {
    computed:{
@@ -202,6 +203,7 @@
    },
    data(){
        return{
            inspectMoulds: [],
            isShow: false,
            submitData: {
              id:null,
@@ -253,7 +255,10 @@
          this.resultVal=val
        }
      }
      this.getAllInspect()
      this.init()
      this.checkShowState()
    },
    watch:{
      dialogVisible(newVal){
@@ -263,15 +268,34 @@
      }
    },
    methods:{
      checkShowState(){
        let num = 0
        this.list.forEach(ele=>{
            if(ele.children){
                ele.children.forEach(c=>{
                    if(c.pid){
                        num++
                    }
                })
            }
        })
        this.isShow = num==0
      },
      getAllInspect(){
        getAllTemplateByEnable().then(res=>{
            if(res.status===200){
                this.inspectMoulds = res.data.data
            }
        }).catch(error=>{
            console.error(error)
        })
      },
      handleCommand(command) {
        switch(command){
            case "1":
                this.init(inspect1)
            break;
            case "2":
                this.init(inspect2)
            break;
        }
        this.inspectMoulds.forEach(ele=>{
            if(ele.father==command){
                this.init(ele.children)
            }
        })
      },
      changeResult(){
        let result = ''
@@ -433,7 +457,27 @@
            _than.list = []
            let userNameList = []
            if(dataList){
                _than.list = JSON.parse(JSON.stringify(dataList))
                let tempList = []
                dataList.forEach(ele=>{
                    let obj = {
                        randomId: Math.random(),
                        name: ele.inspectName,
                        children: []
                    }
                    if(ele.children){
                        ele.children.forEach(e=>{
                            obj.children.push({
                                required: e.inspectRequired,
                                randomId: Math.random(),
                                isEdit: false,
                                note: '',
                                result: ''
                            })
                        })
                    }
                    tempList.push(obj)
                })
                _than.list = tempList
            }
            data.packageInsProductS.forEach(item => {
              if (item.children) {
@@ -462,9 +506,9 @@
                    _than.list.push(ele)
                }
              })
              let find1 = this.list.find(ele=>ele.name===inspect1[0].name&&ele.isEdit) !=undefined;
              let find2 = this.list.find(ele=>ele.name===inspect2[0].name&&ele.isEdit) !=undefined;
              this.isShow = find1||find2
            //   let find1 = this.list.find(ele=>ele.name===inspect1[0].name&&ele.isEdit) !=undefined;
            //   let find2 = this.list.find(ele=>ele.name===inspect2[0].name&&ele.isEdit) !=undefined;
            //   this.isShow = find1||find2
              _than.conclusionTable = [{
                packageNo: data.packageNo,
                userName: Array.from(new Set(userNameList)).join(','),
src/views/quality/processInspect/processInspect-form.vue
@@ -27,6 +27,11 @@
                                <el-form-item label="车间订单号" prop="moNo">
                                    <el-input @blur="selectInfoByOrderId" :disabled="processInspectVo.id != null"
                                        v-model="processInspectVo.moNo" placeholder="请输入车间订单号" autocomplete="off" >
                                        <!-- <el-button
                                            slot="append"
                                            icon="el-icon-search"
                                            :disabled="resultVal!=null"
                                            @click="queryCode"></el-button> -->
                                        <el-button
                                            slot="append"
                                            icon="el-icon-full-screen"
@@ -251,6 +256,7 @@
            <el-button type="primary" @click="deviceCode = false">ç¡® å®š</el-button>
        </span>
        </el-dialog>
    <processPart :paramObj="paramObj" :currshowlist.sync="workshop" />
    </div>
</template>
@@ -263,15 +269,17 @@
    updateProcessInsProduct,
    updateProcessInspectsById,
} from '@/api/quality/processInspect'
import processPart from '@/views/common/processinspect-part'
import { selectDevice } from '@/api/quality/processInspect'
import qrCodeApp from '@/views/common/qrCodeApp'
import { validatePositiveInteger } from '@/util/validate'
export default {
    components:{
        qrCodeApp
        qrCodeApp,processPart
    },
    data() {
        return {
            paramObj:{},
            qrcode: false,
            row: null,
            proIndex: 0,
@@ -291,6 +299,7 @@
            resultVal: null,
            technologyList: [],
            deviceList: [],
            workshop:false,//车间弹窗
            hasChildren: true,
            optionsSamplename: [],
            // æ·»åŠ åˆ—
@@ -335,6 +344,14 @@
        this.init()
    },
    methods: {
      queryCode(){
        console.log("llll");
        this.workshop = true
        console.log(this.workshop);
        // this.paramObj = {
        //   code: this.dataForm.code
        // }
      },
      cancelCodeDialog(){
        this.qrcode = false
      },
src/views/technology/routing/routing-form.vue
@@ -136,16 +136,8 @@
              '--dragitemwidth': '250px'
            }"
          >
            <div
              :style="{
                width: 265 * dataForm.operations.length - 15 + 'px'
              }"
            >
              <div
                class="dragHead"
                v-for="x in dataForm.operations.length"
                :key="x"
              >
            <div :style="{ width: 265 * dataForm.operations.length - 15 + 'px' }">
              <div class="dragHead" v-for="x in dataForm.operations.length"  :key="x" >
                <div class="idx">{{ x }}</div>
              </div>
              <zttdraggable
vue.config.js
@@ -4,10 +4,10 @@
 */
// const url = 'http://192.168.2.7:9999'
//const url = 'https://ztms-mes.chinaztt.cn/'
const url = 'http://192.168.2.7:9999'
// const url = 'https://ztms-mes.chinaztt.cn/'
 const url = 'http://localhost:9999'
//  const url = 'http://localhost:9999'
const localUrl = 'http://localhost:8089'