|
@@ -68,13 +68,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="body-content" v-if="viewShow" v-loading="loading">
|
|
|
|
|
|
|
+ <div class="body-content" v-if="viewShow">
|
|
|
<div class="right-view">
|
|
<div class="right-view">
|
|
|
<div class="goods-items">
|
|
<div class="goods-items">
|
|
|
<div
|
|
<div
|
|
|
class="show-demo"
|
|
class="show-demo"
|
|
|
v-for="(item, index) in listData"
|
|
v-for="(item, index) in listData"
|
|
|
- :key="item"
|
|
|
|
|
|
|
+ :key="item.id_"
|
|
|
>
|
|
>
|
|
|
<div @click="positionClick(listData[index])">
|
|
<div @click="positionClick(listData[index])">
|
|
|
<div class="goods-level">
|
|
<div class="goods-level">
|
|
@@ -91,8 +91,6 @@
|
|
|
>
|
|
>
|
|
|
<div class="top-dsc">
|
|
<div class="top-dsc">
|
|
|
<div class="position">
|
|
<div class="position">
|
|
|
- <!-- <p>位置id:{{ it.shou_yang_wei_zhi }}</p>
|
|
|
|
|
- <p>货位id:{{ it.id_ }}</p> -->
|
|
|
|
|
<p>样品名称:{{ it.yang_pin_ming_che}}</p>
|
|
<p>样品名称:{{ it.yang_pin_ming_che}}</p>
|
|
|
<p>位置编号:{{ it.wei_zhi_bian_hao_ }}</p>
|
|
<p>位置编号:{{ it.wei_zhi_bian_hao_ }}</p>
|
|
|
<p>样品编号:{{ it.yang_pin_bian_hao }}</p>
|
|
<p>样品编号:{{ it.yang_pin_bian_hao }}</p>
|
|
@@ -158,8 +156,6 @@ export default {
|
|
|
cenghao: [],
|
|
cenghao: [],
|
|
|
warehouse: [],
|
|
warehouse: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
|
- // pagination: {},
|
|
|
|
|
- // secondshow: false,
|
|
|
|
|
desString: "",
|
|
desString: "",
|
|
|
viewShow: false,
|
|
viewShow: false,
|
|
|
placeValue: "选择位置",
|
|
placeValue: "选择位置",
|
|
@@ -202,7 +198,6 @@ export default {
|
|
|
//查询选择数据查询
|
|
//查询选择数据查询
|
|
|
var sqlString =
|
|
var sqlString =
|
|
|
"select distinct fang_jian_lei_xin from t_mjypcfwz WHERE fang_jian_lei_xin !=''";
|
|
"select distinct fang_jian_lei_xin from t_mjypcfwz WHERE fang_jian_lei_xin !=''";
|
|
|
- // var sqlString = "select * from t_mjypcfwz";
|
|
|
|
|
var this_ = this;
|
|
var this_ = this;
|
|
|
curdPost("sql", sqlString).then((response) => {
|
|
curdPost("sql", sqlString).then((response) => {
|
|
|
this_.sampleOption = response.variables.data;
|
|
this_.sampleOption = response.variables.data;
|
|
@@ -230,46 +225,54 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.queryLoad(sql);
|
|
this.queryLoad(sql);
|
|
|
},
|
|
},
|
|
|
- queryLoad(sql) {
|
|
|
|
|
|
|
+ async queryLoad(sql) {
|
|
|
//根据样品信息货位查询相对应的样品登记表
|
|
//根据样品信息货位查询相对应的样品登记表
|
|
|
var datas = [];
|
|
var datas = [];
|
|
|
var labelsMap = {}; // map存储
|
|
var labelsMap = {}; // map存储
|
|
|
var this_ = this;
|
|
var this_ = this;
|
|
|
this_.listData = [];
|
|
this_.listData = [];
|
|
|
- curdPost("sql", sql).then((res) => {
|
|
|
|
|
|
|
+ await curdPost("sql", sql).then((res) => {
|
|
|
|
|
+ console.log(sql)
|
|
|
datas = res.variables.data;
|
|
datas = res.variables.data;
|
|
|
- datas.forEach((item) => {
|
|
|
|
|
- let yangpingSql ="select * from t_mjypdjb WHERE yang_pin_bian_hao = '" +item.yang_pin_bian_hao +"'"; // 通过样品货位配置的id外键 查询样品登记表
|
|
|
|
|
- if (!labelsMap[item.ceng_hao_]) {
|
|
|
|
|
- labelsMap[item.ceng_hao_] = [];//没有就创建
|
|
|
|
|
- curdPost("sql", yangpingSql).then((res) => {
|
|
|
|
|
- if (res.variables.data.length > 0) {
|
|
|
|
|
- let data = res.variables.data;
|
|
|
|
|
- item['yang_pin_ming_che'] = data[0].yang_pin_ming_che;
|
|
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
- }else{
|
|
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- curdPost("sql", yangpingSql).then((res) => {
|
|
|
|
|
- if (res.variables.data.length > 0) {
|
|
|
|
|
- let data = res.variables.data;
|
|
|
|
|
- item['yang_pin_ming_che'] = data[0].yang_pin_ming_che;
|
|
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
- }else{
|
|
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- this_.listData = labelsMap;
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // this.loading = true;
|
|
|
|
|
|
|
+ // datas.forEach((item) => {
|
|
|
|
|
+ // let yangpingSql ="select * from t_mjypdjb WHERE yang_pin_bian_hao = '" +item.yang_pin_bian_hao +"'"; // 通过样品货位配置的id外键 查询样品登记表
|
|
|
|
|
+ // if (!labelsMap[item.ceng_hao_]) {
|
|
|
|
|
+ // labelsMap[item.ceng_hao_] = [];//没有就创建
|
|
|
|
|
+ // curdPost("sql", yangpingSql).then((res) => {
|
|
|
|
|
+ // if (res.variables.data.length > 0) {
|
|
|
|
|
+ // let data = res.variables.data;
|
|
|
|
|
+ // item['yang_pin_ming_che'] = data[0].yang_pin_ming_che;
|
|
|
|
|
+ // labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // curdPost("sql", yangpingSql).then((res) => {
|
|
|
|
|
+ // if (res.variables.data.length > 0) {
|
|
|
|
|
+ // let data = res.variables.data;
|
|
|
|
|
+ // item['yang_pin_ming_che'] = data[0].yang_pin_ming_che;
|
|
|
|
|
+ // labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // labelsMap[item.ceng_hao_].push(item);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
});
|
|
});
|
|
|
|
|
+ datas.forEach(item=>{
|
|
|
|
|
+ if (!labelsMap[item.ceng_hao_]) {
|
|
|
|
|
+ labelsMap[item.ceng_hao_] = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ for(let i=0;i<datas.length;i++){
|
|
|
|
|
+ for(let k in labelsMap){
|
|
|
|
|
+ if(k == datas[i].ceng_hao_){
|
|
|
|
|
+ labelsMap[k].push(datas[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this_.listData = labelsMap;
|
|
|
},
|
|
},
|
|
|
qu_yu_Event(e) {
|
|
qu_yu_Event(e) {
|
|
|
//区间 留样 样品间 点击事件 查询相应的货架号->冰箱 赋值 huo_jia_hao_
|
|
//区间 留样 样品间 点击事件 查询相应的货架号->冰箱 赋值 huo_jia_hao_
|