value
2023-08-30 14a8b0ffa81f0e8bb3f960e3507ac2d856bbef1e
bug修复
已修改3个文件
220 ■■■■■ 文件已修改
src/api/inspection/commisioninspection.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/reportForInspection/index.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspection/commisioninspection.js
@@ -80,3 +80,11 @@
        params
  })
}
export function delLink(params){
  return request({
    url: '/link-basic-table/delLink',
    method: 'post',
        params
  })
}
src/views/inspectionManagement/commissionInspection/index.vue
@@ -133,7 +133,8 @@
    import {
        getCommisionList,
        getViewUUID,
        selectViewUUID
        selectViewUUID,
        delLink
    } from '@/api/inspection/commisioninspection'
    export default {
        data() {
@@ -191,7 +192,6 @@
        },
        updated() {
            if (this.$router.currentRoute.name === 'AddCommision') {
                // console.log(this.$router.currentRoute.name)
                this.showDetail = true
            }
        },
@@ -203,7 +203,6 @@
                })
                this.commisionTable = res.data.row
                this.total = res.data.total
                // console.log(res)
                // 获取所有的委托单位名称
                const allDepartmentNames = [...new Set(this.commisionTable.map(item => item.entrusted))]
                // 将allDepartmentNames转换为options需要的格式
@@ -235,7 +234,6 @@
                        inspectionStatus: this.radioValue
                    })
                }
                // console.log(res)
                this.commisionTable = res.data.row
                this.total = res.data.total
            },
@@ -252,7 +250,6 @@
            },
            async radioclick() {
                // 处理点击radio的时间
                console.log('radioValue', this.radioValue)
                if (this.radioValue === 0) {
                    this.getCommisionList()
                } else {
@@ -261,7 +258,6 @@
                        pageSize: this.pageSize,
                        inspectionStatus: this.radioValue
                    })
                    // console.log(res)
                    this.commisionTable = res.data.row
                    this.total = res.data.total
                }
@@ -269,7 +265,6 @@
            },
            // 每页条数改变时触发 选择一页显示多少行
            async handleSizeChange(val) {
                // console.log(`每页 ${val} 条`)
                this.currentPage = 1
                this.pageSize = val
                if (this.radioValue === 0) {
@@ -286,7 +281,6 @@
            },
            // 当前页改变时触发 跳转其他页
            async handleCurrentChange(val) {
                // console.log(`当前页: ${val}`)
                this.currentPage = val
                if (this.radioValue === 0) {
                    this.getCommisionList()
@@ -329,7 +323,12 @@
                }
            },
            handleClick(row){
                console.log(row);
                delLink({
                    id: row.id
                }).then(res=>{
                    this.$message.success('删除成功')
                    this.getCommisionList()
                })
            }
        }
    }
src/views/inspectionManagement/reportForInspection/index.vue
@@ -4,37 +4,21 @@
        <div class="top-bar">
            <el-form ref="form" :inline="true" :model="searchData">
            <el-form-item label="材料编码:" position="left" class="sermargin">
              <el-input
                v-model="searchData.code"
                class="input-form"
                placeholder="请输入"
              >
                        <el-input v-model="searchData.code" class="input-form" placeholder="请输入">
              </el-input>
            </el-form-item>
            <el-form-item label="材料名称:" class="sermargin">
              <el-input
                v-model="searchData.name"
                class="input-form"
                placeholder="请输入"
              >
                        <el-input v-model="searchData.name" class="input-form" placeholder="请输入">
              </el-input>
            </el-form-item>
            <el-form-item label="状态:" class="sermargin">
              <el-select v-model="searchData.state" placeholder="全部">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="来料日期:" style="margin-right: 20px;">
              <el-input
                v-model="searchData.date"
                class="input-form"
                placeholder="请输入"
              >
                        <el-input v-model="searchData.date" class="input-form" placeholder="请输入">
              </el-input>
            </el-form-item>
            <el-form-item>
@@ -44,10 +28,7 @@
            </el-form-item>
            </el-form>
        </div>
        <el-dialog
          title="新增原材料报检"
          :visible.sync="addReportVisible"
          width="40%">
            <el-dialog title="新增原材料报检" :visible.sync="addReportVisible" width="40%">
          <el-form v-model="insertData" label-position="left" label-width="80px">
            <el-form-item label="标准类型">
              <el-input v-model="insertData.materialName" />
