|
|
@@ -97,8 +97,10 @@
|
|
|
<div class="top-dsc">
|
|
|
<div class="position">
|
|
|
<p>位置:{{ it.wei_zhi_bian_hao_ }}</p>
|
|
|
- <p>样品编号:{{ it.yang_ben_bian_hao_ }}</p>
|
|
|
- <p>样品名称:{{ it.yang_ben_ming_che }}</p>
|
|
|
+ <p>样品编号:{{ it.yang_pin_bian_hao }}</p>
|
|
|
+ <p>样品名称:{{ it.yang_pin_ming_che}}</p>
|
|
|
+ <p>存储条件:{{it.cun_chu_tiao_jian }}</p>
|
|
|
+ <p>收样日期:{{ it.ru_ku_shi_jian_}}</p>
|
|
|
|
|
|
<!-- <p>
|
|
|
存储条件:{{
|
|
|
@@ -199,14 +201,14 @@ export default {
|
|
|
this.loadQueryData();
|
|
|
this.firstLoadViewData();
|
|
|
this.viewShow = !this.viewShow;
|
|
|
- // console.log(this.viewShow);
|
|
|
},
|
|
|
positionClick(values) {
|
|
|
this.viewShow = !this.viewShow;
|
|
|
this.placeValue = values[0].wei_zhi_bian_hao_;
|
|
|
+ let id = values[0].id_
|
|
|
+ console.log(id,"id");
|
|
|
let this_ = this;
|
|
|
- // console.log(values[0].id_, "id");
|
|
|
- this_.$emit("input", values[0].id_); //传导
|
|
|
+ this_.$emit("input", id); //传导
|
|
|
},
|
|
|
|
|
|
firstLoadViewData() {
|
|
|
@@ -222,7 +224,6 @@ export default {
|
|
|
let sql = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_ypcfwz where fang_jian_lei_xin = '样品间' and qu_yu_ ='留样区' order by huo_jia_hao_ asc `;
|
|
|
curdPost("sql", sql).then((response) => {
|
|
|
this_.huo_jia_arr = response.variables.data;
|
|
|
- // console.log(this_.huo_jia_arr, "首次加载货架信息");
|
|
|
});
|
|
|
},
|
|
|
loadQueryData() {
|
|
|
@@ -233,7 +234,6 @@ export default {
|
|
|
curdPost("sql", sqlString)
|
|
|
.then((response) => {
|
|
|
this_.sampleOption = response.variables.data;
|
|
|
- // console.log(this_.sampleOption, "this_.sampleOption");
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err, "err------>");
|
|
|
@@ -253,50 +253,89 @@ export default {
|
|
|
let huo_jia_lei_xing_ = this.formInline.huo_jia_value.split("号")[1];
|
|
|
var gua_jia_hao = this.formInline.gua_jia_value.substr(0, 1);
|
|
|
var sql = `select * from t_ypcfwz where fang_jian_lei_xin = '${fang_jian_}' and qu_yu_ ='${qu_yu}' and huo_jia_lei_xing_ = '${huo_jia_lei_xing_}' and huo_jia_hao_ = '${huo_jia_hao_}'`;
|
|
|
- // console.log(sql);
|
|
|
this.describeFn();
|
|
|
this.queryLoad(sql);
|
|
|
},
|
|
|
- queryLoad(sql) {
|
|
|
+ queryLoad(sql) {
|
|
|
//根据样品信息货位查询相对应的样品登记表
|
|
|
var datas = [];
|
|
|
var labelsMap = {}; // map存储
|
|
|
var this_ = this;
|
|
|
this_.listData = [];
|
|
|
curdPost("sql", sql).then((res) => {
|
|
|
- datas = res.variables.data;
|
|
|
- // console.log(datas, "2222222222 ");
|
|
|
+ datas = res.variables.data;
|
|
|
datas.forEach((item) => {
|
|
|
+ let yangpingSql =
|
|
|
+ "select * from t_lhypdjb WHERE cun_fang_wei_zhi_ = '" +
|
|
|
+ item.id_ +
|
|
|
+ "'"; // 通过样品货位配置的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;
|
|
|
+ item["ru_ku_shi_jian_"] = data[0].ru_ku_shi_jian_
|
|
|
+ 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;
|
|
|
+ item["ru_ku_shi_jian_"] = data[0].ru_ku_shi_jian_
|
|
|
+ labelsMap[item.ceng_hao_].push(item);
|
|
|
+ } else {
|
|
|
+ labelsMap[item.ceng_hao_].push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- // 通过样品货位配置的id外键 查询样品登记表
|
|
|
- let yangpingSql =
|
|
|
- "select * from t_lhypdjb WHERE cun_fang_wei_zhi_ = '" +
|
|
|
- item.id_ +
|
|
|
- "'";
|
|
|
-
|
|
|
- curdPost("sql", yangpingSql).then((res) => {
|
|
|
- var resData = res.variables.data;
|
|
|
-
|
|
|
- if (resData.length > 0) {
|
|
|
- resData.forEach((it) => {
|
|
|
- // console.log(yangpingSql, item, "样品扽飞机表");
|
|
|
- it.wei_zhi_bian_hao_ = item.wei_zhi_bian_hao_;
|
|
|
- labelsMap[item.ceng_hao_].push(it);
|
|
|
- });
|
|
|
- } else {
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
- }
|
|
|
- });
|
|
|
- // console.log(labelsMap, "3333333333");
|
|
|
});
|
|
|
- // this.loading = true;
|
|
|
-
|
|
|
this_.listData = labelsMap;
|
|
|
});
|
|
|
},
|
|
|
+ // queryLoad(sql) {
|
|
|
+ // //根据样品信息货位查询相对应的样品登记表
|
|
|
+ // var datas = [];
|
|
|
+ // var labelsMap = {}; // map存储
|
|
|
+ // var this_ = this;
|
|
|
+ // this_.listData = [];
|
|
|
+ // curdPost("sql", sql).then((res) => {
|
|
|
+ // datas = res.variables.data;
|
|
|
+ // // console.log(datas, "2222222222 ");
|
|
|
+ // datas.forEach((item) => {
|
|
|
+ // if (!labelsMap[item.ceng_hao_]) { //没有就创建
|
|
|
+
|
|
|
+ // labelsMap[item.ceng_hao_] = [];
|
|
|
+ // }
|
|
|
+ // // 通过样品货位配置的id外键 查询样品登记表
|
|
|
+ // let yangpingSql =
|
|
|
+ // "select * from t_lhypdjb WHERE cun_fang_wei_zhi_ = '" +
|
|
|
+ // item.id_ +
|
|
|
+ // "'";
|
|
|
+
|
|
|
+ // curdPost("sql", yangpingSql).then((res) => {
|
|
|
+ // var resData = res.variables.data;
|
|
|
+
|
|
|
+ // if (resData.length > 0) {
|
|
|
+ // resData.forEach((it) => {
|
|
|
+ // it.wei_zhi_bian_hao_ = item.wei_zhi_bian_hao_;
|
|
|
+ // labelsMap[item.ceng_hao_].push(it);
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // labelsMap[item.ceng_hao_].push(item);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // // console.log(labelsMap, "3333333333");
|
|
|
+ // });
|
|
|
+
|
|
|
+ // this_.listData = labelsMap;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
qu_yu_Event(e) {
|
|
|
//区间 留样 样品间 点击事件 查询相应的货架号->冰箱 赋值 huo_jia_hao_
|
|
|
this.huo_jia_arrEvent(e.target.innerText);
|
|
|
@@ -419,7 +458,7 @@ export default {
|
|
|
let sqlString = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_ypcfwz where fang_jian_lei_xin = '${this.formInline.fang_jian_hao_value}' and qu_yu_ = '${newdata}' order by huo_jia_hao_ asc`;
|
|
|
var this_ = this;
|
|
|
this.qu_yu_value = newdata;
|
|
|
- this.quyuShow = olddata;
|
|
|
+ // this.quyuShow = olddata;
|
|
|
// console.log(sqlString, "货架变化");
|
|
|
curdPost("sql", sqlString)
|
|
|
.then((response) => {
|