From c1b5e41ca4397b5589a9d259e4501de7db912fd7 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期一, 28 八月 2023 10:37:47 +0800 Subject: [PATCH] modified: src/components/experiment/checkTheReport/index.vue --- src/views/experiment/inspectionApplication/index.vue | 172 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 87 insertions(+), 85 deletions(-) diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue index 84990fe..e6f5023 100644 --- a/src/views/experiment/inspectionApplication/index.vue +++ b/src/views/experiment/inspectionApplication/index.vue @@ -183,7 +183,7 @@ 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> @@ -379,21 +379,21 @@ <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' }" @@ -445,7 +445,11 @@ </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> <!-- 鍘熸潗鏂欐楠屾ā鎬佹 --> @@ -461,11 +465,10 @@ :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 @@ -474,7 +477,7 @@ min-width="8%" /> <el-table-column - prop="dateSurvey" + prop="createTime" label="鏉ユ枡鏃ユ湡" min-width="8%" /> @@ -519,12 +522,12 @@ 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%" > @@ -597,7 +600,7 @@ </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 { @@ -607,34 +610,11 @@ 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: '', @@ -691,7 +671,10 @@ commisionVisible: false, tmp: '', Standardframe: false, - tableData: [] + tableData: [], + tableRow:{}, + BANben:[], + select_1: [] } }, watch: { @@ -706,32 +689,38 @@ }, created() { this.selectInspectsList() - // this.getCommisionList() }, updated() { if (this.$route.name === 'ForInspectionDetail') this.showDetail = true }, methods: { async handleClick(row){ - // console.log(item); - // const res = await ddd({goodId:id}) - // this.$message({ - // message: '鎭枩浣狅紝杩欐槸涓�鏉℃垚鍔熸秷鎭�', - // type: 'success' - // }); - - // console.log(res); this.inspectionTable = row; - console.log(row.id); this.id = row.id 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 }) + console.log(res); this.commisionTable = res.data - console.log(this.commisionTable); + }, + //鍘熸潗鏂� + async selecYANcailisotAllAPI() { + const res = await YANcailiso({pageNo:1,pageSize:10 }) + console.log(res); + this.rawMaterialTable = res.data.row }, async selectInspectsList() { // 鑾峰彇鍒嗛〉鍒楄〃 @@ -765,7 +754,6 @@ item['checkdate'] = checkdate // 妫�楠屾棩鏈� item['createTime'] = createTime // 鐧昏鏃ユ湡 }) - console.log('data:',data) this.inspectionTable = data if(this.searchData.type !== ''){ if(this.searchData.state !== ''){ @@ -808,34 +796,30 @@ this.infoForm = this.tmp this.rawmaterialVisible = false }, - async handleRadioChange(){ - 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 // 妫�楠屾棩鏈� - }) - // 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}) - // var data = res.data - // data.forEach((item)=>{ - // var checkdate = [] - // checkdate.push(item['startTime']) - // checkdate.push(item['endTime']) - // item['checkdate_'] = item['startTime'] + '~' + item['endTime'] - // item['checkdate'] = checkdate // 妫�楠屾棩鏈� - // }) - this.commisionTable = res.data - // this.$router.push({ name: 'CommissionInspection' }); - } + handleRadioChange(){ + setTimeout(()=>{ + if(this.type === 0){ + // 鍘熸潗鏂欐姤妫� + this.rawmaterialVisible = true + selectAll({type: this.type}).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 + }) + // this.$router.push({ name: 'ReportForInspection' }); + }else if(this.type === 1){ + this.commisionVisible = true + getCnList({pageNo:1,pageSize:10}).then(res=>{ + // consommisioole.log(res); + this.commisionTable = res.data.row + }) + } + },100) }, // 鏂板妫�楠� async addInspection(){ @@ -900,7 +884,25 @@ }, //纭畾璺宠浆 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) + }) } } } -- Gitblit v1.9.3