@@ -71,98 +52,41 @@
          <div class="table-header">
            <div class="search-bar">
              <el-radio-group v-model="radioValue" @change="radioclick">
                <el-radio-button v-for="option in radioOptions" :key="option.value" :label="option.value">{{ option.label }}</el-radio-button>
                            <el-radio-button v-for="option in radioOptions" :key="option.value"
                                :label="option.value">{{ option.label }}</el-radio-button>
              </el-radio-group>
            </div>
            <div class="generateInsp">
              <el-button @click="addReportBtn" type="primary" size="mini" icon="el-icon-document" style="background-color: rgb(1, 102, 226);">生成报检单</el-button>
                        <el-button @click="addReportBtn" type="primary" size="mini" icon="el-icon-document"
                            style="background-color: rgb(1, 102, 226);">生成报检单</el-button>
            </div>
          </div>
          <div class="table-box">
            <el-table
              ref="inspectionTable"
              :max-height="800"
              :cell-style="{textAlign: 'center'}"
                    <el-table ref="inspectionTable" :max-height="800" :cell-style="{textAlign: 'center'}"
              :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
              :data="inspectionTable"
              style="width: 100%"
              @selection-change="handleSelectionChange"
            >
              <el-table-column
                type="selection"
                :selectable="checkSelect"
                min-width="5%">
                        :data="inspectionTable" style="width: 100%" @selection-change="handleSelectionChange">
                        <el-table-column type="selection" :selectable="checkSelect" min-width="5%">
              </el-table-column> 
              <el-table-column
                type="index"
                label="序号"
                min-width="8%"
              />
              <el-table-column
                prop="createTime"
                label="来料日期"
                min-width="8%"
              />
              <el-table-column
                prop="supplierName"
                label="供应商名称"
                min-width="12%"
              />
              <el-table-column
                prop="materialCoding"
                label="材料编码"
                min-width="8%"
              />
              <el-table-column
                prop="materialName"
                label="材料名称"
                min-width="8%"
              />
              <el-table-column
                prop="specificationsModels"
                label="规格型号"
                min-width="12%"
              />
              <el-table-column
                prop="unit"
                label="单位"
                min-width="5%"
              />
              <el-table-column
                prop="quantity"
                label="数量"
                min-width="5%"
              />
              <el-table-column
                prop="inspectionDate"
                label="报检日期"
                min-width="8%"
              />
              <el-table-column
                prop="surveyor"
                label="检验人"
                min-width="8%"
              />
              <el-table-column
                prop="dateSurvey"
                label="检验日期"
                min-width="8%"
              />
              <el-table-column
                prop="type"
                label="状态"
                min-width="8%"
              >
                        <el-table-column type="index" label="序号" min-width="8%" />
                        <el-table-column prop="createTime" label="来料日期" min-width="8%" />
                        <el-table-column prop="supplierName" label="供应商名称" min-width="12%" />
                        <el-table-column prop="materialCoding" label="材料编码" min-width="8%" />
                        <el-table-column prop="materialName" label="材料名称" min-width="8%" />
                        <el-table-column prop="specificationsModels" label="规格型号" min-width="12%" />
                        <el-table-column prop="unit" label="单位" min-width="5%" />
                        <el-table-column prop="quantity" label="数量" min-width="5%" />
                        <el-table-column prop="inspectionDate" label="报检日期" min-width="8%" />
                        <el-table-column prop="surveyor" label="检验人" min-width="8%" />
                        <el-table-column prop="dateSurvey" label="检验日期" min-width="8%" />
                        <el-table-column prop="type" label="状态" min-width="8%">
              <template slot-scope="scope">
                <span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }">
                  {{ scope.row.type === 1 ? '已报检':'未报检' }}
                </span>
              </template>
              </el-table-column>
              <el-table-column
                label="操作"
                min-width="8%">
                        <el-table-column label="操作" min-width="8%">
                <template slot-scope="scope">
                  <el-button type="text" size="small" @click="removeFun(scope.row)">删除</el-button>
                </template>
@@ -170,14 +94,9 @@
            </el-table>
            <!-- 分页器 -->
            <div>
              <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="currentPage"
                :page-sizes="[5, 10, 15, 20]"
                :page-size="pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total">
                        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                            :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
                            layout="total, sizes, prev, pager, next, jumper" :total="total">
              </el-pagination>
            </div>
          </div>
@@ -198,7 +117,8 @@
                </el-col>
                <el-col  :span="8">
                  <el-form-item label="供应商名称:">
                    <el-input style="width: 180px;" :value="inspectionForm.supplier" disabled autocomplete="off" />                  </el-form-item>
                                    <el-input style="width: 180px;" :value="inspectionForm.supplier" disabled autocomplete="off" />
                                </el-form-item>
                </el-col>
                <el-col  :span="8">
                  <el-form-item label="样品编号:">
@@ -251,9 +171,7 @@
            <el-button @click="showNewPage = false" type="primary" plain size="mini" icon="el-icon-back">返回</el-button>
          </div>
          </div>
            <el-table
              :max-height="800"
              :cell-style="{textAlign: 'center'}"
                <el-table :max-height="800" :cell-style="{textAlign: 'center'}"
              :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
              :data="inspectionItems">
            <el-table-column type="index" label="序号" width="60"></el-table-column>
