From 6ef9e5189ac1888b8c4c504d5c5d3f431807ff56 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 15 三月 2025 11:57:40 +0800
Subject: [PATCH] 修改电路试验单位
---
src/components/view/b1-sample.vue | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue
index e0f44c6..244755c 100644
--- a/src/components/view/b1-sample.vue
+++ b/src/components/view/b1-sample.vue
@@ -443,6 +443,7 @@
watch:{
storageVisible(newVal){
if(newVal){
+ this.selectList()
this.sampleCode = null
this.entrustCode = null
// this.$message.success('鎵爜锛氭墦寮�')
@@ -521,20 +522,37 @@
this.storageList = this.HaveJson(res.data).map(item=>{
item.warehouseShelfList&&item.warehouseShelfList.length>0&&item.warehouseShelfList.map(m=>{
let warehouseShelfList = [];
- for (let i=1;i<m.row+1;i++){
- let warehouseShelfList0 = []
- for (let j=1;j<m.col+1;j++){
+ let warehouseShelfList0 = []
+ let warehouseCellList = m.warehouseCellList?m.warehouseCellList:[]
+ warehouseCellList.forEach(a=>{
+ if(warehouseShelfList.find(n=>n.id==a.row)){
warehouseShelfList0.push({
- name:j+' 鍒�',
- id:j,
+ name:a.col+'鍒�',
+ id:a.col
+ })
+ }else if(warehouseShelfList.length==0){
+ warehouseShelfList.push({
+ name:a.row+'灞�',
+ id:a.row
+ })
+ warehouseShelfList0.push({
+ name:a.col+'鍒�',
+ id:a.col
+ })
+ }else if(!warehouseShelfList.find(n=>n.id==a.row)){
+ warehouseShelfList[warehouseShelfList.length-1].warehouseShelfList = JSON.parse(JSON.stringify(warehouseShelfList0))
+ warehouseShelfList0 = []
+ warehouseShelfList.push({
+ name:a.row+'灞�',
+ id:a.row
+ })
+ warehouseShelfList0.push({
+ name:a.col+'鍒�',
+ id:a.col
})
}
- warehouseShelfList.push({
- name:i+' 灞�',
- id:i,
- warehouseShelfList:warehouseShelfList0
- })
- }
+ })
+ warehouseShelfList[warehouseShelfList.length-1].warehouseShelfList = JSON.parse(JSON.stringify(warehouseShelfList0))
m.warehouseShelfList = warehouseShelfList;
return m;
})
@@ -819,7 +837,7 @@
handleShelf(e,sampleCode=''){
if(e){
this.tableLoading = true;
- this.$axios.get(this.$api.warehouse.getWarehouse+'?shelfId='+e+'&sampleCode='+sampleCode).then(res => {
+ this.$axios.get(this.$api.warehouse.getWarehouse+'?shelfId='+e+'&sampleCode='+(sampleCode?sampleCode:'')).then(res => {
this.tableLoading = false;
let data = res.data;
let set =new Set()
--
Gitblit v1.9.3