王震
2023-12-04 8afbe0b83915dc417cea62221782e7ce15c00c78
Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
已修改17个文件
已添加3个文件
1384 ■■■■ 文件已修改
src/api/plan/productionschedul.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/packageInspect.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/views/index.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/admin/productType/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/workstation/workstation-form.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/customerorder-form.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/productorder-form.vue 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/teststandardtable.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/productionschedul/index.vue 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/product/workbench/feed-form.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/product/workbench/feed-pane.vue 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/product/workbench/productInDialog.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/pack-from.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/index.vue 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/packageInspect-form.vue 602 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processconfiguration/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/teststandard/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/operation/operation-form.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/productionschedul.js
@@ -10,7 +10,15 @@
export function fetchScheduleById(id) {
  return request({
    url: '/mes//productionSchedul/'+id,
    url: '/mes/productionSchedul/'+id,
    method: 'get',
  })
}
export function fillTime(data) {
  return request({
    url: '/mes/productionSchedul/fillTime',
    method: 'put',
    data: data
  })
}
src/api/quality/packageInspect.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
import request from '@/router/axios'
export function fetchList(query) {
  return request({
    url: '/mes/packageInspect/page',
    method: 'get',
    params: query
  })
}
export function fetchListById(id) {
  return request({
    url: '/mes/packageInspect/'+id,
    method: 'get',
  })
}
export function deleteById(id) {
  return request({
    url: '/mes/packageInspect/'+id,
    method: 'delete',
  })
}
export function updatePackageInsProduct(data) {
  return request({
    url: '/mes/packageInsProduct/updatePackageInsProduct',
    method: 'post',
    data: data
  })
}
export function updatePackageInspectById(data) {
  return request({
    url: '/mes/packageInspect/updatePackageInspectById',
    method: 'post',
    params: data
  })
}
src/router/views/index.js
@@ -145,6 +145,23 @@
    ]
  },
  {
    path: '/quality/packageinspect',
    component: Layout,
    children: [
      {
        path: 'packageInspect-form',
        name: 'packageInspectForm',
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/quality/packageinspect/packageInspect-form'),
        meta: {
          keepAlive: false,
          isTab: false,
          isAuth: false
        }
      }
    ]
  },
  {
    path: '/quality/rawMaterial',
    component: Layout,
    children: [
src/views/admin/productType/index.vue
@@ -54,7 +54,7 @@
      <el-dialog :visible.sync="dialogAddVisible" :close-on-click-modal="false" title="新增配置">
      <el-form :model="prodForm" :rules="rules" ref="addDialog">
        <el-form-item prop="staffName" label="用户名称:" label-width="90px">
            <el-select style="width:100%" v-model="prodForm.staffName">
            <el-select style="width:100%" v-model="prodForm.staffName" filterable placeholder="请选择">
              <el-option v-for="(item,index) in staffNamesOptions" :key="index" :value="item.id" :label="item.staffName"/>
            </el-select>
        </el-form-item>
@@ -70,12 +70,12 @@
    </el-dialog>
    </div>
  </template>
  <script>
  import { tableOption } from '@/const/crud/admin/productType'
  import { getList,addObj,delObj,chooseStaff } from '@/api/admin/productType'
  import { mapGetters } from 'vuex'
  export default {
    name: 'TableProduct',
    data() {
@@ -184,7 +184,7 @@
    }
  }
  </script>
  <style lang="scss" scoped>
    .el-dialog__wrapper {
    .el-dialog {
@@ -203,4 +203,3 @@
    }
    }
  </style>
src/views/basic/workstation/workstation-form.vue
@@ -127,7 +127,7 @@
          >
          </el-transfer>
        </el-tab-pane>
        <el-tab-pane label="产出待检库位" name="inspection">
       <!--  <el-tab-pane label="产出待检库位" name="inspection">
          <el-transfer
            filterable
            v-model="inspectionLocationIds"
@@ -137,7 +137,7 @@
            @change="handleChangeInspectionLocation"
          >
          </el-transfer>
        </el-tab-pane>
        </el-tab-pane> -->
        <!-- <el-tab-pane label="产出不合格库位" name="disqualified">
          <el-transfer
            filterable
@@ -160,7 +160,7 @@
          >
          </el-transfer>
        </el-tab-pane> -->
        <el-tab-pane label="检验待处理库位" name="pending">
        <!-- <el-tab-pane label="检验待处理库位" name="pending">
          <el-transfer
            filterable
            v-model="pendingLocationIds"
@@ -170,7 +170,7 @@
            @change="handleChangePendingLocation"
          >
          </el-transfer>
        </el-tab-pane>
        </el-tab-pane> -->
        <el-tab-pane label="成品待检库位" name="product">
          <el-transfer
            filterable
src/views/plan/customerorder/customerorder-form.vue
@@ -209,13 +209,12 @@
                <el-input
                  v-model="dataForm.partNo"
                  placeholder=""
                  disabled
                >
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openSalesPartDialog()"
                    v-show="dataForm.id==null"
                    @click="openPartDialog()"
                  ></el-button>
                </el-input>
              </el-form-item>
@@ -1052,7 +1051,7 @@
            // } else {
            //   console.log('2')
            this.dataForm = response.data.data
            // }
            // this.fileList = response.data.data.customerOrderAttachmentList
            const sourceId = response.data.data.sourceId
@@ -1194,25 +1193,35 @@
        }
      })
    },
    // é›¶ä»¶é€‰æ‹©
        // é›¶ä»¶é€‰æ‹©
    openPartDialog() {
      if (
        this.dataForm.coState === '01partUnCheck' ||
        this.dataForm.coState === '02technologyUnCheck'
      ) {
        this.showPart = true
      } else {
        this.$message.warning(
          '订单只有在【零件待选】、【工艺文件待选】状态下,才能进行零件修改'
        )
      }
      this.showPart = true
    },
    selectPart(part) {
      console.log(part);
      if (part) {
        this.dataForm.partNo = part.partNo
        this.$refs.dataForm.validateField('partNo', (valid) => {})
      }
    },
    // é›¶ä»¶é€‰æ‹©
    // openPartDialog() {
    //   if (
    //     this.dataForm.coState === '01partUnCheck' ||
    //     this.dataForm.coState === '02technologyUnCheck'
    //   ) {
    //     this.showPart = true
    //   } else {
    //     this.$message.warning(
    //       '订单只有在【零件待选】、【工艺文件待选】状态下,才能进行零件修改'
    //     )
    //   }
    // },
    // selectPart(part) {
    //   if (part) {
    //     this.dataForm.partNo = part.partNo
    //     this.$refs.dataForm.validateField('partNo', (valid) => {})
    //   }
    // },
    // å…¨å±
    fullscreen() {
      this.isFullScreen = !this.isFullScreen
src/views/plan/manufacturingorder/productorder-form.vue
@@ -8,7 +8,7 @@
      </div>
      <div class="btn-group header-right" v-if="editable">
        <el-button :disabled="isSubmit" v-thinclick="`dataFormSubmit`"
          >保存</el-button
          type="primary">保存</el-button
        >
      </div>
    </div>
@@ -126,7 +126,6 @@
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="10">
            <el-col :span="6">
              <el-form-item label="备注" prop="remark">
@@ -151,39 +150,37 @@
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-col
                :span="8"
                v-if="permissions.plan_manufacturingorder_bom_sure"
              >
                <el-form-item label="BOM确认">
                  <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
                </el-form-item>
              </el-col>
              <el-col
                :span="8"
                v-if="permissions.plan_manufacturingorder_process_sure"
              >
                <el-form-item label="工艺确认">
                  <el-switch v-model="dataForm.processConfirmStatus">
                  </el-switch>
                </el-form-item>
              </el-col>
              <el-col
                :span="8"
                v-if="permissions.plan_manufacturingorder_test_sure"
              >
                <el-form-item label="检测标准确认">
                  <el-switch v-model="dataForm.standardConfirmStatus">
                  </el-switch>
                </el-form-item>
              </el-col>
            <el-col
              :span="2"
              v-if="permissions.plan_manufacturingorder_bom_sure"
            >
              <el-form-item label="BOM确认" label-width="110px">
                <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
              </el-form-item>
            </el-col>
            <el-col :span="4">
            <el-col
              :span="2"
              v-if="permissions.plan_manufacturingorder_process_sure"
            >
              <el-form-item label="工艺确认" label-width="110px">
                <el-switch v-model="dataForm.processConfirmStatus">
                </el-switch>
              </el-form-item>
            </el-col>
            <el-col
              :span="2"
              v-if="permissions.plan_manufacturingorder_test_sure"
            >
              <el-form-item label="检测标准确认" label-width="140px">
                <el-switch v-model="dataForm.standardConfirmStatus">
                </el-switch>
              </el-form-item>
            </el-col>
            <el-col :span="2">
              <el-form-item
                label="IFS车间订单接收时报告工序"
                prop="isReportOperation"
                label-width="200px"
                label-width="250px"
              >
                <el-switch v-model="dataForm.isReportOperation" disabled>
                </el-switch>
@@ -595,8 +592,19 @@
              <el-tab-pane label="产品结构" id="ta1" key="ta1" name="ta1">
                <el-row>
                  <el-col :span="11">
                    <el-form-item label="完整BOM">
                  <el-col :span="2" style="text-align: center">
                    <el-button
                      type="text"
                      size="small"
                      icon="el-icon-circle-plus-outline"
                      style="color:#f56c6c;"
                      :disabled="!dataForm.id"
                      @click="addStruct()"
                      >添加元素
                    </el-button>
                  </el-col>
                  <el-col :offset="11" :span="11">
                    <!-- <el-form-item label="完整BOM">
                      <el-select
                        @change="bomSelectChanged"
                        disabled
@@ -622,18 +630,7 @@
                        >
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :offset="11" :span="2" style="text-align: center">
                    <el-button
                      type="text"
                      size="small"
                      icon="el-icon-circle-plus-outline"
                      style="color:#f56c6c;"
                      :disabled="!dataForm.id"
                      @click="addStruct()"
                      >添加元素
                    </el-button>
                    </el-form-item> -->
                  </el-col>
                </el-row>
                <el-row>
@@ -644,7 +641,7 @@
                    style="width: 100%"
                    height="400px"
                  >
                    <el-table-column type="selection" width="40" fixed="left" />
                    <!-- <el-table-column type="selection" width="40" fixed="left" /> -->
                    <el-table-column
                      type="index"
                      width="50"
@@ -662,7 +659,7 @@
                    />
                    <el-table-column
                      prop="partName"
                      width=""
                      width="200"
                      header-align="center"
                      align="left"
                      label="零件"
@@ -2107,17 +2104,17 @@
    },
    // æ‰“å¼€bom节点
    addStruct() {
      if (this.structSelection.length <= 0) {
        this.$message.error('请选择需要添加元素的节点')
      } else {
        if (this.structSelection.length === 1) {
          this.selectedStruct = this.structSelection[0]
          this.moId = this.dataForm.id
          this.showStructForm = true
        } else {
          this.$message.error('只能为单个节点添加元素')
        }
      }
      this.selectedStruct = this.structSelection[0]
      this.moId = this.dataForm.id
      this.showStructForm = true
      // if (this.structSelection.length <= 0) {
      //   this.$message.error('请选择需要添加元素的节点')
      // } else {
      //   if (this.structSelection.length === 1) {
      //   } else {
      //     this.$message.error('只能为单个节点添加元素')
      //   }
      // }
    },
    refreshBom(node) {
      if (this.selectedStruct.children != null) {
src/views/plan/manufacturingorder/teststandardtable.vue
@@ -111,14 +111,14 @@
        height="100%"
        style="width: 100%"
      >
        <el-table-column prop="index" label="序号" align="center" width="50" />
        <!-- <el-table-column prop="index" label="序号" align="center" width="50" />
        <el-table-column label="线芯" prop="wireCore" align="center" />
        <el-table-column
          prop="isCheck"
          label="抽检"
          align="center"
          :formatter="isCheckFormatter"
        />
        /> -->
        <el-table-column label="参数编号" prop="code" align="center" />
        <el-table-column label="参数项" prop="parameterItem" align="center" />
        <el-table-column label="检测范围" prop="referenceValue" align="center">
@@ -162,10 +162,10 @@
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column label="通道" prop="aisle" align="center" />
        <el-table-column label="部位" prop="position" align="center" />
        <!-- <el-table-column label="通道" prop="aisle" align="center" />
        <el-table-column label="部位" prop="position" align="center" /> -->
        <el-table-column label="单位" prop="unit" align="center" />
        <el-table-column
        <!-- <el-table-column
          prop="extendsRoutingNo"
          label="继承工艺路线"
          align="center"
@@ -184,7 +184,7 @@
          prop="extendsTestStandardParamNo"
          label="继承标准参数"
          align="center"
        />
        /> -->
        <el-table-column label="操作" align="center" width="118">
          <template slot-scope="scope">
            <el-button
@@ -193,12 +193,12 @@
              @click.stop="insertOperationParam(scope.row)"
              >插入
            </el-button>
            <el-button
            <!-- <el-button
              type="text"
              size="mini"
              @click.stop="editTestStandardParam(scope.row)"
              >公式
            </el-button>
            </el-button> -->
            <el-button
              type="text"
              size="mini"
src/views/plan/productionschedul/index.vue
@@ -3,7 +3,7 @@
    <basic-container>
      <el-row>
        <el-col :span="12">
          <div style="height:80vh">
          <div style="height:80vh;padding: 0px 10px;">
            <avue-crud :data="tableData" ref="crud" :option="option" :span-method="spanMethod" 
            @refresh-change="getData"
            :page="page" 
@@ -20,18 +20,23 @@
            <el-card>
              <div slot="header" class="clearfix">
                <span>调度时间线</span>
                <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
                <el-button v-if="scheduleList.length>0" @click="openEditDialog" style="float: right; padding: 3px 0" type="text">编辑</el-button>
              </div>
              <div style="height:70vh;overflow-y: scroll;">
                <el-timeline reverse>
                <el-timeline>
                    <el-timeline-item
                      placement="top"
                      v-for="(item, index) in scheduleList"
                      :key="index"
                      :timestamp="item.planTime">
                        <el-card style="width:95%;margin: 0;padding: 0px 10px;">
                          <p style="font-weight: bold;">{{item.title}}</p>
                          <p>实际时间: {{ item.actualTime }}</p>
                      :timestamp="item.title">
                        <el-card shadow="hover" :body-style="{margin: '0',padding:'0px 20px 0px 20px'}" style="width:90%;">
                          <p>
                            <span style="font-weight: bold;">计划时间: </span>
                            {{item.planTime}}
                          </p>
                          <p>
                            <span style="font-weight: bold;">实际时间: </span>
                            {{ item.actualTime }}</p>
                        </el-card>
                    </el-timeline-item>
                </el-timeline>
@@ -41,6 +46,57 @@
        </el-col>
      </el-row>
    </basic-container>
    <el-dialog
    title="编辑时间线"
    :visible.sync="dialogVisible"
    top="5vh"
    width="50%"
    :before-close="handleClose">
      <div style="height:60vh;overflow-y: scroll;">
        <el-timeline>
          <el-timeline-item
            placement="top"
            v-for="(item, index) in scheduleEditList"
            :key="index"
            :timestamp="item.title">
              <el-card shadow="hover" style="width:90%" :body-style="{padding:'20px 20px 5px 20px'}">
                <el-row>
                  <el-col :span="3">
                    <p style="font-weight: bold;line-height: 50%;">计划时间: </p>
                  </el-col>
                  <el-col :span="21">
                    <el-date-picker
                      style="width:100%"
                      v-model="item.planTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      placeholder="选择日期时间">
                    </el-date-picker>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="3">
                    <p style="font-weight: bold;line-height: 50%;">实际时间: </p>
                  </el-col>
                  <el-col :span="21">
                    <el-date-picker
                      style="width:100%"
                      v-model="item.actualTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      placeholder="选择日期时间">
                    </el-date-picker>
                  </el-col>
                </el-row>
              </el-card>
          </el-timeline-item>
        </el-timeline>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmEditSchedul">ç¡® å®š</el-button>
      </span>
  </el-dialog>
  </div>
</template>
@@ -48,6 +104,7 @@
import {
  fetchScheduleList,
  fetchScheduleById,
  fillTime
} from '@/api//plan/productionschedul'
import TableForm from './template-form'
import ttable from '@/views/common/ztt-table.vue'
@@ -55,7 +112,9 @@
export default {
    data() {
    return {
      dialogVisible: false,
      scheduleList: [],
      scheduleEditList: [],
      typeOptions: [],
      multipleSelection: [],
      loading: true,
@@ -221,6 +280,53 @@
  beforeDestroy() {
  },
  methods: {
    openEditDialog(){
      this.scheduleEditList = JSON.parse(JSON.stringify(this.scheduleList))
      this.dialogVisible = true
    },
    confirmEditSchedul(){
      let data = this.scheduleEditList
      let orderObj = this.multipleSelection[0]
      console.log("data---",data)
      console.log("orderObj-----",orderObj)
      let obj = {
        "documentActualTime": data[0].actualTime,
        "documentPlanTime": data[0].planTime,
        "bomActualTime": data[1].actualTime,
        "bomPlanTime": data[1].planTime,
        "contractActualTime": data[2].actualTime,
        "contractPlanTime": data[2].planTime,
        "arrivalActualTime": data[3].actualTime,
        "arrivalPlanTime": data[3].planTime,
        "checkActualTime": data[4].actualTime,
        "checkPlanTime": data[4].planTime,
        "productActualTime": data[5].actualTime,
        "productPlanTime": data[5].planTime,
        "id": orderObj.id,
        "contractNo": orderObj.contractNo,
        "customerName": orderObj.customerName,
        "deliveryDate": orderObj.deliveryDate,
        "orderTime": orderObj.orderTime,
        "productType": orderObj.productType,
        "projectName": orderObj.projectName
      }
      console.log("obj----->>>",obj);
      fillTime(obj).then(res=>{
        if(res.status===200){
          this.$message.success("更新成功")
        }else{
          this.$message.error("更新失败")
        }
        this.getScheduleById(orderObj.id)
        this.dialogVisible = false
      }).catch(error=>{
        console.log(error);
      })
    },
    handleClose(done){
      done()
    },
    initTimeLine(data){
      this.scheduleList = []
      if(data){
@@ -270,10 +376,14 @@
    },
    selectionRow(val){
      if (val.length > 1) {
         const preVal = val.shift();
         this.$refs.crud.toggleRowSelection(preVal, false);
       }
       this.getScheduleById(val[0].id)
        const preVal = val.shift();
        this.$refs.crud.toggleRowSelection(preVal, false);
      }
      else{
        this.scheduleList=[]
      }
      this.multipleSelection = val
      this.getScheduleById(val[0].id)
    },
    formatDate(row, cellValue){
      if (cellValue) {
@@ -295,9 +405,9 @@
        this.tableData = res.data.data.records
        this.page.total = res.data.data.total
        this.page.currentPage = res.data.data.records.pages
        this.scheduleList = []
      })
      this.loading = false
    },
    handleCurrentChange(val) {
      this.multipleSelection = val
src/views/product/workbench/feed-form.vue
@@ -1,6 +1,7 @@
<template>
  <el-dialog
    width="40%"
    width="60%"
    top="5vh"
    title="投料"
    :visible.sync="innerVisible"
    append-to-body
@@ -15,17 +16,20 @@
          :key="tableKey"
          :data="dataList"
          border
          style="width: 100%;"
          height="400"
          style="width: 100%;overflow-y: scroll;"
          @cell-dblclick="dblhandleCurrentChange"
          show-summary
          :span-method="objectSpanMethod"
          :summary-method="getSummaries"
        >
          <el-table-column header-align="center" align="center" type="index" label="序号"></el-table-column>
          <el-table-column
            prop="partNo"
            header-align="center"
            align="center"
            label="零件编号"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column
@@ -33,6 +37,7 @@
            header-align="center"
            align="center"
            label="零件"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column
@@ -40,6 +45,7 @@
            header-align="center"
            align="center"
            label="批号"
            show-overflow-tooltip
          >
          </el-table-column>
          <!-- <el-table-column
@@ -72,7 +78,13 @@
            header-align="center"
            align="center"
            label="单位"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column prop="menu" label="操作"  header-align="center" align="center">
            <template scope="scope">
              <el-button type="text" icon="el-icon-circle-close" @click="cancelFeed(scope.$index,scope.row)">取消</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
@@ -142,6 +154,12 @@
      password: null
    }
  },
  beforeUpdate(){
    this.$nextTick(()=>{
      this.objectSpanMethod()
      this.$refs.table.doLayout()
    })
  },
  directives: {
    focus: {
      inserted: function(el, option) {
@@ -162,6 +180,10 @@
    }
  },
  methods: {
    //投入取消按钮
    cancelFeed(index,row){
      this.dataList.splice(index,1)
    },
    confirmData() {
      if (this.password != null) {
        checkSubmitPassword({ password: this.password }).then((response) => {
@@ -286,16 +308,16 @@
      return reg.test(value)
    },
    objectSpanMethod() {
      setTimeout(() => {
      this.$nextTick(()=>{
        if (this.$refs.table.$el) {
          const current = this.$refs.table.$el
            .querySelector('.el-table__footer-wrapper')
            .querySelector('.el-table__footer')
          const cell = current.rows[0].cells
          // cell[1].style.display = 'none'
          cell[0].colSpan = '4'
          cell[0].colSpan = '6'
        }
      }, 50)
      })
    },
    getSummaries(param) {
      const { columns, data } = param
@@ -325,12 +347,19 @@
  },
  watch: {
    currshowlist() {
      this.innerVisible = this.currshowlist
      this.password = null
      if (this.currshowlist) {
        this.$nextTick(() => {})
      const _than = this
      _than.innerVisible = _than.currshowlist
      _than.password = null
      if (!_than.currshowlist) {
        _than.$nextTick(() => {
        })
      }
    }
    },
  },
  created(){
    this.$nextTick(()=>{
      this.objectSpanMethod()
    })
  },
  mounted() {}
}
src/views/product/workbench/feed-pane.vue
@@ -137,7 +137,7 @@
      </el-table-column>
    </el-table>
    <el-tabs v-model="activeName">
      <el-tab-pane name="first" label="线边仓合格物料">
      <!-- <el-tab-pane name="first" label="线边仓合格物料"> -->
        <div class="line-side-warehouse-header">
          <div>
            <el-divider class="pane-divider" direction="vertical"></el-divider
@@ -375,7 +375,7 @@
          >
            <template slot="header">
              <div style="line-height: 14px;">可用数量</div>
              <!-- <div class="th" @click.stop>
              <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.availableStockQuantity"
@@ -384,7 +384,7 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div> -->
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.availableStockQuantity }}</span>
@@ -393,7 +393,7 @@
          <el-table-column label="库存数量" prop="stockQuantity" align="center">
            <template slot="header">
              <div style="line-height: 14px;">库存数量</div>
              <!-- <div class="th" @click.stop>
              <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.stockQuantity"
@@ -402,19 +402,19 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div> -->
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.stockQuantity }}</span>
            </template>
          </el-table-column>
          <el-table-column
          <!-- <el-table-column
            label="预留数量"
            prop="reserveQuantity"
            align="center"
          >
            <template slot="header">
              <div style="line-height: 14px;">预留数量</div>
              <div style="line-height: 14px;">预留数量</div> -->
              <!-- <div class="th" @click.stop>
                <el-input
                  type="text"
@@ -425,9 +425,33 @@
                  size="mini"
                ></el-input>
              </div> -->
            </template>
            <!-- </template>
            <template slot-scope="scope">
              <span>{{ scope.row.reserveQuantity }}</span>
            </template>
          </el-table-column> -->
          <el-table-column label="是否工序库存" prop="operationStockStatus" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.operationStockStatus">是</span>
              <span v-else>否</span>
            </template>
          </el-table-column>
          <el-table-column label="所属工序" prop="name" align="center">
            <template slot="header">
              <div style="line-height: 14px;">所属工序</div>
              <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.name"
                  @keyup.enter.native="handleStockList"
                  clearable
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.name }}</span>
            </template>
          </el-table-column>
          <el-table-column label="库位号" prop="locationNo" align="center">
@@ -461,7 +485,7 @@
          >
          </el-pagination>
        </div> -->
      </el-tab-pane>
      <!-- </el-tab-pane> -->
      <!-- <el-tab-pane name="second" label="线边仓待处理物料">
        <div class="line-side-warehouse-header">
          <div>
@@ -480,7 +504,7 @@
              >扫码投料</el-button
            >
            <el-button
              class="feeding-btn"
              class="feeding-btn"locationNo
              type="primary"
              icon="feed-btn-feeding"
              @click="addFeed()"
@@ -1358,6 +1382,30 @@
          <span>{{ scope.row.stockQuantity }}</span>
        </template>
      </el-table-column>
      <el-table-column label="是否工序库存" prop="operationStockStatus" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.operationStockStatus">是</span>
          <span v-else>否</span>
        </template>
      </el-table-column>
      <el-table-column label="所属工序" prop="name" align="center">
        <template slot="header">
          <div style="line-height: 14px;">所属工序</div>
          <div class="th" @click.stop>
            <el-input
                  type="text"
                  v-model="queryParamTwo.name"
                  @keyup.enter.native="handleStockList"
                  clearable
                  @clear="handleStockList"
                  size="mini"
            ></el-input>
          </div>
        </template>
        <template slot-scope="scope">
          <span>{{ scope.row.name }}</span>
        </template>
      </el-table-column>
      <el-table-column label="库位号" prop="ifsLocation" align="center">
        <template slot="header" slot-scope="scope">
          <div style="line-height: 14px;">库位号</div>
@@ -1373,7 +1421,7 @@
          </div>
        </template>
        <template slot-scope="scope">
          <span>{{ scope.row.ifsLocation }}</span>
          <span>{{ scope.row.locNo }}</span>
        </template>
      </el-table-column>
      <el-table-column label="单位" prop="unit" align="center">
@@ -2176,6 +2224,14 @@
    }
  },
  watch: {
    showFeedForm:{
      handler(newVal,oldVal){
        if(!newVal){
          this.$refs.stockTable.toggleAllSelection(false)
        }
      },
      deep: true
    },
    workstationId() {
      this.$nextTick(() => {
        if (this.currItem != null && this.currItem === 'feed') {
src/views/product/workbench/productInDialog.vue
@@ -31,8 +31,8 @@
        :show-overflow-tooltip="true"
      >
      </el-table-column>
      <el-table-column label="零件批号" prop="partBatchNo" align="center">
      </el-table-column>
      <!-- <el-table-column label="零件批号" prop="partBatchNo" align="center">
      </el-table-column> -->
      <el-table-column label="规格型号" prop="specs" align="center">
      </el-table-column>
      <el-table-column
@@ -45,6 +45,10 @@
      </el-table-column>
      <el-table-column label="单位" prop="unit" align="center">
      </el-table-column>
      <el-table-column label="是否工序库存" prop="operationStockStatus" align="center">
      </el-table-column>
      <el-table-column label="所属工序" prop="name" align="center">
      </el-table-column>
    </el-table>
    <div slot="footer" class="dialog-footer">
src/views/quality/Packaging_ledger/index.vue
@@ -41,6 +41,7 @@
                    </el-col>
                    <el-col :span="2">
                    <el-button
                        v-if="!isCheck"
                        style="float: right; padding: 3px 0"
                        type="text"
                        @click="relateOperationParam()"
@@ -118,8 +119,7 @@
        <!-- æ–°å¢ž -->
        <packfrom
        :currshowlist.sync="addOrUpdateVisible"
        @way = "wayRenovate"
        >
        @refreshDataList="getData">
        </packfrom>
        <packfromadd
        :currshowlist.sync="increase"
@@ -139,6 +139,7 @@
export default {
    data(){
        return {
          isCheck: false,
          dataway:{},
          goid:'',
          testStandardParams: [],
@@ -240,7 +241,7 @@
                operator: [
                    {
                      text: '检验',
                      icon: 'el-icon-delete',
                      icon: 'el-icon-position',
                      type: 'text',
                      size: 'small',
                      fun: this.check
@@ -289,6 +290,9 @@
        })
      },
      handleCurrentChange(row){
        if(row.state=='已报检'){
          this.isCheck = true
        }
        this.dataway = row
        this.packageBoxId = {
          packageBoxId:row.id
@@ -306,7 +310,7 @@
        if (this.dataway.state == "未报检") {
            this.increase = true
        }else{
          this.$message.error('改项目已完成检验')
          this.$message.error('请先选择包装项目')
        }
      },
      preserve(datalist){
src/views/quality/Packaging_ledger/pack-from.vue
@@ -158,9 +158,9 @@
            contractNo:this.datalistid.contractNo
        }   
        pagedataadd (packageBox).then((res =>{
            this.$emit('way',res )
            if (res.status === 200) {
                this.$message.success('新增成功')
                this.$emit('refreshDataList')
            }else{
                this.$message.error('创建失败')
            }
src/views/quality/packageinspect/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,231 @@
<!--
  -    Copyright (c) 2018-2025, ztt All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without
  - modification, are permitted provided that the following conditions are met:
  -
  - Redistributions of source code must retain the above copyright notice,
  - this list of conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright
  - notice, this list of conditions and the following disclaimer in the
  - documentation and/or other materials provided with the distribution.
  - Neither the name of the pig4cloud.com developer nor the names of its
  - contributors may be used to endorse or promote products derived from
  - this software without specific prior written permission.
  - Author: ztt
  -->
  <template>
    <div class="mod-config">
        <basic-container>
            <ttable
            :table="table"
            :resultData="resultData"
            @handleSelectionChange="handleSelectionChange"
            :prelang="prelang"
            :options="options"
            :ajaxFun="ajaxFun"
            ref="packageInspectTable">
            <template #toolbar>
            </template>
            </ttable>
        </basic-container>
        <!-- å¼¹çª—, æ–°å¢ž / ä¿®æ”¹ -->
        <!-- <RawMaterialForm
            v-if="addOrUpdateVisible"
            ref="addOrUpdate"
            @refreshDataList="getData"
        ></RawMaterialForm> -->
    </div>
</template>
<script>
import ttable from '@/views/common/ztt-table.vue'
import { fetchList,deleteById } from '@/api/quality/packageInspect'
// import RawMaterialForm from './rawMaterial-form'
import * as fecha from 'element-ui/lib/utils/date'
import { mapGetters } from 'vuex'
  export default {
    data() {
        return {
            resultData:[],
            addOrUpdateVisible: false,
            type: [1],
            multipleSelection: [],
            prelang: 'packageInspect',
            ajaxFun: fetchList,
            options: {
                height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
                stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
                highlightCurrentRow: false, // æ˜¯å¦è¦é«˜äº®å½“前行
                border: true, // æ˜¯å¦æœ‰çºµå‘边框
                lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
                fit: true, // åˆ—的宽度是否自撑开
                multiSelect: true, //
                seqNo: true,
                isRefresh: true, // æ˜¯å¦æ˜¾ç¤ºåˆ·æ–°æŒ‰é’®
                isShowHide: true, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®H
                isSearch: true, // é«˜çº§æŸ¥è¯¢æŒ‰é’®
                defaultOrderBy: { column: 'createTime', direction: 'desc' },
            },
            table: {
                total: 0,
                currentPage: 1,
                pageSize: 20,
                data: [],
                // æ ‡é¢˜
                column: [
                    {
                        minWidth: '180',
                        prop: 'packInsNo',
                        label: '包装检验编号',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text',
                        render: { fun: this.addOrUpdateHandle }
                    },
                    {
                        minWidth: '180',
                        prop: 'packageNo',
                        label: '包装编码',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '180',
                        prop: 'contractNo',
                        label: '合同号',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '180',
                        prop: 'projectName',
                        label: '项目名称',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '180',
                        prop: 'customerName',
                        label: '客户名称',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '180',
                        prop: 'createTime',
                        label: '报检日期',
                        isTrue: true,
                        sort: true,
                        isSearch: true,
                        searchInfoType: 'text',
                        formatter: this.formatDateTime,
                    },
                    {
                        minWidth: '180',
                        prop: 'createUser',
                        label: '报检人',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '200',
                        prop: 'result',
                        label: '结论',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                ],
                toolbar: [
                    // {
                    //     text: '新增',
                    //     type: 'primary',
                    //     fun: this.addOrUpdateHandle
                    // },
                ],
                operator: [
                {
                    text: '作废',
                    type: 'text',
                    size: 'small',
                    fun: this.deleteHandle
                }],
                operatorConfig: {
                fixed: 'right',
                label: '操作',
                width: 100,
                minWidth: 100
                },
            },
        }
    },
    components: {
        ttable,
    },
    created() { },
    computed: {
        ...mapGetters(['permissions'])
    },
    watch:{
    },
    methods:{
        // åˆ é™¤
        deleteHandle(row) {
            const _than = this
            this.$confirm('是否确认删除包装编号【' + row.packInsNo+'】的数据?' , '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                closeOnClickModal: false,
                type: 'warning'
            }).then(function() {
                deleteById(row.id).then((response)=>{
                    var data = response.data
                    if (data.code == 0) {
                        _than.$message.success('删除成功')
                    } else {
                        _than.$message.error('删除失败')
                    }
                    _than.getData()
                })
            }).catch((error) => {
                console.log(error);
            })
        },
        // æ–°å¢ž / ä¿®æ”¹
        addOrUpdateHandle(row) {
            this.$router.push({
                name: 'packageInspectForm',
                query: {
                    id: row == null ? null : row.id
                 },
                 params:{resultVal : row.result=='' ? null : row.result}
            })
        },
        formatResult(row, column, cellValue){
            if(cellValue != undefined || cellValue != null){
                if(cellValue == '不合格'){
                    return "<span style='color:#E84738;'>不合格</span>"
                }
                return "<span style='color:#34BD66;'>合格</span>"
            }
        },
        formatDateTime(row, column, cellValue) {
            return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : ''
        },
        getData() {
            this.$refs.packageInspectTable.getDataList()
        },
        // table自带事件
        handleSelectionChange(val) {
            this.multipleSelection = val
        },
    }
  }
  </script>
src/views/quality/packageinspect/packageInspect-form.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,602 @@
<template>
    <div style="height: 100%">
    <div class="page-header">
      <div class="header-left">
        <a @click="$router.go(-1)"><i class="icon-btn-back"></i></a>
        <h2 v-if="resultVal=='' || resultVal==null">编辑-包装检验</h2>
        <h2 v-else>查看-包装检验</h2>
      </div>
      <div class="btn-group header-right">
      </div>
    </div>
    <div class="page-main">
      <div class="packageInspect-basic">
        <el-form
        :model="dataForm"
        :rules="dataRule"
        ref="dataForm"
        style="width: 100%"
        class="l-mes"
        label-width="110px">
            <el-row>
              <el-col :span="6">
                <el-form-item label="包装检验编号" prop="packInsNo">
                <el-input v-model="dataForm.packInsNo" disabled>
                </el-input>
                </el-form-item>
            </el-col>
              <el-col :span="6">
                <el-form-item label="包装编号" prop="packageNo">
                <el-input v-model="dataForm.packageNo" disabled></el-input>
                </el-form-item>
            </el-col>
            <el-col :span="6">
                <el-form-item  prop="projectName" label="项目名称" >
                  <el-tooltip :disabled="dataForm.projectName==null" :content="dataForm.projectName">
                    <el-input v-model="dataForm.projectName" disabled ></el-input>
                  </el-tooltip>
                </el-form-item>
            </el-col>
            <el-col :span="6">
                <el-form-item label="客户名称" prop="customerName">
                    <el-input v-model="dataForm.customerName" disabled />
                </el-form-item>
            </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item label="合同号" prop="contractNo">
                <el-input v-model="dataForm.contractNo" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                  <el-form-item label="报检日期" prop="createTime">
                      <el-input v-model="dataForm.createTime" disabled />
                  </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="报检人" prop="createUser">
                      <el-input v-model="dataForm.createUser" disabled />
                </el-form-item>
              </el-col>
            </el-row>
        </el-form>
      </div>
      <div class="packageInspect-detail">
        <el-row :gutter="10" style="width:100%;z-index: 10;height:50px;">
            <el-col :span="20">检验项目</el-col>
            <el-col :span="2">
              <el-button v-if="resultVal=='' || resultVal==null" style="width:100%" size="small" @click="clickAddLine()">添加检验项目</el-button>
            </el-col>
            <el-col :span="2">
              <el-button v-if="resultVal=='' || resultVal==null" style="width:100%" type="primary"  size="small"
              @click="savePackIns()">保存</el-button>
            </el-col>
        </el-row>
        <el-row style="width:100%;">
            <el-col :span="24">
                <el-table
                :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}"
                :cell-style="{textAlign:'center'}"
                ref="table"
                :data="list"
                border
                style="width: 100%;"
                height="400"
                row-key="randomId" class="l-mes"
                default-expand-all
                :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
                  <el-table-column type="index" label="序号" width="60">
                  </el-table-column>
                  <el-table-column prop="name" label="项目" width="260">
                    <template slot-scope="scope">
                        <el-input :readonly="resultVal!=null" v-if="scope.row.children" class="inline-input" style="width:90%;" v-model="scope.row.name"
                          placeholder="请输入项目名称"></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="required" label="要求" width="260">
                    <template slot-scope="scope">
                      <div v-if="!scope.row.children">
                      <el-input :readonly="resultVal!=null" v-model="scope.row.required"
                        placeholder="请输入要求"></el-input>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="note" label="检验描述" width="260" >
                    <template slot-scope="scope">
                      <div v-if="!scope.row.children">
                        <el-input :readonly="resultVal!=null" v-model="scope.row.note" placeholder="检验描述"></el-input>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="testState" label="结论" min-width="150">
                    <template slot-scope="scope">
                        <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-select>
                    </template>
                  </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"
                      @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"
                      @click="clickDelLine(scope.row,scope.$index,scope.row.children!=null)">删除项目</el-button>
                    </template>
                  </el-table-column>
                </el-table>
            </el-col>
        </el-row>
      </div>
      <div class="packageInspect-result">
        <el-row>
          <el-col :span="24">检验结论</el-col>
        </el-row>
        <el-row style="width:100%">
          <el-col :span="24">
            <el-table class="l-mes" border height="90" :data="conclusionTable" ref="conclusion" v-model="conclusion"
            :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}"
            :cell-style="{textAlign:'center'}">
                <el-table-column prop="packageNo" label="包装编号"></el-table-column>
                <el-table-column prop="userName" label="检验员"></el-table-column>
                <el-table-column prop="result" label="检验结论">
                  <template slot-scope="scope">
                    <el-select :disabled="resultVal!=null" style="width:100%" v-model="scope.row.result">
                        <el-option label="合格" value="合格"></el-option>
                        <el-option label="不合格" value="不合格"></el-option>
                    </el-select>
                  </template>
                </el-table-column>
                <el-table-column  label="操作">
                    <template>
                        <el-button type="text" :disabled="resultVal!=null" @click="submitSave()" size="small">上报</el-button>
                    </template>
                </el-table-column>
            </el-table>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>
<script>
import {
  fetchListById,
  updatePackageInsProduct,
  updatePackageInspectById,
} from '@/api/quality/packageInspect'
export default {
    computed:{},
    components:{
    },
    data(){
        return{
            loading: false,
            resultVal: null,
            dataForm:{
                id: null,
                packInsNo: null,
                packageNo: '',
                contractNo: '',
                projectName: '',
                customerName: '',
                packageInsProductS: [{
                  deviceId: 0,
                  father:'',
                  name: '',
                  required: '',
                  testValue: '',
                  unit: '',
                  testValueList: []
                }]
            },
            form: null,
            list:[],
            conclusion: null,
            conclusionTable: [{
              packageNo: '',
              userName: '',
              result: ''
            }],
            dataRule: {},
        }
    },
    beforeUpdate(){
      this.$nextTick(()=>{
        this.$refs.table.doLayout();
      })
    },
    created(){
      this.dataForm.id = this.$route.query.id
      this.resultVal = this.$route.params.resultVal
      if(!this.resultVal){
        let val = sessionStorage.getItem("packIns-resultVal-"+this.dataForm.id)
        if(val){
          this.resultVal=val
        }
      }
      this.init()
    },
    watch:{
    },
    methods:{
      changeResult(){
        let result = ''
        let data = this.list
        if(data){
          result='合格'
          data.forEach(item=>{
            if(item.children){
              item.children.forEach(ele=>{
                if(ele.result=='不合格'){
                  result='不合格'
                }
              })
            }
          })
        }
        this.conclusionTable[0].result = result
      },
      //上报
      submitSave(){
        const _than = this
        this.$confirm('上报前,请确认检验项目是否已保存!', '提示', {
          confirmButtonText: '确认上报',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let data = {
          id: _than.dataForm.id,
          result: _than.conclusionTable[0].result,
        }
        updatePackageInspectById(data).then(res => {
          if(res.data.code === 0){
            _than.resultVal = res.data.data
            sessionStorage.setItem("packIns-resultVal-"+_than.dataForm.id,res.data.data)
            _than.$message.success("上报成功");
          }else{
            _than.$message.error("上报失败",res.data.data);
          }
        })
        }).catch(() => {})
      },
      // æ·»åŠ è¡Œ
      clickAddLine() {
          this.list.push({
            name: '',
            randomId: Math.random(),
            children: [{
              name: '',
              note: '',
              required: '',
              result: '',
              randomId: Math.random(),
            }]
          })
      },
      //添加子级
      clickAddChildren(row,index){
        row.children.push({
            name: row.name,
            note: '',
            required: '',
            result: '',
            randomId: Math.random(),
        })
      },
      // åˆ é™¤è¡Œ
      clickDelLine(row,index,isParent) {
        if(isParent){
          let parentIndex = this.list.findIndex(el =>{
            return el.randomId == row.randomId
          })
          this.list.splice(parentIndex,1)
        }else{
          let i = this.list.findIndex(el =>{
            return el.children.find(ele => ele.randomId == row.randomId)
          })
          let childrenIndex = this.list[i].children.findIndex(el =>{
            return el.randomId == row.randomId
          })
          this.list[i].children.splice(childrenIndex,1)
        }
      },
      //保存检查项
      savePackIns(){
        if(this.list.length==0){
          this.$message.error("检验项目为空!")
          return
        }else{
          let dataList = []
          this.list.forEach(item=>{
            if(item.children){
              item.children.forEach(ele=>{
                let obj = {
                  id: ele.pid || null,
                  name: item.name,
                  note: ele.note,
                  packageInspectId: this.dataForm.id,
                  required: ele.required,
                  result: ele.result,
                }
                dataList.push(obj)
              })
            }
          })
          updatePackageInsProduct(dataList).then(res=>{
            if(res.status===200){
              this.$message.success("保存成功")
            }
          }).catch(error=>{
            console.log(error);
            this.$message.error("保存失败")
          })
        }
      },
      init(){
        if(this.dataForm.id){
          fetchListById(this.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 = []
            let userNameList = []
            data.packageInsProductS.forEach(item => {
              if (item.children) {
                    let ele = {
                      randomId: Math.random(),
                      name: null,
                      children: []
                    }
                    ele.name = item.name
                    item.children.forEach(obj => {
                      if(obj.userName){
                        userNameList.push(obj.userName)
                      }
                      let o = {
                        name: item.name,
                        randomId: Math.random(),
                        required: obj.required,
                        pid: obj.pid,
                        note: obj.note?obj.note:'',
                        result: obj.presult
                      }
                      ele.children.push(o)
                    })
                    this.list.push(ele)
                }
              })
              this.conclusionTable = [{
                packageNo: data.packageNo,
                userName: Array.from(new Set(userNameList)).join(','),
                result: null
              }]
              this.$nextTick(()=>{
                if(this.list.length>0){
                  this.changeResult()
                }
              })
          }).catch(error=>{
            this.$message.error("获取失败",error)
          })
        }else{
          this.conclusionTable = []
        }
      },
    },
}
</script>
<style>
.packageInspect-detail {
  width: 100%;
  height: 490px;
  padding: 10px 20px;
  display: flex;
  border: 1px solid #ddd;
  background-color: #fff;
  margin-top: 10px;
  box-sizing: border-box;
  flex-wrap: wrap;
}
.packageInspect-result {
  width: 100%;
  height: 150px;
  padding: 10px 20px;
  display: flex;
  border: 1px solid #ddd;
  background-color: #fff;
  margin-top: 10px;
  box-sizing: border-box;
  flex-wrap: wrap;
}
.packageInspect-basic {
  background-color: #fff;
  height: 120px;
  display: flex;
  flex-wrap: wrap;
  padding: 10px 20px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}
.packageInspect-related-stock-part {
  background-color: #fff;
  width: 100%;
  height: 220px;
  border: 1px solid #ddd;
  padding: 10px 20px 0px 20px;
  box-sizing: border-box;
}
.packageInspect-bom {
  background-color: #fff;
  width: 100%;
  height: 499px;
  border: 1px solid #ddd;
  padding: 10px 20px;
  box-sizing: border-box;
}
.packageInspect-bom .el-card__header {
  padding: 1px 20px;
  border-bottom: 0px solid #ebeef5;
}
.packageInspect-bom .el-card__body {
  height: calc(100% - 22px);
}
.packageInspect-bom .el-card__body .el-collapse {
  height: 100%;
  overflow: auto;
}
.packageInspect-technology-params {
  background-color: #fff;
  width: calc(52% - 20px);
  float: left;
  height: 719px;
  border: 1px solid #ddd;
  padding: 10px 20px;
  margin-left: 20px;
}
.packageInspect-structure {
  background-color: #fff;
  width: 35%;
  float: left;
  height: 719px;
  border: 1px solid #ddd;
  padding: 10px 20px;
  box-sizing: border-box;
}
.packageInspect-flow {
  background-color: #fff;
  width: calc(65% - 20px);
  float: left;
  height: 719px;
  border: 1px solid #ddd;
  padding: 10px 20px;
  margin-left: 20px;
  box-sizing: border-box;
}
/*自定义disabled状态下checkbox的样式*/
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled.is-checked
  .el-checkbox__inner {
  background-color: #006eff;
  border-color: #006eff;
}
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled.is-checked
  + span.el-checkbox__label {
  color: #006eff;
  border-color: #006eff;
}
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled
  .el-checkbox__inner {
  background-color: #ffffff;
  cursor: pointer;
}
.completeproductstructure-checkout
  .el-checkbox__input.is-disabled
  + span.el-checkbox__label {
  color: #606266;
  cursor: pointer;
}
.completeproductstructure-checkout .el-checkbox__inner::after {
  border: 1px solid #fff !important;
  border-left: 0 !important;
  border-top: 0 !important;
  cursor: pointer !important;
}
.packageInspect-bom-div {
  width: 100%;
  margin-bottom: 5px;
}
.packageInspect-technology-div {
  width: 100%;
  margin-bottom: 5px;
  margin-right: 10px;
}
.packageInspect-technology-div .el-collapse {
  border-top: 0px;
  border-bottom: 0px;
}
.structure-detail-table th.gutter {
  display: table-cell !important;
  width: 10px !important;
}
.structure-detail-table colgroup.gutter {
  display: table-cell !important;
  width: 10px !important;
}
.final-product-checkout .el-card__header {
  padding: 0px 20px;
  border-bottom: 0px;
}
.final-product-checkout .el-card__body {
  padding: 0px 20px 20px;
}
.orimaterial-quantity .el-card__header {
  padding: 0px 20px;
  border-bottom: 0px;
}
.orimaterial-quantity .el-card__body {
  padding: 0px 20px 20px;
}
.packageInspect-materialcost-table th.gutter {
  display: table-cell !important;
  width: 10px !important;
}
.packageInspect-materialcost-table colgroup.gutter {
  display: table-cell !important;
  width: 10px !important;
}
.GooFlow .ico .ico_start:before {
  color: red;
}
.highlight-tab-class {
  color: #006eff;
  background: #e4e7ed;
  border-top: 1px solid #006eff;
}
.unhighlight-tab-class {
  border: 1px solid #e4e7ed;
  border-bottom: none;
}
.avue-crud__menu{
  min-height: 0px;
}
</style>
src/views/quality/processconfiguration/index.vue
@@ -299,7 +299,7 @@
          minWidth: 100
        }
      },
      materialType: [{label:'原材料检验',value:'原材料检验'},{label:'过程检验',value:'过程检验'},{label:'产品检验',value:'产品检验'}],
      materialType: [{label:'原材料检验',value:'原材料检验'},{label:'过程检验',value:'过程检验'},{label:'产品检验',value:'产品检验'},{label:'包装检验',value:'包装检验'}],
      StateList: [{label:'全部',value:''},{label:'已提交审核',value:'1'},{label:'待处理',value:'0'},{label:'已处理',value:'2'}],
      insStateList: [{label:'其他',value:''},{label:'瑕疵',value:'1'}],
    }
src/views/quality/teststandard/index.vue
@@ -240,13 +240,13 @@
                    v-if="editable"
                    >插入
                  </el-button>
                  <el-button
                  <!-- <el-button
                    type="text"
                    size="mini"
                    @click.stop="editTestStandardParam(scope.row)"
                    v-if="editable && scope.row.id != null"
                    >公式
                  </el-button>
                  </el-button> -->
                  <el-button
                    type="text"
                    size="mini"
src/views/technology/operation/operation-form.vue
@@ -120,12 +120,12 @@
                  />
                </el-select>
              </el-form-item> -->
              <!-- <el-form-item label="班组人员" prop="crewSize">
              <el-form-item label="班组人员" prop="crewSize">
                <el-input
                  v-model="dataForm.crewSize"
                  placeholder="班组人员"
                ></el-input>
              </el-form-item> -->
              </el-form-item>
              <!-- <el-form-item label="外部工序项目" prop="outsideOpItem">
                <el-select
                  v-model="dataForm.outsideOpItem"
vue.config.js
@@ -3,10 +3,11 @@
 * https://cli.vuejs.org/zh/config/
 */
// const url = 'http://192.168.2.7:9999'
const url = 'http://192.168.32.45:9999'
const url = 'http://192.168.2.7:9999'
//const url = 'http://192.168.32.45:9999'
// const url = 'http://192.168.0.23:9999'
//  const url = 'http://localhost:9999'
 const url = 'http://localhost:9999'
// const url = 'http://ztt-gateway:9999'
const localUrl = 'http://localhost:8089'