| | |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // çäº§å¼æ¥å·¥,å·¥åºæ£éªæäº¤ä¿å |
| | | export function SaveMesOrderStepCheckItem(data) { |
| | | return request({ |
| | |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // å·¥åºæ£éªè®°å½å表æ¥è¯¢ |
| | | export function StepCheckTableSubSearch(data) { |
| | | return request({ |
| | |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // å·¥åºæ£éªè®°å½å¯¼åº |
| | | export function StepCheckTableOutExcel(data) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | // è´¨æ£æ¹æ¡å表æ¥è¯¢ |
| | | export function QualityInspectionSearch(data) { |
| | | return request({ |
| | | url: 'QualityManagement/QualityInspectionSearch', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // è´¨æ£æ¹æ¡æ¥çç¼è¾ |
| | | export function QualityInspectionSeeEdit(data) { |
| | | return request({ |
| | | url: 'QualityManagement/QualityInspectionSeeEdit', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // è´¨æ£æ¹æ¡æ°å¢/ç¼è¾æäº¤ |
| | | export function QualityInspectionAddEditSave(data) { |
| | | return request({ |
| | | url: 'QualityManagement/QualityInspectionAddEditSave', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // è´¨æ£æ¹æ¡å é¤ |
| | | export function QualityInspectionDelete(data) { |
| | | return request({ |
| | | url: 'QualityManagement/QualityInspectionDelete', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="dndList"> |
| | | <div :style="{width:'100%'}" class="dndList-list"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-checkbox v-model="checkedAll" @change="checkedAllChange">åå±ç¤º</el-checkbox> |
| | | <div style="cursor: pointer" :style="{color:$store.state.settings.theme}" @click="resetColumn">éç½®</div> |
| | | </div> |
| | | <el-checkbox-group v-model="checkedList" @change="checkedListChange"> |
| | | <draggable :set-data="setData" :list="list1" class="dragArea" animation="300" @end="draggableEnded"> |
| | | <div v-for="item in list1" :key="item.id" class="list-complete-item"> |
| | | <div style="display: flex"> |
| | | <div style="width: 20px;height: 20px;margin-right: 4px;cursor:move;"><i |
| | | style="font-weight: bolder" |
| | | class="el-icon-rank" |
| | | /></div> |
| | | <el-checkbox :label="item.label" class="list-complete-item-handle" /> |
| | | </div> |
| | | <div> |
| | | <el-tooltip class="item" effect="dark" content="åºå®å°å·¦ä¾§" placement="bottom"> |
| | | <i |
| | | style="transform:rotate(90deg);cursor:pointer;font-weight: bolder" |
| | | class="el-icon-download" |
| | | :style="{color:item.fixed==='left'?$store.state.settings.theme:''}" |
| | | @click="fixedToLeft(item.label)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-divider direction="vertical" /> |
| | | <el-tooltip class="item" effect="dark" content="åºå®å°å³ä¾§" placement="bottom"> |
| | | <i |
| | | style="transform:rotate(-90deg);cursor:pointer;font-weight: bolder" |
| | | class="el-icon-download" |
| | | :style="{color:item.fixed==='right'?$store.state.settings.theme:''}" |
| | | @click="fixedToRight(item.label)" |
| | | /> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | </draggable> |
| | | </el-checkbox-group> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import draggable from 'vuedraggable' |
| | | |
| | | export default { |
| | | name: 'DndList', |
| | | components: { draggable }, |
| | | props: { |
| | | list1: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | } |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | checkedList: this.list1.map(i => i.show ? i.label : '').filter(i => i !== ''), // åå±ç¤ºå¼ |
| | | checkedListDefaultLabel: this.list1.map(i => i.show ? i.label : '').filter(i => i !== ''), // éç½®é»è®¤å¼label |
| | | checkedListDefaultFixed: this.list1.map(i => i.fixed), // éç½®é»è®¤å¼fixed |
| | | checkedAll: true |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | setData(dataTransfer) { |
| | | // to avoid Firefox bug |
| | | // Detail see : https://github.com/RubaXa/Sortable/issues/1012 |
| | | dataTransfer.setData('Text', '') |
| | | }, |
| | | // éç½® |
| | | resetColumn() { |
| | | this.checkedList = this.checkedListDefaultLabel |
| | | this.list1.sort((a, b) => a.id - b.id)// æåº |
| | | this.list1.forEach((i, j) => { |
| | | i.show = !!this.checkedListDefaultLabel.includes(i.label) |
| | | }) |
| | | this.checkedListDefaultFixed.forEach((i, j) => { |
| | | this.list1[j].fixed = i |
| | | }) |
| | | this.$emit('tableColumnUpdate', this.checkedListDefaultLabel) |
| | | }, |
| | | // åå±ç¤º |
| | | checkedAllChange() { |
| | | this.list1.forEach(i => { |
| | | if (this.checkedAll) { |
| | | i.show = true |
| | | this.checkedList = this.list1.map(j => j.label) |
| | | } else { |
| | | i.show = false |
| | | this.checkedList = [] |
| | | } |
| | | }) |
| | | this.$emit('tableColumnUpdate', this.checkedList) |
| | | }, |
| | | // åºå®å°å·¦ä¾§ |
| | | fixedToLeft(val) { |
| | | if (this.list1.find(i => i.label === val).show) { |
| | | this.list1.find(i => i.label === val).fixed = this.list1.find(i => i.label === val).fixed !== 'left' ? 'left' : false |
| | | } |
| | | this.$emit('tableColumnUpdate', this.checkedList) |
| | | }, |
| | | // åºå®å°å³ä¾§ |
| | | fixedToRight(val) { |
| | | if (this.list1.find(i => i.label === val).show) { |
| | | this.list1.find(i => i.label === val).fixed = this.list1.find(i => i.label === val).fixed !== 'right' ? 'right' : false |
| | | } |
| | | this.$emit('tableColumnUpdate', this.checkedList) |
| | | }, |
| | | // æå¨ç»æäºä»¶ |
| | | draggableEnded({ to, from, item, clone, oldIndex, newIndex }) { |
| | | // console.log(to, from, item, clone, oldIndex, newIndex) |
| | | this.$emit('tableColumnUpdate', this.list1, true)// ä¼ ç»ç·ç· isCopyTrue:å¤å¼ç»ç·ç· |
| | | }, |
| | | // å¤éæ¡å¼æ¹åäºä»¶ |
| | | checkedListChange(val) { |
| | | this.checkedAll = val.length !== 0 |
| | | this.list1.forEach((i, j) => { |
| | | i.show = !!val.includes(i.label) |
| | | }) |
| | | this.$emit('tableColumnUpdate', val) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dndList { |
| | | background: #fff; |
| | | //padding-bottom: 40px; |
| | | |
| | | &:after { |
| | | content: ""; |
| | | display: table; |
| | | clear: both; |
| | | } |
| | | |
| | | .dndList-list { |
| | | float: left; |
| | | //padding-bottom: 30px; |
| | | |
| | | &:first-of-type { |
| | | margin-right: 2%; |
| | | } |
| | | |
| | | .dragArea { |
| | | margin-top: 15px; |
| | | min-height: 50px; |
| | | //padding-bottom: 30px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .list-complete-item { |
| | | cursor: pointer; |
| | | position: relative; |
| | | font-size: 14px; |
| | | padding: 5px 5px; |
| | | margin-top: 4px; |
| | | //border: 1px solid #bfcbd9; |
| | | transition: all 1s; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .list-complete-item-handle { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | margin-right: 50px; |
| | | } |
| | | |
| | | .list-complete-item.sortable-chosen { |
| | | background: #b0e2f6; |
| | | } |
| | | |
| | | .list-complete-item.sortable-ghost { |
| | | background: #e6f7ff; |
| | | } |
| | | |
| | | .list-complete-enter, |
| | | .list-complete-leave-active { |
| | | opacity: 0; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-popover |
| | | placement="bottom-end" |
| | | width="265" |
| | | trigger="click" |
| | | > |
| | | <!-- <dnd-list :list1="list1" v-bind="$attrs" v-on="$listeners" />--> |
| | | <dnd-list v-bind="$attrs" v-on="$listeners" /> |
| | | <el-button |
| | | slot="reference" |
| | | style="cursor: pointer;position: absolute;padding:0;top:11px;right: 60px;z-index: 99;" |
| | | > |
| | | <el-tooltip class="item" effect="dark" content="å设置" placement="top"> |
| | | <i class="el-icon-s-tools" /> |
| | | </el-tooltip> |
| | | </el-button> |
| | | </el-popover> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import DndList from '@/components/DndList' |
| | | |
| | | export default { |
| | | name: 'Index', |
| | | components: { DndList } |
| | | // props: { |
| | | // list1: { |
| | | // type: Array, |
| | | // default() { |
| | | // return [] |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | bind(el, binding, vnode) { |
| | | const dialogHeaderEl = el.querySelector('.el-dialog__header') |
| | | const dragDom = el.querySelector('.el-dialog') |
| | | dialogHeaderEl.style.cssText += ';cursor:move;' |
| | | dragDom.style.cssText += ';top:0px;' |
| | | |
| | | // è·ååæå±æ§ ie domå
ç´ .currentStyle ç«çè°·æ window.getComputedStyle(domå
ç´ , null); |
| | | const getStyle = (function() { |
| | | if (window.document.currentStyle) { |
| | | return (dom, attr) => dom.currentStyle[attr] |
| | | } else { |
| | | return (dom, attr) => getComputedStyle(dom, false)[attr] |
| | | } |
| | | })() |
| | | |
| | | dialogHeaderEl.onmousedown = (e) => { |
| | | // é¼ æ æä¸ï¼è®¡ç®å½åå
ç´ è·ç¦»å¯è§åºçè·ç¦» |
| | | const disX = e.clientX - dialogHeaderEl.offsetLeft |
| | | const disY = e.clientY - dialogHeaderEl.offsetTop |
| | | |
| | | const dragDomWidth = dragDom.offsetWidth |
| | | const dragDomHeight = dragDom.offsetHeight |
| | | |
| | | const screenWidth = document.body.clientWidth |
| | | const screenHeight = document.body.clientHeight |
| | | |
| | | const minDragDomLeft = dragDom.offsetLeft |
| | | const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth |
| | | |
| | | const minDragDomTop = dragDom.offsetTop |
| | | const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight |
| | | |
| | | // è·åå°çå¼å¸¦px æ£åå¹é
æ¿æ¢ |
| | | let styL = getStyle(dragDom, 'left') |
| | | let styT = getStyle(dragDom, 'top') |
| | | |
| | | if (styL.includes('%')) { |
| | | styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100) |
| | | styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100) |
| | | } else { |
| | | styL = +styL.replace(/\px/g, '') |
| | | styT = +styT.replace(/\px/g, '') |
| | | } |
| | | |
| | | document.onmousemove = function(e) { |
| | | // éè¿äºä»¶å§æï¼è®¡ç®ç§»å¨çè·ç¦» |
| | | let left = e.clientX - disX |
| | | let top = e.clientY - disY |
| | | |
| | | // è¾¹çå¤ç |
| | | if (-(left) > minDragDomLeft) { |
| | | left = -minDragDomLeft |
| | | } else if (left > maxDragDomLeft) { |
| | | left = maxDragDomLeft |
| | | } |
| | | |
| | | if (-(top) > minDragDomTop) { |
| | | top = -minDragDomTop |
| | | } else if (top > maxDragDomTop) { |
| | | top = maxDragDomTop |
| | | } |
| | | |
| | | // ç§»å¨å½åå
ç´ |
| | | dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;` |
| | | |
| | | // emit onDrag event |
| | | vnode.child.$emit('dragDialog') |
| | | } |
| | | |
| | | document.onmouseup = function(e) { |
| | | document.onmousemove = null |
| | | document.onmouseup = null |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import drag from './drag' |
| | | |
| | | const install = function(Vue) { |
| | | Vue.directive('el-drag-dialog', drag) |
| | | } |
| | | |
| | | if (window.Vue) { |
| | | window['el-drag-dialog'] = drag |
| | | Vue.use(install); // eslint-disable-line |
| | | } |
| | | |
| | | drag.install = install |
| | | export default drag |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import waves from './waves' |
| | | |
| | | const install = function(Vue) { |
| | | Vue.directive('waves', waves) |
| | | } |
| | | |
| | | if (window.Vue) { |
| | | window.waves = waves |
| | | Vue.use(install); // eslint-disable-line |
| | | } |
| | | |
| | | waves.install = install |
| | | export default waves |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .waves-ripple { |
| | | position: absolute; |
| | | border-radius: 100%; |
| | | background-color: rgba(0, 0, 0, 0.15); |
| | | background-clip: padding-box; |
| | | pointer-events: none; |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | -webkit-transform: scale(0); |
| | | -ms-transform: scale(0); |
| | | transform: scale(0); |
| | | opacity: 1; |
| | | } |
| | | |
| | | .waves-ripple.z-active { |
| | | opacity: 0; |
| | | -webkit-transform: scale(2); |
| | | -ms-transform: scale(2); |
| | | transform: scale(2); |
| | | -webkit-transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out; |
| | | transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out; |
| | | transition: opacity 1.2s ease-out, transform 0.6s ease-out; |
| | | transition: opacity 1.2s ease-out, transform 0.6s ease-out, -webkit-transform 0.6s ease-out; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import './waves.css' |
| | | |
| | | const context = '@@wavesContext' |
| | | |
| | | function handleClick(el, binding) { |
| | | function handle(e) { |
| | | const customOpts = Object.assign({}, binding.value) |
| | | const opts = Object.assign({ |
| | | ele: el, // 波纹ä½ç¨å
ç´ |
| | | type: 'hit', // hit ç¹å»ä½ç½®æ©æ£ centerä¸å¿ç¹æ©å± |
| | | color: 'rgba(0, 0, 0, 0.15)' // 波纹é¢è² |
| | | }, |
| | | customOpts |
| | | ) |
| | | const target = opts.ele |
| | | if (target) { |
| | | target.style.position = 'relative' |
| | | target.style.overflow = 'hidden' |
| | | const rect = target.getBoundingClientRect() |
| | | let ripple = target.querySelector('.waves-ripple') |
| | | if (!ripple) { |
| | | ripple = document.createElement('span') |
| | | ripple.className = 'waves-ripple' |
| | | ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px' |
| | | target.appendChild(ripple) |
| | | } else { |
| | | ripple.className = 'waves-ripple' |
| | | } |
| | | switch (opts.type) { |
| | | case 'center': |
| | | ripple.style.top = rect.height / 2 - ripple.offsetHeight / 2 + 'px' |
| | | ripple.style.left = rect.width / 2 - ripple.offsetWidth / 2 + 'px' |
| | | break |
| | | default: |
| | | ripple.style.top = |
| | | (e.pageY - rect.top - ripple.offsetHeight / 2 - document.documentElement.scrollTop || |
| | | document.body.scrollTop) + 'px' |
| | | ripple.style.left = |
| | | (e.pageX - rect.left - ripple.offsetWidth / 2 - document.documentElement.scrollLeft || |
| | | document.body.scrollLeft) + 'px' |
| | | } |
| | | ripple.style.backgroundColor = opts.color |
| | | ripple.className = 'waves-ripple z-active' |
| | | return false |
| | | } |
| | | } |
| | | |
| | | if (!el[context]) { |
| | | el[context] = { |
| | | removeHandle: handle |
| | | } |
| | | } else { |
| | | el[context].removeHandle = handle |
| | | } |
| | | |
| | | return handle |
| | | } |
| | | |
| | | export default { |
| | | bind(el, binding) { |
| | | el.addEventListener('click', handleClick(el, binding), false) |
| | | }, |
| | | update(el, binding) { |
| | | el.removeEventListener('click', el[context].removeHandle, false) |
| | | el.addEventListener('click', handleClick(el, binding), false) |
| | | }, |
| | | unbind(el) { |
| | | el.removeEventListener('click', el[context].removeHandle, false) |
| | | el[context] = null |
| | | delete el[context] |
| | | } |
| | | } |
| | |
| | | </el-scrollbar> |
| | | <div style="position: absolute;bottom: 20px;left: 30px;"> |
| | | <div> |
| | | <el-button v-if="$store.state.app.sidebar.opened" type="text" style="font-size: 14px;cursor: pointer">æ°å¯è¿ªå¶é V1.0.01</el-button> |
| | | <el-button v-if="$store.state.app.sidebar.opened" type="text" style="font-size: 14px;cursor: pointer">æ°å¯è¿ªå¶é V1.5.21</el-button> |
| | | <!-- <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">æ°å¯è¿ªå¶é V1.0.01</a></el-button>--> |
| | | </div> |
| | | </div> |
| | |
| | | code: '1087', |
| | | component: () => import('@/views/zlgl/gxjyjl'), |
| | | meta: { code: '1087', title: 'å·¥åºæ£éªè®°å½', icon: '', keepAlive: true } |
| | | }, { |
| | | path: 'zjfa', |
| | | name: 'ZJFACancel', |
| | | code: '1088', |
| | | component: () => import('@/views/zlgl/zjfa'), |
| | | meta: { code: '1088', title: 'è´¨æ£æ¹æ¡', icon: '', keepAlive: true } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-if="row.isVisible===1" v-model="row.roletype_code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="请è¾å
¥" /> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.roletype_code" |
| | | oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <div v-else> {{ row.roletype_code }}</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | this.PCTrue = res.data[0][0].is_delete === '0' |
| | | this.APPTrue = res.data[1][0].children.filter(item => item.is_delete === '0').length === 0 ? false : res.data[1][0].is_delete === '0' |
| | | |
| | | console.log(this.APPTrue, 1) |
| | | // '0'æ¾ç¤º '1' 䏿¾ç¤º è¿æ»¤åºç¸å¯¹åºçèå |
| | | if (this.PCTrue) { |
| | | this.dialogFormRight.rightPCArr[0].children = this.dialogFormRight.rightPCArr[0].children.filter(item => item.is_delete === '0') |
| | |
| | | pcIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | if ($('input[name=\'PC\']').length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'PC\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='APP']").length > 0) { |
| | | if ($('input[name=\'APP\']').length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'APP\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | 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)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'PC\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'APP\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | |
| | | pcIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='PC']").length > 0) { |
| | | if ($('input[name=\'PC\']').length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'PC\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($("input[name='APP']").length > 0) { |
| | | if ($('input[name=\'APP\']').length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | | clearInterval(interval) |
| | | this.$nextTick(() => { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'APP\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | | } |
| | | }, 100) |
| | |
| | | |
| | | this.$nextTick(() => { |
| | | if (item.name === 'PC') { |
| | | $("input[name='PC']").eq(0).prop('checked', false)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'PC\']').eq(0).prop('checked', false)// èªå®ä¹å鿡忾 |
| | | } |
| | | if (item.name === 'APP') { |
| | | $("input[name='APP']").eq(0).prop('checked', false)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'APP\']').eq(0).prop('checked', false)// èªå®ä¹å鿡忾 |
| | | } |
| | | // $("input[name='APP']").eq(0).prop('checked', false)// èªå®ä¹å鿡忾 |
| | | // $('input:checkbox').eq(index).prop('checked', false)// èªå®ä¹å鿡忾 |
| | |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | if (item.name === 'PC') { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'PC\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | } |
| | | if (item.name === 'APP') { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'APP\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | } |
| | | // $('input:checkbox').eq(index).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | if (item.name === 'PC') { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'PC\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | } |
| | | if (item.name === 'APP') { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | $('input[name=\'APP\']').eq(0).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | } |
| | | // $('input:checkbox').eq(index).prop('checked', true)// èªå®ä¹å鿡忾 |
| | | }) |
| | |
| | | <!--å
Œ
±é¡µé¢æ ·å¼--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--text{ |
| | | font-size: 14px ; |
| | | cursor: pointer ; |
| | | ::v-deep .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-share, .el-icon-delete, .el-icon-edit-outline { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | .osloading{ |
| | | .osloading { |
| | | font-size: 26px !important; |
| | | } |
| | | |
| | | .el-loading-text{ |
| | | .el-loading-text { |
| | | font-size: 26px !important; |
| | | } |
| | | |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="å·²æ¥å·¥æ°é" |
| | | label="åæ ¼æ°é" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="å·²æ¥å·¥æ°é" |
| | | label="åæ ¼æ°é" |
| | | sortable="custom" |
| | | min-width="160" |
| | | /> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="æ¥å·¥æ°éï¼" prop="startqty"> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="åæ ¼æ°éï¼" prop="startqty"> |
| | | <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | <!-- <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />--> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="任塿°éï¼"> |
| | | <div style="width: 200px">{{ badDialogForm.plan_qty }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥å·¥æ°éï¼"> |
| | | <el-form-item label="åæ ¼æ°éï¼"> |
| | | <div style="width: 200px">{{ badDialogForm.good_qty }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸è¯æ°éï¼"> |
| | |
| | | width="80" |
| | | /> |
| | | <el-table-column |
| | | label="æ¥å·¥æ°é" |
| | | label="åæ ¼æ°é" |
| | | width="80" |
| | | prop="report_qty" |
| | | /> |
| | |
| | | taskqty: this.dialogForm.planqty, // 任塿°é |
| | | // startqty: this.dialogForm.startqty, // å¼å·¥æ°é |
| | | startqty: this.dialogForm.reportqty, // å¼å·¥æ°é |
| | | // reportqty: this.dialogForm.reportqty, // æ¥å·¥æ°é |
| | | reportqty: this.dialogForm.startqty, // æ¥å·¥æ°é |
| | | // reportqty: this.dialogForm.reportqty, // åæ ¼æ°é |
| | | reportqty: this.dialogForm.startqty, // åæ ¼æ°é |
| | | remarks: this.dialogForm.remarks, // 夿³¨ |
| | | ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // ä¸è¯æ°é |
| | | badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// ä¸è¯åå |
| | |
| | | this.badDialogForm.nextstepcode = res.data1.nextstepcode |
| | | this.badDialogForm.nextstepname = res.data1.nextstepname |
| | | this.badDialogForm.plan_qty = res.data1.planqty |
| | | this.badDialogForm.good_qty = res.data1.noreportqty // æ¥å·¥æ°é |
| | | this.badDialogForm.good_qty = res.data1.noreportqty // åæ ¼æ°é |
| | | this.badDialogForm.ng_qty = res.data1.noputqty // ä¸è¯æ°é |
| | | |
| | | this.badTableDataDialog = res.data2 |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div style="padding-top: 10px;display: flex;flex-direction: column"> |
| | | <div style="margin-bottom: 15px;font-size: 14px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />æ«ç ä¿¡æ¯ |
| | | </div> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 90px;display: flex"> |
| | | <div style="color: red;width:10px">*</div> |
| | | æ«ææ¡ç ï¼ |
| | | </div> |
| | | <el-input |
| | | v-model="form.orderstepqrcode" |
| | | name="GXproduceCode" |
| | | style="width: 300px" |
| | | @keyup.enter.native="val=>enterNative(val,'GXproduceCode')" |
| | | /> |
| | | <!-- @keyup.native="e=>judgeIsScanning(e,'GXproduceCode')"--> |
| | | <div class="body" :style="{height:mainHeight+'px'}" style="background-color: #eaecef"> |
| | | |
| | | <div |
| | | style="background-color: #f8f8fa;margin: 10px 0; |
| | | overflow-y:auto;overflow-x: hidden; |
| | | display: flex;flex-direction: column" |
| | | :style="{height:mainHeight+'px'}" |
| | | > |
| | | <div class="content1"> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="font-size: 14px" :style="{color:$store.state.settings.theme}" /> |
| | | </div> |
| | | <div class="title"> |
| | | æ«æä¿¡æ¯ |
| | | </div> |
| | | </div> |
| | | <!-- å
é¡¹ä¿¡æ¯ --> |
| | | <div v-if="!isIpad" style="background:#f8f8fa ;display:flex;margin-top: 10px;align-items: center; line-height: 50px"> |
| | | <div style="display: flex; margin-left: 10px"> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">å·¥åç¼ç ï¼</div> |
| | | <div style="width: 150px">{{ form.wo_code }}</div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div style="width: 90px">产åç¼ç ï¼</div> |
| | | <div style="width: 150px">{{ form.partcode }}</div> |
| | | </div> |
| | | |
| | | <div class="content2"> |
| | | <el-form :inline="true" label-width="80px"> |
| | | <el-form-item label="æ£éªç±»å"> |
| | | <el-select |
| | | v-model="form.checktype" |
| | | style="width: 160px;" |
| | | placeholder="è¯·éæ©" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in checktypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ«ç æ¡ç "> |
| | | <el-input |
| | | v-model="form.orderstepqrcode" |
| | | name="GXproduceCode" |
| | | style="width: 250px" |
| | | placeholder="请æ«ç å·¥åå·¥åºç " |
| | | @keyup.enter.native="enterNative" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="content1"> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="font-size: 14px" :style="{color:$store.state.settings.theme}" /> |
| | | </div> |
| | | <div style="display: flex;margin-left: 30px;"> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">产ååç§°ï¼</div> |
| | | <div style="width: 150px">{{ form.partname }}</div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div style="width: 90px">产åè§æ ¼ï¼</div> |
| | | <div style="width: 150px">{{ form.partspec }}</div> |
| | | </div> |
| | | <div class="title"> |
| | | å·¥åä¿¡æ¯ |
| | | </div> |
| | | <div style=" display: flex;margin-left: 30px;"> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">å·¥åºç¼ç ï¼</div> |
| | | <div style="width: 150px">{{ form.stepcode }}</div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div style="width: 90px">å·¥åºåç§°ï¼</div> |
| | | <div style="width: 150px">{{ form.stepname }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="content2" style="width: 60%;margin-left: 30px;"> |
| | | <div class="orderMsg">åæ®ç¼å·ï¼{{ form.wocode }}</div> |
| | | <div class="orderMsg">ç©æç¼ç ï¼{{ form.partcode }}</div> |
| | | <div class="orderMsg">ç©æåç§°ï¼{{ form.partname }}</div> |
| | | </div> |
| | | <div class="content2" style="width: 60%;margin-left: 30px;"> |
| | | <div class="orderMsg">ç©æè§æ ¼ï¼{{ form.partspec }}</div> |
| | | <div class="orderMsg">å·¥åºç¼ç ï¼{{ form.stepcode }}</div> |
| | | <div class="orderMsg">å·¥åºåç§°ï¼{{ form.stepname }}</div> |
| | | </div> |
| | | |
| | | <div class="content1"> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="font-size: 14px" :style="{color:$store.state.settings.theme}" /> |
| | | </div> |
| | | <div class="title"> |
| | | è´¨æ£æ¹æ¡ |
| | | </div> |
| | | </div> |
| | | <div class="content2" style="width: 60%;margin-left: 30px;"> |
| | | <div class="orderMsg">æ¹æ¡åç§°ï¼{{ form.checkstandname }}</div> |
| | | <div class="orderMsg">æ½æ ·æ¹å¼ï¼{{ |
| | | form.sampmethod === 'FIXED' ? 'åºæ¶æ½æ£' : form.sampmethod === 'SCARE' ? 'æ¯ä¾æ½æ£' : '' |
| | | }} |
| | | </div> |
| | | </div> |
| | | <div class="content2" style="width: 60%;margin-left: 30px;"> |
| | | <div class="orderMsg">æ¥å·¥æ°éï¼{{ form.good_qty }}</div> |
| | | <div class="orderMsg">æ ·æ¬æ°éï¼ |
| | | <el-input-number |
| | | v-if="form.good_qty" |
| | | v-model="form.sampscare" |
| | | :max="form.good_qty" |
| | | :min="1" |
| | | size="medium" |
| | | @change="numberChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="checkItemArr.length>0" |
| | | class="content1" |
| | | > |
| | | <div> |
| | | <i class="el-icon-s-operation" style="font-size: 14px" :style="{color:$store.state.settings.theme}" /> |
| | | </div> |
| | | <div class="title"> |
| | | æ£éªé¡¹ç® |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-if="isIpad" |
| | | style="display:flex;margin-top: 10px;align-items: center;line-height: 30px; flex-direction: column" |
| | | v-if="form.sampscare!==1&&checkItemArr.length>0" |
| | | class="content2" |
| | | style="width: 60%;" |
| | | > |
| | | <div style="display: flex; justify-content: flex-start;width: 100%"> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">å·¥åç¼ç ï¼</div> |
| | | <div style="width: 200px">{{ form.wo_code }}</div> |
| | | </div> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">产åç¼ç ï¼</div> |
| | | <div style="width: 200px">{{ form.partcode }}</div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div style="width: 90px">产ååç§°ï¼</div> |
| | | <div style="width: 200px">{{ form.partname }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style=" display: flex; justify-content: flex-start;margin-top: 10px;width: 100%"> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">产åè§æ ¼ï¼</div> |
| | | <div style="width: 200px">{{ form.partspec }}</div> |
| | | </div> |
| | | <div style="display: flex;margin-right: 50px"> |
| | | <div style="width: 90px">å·¥åºç¼ç ï¼</div> |
| | | <div style="width: 200px">{{ form.stepcode }}</div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div style="width: 90px">å·¥åºåç§°ï¼</div> |
| | | <div style="width: 200px">{{ form.stepname }}</div> |
| | | </div> |
| | | </div> |
| | | <el-link :underline="false" :disabled="!(stepActive>0)" style="width: 60px;margin-top: 5px" @click="pre">ä¸ä¸ä»¶ |
| | | </el-link> |
| | | <el-steps :active="stepActive" style="width: 70%;margin:0 10px;" finish-status="success"> |
| | | <el-step v-for="item in form.sampscare" :key="item" title="" /> |
| | | </el-steps> |
| | | <el-link |
| | | :underline="false" |
| | | :disabled="!(stepActive < form.sampscare-1)" |
| | | style="width: 60px;margin-top: 5px" |
| | | @click="next" |
| | | >ä¸ä¸ä»¶ |
| | | </el-link> |
| | | </div> |
| | | |
| | | <div style="margin: 15px 0;font-size: 14px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />æ£éªæ åä¿¡æ¯ |
| | | </div> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 90px;display: flex"> |
| | | <div style="color: red;width:10px">*</div> |
| | | æ£éªæ åï¼ |
| | | </div> |
| | | <el-select |
| | | v-model="checkStandard" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | filterable |
| | | @change="changeCheckStandard" |
| | | <div |
| | | class="content2" |
| | | style="flex-direction: column;justify-content:flex-start;width: 480px;margin-top: 10px;" |
| | | > |
| | | |
| | | <div |
| | | v-for="(item,index) in checkItemArr" |
| | | v-if="stepActive+1===item.checkNumber" |
| | | :key="item.code+(stepActive+1).toString()" |
| | | :style="{borderBottom:(index+1)%checkItemArr.map(i=>i.checkNumber===1).filter(i=>i).length!==0?`1px solid rgba(48,49,51,0.2)`:''}" |
| | | class="checkItem" |
| | | > |
| | | <el-option |
| | | v-for="item in checkStandardSelect" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | <div style="width: 90px;margin-left: 50px;display: flex"> |
| | | <div style="color: red;width:10px">*</div> |
| | | æ£éªäººåï¼ |
| | | </div> |
| | | <el-select |
| | | v-model="checkUser" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in checkUserSelect" |
| | | :key="item.usercode" |
| | | :label="item.username" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | <div style="width: 90px;margin-left: 50px;display: flex"> |
| | | <div style="color: red;width:10px">*</div> |
| | | æ£éªæ°éï¼ |
| | | </div> |
| | | <el-input v-model="checkqty" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" /> |
| | | </div> |
| | | |
| | | <!-- æ£éªç»æ å æ£éªå¤æ³¨ --> |
| | | <div style="display: flex;margin-top: 20px;align-items: center"> |
| | | <div style="display: flex;justify-content: space-between;align-items: center"> |
| | | <div style="display: flex;width: 300px;"> |
| | | <div class="serialNumber">{{ item.stepcheckitem_seq }}</div> |
| | | <div style="display: flex;align-items: center">{{ item.name }}</div> |
| | | </div> |
| | | |
| | | <div style="display: flex;margin-right: 50px;align-items: center"> |
| | | <div style="width: 90px;display: flex"> |
| | | <div style="color: red;width:10px">*</div> |
| | | æ£éªç»æï¼ |
| | | <div v-show="item.numberjudge==='N'" style="width: 150px;display: flex;padding-left: 20px"> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | :plain="!item.check_result" |
| | | @click="checkResultClick('OK',item)" |
| | | >åæ ¼ |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | size="mini" |
| | | :plain="item.check_result" |
| | | @click="checkResultClick('NG',item)" |
| | | >ä¸åæ ¼ |
| | | </el-button> |
| | | </div> |
| | | <div v-show="item.numberjudge!=='N'" style="width: 150px;" /> |
| | | </div> |
| | | <el-select |
| | | v-model="checkResult" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in checkResultSelect" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 90px">æ£éªå¤æ³¨ï¼</div> |
| | | <el-input v-model="checkdescr" style="width: 540px" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div style="margin: 15px 0;font-size: 14px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />æ£éªé¡¹ä¿¡æ¯ |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="add">æ°å¢</el-button> |
| | | </div> |
| | | <div style="margin-top: 10px"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="JYTableData" |
| | | :height="tableHeight+'px'" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @selection-change="handleSelectionChange" |
| | | @cell-dblclick="cellDblclick" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | width="100" |
| | | fixed |
| | | /> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- prop="code"--> |
| | | <!-- label="æ£éªé¡¹ç®ç¼ç (åç§°)"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.isVisible===0" style="display: flex;">--> |
| | | <!-- <div>{{ row.code }}</div>--> |
| | | <!-- <div style="margin-left: 10px">{{ row.name }}</div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- <el-select--> |
| | | <!-- v-if="row.isVisible===1"--> |
| | | <!-- v-model="row.code"--> |
| | | <!-- filterable--> |
| | | <!-- style="width: 400px;"--> |
| | | <!-- placeholder="è¯·éæ©"--> |
| | | <!-- @change="val=>changeCode(val,row)"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in JYSelectArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.code+''+item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | |
| | | <el-table-column |
| | | prop="code" |
| | | label="æ£éªæ åç¼ç " |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.code }}</div> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.code" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | @change="val=>changeName(val,row)" |
| | | > |
| | | <el-option |
| | | v-for="item in JYSelectArr" |
| | | :key="item.name" |
| | | :label="item.code" |
| | | :value="item.name" |
| | | <div style="display: flex;margin-bottom: 5px"> |
| | | <div style="display: flex;flex-direction: column"> |
| | | <div v-if="item.standvalue" class="itemTitle">æ åå¼</div> |
| | | <div v-if="item.uppervalue" class="itemTitle">ä¸éå¼</div> |
| | | <div v-if="item.lowervalue" class="itemTitle">ä¸éå¼</div> |
| | | <div v-if="item.stepcheckitem_desc" class="itemTitle">æè¿°</div> |
| | | <div v-if="item.numberjudge!=='N'" class="itemTitle">宿µå¼ |
| | | <el-input |
| | | v-model="item.real_value" |
| | | size="mini" |
| | | oninput="value=value.replace(/[^0-9]/g,'')" |
| | | style="width: 100px;margin-left: 5px" |
| | | @input="val=>inputChange(val,item)" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="æ£éªæ ååç§°" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.name }}</div> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.name" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | @change="val=>changeName(val,row)" |
| | | > |
| | | <el-option |
| | | v-for="item in JYSelectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="stepcheckitem_desc" |
| | | label="æ£éªæ åæè¿°" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if="scope.row.isVisible===1||scope.row.index === tabClickIndex && tabClickLabel === 'æ£éªæ åæè¿°'" |
| | | v-model="scope.row.stepcheckitem_desc" |
| | | placeholder="请è¾å
¥" |
| | | @keyup.enter.native="val=>keyUpEnterNative(val,scope.row)" |
| | | /> |
| | | <div |
| | | v-else |
| | | > {{ scope.row.stepcheckitem_desc }} |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;flex-direction: column"> |
| | | <div v-if="item.standvalue" class="itemContent">{{ item.standvalue }}</div> |
| | | <div v-if="item.uppervalue" class="itemContent">{{ item.uppervalue }}</div> |
| | | <div v-if="item.lowervalue" class="itemContent">{{ item.lowervalue }}</div> |
| | | <div v-if="item.stepcheckitem_desc" class="itemContent">{{ item.stepcheckitem_desc }}</div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="result" |
| | | label="æ£éªç»æ" |
| | | width="100" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.result==='OK'">åæ ¼</div> |
| | | <div v-if="row.result==='NG'">ä¸è¯</div> |
| | | </template> |
| | | |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <el-radio-group--> |
| | | <!-- v-model="row.result"--> |
| | | <!-- size="small"--> |
| | | <!-- @change="a=>changeRadioValue(a,row)"--> |
| | | <!-- >--> |
| | | <!-- <el-radio--> |
| | | <!-- :label="0"--> |
| | | <!-- @change="clickRadio(0,row)"--> |
| | | <!-- >--> |
| | | <!-- åæ ¼--> |
| | | <!-- </el-radio>--> |
| | | <!-- <el-radio--> |
| | | <!-- :label="1"--> |
| | | <!-- @change="clickRadio(1,row)"--> |
| | | <!-- >--> |
| | | <!-- ä¸è¯--> |
| | | <!-- </el-radio>--> |
| | | <!-- </el-radio-group>--> |
| | | <!-- </template>--> |
| | | |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="del(row)">å é¤</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="confirm(row)">确认</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="cancel(row)">åæ¶</el-button> |
| | | <div v-show="item.numberjudge!=='N'" class="itemContent" style="width: 150px;display: flex"> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | :disabled="item.required==='Y'&&!item.real_value" |
| | | :plain="!item.check_result" |
| | | @click="checkResultClick('OK',item)" |
| | | >åæ ¼ |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | size="mini" |
| | | :disabled="item.required==='Y'&&!item.real_value" |
| | | :plain="item.check_result" |
| | | @click="checkResultClick('NG',item)" |
| | | > |
| | | ä¸åæ ¼ |
| | | </el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div style="display: flex;margin: 30px 0;align-items: center"> |
| | | <el-button type="primary" @click="submitButton('FirstCheck')">馿£ä¿å</el-button> |
| | | <el-button type="primary" style="margin-left: 50px" @click="submitButton('PatroCheck')">å·¡æ£ä¿å</el-button> |
| | | <el-button type="primary" style="margin-left: 50px" @click="submitButton('EndCheck')">å®å·¥æ£ä¿å</el-button> |
| | | <el-button type="info" style="margin-left: 50px" @click="submitButton('Cancel')">åæ¶</el-button> |
| | | <div |
| | | v-if="checkItemArr.filter(i=>i.check_result!=='').length===checkItemArr.length&&checkItemArr.length>0" |
| | | class="content1" |
| | | > |
| | | <div> |
| | | <i class="el-icon-s-operation" style="font-size: 14px" :style="{color:$store.state.settings.theme}" /> |
| | | </div> |
| | | <div class="title"> |
| | | æ£éªç»æ |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="checkItemArr.filter(i=>i.check_result!=='').length===checkItemArr.length&&checkItemArr.length>0" |
| | | class="content2" |
| | | style="width: 60%;margin-left: 30px;" |
| | | > |
| | | <div class="orderMsg2">æ ·æ¬æ°éï¼{{ form.sampscare }}</div> |
| | | <div class="orderMsg2">åæ ¼æ°éï¼{{ form.goodqty }}</div> |
| | | <div class="orderMsg2">ä¸åæ ¼æ°éï¼{{ form.ngqty }}</div> |
| | | |
| | | <div style="width: 290px;display: flex;align-items: center" class="resultButton"> |
| | | <div style="width: 70px;">å¤å®ç»æï¼</div> |
| | | <el-button type="primary" size="medium" :plain="!check_result" @click="check_result=true">åæ ¼</el-button> |
| | | <el-button type="warning" size="medium" :plain="check_result" @click="check_result=false">ä¸åæ ¼</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="checkItemArr.filter(i=>i.check_result!=='').length===checkItemArr.length&&checkItemArr.length>0" |
| | | class="content2 submitButton" |
| | | style="margin-top: 10px;margin-bottom: 10px;" |
| | | > |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | @click="submitButton" |
| | | >æäº¤ |
| | | </el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import Pagination from '@/components/Pagination' |
| | | |
| | | // const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | import waves from '@/directive/waves' |
| | | import $ from 'jquery' |
| | | import { |
| | | MesOrderStepCheckItemList, |
| | | MesOrderStepCheckSearch, |
| | | MesOrderStepCheckSelect, SaveMesOrderStepCheckItem, |
| | | StepCheckItemSelect |
| | | } from '@/api/zlgl' |
| | | import { MesOrderSelectUser } from '@/api/scgl' |
| | | import { MesOrderStepCheckItemList, MesOrderStepCheckSearch, SaveMesOrderStepCheckItem } from '@/api/zlgl' |
| | | import { getCookie } from '@/utils/auth' |
| | | |
| | | export default { |
| | | name: 'QXDY', |
| | | // components: { |
| | | // Pagination |
| | | // }, |
| | | name: 'Zzjg', |
| | | |
| | | directives: { waves }, |
| | | data() { |
| | | return { |
| | | isIpad: false, |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { // å·¥åº |
| | | // MO-2022-07-0001_1;001 |
| | | orderstepqrcode: '', // æ«æçäºç»´ç ä¿¡æ¯ |
| | | wo_code: '', // å·¥åç¼ç |
| | | partcode: '', // 产åç¼ç |
| | | partname: '', // 产ååç§° |
| | | partspec: '', // 产åè§æ ¼ |
| | | stepcode: '', // å·¥åºç¼ç |
| | | stepname: ''// å·¥åºåç§° |
| | | }, |
| | | checkStandard: '', // æ£éªæ å |
| | | checkStandardSelect: [], // æ£éªæ å䏿æ°ç» |
| | | checkUser: getCookie('navTabId'), // æ£éªäººå |
| | | checkqty: 0, // æ£éªæ°é |
| | | checkUserSelect: [], // æ£éªäººå䏿æ°ç» |
| | | checkResult: '', // æ£éªç»æ |
| | | checkResultSelect: [ |
| | | { code: 'OK', name: 'åæ ¼' }, |
| | | { code: 'NG', name: 'ä¸è¯' } |
| | | ], // æ£éªç»æä¸ææ°ç» |
| | | checkdescr: '', // æ£éªå¤æ³¨ï¼æè¿°ï¼ |
| | | |
| | | JYTableData: [], // æ£éªé¡¹ä¿¡æ¯è¡¨æ ¼ |
| | | JYSelectArr: [], // æ£éªä¸ææ°ç» |
| | | // JYSelectedArr: [], // 已鿣éªé¡¹ç®æ°ç» |
| | | JYIsCancel: true, |
| | | multipleSelection: [], // è¡¨æ ¼å¤éæ¡ |
| | | tabClickIndex: null, // ç¹å»çåå
æ ¼ |
| | | tabClickLabel: '', // å½åç¹å»çåå |
| | | isCancel: false, // æ¯å¦ç¹å»åæ¶æé® |
| | | judgeIsScanningArr: []// 夿æ¯å¦æ«ç æ°ç» |
| | | form: { |
| | | orderstepqrcode: '', // æ«æå·¥åºäºç»´ç ä¿¡æ¯ |
| | | checktype: 'FirstCheck', |
| | | |
| | | wocode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | stepcode: '', |
| | | stepname: '', |
| | | checkstandcode: '', |
| | | checkstandname: '', |
| | | check_type: '', |
| | | sampmethod: '', // FIXED(åºæ¶æ½æ£) SCARE(æ¯ä¾æ½æ£) |
| | | sampscare: '', |
| | | qualitystatus: '', |
| | | good_qty: '', // æçæ¥å·¥æ°é |
| | | sampleqty: '', |
| | | goodqty: '', // åæ ¼æ°é |
| | | ngqty: '', // ä¸è¯æ°é |
| | | // checkitemcont: [], |
| | | |
| | | username: getCookie('admin') |
| | | |
| | | }, |
| | | checktypeArr: [ |
| | | { code: 'FirstCheck', name: '馿£' }, |
| | | { code: 'PatroCheck', name: 'å·¡æ£' }, |
| | | { code: 'EndCheck', name: 'å®å·¥æ£' } |
| | | ], |
| | | stepActive: 0, // å½åå¤äºç¬¬å ä»¶ |
| | | |
| | | checkItemArr: [], |
| | | check_result: '' |
| | | |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | 'checkItemArr': { |
| | | deep: true, // 深度ç嬿¶ çå¬å°å±æ§ å½ä¸ä¸ºæ·±åº¦ç嬿¶ï¼å¯çå¬é¿åº¦ |
| | | handler: function(val) { |
| | | // do something with the new and old value of myArray |
| | | this.form.goodqty = 0 |
| | | for (var i = 0; i < this.form.sampscare; i++) { |
| | | const flag = this.checkItemArr.filter(j => j.checkNumber === i + 1).every(j => j.check_result) |
| | | if (flag) { |
| | | this.form.goodqty++ |
| | | } |
| | | } |
| | | this.form.ngqty = this.form.sampscare - this.form.goodqty |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.handleRequest() |
| | | |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | |
| | | this.getFocus() |
| | | }, |
| | | methods: { |
| | | handleRequest() { |
| | | this.getMesOrderStepCheckSelect().then(res => { |
| | | if (res.code === '200') { |
| | | this.getMesOrderSelectUser() |
| | | this.getJYSelectArr() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // è·åèç¦ |
| | | getFocus() { |
| | | this.$nextTick(() => { |
| | | $("input[name='GXproduceCode']")[0].focus() |
| | | $('input[name=\'GXproduceCode\']')[0].focus() |
| | | }) |
| | | }, |
| | | // è·åæ£éªæ å䏿æ°ç» |
| | | async getMesOrderStepCheckSelect() { |
| | | const res = await MesOrderStepCheckSelect() |
| | | this.checkStandardSelect = res.data |
| | | return { code: res.code } |
| | | }, |
| | | // è·åæ£éªäººå䏿 |
| | | async getMesOrderSelectUser() { |
| | | const { data: res } = await MesOrderSelectUser() |
| | | this.checkUserSelect = res |
| | | }, |
| | | // è·åæ£éªé¡¹ä¸ææ°ç» |
| | | async getJYSelectArr() { |
| | | const { data: res } = await StepCheckItemSelect() |
| | | this.JYSelectArr = res |
| | | }, |
| | | // æ£éªæ å䏿弿¹å |
| | | async changeCheckStandard(val) { |
| | | await this.getJYSelectArr() |
| | | this.isCancel = false |
| | | |
| | | const { data: res } = await MesOrderStepCheckItemList({ checkstandcode: val }) |
| | | this.JYTableData = res |
| | | |
| | | // let arr = [â¦b].filter(x => [â¦a].every(y => y.id !== x.id)); |
| | | this.JYSelectArr = [...this.JYSelectArr].filter(x => [...this.JYTableData].every(y => y.code !== x.code)) |
| | | |
| | | this.JYTableData.forEach(item => { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | |
| | | // item.result = 0 // 0åæ ¼ 1ä¸è¯ |
| | | item.result = 'OK' |
| | | |
| | | item.isVisible = 0 |
| | | item.number = number |
| | | }) |
| | | this.$refs.multipleTable.toggleAllSelection() |
| | | }, |
| | | // changeRadioValue(val, row) { |
| | | // console.log(val, row.result, 20000) |
| | | // }, |
| | | // clickRadio(e, row) { |
| | | // console.log(e, row.result, 10000) |
| | | // row.result = e |
| | | // }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | const arr = this.multipleSelection.map(i => i.number) |
| | | this.JYTableData.forEach(it => { |
| | | if (arr.includes(it.number)) { |
| | | it.result = 'OK' |
| | | } else { |
| | | it.result = 'NG' |
| | | } |
| | | }) |
| | | |
| | | if (this.multipleSelection.length > 0 && this.multipleSelection.length === this.JYTableData.length) { |
| | | this.checkResult = 'OK' |
| | | } else { |
| | | this.checkResult = 'NG' |
| | | async enterNative() { |
| | | const data = { |
| | | orderstepqrcode: this.form.orderstepqrcode, |
| | | checktype: this.form.checktype |
| | | } |
| | | if (this.isCancel) { |
| | | this.checkResult = '' |
| | | } |
| | | const { data: res } = await MesOrderStepCheckSearch(data) |
| | | this.form.wocode = res.labcont[0].wo_code |
| | | this.form.partcode = res.labcont[0].partcode |
| | | this.form.partname = res.labcont[0].partname |
| | | this.form.partspec = res.labcont[0].partspec ? res.labcont[0].partspec : '/' |
| | | this.form.stepcode = res.labcont[0].stepcode |
| | | this.form.stepname = res.labcont[0].stepname |
| | | this.form.good_qty = res.labcont[0].good_qty |
| | | |
| | | this.form.checkstandcode = res.chekstand[0].checkstandcode |
| | | this.form.checkstandname = res.chekstand[0].checkstandname |
| | | this.form.sampmethod = res.chekstand[0].sampmethod |
| | | |
| | | this.form.sampscare = res.chekstand[0].sampmethod === 'FIXED' ? res.chekstand[0].sampscare |
| | | : res.labcont[0].good_qty * res.chekstand[0].sampscare / 100 |
| | | this.form.sampscare = this.form.sampscare <= this.form.good_qty ? this.form.sampscare : this.form.good_qty |
| | | |
| | | await this.getMesOrderStepCheckItemList() |
| | | }, |
| | | // æ£éªé¡¹ç®ç¼ç ï¼åç§°ï¼ |
| | | changeName(val, row) { |
| | | const res = this.JYSelectArr.find(item => { |
| | | return item.code === val || item.name === val |
| | | }) |
| | | row.code = res.code |
| | | row.name = res.name |
| | | row.stepcheckitem_desc = res.descr |
| | | }, |
| | | // 鲿 //æ«ç ç¨çæ¯é²æ |
| | | fnThrottle(method, delay, duration, belong) { |
| | | var that = this |
| | | var timer = this.timer |
| | | var begin = new Date().getTime() |
| | | return function() { |
| | | var current = new Date().getTime() |
| | | clearTimeout(timer) |
| | | if (current - begin >= duration) { |
| | | // method() |
| | | // that.VALUE() |
| | | begin = current |
| | | } else { |
| | | that.timer = setTimeout(function() { |
| | | // method() |
| | | that.enterNative(that.form.orderstepqrcode, belong) |
| | | }, delay) |
| | | } |
| | | } |
| | | }, |
| | | // 夿æ¯å¦æ¯æ«ç æªæ«ç |
| | | judgeIsScanning(e, belong) { |
| | | const timenow = e.timeStamp |
| | | let flag = true |
| | | this.judgeIsScanningArr.push(timenow) |
| | | let i |
| | | for (i in this.judgeIsScanningArr) { |
| | | flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1 |
| | | if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) { |
| | | if (flag) { |
| | | this.fnThrottle(this.enterNative, 500, 2000, belong)() |
| | | return |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | // æ«ç é®çå车äºä»¶ |
| | | async enterNative(val, belong) { |
| | | if (belong === 'GXproduceCode') { |
| | | const res = await MesOrderStepCheckSearch({ orderstepqrcode: this.form.orderstepqrcode }) |
| | | this.form.wo_code = res.data[0].wo_code |
| | | this.form.partcode = res.data[0].partcode |
| | | this.form.partname = res.data[0].partname |
| | | this.form.partspec = res.data[0].partspec |
| | | this.form.stepcode = res.data[0].stepcode |
| | | this.form.stepname = res.data[0].stepname |
| | | } |
| | | }, |
| | | async getMesOrderStepCheckItemList() { |
| | | const { data: res } = await MesOrderStepCheckItemList({ checkstandcode: this.form.checkstandcode }) |
| | | // this.checkItemArr = res |
| | | this.checkItemArr = [] |
| | | for (let i = 0; i < this.form.sampscare; i++) { |
| | | res.forEach(j => { |
| | | this.checkItemArr.push({ |
| | | checkNumber: i + 1, |
| | | stepcheckitem_seq: j.stepcheckitem_seq, |
| | | name: j.name, |
| | | code: j.code, |
| | | standvalue: j.standvalue, |
| | | lowervalue: j.lowervalue, |
| | | uppervalue: j.uppervalue, |
| | | |
| | | // æ°å¢ |
| | | add() { |
| | | if (this.JYTableData.length === 0) { |
| | | return this.$message.info('请å
éæ©æ£éªæ åï¼') |
| | | } |
| | | if (this.JYTableData.length > 0 && this.JYTableData[this.JYTableData.length - 1].isVisible === 1) { |
| | | return this.$message.info('请å
ç¡®å®æåæ¶æ¬æ¡è®°å½ï¼') |
| | | } |
| | | |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { result: 'OK', code: '', name: '', stepcheckitem_desc: '', isVisible: 1, number } |
| | | this.JYTableData.push(data) |
| | | this.$refs.multipleTable.toggleRowSelection(data, true) |
| | | |
| | | this.JYIsCancel = false |
| | | }, |
| | | |
| | | // 确认 |
| | | confirm(row) { |
| | | if (row.code === '') { |
| | | return this.$message.info('æ£éªé¡¹ç®ç¼ç ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (row.name === '') { |
| | | return this.$message.info('æ£éªé¡¹ç®åç§°ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | |
| | | this.JYSelectArr.forEach((item, index) => { |
| | | if (item.code === row.code) { |
| | | this.JYSelectArr.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | this.JYTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | item.isVisible = 0 |
| | | item.code = row.code |
| | | item.name = row.name |
| | | item.result = row.result |
| | | item.stepcheckitem_desc = row.stepcheckitem_desc |
| | | } |
| | | }) |
| | | |
| | | if (this.multipleSelection.length > 0 && this.multipleSelection.length === this.JYTableData.length) { |
| | | this.checkResult = 'OK' |
| | | } else { |
| | | this.checkResult = 'NG' |
| | | } |
| | | }, |
| | | // åæ¶ |
| | | cancel(row) { |
| | | this.JYTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.JYTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | |
| | | if (this.JYIsCancel && row.code.toString().length > 0) { |
| | | this.JYSelectArr.splice(0, 0, { |
| | | code: row.code, |
| | | name: row.name, |
| | | descr: row.stepcheckitem_desc |
| | | unit: j.unit, |
| | | stepcheckitem_desc: j.stepcheckitem_desc, |
| | | required: j.required, // æ¯å¦å¿
å¡« |
| | | numberjudge: j.numberjudge, // æ°å¼å¤æ |
| | | real_value: '', |
| | | check_result: j.numberjudge === 'Y' ? '' : true |
| | | }) |
| | | }) |
| | | } |
| | | this.JYIsCancel = true |
| | | |
| | | if (this.checkItemArr.every(i => i.check_result)) { |
| | | this.check_result = true |
| | | } else { |
| | | this.check_result = '' |
| | | } |
| | | }, |
| | | |
| | | // å é¤ |
| | | del(row) { |
| | | this.JYSelectArr.splice(0, 0, { |
| | | code: row.code, |
| | | name: row.name, |
| | | descr: row.stepcheckitem_desc |
| | | }) |
| | | numberChange(currentValue, oldValue) { |
| | | const t = this.checkItemArr.filter(i => i.checkNumber === 1) |
| | | |
| | | this.JYTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.JYTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | submitButton(val) { |
| | | if (val !== 'Cancel') { |
| | | if (this.form.orderstepqrcode.length < 1) { |
| | | return this.$message.info('æ«ææ¡ç ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (this.form.wo_code.toString().length === 0) { |
| | | return this.$message.info('æªè·å¾å·¥åç¼ç ï¼') |
| | | } |
| | | if (this.checkStandard.length < 1) { |
| | | return this.$message.info('æ£éªæ åä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (this.checkUser.length < 1) { |
| | | return this.$message.info('æ£éªäººåä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (parseFloat(this.checkqty) <= 0) { |
| | | return this.$message.info('æ£éªæ°éå¿
é¡»è¦å¤§äºé¶ï¼') |
| | | } |
| | | if (this.JYTableData.length < 1) { |
| | | return this.$message.info('æ£éªé¡¹ä¿¡æ¯ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (this.checkResult.length < 1) { |
| | | return this.$message.info('æ£éªç»æä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | // ä»¶æ°åå°æ¶æ§è¡ |
| | | if (currentValue < this.checkItemArr.length / t.length) { |
| | | this.checkItemArr.reverse() |
| | | this.checkItemArr.splice(0, t.length * (oldValue - currentValue)) |
| | | this.checkItemArr.reverse() |
| | | |
| | | const text = val === 'FirstCheck' ? '馿£ä¿å' : (val === 'PatroCheck' ? 'å·¡æ£ä¿å' : 'å®å·¥æ£ä¿å') |
| | | this.$confirm('æ¯å¦ç¡®è®¤' + text + '?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const arr = [] |
| | | this.JYTableData = this.JYTableData.filter(item => item.code !== '') |
| | | this.JYTableData.forEach((item, index) => { |
| | | arr.push({ |
| | | code: item.code, |
| | | name: item.name, |
| | | seq: (index + 1), |
| | | descr: item.stepcheckitem_desc, |
| | | checkresult: item.result |
| | | this.stepActive = currentValue - 1 |
| | | } |
| | | // ä»¶æ°å夿¶æ§è¡ |
| | | if (currentValue > this.checkItemArr.length / t.length) { |
| | | for (let i = currentValue; i > oldValue; i--) { |
| | | t.forEach(j => { |
| | | this.checkItemArr.push({ |
| | | checkNumber: i, |
| | | name: j.name, |
| | | code: j.code, |
| | | standvalue: j.standvalue, |
| | | lowervalue: j.lowervalue, |
| | | uppervalue: j.uppervalue, |
| | | |
| | | unit: j.unit, |
| | | stepcheckitem_desc: j.stepcheckitem_desc, |
| | | required: j.required, // æ¯å¦å¿
å¡« |
| | | numberjudge: j.numberjudge, // æ°å¼å¤æ |
| | | real_value: '', |
| | | check_result: j.numberjudge === 'Y' ? '' : true |
| | | }) |
| | | }) |
| | | const data = { |
| | | 'mesordercode': this.form.wo_code, // å·¥åç¼å· |
| | | 'partcode': this.form.partcode, // 产åç¼ç |
| | | 'stepcode': this.form.stepcode, // å·¥åºç¼ç |
| | | 'checkstanedcode': this.checkStandard, // æ£éªæ åç¼ç |
| | | 'checkusercode': this.checkUser, // æ£éªäººåç¼ç |
| | | 'checkqty': this.checkqty, // æ£éªæ°é |
| | | 'checktypecode': val, // æ£éªç±»åç¼ç |
| | | 'checkresult': this.checkResult, // æ£éªç»æ(OK(åæ ¼) NG(ä¸è¯)) |
| | | 'checkdescr': this.checkdescr, // æ£éªæè¿° |
| | | 'data': arr |
| | | } |
| | | this.checkItemArr.sort((a, b) => a.checkNumber - b.checkNumber) |
| | | } |
| | | }, |
| | | |
| | | pre() { |
| | | if (this.stepActive > 0) { |
| | | this.stepActive-- |
| | | } |
| | | }, |
| | | next() { |
| | | if (this.stepActive < this.form.sampscare) { |
| | | this.stepActive++ |
| | | } |
| | | }, |
| | | |
| | | inputChange(val, item) { |
| | | if (val !== '') { |
| | | if (item.numberjudge === 'Y') { // 妿éè¦è¿è¡æ°å¼å¤æ |
| | | if (item.uppervalue === '' && item.lowervalue === '') { // ä¸éå¼ä¸ºç©ºï¼ä¸éå¼ä¸ºç©º |
| | | item.check_result = parseFloat(val) === parseFloat(item.standvalue) |
| | | } |
| | | SaveMesOrderStepCheckItem(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(text + 'æåï¼') |
| | | this.clearContent() |
| | | this.getFocus() |
| | | this.getJYSelectArr() |
| | | } |
| | | |
| | | if (item.uppervalue !== '' && item.lowervalue !== '') { // ä¸éå¼ä¸ä¸ºç©ºï¼ä¸éå¼ä¸ä¸ºç©º |
| | | item.check_result = parseFloat(val) >= parseFloat(item.lowervalue) && parseFloat(val) <= |
| | | parseFloat(item.uppervalue) |
| | | } |
| | | |
| | | if (item.uppervalue !== '' && item.lowervalue === '') { // ä¸éå¼ä¸ä¸ºç©ºï¼ä¸éå¼ä¸ºç©º |
| | | item.check_result = parseFloat(val) <= parseFloat(item.uppervalue) |
| | | } |
| | | |
| | | if (item.uppervalue === '' && item.lowervalue !== '') { // ä¸éå¼ä¸ºç©ºï¼ä¸éå¼ä¸ä¸ºç©º |
| | | item.check_result = parseFloat(val) >= parseFloat(item.lowervalue) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (val === '') { |
| | | item.check_result = '' |
| | | } |
| | | |
| | | this.check_result = !!this.checkItemArr.every(i => i.check_result) |
| | | }, |
| | | |
| | | checkResultClick(val, item) { |
| | | item.check_result = val === 'OK' |
| | | |
| | | if (this.checkItemArr.filter(i => i.check_result !== '').length === this.checkItemArr.length) { |
| | | this.check_result = !!this.checkItemArr.every(i => i.check_result) |
| | | } |
| | | }, |
| | | |
| | | submitButton() { |
| | | this.$confirm('æ¯å¦ç¡®è®¤æäº¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const checkitemcont = [] |
| | | this.checkItemArr.forEach((i, index) => { |
| | | checkitemcont.push({ |
| | | checknum: i.checkNumber + '/' + this.checkItemArr.length / this |
| | | .checkItemArr.filter(j => j.checkNumber === 1).length, |
| | | checkiem_seq: i.stepcheckitem_seq, |
| | | checkitem_code: i.code, |
| | | checkitem_name: i.name, |
| | | check_value: i.real_value ? i.real_value : '', |
| | | check_result: i.check_result ? 'OK' : 'NG', |
| | | checkitem_descr: '' |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶ä¿å') |
| | | }) |
| | | } else { |
| | | this.clearContent() |
| | | this.getFocus() |
| | | this.getJYSelectArr() |
| | | } |
| | | }, |
| | | // æ¸
空页é¢å
容 |
| | | clearContent() { |
| | | this.JYTableData = [] |
| | | this.multipleSelection = [] |
| | | this.checkdescr = '' |
| | | this.checkUser = getCookie('navTabId') |
| | | this.checkqty = 0 |
| | | this.checkResult = '' |
| | | this.checkStandard = '' |
| | | this.form.orderstepqrcode = '' |
| | | this.form.wo_code = '' |
| | | this.form.partcode = '' |
| | | this.form.partname = '' |
| | | this.form.partspec = '' |
| | | this.form.stepcode = '' |
| | | this.form.stepname = '' |
| | | |
| | | this.judgeIsScanningArr = [] |
| | | const data = { |
| | | wocode: this.form.wocode, |
| | | partcode: this.form.partcode, |
| | | stepcode: this.form.stepcode, |
| | | checkstandcode: this.form.checkstandcode, |
| | | check_type: this.form.checktype, |
| | | sampmethod: this.form.sampmethod, |
| | | qualitystatus: this.check_result ? 'OK' : 'NG', |
| | | good_qty: this.form.good_qty, |
| | | sampleqty: this.form.sampscare, |
| | | goodqty: this.form.goodqty, |
| | | ngqty: this.form.ngqty, |
| | | admin: this.form.username, |
| | | checkitemcont |
| | | } |
| | | |
| | | this.isCancel = true |
| | | SaveMesOrderStepCheckItem(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.form.orderstepqrcode = '' |
| | | |
| | | this.form.wocode = '' |
| | | this.form.partcode = '' |
| | | this.form.partname = '' |
| | | this.form.partspec = '' |
| | | this.form.stepcode = '' |
| | | this.form.stepname = '' |
| | | this.form.checkstandcode = '' |
| | | this.form.checkstandname = '' |
| | | this.form.check_type = '' |
| | | this.form.sampmethod = ''// FIXED(åºæ¶æ½æ£) SCARE(æ¯ä¾æ½æ£) |
| | | this.form.sampscare = '' |
| | | this.form.qualitystatus = '' |
| | | this.form.good_qty = '' // æçæ¥å·¥æ°é |
| | | this.form.sampleqty = '' |
| | | this.form.goodqty = '' // åæ ¼æ°é |
| | | this.form.ngqty = '' // ä¸è¯æ°é |
| | | this.stepActive = 0 |
| | | this.checkItemArr = [] |
| | | this.check_result = '' |
| | | this.$message.success('æ£éªæåï¼') |
| | | this.getFocus() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | // åå
æ ¼è¢«ç¹å»æ¶ |
| | | cellDblclick(row, column, cell, event) { |
| | | console.log(row, column, cell, event) |
| | | console.log(column.label) |
| | | console.log(row.index) |
| | | switch (column.label) { |
| | | case 'æ£éªæ åæè¿°': |
| | | this.tabClickIndex = row.index |
| | | this.tabClickLabel = column.label |
| | | break |
| | | // case 'å¤è´£éé¢(å
)': |
| | | // this.tabClickIndex = row.index |
| | | // this.tabClickLabel = column.label |
| | | // break |
| | | default: |
| | | return |
| | | } |
| | | }, |
| | | // å车äºä»¶ |
| | | keyUpEnterNative(val, row) { |
| | | this.tabClickLabel = '' |
| | | }, |
| | | |
| | | tableRowClassName({ row, rowIndex }) { |
| | | // ææ¯ä¸è¡çç´¢å¼æ¾è¿row |
| | | row.index = rowIndex |
| | | return 'custom-row' |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 450 |
| | | |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .el-select .el-input .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | </style> |
| | | <!--å
Œ
±é¡µé¢æ ·å¼--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | .el-button--text { |
| | | ::v-deep .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | |
| | | margin-right: 15px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary, .el-button--default, .el-button--info { |
| | | height: 34px; |
| | | ::v-deep .el-button--primary, .el-button--warning, .el-button--default, .el-button--info { |
| | | //height: 34px; |
| | | //display: flex; |
| | | //align-items: center; |
| | | //padding: 0 15px; |
| | | width: 58px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 15px; |
| | | justify-content: center; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary { |
| | | //background-color: $main_color !important; |
| | | .submitButton { |
| | | ::v-deep .el-button--primary { |
| | | width: 160px; |
| | | letter-spacing: 10px; |
| | | padding-left: 25px; |
| | | font-size: 18px; |
| | | //display: flex; |
| | | //justify-content: center; |
| | | //align-items: center; |
| | | } |
| | | } |
| | | |
| | | .resultButton { |
| | | ::v-deep .el-button--primary { |
| | | width: 100px; |
| | | letter-spacing: 4px; |
| | | padding-left: 22px; |
| | | } |
| | | |
| | | ::v-deep .el-button--warning { |
| | | width: 100px; |
| | | letter-spacing: 4px; |
| | | padding-left: 22px; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | |
| | | } |
| | | |
| | | ::v-deep .el-form--inline .el-form-item__label { |
| | | color: #a7a7a7; |
| | | //color: #a7a7a7; |
| | | //font-size: 16px; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content1 { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 10px 0 0 10px; |
| | | |
| | | .title { |
| | | font-size: 14px; |
| | | font-weight: bold; |
| | | margin-left: 5px; |
| | | } |
| | | } |
| | | |
| | | .content2 { |
| | | margin: 10px 0 0 20px; |
| | | display: flex; |
| | | font-size: 14px; |
| | | width: 100%; |
| | | align-items: center; |
| | | } |
| | | |
| | | .orderMsg { |
| | | width: 33.33%; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | ::v-deep .el-input-number--medium { |
| | | line-height: 32px; |
| | | width: 120px; |
| | | } |
| | | |
| | | .checkItem { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | min-height: 36px; |
| | | |
| | | align-items: center; |
| | | flex-direction: column; |
| | | margin-top: 5px; |
| | | } |
| | | |
| | | .serialNumber { |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: #42B983; |
| | | color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .itemTitle { |
| | | width: 300px; |
| | | padding-left: 40px; |
| | | height: 26px; |
| | | color: #909399; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | ::v-deep .el-input--mini { |
| | | line-height: 24px; |
| | | height: 24px; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | line-height: 24px; |
| | | height: 24px; |
| | | } |
| | | } |
| | | |
| | | .itemContent { |
| | | width: 150px; |
| | | height: 26px; |
| | | padding-left: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .orderMsg2 { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | |
| | | .el-table .custom-row { |
| | |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup"> |
| | | <el-button type="primary" icon="el-icon-download" @click="download">导åº</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button>--> |
| | | <!-- <el-button icon="el-icon-download" @click="upload">导å
¥</el-button>--> |
| | | <el-button v-waves type="primary" icon="el-icon-download" @click="download">导åº</el-button> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button>--> |
| | | <!-- <el-button v-waves icon="el-icon-download" @click="upload">导å
¥</el-button>--> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | :model="form" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label-width="70px" label="å·¥åç¼å·" style=" display: flex;"> |
| | | <el-form-item label="å·¥åç¼å·" style=" display: flex;"> |
| | | <el-input v-model="form.wocode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " style=" display: flex;"> |
| | |
| | | <el-form-item label="è§æ ¼åå·" style=" display: flex;"> |
| | | <el-input v-model="form.partapec" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label-width="70px" label="å·¥åºåç§°" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="å·¥åºåç§°" style=" display: flex;"> |
| | | <el-input v-model="form.stepname" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="æ ååç§°" style=" display: flex;"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}"> |
| | | <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 class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"> |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <div class="elTableDiv" style="position:relative;"> |
| | | <TableColumnSettings |
| | | v-if="false" |
| | | :list1="tableColumnSettingsArray" |
| | | @tableColumnUpdate="tableColumnUpdate" |
| | | /> |
| | | <el-table |
| | | :key="tableTimeStampKey" |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- fixed--> |
| | | <!-- />--> |
| | | |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="åºå·" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="å·¥åç¼ç " |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | width="160" |
| | | label="产åç¼ç " |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产ååç§°" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="产åè§æ ¼" |
| | | width="160" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }} </div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="step_code" |
| | | label="å·¥åºç¼ç " |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="å·¥åºåç§°" |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="checkstaned_code" |
| | | label="æ åç¼ç " |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="checkstaned_name" |
| | | label="æ ååç§°" |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="check_type" |
| | | label="æ£éªç±»å" |
| | | sortable="custom" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.check_type==='FirstCheck'">馿£</div> |
| | | <div v-if="row.check_type==='PatroCheck'">å·¡æ£</div> |
| | | <div v-if="row.check_type==='EndCheck'">å®å·¥æ£</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="check_result" |
| | | label="æ£éªç»æ" |
| | | sortable="custom" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.check_result==='NG'"> <i class="el-icon-circle-close" style="color:red;" /> ä¸è¯</div> |
| | | <div v-if="row.check_result==='OK'"> <i class="el-icon-circle-check" style="color: #42b983" /> åæ ¼</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="check_descr" |
| | | label="æ£éªå¤æ³¨" |
| | | width="120" |
| | | v-for="item in tableColumnSettingsArray" |
| | | v-if="item.show" |
| | | :key="item.id" |
| | | :sortable="item.sortable" |
| | | :prop="item.prop" |
| | | :min-width="item.minWidth" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.check_descr">{{ row.check_descr }} </div> |
| | | <div v-else>/</div> |
| | | <div v-if="!row[item.prop]">/</div> |
| | | <div v-else-if="item.prop==='check_type'"> |
| | | {{ checktypeArr.find(i=>i.code===row[item.prop]).name }} |
| | | </div> |
| | | <div v-else-if="item.prop==='check_result'"> |
| | | <div v-if="row.check_result==='OK'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />åæ ¼</div> |
| | | <div v-if="row.check_result==='NG'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />ä¸è¯</div> |
| | | <!-- <div v-if="row.check_result==='NG'">--> |
| | | <!-- <i class="el-icon-info" style="margin-right: 2px" />--> |
| | | <!-- ä¸è¯--> |
| | | <!-- </div>--> |
| | | <!-- <div v-if="row.check_result==='OK'">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- åæ ¼--> |
| | | <!-- </div>--> |
| | | </div> |
| | | <div v-else>{{ row[item.prop] }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="check_qty" |
| | | label="æ£éªæ°é" |
| | | width="120" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="æ£éªäººå" |
| | | sortable="custom" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="æ£éªæ¶é´" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | fixed="right" |
| | | width="80" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <!-- <el-button type="text" @click="check(row)">æ¥ç</el-button>--> |
| | | <!-- <el-button type="text" @click="del(row)">å é¤</el-button>--> |
| | | <!-- <el-button v-waves type="text" @click="check(row)">æ¥ç</el-button>--> |
| | | <!-- <el-button v-waves type="text" @click="del(row)">å é¤</el-button>--> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="æ¥ç" placement="top"> |
| | | <i |
| | | class="el-icon-view" |
| | | style="color: #42b983;cursor: pointer;margin-right: 15px;" |
| | | style="cursor: pointer;margin-right: 15px;color:#42b983" |
| | | @click="check(row)" |
| | | /> |
| | | </el-tooltip> |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="å·¥åºæ£éªæç»" |
| | | :visible.sync="dialogVisible" |
| | | width="900px" |
| | |
| | | > |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef2" |
| | | :data="tableDataDialog" |
| | | :height="(tableHeight-100)+'px'" |
| | | border |
| | |
| | | fixed |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="checkitem_code" |
| | | label="æ£éªé¡¹ç®ç¼å·" |
| | | width="120" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="checkitem_code"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- label="æ£éªé¡¹ç®ç¼å·"--> |
| | | <!-- width="120"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="checkitem_name" |
| | | label="æ£éªé¡¹ç®åç§°" |
| | | /> |
| | | <el-table-column |
| | | prop="checkitem_descr" |
| | | label="æ£éªé¡¹ç®æè¿°" |
| | | /> |
| | | <el-table-column |
| | | prop="check_result" |
| | | label="æ£éªç»æ" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.check_result==='NG'"> <i class="el-icon-circle-close" style="color:red;" /> ä¸è¯</div> |
| | | <div v-if="row.check_result==='OK'"> <i class="el-icon-circle-check" style="color: #42b983" /> åæ ¼</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="æ£éªäººå" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="æ£éªæ¶é´" |
| | | width="160" |
| | | fixed |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- label="æä½"--> |
| | | <!-- fixed="right"--> |
| | | <!-- width="120"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div class="operationClass">--> |
| | | <!-- <el-button type="text" @click="check(row)">æ¥ç</el-button>--> |
| | | <!-- <!– <el-button type="text" @click="del(row)">å é¤</el-button>–>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- prop="checkitem_descr"--> |
| | | <!-- label="æ£éªé¡¹ç®æè¿°"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="standvalue" |
| | | label="æ åè¦æ±" |
| | | fixed |
| | | min-width="120" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- ~å½ä¸ä¸ªå¼é½æ --> |
| | | <div v-if="row.standvalue&&row.uppervalue&&row.lowervalue">{{ row.standvalue }}({{ |
| | | row.lowervalue |
| | | }}~{{ row.uppervalue }}) |
| | | </div> |
| | | <!-- ~å½åªææ åå¼åä¸é弿¶ --> |
| | | <div v-else-if="row.standvalue&&row.uppervalue">{{ row.standvalue }}(~{{ row.uppervalue }})</div> |
| | | <!-- ~å½åªææ åå¼åä¸é弿¶--> |
| | | <div v-else-if="row.standvalue&&row.lowervalue">{{ row.standvalue }}({{ row.lowervalue }}~)</div> |
| | | |
| | | <!-- ~å½åªæä¸éå¼åä¸é弿¶--> |
| | | <div v-else-if="row.uppervalue&&row.lowervalue">({{ row.lowervalue }}~{{ row.uppervalue }})</div> |
| | | <!-- ~å½åªææ å弿¶ --> |
| | | <div v-else-if="row.standvalue">{{ row.standvalue }}</div> |
| | | <!-- ~å½åªæä¸é弿¶ --> |
| | | <div v-else-if="row.uppervalue">(~{{ row.uppervalue }})</div> |
| | | <!-- ~å½åªæä¸é弿¶ --> |
| | | <div v-else-if="row.lowervalue">({{ row.lowervalue }}~)</div> |
| | | |
| | | <div v-else>/</div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | v-for="(item,index) in dialogTableArrayCol" |
| | | :key="item" |
| | | :prop="(index+1)+'/'+ dialogTableNumberCol" |
| | | :label="'第'+(index+1)+'件'" |
| | | show-tooltip-when-overflow |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i |
| | | :class="row.check_result==='OK'?'el-icon-success':'el-icon-error'" |
| | | :style="{color:row.check_result==='OK'?'#42b983':'red'}" |
| | | style="margin-right: 2px" |
| | | /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | |
| | | <!-- <!– ~å½ä¸ä¸ªå¼é½æ –>--> |
| | | <!-- <div v-if="row.standvalue&&row.uppervalue&&row.lowervalue&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)">--> |
| | | <!-- <!– <div v-if="row[(index + 1) + '/' + dialogTableNumberCol]>=row.lowervalue&&row[(index + 1) + '/' + dialogTableNumberCol]<=row.uppervalue">–>--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- <!– ~å½åªææ åå¼åä¸é弿¶ –>--> |
| | | <!-- <div v-else-if="row.standvalue&&row.uppervalue&&row.lowervalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)">--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <!– ~å½åªææ åå¼åä¸é弿¶–>--> |
| | | <!-- <div v-else-if="row.standvalue&&row.lowervalue&&row.uppervalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)">--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- <!– ~å½åªæä¸éå¼åä¸é弿¶–>--> |
| | | <!-- <div v-else-if="row.uppervalue&&row.lowervalue&&row.standvalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)">--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <!– ~å½åªææ å弿¶ –>--> |
| | | <!-- <div v-else-if="row.standvalue&&row.uppervalue===''&&row.lowervalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])===parseFloat(row.standvalue)">--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <!– ~å½åªæä¸é弿¶ –>--> |
| | | <!-- <div v-else-if="row.uppervalue&&row.lowervalue===''&&row.standvalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)">--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- <!– ~å½åªæä¸é弿¶ –>--> |
| | | <!-- <div v-else-if="row.lowervalue&& row.uppervalue===''&&row.standvalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)">--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div></div>--> |
| | | |
| | | <!-- <div v-else>--> |
| | | <!-- <div style="display: flex;align-items: center">--> |
| | | <!-- <i class="el-icon-error" style="color: red;margin-right: 2px" />--> |
| | | <!-- {{ row[(index + 1) + '/' + dialogTableNumberCol] }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <!-- <el-button @click="dialogVisibleCancel">å æ¶</el-button>--> |
| | | <!-- <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button>--> |
| | | <el-button @click="dialogVisibleBack">è¿ å</el-button> |
| | | <!-- <el-button v-waves @click="dialogVisibleCancel">å æ¶</el-button>--> |
| | | <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button>--> |
| | | <el-button v-waves @click="dialogVisibleBack">è¿ å</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | import { getCookie } from '@/utils/auth' |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import { StepCheckTableOutExcel, StepCheckTableSearch, StepCheckTableSubSearch } from '@/api/zlgl' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | Pagination, ImportPicker, TableColumnSettings |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | checktypeArr: [ |
| | | { code: 'InCheck', name: 'å
¥åæ£éª' }, |
| | | { code: 'OutCheck', name: 'åºåæ£éª' }, |
| | | { code: 'FirstCheck', name: '馿£' }, |
| | | { code: 'PatroCheck', name: 'å·¡æ£' }, |
| | | { code: 'EndCheck', name: 'å®å·¥æ£' } |
| | |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | tableColumnSettingsArray: [ |
| | | { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // éèå show: falseéèï¼trueæ¾ç¤º |
| | | { minWidth: 25, width: 50, prop: 'RowNum', label: 'åºå·', id: 2, show: true, fixed: 'left', sortable: false }, // custom |
| | | { |
| | | minWidth: 160, |
| | | width: false, |
| | | prop: 'wo_code', |
| | | label: 'å·¥åç¼å·', |
| | | id: 3, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partcode', |
| | | label: '产åç¼ç ', |
| | | id: 4, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partname', |
| | | label: '产ååç§°', |
| | | id: 5, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partspec', |
| | | label: '产åè§æ ¼', |
| | | id: 6, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'step_code', |
| | | label: 'å·¥åºç¼ç ', |
| | | id: 7, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'stepname', |
| | | label: 'å·¥åºåç§°', |
| | | id: 8, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'checkstaned_code', |
| | | label: 'æ åç¼ç ', |
| | | id: 9, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'checkstaned_name', |
| | | label: 'æ ååç§°', |
| | | id: 10, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'check_type', |
| | | label: 'æ£éªç±»å', |
| | | id: 11, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'check_result', |
| | | label: 'æ£éªç»æ', |
| | | id: 12, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'check_descr', |
| | | label: 'æ£éªå¤æ³¨', |
| | | id: 13, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'check_qty', |
| | | label: 'æ£éªæ°é', |
| | | id: 14, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'lm_user', |
| | | label: 'æ£éªäººå', |
| | | id: 15, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 160, |
| | | width: false, |
| | | prop: 'lm_date', |
| | | label: 'æ£éªæ¶é´', |
| | | id: 16, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | } |
| | | ], |
| | | tableTimeStampKey: new Date().getTime(), // è¡¨æ ¼key |
| | | dialogVisible: false, |
| | | tableDataDialog: [], |
| | | title_value: 'æ°æ®å¯¼å
¥ / ç¹æ£é¨ä½', |
| | | code: '4', |
| | | shows: false |
| | | shows: false, |
| | | dialogTableNumberCol: 0, // å¯¹è¯æ¡å¨æçåæ° |
| | | dialogTableArrayCol: []// å¯¹è¯æ¡å¨æçæ°ç» |
| | | |
| | | } |
| | | }, |
| | |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | | } |
| | | this.tableTimeStampKey = new Date().getTime() |
| | | this.$refs.tableDataRef.doLayout() |
| | | }, |
| | | async getStepCheckTableSearch() { |
| | | const res = await StepCheckTableSearch(this.form) |
| | | this.tableData = res.data |
| | |
| | | |
| | | async check(row) { |
| | | // this.operation = operation |
| | | |
| | | this.dialogVisible = true |
| | | console.log(row, 1) |
| | | const res = await StepCheckTableSubSearch({ id: row.id }) |
| | | this.tableDataDialog = res.data |
| | | this.dialogVisible = true |
| | | |
| | | this.tableDataDialog.forEach((item, index) => { |
| | | for (const it in item) { |
| | | if (it.indexOf('/') !== -1) { |
| | | const i = it.split('/')[1] |
| | | this.dialogTableNumberCol = i |
| | | } |
| | | } |
| | | }) |
| | | |
| | | this.dialogTableArrayCol = [] |
| | | for (let i = 0; i < this.dialogTableNumberCol; i++) { |
| | | this.dialogTableArrayCol.push(i) |
| | | } |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | | this.dialogForm.OrgCode = '' |
| | | this.dialogForm.OrgName = '' |
| | | this.dialogForm.SupUnit = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | this.tableDataDialog = [] |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm" style="justify-content: flex-start;"> |
| | | <el-form-item label="è´¨æ£æ¹æ¡ç¼ç " style=" display: flex;"> |
| | | <el-input v-model="form.qualityinsptcode" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="è´¨æ£æ¹æ¡åç§°" style=" display: flex;"> |
| | | <el-input v-model="form.qualityinsptname" placeholder="请è¾å
¥" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ææç¶æ" style=" display: flex;"> |
| | | <el-select v-model="form.status" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in whetherOrNot" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è´¨æ£ç±»å" style=" display: flex;"> |
| | | <el-select v-model="form.checktype" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in checktypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="æ½æ ·æ¹å¼" style=" display: flex;"> |
| | | <el-select v-model="form.sampltype" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in sampltypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="éç¨å¯¹è±¡" style=" display: flex;"> |
| | | <el-select v-model="form.suitobject" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in suitobjectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div |
| | | class="bodySearchReset" |
| | | :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}" |
| | | > |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv" style="position: relative;"> |
| | | <TableColumnSettings |
| | | v-if="false" |
| | | :list1="tableColumnSettingsArray" |
| | | @tableColumnUpdate="tableColumnUpdate" |
| | | /> |
| | | <el-table |
| | | :key="tableTimeStampKey" |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- prop="RowNum"--> |
| | | <!-- width="50"--> |
| | | <!-- fixed--> |
| | | <!-- label="åºå·"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="code"--> |
| | | <!-- label="è´¨æ£æ¹æ¡ç¼ç "--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="name"--> |
| | | <!-- label="è´¨æ£æ¹æ¡åç§°"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="status"--> |
| | | <!-- label="ææç¶æ"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.status==='Y'"><i--> |
| | | <!-- class="el-icon-success"--> |
| | | <!-- :style="{color:$store.state.settings.theme}"--> |
| | | <!-- style="margin-right:5px"--> |
| | | <!-- />æ¯--> |
| | | <!-- </div>--> |
| | | <!-- <div v-else-if="row.status==='N'"><i class="el-icon-info" style="margin-right: 5px" />å¦</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="checktype"--> |
| | | <!-- label="è´¨æ£ç±»å"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.checktype">{{ checktypeArr.find(i => i.code === row.checktype).name }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="sampmethod"--> |
| | | <!-- label="æ½æ ·æ¹å¼"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.sampmethod">{{ sampltypeArr.find(i => i.code === row.sampmethod).name }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="suitobject"--> |
| | | <!-- label="éç¨å¯¹è±¡"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.suitobject">{{ suitobjectArr.find(i => i.code === row.suitobject).name }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- prop="username"--> |
| | | <!-- label="å建人å"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="lm_date"--> |
| | | <!-- label="å建æ¶é´"--> |
| | | <!-- width="160"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | |
| | | <el-table-column |
| | | v-for="item in tableColumnSettingsArray" |
| | | v-if="item.show" |
| | | :key="item.id" |
| | | :sortable="item.sortable" |
| | | :prop="item.prop" |
| | | :min-width="item.minWidth" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | show-tooltip-when-overflow |
| | | :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="!row[item.prop]">/</div> |
| | | <div v-else-if="item.prop==='checktype'"> |
| | | {{ checktypeArr.find(i => i.code === row[item.prop]).name }} |
| | | </div> |
| | | <div v-else-if="item.prop==='sampmethod'"> |
| | | {{ sampltypeArr.find(i => i.code === row[item.prop]).name }} |
| | | </div> |
| | | <!-- éç¨å¯¹è±¡--> |
| | | <div v-else-if="item.prop==='suitobject'"> |
| | | {{ suitobjectArr.find(i => i.code === row.suitobject).name }} |
| | | </div> |
| | | <div v-else-if="item.prop==='status'"> |
| | | <div v-if="row.status==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />æ¯</div> |
| | | <div v-if="row.status==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />å¦</div> |
| | | <!-- <div v-if="row.status==='Y'"><i--> |
| | | <!-- class="el-icon-success"--> |
| | | <!-- :style="{color:$store.state.settings.theme}"--> |
| | | <!-- style="margin-right:5px"--> |
| | | <!-- />æ¯--> |
| | | <!-- </div>--> |
| | | <!-- <div v-else-if="row.status==='N'">--> |
| | | <!-- <i class="el-icon-info" style="margin-right: 5px" />å¦--> |
| | | <!-- </div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | </div> |
| | | <div v-else>{{ row[item.prop] }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="æ¥ç" placement="top"> |
| | | <i |
| | | class="el-icon-view" |
| | | style="margin-right:15px;cursor: pointer;color:#42b983" |
| | | @click="check('check',row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="ç¼è¾" placement="top"> |
| | | <i class="el-icon-edit-outline" @click="edit('edit',row)" /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="å é¤" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getQualityInspectionSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="operation==='add'?'æ°å¢':operation==='check'?'æ¥ç':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="1260px" |
| | | :close-on-click-modal="false" |
| | | top="5vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | |
| | | <!-- <div>--> |
| | | <!-- <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0" />åºç¡èµæï¼--> |
| | | <!-- </div>--> |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px"> |
| | | <el-form-item label="è´¨æ£æ¹æ¡ç¼ç " prop="qualityinsptcode"> |
| | | <el-input v-model="dialogForm.qualityinsptcode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="è´¨æ£æ¹æ¡åç§°" prop="qualityinsptname"> |
| | | <el-input v-model="dialogForm.qualityinsptname" style="width: 200px" /> |
| | | </el-form-item> |
| | | <br> |
| | | <el-form-item prop="status" label="ææç¶æ"> |
| | | <el-select |
| | | v-model="dialogForm.status" |
| | | style="width: 200px" |
| | | |
| | | placeholder="è¯·éæ©" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in whetherOrNot" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <br> |
| | | <el-form-item prop="checktype" label="è´¨æ£ç±»å"> |
| | | <el-radio-group v-model="dialogForm.checktype"> |
| | | <!-- <el-radio label="InCheck">å
¥åæ£éª</el-radio>--> |
| | | <!-- <el-radio label="OutCheck">åºåæ£éª</el-radio>--> |
| | | <el-radio label="FirstCheck">馿£æ£éª</el-radio> |
| | | <el-radio label="PatroCheck">å·¡æ£</el-radio> |
| | | <el-radio label="EndCheck">å®å·¥æ£</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <br> |
| | | <el-form-item prop="sampmethod" label="æ½æ ·æ¹å¼"> |
| | | <el-radio-group v-model="dialogForm.sampmethod" style="width: 200px;"> |
| | | <el-radio label="FIXED">åºæ¶æ½æ£</el-radio> |
| | | <el-radio label="SCARE">æ¯ä¾æ½æ£</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogForm.sampmethod==='FIXED'" label="æ ·æ¬æ°é" prop="sampnum"> |
| | | <el-input v-model="dialogForm.sampnum" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogForm.sampmethod==='SCARE'" label="æ½æ£æ¯ä¾" prop="sampscale"> |
| | | <el-input v-model="dialogForm.sampscale" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 180px" /> |
| | | % |
| | | </el-form-item> |
| | | <br> |
| | | <el-form-item prop="suitobject" label="éç¨å¯¹è±¡"> |
| | | <el-radio-group v-model="dialogForm.suitobject" style="width: 200px;" @change="suitobjectChange"> |
| | | <el-radio label="PY">ç©æç±»å«</el-radio> |
| | | <el-radio label="P">ç©æ</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="suitpart" |
| | | :label="dialogForm.suitobject==='P'?'éç¨ç©æ':'éç¨ç©æç±»å«'" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.suitpart" |
| | | style="width: 200px" |
| | | multiple |
| | | filterable |
| | | |
| | | collapse-tags |
| | | placeholder="è¯·éæ©" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in PartSelectArr" |
| | | v-if="dialogForm.suitobject==='P'" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :value="item.partcode" |
| | | /> |
| | | <el-option |
| | | v-for="item in StockTypeSelectArr" |
| | | v-if="dialogForm.suitobject==='PY'" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <br> |
| | | <el-form-item |
| | | v-if="dialogForm.checktype==='FirstCheck'||dialogForm.checktype==='PatroCheck'||dialogForm.checktype==='EndCheck'" |
| | | label="å·¥åºåç§°" |
| | | prop="stepcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.stepcode" |
| | | style="width: 200px" |
| | | filterable |
| | | placeholder="è¯·éæ©" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in StepSelectArr" |
| | | :key="item.stepcode" |
| | | :label="item.stepname" |
| | | :value="item.stepcode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æ£éªæ¹æ¡æè¿°"> |
| | | <el-input v-model="dialogForm.descr" type="textarea" :autosize="{ minRows: 2 }" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div style="display: flex;align-items: center;margin-bottom: 10px;"> |
| | | <div> |
| | | <i |
| | | class="el-icon-s-operation" |
| | | :style="{color:$store.state.settings.theme}" |
| | | style="margin:0 10px 0 0px;" |
| | | /> |
| | | </div> |
| | | <div>è´¨æ£å表ï¼</div> |
| | | <el-button |
| | | v-if="operation!=='check'" |
| | | v-waves |
| | | type="primary" |
| | | style="margin-left: 20px;" |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="addZjlb" |
| | | >æ°å¢ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-table |
| | | ref="tableDataRef2" |
| | | class="tableFixed" |
| | | :data="checkitem" |
| | | height="250" |
| | | style="height:250px" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | width="50" |
| | | fixed |
| | | label="åºå·" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="jyxmbm"--> |
| | | <!-- width="105"--> |
| | | <!-- label="æ£éªé¡¹ç®ç¼ç "--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <el-select--> |
| | | <!-- v-if="row.isVisible===1"--> |
| | | <!-- v-model="row.jyxmbm"--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="è¯·éæ©"--> |
| | | <!-- @change="val=>tableChange(val,row)"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in PartSelectArr"--> |
| | | <!-- :key="item.partname"--> |
| | | <!-- :label="item.partcode"--> |
| | | <!-- :value="item.partname"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- <div v-if="row.isVisible===0">{{ row.jyxmbm }}</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="jyxmmc"--> |
| | | <!-- width="105"--> |
| | | <!-- label="æ£éªé¡¹ç®åç§°"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <el-select--> |
| | | <!-- v-if="row.isVisible===1"--> |
| | | <!-- v-model="row.jyxmmc"--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="è¯·éæ©"--> |
| | | <!-- @change="val=>tableChange(val,row)"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in PartSelectArr"--> |
| | | <!-- :key="item.partname"--> |
| | | <!-- :label="item.partcode"--> |
| | | <!-- :value="item.partname"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- <div v-if="row.isVisible===0">{{ row.jyxmmc }}</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | |
| | | <el-table-column |
| | | prop="stepcheckitem_code" |
| | | width="250" |
| | | label="æ£éªé¡¹ç® / ç¼ç " |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.stepcheckitem_code" |
| | | filterable |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%;" |
| | | > |
| | | <!-- @change="val=>tableChange(val,row)"--> |
| | | <el-option |
| | | v-for="item in CheckItemSelectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | <div v-else>{{ |
| | | CheckItemSelectAllArr.find(i => i.code === row.stepcheckitem_code).name |
| | | }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="required" |
| | | width="85" |
| | | label="æ¯å¦å¿
å¡«" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.required" |
| | | filterable |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in whetherOrNot" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | <div v-else>{{ row.required === 'Y' ? 'æ¯' : 'å¦' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="numberjudge" |
| | | width="85" |
| | | label="æ°å¼å¤å®" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.numberjudge" |
| | | filterable |
| | | placeholder="è¯·éæ©" |
| | | @change="val=>szpdChange(val,row)" |
| | | > |
| | | <el-option |
| | | v-for="item in whetherOrNot" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | <div v-else>{{ row.numberjudge === 'Y' ? 'æ¯' : 'å¦' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-select--> |
| | | <!-- v-if="row.isVisible===1"--> |
| | | <!-- v-model="row.unit"--> |
| | | <!-- filterable--> |
| | | <!-- :disabled="row.numberjudge==='N'"--> |
| | | <!-- placeholder="è¯·éæ©"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in UomSelectArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- <div v-if="row.isVisible===0">{{--> |
| | | <!-- row.numberjudge === 'Y' ? UomSelectArr.find(i => i.code === row.unit).name : '/'--> |
| | | <!-- }}--> |
| | | <!-- </div>--> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.unit" |
| | | placeholder="è¯·éæ©" |
| | | :disabled="row.numberjudge==='N'" |
| | | /> |
| | | <div v-else>{{ row.unit ? row.unit : '/' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="decimalnum" |
| | | width="85" |
| | | label="å°æ°ä½æ°" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-select--> |
| | | <!-- v-if="row.isVisible===1"--> |
| | | <!-- v-model="row.decimalnum"--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="è¯·éæ©"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in PartSelectArr"--> |
| | | <!-- :key="item.partname"--> |
| | | <!-- :label="item.partcode"--> |
| | | <!-- :value="item.partname"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.decimalnum" |
| | | :disabled="row.numberjudge==='N'" |
| | | oninput="value=value.replace(/[^0-9]/g,'')" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <div v-else>{{ row.numberjudge === 'Y' ? row.decimalnum : '/' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="standvalue" |
| | | label="æ åå¼" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.standvalue" |
| | | :disabled="row.numberjudge==='N'" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <div v-else>{{ row.standvalue ? row.standvalue : '/' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="uppervalue" |
| | | label="ä¸éå¼" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.uppervalue" |
| | | :disabled="row.numberjudge==='N'" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <div v-else>{{ row.uppervalue ? row.uppervalue : '/' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="lowervalue" |
| | | label="ä¸éå¼" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.lowervalue" |
| | | :disabled="row.numberjudge==='N'" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <div v-else>{{ row.lowervalue ? row.lowervalue : '/' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="stepcheckitem_desc" |
| | | label="æè¿°" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.stepcheckitem_desc" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <div v-else>{{ row.stepcheckitem_desc ? row.stepcheckitem_desc : '/' }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="operation!=='check'" |
| | | label="æä½" |
| | | width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="saveZjlbRow(row)">确认</el-button> |
| | | <el-button v-if="row.isVisible===1&&isCancel" v-waves type="text" @click="cancelZjlbRow(row)">åæ¶ |
| | | </el-button> |
| | | <el-button v-if="row.isVisible!==1" v-waves type="text" @click="editZjlbRow(row)">ç¼è¾</el-button> |
| | | <el-button v-if="row.isVisible!==1" v-waves type="text" @click="delZjlbRow(row)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-if="operation!=='check'" v-waves @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button |
| | | v-if="operation!=='check'" |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >ä¿ å</el-button> |
| | | <el-button v-if="operation==='check'" v-waves @click="dialogVisibleCancel">è¿ å</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { validateCode } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { PartSelect, StepSelect, StockTypeSelect, UomSelect } from '@/api/zzmx' |
| | | import { |
| | | QualityInspectionAddEditSave, |
| | | QualityInspectionDelete, |
| | | QualityInspectionSearch, QualityInspectionSeeEdit, |
| | | StepCheckItemSelect |
| | | } from '@/api/zlgl' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, TableColumnSettings |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | qualityinsptcode: '', // è´¨æ£æ¹æ¡ç¼ç |
| | | qualityinsptname: '', // è´¨æ£æ¹æ¡åç§° |
| | | status: '', // ææç¶æ |
| | | checktype: '', // è´¨æ£ç±»å |
| | | sampltype: '', // æ½æ ·æ¹å¼ |
| | | suitobject: '', // éç¨å¯¹è±¡ |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | checktypeArr: [ |
| | | { code: 'InCheck', name: 'å
¥åæ£éª' }, |
| | | { code: 'OutCheck', name: 'åºåæ£éª' }, |
| | | { code: 'FirstCheck', name: '馿£' }, |
| | | { code: 'PatroCheck', name: 'å·¡æ£' }, |
| | | { code: 'EndCheck', name: 'å®å·¥æ£' } |
| | | ], |
| | | sampltypeArr: [ |
| | | { code: 'FIXED', name: 'åºå®æ½æ£' }, |
| | | { code: 'SCARE', name: 'æ¯ä¾æ½æ£' } |
| | | ], |
| | | suitobjectArr: [ |
| | | { code: 'P', name: 'ç©æ' }, |
| | | { code: 'PY', name: 'ç©æç±»å' } |
| | | ], |
| | | total: 10, |
| | | tableData: [], |
| | | tableColumnSettingsArray: [ |
| | | // { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // éèå show: falseéèï¼trueæ¾ç¤º |
| | | { minWidth: 25, width: 50, prop: 'RowNum', label: 'åºå·', id: 2, show: true, fixed: 'left', sortable: false }, // custom |
| | | { |
| | | minWidth: 130, |
| | | width: false, |
| | | prop: 'code', |
| | | label: 'è´¨æ£æ¹æ¡ç¼ç ', |
| | | id: 3, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 130, |
| | | width: false, |
| | | prop: 'name', |
| | | label: 'è´¨æ£æ¹æ¡åç§°', |
| | | id: 4, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'status', |
| | | label: 'ææç¶æ', |
| | | id: 5, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'checktype', |
| | | label: 'è´¨æ£ç±»å', |
| | | id: 6, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'sampmethod', |
| | | label: 'æ½æ ·æ¹å¼', |
| | | id: 7, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'suitobject', |
| | | label: 'éç¨å¯¹è±¡', |
| | | id: 8, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'stepcode', |
| | | label: 'å·¥åºç¼ç ', |
| | | id: 9, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'stepname', |
| | | label: 'å·¥åºåç§°', |
| | | id: 10, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'username', |
| | | label: 'å建人å', |
| | | id: 11, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 160, |
| | | prop: 'lm_date', |
| | | label: 'å建æ¶é´', |
| | | id: 12, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | } |
| | | ], |
| | | tableTimeStampKey: new Date().getTime(), // è¡¨æ ¼key |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | qualityinsptcode: '', // è´¨æ£æ¹æ¡ç¼ç |
| | | qualityinsptname: '', // è´¨æ£æ¹æ¡åç§° |
| | | status: 'Y', // ææç¶æ |
| | | checktype: '', // æ£éªç±»å |
| | | sampmethod: 'FIXED', // æ½æ£æ¹å¼ |
| | | sampnum: '', // æ ·æ¬æ°é |
| | | sampscale: '', // æ½æ£æ¯ä¾ |
| | | suitobject: 'P', // éç¨å¯¹è±¡ |
| | | suitpart: [], // éç¨ç©æ |
| | | stepcode: '', // å·¥åº |
| | | descr: '' // /æè¿° |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | status: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | qualityinsptcode: [ |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | | qualityinsptname: [ |
| | | { required: true, message: '请è¾å
¥è´¨æ£æ¹æ¡åç§°', trigger: ['blur', 'change'] } |
| | | ], |
| | | checktype: [ |
| | | { required: true, message: 'è¯·éæ©è´¨æ£æ¹å¼', trigger: ['blur', 'change'] } |
| | | ], |
| | | sampmethod: [ |
| | | { required: true, message: 'è¯·éæ©æ½æ ·æ¹å¼', trigger: ['blur', 'change'] } |
| | | ], |
| | | sampnum: [ |
| | | { required: true, message: '请è¾å
¥æ ·æ¬æ°é', trigger: ['blur', 'change'] } |
| | | ], |
| | | sampscale: [ |
| | | { required: true, message: '请è¾å
¥æ½æ£æ¯ä¾', trigger: ['blur', 'change'] } |
| | | ], |
| | | suitobject: [ |
| | | { required: true, message: 'è¯·éæ©éç¨å¯¹è±¡', trigger: ['blur', 'change'] } |
| | | ], |
| | | suitpart: [ |
| | | { required: true, message: 'è¯·éæ©ç©ææç©æç±»å«', trigger: ['blur', 'change'] } |
| | | ], |
| | | stepcode: [ |
| | | { required: true, message: 'è¯·éæ©å·¥åºåç§°', trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | checkitem: [], |
| | | |
| | | whetherOrNot: [ // æ¯æå¦ |
| | | { code: 'Y', name: 'æ¯' }, |
| | | { code: 'N', name: 'å¦' } |
| | | ], |
| | | |
| | | PartSelectArr: [], // ç©æä¸ææ°ç» |
| | | StockTypeSelectArr: [], // ç©æç±»å«ä¸ææ°ç» |
| | | UomSelectArr: [], // åä½ä¸ææ°ç» |
| | | CheckItemSelectAllArr: [], // æ£éªé¡¹ç®(ææ) |
| | | CheckItemSelectArr: [], // æ£éªé¡¹ç® |
| | | StepSelectArr: [], // å·¥åºåç§°ä¸æææ |
| | | |
| | | isCancel: true// æ¯å¦å¯åæ¶ |
| | | |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.handleRequest() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | | } |
| | | this.tableTimeStampKey = new Date().getTime() |
| | | this.$refs.tableDataRef.doLayout() |
| | | }, |
| | | handleRequest() { |
| | | this.getQualityInspectionSearch().then(res => { |
| | | if (res.code === '200') { |
| | | // this.getUomSelect() |
| | | this.getStepCheckItemSelect() |
| | | this.getPartSelect() |
| | | this.getStockTypeSelect() |
| | | this.getStepSelect() |
| | | } |
| | | }) |
| | | }, |
| | | async getStepSelect() { |
| | | const { data: res } = await StepSelect() |
| | | this.StepSelectArr = res |
| | | }, |
| | | async getQualityInspectionSearch() { |
| | | const res = await QualityInspectionSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | |
| | | return { code: res.code } |
| | | }, |
| | | |
| | | // æåºæ¹åæ¶ |
| | | 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.getQualityInspectionSearch() |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getQualityInspectionSearch() |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.form.qualityinsptcode = '' |
| | | this.form.qualityinsptname = '' |
| | | this.form.status = '' |
| | | this.form.checktype = '' |
| | | this.form.sampltype = '' |
| | | this.form.suitobject = '' |
| | | this.getQualityInspectionSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // æ¥ç |
| | | async check(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | const { data: res } = await QualityInspectionSeeEdit({ qualityinsptcode: row.code }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.qualityinsptcode = row.code |
| | | this.dialogForm.qualityinsptname = row.name |
| | | this.dialogForm.status = row.status |
| | | this.dialogForm.stepcode = row.stepcode |
| | | this.dialogForm.checktype = row.checktype |
| | | this.dialogForm.sampmethod = row.sampmethod |
| | | // this.dialogForm.sampscare = row.sampscare |
| | | if (this.dialogForm.sampmethod === 'FIXED') { |
| | | this.dialogForm.sampnum = row.sampscare |
| | | } else { |
| | | this.dialogForm.sampscale = row.sampscare |
| | | } |
| | | this.dialogForm.suitobject = row.suitobject |
| | | this.dialogForm.suitpart = row.suitpart.split(',') |
| | | this.dialogForm.descr = row.descr |
| | | this.checkitem = res |
| | | |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | const { data: res } = await QualityInspectionSeeEdit({ qualityinsptcode: row.code }) |
| | | |
| | | const tempCodeArr = [] |
| | | res.forEach(i => { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | i.number = number |
| | | i.isVisible = 0 |
| | | tempCodeArr.push(i.stepcheckitem_code) |
| | | }) |
| | | |
| | | this.CheckItemSelectArr = [] |
| | | this.CheckItemSelectAllArr.forEach(i => { |
| | | if (!tempCodeArr.includes(i.code)) { |
| | | this.CheckItemSelectArr.push(i) |
| | | } |
| | | }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.qualityinsptcode = row.code |
| | | this.dialogForm.qualityinsptname = row.name |
| | | this.dialogForm.status = row.status |
| | | this.dialogForm.stepcode = row.stepcode |
| | | this.dialogForm.checktype = row.checktype |
| | | this.dialogForm.sampmethod = row.sampmethod |
| | | if (this.dialogForm.sampmethod === 'FIXED') { |
| | | this.dialogForm.sampnum = row.sampscare |
| | | } else { |
| | | this.dialogForm.sampscale = row.sampscare |
| | | } |
| | | this.dialogForm.suitobject = row.suitobject |
| | | this.dialogForm.suitpart = row.suitpart.split(',') |
| | | this.dialogForm.descr = row.descr |
| | | this.checkitem = res |
| | | // console.log(this.checkitem, 2) |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | QualityInspectionDelete({ qualityinsptcode: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getQualityInspectionSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // ç©æä¸æ |
| | | async getPartSelect() { |
| | | const { data: res } = await PartSelect() |
| | | this.PartSelectArr = res |
| | | }, |
| | | // ç©æç±»å«ä¸æ |
| | | async getStockTypeSelect() { |
| | | const { data: res } = await StockTypeSelect() |
| | | this.StockTypeSelectArr = res |
| | | }, |
| | | // è·ååä½ä¸ææ¥å£ |
| | | async getUomSelect() { |
| | | const { data: res } = await UomSelect() |
| | | this.UomSelectArr = res |
| | | }, |
| | | // éç¨å¯¹è±¡å¼æ¹åæ¯ |
| | | suitobjectChange() { |
| | | this.dialogForm.suitpart = [] |
| | | }, |
| | | // è·åæ£éªé¡¹ç®ä¸ææ¥å£ |
| | | async getStepCheckItemSelect() { |
| | | const { data: res } = await StepCheckItemSelect() |
| | | |
| | | res.forEach(i => { |
| | | this.CheckItemSelectArr.push({ |
| | | code: i.code, |
| | | name: i.name + ' / ' + i.code, |
| | | descr: i.descr |
| | | }) |
| | | }) |
| | | this.CheckItemSelectAllArr = JSON.parse(JSON.stringify(this.CheckItemSelectArr)) |
| | | }, |
| | | // æ°å¼å¤å® |
| | | szpdChange(val, row) { |
| | | if (val === 'N') { |
| | | row.unit = '' |
| | | row.decimalnum = '' |
| | | row.standvalue = '' |
| | | row.uppervalue = '' |
| | | row.lowervalue = '' |
| | | } |
| | | }, |
| | | // è¡¨æ ¼å¼æ¹åæ¶ |
| | | tableChange(val, row) { |
| | | console.log(val, row) |
| | | }, |
| | | // è´¨æ£å表 æ°å¢è¡ |
| | | addZjlb() { |
| | | if (this.checkitem.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请å
ä¿åå½åè¡æ°æ®ï¼') |
| | | } |
| | | |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | |
| | | this.checkitem.push({ |
| | | number, |
| | | isVisible: 1, |
| | | // jyxmbm: '', |
| | | // jyxmmc: '', |
| | | stepcheckitem_code: '', // æ£éªé¡¹ç®ç¼ç |
| | | required: 'Y', // æ¯å¦å¿
å¡« |
| | | numberjudge: 'Y', // æ¯å¦æ°å¼å¤æ |
| | | unit: '', // åä½ |
| | | decimalnum: '', // å°æ°ä½æ° |
| | | standvalue: '', // æ åå¼ |
| | | uppervalue: '', // ä¸éå¼ |
| | | lowervalue: '', // ä¸éå¼ |
| | | stepcheckitem_desc: ''// æ£éªé¡¹ç®æè¿° |
| | | }) |
| | | }, |
| | | // å é¤è´¨æ£åè¡¨è¡ |
| | | delZjlbRow(row) { |
| | | const t = this.CheckItemSelectAllArr.find(i => i.code === row.stepcheckitem_code) |
| | | this.CheckItemSelectArr.unshift(t) |
| | | this.checkitem = this.checkitem.filter(i => i.number !== row.number) |
| | | }, |
| | | // ä¿åè¡ |
| | | saveZjlbRow(row) { |
| | | if (!row.stepcheckitem_code) { |
| | | return this.$message.info('æ£éªé¡¹ç®ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (row.numberjudge === 'Y' && !row.unit) { |
| | | return this.$message.info('åä½ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (row.numberjudge === 'Y' && !row.decimalnum) { |
| | | return this.$message.info('å°æ°ä½æ°ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (row.numberjudge === 'Y') { |
| | | if (!row.standvalue && !row.uppervalue && !row.lowervalue) { |
| | | return this.$message.info('æ åå¼ãä¸éå¼ãä¸éå¼å
¶ä¸ä¸é¡¹ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | } |
| | | this.CheckItemSelectArr = this.CheckItemSelectArr.filter(i => i.code !== row.stepcheckitem_code) |
| | | row.isVisible = 0 |
| | | |
| | | this.isCancel = true |
| | | }, |
| | | // åæ¶è¡ |
| | | cancelZjlbRow(row) { |
| | | this.checkitem = this.checkitem.filter(i => i.number !== row.number) |
| | | }, |
| | | // ç¼è¾è¡ |
| | | editZjlbRow(row) { |
| | | if (this.checkitem.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请å
ä¿åå½åè¡æ°æ®ï¼') |
| | | } |
| | | row.isVisible = 1 |
| | | this.isCancel = false |
| | | const t = this.CheckItemSelectAllArr.find(i => i.code === row.stepcheckitem_code) |
| | | this.CheckItemSelectArr.unshift(t) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm = { |
| | | qualityinsptcode: '', |
| | | qualityinsptname: '', |
| | | status: 'Y', |
| | | checktype: '', |
| | | sampmethod: 'FIXED', |
| | | sampnum: '', |
| | | stepcode: '', |
| | | sampscale: '', |
| | | suitobject: 'P', |
| | | suitpart: [], |
| | | descr: '' |
| | | } |
| | | |
| | | this.isCancel = true |
| | | this.checkitem = [] |
| | | this.CheckItemSelectArr = JSON.parse(JSON.stringify(this.CheckItemSelectAllArr)) |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | if (this.checkitem.length < 1) { |
| | | return this.$message.info('è´¨æ£å表ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | |
| | | const checkitem = [] |
| | | this.checkitem.forEach((item, index) => { |
| | | checkitem.push({ |
| | | stepcheckitem_seq: index + 1, |
| | | stepcheckitem_code: item.stepcheckitem_code, |
| | | stepcheckitem_desc: item.stepcheckitem_desc, |
| | | required: item.required, |
| | | numberjudge: item.numberjudge, |
| | | unit: item.unit, |
| | | decimalnum: item.decimalnum, |
| | | standvalue: item.standvalue, |
| | | uppervalue: item.uppervalue, |
| | | lowervalue: item.lowervalue |
| | | }) |
| | | }) |
| | | const data = { |
| | | qualityinsptcode: this.dialogForm.qualityinsptcode, |
| | | qualityinsptname: this.dialogForm.qualityinsptname, |
| | | status: this.dialogForm.status, |
| | | stepcode: this.dialogForm.checktype === 'InCheck' || this.dialogForm.checktype === 'OutCheck' ? '' : this.dialogForm.stepcode, |
| | | checktype: this.dialogForm.checktype, |
| | | sampmethod: this.dialogForm.sampmethod, |
| | | sampscare: this.dialogForm.sampnum ? this.dialogForm.sampnum : this.dialogForm.sampscale, |
| | | suitobject: this.dialogForm.suitobject, |
| | | suitpart: this.dialogForm.suitpart.join(','), |
| | | type: this.operation === 'add' ? 'Add' : 'Update', |
| | | descr: this.dialogForm.descr, |
| | | checkitem |
| | | } |
| | | |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | QualityInspectionAddEditSave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'ä¿åæåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getQualityInspectionSearch() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'ä¿å失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·å页é¢é«åº¦ |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!--å
Œ
±é¡µé¢æ ·å¼--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | ::v-deep .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-share, .el-icon-delete, .el-icon-edit-outline { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-edit-outline { |
| | | margin-right: 15px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary, .el-button--default, .el-button--info { |
| | | height: 34px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 15px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary { |
| | | //background-color: $main_color !important; |
| | | } |
| | | |
| | | ::v-deep .el-button--default { |
| | | background-color: #f8f8fa; |
| | | border: none; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 34px; |
| | | line-height: 34px; |
| | | //color: #a7a7a7; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | |
| | | ::v-deep .dialogVisibleRoles .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .importPickerClass .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | | |
| | | ::v-deep .cell { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | ::v-deep .el-table::before { |
| | | height: 0; |
| | | } |
| | | |
| | | ::v-deep .el-table__body-wrapper { |
| | | background-color: #f8f8fa; |
| | | } |
| | | |
| | | ::v-deep .el-table__body .el-table__row.hover-row td { |
| | | background-color: #eaecef; |
| | | } |
| | | |
| | | ::v-deep .el-form--inline .el-form-item__label { |
| | | color: #a7a7a7; |
| | | } |
| | | |
| | | .body ::v-deep .el-divider { |
| | | border: 1px solid #eee; |
| | | width: 99%; |
| | | margin: 10px auto; |
| | | } |
| | | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .userDialogVisible ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | proxy: { |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | // target: 'http://121.196.36.24:8007', // 请æ±ç第ä¸â½
æ¥â¼å°å æ¬å°æå¡å¨(å¯å°è¾¾) |
| | | target: 'http://192.168.16.246:8001', // 请æ±ç第ä¸â½
æ¥â¼å°å å®¢æ·æå¡å¨(å¯å°è¾¾) (æªä¸äº) |
| | | target: 'http://121.196.36.24:8007', // 请æ±ç第ä¸â½
æ¥â¼å°å æ¬å°æå¡å¨(å¯å°è¾¾) |
| | | // target: 'http://192.168.16.246:8001', // 请æ±ç第ä¸â½
æ¥â¼å°å å®¢æ·æå¡å¨(å¯å°è¾¾) (æªä¸äº) |
| | | // target: 'http://pn3963.natappfree.cc', // 请æ±ç第ä¸â½
æ¥â¼å°å å®¢æ·æå¡å¨(å¯å°è¾¾) (ä¸äº) |
| | | |
| | | changeOrigin: true, // 请æ±è·¨åæ¶ï¼é é
ç½®æ¤é¡¹ |