|
@@ -236,11 +236,14 @@
|
|
|
USER_INFO
|
|
USER_INFO
|
|
|
} from "@/common/util/constants"
|
|
} from "@/common/util/constants"
|
|
|
import order from '../order/test.json'
|
|
import order from '../order/test.json'
|
|
|
|
|
+ import specimenBox from './js/specimenBox.js'
|
|
|
|
|
+ import meth from '../order/meth'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
userid: '',
|
|
userid: '',
|
|
|
id: '',
|
|
id: '',
|
|
|
|
|
+ weiTuoBianHao: '',
|
|
|
form: {
|
|
form: {
|
|
|
yang_pin_ming_che: '',
|
|
yang_pin_ming_che: '',
|
|
|
yang_pin_bian_hao: '',
|
|
yang_pin_bian_hao: '',
|
|
@@ -305,7 +308,8 @@
|
|
|
jianCeListShow: false,
|
|
jianCeListShow: false,
|
|
|
content: ``,
|
|
content: ``,
|
|
|
meassageShow: false,
|
|
meassageShow: false,
|
|
|
- title: ''
|
|
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ content: null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -317,6 +321,10 @@
|
|
|
this.id = option.id
|
|
this.id = option.id
|
|
|
this.getDe(option.id)
|
|
this.getDe(option.id)
|
|
|
}
|
|
}
|
|
|
|
|
+ if (option.weiTuoBianHao) {
|
|
|
|
|
+ this.weiTuoBianHao = option.weiTuoBianHao
|
|
|
|
|
+ this.getLH(option.weiTuoBianHao)
|
|
|
|
|
+ }
|
|
|
this.getYpbzggb()
|
|
this.getYpbzggb()
|
|
|
this.getYplxb()
|
|
this.getYplxb()
|
|
|
},
|
|
},
|
|
@@ -358,9 +366,7 @@
|
|
|
//样品详情
|
|
//样品详情
|
|
|
getDe(id) {
|
|
getDe(id) {
|
|
|
let sql = `select * from t_lhypb where id_ = '${id}'`
|
|
let sql = `select * from t_lhypb where id_ = '${id}'`
|
|
|
-
|
|
|
|
|
let requestData = this.$sig(sql)
|
|
let requestData = this.$sig(sql)
|
|
|
-
|
|
|
|
|
this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
|
|
this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
|
|
|
if (res.data.state == 200) {
|
|
if (res.data.state == 200) {
|
|
|
let result = res.data.variables.data[0]
|
|
let result = res.data.variables.data[0]
|
|
@@ -420,6 +426,20 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ getLH(weiTuoBianHao) {
|
|
|
|
|
+ let sql =
|
|
|
|
|
+ `select * from t_mjsjdzcb where wei_tuo_dan_hao_ = '${weiTuoBianHao}' order by create_time_ desc`
|
|
|
|
|
+ let requestData = this.$sig(sql)
|
|
|
|
|
+ this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
|
|
|
|
|
+ if (res.data.state == 200) {
|
|
|
|
|
+ const datas = res.data.variables.data
|
|
|
|
|
+ if (datas.length > 0) {
|
|
|
|
|
+ let result = datas[0]
|
|
|
|
|
+ this.content = JSON.parse(result.bao_cun_nei_rong_)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//查询检测项目
|
|
//查询检测项目
|
|
|
getJiangCeDe(id) {
|
|
getJiangCeDe(id) {
|
|
|
let sql = `select * from t_mjjcnlfw where FIND_IN_SET(id_,'${id}')`
|
|
let sql = `select * from t_mjjcnlfw where FIND_IN_SET(id_,'${id}')`
|
|
@@ -473,10 +493,8 @@
|
|
|
},
|
|
},
|
|
|
//修改样品
|
|
//修改样品
|
|
|
getSave() {
|
|
getSave() {
|
|
|
- var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
|
|
|
|
|
- var time = nowDate.toJSON().split('T').join(' ').substr(0, 19)
|
|
|
|
|
this.form.update_by_ = this.userid
|
|
this.form.update_by_ = this.userid
|
|
|
- this.form.update_time_ = time
|
|
|
|
|
|
|
+ this.form.update_time_ = meth.time(19)
|
|
|
this.form.yang_pin_zong_shu = parseInt(this.form.shu_liang_si_) + parseInt(this.form.shu_liang_san_) +
|
|
this.form.yang_pin_zong_shu = parseInt(this.form.shu_liang_si_) + parseInt(this.form.shu_liang_san_) +
|
|
|
parseInt(this.form.shu_liang_er_) + parseInt(this.form.shu_liang_)
|
|
parseInt(this.form.shu_liang_er_) + parseInt(this.form.shu_liang_)
|
|
|
|
|
|
|
@@ -492,7 +510,11 @@
|
|
|
if (this.form.shu_liang_si_ == 0) {
|
|
if (this.form.shu_liang_si_ == 0) {
|
|
|
this.form.shu_liang_si_ = ''
|
|
this.form.shu_liang_si_ = ''
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ let lHData = null
|
|
|
|
|
+ if (this.weiTuoBianHao && this.content) {
|
|
|
|
|
+ lHData = specimenBox.getLHBata(this.content, this.form, this.showBoolean1, this.showBoolean2, this
|
|
|
|
|
+ .showBoolean3, this.showBoolean4)
|
|
|
|
|
+ }
|
|
|
let pp = {
|
|
let pp = {
|
|
|
paramWhere: [{
|
|
paramWhere: [{
|
|
|
id_: this.id
|
|
id_: this.id
|
|
@@ -504,11 +526,13 @@
|
|
|
|
|
|
|
|
this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
|
|
this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
|
|
|
if (res.data.state == 200) {
|
|
if (res.data.state == 200) {
|
|
|
|
|
+ if (this.weiTuoBianHao && lHData) {
|
|
|
|
|
+ this.getLiuHen(lHData)
|
|
|
|
|
+ }
|
|
|
uni.navigateBack({
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
delta: 1
|
|
|
})
|
|
})
|
|
|
this.$tip.success('提交成功!')
|
|
this.$tip.success('提交成功!')
|
|
|
-
|
|
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '提交失败',
|
|
title: '提交失败',
|
|
@@ -517,7 +541,29 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ //数据留痕
|
|
|
|
|
+ getLiuHen(form) {
|
|
|
|
|
+ let dataContent = JSON.stringify(form)
|
|
|
|
|
+ let list = []
|
|
|
|
|
+ let obj = {
|
|
|
|
|
+ wei_tuo_dan_hao_: this.weiTuoBianHao,
|
|
|
|
|
+ bao_cun_nei_rong_: dataContent,
|
|
|
|
|
+ dui_ying_shu_ju_b: 't_lhwtblh',
|
|
|
|
|
+ bao_cun_biao_ti_: '委托单留痕,样品修改',
|
|
|
|
|
+ zhuang_tai_: '留痕',
|
|
|
|
|
+ bian_zhi_shi_jian: meth.time(19),
|
|
|
|
|
+ bian_zhi_ren_: this.userid
|
|
|
|
|
+ }
|
|
|
|
|
+ list.push(obj)
|
|
|
|
|
+ const params2 = {
|
|
|
|
|
+ tableName: 't_mjsjdzcb',
|
|
|
|
|
+ paramWhere: list
|
|
|
|
|
+ }
|
|
|
|
|
+ let data = this.$sig(params2)
|
|
|
|
|
+ this.$http.post("ibps/business/v3/sys/universal/addDataContextTable", data).then(res => {
|
|
|
|
|
+ if (res.data.state == 200) {}
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
sheetClick(type) {
|
|
sheetClick(type) {
|
|
@@ -525,7 +571,6 @@
|
|
|
if (type == 'state') {
|
|
if (type == 'state') {
|
|
|
this.list = this.sampleStateList
|
|
this.list = this.sampleStateList
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
//1
|
|
//1
|
|
|
if (type.includes('yangpinType')) {
|
|
if (type.includes('yangpinType')) {
|
|
|
this.list = this.sampleTypeList
|
|
this.list = this.sampleTypeList
|