From e66d566722ec3e65cb93e36bc71b3926e6a318fc Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 04 十二月 2023 13:20:27 +0800
Subject: [PATCH] modified: src/views/product/workbench/feed-form.vue modified: src/views/product/workbench/feed-pane.vue modified: src/views/quality/Packaging_ledger/index.vue modified: src/views/quality/packageinspect/index.vue modified: src/views/quality/packageinspect/packageInspect-form.vue
---
src/views/quality/packageinspect/index.vue | 2
src/views/product/workbench/feed-pane.vue | 8 ++
src/views/quality/packageinspect/packageInspect-form.vue | 65 +++++++++++++--------
src/views/quality/Packaging_ledger/index.vue | 2
src/views/product/workbench/feed-form.vue | 49 +++++++++++++---
5 files changed, 90 insertions(+), 36 deletions(-)
diff --git a/src/views/product/workbench/feed-form.vue b/src/views/product/workbench/feed-form.vue
index ccfa65d..e2c0374 100644
--- a/src/views/product/workbench/feed-form.vue
+++ b/src/views/product/workbench/feed-form.vue
@@ -1,6 +1,7 @@
<template>
<el-dialog
- width="40%"
+ width="60%"
+ top="5vh"
title="鎶曟枡"
:visible.sync="innerVisible"
append-to-body
@@ -15,17 +16,20 @@
:key="tableKey"
:data="dataList"
border
- style="width: 100%;"
+ height="400"
+ style="width: 100%;overflow-y: scroll;"
@cell-dblclick="dblhandleCurrentChange"
show-summary
:span-method="objectSpanMethod"
:summary-method="getSummaries"
>
+ <el-table-column header-align="center" align="center" type="index" label="搴忓彿"></el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="center"
label="闆朵欢缂栧彿"
+ show-overflow-tooltip
>
</el-table-column>
<el-table-column
@@ -33,6 +37,7 @@
header-align="center"
align="center"
label="闆朵欢"
+ show-overflow-tooltip
>
</el-table-column>
<el-table-column
@@ -40,6 +45,7 @@
header-align="center"
align="center"
label="鎵瑰彿"
+ show-overflow-tooltip
>
</el-table-column>
<!-- <el-table-column
@@ -72,7 +78,13 @@
header-align="center"
align="center"
label="鍗曚綅"
+ show-overflow-tooltip
>
+ </el-table-column>
+ <el-table-column prop="menu" label="鎿嶄綔" header-align="center" align="center">
+ <template scope="scope">
+ <el-button type="text" icon="el-icon-circle-close" @click="cancelFeed(scope.$index,scope.row)">鍙栨秷</el-button>
+ </template>
</el-table-column>
</el-table>
</div>
@@ -142,6 +154,12 @@
password: null
}
},
+ beforeUpdate(){
+ this.$nextTick(()=>{
+ this.objectSpanMethod()
+ this.$refs.table.doLayout()
+ })
+ },
directives: {
focus: {
inserted: function(el, option) {
@@ -162,6 +180,10 @@
}
},
methods: {
+ //鎶曞叆鍙栨秷鎸夐挳
+ cancelFeed(index,row){
+ this.dataList.splice(index,1)
+ },
confirmData() {
if (this.password != null) {
checkSubmitPassword({ password: this.password }).then((response) => {
@@ -286,16 +308,16 @@
return reg.test(value)
},
objectSpanMethod() {
- setTimeout(() => {
+ this.$nextTick(()=>{
if (this.$refs.table.$el) {
const current = this.$refs.table.$el
.querySelector('.el-table__footer-wrapper')
.querySelector('.el-table__footer')
const cell = current.rows[0].cells
// cell[1].style.display = 'none'
- cell[0].colSpan = '4'
+ cell[0].colSpan = '6'
}
- }, 50)
+ })
},
getSummaries(param) {
const { columns, data } = param
@@ -325,12 +347,19 @@
},
watch: {
currshowlist() {
- this.innerVisible = this.currshowlist
- this.password = null
- if (this.currshowlist) {
- this.$nextTick(() => {})
+ const _than = this
+ _than.innerVisible = _than.currshowlist
+ _than.password = null
+ if (!_than.currshowlist) {
+ _than.$nextTick(() => {
+ })
}
- }
+ },
+ },
+ created(){
+ this.$nextTick(()=>{
+ this.objectSpanMethod()
+ })
},
mounted() {}
}
diff --git a/src/views/product/workbench/feed-pane.vue b/src/views/product/workbench/feed-pane.vue
index 24ba340..86589ee 100644
--- a/src/views/product/workbench/feed-pane.vue
+++ b/src/views/product/workbench/feed-pane.vue
@@ -2200,6 +2200,14 @@
}
},
watch: {
+ showFeedForm:{
+ handler(newVal,oldVal){
+ if(!newVal){
+ this.$refs.stockTable.toggleAllSelection(false)
+ }
+ },
+ deep: true
+ },
workstationId() {
this.$nextTick(() => {
if (this.currItem != null && this.currItem === 'feed') {
diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index 48af699..0b27c4a 100644
--- a/src/views/quality/Packaging_ledger/index.vue
+++ b/src/views/quality/Packaging_ledger/index.vue
@@ -241,7 +241,7 @@
operator: [
{
text: '妫�楠�',
- icon: 'el-icon-delete',
+ icon: 'el-icon-position',
type: 'text',
size: 'small',
fun: this.check
diff --git a/src/views/quality/packageinspect/index.vue b/src/views/quality/packageinspect/index.vue
index 1e7783d..a575e60 100644
--- a/src/views/quality/packageinspect/index.vue
+++ b/src/views/quality/packageinspect/index.vue
@@ -204,7 +204,7 @@
query: {
id: row == null ? null : row.id
},
- params:{resultVal : row == null ? null : row.result}
+ params:{resultVal : row.result=='' ? null : row.result}
})
},
formatResult(row, column, cellValue){
diff --git a/src/views/quality/packageinspect/packageInspect-form.vue b/src/views/quality/packageinspect/packageInspect-form.vue
index b34bfa9..891b0dd 100644
--- a/src/views/quality/packageinspect/packageInspect-form.vue
+++ b/src/views/quality/packageinspect/packageInspect-form.vue
@@ -3,7 +3,8 @@
<div class="page-header">
<div class="header-left">
<a @click="$router.go(-1)"><i class="icon-btn-back"></i></a>
- <h2>缂栬緫-鍖呰妫�楠�</h2>
+ <h2 v-if="resultVal=='' || resultVal==null">缂栬緫-鍖呰妫�楠�</h2>
+ <h2 v-else>鏌ョ湅-鍖呰妫�楠�</h2>
</div>
<div class="btn-group header-right">
</div>
@@ -65,10 +66,10 @@
<el-row :gutter="10" style="width:100%;z-index: 10;height:50px;">
<el-col :span="20">妫�楠岄」鐩�</el-col>
<el-col :span="2">
- <el-button v-if="resultVal==''" style="width:100%" size="small" @click="clickAddLine()">娣诲姞妫�楠岄」鐩�</el-button>
+ <el-button v-if="resultVal=='' || resultVal==null" style="width:100%" size="small" @click="clickAddLine()">娣诲姞妫�楠岄」鐩�</el-button>
</el-col>
<el-col :span="2">
- <el-button v-if="resultVal==''" style="width:100%" type="primary" size="small"
+ <el-button v-if="resultVal=='' || resultVal==null" style="width:100%" type="primary" size="small"
@click="savePackIns()">淇濆瓨</el-button>
</el-col>
</el-row>
@@ -89,14 +90,14 @@
</el-table-column>
<el-table-column prop="name" label="椤圭洰" width="260">
<template slot-scope="scope">
- <el-input :readonly="resultVal!=''" v-if="scope.row.children" class="inline-input" style="width:90%;" v-model="scope.row.name"
+ <el-input :readonly="resultVal!=null" v-if="scope.row.children" class="inline-input" style="width:90%;" v-model="scope.row.name"
placeholder="璇疯緭鍏ラ」鐩悕绉�"></el-input>
</template>
</el-table-column>
<el-table-column prop="required" label="瑕佹眰" width="260">
<template slot-scope="scope">
<div v-if="!scope.row.children">
- <el-input :readonly="resultVal!=''" v-model="scope.row.required"
+ <el-input :readonly="resultVal!=null" v-model="scope.row.required"
placeholder="璇疯緭鍏ヨ姹�"></el-input>
</div>
</template>
@@ -104,19 +105,19 @@
<el-table-column prop="note" label="妫�楠屾弿杩�" width="260" >
<template slot-scope="scope">
<div v-if="!scope.row.children">
- <el-input :readonly="resultVal!=''" v-model="scope.row.note" placeholder="妫�楠屾弿杩�"></el-input>
+ <el-input :readonly="resultVal!=null" v-model="scope.row.note" placeholder="妫�楠屾弿杩�"></el-input>
</div>
</template>
</el-table-column>
<el-table-column prop="testState" label="缁撹" min-width="150">
<template slot-scope="scope">
- <el-select :disabled="resultVal!=''" @change="changeResult" v-model="scope.row.result" v-if="!scope.row.children">
+ <el-select style="width:100%" :disabled="resultVal!=null" @change="changeResult" v-model="scope.row.result" v-if="!scope.row.children">
<el-option label="鍚堟牸" value="鍚堟牸"></el-option>
<el-option label="涓嶅悎鏍�" value="涓嶅悎鏍�"></el-option>
</el-select>
</template>
</el-table-column>
- <el-table-column v-if="resultVal==''" fixed="right" style="background-color: white;" label="鎿嶄綔" width="200">
+ <el-table-column v-if="resultVal=='' || resultVal==null" fixed="right" style="background-color: white;" label="鎿嶄綔" width="200">
<template slot-scope="scope">
<el-button v-if="scope.row.children" icon="el-icon-circle-plus-outline" type="text" @click="clickAddChildren(scope.row,scope.$index)">娣诲姞琛�</el-button>
<el-button v-if="!scope.row.children" icon="el-icon-circle-close" type="text"
@@ -143,7 +144,7 @@
<el-table-column prop="userName" label="妫�楠屽憳"></el-table-column>
<el-table-column prop="result" label="妫�楠岀粨璁�">
<template slot-scope="scope">
- <el-select :disabled="resultVal!=''" style="width:100%" v-model="scope.row.result">
+ <el-select :disabled="resultVal!=null" style="width:100%" v-model="scope.row.result">
<el-option label="鍚堟牸" value="鍚堟牸"></el-option>
<el-option label="涓嶅悎鏍�" value="涓嶅悎鏍�"></el-option>
</el-select>
@@ -151,7 +152,7 @@
</el-table-column>
<el-table-column label="鎿嶄綔">
<template>
- <el-button type="text" :disabled="resultVal!=''" @click="submitSave()" size="small">涓婃姤</el-button>
+ <el-button type="text" :disabled="resultVal!=null" @click="submitSave()" size="small">涓婃姤</el-button>
</template>
</el-table-column>
</el-table>
@@ -221,15 +222,13 @@
this.init()
},
watch:{
- list(){
- this.changeResult()
- }
},
methods:{
changeResult(){
- let result = '鍚堟牸'
+ let result = ''
let data = this.list
if(data){
+ result='鍚堟牸'
data.forEach(item=>{
if(item.children){
item.children.forEach(ele=>{
@@ -244,26 +243,39 @@
},
//涓婃姤
submitSave(){
- let data = {
- id: this.dataForm.id,
- result: this.conclusionTable[0].result,
+ const _than = this
+ this.$confirm('涓婃姤鍓嶏紝璇风‘璁ゆ楠岄」鐩槸鍚﹀凡淇濆瓨!', '鎻愮ず', {
+ confirmButtonText: '纭涓婃姤',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ let data = {
+ id: _than.dataForm.id,
+ result: _than.conclusionTable[0].result,
}
updatePackageInspectById(data).then(res => {
if(res.data.code === 0){
- this.resultVal = res.data.data
- sessionStorage.setItem("packIns-resultVal-"+this.dataForm.id,res.data.data)
- this.$message.success("涓婃姤鎴愬姛");
+ _than.resultVal = res.data.data
+ sessionStorage.setItem("packIns-resultVal-"+_than.dataForm.id,res.data.data)
+ _than.$message.success("涓婃姤鎴愬姛");
}else{
- this.$message.error("涓婃姤澶辫触",res.data.data);
+ _than.$message.error("涓婃姤澶辫触",res.data.data);
}
- });
+ })
+ }).catch(() => {})
},
// 娣诲姞琛�
- clickAddLine(row) {
+ clickAddLine() {
this.list.push({
name: '',
randomId: Math.random(),
- children: []
+ children: [{
+ name: '',
+ note: '',
+ required: '',
+ result: '',
+ randomId: Math.random(),
+ }]
})
},
//娣诲姞瀛愮骇
@@ -368,6 +380,11 @@
userName: Array.from(new Set(userNameList)).join(','),
result: null
}]
+ this.$nextTick(()=>{
+ if(this.list.length>0){
+ this.changeResult()
+ }
+ })
}).catch(error=>{
this.$message.error("鑾峰彇澶辫触",error)
})
--
Gitblit v1.9.3