From 369f2395d846dddd93835367881dfc99ced3552b Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期四, 31 八月 2023 11:46:01 +0800 Subject: [PATCH] bug修复 --- src/utils/request.js | 2 src/views/experiment/inspectionApplication/index.vue | 92 ++----- src/router/index.js | 173 -------------- src/views/experiment/inspectionApplication/Viewdetails/index.vue | 384 +++++++++++++++---------------- src/api/experiment/planAssignments.js | 23 + 5 files changed, 239 insertions(+), 435 deletions(-) diff --git a/src/api/experiment/planAssignments.js b/src/api/experiment/planAssignments.js index 6930a4e..d0f384a 100644 --- a/src/api/experiment/planAssignments.js +++ b/src/api/experiment/planAssignments.js @@ -87,3 +87,26 @@ params }) } + +export function chooseUseProId(params) { + return request({ + url: '/inspection/chooseUseProId', + method: 'get', + params + }) +} + +export function selectEquipment() { + return request({ + url: '/inspection/selectEquipment', + method: 'get' + }) +} + +export function chooseEquipment(params) { + return request({ + url: '/inspection/chooseEquipment', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index cfa384f..54332c1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,33 +3,8 @@ Vue.use(Router) -/* Layout */ import Layout from '@/layout' -/** - * Note: sub-menu only appear when route children.length >= 1 - * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html - * - * hidden: true if set true, item will not show in the sidebar(default is false) - * alwaysShow: true if set true, will always show the root menu - * if not set alwaysShow, when item has more than one children route, - * it will becomes nested mode, otherwise not show the root menu - * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb - * name:'router-name' the name is used by <keep-alive> (must set!!!) - * meta : { - roles: ['admin','editor'] control the page roles (you can set multiple roles) - title: 'title' the name show in sidebar and breadcrumb (recommend set) - icon: 'svg-name'/'el-icon-x' the icon show in the sidebar - breadcrumb: false if set false, the item will hidden in breadcrumb(default is true) - activeMenu: '/example/list' if set path, the sidebar will highlight the path you set - } - */ - -/** - * constantRoutes - * a base page that does not have permission requirements - * all roles can be accessed - */ function getRoutes() { let constantRoutes = [ { @@ -51,7 +26,6 @@ path: '/', component: Layout, redirect: '/home', - // meta: { title: '涓婚〉', icon: 'el-icon-s-home' }, children: [{ path: 'home', name: 'Home', @@ -85,85 +59,6 @@ } ] }, - // { - // path: '/rawMaterials', - // component: Layout, - // redirect: '/rawMaterials/reportForInspection', - // name: 'rawMaterials', - // meta: { title: '妫�楠�', icon: 'el-icon-s-help' }, - // children: [ - // { - // path: 'reportForInspection', - // name: 'ReportForInspection', - // component: () => import('@/views/rawMaterials/reportForInspection/index'), - // meta: { title: '鍘熸潗鏂欐姤妫�', icon: 'table' }, - // children: [ - // // { - // // path: 'index', - // // name: 'ReportForInspectionIndex', - // // // hidden: true, - // // component: () => import('@/views/rawMaterials/reportForInspection/index'), - // // meta: { title: '鍘熸潗鏂欐姤妫�', icon: 'table' } - // // }, - // { - // path: 'forInspectionDetail', - // name: 'ForInspectionDetail', - // hidden: true, - // component: () => import('@/views/rawMaterials/reportForInspection/forInspectionDetail'), - // meta: { title: '鏂板妫�楠屽崟璇︽儏', icon: 'table' } - // } - // ] - // }, - // { - // path: 'print', - // name: 'Print', - // component: () => import('@/views/rawMaterials/print/index'), - // meta: { title: '鏉$爜鎵撳嵃', icon: 'tree' } - // }, - // { - // path: 'planAssignments', - // name: 'PlanAssignments', - // component: () => import('@/views/rawMaterials/planAssignments/index'), - // meta: { title: '妫�楠岃鍒掑垎閰�', icon: 'tree' } - // }, - // { - // path: 'rawMaterialInspection', - // name: 'RawMaterialInspection', - // component: () => import('@/views/rawMaterials/rawMaterialInspection/index'), - // meta: { title: '鍘熸潗鏂欐楠�', icon: 'tree' } - // }, - // { - // path: 'checkTheReport', - // name: 'CheckTheReport', - // component: () => import('@/views/rawMaterials/checkTheReport/index'), - // meta: { title: '妫�楠屾姤鍛�', icon: 'tree' } - // }, - // { - // path: 'reportAuditing', - // name: 'ReportAuditing', - // component: () => import('@/views/rawMaterials/reportAuditing/index'), - // meta: { title: '鎶ュ憡瀹℃牳', icon: 'tree' } - // }, - // { - // path: 'nonConformanceReview', - // name: 'NonConformanceReview', - // component: () => import('@/views/rawMaterials/nonConformanceReview/index'), - // meta: { title: '涓嶅悎鏍煎弽棣�', icon: 'tree' } - // }, - // { - // path: 'nonConformingFeedback', - // name: 'NonConformingFeedback', - // component: () => import('@/views/rawMaterials/nonConformingFeedback/index'), - // meta: { title: '涓嶅悎鏍艰瘎瀹�', icon: 'tree' } - // }, - // { - // path: 'passRateStatistics', - // name: 'PassRateStatistics', - // component: () => import('@/views/rawMaterials/passRateStatistics/index'), - // meta: { title: '鍚堟牸鐜囩粺璁�', icon: 'tree' } - // } - // ] - // }, { path: '/inspectionManagement', component: Layout, @@ -199,7 +94,7 @@ meta: { title: '鏂板妫�楠�', icon: 'tree' } }, { - path: 'Viewdetails', + path: 'Viewdetails/:id', name: 'Viewdetails', hidden: true, component: () => import('@/views/experiment/inspectionApplication/Viewdetails/index'), @@ -243,69 +138,6 @@ } ] }, - // { - // path: '/finishedProduct', - // component: Layout, - // redirect: '/finishedProduct/reportForInspection', - // name: 'FinishedProduct', - // meta: { title: '鎴愬搧妫�楠�', icon: 'el-icon-s-help' }, - // children: [ - // { - // path: 'reportForInspection', - // name: 'ReportForInspection', - // component: () => import('@/views/rawMaterials/reportForInspection/index'), - // meta: { title: '鎴愬搧閫佹鐧昏', icon: 'table' } - // }, - // { - // path: 'print', - // name: 'Print', - // component: () => import('@/views/rawMaterials/print/index'), - // meta: { title: '鏉$爜鎵撳嵃', icon: 'tree' } - // }, - // { - // path: 'planAssignments', - // name: 'PlanAssignments', - // component: () => import('@/views/rawMaterials/planAssignments/index'), - // meta: { title: '妫�楠岃鍒掑垎閰�', icon: 'tree' } - // }, - // { - // path: 'rawMaterialInspection', - // name: 'RawMaterialInspection', - // component: () => import('@/views/rawMaterials/rawMaterialInspection/index'), - // meta: { title: '鎴愬搧妫�楠�', icon: 'tree' } - // }, - // { - // path: 'checkTheReport', - // name: 'CheckTheReport', - // component: () => import('@/views/rawMaterials/checkTheReport/index'), - // meta: { title: '妫�楠屾姤鍛�', icon: 'tree' } - // }, - // { - // path: 'reportAuditing', - // name: 'ReportAuditing', - // component: () => import('@/views/rawMaterials/reportAuditing/index'), - // meta: { title: '鎶ュ憡瀹℃牳', icon: 'tree' } - // }, - // { - // path: 'nonConformanceReview', - // name: 'NonConformanceReview', - // component: () => import('@/views/rawMaterials/nonConformanceReview/index'), - // meta: { title: '涓嶅悎鏍煎弽棣�', icon: 'tree' } - // }, - // { - // path: 'nonConformingFeedback', - // name: 'NonConformingFeedback', - // component: () => import('@/views/rawMaterials/nonConformingFeedback/index'), - // meta: { title: '涓嶅悎鏍艰瘎瀹�', icon: 'tree' } - // }, - // { - // path: 'passRateStatistics', - // name: 'PassRateStatistics', - // component: () => import('@/views/rawMaterials/passRateStatistics/index'), - // meta: { title: '鍚堟牸鐜囩粺璁�', icon: 'tree' } - // } - // ] - // }, { path: '/laboratory', component: Layout, @@ -433,9 +265,7 @@ { path: 'message', name: 'Message', - // hidden: true, component: () => import('@/views/message/message/index'), - // meta: { title: '鎴戠殑娑堟伅', icon: 'table' } }, ] }, @@ -499,7 +329,6 @@ path: '/', component: Layout, redirect: '/home', - // meta: { title: '涓婚〉', icon: 'el-icon-s-home' }, children: [{ path: 'home', name: 'Home', diff --git a/src/utils/request.js b/src/utils/request.js index 5933e2d..0e7f44e 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,7 +8,7 @@ const service = axios.create({ baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url // withCredentials: true, // send cookies when cross-domain requests - timeout: 5000 // request timeout + timeout: 10000 // request timeout }) // request interceptor diff --git a/src/views/experiment/inspectionApplication/Viewdetails/index.vue b/src/views/experiment/inspectionApplication/Viewdetails/index.vue index 04d49ea..02d495a 100644 --- a/src/views/experiment/inspectionApplication/Viewdetails/index.vue +++ b/src/views/experiment/inspectionApplication/Viewdetails/index.vue @@ -1,206 +1,190 @@ <template> -<div> - <div style="overflow: hidden;"> - <el-card style="margin: 10px;" > - <div slot="header" class="clearfix"> - <span> - <i slot="prefix" class="el-icon-s-home" /> - 瀹為獙绠$悊/鍘熸潗鏂欐楠屽崟</span> - </div> - <div class="card-content"> - <el-row :gutter="80"> - <el-form ref="form" :model="searchData" label-width="80px"> - <el-col :span="6"> - <el-form-item label="鏉ユ枡鏃ユ湡:" > - <el-input :disabled="true" v-model="searchData.formTime"></el-input> - - </el-form-item> - </el-col> - <el-col :span="6"> - <el-form-item label="渚涘簲鍟嗗悕绉�:" > - <el-input :disabled="true" v-model="searchData.supplier"></el-input> - </el-form-item> - </el-col> - <el-col :span="6"> - <el-form-item label="浜у搧缂栧彿:"> - <el-input :disabled="true" v-model="searchData.code"></el-input> - </el-form-item> - </el-col> - </el-form> - </el-row> - <el-row :gutter="80"> - <el-form ref="form" :model="searchData" label-width="80px"> - <el-col :span="6"> - <el-form-item label="鍘熸潗鏂欏悕绉�:"> - <el-input :disabled="true" v-model="searchData.name"></el-input> - </el-form-item> - </el-col> - <el-col :span="6"> - - <el-form-item label="瑙勬牸鍨嬪彿:"> - <el-input :disabled="true" v-model="searchData.specifications"></el-input> - </el-form-item> - </el-col> - - <el-col :span="6"> - - <el-form-item label="鍗曚綅:"> - <el-input :disabled="true" v-model="searchData.unit"></el-input> - </el-form-item> - </el-col> - </el-form> - </el-row> - <el-row :gutter="80"> - <el-form ref="form" :model="searchData" label-width="80px"> - <el-col :span="6"> - <el-form-item label="鏁伴噺:"> - <el-input :disabled="true" v-model="searchData.num"></el-input> - </el-form-item> - </el-col> - <el-col :span="6"> - - <el-form-item label="鐧昏鏃ユ湡:"> - <el-input :disabled="true" v-model="searchData.endTime"></el-input> - </el-form-item> - </el-col> - - <el-col :span="6"> - - <el-form-item label="鐧昏浜�:"> - <el-input :disabled="true" v-model="searchData.userName"></el-input> - </el-form-item> - </el-col> - </el-form> - </el-row> - </div> - </el-card> - - - <el-row style="margin: 5px;"> - <el-col :span="12" style="line-height: 32px;">妫�楠岄」鐩�</el-col> - <el-col :span="12" style="text-align: right;"> - <!-- <el-button ic size="medium " @click="()=>{}">淇濆瓨</el-button> --> - <el-button icon="el-icon-refresh-lef" size="medium " style="background-color: cornflowerblue;" @click="goback">杩斿洖</el-button> - </el-col> - </el-row> - <div> - <el-card style="margin: 10px;"> - <el-table - :data="insProducts" - height="calc(80vh - 250px)" - border - style="width: 100%"> - <el-table-column - label="搴忓彿" - type="index" - width="50"> - </el-table-column> - <el-table-column - prop="name" - label="椤圭洰" - width="180"> - </el-table-column> - <el-table-column - prop="unit" - label="鍗曚綅" - width="180"> - </el-table-column> - <el-table-column - prop="internal" - label="鏍囧噯鍊�"> - </el-table-column> - <el-table-column - prop="required" - label="鍐呮帶鍊�"> - </el-table-column> - <el-table-column prop="userName" label="缁忛獙浜�"> - <template slot-scope="scope"> - <el-select v-model="value" size="small" slot="append" style="width: 220px;"> - <el-option v-for="(item,indxe) in ZERENren" :key="indxe" :label="item.name" :value="item.name"></el-option> - </el-select> - </template> - </el-table-column> - <el-table-column - prop="inspectionMaterialId" - label="瀹為獙璁惧"> - <template slot-scope="scope"> - <el-select v-model="SHEbei" size="small" slot="append" style="width: 220px;"> - <el-option v-for="(item,index) in getDevices" :key="index" :label="item.name"></el-option> - </el-select> - </template> - </el-table-column> - </el-table> - - </el-card> - </div> - </div> -</div> + <div> + <div style="overflow: hidden;"> + <el-card style="margin: 10px;"> + <div slot="header" class="clearfix"> + <span> + <i slot="prefix" class="el-icon-s-home" /> + 瀹為獙绠$悊/鍘熸潗鏂欐楠屽崟</span> + </div> + <div class="card-content"> + <el-row> + <el-form ref="form" :model="searchData" label-width="150px"> + <el-col :span="8"> + <el-form-item label="鏉ユ枡鏃ユ湡:"> + <el-input :disabled="true" v-model="searchData.formTime"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="渚涘簲鍟嗗悕绉�:"> + <el-input :disabled="true" v-model="searchData.supplier"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="浜у搧缂栧彿:"> + <el-input :disabled="true" v-model="searchData.code"></el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + <el-row> + <el-form ref="form" :model="searchData" label-width="150px"> + <el-col :span="8"> + <el-form-item label="鍘熸潗鏂欏悕绉�:"> + <el-input :disabled="true" v-model="searchData.name"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="瑙勬牸鍨嬪彿:"> + <el-input :disabled="true" v-model="searchData.specifications"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍗曚綅:"> + <el-input :disabled="true" v-model="searchData.unit"></el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + <el-row> + <el-form ref="form" :model="searchData" label-width="150px"> + <el-col :span="8"> + <el-form-item label="鏁伴噺:"> + <el-input :disabled="true" v-model="searchData.num"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐧昏鏃ユ湡:"> + <el-input :disabled="true" v-model="searchData.endTime"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐧昏浜�:"> + <el-input :disabled="true" v-model="searchData.userName"></el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + </div> + </el-card> + <el-row style="margin: 0 20px;"> + <el-col :span="12" style="line-height: 32px;">妫�楠岄」鐩�</el-col> + <el-col :span="12" style="text-align: right;"> + <el-button icon="el-icon-refresh-lef" size="medium" @click="goback">杩斿洖</el-button> + </el-col> + </el-row> + <div> + <el-card style="margin: 10px;"> + <el-table :data="insProducts" height="calc(80vh - 250px)" border style="width: 100%"> + <el-table-column label="搴忓彿" type="index" width="50"> + </el-table-column> + <el-table-column prop="name" label="椤圭洰" width="200"> + </el-table-column> + <el-table-column prop="unit" label="鍗曚綅" width="150"> + </el-table-column> + <el-table-column prop="internal" label="鏍囧噯鍊�"> + </el-table-column> + <el-table-column prop="required" label="鍐呮帶鍊�"> + </el-table-column> + <el-table-column prop="userName" label="璐d换浜�" width="220px"> + <template slot-scope="scope"> + <el-select v-model="scope.row.username" size="small" slot="append" + @change="(val)=>chooseUseProId(val, scope.row)"> + <el-option v-for="(item,indxe) in ZERENren" :key="indxe" :label="item.name" + :value="item.id"></el-option> + </el-select> + </template> + </el-table-column> + <el-table-column prop="inspectionMaterialId" label="瀹為獙璁惧" width="220px"> + <template slot-scope="scope"> + <el-cascader v-model="scope.row.instrumentName" :options="devices" @change="(val)=>chooseEquipment(val, scope.row)"></el-cascader> + </template> + </el-table-column> + </el-table> + </el-card> + </div> + </div> + </div> </template> <script> - import { selectInspectsListById,selectUser,chooseinstum} from '@/api/experiment/planAssignments' -export default { - data(){ - return { - searchData:{ - formTime: '', - supplier: '', - code: '', - name: '', - specifications: '', - unit: '', - num: '', - endTime: '', - userName: '', - }, - insProducts:[], - value:'', - SHEbei:[], - aaa:{}, - ZERENren:[], - // getDevices:[] - } - }, - created(){ - // if(this.$route.query){ - // this.uu = this.$route.query.id; - // } - this.aaa = this.$route.query - // if(this.$route.query){ - // this.aaa = this.$router.query.data1 - // console.log(this.aaa); - // } - console.log(this.aaa); - this.selectInspectsListById() - this.selectUser() - this.chooseinstum() - }, - methods: { - //杩斿洖 - async goback(){ - this.$router.push({name:'inspectionApplication'}) - }, - //妫�楠屽崟璐d换浜� - async selectUser(){ - const res = await selectUser() - this.ZERENren = res.data - console.log(this.ZERENren); - }, - - async chooseinstum(){ - const res = await chooseinstum() - this.getDevices = res.data - console.log(this.getDevices); - }, - //妫�楠屽崟琛� - async selectInspectsListById() { - const res = await selectInspectsListById({id:this.aaa.id}) - this.searchData = res.data - this.insProducts = res.data.insProducts - } -} -} + import { + selectInspectsListById, + selectUser, + selectEquipment, + chooseUseProId, + chooseEquipment + } from '@/api/experiment/planAssignments' + export default { + data() { + return { + searchData: { + formTime: '', + supplier: '', + code: '', + name: '', + specifications: '', + unit: '', + num: '', + endTime: '', + userName: '', + }, + insProducts: [], + value: '', + SHEbei: [], + id: null, + ZERENren: [], + devices: [] + } + }, + created() { + this.id = this.$route.params.id + this.selectInspectsListById() + this.selectUser() + this.selectEquipment() + }, + methods: { + //杩斿洖 + async goback() { + this.$router.push({ + name: 'inspectionApplication' + }) + }, + //妫�楠屽崟璐d换浜� + async selectUser() { + const res = await selectUser() + this.ZERENren = res.data + }, + async selectEquipment() { + const res = await selectEquipment() + this.getDevices = res.data + }, + //妫�楠屽崟琛� + async selectInspectsListById() { + const res = await selectInspectsListById({ + id: this.id + }) + this.searchData = res.data + this.insProducts = res.data.insProducts + }, + chooseUseProId(val, row) { + chooseUseProId({ + id: row.id, + userProId: val + }).then(res => { + this.$message.success('璐d换浜哄垎閰嶆垚鍔�') + }) + }, + chooseEquipment(val, row){ + chooseUseProId({ + id: row.id, + equipmentId: val + }).then(res => { + this.$message.success('璁惧鍒嗛厤鎴愬姛') + }) + } + } + } </script> <style lang="scss" scoped> -</style> - \ No newline at end of file +</style> \ No newline at end of file diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue index 4d98974..6ae42c8 100644 --- a/src/views/experiment/inspectionApplication/index.vue +++ b/src/views/experiment/inspectionApplication/index.vue @@ -81,7 +81,6 @@ <el-table-column label="鎿嶄綔" min-width="150" fixed="right"> <template slot-scope="scope"> <el-button type="text" size="small" @click="handleClick(scope.row)">鏌ョ湅</el-button> - <!-- <el-button type="text" size="small" >鎻愪氦</el-button> --> <el-button type="text" size="small">浣滃簾</el-button> </template> </el-table-column> @@ -307,41 +306,21 @@ <el-card> <template slot-scope="scope"> <span>鐗堟湰閫夋嫨锛�</span> - <el-select @change="ccc" v-model="selectedValue" size="small" slot="append" style="width: 220px;"> + <el-select @change="getProductVerison" v-model="version" size="small" slot="append" style="width: 220px;"> <el-option v-for="item in BANben" :key="item" :label="item" :value="item"></el-option> </el-select> </template> </el-card> <el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border - height="calc(80vh - 250px)" default-expand-all ref="multipleTable" - @select-all="selectAll" @selection-change="handleSelectionChange" + height="calc(40vh)" default-expand-all ref="multipleTable" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> - <!-- <el-table-column type="selection" label="搴忓彿"> </el-table-column> --> <el-table-column type="index" width="50px" label="搴忓彿"></el-table-column> - <el-table-column label="椤圭洰鍚嶇О" sortable> - <template scope="scope"> - <el-tag> - <div class="firstDiv" :style="`color: ${ - scope.row.code == '[1]' ? '#16a7ff' : '#58c173' - }`"> - {{ scope.row.code == "[1]" ? "01" : "02" }} - </div> - <span style="color: black">{{ scope.row.name }}</span> - </el-tag> - </template> + <el-table-column prop="name" label="椤圭洰鍚嶇О" sortable> </el-table-column> <el-table-column prop="unit" label="鍗曚綅" sortable></el-table-column> - <el-table-column label="鏍囧噯鍊�" sortable> - <template scope="scope"> - <el-input v-if="scope.row.edit === true || scope.row.code === '[2]'" @blur="requiredOnfocus(scope)" - v-model="scope.row.required" placeholder="璇疯緭鍏ユ爣鍑嗗��"></el-input> - </template> + <el-table-column prop="required" label="鏍囧噯鍊�" sortable> </el-table-column> <el-table-column prop="internal" label="鍐呮帶鍊�" sortable> - <template scope="scope"> - <el-input v-if="scope.row.edit === true || scope.row.code === '[2]'" @blur="requiredOnfocus(scope)" - v-model="scope.row.internal" placeholder="璇疯緭鍏ュ唴鎺у��"></el-input> - </template> </el-table-column> </el-table> <span slot="footer" class="dialog-footer"> @@ -460,7 +439,7 @@ amount: '', checkdate: [] }, - selectedValue: {}, + selectedValue: null, infoForm: {}, commisionSelection: { entrust_coding: '', @@ -510,8 +489,7 @@ tableData: [], tableRow: {}, BANben: [], - // select_1: [], - aa: {}, + version: null, listdata:[], ddd:{} } @@ -531,7 +509,6 @@ if (this.$route.name === 'ForInspectionDetail') this.showDetail = true }, methods: { - async selectAll() { const res = selectAll({ type: 0 @@ -545,23 +522,14 @@ this.commisionTable = res.data }, async handleClick(row) { - this.inspectionTable = row; - this.id = row.id - this.$router.push({ - name: 'Viewdetails', - query: { - id: row.id - } - }); - this.selectInspectsList() + // this.$router.push({ + // name: 'Viewdetails', + // query: { + // id: row.id + // } + // }); + this.$router.push(`Viewdetails/${row.id}`); }, - // validateInput() { - // if (this.inputValue.trim() === '') { - // } - // }, // 杈撳叆鍊间负绌猴紝寮瑰嚭鎻愮ず淇℃伅鎴栬繘琛屽叾浠栧鐞� - // alert('杈撳叆鍊间笉鑳戒负绌�'); - // return; - //鐗堟湰搴� async chooseVer() { const res = await chooseVer({ @@ -569,23 +537,25 @@ name: this.tmp.name, specifications: this.tmp.specifications }) - this.BANben = res.data - this.aa = this.BANben[0] + this.BANben = [] + res.data.forEach(a=>{ + this.BANben.push('V ' + a) + }) + this.version = this.BANben[0] this.lookProByVer() }, - //鏍囧噯搴� async lookProByVer() { const res = await lookProByVer({ mcode: this.tmp.mcode, name: this.tmp.name, specifications: this.tmp.specifications, - version: this.aa + version: this.version.replace('V ', '') }) this.tableData = res.data }, - ccc(val) { - this.aa = val + getProductVerison(val) { + this.version = val this.lookProByVer() }, async selectInspectsList() { @@ -595,7 +565,6 @@ pageSize: this.currentPage, message: this.id }) - // this.inspectionTable = data const data = res.data.row data.forEach((item) => { var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"] @@ -687,9 +656,6 @@ }) this.rawMaterialTable = res.data }) - - // this.infoForm = res.data - // this.$router.push({ name: 'ReportForInspection' }); } else if (this.type === 1) { this.commisionVisible = true selectAll({ @@ -721,9 +687,13 @@ supplier: this.infoForm.supplier, type: this.type, unit: this.infoForm.unit, - version:this.BANben[1] + version:this.version.replace('V ', '') }).then(res=>{ - + this.$message({ + message: '娣诲姞鎴愬姛锛�', + type: 'success' + }); + this.$router.push(`Viewdetails/${res.data}`) }) } if (this.type === 1) { @@ -738,8 +708,7 @@ supplier: this.commisionSelection.supplier, type: this.type, unit: this.commisionSelection.unit, - version:this.aa - + version:this.version }) } if (this.type === 2) { @@ -754,8 +723,7 @@ supplier: this.finishedTable.supplier, type: this.type, unit: this.finishedTable.unit, - version:this.aa - + version:this.version }) } this.type = 0 @@ -870,7 +838,7 @@ background: #fff; display: flex; justify-content: space-between; - padding: 5px 24px 0px 24px; + padding: 20px 24px 0px 24px; } .input-form { -- Gitblit v1.9.3