From a169bda5b19db4714d2aa476504e58105228cc40 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 30 五月 2023 18:01:55 +0800
Subject: [PATCH] 1.对接移动端
---
src/views/zlgl/gxjy.vue | 1321 +++++++++----------
vue.config.js | 4
src/directive/waves/index.js | 13
src/views/zlgl/gxjyjl.vue | 527 +++++--
src/directive/el-drag-dialog/drag.js | 77 +
src/views/scgl/sckbg.vue | 16
src/directive/waves/waves.js | 72 +
src/directive/el-drag-dialog/index.js | 13
src/router/index.js | 6
src/api/zlgl.js | 39
src/views/zlgl/zjfa.vue | 1413 ++++++++++++++++++++++
src/directive/waves/waves.css | 26
src/views/jcsz/jsqd.vue | 62
src/components/DndList/index.vue | 193 +++
src/layout/components/Sidebar/index.vue | 2
src/components/TableColumnSettings/index.vue | 40
16 files changed, 2,910 insertions(+), 914 deletions(-)
diff --git a/src/api/zlgl.js b/src/api/zlgl.js
index f5416c3..09cd13a 100644
--- a/src/api/zlgl.js
+++ b/src/api/zlgl.js
@@ -123,6 +123,7 @@
params: data
})
}
+
// 鐢熶骇寮�鎶ュ伐,宸ュ簭妫�楠屾彁浜や繚瀛�
export function SaveMesOrderStepCheckItem(data) {
return request({
@@ -140,6 +141,7 @@
params: data
})
}
+
// 宸ュ簭妫�楠岃褰曞垪琛ㄦ煡璇�
export function StepCheckTableSubSearch(data) {
return request({
@@ -148,6 +150,7 @@
params: data
})
}
+
// 宸ュ簭妫�楠岃褰曞鍑�
export function StepCheckTableOutExcel(data) {
return request({
@@ -157,3 +160,39 @@
})
}
+// 璐ㄦ鏂规鍒楄〃鏌ヨ
+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
+ })
+}
+
diff --git a/src/components/DndList/index.vue b/src/components/DndList/index.vue
new file mode 100644
index 0000000..1ca6490
--- /dev/null
+++ b/src/components/DndList/index.vue
@@ -0,0 +1,193 @@
+<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 !== ''), // 閲嶇疆榛樿鍊糽abel
+ checkedListDefaultFixed: this.list1.map(i => i.fixed), // 閲嶇疆榛樿鍊糵ixed
+ 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>
diff --git a/src/components/TableColumnSettings/index.vue b/src/components/TableColumnSettings/index.vue
new file mode 100644
index 0000000..09f214e
--- /dev/null
+++ b/src/components/TableColumnSettings/index.vue
@@ -0,0 +1,40 @@
+<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>
diff --git a/src/directive/el-drag-dialog/drag.js b/src/directive/el-drag-dialog/drag.js
new file mode 100644
index 0000000..299e985
--- /dev/null
+++ b/src/directive/el-drag-dialog/drag.js
@@ -0,0 +1,77 @@
+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 姝e垯鍖归厤鏇挎崲
+ 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
+ }
+ }
+ }
+}
diff --git a/src/directive/el-drag-dialog/index.js b/src/directive/el-drag-dialog/index.js
new file mode 100644
index 0000000..29facbf
--- /dev/null
+++ b/src/directive/el-drag-dialog/index.js
@@ -0,0 +1,13 @@
+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
diff --git a/src/directive/waves/index.js b/src/directive/waves/index.js
new file mode 100644
index 0000000..65f9b30
--- /dev/null
+++ b/src/directive/waves/index.js
@@ -0,0 +1,13 @@
+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
diff --git a/src/directive/waves/waves.css b/src/directive/waves/waves.css
new file mode 100644
index 0000000..af7a7ef
--- /dev/null
+++ b/src/directive/waves/waves.css
@@ -0,0 +1,26 @@
+.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;
+}
\ No newline at end of file
diff --git a/src/directive/waves/waves.js b/src/directive/waves/waves.js
new file mode 100644
index 0000000..ec2ff43
--- /dev/null
+++ b/src/directive/waves/waves.js
@@ -0,0 +1,72 @@
+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]
+ }
+}
diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue
index 93ff8fb..f6ec4f2 100644
--- a/src/layout/components/Sidebar/index.vue
+++ b/src/layout/components/Sidebar/index.vue
@@ -28,7 +28,7 @@
</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">鏂板嚡杩埗閫燰1.0.01</el-button>
+ <el-button v-if="$store.state.app.sidebar.opened" type="text" style="font-size: 14px;cursor: pointer">鏂板嚡杩埗閫燰1.5.21</el-button>
<!-- <el-button type="text"><a href="http://www.ykxkd.com/" target="_blank">鏂板嚡杩埗閫燰1.0.01</a></el-button>-->
</div>
</div>
diff --git a/src/router/index.js b/src/router/index.js
index d257ef3..df7b973 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1170,6 +1170,12 @@
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 }
}
]
},
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index c8ad272..7d01709 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -287,7 +287,12 @@
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>
@@ -1132,7 +1137,7 @@
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')
@@ -1204,13 +1209,13 @@
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)
@@ -1223,13 +1228,13 @@
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)
@@ -1244,14 +1249,14 @@
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)
@@ -1268,13 +1273,13 @@
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)
@@ -1290,13 +1295,13 @@
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)
@@ -1552,10 +1557,10 @@
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)// 鑷畾涔夊崟閫夋鍥炴樉
@@ -1578,10 +1583,10 @@
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)// 鑷畾涔夊崟閫夋鍥炴樉
})
@@ -1604,10 +1609,10 @@
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)// 鑷畾涔夊崟閫夋鍥炴樉
})
@@ -1713,10 +1718,11 @@
<!--鍏叡椤甸潰鏍峰紡-->
<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;
@@ -1805,23 +1811,25 @@
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;
}
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 4301899..9c9b645 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -117,7 +117,7 @@
</el-table-column>
<el-table-column
prop="good_qty"
- label="宸叉姤宸ユ暟閲�"
+ label="鍚堟牸鏁伴噺"
sortable="custom"
width="160"
/>
@@ -440,7 +440,7 @@
/>
<el-table-column
prop="good_qty"
- label="宸叉姤宸ユ暟閲�"
+ label="鍚堟牸鏁伴噺"
sortable="custom"
min-width="160"
/>
@@ -592,7 +592,7 @@
/>
</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>
@@ -1002,7 +1002,7 @@
<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="涓嶈壇鏁伴噺锛�">
@@ -1062,7 +1062,7 @@
width="80"
/>
<el-table-column
- label="鎶ュ伐鏁伴噺"
+ label="鍚堟牸鏁伴噺"
width="80"
prop="report_qty"
/>
@@ -2065,8 +2065,8 @@
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(';')// 涓嶈壇鍘熷洜
@@ -2229,7 +2229,7 @@
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
diff --git a/src/views/zlgl/gxjy.vue b/src/views/zlgl/gxjy.vue
index 861f99e..bf2a6a2 100644
--- a/src/views/zlgl/gxjy.vue
+++ b/src/views/zlgl/gxjy.vue
@@ -1,410 +1,336 @@
<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)
@@ -413,371 +339,236 @@
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 = [鈥].filter(x => [鈥].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;
}
@@ -791,15 +582,41 @@
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 {
@@ -853,7 +670,8 @@
}
::v-deep .el-form--inline .el-form-item__label {
- color: #a7a7a7;
+ //color: #a7a7a7;
+ //font-size: 16px;
}
.body ::v-deep .el-divider {
@@ -870,7 +688,110 @@
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 {
diff --git a/src/views/zlgl/gxjyjl.vue b/src/views/zlgl/gxjyjl.vue
index ae3dc1f..b0d3c54 100644
--- a/src/views/zlgl/gxjyjl.vue
+++ b/src/views/zlgl/gxjyjl.vue
@@ -2,9 +2,9 @@
<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">
@@ -13,10 +13,10 @@
: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;">
@@ -28,7 +28,7 @@
<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;">
@@ -55,9 +55,9 @@
</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>
@@ -80,8 +80,14 @@
</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"
@@ -94,137 +100,54 @@
: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>
@@ -246,6 +169,7 @@
</div>
<el-dialog
+ v-el-drag-dialog
title="宸ュ簭妫�楠屾槑缁�"
:visible.sync="dialogVisible"
width="900px"
@@ -256,6 +180,7 @@
>
<div class="elTableDiv">
<el-table
+ ref="tableDataRef2"
:data="tableDataDialog"
:height="(tableHeight-100)+'px'"
border
@@ -277,58 +202,142 @@
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>
@@ -352,13 +361,17 @@
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',
@@ -380,6 +393,8 @@
rows: 20 // 姣忛〉澶氬皯鏉�
},
checktypeArr: [
+ { code: 'InCheck', name: '鍏ュ巶妫�楠�' },
+ { code: 'OutCheck', name: '鍑哄巶妫�楠�' },
{ code: 'FirstCheck', name: '棣栨' },
{ code: 'PatroCheck', name: '宸℃' },
{ code: 'EndCheck', name: '瀹屽伐妫�' }
@@ -391,11 +406,149 @@
total: 10,
tableData: [],
+ tableColumnSettingsArray: [
+ { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // 闅愯棌鍒� show: false闅愯棌锛宼rue鏄剧ず
+ { 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: []// 瀵硅瘽妗嗗姩鎬佺殑鏁扮粍
}
},
@@ -414,6 +567,13 @@
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
@@ -459,10 +619,29 @@
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()
+ })
},
// 鏂板鎸夐挳
@@ -503,11 +682,7 @@
},
// 瀵硅瘽妗嗗叧闂簨浠�
handleClose() {
- this.dialogForm.OrgType = ''
- this.dialogForm.OrgCode = ''
- this.dialogForm.OrgName = ''
- this.dialogForm.SupUnit = ''
- this.$refs.dialogForm.clearValidate()
+ this.tableDataDialog = []
},
// 瀵硅瘽妗嗗彇娑�
dialogVisibleCancel() {
diff --git a/src/views/zlgl/zjfa.vue b/src/views/zlgl/zjfa.vue
new file mode 100644
index 0000000..fbf50dc
--- /dev/null
+++ b/src/views/zlgl/zjfa.vue
@@ -0,0 +1,1413 @@
+<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闅愯棌锛宼rue鏄剧ず
+ { 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>
diff --git a/vue.config.js b/vue.config.js
index 38c059d..e6dc3f1 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -50,8 +50,8 @@
},
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, // 璇锋眰璺ㄥ煙鏃讹紝闇� 閰嶇疆姝ら」
--
Gitblit v1.9.3