zouyu
2024-02-29 363678a54142e62fdd4ca39a0db5c54af1a704dc
生产调度修改
已修改14个文件
515 ■■■■■ 文件已修改
src/api/plan/customer.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/customerOrderInterrelated.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/customerorder.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/productionschedul.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/rawMaterial.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/const/crud/customerOrder/customerOrderForm.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/index.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/sample-customerorder-form.vue 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/productionschedul/index.vue 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processInspect/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processconfiguration/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/rawMaterial-form.vue 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/customer.js
@@ -25,9 +25,9 @@
  })
}
export function addObj(obj) {
export function saveOrUpdate(obj) {
  return request({
    url: '/mes/customer',
    url: '/mes/customer/saveOrUpdate',
    method: 'post',
    data: obj
  })
src/api/plan/customerOrderInterrelated.js
@@ -15,10 +15,11 @@
  })
}
export function checkHanderOrder(orderId) {
export function checkHanderOrder(data) {
    return request({
      url: '/mes/customerOrderInterrelated/checkHanderOrder/' + orderId,
      url: '/mes/customerOrderInterrelated/checkHanderOrder',
      method: 'post',
      data: data
    })
  }
src/api/plan/customerorder.js
@@ -8,6 +8,13 @@
  })
}
export function getCustomerMainAndOrderBycNo(contractNo) {
  return request({
    url: '/mes/plan/customerOrder/getCustomerMainAndOrderBycNo/' + contractNo,
    method: 'get',
  })
}
export function addCustomerOrder(obj) {
  return request({
    url: '/mes/plan/customerOrder',
src/api/plan/productionschedul.js
@@ -52,4 +52,4 @@
    method: 'post',
    data: data
  })
}
}
src/api/quality/rawMaterial.js
@@ -8,11 +8,10 @@
  })
}
export function checkPutIFS(id,data) {
export function checkPutIFS(id,result) {
  return request({
    url: '/mes/rawInspect/check/'+id,
    url: '/mes/rawInspect/check/'+id+'/'+result,
    method: 'post',
    data: data
  })
}
src/const/crud/customerOrder/customerOrderForm.js
@@ -31,6 +31,9 @@
  refreshBtn: false, // 是否显示刷新按钮
  columnBtn: false, // 是否显示显影按钮H
  column: [{
    prop: 'id',
    hide:true
  },{
    label: '零件号',
    slot: true,
    formSlot: true,
@@ -44,7 +47,7 @@
    cell: true,
    type: 'input',
    minWidth: 200,
    span: 24
    span: 24,
  }, {
    label: '规格型号',
    prop: 'customerPartSpec',
src/views/plan/customerorder/index.vue
@@ -949,7 +949,7 @@
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
            checkHanderOrder(val.id).then(res=>{
            checkHanderOrder(val).then(res=>{
            if(res.status===200){
                this.$message.success("审核通过")
                this.getData()
@@ -1106,16 +1106,23 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row ? row.id : row)
      })
      if(row.isPass){
        this.addOrUpdateVisible = true
        this.$nextTick(() => {
            this.$refs.addOrUpdate.init(row ? row.id : row)
        })
      }else{
        this.addSampleVisible = true
        this.$nextTick(() => {
            this.$refs.addSampleForm.init(row ? row.contractNo : null)
        })
      }
    },
    // 新增样品订单
    addSampleCustomerOrder() {
      this.addSampleVisible = true
      this.$nextTick(() => {
        this.$refs.addSampleForm.init(0)
        this.$refs.addSampleForm.init(null)
      })
    },
    // 打开日期选择框
src/views/plan/customerorder/sample-customerorder-form.vue
@@ -1,7 +1,7 @@
<template>
  <el-dialog
    width="75%"
    top="10vh"
    top="5vh"
    :fullscreen="isFullScreen"
    :close-on-click-modal="false"
    :visible.sync="visible"
@@ -230,7 +230,8 @@
}
</style>
<script>
import { addObj } from '@/api/plan/customer'
import { saveOrUpdate } from '@/api/plan/customer'
import { getCustomerMainAndOrderBycNo } from '@/api/plan/customerorder'
import { remote } from '@/api/admin/dict'
import PartDialog from '@/views/common/part.vue'
import {dateFormat} from '@/util/date'
@@ -267,18 +268,19 @@
      currentSelectRow: 0,
      option: tableOption,
      tableData: [{
          "$cellEdit": true,
          "$index": 0,
          "partNo": "",
          "customerPartSpec": "",
          "manufactureAttr": "",
          "productName": "",
          "productType": "",
          "otcUnit": "",
          "buyQtyDue": "",
          "shippingAddress": "",
          "remark": "",
          "isTrusted": true
          id: null,
          $cellEdit: true,
          $index: 0,
          partNo: "",
          customerPartSpec: "",
          manufactureAttr: "",
          productName: "",
          productType: "",
          otcUnit: "",
          buyQtyDue: "",
          shippingAddress: "",
          remark: "",
          isTrusted: true
      }],
      staffOptions: [],
      title: '',
@@ -287,6 +289,7 @@
      buttonDisable: false,
      showPart: false,
      dataForm: {
        id: null,
        contractNo: null,
        customerName: null,
        customerNo: null,
@@ -327,12 +330,46 @@
        this.staffOptions = response.data.data
      })
    },
    init(id) {
      this.initDataForm()
      this.visible = true
      this.$nextTick(() => {
        this.title = '新增'
      })
    init(contractNo) {
      if(contractNo){
        getCustomerMainAndOrderBycNo(contractNo).then(res=>{
            if(res.status===200){
                let data = res.data.data
                this.dataForm.id = data.id
                this.dataForm.contractNo = data.contractNo
                this.dataForm.customerName = data.customerName
                this.dataForm.entityName = data.entityName
                this.dataForm.province = data.province
                this.salesSelectData = data.salesMan
                this.dataForm.salesMan = data.salesMan
                this.dataForm.originalContractStatus = data.originalContractStatus
                this.dataForm.isCp = data.isCp
                this.dataForm.customerNo = data.customerNo
                this.dataForm.returnStatus = data.returnStatus
                this.dataForm.placeOrderDate = data.placeOrderDate
                this.dataForm.factoryPlaceOrderDate = data.factoryPlaceOrderDate
                this.dataForm.deliveryDate = data.deliveryDate
                this.dataForm.comment = data.comment
                data.customerOrderVOList.forEach(e=>{
                    e.$cellEdit = true
                })
                this.tableData = data.customerOrderVOList
                console.log(this.dataForm);
            }
        }).catch(error=>{
            console.error(error)
        })
        this.visible = true
        this.$nextTick(() => {
            this.title = '编辑'
        })
      }else{
        this.initDataForm()
        this.visible = true
        this.$nextTick(() => {
            this.title = '新增'
        })
      }
    },
    initDataForm() {
      this.dataForm.contractNo = null
@@ -349,18 +386,19 @@
      this.dataForm.deliveryDate = null
      this.dataForm.comment = null
      this.dataForm.customerOrderVOList = [{
          "$cellEdit": true,
          "$index": 0,
          "partNo": "",
          "customerPartSpec": "",
          "manufactureAttr": "",
          "productName": "",
          "productType": "",
          "otcUnit": "",
          "buyQtyDue": "",
          "shippingAddress": "",
          "remark": "",
          "isTrusted": true
          id: null,
          $cellEdit: true,
          $index: 0,
          partNo: "",
          customerPartSpec: "",
          manufactureAttr: "",
          productName: "",
          productType: "",
          otcUnit: "",
          buyQtyDue: "",
          shippingAddress: "",
          remark: "",
          isTrusted: true
      }]
    },
    // 表单提交
@@ -387,12 +425,18 @@
      _than.$refs.dataForm.validate((valid) => {
        if (valid) {
          _than.dataForm.customerOrderVOList = _than.tableData
          addObj(_than.dataForm).then((data) => {
              _than.$message.success('添加成功')
              _than.initDataForm();
              _than.visible = false
              _than.buttonDisable = false
              _than.$emit('refreshDataList', 1)
          saveOrUpdate(_than.dataForm).then((res) => {
            if(res.status===200){
                if(_than.dataForm.id){
                    _than.$message.success('更新成功')
                }else{
                    _than.$message.success('添加成功')
                }
                _than.initDataForm();
                _than.visible = false
                _than.buttonDisable = false
                _than.$emit('refreshDataList', 1)
            }
            }).catch((error) => {
              _than.buttonDisable = false
            })
src/views/plan/productionschedul/index.vue
@@ -2,56 +2,67 @@
  <div class="mod-config">
    <basic-container>
      <el-row>
        <el-col :span="16" style="height:100vh">
          <el-row style="height:65%;padding:0px 10px;">
        <el-col :span="24">
          <el-row style="padding:0px 10px;">
            <el-col :span="24" style="margin: 0;">
              <div style="display:flex;height:36px;justify-content: space-between;align-items:center;">
                <div><span style="color:#E84738;font-weight: bold;">未完成</span></div>
                <div>
                  <el-button @click="tagFinished" size="mini" round type="success">标记已完成</el-button>
                    <el-dropdown @command="changeTable">
                        <span :style="dropdownTitleStyle" class="el-dropdown-link">
                            {{dropdownTitle}}<i class="el-icon-arrow-down el-icon--right"></i>
                        </span>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item command="undone">待完成调度</el-dropdown-item>
                            <el-dropdown-item command="done">已完成调度</el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                </div>
                <div>
                  <el-button @click="tagFinished" v-if="showUnDownTable" 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 && showUnDownTable"
                  @click="openEditDialog">编辑时间线</el-button>
                  <el-tooltip content="刷新">
                    <el-button circle icon="el-icon-refresh" @click="getDataList"></el-button>
                  </el-tooltip>
                </div>
              </div>
              <!-- 待完成调度表格 -->
              <avue-crud
              v-if="showUnDownTable"
              class="unfinished-crud"
              :data="tableData"
              ref="crud"
              ref="unfinished"
              :option="option"
              :span-method="spanMethod"
              @refresh-change="getDataList"
              @current-change="handleCurrentChange"
              @size-change="handleSizeChange"
              @cell-click="handleClickCell"
              :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"
                @click="editHandle(row, index)">编辑</el-button>
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                @click="deleteHandle(row, index)">删除</el-button>
              </template>
                <template slot="product" slot-scope="scope">
                    <el-link type="primary">{{ scope.row.product }}</el-link>
                </template>
                <template #menu="{ row, index }">
                    <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"
                    @click="deleteHandle(row, index)">删除</el-button>
                </template>
              </avue-crud>
            </el-col>
          </el-row>
          <el-row style="height:35%;padding:0px 10px;">
            <el-col :span="24" style="margin: 0;">
              <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
              v-else
              class="finished-crud"
              :data="finishedTableData"
              ref="finished"
@@ -59,45 +70,20 @@
              :span-method="spanMethod"
              @refresh-change="getFinishedData"
              @current-change="handleCurrentChange"
              @cell-click="handleClickCell"
              @size-change="handleSizeChange"
              :page="finishedPage"
              @selection-change="selectionFinishedRow">
                <template slot="product" slot-scope="scope">
                    <el-link type="primary">{{ scope.row.product }}</el-link>
                </template>
              </avue-crud>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="8" style="padding-left: 10px">
          <div style="">
            <el-card>
              <div slot="header" class="clearfix">
                <span>调度时间线</span>
              </div>
              <div style="height:100vh;overflow-y: scroll;">
                <el-timeline>
                    <el-timeline-item
                      placement="top"
                      :color="(item.planTime||item.actualTime) ? '#34BD66' :null"
                      :icon="(item.planTime||item.actualTime) ? 'el-icon-circle-check' :null"
                      v-for="(item, index) in scheduleList"
                      :key="index"
                      :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>
            </div>
            </el-card>
          </div>
        </el-col>
      </el-row>
    </basic-container>
    <!-- 编辑时间线 -->
    <el-dialog
    title="编辑时间线"
    :visible.sync="dialogVisible"
@@ -147,32 +133,63 @@
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmEditSchedul">确 定</el-button>
      </span>
  </el-dialog>
  <el-dialog
    title="编辑"
    :visible.sync="editDialogVisible"
    width="50%">
    <el-form :model="editForm" label-width="120px">
      <el-row>
        <el-col :span="24">
          <el-form-item label="生产情况:">
            <el-input style="width:100%" placeholder="请输入生产情况" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="生产程度:">
            <el-input style="width:100%" placeholder="请输入生产程度" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="editDialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="confirmEdit()">确 定</el-button>
    </span>
  </el-dialog>
    </el-dialog>
    <!-- 编辑生产过程和生产情况 -->
    <el-dialog
        title="编辑"
        :visible.sync="editDialogVisible"
        width="50%">
        <el-form :model="editForm" label-width="120px">
        <el-row>
            <el-col :span="24">
            <el-form-item label="生产情况:">
                <el-input style="width:100%" placeholder="请输入生产情况" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input>
            </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="24">
            <el-form-item label="生产程度:">
                <el-input style="width:100%" placeholder="请输入生产程度" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input>
            </el-form-item>
            </el-col>
        </el-row>
        </el-form>
        <span slot="footer" class="dialog-footer">
        <el-button @click="editDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmEdit()">确 定</el-button>
        </span>
    </el-dialog>
    <!-- 查看时间线 -->
    <el-dialog
    title="查看调度时间线"
    top="5vh"
    :visible.sync="showTimeLineDialog"
    width="40%">
        <el-card>
            <div style="height:500px;overflow-y: scroll;">
            <el-timeline>
                <el-timeline-item
                    placement="top"
                    :color="(item.actualTime) ? '#34BD66' :null"
                    :icon="(item.actualTime) ? 'el-icon-circle-check' :null"
                    v-for="(item, index) in scheduleList"
                    :key="index"
                    :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>
            </div>
        </el-card>
    </el-dialog>
  </div>
</template>
@@ -184,12 +201,20 @@
  deleteSchedul,
  updateState,
  checkTimeLines,
  updateSchedul
} from '@/api//plan/productionschedul'
import ttable from '@/views/common/ztt-table.vue'
import { mapGetters } from 'vuex'
export default {
    data() {
    return {
      dropdownTitleStyle: {
        color: '#E84738',
        fontWeight: 'bold'
      },
      showUnDownTable: true,
      dropdownTitle: '待完成调度',
      showTimeLineDialog:false,
      editForm:{
        id: null,
        productionRoutine: null,
@@ -221,7 +246,7 @@
          prop:'id',
          order:'descending'
        },
        height: 370,
        height: 530,
        selection: true,
        columnBtn: false,
        index: true,
@@ -280,6 +305,7 @@
            prop: 'product',
            label: '产品名',
            overHidden: true,
            slot: true
          },
          {
            minWidth: 120,
@@ -391,6 +417,7 @@
            prop: 'product',
            label: '产品名',
            overHidden: true,
            slot: true
          },
          {
            minWidth: 120,
@@ -502,12 +529,26 @@
      }
    }
  },
  mounted() {
  },
  beforeDestroy() {
  },
  mounted() {},
  beforeDestroy() {},
  methods: {
    handleClickCell(row, column, cell, event){
        if(column.label === '产品名'){
            this.getScheduleById(row.mid)
            this.showTimeLineDialog = true
        }
    },
    changeTable(command){
        if(command === 'undone'){
            this.dropdownTitle = '待完成调度'
            this.dropdownTitleStyle = {color:'#E84738',fontWeight: 'bold'}
            this.showUnDownTable = true
        }else if(command === 'done'){
            this.dropdownTitle = '已完成调度'
            this.dropdownTitleStyle = {color:'#34BD66',fontWeight: 'bold'}
            this.showUnDownTable = false
        }
    },
    tagFinished(){
      if(this.multipleSelection.length < 1){
        this.$message.warning("请至少选择一条数据")
@@ -567,6 +608,7 @@
      })
    },
    confirmEditSchedul(){
      const _than = this
      let data = this.scheduleEditList
      let mIds = this.multipleSelection.map(ele=>{
        return ele.mid
@@ -588,16 +630,15 @@
      }
      fillTime(obj).then(res=>{
        if(res.status===200){
          this.$message.success("更新成功")
            _than.$message.success("更新成功")
        }else{
          this.$message.error("更新失败")
            _than.$message.error("更新失败")
        }
        this.getScheduleById(orderObj.id)
        this.dialogVisible = false
        // _than.getScheduleById(orderObj.id)
        _than.dialogVisible = false
      }).catch(error=>{
        console.error(error);
      })
    },
    initTimeLine(data){
      let scheduleList = []
@@ -649,7 +690,10 @@
    },
    selectionRow(val){
      this.multipleSelection = val
      this.getScheduleById(val[val.length-1].mid)
    //   if(this.multipleSelection.length>0){
    //       this.getScheduleById(val[val.length-1].mid)
    //       this.showTimeLineDialog = true
    //   }
    },
    selectionFinishedRow(val){
      if (val.length > 1) {
@@ -686,6 +730,9 @@
    getDataList(){
      this.getUnFinishedData()
      this.getFinishedData()
      this.$nextTick(()=>{
          this.rowCalc()
      })
    },
    getUnFinishedData() {
      this.loading = true
@@ -728,7 +775,7 @@
        deleteSchedul(row.mid).then(res=>{
          if(res.status===200){
            _than.$message.success("删除成功")
            _than.getData()
            _than.getDataList()
          }
        }).catch(error=>{
          console.error(error)
src/views/quality/packageinspect/index.vue
@@ -17,7 +17,7 @@
  <template>
    <div class="mod-config">
        <basic-container>
            <ttable
            <ttable
            :table="table"
            :resultData="resultData"
            @handleSelectionChange="handleSelectionChange"
@@ -121,7 +121,7 @@
                        isTrue: true,
                        sort: true,
                        isSearch: true,
                        searchInfoType: 'text',
                        searchInfoType: 'date',
                        formatter: this.formatDateTime,
                    },
                    {
@@ -155,7 +155,7 @@
    components: {
        ttable,
    },
    created() {
    created() {
        if(this.permissions.quality_packageinspect_del){
            this.table.operator = [{
                    text: '作废',
@@ -202,7 +202,7 @@
            }
            this.$router.push({
                name: 'packageInspectForm',
                query: {
                query: {
                    id: row == null ? null : row.id
                 },
                 params:{resultVal : row.result=='' ? null : row.result}
@@ -229,4 +229,3 @@
    }
  }
  </script>
src/views/quality/processInspect/index.vue
@@ -2,7 +2,7 @@
    <div class="content-main">
        <div class="rawPage">
            <basic-container>
                <ttable
                <ttable
                :table="table"
                @handleSelectionChange="handleSelectionChange"
                :prelang="prelang"
@@ -176,7 +176,7 @@
        computed: {
            ...mapGetters(['permissions'])
        },
        created() {
        created() {
            if(this.permissions.quality_processInspect_add){
                this.table.toolbar.push({
                        text: '新增',
@@ -329,4 +329,4 @@
    .rawPage .content-body {
        flex: 1;
    }
</style>
</style>
src/views/quality/processconfiguration/index.vue
@@ -323,10 +323,7 @@
            type: 'text',
            size: 'small',
            fun: this.AuditResult,
            show: {
                key: 'type',
                val: ['过程检验','产品检验','包装检验']
            }
            showFun: (row)=>{return row.type != '原材料检验'}
          })
    }
    this.table.operator = arr.length>0 ? arr : null
src/views/quality/rawMaterial/index.vue
@@ -317,25 +317,22 @@
                cancelButtonText: '不通过',
                type: 'warning'
            }).then(() => {
                checkPutIFS(val.id,{result: 1}).then(res=>{
                    if(res.status===200){
                        console.log(res)
                    }
                }).catch(error=>{
                    console.error(error)
                })
                this.checkPutIFSFun(val.id,1);
            }).catch((action) => {
                if(action === 'cancel'){
                    checkPutIFS(val.id,{result: 2}).then(res=>{
                        if(res.status===200){
                            console.log(res)
                        }
                    }).catch(error=>{
                        console.error(error)
                    })
                    this.checkPutIFSFun(val.id,2);
                }
            });
        },
        checkPutIFSFun(id,result){
            checkPutIFS(id, result).then(res=>{
                if(res.status===200){
                    this.getData()
                }
            }).catch(error=>{
                console.error(error)
            })
        },
        downloadReport(){
            let selection = this.multipleSelection
            if(!selection || selection.length < 1){
src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -92,21 +92,26 @@
            </el-row>
            <el-row>
                <el-col :span="6">
                    <el-form-item label="报检日期" prop="createTime">
                        <el-date-picker
                        :disabled="dataForm.id!=null"
                        v-model="dataForm.createTime"
                        type="datetime"
                        placeholder="报检日期">
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="报检人" prop="createUser" v-if="dataForm.id!=null">
                        <el-input v-model="dataForm.createUser" disabled />
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item  prop="projectName" label="项目名称" v-if="dataForm.id!=null">
                    <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="createTime" v-if="dataForm.id!=null">
                      <el-input v-model="dataForm.createTime" disabled />
                  </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="报检人" prop="createUser" v-if="dataForm.id!=null">
                      <el-input v-model="dataForm.createUser" disabled />
                </el-form-item>
              </el-col>
            </el-row>
        </el-form>
@@ -480,7 +485,8 @@
              testState: ''
            }],
            dataRule: {
              code:[{ required: true, message: '请扫描选择零件', trigger: 'blur' }]
              code:[{ required: true, message: '请扫描选择零件', trigger: 'blur' }],
              createTime: [{ required: true, message: '请选择报检日期', trigger: 'change' }]
            },
            deviceList: [],
        }
@@ -965,22 +971,26 @@
        row.children.push(obj)
      },
      save(){
        const _than = this
        let data = this.dataForm
        this.list.forEach(item=>{
          item.children.forEach(c=>{
            c.testValue=c.testValueList.join(",")
          })
        })
        data.rawInsProducts = this.list
        addRawInspects(data).then(res=>{
            this.$message.success("保存成功")
            // this.$router.go(-1)
        }).catch(error=>{
          this.$message.error(error)
        })
        _than.$nextTick(()=>{
            _than.init(Number(res.data.msg))
        this.$refs.dataForm.validate(valid=>{
            if(valid){
                const _than = this
                let data = this.dataForm
                this.list.forEach(item=>{
                item.children.forEach(c=>{
                    c.testValue=c.testValueList.join(",")
                })
                })
                data.rawInsProducts = this.list
                addRawInspects(data).then(res=>{
                    this.$message.success("保存成功")
                    // this.$router.go(-1)
                }).catch(error=>{
                this.$message.error(error)
                })
                _than.$nextTick(()=>{
                    _than.init(Number(res.data.msg))
                })
            }
        })
      },
      getDeviceList(){