|
|
@@ -6,7 +6,7 @@
|
|
|
<input type="text" v-model="value" style="opacity: 0; position: fixed" />
|
|
|
</div>
|
|
|
<div class="viewArea" v-if="viewShow">
|
|
|
- <h2 class="title">样品间样品存放位置可视图12</h2>
|
|
|
+ <h2 class="title">样品间样品存放位置可视图</h2>
|
|
|
<div class="close" @click="positionBtn">
|
|
|
<i class="el-icon-circle-close"></i>
|
|
|
</div>
|
|
|
@@ -17,7 +17,9 @@
|
|
|
<li
|
|
|
v-show="item.qu_yu_ !='留样区'"
|
|
|
class="list-item quyu-item"
|
|
|
- :style="{ background: quyuShows == item.qu_yu_+'' ? '#FF9900' : '#0099CC',}"
|
|
|
+ :style="{
|
|
|
+ background: quyuShows == item.qu_yu_+'' ? '#FF9900' : '#0099CC',
|
|
|
+ }"
|
|
|
@click="qu_yu_Event"
|
|
|
v-for="item in quyu_arr"
|
|
|
:key="item.qu_yu_"
|
|
|
@@ -32,7 +34,13 @@
|
|
|
<ul class="list-items">
|
|
|
<li
|
|
|
class="list-item huojia-item"
|
|
|
- :style="{background:huojiashow == item.huo_jia_hao_ + '号' + item.huo_jia_lei_xing_? '#ff9900' : '#0099cc',}"
|
|
|
+ :style="{
|
|
|
+ background:
|
|
|
+ huojiashow ==
|
|
|
+ item.huo_jia_hao_ + '号' + item.huo_jia_lei_xing_
|
|
|
+ ? '#ff9900'
|
|
|
+ : '#0099cc',
|
|
|
+ }"
|
|
|
@click="huo_jia_hao_Event"
|
|
|
v-for="(item, index) in huo_jia_arr"
|
|
|
:key="index"
|
|
|
@@ -64,22 +72,23 @@
|
|
|
</div> -->
|
|
|
</div>
|
|
|
<div class="body-content" >
|
|
|
- <div class="right-view">
|
|
|
- <div class="goods-items" >
|
|
|
+ <div class="right-view" >
|
|
|
+ <div class="goods-items">
|
|
|
<div
|
|
|
class="show-demo"
|
|
|
v-for="(item, index) in listData"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <div @click="positionClick(listData[index])">
|
|
|
+ <div >
|
|
|
<div class="goods-level">
|
|
|
<div class="level-dsc">第{{ index }}层</div>
|
|
|
<div class="goods-list">
|
|
|
<div
|
|
|
class="goods-dsc"
|
|
|
- v-for="it in listData[index]"
|
|
|
- :key="it.id_"
|
|
|
- :style="{background:it.wei_zhi_zhuang_ta == '空余' ? 'green' : '#E6A23C',}"
|
|
|
+ v-for="(it, ind) in listData[index]"
|
|
|
+ :key="ind"
|
|
|
+ :style="{background: it.wei_zhi_zhuang_ta == '空余' ? 'green' : '#E6A23C',}"
|
|
|
+ @click="positionClick(it)"
|
|
|
>
|
|
|
<div class="top-dsc">
|
|
|
<div class="position">
|
|
|
@@ -88,13 +97,39 @@
|
|
|
<p>样品名称:{{ it.yang_pin_ming_che}}</p>
|
|
|
<p>存储条件:{{it.cun_chu_tiao_jian }}</p>
|
|
|
<p>收样日期:{{ it.ru_ku_shi_jian_}}</p>
|
|
|
+
|
|
|
+ <!-- <p>
|
|
|
+ 存储条件:{{
|
|
|
+ it.cun_chu_tiao_jian || it.cun_chu_yao_qiu_
|
|
|
+ }}
|
|
|
+ </p>
|
|
|
+ <p >收样日期:{{ it.shou_yang_ri_qi_}}</p>
|
|
|
+ <p v-if="it.shi_fou_liu_yang_ =='是'">留样期限:{{ it.liu_yang_qi_xian_}}</p>
|
|
|
+ -->
|
|
|
+ <!-- <p>编号:{{it.yang_pin_bian_hao}}</p> -->
|
|
|
+ <!-- <p>批次:</p>
|
|
|
+ <p>有效期:</p> -->
|
|
|
</div>
|
|
|
+ <!-- <div class="right-content" v-if="false">
|
|
|
+ <p v-if="false">编号:{{ it.liu_yang_qi_xian_ }}</p>
|
|
|
+ <p>
|
|
|
+ {{ it.wei_zhi_zhuang_ta || it.yang_pin_ming_che }}
|
|
|
+ </p>
|
|
|
+ <p v-if="false">
|
|
|
+ 存储条件:{{
|
|
|
+ it.cun_chu_tiao_jian || it.cun_chu_yao_qiu_
|
|
|
+ }}
|
|
|
+ </p>
|
|
|
+ </div> -->
|
|
|
<div class="right-content">
|
|
|
<p>
|
|
|
{{ it.wei_zhi_zhuang_ta || it.yang_pin_ming_che }}
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="bottom-dsc" v-if="false">
|
|
|
+ {{ it.wei_zhi_zhuang_ta || it.yang_pin_ming_che }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -113,7 +148,6 @@ export default {
|
|
|
mixins: [FixHeight],
|
|
|
data() {
|
|
|
return {
|
|
|
- value:'',
|
|
|
placeValue: "选择位置",
|
|
|
viewShow: false,
|
|
|
leixingcare: true,
|
|
|
@@ -139,9 +173,11 @@ export default {
|
|
|
leixingcare: true,
|
|
|
cenghao: [],
|
|
|
warehouse: [],
|
|
|
+ loading: false,
|
|
|
// pagination: {},
|
|
|
// secondshow: false,
|
|
|
desString: "",
|
|
|
+ value:'',
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
|
@@ -153,10 +189,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- // created() {
|
|
|
- // this.loadQueryData();
|
|
|
- // this.firstLoadViewData();
|
|
|
- // },
|
|
|
+ created() {
|
|
|
+ // this.loadQueryData();
|
|
|
+ // this.firstLoadViewData();
|
|
|
+ console.log(111)
|
|
|
+ },
|
|
|
methods: {
|
|
|
positionBtn() {
|
|
|
this.loadQueryData();
|
|
|
@@ -164,12 +201,12 @@ export default {
|
|
|
this.viewShow = !this.viewShow;
|
|
|
// console.log(this.viewShow);
|
|
|
},
|
|
|
- positionClick(values) {
|
|
|
+ positionClick(values) {console.log(values.wei_zhi_bian_hao_)
|
|
|
this.viewShow = !this.viewShow;
|
|
|
- this.placeValue = values[0].wei_zhi_bian_hao_;
|
|
|
+ this.placeValue = values.wei_zhi_bian_hao_;
|
|
|
let this_ = this;
|
|
|
- let id = values[0].id_;
|
|
|
- console.log(id,"组件传值id")
|
|
|
+ let id = values.id_;
|
|
|
+
|
|
|
this_.$emit("input", id); //传导
|
|
|
},
|
|
|
|
|
|
@@ -203,93 +240,87 @@ export default {
|
|
|
console.log(err, "err------>");
|
|
|
});
|
|
|
},
|
|
|
- // describeFn() {
|
|
|
- // this.desString =this.formInline.fang_jian_hao_value +this.formInline.qu_yu_value +this.formInline.huo_jia_value +this.formInline.gua_jia_value;
|
|
|
- // },
|
|
|
+ describeFn() {
|
|
|
+ this.desString =
|
|
|
+ this.formInline.fang_jian_hao_value +
|
|
|
+ this.formInline.qu_yu_value +
|
|
|
+ this.formInline.huo_jia_value +
|
|
|
+ this.formInline.gua_jia_value;
|
|
|
+ },
|
|
|
onSubmits(sql) {
|
|
|
var fang_jian_ = this.formInline.fang_jian_hao_value;
|
|
|
var qu_yu = this.formInline.qu_yu_value;
|
|
|
var huo_jia_hao_ = this.formInline.huo_jia_value.split("号")[0];
|
|
|
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_}'`;
|
|
|
+ var sql = `select id_,ceng_hao_ 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.describeFn();
|
|
|
this.queryLoad(sql);
|
|
|
},
|
|
|
- async queryLoad(sql) {
|
|
|
+ async queryLoad(sql) {
|
|
|
//根据样品信息货位查询相对应的样品登记表
|
|
|
- var datas = [];
|
|
|
+ //根据样品信息货位查询相对应的样品登记表
|
|
|
+ var datas = [];
|
|
|
var labelsMap = {}; // map存储
|
|
|
var this_ = this;
|
|
|
this_.listData = [];
|
|
|
await curdPost("sql", sql).then((res) => {
|
|
|
datas = res.variables.data;
|
|
|
});
|
|
|
- console.log(datas)
|
|
|
- let yesids='';
|
|
|
- let noids='';
|
|
|
- // datas.forEach((item,index) => {
|
|
|
- // for(let i =0;i<datas.length;i++){
|
|
|
- // let yangpingSql ="select * from t_lhypdjb WHERE cun_fang_wei_zhi_ = '" +datas[i].id_ +"'"; // 通过样品货位配置的id外键 查询样品登记表
|
|
|
- // if (!labelsMap[datas[i].ceng_hao_]) { //没有就创建
|
|
|
- // labelsMap[datas[i].ceng_hao_] = [];
|
|
|
-
|
|
|
- // await curdPost("sql", yangpingSql).then((res) => {
|
|
|
- // if (res.variables.data.length > 0) {
|
|
|
- // let data = res.variables.data;
|
|
|
- // datas[i]["yang_pin_ming_che"] = data[0].yang_ben_ming_che;
|
|
|
- // datas[i]["ru_ku_shi_jian_"] = data[0].shou_yang_ri_qi_
|
|
|
- // labelsMap[datas[i].ceng_hao_].push(datas[i]);
|
|
|
- // } else {
|
|
|
- // labelsMap[datas[i].ceng_hao_].push(datas[i]);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // await curdPost("sql", yangpingSql).then((res) => {
|
|
|
- // if (res.variables.data.length > 0) {
|
|
|
- // let data = res.variables.data;
|
|
|
- // datas[i]["yang_pin_ming_che"] = data[0].yang_ben_ming_che;
|
|
|
- // datas[i]["ru_ku_shi_jian_"] = data[0].shou_yang_ri_qi_
|
|
|
- // labelsMap[datas[i].ceng_hao_].push(datas[i]);
|
|
|
- // } else {
|
|
|
- // labelsMap[datas[i].ceng_hao_].push(datas[i]);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- datas.forEach((item,index) => {
|
|
|
- let yangpingSql ="select * from t_lhypdjb WHERE cun_fang_wei_zhi_ = '" +item.id_ +"'"; // 通过样品货位配置的id外键 查询样品登记表
|
|
|
- if (!labelsMap[item.ceng_hao_]) { //没有就创建
|
|
|
+ datas.forEach(item=>{
|
|
|
+ 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_ben_ming_che;
|
|
|
- item["ru_ku_shi_jian_"] = data[0].shou_yang_ri_qi_
|
|
|
- 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_ben_ming_che;
|
|
|
- item["ru_ku_shi_jian_"] = data[0].shou_yang_ri_qi_
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
- } else {
|
|
|
- labelsMap[item.ceng_hao_].push(item);
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
- });
|
|
|
-
|
|
|
- this_.listData = labelsMap;
|
|
|
- console.log(this_.listData)
|
|
|
+ })
|
|
|
+ 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;
|
|
|
},
|
|
|
+ // queryLoad(sql) {
|
|
|
+ // //根据样品信息货位查询相对应的样品登记表
|
|
|
+ // var datas = [];
|
|
|
+ // var labelsMap = {}; // map存储
|
|
|
+ // var this_ = this;
|
|
|
+ // this_.listData = [];
|
|
|
+ // curdPost("sql", sql).then((res) => {
|
|
|
+ // datas = res.variables.data;
|
|
|
+ // 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) => {
|
|
|
+ // // 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;
|
|
|
+ // console.log(labelsMap, "22222222")
|
|
|
+ // this_.listData = labelsMap;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
qu_yu_Event(e) {
|
|
|
//区间 留样 样品间 点击事件 查询相应的货架号->冰箱 赋值 huo_jia_hao_
|
|
|
this.huo_jia_arrEvent(e.target.innerText);
|
|
|
@@ -302,23 +333,43 @@ export default {
|
|
|
this.formInline.qu_yu_value = e.target.innerText;
|
|
|
curdPost("sql", sqlString).then((response) => {
|
|
|
this_.huo_jia_arr = response.variables.data;
|
|
|
+ // console.log(this_.huo_jia_arr, "区域点击");
|
|
|
});
|
|
|
- // this.describeFn();
|
|
|
+ this.describeFn();
|
|
|
},
|
|
|
- huo_jia_hao_Event(e) {//货架 冰箱 液氮罐点击事件
|
|
|
+ huo_jia_hao_Event(e) {
|
|
|
+ //货架 冰箱 液氮罐点击事件
|
|
|
this.guajiashow = "";
|
|
|
let selectText = e.target.innerText;
|
|
|
this.guajiaarrEvent(selectText);
|
|
|
this.huojiashow = selectText;
|
|
|
let huojiaNum = selectText.split("号")[0];
|
|
|
this.formInline.huo_jia_value = selectText;
|
|
|
+ // console.log(this.formInline.huo_jia_value, huojiaNum, "value");
|
|
|
let huojialeixing = this.formInline.huo_jia_value.split("号")[1];
|
|
|
var sql = `select * from t_ypcfwz where fang_jian_lei_xin = '${this.formInline.fang_jian_hao_value}' and qu_yu_ = '${this.formInline.qu_yu_value}' and huo_jia_lei_xing_ = '${huojialeixing}' and huo_jia_hao_ = '${huojiaNum}'`;
|
|
|
+ // console.log(sql, "货架点击");
|
|
|
this.queryLoad(sql);
|
|
|
this.formInline.gua_jia_value = "";
|
|
|
- // this.describeFn();
|
|
|
+
|
|
|
+ this.describeFn();
|
|
|
this.formInline.huo_jia_value = selectText;
|
|
|
},
|
|
|
+ // gua_jia_Event(e) {
|
|
|
+ // //液氮罐挂架号点击事件 查询该液氮罐下该挂架的货位位置信息;
|
|
|
+ // let selectText = e.target.innerText;
|
|
|
+ // this.formInline.gua_jia_value = selectText;
|
|
|
+ // this.guajiashow = selectText;
|
|
|
+ // let hguajiaNum = selectText.substr(0, 1);
|
|
|
+ // var fang_jian_hao_value = this.formInline.fang_jian_hao_value;
|
|
|
+ // var huo_jia_value = this.formInline.huo_jia_value;
|
|
|
+ // var sql = `select * from t_mjypcfwz where fang_jian_lei_xin = '${fang_jian_hao_value}' and huo_jia_lei_xing_ = '液氮罐' and huo_jia_hao_ = '${huo_jia_value.substring(
|
|
|
+ // 0,
|
|
|
+ // 1
|
|
|
+ // )}' and gua_jia_hao_= '${hguajiaNum}'`;
|
|
|
+ // this.describeFn();
|
|
|
+ // this.queryLoad(sql);
|
|
|
+ // },
|
|
|
huo_jia_arrEvent(quyu) {
|
|
|
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_ = '${quyu}' order by huo_jia_hao_ asc`;
|
|
|
var this_ = this;
|
|
|
@@ -353,7 +404,7 @@ export default {
|
|
|
this_.formInline.qu_yu_value = "";
|
|
|
this_.formInline.gua_jia_value = "";
|
|
|
this_.formInline.huo_jia_value = "";
|
|
|
- // this_.describeFn();
|
|
|
+ this_.describeFn();
|
|
|
curdPost("sql", sqlString).then((response) => {
|
|
|
let person = response.variables.data;
|
|
|
let obj = {};
|
|
|
@@ -401,7 +452,7 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- // this.describeFn();
|
|
|
+ this.describeFn();
|
|
|
},
|
|
|
"formInline.huo_jia_value": function (newdata, olddata) {
|
|
|
//监控挂架变化 input 输入框数据变化 来改变区域和货架信息(input)
|
|
|
@@ -412,7 +463,37 @@ export default {
|
|
|
this.$emit("input", "");
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ // "formInline.huo_jia_value": function (newdata, olddata) {
|
|
|
+ // //监控货架变化 input 输入框数据变化 来改变区域和货架信息(input)
|
|
|
+ // this.huojiashow = newdata;
|
|
|
+ // //货架 冰箱 液氮罐点击事件
|
|
|
+ // this.guajiashow = "";
|
|
|
+ // let selectText = newdata;
|
|
|
+ // this.guajiaarrEvent(selectText);
|
|
|
+ // this.huojiashow = selectText;
|
|
|
+ // let huojiaNum = selectText.substr(0, 1);
|
|
|
+ // this.formInline.huo_jia_value = selectText;
|
|
|
+ // this.formInline.gua_jia_value = "";
|
|
|
+ // //区分是冰箱和液氮罐的点击事件
|
|
|
+ // if (selectText.includes("冰箱")) {
|
|
|
+ // //如果是冰箱 请求样品货位配置信息 ->查询登记表
|
|
|
+ // } else if (selectText.includes("液氮罐")) {
|
|
|
+ // //液氮罐 查询该液氮罐下所有的挂架
|
|
|
+ // console.log(huojiaNum);
|
|
|
+ // let sqlString = `select distinct gua_jia_hao_ from t_mjypcfwz where huo_jia_lei_xing_ = '液氮罐' and huo_jia_hao_ = '${huojiaNum}' order by gua_jia_hao_ asc`;
|
|
|
+ // var this_ = this;
|
|
|
+ // curdPost("sql", sqlString).then((response) => {
|
|
|
+ // this_.gua_jia_arr = response.variables.data;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // let sqlString = `select distinct gua_jia_hao_ from t_mjypcfwz where huo_jia_lei_xing_ = '液氮罐' and huo_jia_hao_ = '${huojiaNum}' order by gua_jia_hao_ asc`;
|
|
|
+ // var this_ = this;
|
|
|
+ // curdPost("sql", sqlString).then((response) => {
|
|
|
+ // this_.gua_jia_arr = response.variables.data;
|
|
|
+ // });
|
|
|
+ // this.describeFn();
|
|
|
+ // this.formInline.huo_jia_value = selectText;
|
|
|
+ // },
|
|
|
},
|
|
|
};
|
|
|
</script>
|