@@ -265,14 +183,16 @@
            <el-table-column prop="userName" label="检验人">
              <template slot-scope="scope">
                <el-select v-model="scope.row.checker" size="small" slot="append" style="width: 260px;">
                    <el-option v-for="(item,index) in checkeroptions" :key="index" :value="item.value" :label="item.label">{{ item.label }}</el-option>
                                <el-option v-for="(item,index) in checkeroptions" :key="index" :value="item.value"
                                    :label="item.label">{{ item.label }}</el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column prop="device" label="试验设备">
                <template slot-scope="scope">
                <el-select v-model="scope.row.device" size="small" slot="append" style="width: 260px;">
                    <el-option v-for="(item,index) in deviceoptions" :key="index" :value="item.value" :label="item.label">{{ item.label }}</el-option>
                                <el-option v-for="(item,index) in deviceoptions" :key="index" :value="item.value"
                                    :label="item.label">{{ item.label }}</el-option>
                </el-select>
            </template>
            </el-table-column>
@@ -283,7 +203,11 @@
</template>
<script>
import { getRawMaterialList,addInspect,selectInspectsListById } from '@/api/inspection/rawmaterial'
    import {
        getRawMaterialList,
        addInspect,
        selectInspectsListById
    } from '@/api/inspection/rawmaterial'
export default {
  data() {
    return {
@@ -383,7 +307,6 @@
    },
    handleSelectionChange(val){
      this.checkData = val;
      console.log(val);
    },
    //生成报检单按钮
    addReportBtn(){
@@ -419,7 +342,9 @@
    //生成报价单
    async createReport(param){
      await addInspect(param);
      const res2 = await selectInspectsListById({ id : 59});
                const res2 = await selectInspectsListById({
                    id: 59
                });
      this.resultData = res2.data;
      this.inspectionForm = res2.data;
      this.inspectionItems = res2.data.insProducts;
@@ -427,14 +352,18 @@
    },
    // 获取分页列表数据
    async getRawMaterialList(){
      const res = await getRawMaterialList({pageNo: this.currentPage,pageSize:this.pageSize})
                const res = await getRawMaterialList({
                    pageNo: this.currentPage,
                    pageSize: this.pageSize
                })
      this.inspectionTable = res.data.row
      this.data = res.data.row
      this.total = res.data.total
    },
    async search(){
      this.radioValue = this.searchData.state
      const res = await getRawMaterialList({condition: this.searchData.state,
                const res = await getRawMaterialList({
                    condition: this.searchData.state,
        createTime:this.searchData.date,
        materialCoding:this.searchData.code,
        materialName: this.searchData.name,
@@ -467,12 +396,18 @@
    // 每页条数改变时触发 选择一页显示多少行
    handleSizeChange(val) {
      this.pageSize = val
      this.getRawMaterialList({pageNo: this.currentPage,pageSize:this.pageSize})
                this.getRawMaterialList({
                    pageNo: this.currentPage,
                    pageSize: this.pageSize
                })
    },
    // 当前页改变时触发 跳转其他页
    handleCurrentChange(val) {
      this.currentPage = val
      this.getRawMaterialList({pageNo: this.currentPage,pageSize:this.pageSize})
                this.getRawMaterialList({
                    pageNo: this.currentPage,
                    pageSize: this.pageSize
                })
    }
  }
}
@@ -481,19 +416,23 @@
<style scoped lang="scss">
.content-main{
  height: 100%;
  .top-bar{
    margin: -25px -15px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 24px 24px 0px 24px;
    .sermargin{
        margin-right: 60px;
    }
}
.rightBtn{
    background-color: rgb(1, 102, 226);
}
.library-table{
      background-color: #fff;
      flex: 1;
@@ -501,14 +440,17 @@
      margin-top: 40px;
      display: flex;
      flex-direction: column;
      .table-header{
        padding: 20px;
        display: flex;
        justify-content: space-between;
        .el-form-item{
          margin-bottom: 30px !important;
        }
      }
      .table-box{
          padding: 0px 20px;
          margin-top: 0px;
@@ -517,9 +459,11 @@
          /* padding: 20px 20px 10px 20px; */
          display: flex;
          flex-direction: column;
          .el-table {
            flex: 1;
          }
          >div:nth-child(2){
            display: flex;
            justify-content: end;
@@ -527,6 +471,7 @@
          }
      }
    }
.checked {
  color: green;
}
@@ -537,21 +482,26 @@
.newPage{
  margin: -25px -15px;
  .inspectionForm{
    background-color:#fff;
    .formwrapper{
      margin-left: 80px;
      padding:10px 0px;
    }
  }
  .inspectionProject{
    margin:10px 0px;
    .header{
      display:flex;
      justify-content: space-between;
      padding-top: -3px;
      padding-bottom: 3px;
    }
    .el-table{
      padding: 10px 10px;
      height: 65vh;
@@ -560,5 +510,4 @@
  }
}
}
</style>