Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export function getList(query){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function getInspectList(id){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/pageInspect/'+id, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function getAllTemplateByEnable(){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/getAllTemplateByEnable', |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function addTemplate(data){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/addTemplate', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function updateTemplate(data){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/updateTemplate', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | export function addInspect(data){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/addInspect', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function updateInspect(data){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/updateInspect', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function delTemplate(id){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/deleteTemplate/'+id, |
| | | method: 'post', |
| | | }) |
| | | } |
| | | |
| | | export function deleteInspect(id){ |
| | | return request({ |
| | | url: '/mes/qualityPackageInspectTemp/deleteInspect/'+id, |
| | | method: 'post', |
| | | }) |
| | | } |
| | |
| | | <div> |
| | | <el-button @click="tagFinished" 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" |
| | | @click="openEditDialog">ç¼è¾æ¶é´çº¿</el-button> |
| | | <el-tooltip content="å·æ°"> |
| | | <el-button circle icon="el-icon-refresh" @click="getDataList"></el-button> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | <avue-crud |
| | | <avue-crud |
| | | class="unfinished-crud" |
| | | :data="tableData" |
| | | ref="crud" |
| | | :option="option" |
| | | :span-method="spanMethod" |
| | | :data="tableData" |
| | | ref="crud" |
| | | :option="option" |
| | | :span-method="spanMethod" |
| | | @refresh-change="getDataList" |
| | | @current-change="handleCurrentChange" |
| | | @size-change="handleSizeChange" |
| | | :page="page" |
| | | :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" |
| | | <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" |
| | | <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> |
| | |
| | | <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 |
| | | <avue-crud |
| | | class="finished-crud" |
| | | :data="finishedTableData" |
| | | ref="finished" |
| | | :option="finishedOption" |
| | | :span-method="spanMethod" |
| | | :data="finishedTableData" |
| | | ref="finished" |
| | | :option="finishedOption" |
| | | :span-method="spanMethod" |
| | | @refresh-change="getFinishedData" |
| | | @current-change="handleCurrentChange" |
| | | @size-change="handleSizeChange" |
| | | :page="finishedPage" |
| | | :page="finishedPage" |
| | | @selection-change="selectionFinishedRow"> |
| | | <!-- <template #menu="{ row, index }"> |
| | | <el-button |
| | | v-if="permissions.plan_productionschedul_del" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | <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> |
| | |
| | | style="width:100%" |
| | | v-model="item.planTime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | type="datetime" |
| | | placeholder="éæ©æ¥ææ¶é´"> |
| | | </el-date-picker> |
| | | </el-col> |
| | |
| | | style="width:100%" |
| | | v-model="item.actualTime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | type="datetime" |
| | | placeholder="éæ©æ¥ææ¶é´"> |
| | | </el-date-picker> |
| | | </el-col> |
| | |
| | | }, { |
| | | prop: 'contractNo', |
| | | span: [] |
| | | }, |
| | | }, |
| | | { |
| | | prop: 'orderTime', |
| | | span: [] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <avue-crud |
| | | :data="list" |
| | | style="width:98%" |
| | | :option="option" |
| | | :page="page" |
| | | @row-save="saveTemplate" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange"> |
| | | <template slot="state" slot-scope="scope"> |
| | | <el-tag :type="scope.row.state ? 'success':'danger'">{{scope.row.state ? 'å¯ç¨':'ç¦ç¨'}}</el-tag> |
| | | </template> |
| | | <template slot="stateForm" slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.state" |
| | | active-color="#13ce66" |
| | | :active-value="true" |
| | | :inactive-value="false"> |
| | | </el-switch> |
| | | </template> |
| | | <template #menu="{size,row,index}"> |
| | | <el-button class="menu-button" :size="size" @click="showInspectDialog(size,row,index)" type="text" icon="el-icon-set-up">æ£éªé¡¹</el-button> |
| | | <el-button class="menu-button" :size="size" @click="updateTemplate(size,row,index)" type="text" icon="el-icon-edit">ç¼è¾</el-button> |
| | | <el-button class="menu-button" :size="size" @click="deleteTemplate(size,row,index)" type="text" icon="el-icon-delete">å é¤</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <el-dialog |
| | | title="ç¼è¾æ¨¡æ¿ä¿¡æ¯" |
| | | :visible.sync="updateDialog" |
| | | width="40%"> |
| | | <el-form :model="updateData" label-width="100px" :inline="true" |
| | | label-position="right" ref="updateTemplate" :rules="updateRules"> |
| | | <el-form-item label="模æ¿åç§°" prop="templateName"> |
| | | <el-input v-model="updateData.templateName" placeholder="请è¾å
¥æ¨¡æ¿åç§°"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦å¯ç¨" prop="state"> |
| | | <el-switch |
| | | v-model="updateData.state" |
| | | active-color="#13ce66" |
| | | :active-value="true" |
| | | :inactive-value="false"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="confirmUpdate">ä¿ å</el-button> |
| | | <el-button icon="el-icon-remove-outline" @click="updateDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <inspectDetail v-if="isShow" :paramObj="paramObj" :currshowlist.sync="showDetail"></inspectDetail> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import inspectDetail from './inspect-detail' |
| | | import {getList,addTemplate,updateTemplate,delTemplate} from '@/api/quality/packageInspectTemp' |
| | | export default { |
| | | data(){ |
| | | return { |
| | | isShow: false, |
| | | paramObj:{ |
| | | id: null, |
| | | }, |
| | | showDetail: false, |
| | | updateData:{ |
| | | templateName: null, |
| | | state: null, |
| | | }, |
| | | updateRules:{ |
| | | templateName:[{required:true,message:'请è¾å
¥æ¨¡æ¿åç§°',trigger:'blur'}] |
| | | }, |
| | | updateDialog: false, |
| | | list: [], |
| | | page:{ |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | option: { |
| | | dialogWidth: '40%', |
| | | menu: true, |
| | | addBtn: true, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | border: true, |
| | | index: true, |
| | | height: 400, |
| | | indexLabel: 'åºå·', |
| | | align: 'center', |
| | | refreshBtn: false, |
| | | columnBtn: false, // æ¯å¦æ¾ç¤ºæ¾å½±æé®H |
| | | headerAlign: 'center', |
| | | column: [{ |
| | | label: '模æ¿åç§°', |
| | | prop: 'templateName', |
| | | overHidden: true, |
| | | rules:[{required:true,message:'模æ¿åç§°ä¸è½ä¸ºç©º',trigger:'blur'}] |
| | | }, { |
| | | label: 'æ¯å¦å¯ç¨', |
| | | prop: 'state', |
| | | overHidden: true, |
| | | slot: true, |
| | | formslot: true, |
| | | value: true, |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | created(){ |
| | | this.getDataList() |
| | | }, |
| | | components:{ |
| | | inspectDetail |
| | | }, |
| | | methods:{ |
| | | deleteTemplate(size,row,index){ |
| | | const _than = this |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ¨¡æ¿, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delTemplate(row.id).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.$message.success("å 餿å") |
| | | _than.getDataList() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }).catch(() => {}); |
| | | }, |
| | | showInspectDialog(size,row,index){ |
| | | this.paramObj.id = row.id |
| | | this.isShow = true |
| | | this.$nextTick(()=>{ |
| | | this.showDetail = true |
| | | }) |
| | | }, |
| | | updateTemplate(size,row,index){ |
| | | console.log(row); |
| | | this.updateData = JSON.parse(JSON.stringify(row)) |
| | | this.updateDialog =true |
| | | }, |
| | | confirmUpdate(){ |
| | | const _than = this |
| | | this.$refs.updateTemplate.validate(valid=>{ |
| | | if(valid){ |
| | | let data = { |
| | | id:this.updateData.id, |
| | | templateName:this.updateData.templateName, |
| | | state:this.updateData.state |
| | | } |
| | | updateTemplate(data).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.$message.success("æ´æ°æå") |
| | | _than.getDataList() |
| | | _than.updateDialog = false |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | saveTemplate(row, done, loading){ |
| | | addTemplate(row).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("æ·»å æå") |
| | | this.getDataList() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | setTimeout(()=>{ |
| | | done() |
| | | },1000) |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.getList(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.getList(); |
| | | }, |
| | | getDataList() { |
| | | getList({ |
| | | current: this.page.currentPage, |
| | | size: this.page.pageSize, |
| | | templateType: '0' |
| | | }).then(res=>{ |
| | | if(res.status===200){ |
| | | this.list = res.data.data.records |
| | | this.page.total = res.data.data.total |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .menu-button{ |
| | | margin: 0px 5px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | title="æ£éªé¡¹ç®¡ç" |
| | | top="5vh" |
| | | :visible.sync="inspectDialog" |
| | | @close="$emit('update:currshowlist', false)" |
| | | :show="currshowlist" |
| | | width="80%"> |
| | | <avue-crud |
| | | ref="inspectDetail" |
| | | :data="dataList" |
| | | :option="option" |
| | | @row-save="addInspectHandler" |
| | | @row-del="delInspectHandler" |
| | | :page="page"> |
| | | <template #menu="{size,row,index}"> |
| | | <el-button v-if="row.children!=null" class="menu-button" :size="size" @click="addChildren(size,row,index)" type="text" icon="el-icon-circle-plus-outline">æ·»å å项ç®</el-button> |
| | | <el-button v-if="row.children==null" class="menu-button" :size="size" @click="showUpdateDialog(size,row,index)" type="text" icon="el-icon-edit">ç¼è¾</el-button> |
| | | <el-button v-if="row.children==null" class="menu-button" :size="size" @click="delInspectHandler(size,row,index)" type="text" icon="el-icon-delete">å é¤</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="ç¼è¾" |
| | | :visible.sync="updateVisible" |
| | | width="50%"> |
| | | <el-form :model="editForm" label-position="right" label-width="100px" ref="editForm"> |
| | | <el-form-item label="æ£éªé¡¹" prop="inspectName" :rules="{required:true,message:'æ£éªé¡¹ä¸è½ä¸ºç©º',trigger:'blur'}"> |
| | | <el-input |
| | | disabled |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç§°" |
| | | type="textarea" |
| | | v-model="editForm.inspectName" |
| | | :rows="2" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªæ å" prop="inspectRequired" :rules="{required:true,message:'æ£éªæ åä¸è½ä¸ºç©º',trigger:'blur'}"> |
| | | <el-input |
| | | placeholder="请è¾å
¥æ£éªæ å" |
| | | type="textarea" |
| | | v-model="editForm.inspectRequired" |
| | | :rows="2" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="updateVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="updateInspectHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="æ·»å å项ç®" |
| | | :visible.sync="addChildrenVisible" |
| | | width="50%"> |
| | | <el-form :model="addChildrenForm" label-position="right" |
| | | label-width="100px" ref="addChildrenForm"> |
| | | <el-form-item label="æ£éªé¡¹" prop="inspectName"> |
| | | <el-input |
| | | placeholder="请è¾å
¥æ£éªé¡¹ç®åç§°" |
| | | type="textarea" |
| | | disabled |
| | | v-model="addChildrenForm.inspectName" |
| | | :rows="2" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªæ å" prop="inspectRequired" :rules="{required:true,message:'æ£éªæ åä¸è½ä¸ºç©º',trigger:'blur'}"> |
| | | <el-input |
| | | placeholder="请è¾å
¥æ£éªæ å" |
| | | type="textarea" |
| | | v-model="addChildrenForm.inspectRequired" |
| | | :rows="2" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addChildrenVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addInspectHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getInspectList,addInspect,updateInspect,deleteInspect} from '@/api/quality/packageInspectTemp' |
| | | export default { |
| | | props: { |
| | | currshowlist: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | paramObj: { |
| | | type: Object, |
| | | default: ()=>{ |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | updateVisible(newVal){ |
| | | if(!newVal){ |
| | | this.$refs.editForm.resetFields() |
| | | } |
| | | }, |
| | | addChildrenVisible(newVal){ |
| | | if(!newVal){ |
| | | this.$refs.addChildrenForm.resetFields() |
| | | } |
| | | }, |
| | | currshowlist() { |
| | | this.inspectDialog = this.currshowlist |
| | | if (this.currshowlist) { |
| | | this.$nextTick(() => { |
| | | this.getData() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | addChildrenVisible: false, |
| | | addChildrenForm: { |
| | | inspectName: null, |
| | | inspectRequired: null, |
| | | }, |
| | | editForm: { |
| | | inspectName: null, |
| | | inspectRequired: null, |
| | | }, |
| | | updateVisible: false, |
| | | inspectDialog: false, |
| | | dataList: [], |
| | | page:{ |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | option: { |
| | | rowKey: 'id', |
| | | rowParentKey: 'id', |
| | | defaultExpandAll: true, |
| | | dialogWidth: '60%', |
| | | menu: true, |
| | | addBtn: true, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | border: true, |
| | | index: true, |
| | | height: 350, |
| | | indexLabel: 'åºå·', |
| | | align: 'center', |
| | | refreshBtn: false, |
| | | columnBtn: false, // æ¯å¦æ¾ç¤ºæ¾å½±æé®H |
| | | headerAlign: 'center', |
| | | column: [{ |
| | | label: 'æ£éªé¡¹', |
| | | prop: 'inspectName', |
| | | overHidden: true, |
| | | formslot: true, |
| | | }, { |
| | | label: 'æ£éªæ å', |
| | | prop: 'inspectRequired', |
| | | overHidden: true, |
| | | formslot: true, |
| | | }] |
| | | }, |
| | | } |
| | | }, |
| | | methods:{ |
| | | addChildren(size,row,index){ |
| | | console.log(row); |
| | | this.addChildrenForm.inspectName = row.inspectName |
| | | this.addChildrenVisible = true |
| | | }, |
| | | delInspectHandler(size,row,index){ |
| | | const _than = this |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ£éªé¡¹, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteInspect(row.id).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.$message.success("å 餿å") |
| | | _than.getData() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }).catch(() => {}); |
| | | }, |
| | | showUpdateDialog(size,row,index){ |
| | | this.editForm = { |
| | | id: row.id, |
| | | inspectName: row.templateName, |
| | | inspectRequired: row.inspectRequired |
| | | } |
| | | this.updateVisible = true |
| | | }, |
| | | updateInspectHandler(){ |
| | | this.$refs.editForm.validate(valid=>{ |
| | | if(valid){ |
| | | updateInspect(this.editForm).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("ä¿®æ¹æå") |
| | | this.getData() |
| | | this.updateVisible = false |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | addInspectHandler(){ |
| | | const _than = this |
| | | this.$refs.addChildrenForm.validate(valid=>{ |
| | | if(valid){ |
| | | let obj = { |
| | | parentId: this.paramObj.id, |
| | | ...this.addChildrenForm |
| | | } |
| | | addInspect(obj).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.getData() |
| | | _than.$message.success("æ·»å æå") |
| | | _than.addChildrenVisible = false |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getData(){ |
| | | getInspectList(this.paramObj.id).then(res=>{ |
| | | if(res.status===200){ |
| | | let dataList = res.data.data.records |
| | | dataList.forEach(ele=>{ |
| | | ele.id = Math.random() |
| | | }) |
| | | this.dataList = dataList |
| | | this.page.total = res.data.data.total |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scope> |
| | | .avue-crud__pagination { |
| | | position: relative; |
| | | padding: 0px 0 0px 20px; |
| | | text-align: right; |
| | | z-index: 10; |
| | | } |
| | | </style> |
| | |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-dropdown @command="handleCommand" v-if="!isShow && resultVal==null"> |
| | | <el-button size="mini" style="margin-right: 10px;" type="primary" > |
| | | 忢é»è®¤æ£éªé¡¹<i class="el-icon-arrow-down el-icon--right"></i> |
| | | 忢æ£éªé¡¹æ¨¡æ¿<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="1">æ£éªé¡¹ç®1</el-dropdown-item> |
| | | <el-dropdown-item divided command="2">æ£éªé¡¹ç®2</el-dropdown-item> |
| | | <el-dropdown-item :key="index" v-for="(item,index) in inspectMoulds" :command="item.father">{{item.father}}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-button v-if="resultVal=='' || resultVal==null" size="mini" @click="clickAddLine()">æ·»å æ£éªé¡¹ç®</el-button> |
| | |
| | | <el-select style="width:100%" :disabled="resultVal!=null" @change="changeResult" v-model="scope.row.result" v-if="!scope.row.children"> |
| | | <el-option label="åæ ¼" value="åæ ¼"></el-option> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"></el-option> |
| | | <el-option label="ä¸éç¨" value="ä¸éç¨"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | updatePackageInspectById, |
| | | getCustomer, |
| | | } from '@/api/quality/packageInspect' |
| | | import {getAllTemplateByEnable} from '@/api/quality/packageInspectTemp' |
| | | import {inspect1,inspect2} from '@/const/defaultPackageInspect' |
| | | export default { |
| | | computed:{ |
| | |
| | | }, |
| | | data(){ |
| | | return{ |
| | | inspectMoulds: [], |
| | | isShow: false, |
| | | submitData: { |
| | | id:null, |
| | |
| | | this.resultVal=val |
| | | } |
| | | } |
| | | this.getAllInspect() |
| | | this.init() |
| | | this.checkShowState() |
| | | |
| | | }, |
| | | watch:{ |
| | | dialogVisible(newVal){ |
| | |
| | | } |
| | | }, |
| | | methods:{ |
| | | checkShowState(){ |
| | | let num = 0 |
| | | this.list.forEach(ele=>{ |
| | | if(ele.children){ |
| | | ele.children.forEach(c=>{ |
| | | if(c.pid){ |
| | | num++ |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.isShow = num==0 |
| | | }, |
| | | getAllInspect(){ |
| | | getAllTemplateByEnable().then(res=>{ |
| | | if(res.status===200){ |
| | | this.inspectMoulds = res.data.data |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | handleCommand(command) { |
| | | switch(command){ |
| | | case "1": |
| | | this.init(inspect1) |
| | | break; |
| | | case "2": |
| | | this.init(inspect2) |
| | | break; |
| | | } |
| | | this.inspectMoulds.forEach(ele=>{ |
| | | if(ele.father==command){ |
| | | this.init(ele.children) |
| | | } |
| | | }) |
| | | }, |
| | | changeResult(){ |
| | | let result = '' |
| | |
| | | _than.list = [] |
| | | let userNameList = [] |
| | | if(dataList){ |
| | | _than.list = JSON.parse(JSON.stringify(dataList)) |
| | | let tempList = [] |
| | | dataList.forEach(ele=>{ |
| | | let obj = { |
| | | randomId: Math.random(), |
| | | name: ele.inspectName, |
| | | children: [] |
| | | } |
| | | if(ele.children){ |
| | | ele.children.forEach(e=>{ |
| | | obj.children.push({ |
| | | required: e.inspectRequired, |
| | | randomId: Math.random(), |
| | | isEdit: false, |
| | | note: '', |
| | | result: '' |
| | | }) |
| | | }) |
| | | } |
| | | tempList.push(obj) |
| | | }) |
| | | _than.list = tempList |
| | | } |
| | | data.packageInsProductS.forEach(item => { |
| | | if (item.children) { |
| | |
| | | _than.list.push(ele) |
| | | } |
| | | }) |
| | | let find1 = this.list.find(ele=>ele.name===inspect1[0].name&&ele.isEdit) !=undefined; |
| | | let find2 = this.list.find(ele=>ele.name===inspect2[0].name&&ele.isEdit) !=undefined; |
| | | this.isShow = find1||find2 |
| | | // let find1 = this.list.find(ele=>ele.name===inspect1[0].name&&ele.isEdit) !=undefined; |
| | | // let find2 = this.list.find(ele=>ele.name===inspect2[0].name&&ele.isEdit) !=undefined; |
| | | // this.isShow = find1||find2 |
| | | _than.conclusionTable = [{ |
| | | packageNo: data.packageNo, |
| | | userName: Array.from(new Set(userNameList)).join(','), |