From 16d86c76d55eb062fa11ba6272e97379e0496d9d Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 12 六月 2024 14:43:51 +0800
Subject: [PATCH] 检验下单RTS功能修改
---
src/components/do/b1-inspect-order-plan/Inspection.vue | 58 ++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index f29a1e4..d97b387 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -235,7 +235,7 @@
<el-input clearable v-model="insOrder.appointed" disabled size="small" placeholder="璇疯緭鍏�"></el-input>
</el-form-item>
<el-form-item label="褰撳墠鏍峰搧浣嶆暟:">
- <el-tag v-if="currentSample.index">{{ `NO.${currentSample.index}` }}</el-tag>
+ <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>
</el-form-item>
</el-form>
</div>
@@ -255,7 +255,7 @@
:rowspan="n.v.mc&&n.v.mc.rs?n.v.mc.rs:1"
:style="`background:${n.v.bg};color:${n.v.fc};font-size:${n.v.fs}px;width:${handleWidth(n)}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl?'bold':''};`">
<div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`"
- :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]}px;`">
+ :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]}px;background:${n.v.bg};`">
<template v-if="n.v.ps!=undefined && n.v.ps.value==='妫�楠屽��' && state==1">
<el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v"
:disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
@@ -308,10 +308,10 @@
<span :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span>
</template>
<template v-else-if="n.v.ps!=undefined && n.v.ps.value==='鏍峰搧缂栧彿'">
- <div style="display: flex;flex-wrap: nowrap;align-items: center;">
- <i class="el-icon-caret-left table_caret" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i>
- <div :style="`font-family:${n.v.ff} !important;`">{{currentSample.sampleCode}}</div>
- <i class="el-icon-caret-right table_caret"
+ <div style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%" :title="currentSample.sampleCode">
+ <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i>
+ <div :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">{{currentSample.sampleCode}}</div>
+ <i class="el-icon-caret-right table_caret" style="width: 16px;"
v-if="!currentFiberOpticTape&&!currentFiberOptic"@click="caretSample(1)"></i>
</div>
</template>
@@ -356,11 +356,12 @@
:data="{
orderId:id
}"
- v-show="state==1"
+ v-show="state==1&&fileAdd"
:on-success="handleSuccessUp" :show-file-list="false"
accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" :on-change="beforeUpload"
+ style="width: 80px !important;"
:on-error="onError" ref='upload'>
- <el-button size="small" type="primary" :loading="upLoading">闄勪欢涓婁紶</el-button></el-upload>
+ <el-button size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload>
<ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList"
:componentData="componentData0"
:delUrl="$api.insOrderPlan.delfile"
@@ -475,6 +476,7 @@
},
data() {
return {
+ fileAdd:false,
sampleVisible: false,
taskVisible: false,
submitLoading: false,
@@ -516,11 +518,15 @@
isIndex: true,
showSelect: false,
select: false,
- selectMethod: '',
sort: false,
init:false,
do: [
{
+ id: 'handleDown',
+ font: '涓嬭浇',
+ type: 'text',
+ method: 'handleDown'
+ },{
id: 'delete',
font: '鍒犻櫎',
type: 'text',
@@ -528,12 +534,7 @@
disabFun: (row, index) => {
return this.state!=1
}
- }, {
- id: 'handleDown',
- font: '涓嬭浇',
- type: 'text',
- method: 'handleDown'
- },
+ }
],
isPage: false,
linkEvent: {},
@@ -619,6 +620,7 @@
this.getComparisonList()
this.getAuthorizedPerson()
this.scrollInit()
+ this.getPower()
},
watch: {
id(val) {
@@ -635,6 +637,10 @@
this.insOrder.typeName = m.label
}
})
+ this.loading = false
+ if(!res.data.sampleProduct||res.data.sampleProduct.length==0){
+ return this.$message.error('璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�')
+ }
this.sampleProduct = res.data.sampleProduct
this.currentSample = this.HaveJson(this.sampleProduct[0])
let list = await this.getCurrentProduct(this.currentSample.id,0)
@@ -651,7 +657,6 @@
})
if (this.currentSample.index == undefined) this.currentSample['index'] = 1
let bushing = this.currentSample.bushing
- this.loading = false
// this.handleTableData()
this.getTableLists();
this.componentData.currentId = val;
@@ -682,6 +687,23 @@
}
},
methods: {
+ getPower(){
+ let power = JSON.parse(sessionStorage.getItem('power'))
+ let fileDel = false
+ let fileAdd = false
+ for (var i = 0; i < power.length; i++) {
+ if (power[i].menuMethod == 'uploadFile') {
+ fileAdd = true
+ }
+ if (power[i].menuMethod == 'delfile') {
+ fileDel = true
+ }
+ }
+ if (!fileDel) {
+ this.componentData0.do.splice(1, 1)
+ }
+ this.fileAdd = fileAdd
+ },
async getCurrentProduct(id,type){
this.tableLoading = true;
let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
@@ -1780,10 +1802,10 @@
if (res.code === 200) {
let url = '';
if(res.data.type==1){
- url = this.javaApi+'/img/'+res.data.url
+ url = this.javaApi+'/img/'+res.data.fileUrl
file.downloadIamge(url,row.fileName)
}else{
- url = this.javaApi+'/word/'+res.data.url
+ url = this.javaApi+'/word/'+res.data.fileUrl
const link = document.createElement('a');
link.href = url;
link.download = row.fileName;
--
Gitblit v1.9.3