| | |
| | | top="10vh" |
| | | > |
| | | <div class="check-box"> |
| | | <el-radio-group v-model="type" @change="handleRadioChange"> |
| | | <el-radio-group v-model="type" @click.native="handleRadioChange"> |
| | | <el-radio :style="`background-color: ${type==0?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="0" border>原材料检验</el-radio> |
| | | <el-radio :style="`background-color: ${type==1?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="1" border>委托检验</el-radio> |
| | | <el-radio :style="`background-color: ${type==2?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="2" border>成品检验</el-radio> |
| | |
| | | <el-dialog |
| | | title="标准库" |
| | | :visible.sync="Standardframe" |
| | | width="48%" |
| | | |
| | | > |
| | | <!-- <el-form :model="form"> |
| | | <el-form-item label="请选择审核结果:" :label-width="formLabelWidth"> |
| | | </el-form-item> |
| | | </el-form> --> |
| | | |
| | | <!-- <div slot="footer" class="dialog-footer"> --> |
| | | width="48%"> |
| | | <el-card> |
| | | <template slot-scope="scope" > |
| | | <span>版本选择:</span> |
| | | <el-select v-model="commisionTable" size="small" slot="append" style="width: 220px;"> |
| | | <el-option v-for="item in BANben" :key="item.id" :label="item.name" :value="item.name"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-card> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%; margin-bottom: 20px" |
| | | row-key="name" |
| | | border |
| | | height="calc(100vh - 250px)" |
| | | |
| | | default-expand-all |
| | | ref="multipleTable" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- </div> --> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="Standardframe = false">取 消</el-button> |
| | | <el-button type="primary" @click="Standardframe = false">确 定</el-button> |
| | | </span> |
| | | |
| | | </el-dialog> |
| | | |
| | | <!-- 原材料检验模态框 --> |
| | |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="rawMaterialTable" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | @selection-change="handleSelectionChange_0" |
| | | > |
| | | <el-table-column |
| | | <el-table-column |
| | | type="selection" |
| | | label="" |
| | | min-width="10%" |
| | | /> |
| | | /> |
| | | <el-table-column |
| | | type="index" |
| | | label="序号" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="dateSurvey" |
| | | prop="createTime" |
| | | label="来料日期" |
| | | min-width="8%" |
| | | /> |
| | |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="createTime" |
| | | prop="dateSurvey" |
| | | label="检验日期" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="state" |
| | | prop="condition" |
| | | label="状态" |
| | | min-width="8%" |
| | | > |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { selectInspectsList, selectAll, addInspect,getCommisionList} from '@/api/experiment/planAssignments' |
| | | import { selectInspectsList, selectAll, addInspect,getCommisionList,YANcailiso,chooseVer} from '@/api/experiment/planAssignments' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | type: '', |
| | | state: '', |
| | | }, |
| | | valu:{}, |
| | | icode:'', |
| | | inspectionTable: [], |
| | | rawMaterialTable: [], |
| | | commisionTable: [{ |
| | | specifications_models: "GGXH-AAAAA", |
| | | inspectionTime: "2023-08-03", |
| | | id: 2, |
| | | samples_number: 0, |
| | | dateSurvey: "2023-08-03", |
| | | entrusted: "阿里巴巴", |
| | | completionDeadline: "2023-08-03", |
| | | contacts: "小黑", |
| | | entrust_coding: "SL20230803000003", |
| | | sample_name: "发动机", |
| | | inspection_status: 1 |
| | | },{ |
| | | specifications_models: "GGXH-AAAAA", |
| | | inspectionTime: "2023-08-03", |
| | | id: 2, |
| | | samples_number: 0, |
| | | dateSurvey: "2023-08-03", |
| | | entrusted: "阿里巴巴", |
| | | completionDeadline: "2023-08-03", |
| | | contacts: "小黑", |
| | | entrust_coding: "SL20230803000003", |
| | | sample_name: "发动机", |
| | | inspection_status: 1 |
| | | }], |
| | | commisionTable: [], |
| | | finishedTable: { |
| | | deliverydate: '', |
| | | supplier: '', |
| | |
| | | commisionVisible: false, |
| | | tmp: '', |
| | | Standardframe: false, |
| | | tableData: [] |
| | | tableData: [], |
| | | tableRow:{}, |
| | | BANben:[], |
| | | select_1: [] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | created() { |
| | | this.selectInspectsList() |
| | | // this.getCommisionList() |
| | | }, |
| | | updated() { |
| | | if (this.$route.name === 'ForInspectionDetail') this.showDetail = true |
| | |
| | | this.$router.push({name:'Viewdetails',query: {id:row.id}}); |
| | | this.selectInspectsList() |
| | | }, |
| | | //版本库 |
| | | async chooseVer() { |
| | | const res = await chooseVer ({ |
| | | mcode:this.commisionTable.entrust_coding, |
| | | name:this.commisionTable.entrusted, |
| | | scifications:this.commisionTable.specifications_models |
| | | }) |
| | | console.log(res); |
| | | this.BANben = res.data.row |
| | | }, |
| | | //委托检验 |
| | | async getCommisionList() { |
| | | const res = await getCommisionList({pageNo:1,pageSize:10 }) |
| | | this.commisionTable = res.data |
| | | console.log(this.commisionTable); |
| | | console.log(res); |
| | | this.commisionTable = res.data.row |
| | | }, |
| | | //原材料 |
| | | async selecYANcailisotAllAPI() { |
| | | const res = await YANcailiso({pageNo:1,pageSize:10 }) |
| | | console.log(res); |
| | | this.rawMaterialTable = res.data.row |
| | | }, |
| | | async selectInspectsList() { |
| | | // 获取分页列表 |
| | |
| | | this.infoForm = this.tmp |
| | | this.rawmaterialVisible = false |
| | | }, |
| | | async handleRadioChange(){ |
| | | if(this.type === 0){ |
| | | handleRadioChange(){ |
| | | setTimeout(() => { |
| | | if(this.type === 0){ |
| | | // 原材料报检 |
| | | this.rawmaterialVisible = true |
| | | const res = await selectAll({type: this.type}) |
| | | var data = res.data |
| | | data.forEach((item)=>{ |
| | | var checkdate = [] |
| | | checkdate.push(item['createTime']) |
| | | checkdate.push(item['updateTime']) |
| | | item['checkdate'] = checkdate // 检验日期 |
| | | YANcailiso({pageNo:1,pageSize:10}).then(res=>{ |
| | | // var data = res.data |
| | | // data.forEach((item)=>{ |
| | | // var checkdate = [] |
| | | // checkdate.push(item['createTime']) |
| | | // checkdate.push(item['updateTime']) |
| | | // item['checkdate'] = checkdate // 检验日期 |
| | | // }) |
| | | this.rawMaterialTable = res.data.row |
| | | }) |
| | | |
| | | // this.infoForm = res.data |
| | | // this.$router.push({ name: 'ReportForInspection' }); |
| | | }else if(this.type === 1){ |
| | | this.commisionVisible = true |
| | | const res = await getCommisionList({pageNo:1,pageSize:10}) |
| | | getCommisionList({pageNo:1,pageSize:10}).then(res=>{ |
| | | // console.log(res); |
| | | this.commisionTable = res.data.row |
| | | }) |
| | | // var data = res.data |
| | | // data.forEach((item)=>{ |
| | | // var checkdate = [] |
| | |
| | | // item['checkdate_'] = item['startTime'] + '~' + item['endTime'] |
| | | // item['checkdate'] = checkdate // 检验日期 |
| | | // }) |
| | | this.commisionTable = res.data |
| | | // this.$router.push({ name: 'CommissionInspection' }); |
| | | |
| | | } |
| | | }, 100); |
| | | }, |
| | | // 新增检验 |
| | | async addInspection(){ |
| | |
| | | }, |
| | | //确定跳转 |
| | | QUEding(){ |
| | | // this.tableRow = a |
| | | this.Standardframe = true |
| | | chooseVer({mcode:this.select_1[0].materialCoding, |
| | | name:this.select_1[0].materialName, |
| | | scifications:this.select_1[0].specificationsModels}).then(res => { |
| | | this.BANben = res.data.row |
| | | console.log(this.BANben); |
| | | }) |
| | | |
| | | }, |
| | | handleSelectionChange_0(val){ |
| | | this.select_1 = [] |
| | | val.forEach(v => { |
| | | let obj = {} |
| | | obj.materialCoding = v.materialCoding |
| | | obj.materialName = v.materialName |
| | | obj.specificationsModels = v.specificationsModels |
| | | this.select_1.push(obj) |
| | | }) |
| | | } |
| | | } |
| | | } |