| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function DownLoadExcel(params) { |
| | | return request({ |
| | | url: 'ImportExcel/DownLoadExcel', |
| | | method: 'GET', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function ExcelCheckData(params) { |
| | | return request({ |
| | | url: 'ImportExcel/ExcelCheckData', |
| | | method: 'POST', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | export function ExcelImportSubmit(params) { |
| | | return request({ |
| | | url: 'ImportExcel/ExcelImportSubmit', |
| | | method: 'POST', |
| | | data: params |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | // åè´§æ¡£æ¡å
³èå·¥èºè·¯çº¿æäº¤ |
| | | export function SaveInventoryFile(partcode, data) { |
| | | export function SaveInventoryFile(partcode, defaultroute_code, data) { |
| | | return request({ |
| | | url: 'ProductModel/SaveInventoryFile?partcode=' + partcode, |
| | | url: 'ProductModel/SaveInventoryFile?partcode=' + partcode + '&defaultroute_code=' + defaultroute_code, |
| | | method: 'post', |
| | | data |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :visible.sync="visible" |
| | | :title="title" |
| | | :code="code" |
| | | @close="$emit('update:shows', false)" |
| | | > |
| | | <div> |
| | | <el-steps :active="num" align-center style="margin-bottom:10px;"> |
| | | <el-step title="ä¸ä¼ Excel" /> |
| | | <el-step title="æ°æ®éªè¯" /> |
| | | <el-step title="导å
¥æ°æ®" /> |
| | | <el-step title="宿" /> |
| | | </el-steps> |
| | | |
| | | <div v-if="div1" class="mb40"> |
| | | <h3>导å
¥æç¤º</h3> |
| | | <p>1. 导å
¥æä»¶æ¯æç±»åï¼.xlsx,æå¤§ä¸è½è¶
10M</p> |
| | | <p>2. 请å¿è°æ´å¯¼å
¥æ¨¡çä¸å段çå·¦å³é¡ºåºææ°å¢sheet页</p> |
| | | </div> |
| | | |
| | | <div v-if="div2 && div2_state === "300""> |
| | | <p><span class="gth_icon">!</span>æä»¶ä¸æ<span style="color:red">{{ error_list.length }}</span>æ¡éè¯¯æ°æ®ï¼è¯·ä¿®æ¹å鿰坼å
¥</p> |
| | | <el-table class="table" :data="error_list" :header-cell-style="{background:'#f5f5f5'}"> |
| | | <el-table-column label="åºå·" prop="Seq" /> |
| | | <el-table-column label="è¡å·" prop="RoeNumber" /> |
| | | <el-table-column label="éè¯¯åæ®µ" prop="ErrorField" /> |
| | | <el-table-column label="é误详æ
" prop="ErrorCont" /> |
| | | </el-table> |
| | | </div> |
| | | <div v-if="div2 && div2_state === '200'" style="position:relative;margin-top:100px;"> |
| | | <div class="progress_bar bar-color-a" /> |
| | | <div :class="{'progress_bar':true, 'bar-color-b':true,'position_div':true,'cg':cg4,}" /> |
| | | <div class="mt"><img src="@/assets/images/succ.png" class="img_position"> æ ¡éªæ°æ® (æå)</div> |
| | | <div class="mt">å³å°å¯¼å
¥{{ total_num }}æ¡æ°æ®</div> |
| | | </div> |
| | | <div v-if="div1" class="mb40"> |
| | | <h3>ä¸ä¼ æä»¶</h3> |
| | | <el-upload |
| | | style="display: inline-block;" |
| | | action="/apis/importexcel/ExcelModelCheck" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :before-upload="beforeUpload" |
| | | :data="{FileCode:code}" |
| | | > |
| | | <el-button class="but_style" icon="el-icon-upload2" size="small">{{ button_name }}</el-button> |
| | | </el-upload> |
| | | 请ç¹å» |
| | | <el-button type="text" icon="el-icon-download" @click="clickDown(code)">ä¸è½½æ°æ®æ¨¡ç</el-button> |
| | | , å¹¶æç
§æ¨¡çç¼è¾å¯¼å
¥æ°æ® |
| | | </div> |
| | | <p v-if="div1">{{ file_name }}</p> |
| | | <div v-show="div1 && getDataing" class="yz"> |
| | | <ul> |
| | | <li> |
| | | <div class="progress_bar bar-color-a" /> |
| | | <div :class="{'progress_bar':true, 'bar-color-b':true,'position_div':true,'cg':cg1,'sb':sb1}" /> |
| | | <div v-if="json1 === 200" class="mt"><img src="@/assets/images/succ.png" class="img_position">æä»¶ä¸ä¼ (æå)</div> |
| | | <div v-if="json1 === 300" class="mt"><img src="@/assets/images/sbbbb_icon.png" class="img_position">æä»¶ä¸ä¼ (失败)</div> |
| | | <div v-if="json1=== null" class="mt">æä»¶ä¸ä¼ ï¼å¾
æ ¡éªï¼</div> |
| | | </li> |
| | | <!-- <li > |
| | | <div class='progress_bar bar-color-a'></div> |
| | | <div class='progress_bar ba r-color-c position_div' style="width:80%"></div> |
| | | |
| | | </li> --> |
| | | |
| | | <li> |
| | | <div class="progress_bar bar-color-a" /> |
| | | <div :class="{'progress_bar':true, 'bar-color-b':true,'position_div':true,'cg':cg2,'sb':sb2}" /> |
| | | <div v-if="json2 === 200" class="mt"><img src="@/assets/images/succ.png" class="img_position">æ¨¡çæ ¡éª (æå)</div> |
| | | <div v-if="json2 === 300" class="mt"><img src="@/assets/images/sbbbb_icon.png" class="img_position">æ¨¡çæ ¡éª (失败)</div> |
| | | <div v-if="json2 === null" class="mt">æ¨¡çæ ¡éªï¼å¾
æ ¡éªï¼</div> |
| | | </li> |
| | | <!-- <li v-if="json2 === 300"> |
| | | <div class='progress_bar bar-color-a'></div> |
| | | <div class='progress_bar bar-color-c position_div' style="width:80%"></div> |
| | | |
| | | </li> --> |
| | | <!-- <li v-if="json2 === null"> |
| | | <div class='progress_bar bar-color-a'></div> |
| | | <div class='progress_bar position_div'></div> |
| | | <div class='mt'>模çéªè¯ï¼å¾
æ ¡éªï¼</div> |
| | | </li> --> |
| | | |
| | | <li> |
| | | <div class="progress_bar bar-color-a" /> |
| | | <div :class="{'progress_bar':true, 'bar-color-b':true,'position_div':true,'cg':cg3,'sb':sb3}" /> |
| | | <div v-if="json3 === 200" class="mt"><img src="@/assets/images/succ.png" class="img_position">æ°æ®éæ ¡éª (æå)</div> |
| | | <div v-if="json3 === 300" class="mt"><img src="@/assets/images/sbbbb_icon.png" class="img_position">æ°æ®éæ ¡éª (失败)</div> |
| | | <div v-if="json3 === null" class="mt">æ°æ®éæ ¡éªï¼å¾
æ ¡éªï¼</div> |
| | | </li> |
| | | <!-- <li v-if="json3 === 300"> |
| | | <div class='progress_bar bar-color-a'></div> |
| | | <div class='progress_bar bar-color-c position_div' style="width:80%"></div> |
| | | |
| | | </li> |
| | | <li v-if="json3 === null"> |
| | | <div class='progress_bar bar-color-a'></div> |
| | | <div class='progress_bar position_div'></div> |
| | | |
| | | </li> --> |
| | | </ul> |
| | | </div> |
| | | <div v-if="div3" class="div3_s"> |
| | | <img src="@/assets/images/ws_icon.png"> |
| | | <p>å·²æå导å
¥æ°æ®{{ total_num }}æ¡</p> |
| | | </div> |
| | | <div v-if="div3_sb" class="div3_s"> |
| | | <img src="@/assets/images/error_icon.png"> |
| | | <p>导å
¥å¤±è´¥ï¼å¤±è´¥çåå æ¯{{ error_message }}ï¼</p> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="button_text !="宿"" @click="colos()">å æ¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="button_style" |
| | | :disabled="disState" |
| | | @click="nextStep(code)" |
| | | >{{ button_text }}</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import all from '@/api/all' |
| | | |
| | | export default { |
| | | props: { |
| | | code: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | shows: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | // num:{ |
| | | // type:Number, |
| | | // default:0 |
| | | // }, |
| | | // nextStep:{ |
| | | // type:Function, |
| | | // default:null |
| | | // }, |
| | | colos: { |
| | | type: Function, |
| | | default: null |
| | | } |
| | | // mnList:{ |
| | | // type:Array, |
| | | // default:[] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | cg1: false, |
| | | sb1: false, |
| | | cg2: false, |
| | | sb2: false, |
| | | cg3: false, |
| | | sb3: false, |
| | | cg4: false, |
| | | background1: '', |
| | | background2: '', |
| | | background3: '', |
| | | error_message: '', |
| | | total_num: 0, |
| | | file: '', |
| | | div3_sb: false, |
| | | div3: false, |
| | | div2_state: '', |
| | | num: 0, |
| | | disState: true, |
| | | visible: this.shows, |
| | | file_name: '', |
| | | div2: false, |
| | | div1: true, |
| | | button_name: 'éæ©æä»¶', |
| | | json1: '', |
| | | json2: '', |
| | | json3: '', |
| | | mnList: [], |
| | | error_list: [], |
| | | button_text: 'ä¸ä¸æ¥' |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | shows() { |
| | | this.visible = this.shows |
| | | } |
| | | }, |
| | | methods: { |
| | | newDataFunc() { |
| | | this.num = 0 |
| | | this.getDataing = false |
| | | this.div1 = true |
| | | this.div2 = false |
| | | this.div3 = false |
| | | this.div3_sb = false |
| | | this.file_name = '' |
| | | this.disState = true |
| | | this.json1 = '' |
| | | this.json2 = '' |
| | | this.json3 = '' |
| | | this.button_name = 'éæ©æä»¶' |
| | | this.button_text = 'ä¸ä¸æ¥' |
| | | }, |
| | | nextStep(code) { |
| | | const data = { |
| | | FileCode: code, |
| | | FileName: this.file_name |
| | | } |
| | | if (this.num === 0) { |
| | | this.div1 = false |
| | | this.div2 = true |
| | | this.ExcelCheckData(data) |
| | | this.num += 1 |
| | | this.disState = true |
| | | } else if (this.num === 1) { |
| | | this.div2 = false |
| | | this.ExcelImportSubmit(data) |
| | | } else { |
| | | this.colos() |
| | | } |
| | | }, |
| | | ExcelImportSubmit(data) { |
| | | all.ExcelImportSubmit(data).then((res) => { |
| | | if (res.statusCode === '200') { |
| | | this.div3 = true |
| | | this.num += 2 |
| | | this.button_text = '宿' |
| | | this.disState = false |
| | | } else { |
| | | this.num += 1 |
| | | this.div3_sb = true |
| | | this.disState = true |
| | | this.error_message = res.message |
| | | } |
| | | }) |
| | | }, |
| | | ExcelCheckData(data) { |
| | | all.ExcelCheckData(data).then((res) => { |
| | | this.div2_state = res.StuCode |
| | | setTimeout(() => { |
| | | this.cg4 = true |
| | | }, 2000) |
| | | this.error_list = res.list |
| | | this.total_num = res.Count |
| | | if (res.StuCode === '200') { |
| | | this.disState = false |
| | | } |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | this.file_name = file.name |
| | | this.file = file |
| | | }, |
| | | handleAvatarSuccess(res, file, fileList) { |
| | | this.disState = true |
| | | this.getDataing = true |
| | | this.json1 = null |
| | | this.json2 = null |
| | | this.json3 = null |
| | | this.cg1 = false |
| | | this.sb1 = false |
| | | this.cg2 = false |
| | | this.sb2 = false |
| | | this.cg3 = false |
| | | this.sb3 = false |
| | | setTimeout(() => { |
| | | if (res.json1.statusCode === 200) { |
| | | this.cg1 = true |
| | | } else { |
| | | this.sb1 = true |
| | | this.json2 = null |
| | | this.json3 = null |
| | | this.button_name = 'æ´æ°æä»¶' |
| | | } |
| | | }, 500) |
| | | setTimeout(() => { |
| | | this.json1 = res.json1.statusCode |
| | | this.json2 = null |
| | | this.json3 = null |
| | | if (res.json2.statusCode === 200) { |
| | | this.cg2 = true |
| | | } else { |
| | | this.sb2 = true |
| | | this.json3 = null |
| | | this.button_name = 'æ´æ°æä»¶' |
| | | } |
| | | }, 2000) |
| | | setTimeout(() => { |
| | | this.json2 = res.json2.statusCode |
| | | this.json3 = null |
| | | if (res.json3.statusCode === 200) { |
| | | this.cg3 = true |
| | | } else { |
| | | this.sb3 = true |
| | | this.json3 = null |
| | | this.button_name = 'æ´æ°æä»¶' |
| | | } |
| | | }, 4000) |
| | | setTimeout(() => { |
| | | this.json3 = res.json3.statusCode |
| | | }, 6000) |
| | | // if(res.json1.statusCode === 300){ |
| | | // this.json2 = null |
| | | // this.json3 =null |
| | | // this.button_name = 'æ´æ°æä»¶' |
| | | // }else{ |
| | | // this.json2 = res.json2.statusCode |
| | | |
| | | // } |
| | | // if(res.json2.statusCode === 300){ |
| | | // this.json3 =null |
| | | // this.button_name = 'æ´æ°æä»¶' |
| | | // }else{ |
| | | // this.json3 = res.json3.statusCode |
| | | // } |
| | | setTimeout(() => { |
| | | if (this.json1 === 200 && this.json2 === 200 && this.json3 === 200) { |
| | | this.disState = false |
| | | } |
| | | }, 7000) |
| | | }, |
| | | clickDown(code) { |
| | | const data = { |
| | | FileCode: code |
| | | } |
| | | all.DownLoadExcel(data).then((res) => { |
| | | window.location.href = res |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .yz ul { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .yz ul li { |
| | | list-style: none; |
| | | width: 32%; |
| | | position: relative; |
| | | } |
| | | |
| | | .progress_bar { |
| | | height: 12px; |
| | | width: 100%; |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .bar-color-a { |
| | | background: #F1F1F1 |
| | | } |
| | | |
| | | .bar-color-b { |
| | | background: #28C689 |
| | | } |
| | | |
| | | .bar-color-c { |
| | | background: #EB8383 |
| | | } |
| | | |
| | | .position_div { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 0px; |
| | | border-radius: 10px; |
| | | |
| | | } |
| | | |
| | | .mt { |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .mb40 { |
| | | margin-bottom: 40px; |
| | | } |
| | | |
| | | .mb20 { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .div3_s { |
| | | margin-top: 100px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .img_position { |
| | | vertical-align: -1px; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .cg { |
| | | width: 100%; |
| | | background: #28C689; |
| | | transition: width 2s ease 0.3s; |
| | | } |
| | | |
| | | .sb { |
| | | width: 80%; |
| | | background: #EB8383; |
| | | transition: width 2s ease 0.3s; |
| | | } |
| | | |
| | | .but_style { |
| | | color: #00a79d; |
| | | background-color: #FFFFFF; |
| | | border-color: #00a79d; |
| | | } |
| | | |
| | | .gth_icon { |
| | | height: 20px; |
| | | display: inline-block; |
| | | background: #F7B500; |
| | | color: #FFFFFF; |
| | | border-radius: 100%; |
| | | width: 20px; |
| | | text-align: center; |
| | | line-height: 20px; |
| | | margin-right: 6px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1658133194496" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2462" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="42"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); } |
| | | </style></defs><path d="M500.92 308.92L386 404.71l-98-98-150.63 150.66 45.25 45.26L288 397.25l94 94 164.36-136.89L608 416V256H448zM640 64H128a64.19 64.19 0 0 0-64 64v768a64.19 64.19 0 0 0 64 64h444a289.06 289.06 0 0 1-82.6-64H128.11l-0.11-0.11V128.11l0.11-0.11h511.78l0.11 0.11v295a288.9 288.9 0 0 1 64-7.11V128a64.19 64.19 0 0 0-64-64zM446 576H160v64h263.15A285.9 285.9 0 0 1 446 576zM160 768h263.15a288.91 288.91 0 0 1-7.15-64H160z" p-id="2463" fill="#42b983"></path><path d="M704 448c-141.38 0-256 114.62-256 256s114.62 256 256 256 256-114.62 256-256-114.62-256-256-256z m181 285.63L843.15 742a13.77 13.77 0 0 0-10.23 8.84q-2.08 5.72-4.64 11.2a13.78 13.78 0 0 0 1 13.49L852.92 811a13.71 13.71 0 0 1-1.71 17.3l-22.89 22.89a13.71 13.71 0 0 1-17.3 1.71l-35.49-23.66a13.78 13.78 0 0 0-13.49-1q-5.47 2.56-11.2 4.64a13.77 13.77 0 0 0-8.84 10.27L733.63 885a13.71 13.71 0 0 1-13.45 11h-32.37a13.71 13.71 0 0 1-13.45-11L666 843.15a13.77 13.77 0 0 0-8.84-10.23q-5.72-2.08-11.2-4.64a13.78 13.78 0 0 0-13.49 1L597 852.92a13.71 13.71 0 0 1-17.3-1.71l-22.89-22.89a13.71 13.71 0 0 1-1.71-17.3l23.66-35.49a13.78 13.78 0 0 0 1-13.49q-2.56-5.47-4.64-11.2a13.77 13.77 0 0 0-10.27-8.84L523 733.63a13.71 13.71 0 0 1-11-13.45v-32.37a13.71 13.71 0 0 1 11-13.45l41.85-8.36a13.77 13.77 0 0 0 10.23-8.84q2.08-5.72 4.64-11.2a13.78 13.78 0 0 0-1-13.49L555.08 597a13.71 13.71 0 0 1 1.71-17.3l22.89-22.89a13.71 13.71 0 0 1 17.3-1.71l35.49 23.66a13.78 13.78 0 0 0 13.49 1q5.47-2.56 11.2-4.64a13.77 13.77 0 0 0 8.84-10.27l8.37-41.85a13.71 13.71 0 0 1 13.45-11h32.37a13.71 13.71 0 0 1 13.45 11l8.36 41.85a13.77 13.77 0 0 0 8.84 10.23q5.72 2.08 11.2 4.64a13.78 13.78 0 0 0 13.49-1L811 555.08a13.71 13.71 0 0 1 17.3 1.71l22.89 22.89a13.71 13.71 0 0 1 1.71 17.3l-23.66 35.49a13.78 13.78 0 0 0-1 13.49q2.56 5.47 4.64 11.2a13.77 13.77 0 0 0 10.27 8.84l41.85 8.37a13.71 13.71 0 0 1 11 13.45v32.37a13.71 13.71 0 0 1-11 13.44zM704 621.71a82.29 82.29 0 1 0 58.19 24.1 81.75 81.75 0 0 0-58.19-24.1z" p-id="2464" fill="#42b983"></path></svg> |
| | |
| | | <template> |
| | | <div :class="{'has-logo':showLogo}"> |
| | | |
| | | <logo v-if="showLogo" :collapse="isCollapse"/> |
| | | <logo v-if="showLogo" :collapse="isCollapse" /> |
| | | <el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:56px;height: 85%"> |
| | | <el-menu |
| | | :default-active="activeMenu" |
| | |
| | | <!-- :item="route"--> |
| | | <!-- :base-path="route.path"--> |
| | | <!-- />--> |
| | | <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path"/> |
| | | <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" /> |
| | | |
| | | </el-menu> |
| | | </el-scrollbar> |
| | | <div style="position: absolute;bottom: 20px;left: 30px;"> |
| | | <div> |
| | | <el-button type="text">æ°å¯è¿ªå¶é V1.0.01</el-button> |
| | | <!-- <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">æ°å¯è¿ªå¶é V1.0.01</a></el-button>--> |
| | | <!-- <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">æ°å¯è¿ªå¶é V1.0.01</a></el-button>--> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from 'vuex' |
| | | import { mapGetters } from 'vuex' |
| | | import Logo from './Logo' |
| | | import SidebarItem from './SidebarItem' |
| | | import variables from '@/styles/variables.scss' |
| | | import {LoginMenu} from '@/api/user' |
| | | import {removeCookie, setCookie} from '@/utils/auth' |
| | | import { LoginMenu } from '@/api/user' |
| | | import { removeCookie, setCookie } from '@/utils/auth' |
| | | |
| | | export default { |
| | | components: {SidebarItem, Logo}, |
| | | components: { SidebarItem, Logo }, |
| | | data() { |
| | | return { |
| | | routers: [] |
| | |
| | | }, |
| | | activeMenu() { |
| | | const route = this.$route |
| | | const {meta, path} = route |
| | | const { meta, path } = route |
| | | // if set path, the sidebar will highlight the path you set |
| | | removeCookie('ruleCode') |
| | | setCookie('ruleCode', meta.code)// å°ç¼ç è§åcodeåå°cookieéé¢ |
| | |
| | | |
| | | .el-button--text:focus { |
| | | color: white; |
| | | |
| | | } |
| | | |
| | | #app .sidebar-container .el-submenu .el-menu-item { |
| | |
| | | code: '1084', |
| | | component: () => import('@/views/zlgl/qxsj'), |
| | | meta: { code: '1084', title: '缺é·ç»è®¡', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'gxjybz', |
| | | name: '', |
| | | code: '1085', |
| | | component: () => import('@/views/zlgl/gxjybz'), |
| | | meta: { code: '1085', title: 'å·¥åºæ£éªæ å', icon: '', keepAlive: true } |
| | | }, |
| | | { |
| | | path: 'gxjyxm', |
| | | name: '', |
| | | code: '1086', |
| | | component: () => import('@/views/zlgl/gxjyxm'), |
| | | meta: { code: '1086', title: 'å·¥åºæ£éªé¡¹ç®', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/bbgl', |
| | | component: Layout, |
| | | redirect: '/bbgl/sczxbb', |
| | | name: 'æ¥è¡¨ç®¡ç', |
| | | code: '1008', |
| | | meta: { code: '1008', title: 'æ¥è¡¨ç®¡ç', icon: 'bbgl' }, |
| | | alwaysShow: true, |
| | | children: [ |
| | | { |
| | | path: 'sczxbb', |
| | | name: 'BMGZCancel', |
| | | code: '1090', |
| | | component: () => import('@/views/bbgl/sczxbb'), |
| | | meta: { code: '1090', title: 'ç产æ§è¡æ¥è¡¨', icon: '', keepAlive: true } |
| | | }] |
| | | }, |
| | | { |
| | | path: '/xtsz', |
| | | component: Layout, |
| | | redirect: '/xtsz/bmgz', |
| | |
| | | * @param {*} menu |
| | | */ |
| | | export function getAsyncRoutes(routes, menu) { |
| | | // menu ä¸flag "0" 表示 true "1"表示false |
| | | const menuCode = []// å°å端codeååºåææ°ç»å½¢å¼ |
| | | const menuNameAndCode = []// å°å端codeä¸nameååºåææ°ç»å½¢å¼ |
| | | menu.forEach(item => { |
| | | menuCode.push(item.code) |
| | | menuNameAndCode.push({ code: item.code, name: item.name }) |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(it => { |
| | | menuCode.push(it.code) |
| | | menuNameAndCode.push({ code: it.code, name: it.name }) |
| | | }) |
| | | if (item.flag === '0') { |
| | | menuCode.push(item.code) |
| | | menuNameAndCode.push({ code: item.code, name: item.name }) |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(it => { |
| | | if (it.flag === '0') { |
| | | menuCode.push(it.code) |
| | | menuNameAndCode.push({ code: it.code, name: it.name }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template /> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'Sczxbb' |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | children: 'children', |
| | | label: 'name', |
| | | value: 'code' |
| | | } |
| | | }, |
| | | PCTrue: false, // æ¯å¦å±ç¤º |
| | | APPTrue: false// æ¯å¦å±ç¤º |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | type: '' |
| | | } |
| | | const { data: res } = await RoleAssociationRight(data)// æ¥å£è·åæ°æ® |
| | | this.dialogFormRight.rightPCArr = res[0] |
| | | this.dialogFormRight.rightAPPArr = res[1] |
| | | // '0'æ¾ç¤º '1' 䏿¾ç¤º |
| | | this.dialogFormRight.rightPCArr = res[0][0].is_delete === '0' ? res[0] : [] |
| | | this.dialogFormRight.rightAPPArr = res[1][0].is_delete === '0' ? res[1] : [] |
| | | |
| | | this.PCTrue = res[0][0].is_delete === '0' |
| | | this.APPTrue = res[1][0].is_delete === '0' |
| | | |
| | | if (this.PCTrue) { |
| | | this.dialogFormRight.rightPCArr[0].children.forEach((item, index) => { |
| | | if (item.is_delete === '1') { |
| | | this.dialogFormRight.rightPCArr[0].children.splice(index, 1) |
| | | } else { |
| | | if (item.children.length > 0 && item.children) { |
| | | item.children.forEach((it, ind) => { |
| | | if (it.is_delete === '1') { |
| | | item.children.splice(ind, 1) |
| | | } |
| | | }) |
| | | } |
| | | if (item.children.length === 0) { |
| | | this.dialogFormRight.rightPCArr[0].children.splice(index, 1) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | if (this.APPTrue) { |
| | | this.dialogFormRight.rightAPPArr[0].children.forEach((item, index) => { |
| | | if (item.is_delete === '1') { |
| | | this.dialogFormRight.rightAPPArr[0].children.splice(index, 1) |
| | | } else { |
| | | if (item.children.length > 0 && item.children) { |
| | | item.children.forEach((it, ind) => { |
| | | if (it.is_delete === '1') { |
| | | item.children.splice(ind, 1) |
| | | } |
| | | }) |
| | | } |
| | | if (item.children.length === 0) { |
| | | this.dialogFormRight.rightAPPArr[0].children.splice(index, 1) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 夿åªä¸ªæ¯é«äº® |
| | | let pcIsSelected1 = false |
| | | let pcIsSelected2 = false |
| | | let appIsSelected1 = false |
| | | let appIsSelected2 = false |
| | | const rightPCArrFlag = res[0][0].flag |
| | | const rightAPPArrFlag = res[1][0].flag |
| | | let rightPCArrFlag |
| | | let rightAPPArrFlag |
| | | |
| | | if (this.PCTrue) { |
| | | rightPCArrFlag = this.dialogFormRight.rightPCArr[0].flag |
| | | } |
| | | if (this.APPTrue) { |
| | | rightAPPArrFlag = this.dialogFormRight.rightAPPArr[0].flag |
| | | } |
| | | |
| | | let waitFlag = false// åæ¾çå¾
æ¯å¦æ¾è¡ |
| | | |
| | | // 1.第ä¸ç§æ
åµPCåAPPé½ä¸æ¬¡é½æ²¡é䏿¶ PCæªéä¸ï¼APPæªéä¸ |
| | | if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'N') { |
| | | pcIsSelected1 = true |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | |
| | | // 2.第äºç§æ
åµPCå·²éä¸ï¼APPæªéä¸ |
| | | if (rightPCArrFlag === 'Y' && rightAPPArrFlag === 'N') { |
| | | pcIsSelected1 = true |
| | | pcIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | |
| | | // 3.第ä¸ç§æ
åµPCæªéä¸ï¼APPå·²éä¸ |
| | | if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'Y') { |
| | | appIsSelected1 = true |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='APP']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code |
| | | } |
| | | // 4.第åç§æ
åµPCå·²éä¸ï¼APPå·²éä¸ |
| | | if (rightPCArrFlag === 'Y' && rightAPPArrFlag === 'Y') { |
| | | pcIsSelected1 = true |
| | | pcIsSelected2 = true |
| | | appIsSelected1 = false |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | this.dialogFormRight.rightOperationArr.push({ |
| | | isSelected1: pcIsSelected1, |
| | | isSelected2: pcIsSelected2, |
| | | code: this.dialogFormRight.rightPCArr[0].code, |
| | | flag: rightPCArrFlag, |
| | | name: this.dialogFormRight.rightPCArr[0].name |
| | | }, { |
| | | isSelected1: appIsSelected1, |
| | | isSelected2: appIsSelected2, |
| | | code: this.dialogFormRight.rightAPPArr[0].code, |
| | | flag: rightAPPArrFlag, |
| | | name: this.dialogFormRight.rightAPPArr[0].name |
| | | }) |
| | | |
| | | this.dialogFormRight.rightPCArr[0].name = 'å
¨é¨' |
| | | this.dialogFormRight.rightAPPArr[0].name = 'å
¨é¨' |
| | | |
| | | this.dialogFormRight.rightPCArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0 && item.flag === 'Y') { |
| | | item.children.forEach(it => { |
| | | if (it.flag === 'Y') { |
| | | this.dialogFormRight.rightPCArrSelected.push(it.code) |
| | | } |
| | | }) |
| | | } else if (item.children && item.children.length === 0 && item.flag === 'Y') { |
| | | this.dialogFormRight.rightPCArrSelected.push(item.code) |
| | | if (this.PCTrue && this.APPTrue) { |
| | | // 1.第ä¸ç§æ
åµPCåAPPé½ä¸æ¬¡é½æ²¡é䏿¶ PCæªéä¸ï¼APPæªéä¸ |
| | | if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'N') { |
| | | pcIsSelected1 = true |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | }) |
| | | this.dialogFormRight.rightAPPArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0 && item.flag === 'Y') { |
| | | item.children.forEach(it => { |
| | | if (it.flag === 'Y') { |
| | | this.dialogFormRight.rightAPPArrSelected.push(it.code) |
| | | // 2.第äºç§æ
åµPCå·²éä¸ï¼APPæªéä¸ |
| | | if (rightPCArrFlag === 'Y' && rightAPPArrFlag === 'N') { |
| | | pcIsSelected1 = true |
| | | pcIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | }) |
| | | } else if (item.children && item.children.length === 0 && item.flag === 'Y') { |
| | | this.dialogFormRight.rightAPPArrSelected.push(item.code) |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | }) |
| | | // 3.第ä¸ç§æ
åµPCæªéä¸ï¼APPå·²éä¸ |
| | | if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'Y') { |
| | | appIsSelected1 = true |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='APP']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code |
| | | } |
| | | // 4.第åç§æ
åµPCå·²éä¸ï¼APPå·²éä¸ |
| | | if (rightPCArrFlag === 'Y' && rightAPPArrFlag === 'Y') { |
| | | pcIsSelected1 = true |
| | | pcIsSelected2 = true |
| | | appIsSelected1 = false |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | } |
| | | |
| | | if (this.PCTrue && !this.APPTrue) { |
| | | if (rightPCArrFlag === 'Y') { |
| | | pcIsSelected1 = true |
| | | pcIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | } |
| | | |
| | | if (!this.PCTrue && this.APPTrue) { |
| | | if (rightAPPArrFlag === 'Y') { |
| | | appIsSelected1 = true |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='APP']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | | |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code |
| | | } |
| | | } |
| | | |
| | | if (this.PCTrue) { |
| | | this.dialogFormRight.rightOperationArr.push({ |
| | | isSelected1: pcIsSelected1, |
| | | isSelected2: pcIsSelected2, |
| | | code: this.dialogFormRight.rightPCArr[0].code, |
| | | flag: rightPCArrFlag, |
| | | name: this.dialogFormRight.rightPCArr[0].name |
| | | }) |
| | | } |
| | | if (this.APPTrue) { |
| | | this.dialogFormRight.rightOperationArr.push({ |
| | | isSelected1: appIsSelected1, |
| | | isSelected2: appIsSelected2, |
| | | code: this.dialogFormRight.rightAPPArr[0].code, |
| | | flag: rightAPPArrFlag, |
| | | name: this.dialogFormRight.rightAPPArr[0].name |
| | | }) |
| | | } |
| | | if (this.PCTrue) { |
| | | this.dialogFormRight.rightPCArr[0].name = 'å
¨é¨' |
| | | } |
| | | if (this.APPTrue) { |
| | | this.dialogFormRight.rightAPPArr[0].name = 'å
¨é¨' |
| | | } |
| | | |
| | | // æ 形忾é¨å |
| | | if (this.PCTrue) { |
| | | this.dialogFormRight.rightPCArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0 && item.flag === 'Y') { |
| | | item.children.forEach(it => { |
| | | if (it.flag === 'Y') { |
| | | this.dialogFormRight.rightPCArrSelected.push(it.code) |
| | | } |
| | | }) |
| | | } else if (item.children && item.children.length === 0 && item.flag === 'Y') { |
| | | this.dialogFormRight.rightPCArrSelected.push(item.code) |
| | | } |
| | | }) |
| | | } |
| | | if (this.APPTrue) { |
| | | this.dialogFormRight.rightAPPArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0 && item.flag === 'Y') { |
| | | item.children.forEach(it => { |
| | | if (it.flag === 'Y') { |
| | | this.dialogFormRight.rightAPPArrSelected.push(it.code) |
| | | } |
| | | }) |
| | | } else if (item.children && item.children.length === 0 && item.flag === 'Y') { |
| | | this.dialogFormRight.rightAPPArrSelected.push(item.code) |
| | | } |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | if (this.$refs.rightPCRef) { |
| | | this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected) |
| | |
| | | if (this.$refs.rightAPPRef) { |
| | | this.$refs.rightAPPRef.setCheckedKeys([]) |
| | | } |
| | | this.PCTrue = false |
| | | this.APPTrue = false |
| | | }, |
| | | // æéå¯¹è¯æ¡åæ¶äºä»¶ |
| | | rightDialogVisibleCancel() { |
| | |
| | | async rightDialogVisibleConfirm() { |
| | | const rightPCArrSelected = []// ä¿åæäº¤æ éä¸ PC |
| | | const rightAPPArrSelected = []// ä¿åæäº¤æ éä¸ APP |
| | | |
| | | this.dialogFormRight.rightPCArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0) { |
| | | const children = [] |
| | | let flag = false // 表示childrenéæå¼pushè¿å»äº |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormRight.rightPCArrSelected.includes(it.code) || this.dialogFormRight.rightPCArrSelected.includes('PC')) { |
| | | flag = true |
| | | children.push( |
| | | { code: it.code, name: it.name, flag: 'Y' } |
| | | ) |
| | | } |
| | | }) |
| | | if (flag) { |
| | | rightPCArrSelected.push({ |
| | | code: item.code, name: item.name, flag: 'Y', children: children |
| | | if (this.PCTrue) { |
| | | this.dialogFormRight.rightPCArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0) { |
| | | const children = [] |
| | | let flag = false // 表示childrenéæå¼pushè¿å»äº |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormRight.rightPCArrSelected.includes(it.code) || this.dialogFormRight.rightPCArrSelected.includes('PC')) { |
| | | flag = true |
| | | children.push( |
| | | { code: it.code, name: it.name, flag: 'Y' } |
| | | ) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | this.dialogFormRight.rightAPPArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0) { |
| | | const children = [] |
| | | let flag = false // 表示childrenéæå¼pushè¿å»äº |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormRight.rightAPPArrSelected.includes(it.code) || this.dialogFormRight.rightAPPArrSelected.includes('APP')) { |
| | | flag = true |
| | | children.push( |
| | | { code: it.code, name: it.name, flag: 'Y' } |
| | | ) |
| | | if (flag) { |
| | | rightPCArrSelected.push({ |
| | | code: item.code, name: item.name, flag: 'Y', children: children |
| | | }) |
| | | } |
| | | }) |
| | | if (flag) { |
| | | rightAPPArrSelected.push({ |
| | | code: item.code, name: item.name, flag: 'Y', children: children |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | if (this.APPTrue) { |
| | | this.dialogFormRight.rightAPPArr[0].children.forEach(item => { |
| | | if (item.children && item.children.length > 0) { |
| | | const children = [] |
| | | let flag = false // 表示childrenéæå¼pushè¿å»äº |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormRight.rightAPPArrSelected.includes(it.code) || this.dialogFormRight.rightAPPArrSelected.includes('APP')) { |
| | | flag = true |
| | | children.push( |
| | | { code: it.code, name: it.name, flag: 'Y' } |
| | | ) |
| | | } |
| | | }) |
| | | if (flag) { |
| | | rightAPPArrSelected.push({ |
| | | code: item.code, name: item.name, flag: 'Y', children: children |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | // æç»è¦æäº¤çæ°æ® |
| | | let rightSubmit = [] |
| | | |
| | |
| | | > |
| | | <el-option |
| | | v-for="item in routeArr" |
| | | :key="item.route_code" |
| | | :label="item.route_name" |
| | | :value="item.route_code" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import { |
| | | AddUpdateMesOrder, |
| | | ClosedErpOrder, |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, |
| | | MesOrderSearch, RouteSelectWkshop, SearchWorkStep, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { WorkShopSelect } from '@/api/sbgl' |
| | | import { PartSelect, PartSelectRpute } from '@/api/zzmx' |
| | | import { PartSelect } from '@/api/zzmx' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { MesOrderPrintSearch1 } from '@/api/utils' |
| | |
| | | |
| | | // 产åä¿¡æ¯å¼æ¹å |
| | | async partcodeChange(val) { |
| | | const { data: res } = await PartSelectRpute({ partcode: val }) |
| | | const { data: res } = await PartSelectRoute({ partcode: val }) |
| | | this.routeArr = res |
| | | this.dialogForm.routecode = '' |
| | | |
| | | let flag = false |
| | | this.routeArr.forEach(item => { |
| | | if (item.code === item.default_route) { |
| | | this.dialogForm.routecode = item.code |
| | | flag = true |
| | | } |
| | | }) |
| | | if (!flag) { |
| | | this.dialogForm.routecode = '' |
| | | } |
| | | |
| | | this.dialogForm.wkshopcode = '' |
| | | }, |
| | | // å·¥èºè·¯çº¿å¼æ¹å |
| | |
| | | this.dialogForm.partname = row.partname |
| | | this.dialogForm.mesqty = row.plan_qty |
| | | this.dialogForm.partspec = row.partspec |
| | | // this.dialogForm.routecode = row.route_code// å·¥èºè·¯çº¿ä»£ç |
| | | // this.dialogForm.wkshopcode = row.wkshp_code// ç产车é´ä»£ç |
| | | |
| | | this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date()) |
| | | this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date()) |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding: 10px 5px 0 0"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="项ç®ç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.defectcode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®åç§°" style=" display: flex;"> |
| | | <el-input v-model="form.itemname" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="é¡¹ç®æè¿°" style=" display: flex;"> |
| | | <el-input v-model="form.itemdescr" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | border |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="org_code" |
| | | label="ç»ç»ç¼ç " |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="org_name" |
| | | label="ç»ç»åç§°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="ç»ç»ç±»å" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.description==='F'">å·¥å</div> |
| | | <div v-if="row.description==='D'">é¨é¨</div> |
| | | <div v-if="row.description==='W'">车é´</div> |
| | | <div v-if="row.description==='K'">ç§å®¤</div> |
| | | <div v-if="row.description==='L'">ç产线</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="ä¸çº§åä½" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">ç¼è¾</el-button> |
| | | <el-button type="text" @click="del(row)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getDedectSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="800px" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="项ç®ç±»å" prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®åç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¡¹ç®æè¿°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { DedectSearch } from '@/api/zlgl' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'GXJY', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥ç¼ç ')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('ç¼ç ä¸è½ä¸ºä¸æ')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | itemcode: '', // 项ç®ä»£ç |
| | | itemname: '', // 项ç®åç§° |
| | | itemdescr: '', // é¡¹ç®æè¿° |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | OrgTypeArr: [ |
| | | { label: 'å·¥å', value: 'F' }, |
| | | { label: 'é¨é¨', value: 'D' }, |
| | | { label: '车é´', value: 'W' }, |
| | | { label: 'ç§å®¤', value: 'K' }, |
| | | { label: 'ç产线', value: 'L' } |
| | | ], |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ] |
| | | |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getDedectSearch() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | async getDedectSearch() { |
| | | const res = await DedectSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getDedectSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getDedectSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getDedectSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getDedectSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getDedectSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | //border: 1px solid $main_color; |
| | | border: none; |
| | | padding: 0 20px; |
| | | } |
| | | ::v-deep .el-button--primary:hover { |
| | | border: none; |
| | | } |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .footerButton { |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #ffffff !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--default:hover { |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: space-between !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .operationClass { |
| | | height: 23px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .el-icon-share { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-checkbox.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected{ |
| | | color: $main_color; |
| | | } |
| | | ::v-deep .el-checkbox__inner:hover{ |
| | | border-color: $main_color; |
| | | } |
| | | ::v-deep .el-textarea__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding: 10px 5px 0 0"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="æ å代ç " style=" display: flex;"> |
| | | <el-input v-model="form.stanedcode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ ååç§°" style=" display: flex;"> |
| | | <el-input v-model="form.stanedname" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ åæè¿°" style=" display: flex;"> |
| | | <el-input v-model="form.staneddescr" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | border |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="org_code" |
| | | label="æ å代ç " |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="org_name" |
| | | label="æ ååç§°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="æ åæè¿°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="check('check',row)">æ¥ç</el-button> |
| | | <el-button type="text" @click="edit('edit',row)">ç¼è¾</el-button> |
| | | <el-button type="text" @click="del(row)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getStepCheckStanedSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':(operation==='edit'?'ç¼è¾':'æ¥ç')" |
| | | :visible.sync="dialogVisible" |
| | | width="800" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-comment" style="color:#42b983;" /> æ åä¿¡æ¯ï¼ |
| | | </div> |
| | | <el-form ref="dialogForm" style="margin-left: 80px" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="æ åç¼ç " prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ ååç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°"> |
| | | <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-comment" style="color:#42b983;" /> æ£éªé¡¹ä¿¡æ¯ï¼ |
| | | </div> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button type="primary" @click="JYadd">æ°å¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-table |
| | | :data="JYTableData" |
| | | height="260px" |
| | | border |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="åºå·" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | prop="mc" |
| | | label="æ£éªæ ååç§°" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.mc }}</div> |
| | | <el-input v-if="row.isVisible===1" v-model="row.mc" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ms" |
| | | label="æ£éªæè¿°æè¿°" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.ms }}</div> |
| | | <el-input v-if="row.isVisible===1" v-model="row.ms" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="JYedit(row)">ç¼è¾</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="JYdel(row)">å é¤</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="JYsave(row)">ä¿å</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="Jycancel(row)">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <!-- <pagination--> |
| | | <!-- v-show="JYtotal>0"--> |
| | | <!-- :total="JYtotal"--> |
| | | <!-- :page.sync="JYfrom.page"--> |
| | | <!-- :limit.sync="JYfrom.rows"--> |
| | | <!-- align="right"--> |
| | | <!-- layout="prev, pager, next,sizes"--> |
| | | <!-- popper-class="select_bottom"--> |
| | | <!-- @pagination="getStepCheckItemSelect"--> |
| | | <!-- />--> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { StepCheckStanedSearch } from '@/api/zlgl' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'ZJBZ', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥ç¼ç ')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('ç¼ç ä¸è½ä¸ºä¸æ')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const validateTypeCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('è¯·éæ©ä¸çº§')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | stanedcode: '', // æ å代ç |
| | | stanedname: '', // æ ååç§° |
| | | staneddescr: '', // æ åæè¿° |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | OrgTypeArr: [ |
| | | { label: 'å·¥å', value: 'F' }, |
| | | { label: 'é¨é¨', value: 'D' }, |
| | | { label: '车é´', value: 'W' }, |
| | | { label: 'ç§å®¤', value: 'K' }, |
| | | { label: 'ç产线', value: 'L' } |
| | | ], |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | JYTableData: [ |
| | | { RowNum: 1, mc: 'xxx1', ms: 'aaaa' } |
| | | ], // å¯¹è¯æ¡æ£éªä¿¡æ¯è¡¨æ ¼ |
| | | JYfrom: { |
| | | page: 1, |
| | | rows: 10 |
| | | }, |
| | | JYtotal: 10 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getStepCheckStanedSearch() |
| | | this.getStepCheckItemSelect() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | async getStepCheckStanedSearch() { |
| | | const res = await StepCheckStanedSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getStepCheckStanedSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getStepCheckStanedSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getStepCheckStanedSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // æ¥ç |
| | | check(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getStepCheckStanedSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getStepCheckStanedSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | }, |
| | | |
| | | // è·åæ£éªé¡¹ä¿¡æ¯è¡¨ |
| | | getStepCheckItemSelect() { |
| | | // let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | // number = number === 0 ? (10 + Math.random()) : number |
| | | this.JYTableData.forEach(item => { |
| | | item.isVisible = 0 |
| | | }) |
| | | }, |
| | | // æ£éªæ°å¢ |
| | | JYadd() { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { mc: '', ms: '', isVisible: 1, number } |
| | | this.JYTableData.unshift(data) |
| | | }, |
| | | JYedit(row) { |
| | | this.JYTableData.forEach((item, index) => { |
| | | if (item.mc === row.mc) { |
| | | item.isVisible = 1 |
| | | } |
| | | }) |
| | | }, |
| | | JYdel(row) { |
| | | this.JYTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.JYTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | JYsave(row) { |
| | | this.JYTableData.forEach(item => { |
| | | if (item.number === row.number) { |
| | | item.isVisible = 0 |
| | | } |
| | | }) |
| | | }, |
| | | Jycancel(row) { |
| | | this.JYTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.JYTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | //border: 1px solid $main_color; |
| | | border: none; |
| | | padding: 0 20px; |
| | | } |
| | | ::v-deep .el-button--primary:hover { |
| | | border: none; |
| | | } |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .footerButton { |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #ffffff !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--default:hover { |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: space-between !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .operationClass { |
| | | height: 23px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .el-icon-share { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-checkbox.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected{ |
| | | color: $main_color; |
| | | } |
| | | ::v-deep .el-checkbox__inner:hover{ |
| | | border-color: $main_color; |
| | | } |
| | | ::v-deep .el-textarea__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding: 10px 5px 0 0"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="项ç®ç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.defectcode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®åç§°" style=" display: flex;"> |
| | | <el-input v-model="form.itemname" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="é¡¹ç®æè¿°" style=" display: flex;"> |
| | | <el-input v-model="form.itemdescr" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | border |
| | | stripe |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="org_code" |
| | | label="ç»ç»ç¼ç " |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="org_name" |
| | | label="ç»ç»åç§°" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="ç»ç»ç±»å" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.description==='F'">å·¥å</div> |
| | | <div v-if="row.description==='D'">é¨é¨</div> |
| | | <div v-if="row.description==='W'">车é´</div> |
| | | <div v-if="row.description==='K'">ç§å®¤</div> |
| | | <div v-if="row.description==='L'">ç产线</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | label="ä¸çº§åä½" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">ç¼è¾</el-button> |
| | | <el-button type="text" @click="del(row)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getStepCheckItemSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="800px" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="项ç®ç±»å" prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®åç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¡¹ç®æè¿°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { DedectSearch } from '@/api/zlgl' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Xxxx', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥ç¼ç ')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('ç¼ç ä¸è½ä¸ºä¸æ')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | itemcode: '', // 项ç®ä»£ç |
| | | itemname: '', // 项ç®åç§° |
| | | itemdescr: '', // é¡¹ç®æè¿° |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | OrgTypeArr: [ |
| | | { label: 'å·¥å', value: 'F' }, |
| | | { label: 'é¨é¨', value: 'D' }, |
| | | { label: '车é´', value: 'W' }, |
| | | { label: 'ç§å®¤', value: 'K' }, |
| | | { label: 'ç产线', value: 'L' } |
| | | ], |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ] |
| | | |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getStepCheckItemSearch() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | async getStepCheckItemSearch() { |
| | | const res = await StepCheckItemSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | | // æåºæ¹åæ¶ |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getStepCheckItemSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getStepCheckItemSearch() |
| | | }, |
| | | upload() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | | this.form.UserName = '' |
| | | this.getStepCheckItemSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getStepCheckItemSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getStepCheckItemSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--primary { |
| | | background-color: $main_color !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | //border: 1px solid $main_color; |
| | | border: none; |
| | | padding: 0 20px; |
| | | } |
| | | ::v-deep .el-button--primary:hover { |
| | | border: none; |
| | | } |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| | | background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .footerButton { |
| | | display: flex; |
| | | justify-content: end; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #ffffff !important; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--default:hover { |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex !important; |
| | | align-items: center !important; |
| | | justify-content: space-between !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--text { |
| | | color: $main_color; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .operationClass { |
| | | height: 23px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .el-icon-share { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-checkbox.is-bordered.is-checked { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner { |
| | | border-color: $main_color; |
| | | background: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked + .el-radio__label { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-radio.is-bordered + .el-radio.is-bordered { |
| | | margin: 10px 30px 0px 0; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected{ |
| | | color: $main_color; |
| | | } |
| | | ::v-deep .el-checkbox__inner:hover{ |
| | | border-color: $main_color; |
| | | } |
| | | ::v-deep .el-textarea__inner:focus{ |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template /> |
| | | <!--<template>--> |
| | | <!-- <div>--> |
| | | <!-- <div style="margin: 100px;">--> |
| | | <!-- <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!--</template>--> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'Wljy' |
| | | } |
| | | </script> |
| | | <!--<script>--> |
| | | <!--import ImportPicker from '@/components/ImportPicker'--> |
| | | |
| | | <style scoped> |
| | | <!--export default {--> |
| | | <!-- name: 'Wljy',--> |
| | | <!-- components: {--> |
| | | <!-- ImportPicker--> |
| | | <!-- },--> |
| | | <!-- data() {--> |
| | | <!-- return {--> |
| | | <!-- title_value: 'æ°æ®å¯¼å
¥ / ç¨æ·è§è²',--> |
| | | <!-- code: '2',--> |
| | | <!-- shows: false--> |
| | | <!-- }--> |
| | | <!-- },--> |
| | | <!-- mounted() {--> |
| | | <!-- this.shows = true--> |
| | | <!-- this.$refs.importPickerFunc.newDataFunc()--> |
| | | <!-- },--> |
| | | <!-- methods: {--> |
| | | <!-- colos() {--> |
| | | <!-- this.shows = false--> |
| | | <!-- }--> |
| | | <!-- }--> |
| | | <!--}--> |
| | | <!--</script>--> |
| | | |
| | | </style> |
| | | <!--<style scoped>--> |
| | | |
| | | <!--</style>--> |
| | |
| | | <template /> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'Zjbz' |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <!-- onClick="event.cancelBubble = true"--> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-divider /> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> é»è®¤å·¥èºè·¯çº¿ |
| | | </div> |
| | | <div style="margin-top: 20px"> |
| | | <el-select |
| | | v-model="defaultroute_code" |
| | | filterable |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in defaultroute_codeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> å·¥åºå表 |
| | |
| | | <el-table |
| | | :data="projectTableData" |
| | | border |
| | | height="400" |
| | | height="300" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | routeOperationArr: [] // å·¥èºè·¯çº¿éå |
| | | // routeOperationSelectedArr: [] // å·¥èºè·¯çº¿éä¸éåæ°ç» |
| | | }, |
| | | defaultroute_code: '', // é»è®¤å·¥èºè·¯çº¿éä¸å¼ |
| | | defaultroute_codeArr: '', // é»è®¤å·¥èºè·¯çº¿æ°ç» |
| | | projectTableData: []// 设å¤å表 |
| | | } |
| | | }, |
| | |
| | | // å·¥èºè·¯çº¿ç¹å» |
| | | async routeClick(row) { |
| | | console.log(row) |
| | | this.defaultroute_code = row.default_route |
| | | this.dialogFormRoute.projectCode = row.partcode |
| | | this.dialogFormRoute.projectName = row.partname |
| | | this.dialogVisibleRoute = true |
| | | const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }) |
| | | this.dialogFormRoute.routeOperationArr = res |
| | | // let waitFlag = false// åæ¾çå¾
æ¯å¦æ¾è¡ |
| | | this.dialogFormRoute.routeOperationArrTest = [ |
| | | { |
| | | 'flag': 'Y', code: '001', name: 'æµè¯1 ', |
| | | 'Data': [ |
| | | { |
| | | 'seq': 1, |
| | | 'stepcode': 'Step01', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'Y' |
| | | }, { |
| | | 'seq': 2, |
| | | 'stepcode': 'Step02', |
| | | 'stepname': 'æµè¯å·¥åºäº', |
| | | 'enable': 'Y' |
| | | }, { |
| | | 'seq': 3, |
| | | 'stepcode': 'Step03', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'N' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'flag': 'Y', code: '002', name: 'æµè¯2 ', |
| | | 'Data': [ |
| | | { |
| | | 'seq': 1, |
| | | 'stepcode': 'Step01', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'Y' |
| | | }, { |
| | | 'seq': 2, |
| | | 'stepcode': 'Step02', |
| | | 'stepname': 'æµè¯å·¥åºäº', |
| | | 'enable': 'Y' |
| | | }, { |
| | | 'seq': 3, |
| | | 'stepcode': 'Step03', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'N' |
| | | }, { |
| | | 'seq': 4, |
| | | 'stepcode': 'Step02', |
| | | 'stepname': 'æµè¯å·¥åºäº', |
| | | 'enable': 'Y' |
| | | }, { |
| | | 'seq': 5, |
| | | 'stepcode': 'Step03', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'N' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'flag': 'N', code: '003', name: 'æµè¯3 ', |
| | | 'Data': [ |
| | | { |
| | | 'seq': 1, |
| | | 'stepcode': 'Step01', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'Y' |
| | | } |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | 'flag': 'Y', code: '004', name: 'æµè¯4 ', |
| | | 'Data': [ |
| | | { |
| | | 'seq': 1, |
| | | 'stepcode': 'Step01', |
| | | 'stepname': 'æµè¯å·¥åºä¸', |
| | | 'enable': 'Y' |
| | | }, { |
| | | 'seq': 2, |
| | | 'stepcode': 'Step02', |
| | | 'stepname': 'æµè¯å·¥åºäº', |
| | | 'enable': 'Y' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | item.isSelected1 = false |
| | |
| | | // }, 100) |
| | | } |
| | | }) |
| | | |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y') |
| | | |
| | | console.log(this.defaultroute_codeArr, 123) |
| | | }, |
| | | // å¯¹è¯æ¡å
³é |
| | | handleCloseRoute() { |
| | | this.dialogFormRoute.routeOperationArr = [] |
| | | this.defaultroute_codeArr = [] |
| | | }, |
| | | // åæ¶ |
| | | routeDialogVisibleCancel() { |
| | |
| | | }, |
| | | // ç¡®å® |
| | | async routeDialogVisibleConfirm() { |
| | | const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2) |
| | | if (this.defaultroute_code === '' && temp.length > 0) { |
| | | return this.$message.info('é»è®¤å·¥èºè·¯çº¿ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | |
| | | // æäº¤æ ¼å¼ |
| | | const data = [] |
| | | this.dialogFormRoute.routeOperationArr.forEach(item => { |
| | | if (item.isSelected2) { |
| | | data.push({ code: item.code, name: item.name }) |
| | | } |
| | | }) |
| | | const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, data) |
| | | |
| | | const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data) |
| | | if (res.code === '200') { |
| | | this.$message.success('ä¿åæåï¼') |
| | | await this.getInventoryFileSelect() |
| | |
| | | myCheckboxInputClick(val) { |
| | | console.log(val, 2) |
| | | val.isSelected2 = !val.isSelected2 |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | if (val.code === item.code) { |
| | | item.flag = !item.flag |
| | | } |
| | | }) |
| | | if (val.code === this.defaultroute_code) { |
| | | this.defaultroute_code = '' |
| | | } |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2) |
| | | }, |
| | | /* å使¨¡å*/ |
| | | // å使é®ç¹å»äºä»¶ |