From f35da7050efeaff1fd442c233008fdc00b10851f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 18 七月 2022 18:04:33 +0800
Subject: [PATCH] 1.优化项目修改bug2.实现缺陷前端页面
---
src/views/zlgl/zjbz.vue | 11
src/views/zzmx/chda.vue | 132 +-
src/views/zlgl/gxjy.vue | 497 ----------
src/api/zzmx.js | 4
src/views/scgl/gd.vue | 29
src/assets/images/error_icon.png | 0
src/assets/images/ws_icon.png | 0
src/views/zlgl/wljy.vue | 43
src/icons/svg/bbgl.svg | 2
src/store/modules/permission.js | 19
src/router/index.js | 31
src/views/zlgl/gxjyxm.vue | 497 ++++++++++
src/api/all.js | 25
src/assets/images/sbbbb_icon.png | 0
src/assets/images/succ.png | 0
src/views/jcsz/jsqd.vue | 399 +++++---
src/components/ImportPicker/index.vue | 438 +++++++++
src/views/bbgl/sczxbb.vue | 11
src/layout/components/Sidebar/index.vue | 17
src/views/zlgl/gxjybz.vue | 624 +++++++++++++
20 files changed, 2,007 insertions(+), 772 deletions(-)
diff --git a/src/api/all.js b/src/api/all.js
new file mode 100644
index 0000000..da1845a
--- /dev/null
+++ b/src/api/all.js
@@ -0,0 +1,25 @@
+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
+ })
+}
diff --git a/src/api/zzmx.js b/src/api/zzmx.js
index c0dadf1..b397af9 100644
--- a/src/api/zzmx.js
+++ b/src/api/zzmx.js
@@ -101,9 +101,9 @@
})
}
// 瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鎻愪氦
-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
})
diff --git a/src/assets/images/error_icon.png b/src/assets/images/error_icon.png
new file mode 100644
index 0000000..0f298a8
--- /dev/null
+++ b/src/assets/images/error_icon.png
Binary files differ
diff --git a/src/assets/images/sbbbb_icon.png b/src/assets/images/sbbbb_icon.png
new file mode 100644
index 0000000..0a65794
--- /dev/null
+++ b/src/assets/images/sbbbb_icon.png
Binary files differ
diff --git a/src/assets/images/succ.png b/src/assets/images/succ.png
new file mode 100644
index 0000000..3d8df6f
--- /dev/null
+++ b/src/assets/images/succ.png
Binary files differ
diff --git a/src/assets/images/ws_icon.png b/src/assets/images/ws_icon.png
new file mode 100644
index 0000000..14ed5e2
--- /dev/null
+++ b/src/assets/images/ws_icon.png
Binary files differ
diff --git a/src/components/ImportPicker/index.vue b/src/components/ImportPicker/index.vue
new file mode 100644
index 0000000..d4f3bb9
--- /dev/null
+++ b/src/components/ImportPicker/index.vue
@@ -0,0 +1,438 @@
+<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. 璇峰嬁璋冩暣瀵煎叆妯$増涓瓧娈电殑宸﹀彸椤哄簭鎴栨柊澧瀞heet椤�</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>
diff --git a/src/icons/svg/bbgl.svg b/src/icons/svg/bbgl.svg
new file mode 100644
index 0000000..e6d6009
--- /dev/null
+++ b/src/icons/svg/bbgl.svg
@@ -0,0 +1,2 @@
+<?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>
\ No newline at end of file
diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue
index 1f1202a..7f829fe 100644
--- a/src/layout/components/Sidebar/index.vue
+++ b/src/layout/components/Sidebar/index.vue
@@ -1,7 +1,7 @@
<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"
@@ -20,14 +20,14 @@
<!-- :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">鏂板嚡杩埗閫燰1.0.01</el-button>
-<!-- <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">鏂板嚡杩埗閫燰1.0.01</a></el-button>-->
+ <!-- <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">鏂板嚡杩埗閫燰1.0.01</a></el-button>-->
</div>
</div>
@@ -35,15 +35,15 @@
</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: []
@@ -59,7 +59,7 @@
},
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)// 灏嗙紪鐮佽鍒檆ode瀛樺埌cookie閲岄潰
@@ -89,6 +89,7 @@
.el-button--text:focus {
color: white;
+
}
#app .sidebar-container .el-submenu .el-menu-item {
diff --git a/src/router/index.js b/src/router/index.js
index 2ff74dc..af61a27 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -441,10 +441,41 @@
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',
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 809349b..216c241 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -16,16 +16,21 @@
* @param {*} menu
*/
export function getAsyncRoutes(routes, menu) {
+ // menu 涓璮lag "0" 琛ㄧず true "1"琛ㄧずfalse
const menuCode = []// 灏嗗悗绔痗ode鍙栧嚭瀛樻垚鏁扮粍褰㈠紡
const menuNameAndCode = []// 灏嗗悗绔痗ode涓巒ame鍙栧嚭瀛樻垚鏁扮粍褰㈠紡
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 })
+ }
+ })
+ }
}
})
diff --git a/src/views/bbgl/sczxbb.vue b/src/views/bbgl/sczxbb.vue
new file mode 100644
index 0000000..155552b
--- /dev/null
+++ b/src/views/bbgl/sczxbb.vue
@@ -0,0 +1,11 @@
+<template />
+
+<script>
+export default {
+ name: 'Sczxbb'
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 4a554be..bfb4baa 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -633,7 +633,9 @@
children: 'children',
label: 'name',
value: 'code'
- }
+ },
+ PCTrue: false, // 鏄惁灞曠ず
+ APPTrue: false// 鏄惁灞曠ず
}
},
created() {
@@ -973,125 +975,229 @@
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.绗竴绉嶆儏鍐礟C鍜孉PP閮戒竴娆¢兘娌¢�変腑鏃� PC鏈�変腑锛孉PP鏈�変腑
- if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'N') {
- pcIsSelected1 = true
- this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
- }
-
- // 2.绗簩绉嶆儏鍐礟C宸查�変腑锛孉PP鏈�変腑
- 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.绗笁绉嶆儏鍐礟C鏈�変腑锛孉PP宸查�変腑
- 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.绗洓绉嶆儏鍐礟C宸查�変腑锛孉PP宸查�変腑
- 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.绗竴绉嶆儏鍐礟C鍜孉PP閮戒竴娆¢兘娌¢�変腑鏃� PC鏈�変腑锛孉PP鏈�変腑
+ 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.绗簩绉嶆儏鍐礟C宸查�変腑锛孉PP鏈�変腑
+ 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.绗笁绉嶆儏鍐礟C鏈�変腑锛孉PP宸查�変腑
+ 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.绗洓绉嶆儏鍐礟C宸查�変腑锛孉PP宸查�変腑
+ 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)
@@ -1114,6 +1220,8 @@
if (this.$refs.rightAPPRef) {
this.$refs.rightAPPRef.setCheckedKeys([])
}
+ this.PCTrue = false
+ this.APPTrue = false
},
// 鏉冮檺瀵硅瘽妗嗗彇娑堜簨浠�
rightDialogVisibleCancel() {
@@ -1123,46 +1231,49 @@
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閲屾湁鍊紁ush杩涘幓浜�
- 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閲屾湁鍊紁ush杩涘幓浜�
+ 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閲屾湁鍊紁ush杩涘幓浜�
- 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閲屾湁鍊紁ush杩涘幓浜�
+ 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 = []
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 946845a..4d3cdaf 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -349,9 +349,9 @@
>
<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>
@@ -556,14 +556,12 @@
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'
@@ -788,9 +786,20 @@
// 浜у搧淇℃伅鍊兼敼鍙�
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 = ''
},
// 宸ヨ壓璺嚎鍊兼敼鍙�
@@ -834,8 +843,6 @@
this.dialogForm.partname = row.partname
this.dialogForm.mesqty = row.plan_qty
this.dialogForm.partspec = row.partspec
- // this.dialogForm.routecode = row.route_code// 宸ヨ壓璺嚎浠g爜
- // this.dialogForm.wkshopcode = row.wkshp_code// 鐢熶骇杞﹂棿浠g爜
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())
diff --git a/src/views/zlgl/gxjy.vue b/src/views/zlgl/gxjy.vue
index 52716fe..e69de29 100644
--- a/src/views/zlgl/gxjy.vue
+++ b/src/views/zlgl/gxjy.vue
@@ -1,497 +0,0 @@
-<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: '', // 椤圭洰浠g爜
- 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>
diff --git a/src/views/zlgl/gxjybz.vue b/src/views/zlgl/gxjybz.vue
new file mode 100644
index 0000000..a8acd3b
--- /dev/null
+++ b/src/views/zlgl/gxjybz.vue
@@ -0,0 +1,624 @@
+<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="鏍囧噯浠g爜" 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="鏍囧噯浠g爜"
+ 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: '', // 鏍囧噯浠g爜
+ 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>
diff --git a/src/views/zlgl/gxjyxm.vue b/src/views/zlgl/gxjyxm.vue
new file mode 100644
index 0000000..c7bf002
--- /dev/null
+++ b/src/views/zlgl/gxjyxm.vue
@@ -0,0 +1,497 @@
+<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: '', // 椤圭洰浠g爜
+ 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>
diff --git a/src/views/zlgl/wljy.vue b/src/views/zlgl/wljy.vue
index 0361a54..21dc8c2 100644
--- a/src/views/zlgl/wljy.vue
+++ b/src/views/zlgl/wljy.vue
@@ -1,11 +1,38 @@
-<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>-->
diff --git a/src/views/zlgl/zjbz.vue b/src/views/zlgl/zjbz.vue
index 78673d9..e69de29 100644
--- a/src/views/zlgl/zjbz.vue
+++ b/src/views/zlgl/zjbz.vue
@@ -1,11 +0,0 @@
-<template />
-
-<script>
-export default {
- name: 'Zjbz'
-}
-</script>
-
-<style scoped>
-
-</style>
diff --git a/src/views/zzmx/chda.vue b/src/views/zzmx/chda.vue
index 51ff850..8a2f8b8 100644
--- a/src/views/zzmx/chda.vue
+++ b/src/views/zzmx/chda.vue
@@ -472,6 +472,26 @@
<!-- 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;" /> 宸ュ簭鍒楄〃
@@ -480,7 +500,7 @@
<el-table
:data="projectTableData"
border
- height="400"
+ height="300"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -516,6 +536,7 @@
</div>
</span>
</el-dialog>
+
</div>
</template>
@@ -646,6 +667,8 @@
routeOperationArr: [] // 宸ヨ壓璺嚎闆嗗悎
// routeOperationSelectedArr: [] // 宸ヨ壓璺嚎閫変腑闆嗗悎鏁扮粍
},
+ defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
+ defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
projectTableData: []// 璁惧鍒楄〃
}
},
@@ -822,94 +845,13 @@
// 宸ヨ壓璺嚎鐐瑰嚮
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
@@ -937,10 +879,15 @@
// }, 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() {
@@ -948,13 +895,20 @@
},
// 纭畾
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()
@@ -974,6 +928,16 @@
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)
},
/* 鍗曚綅妯″潡*/
// 鍗曚綅鎸夐挳鐐瑰嚮浜嬩欢
--
Gitblit v1.9.3