|
|
@@ -208,57 +208,57 @@ export default {
|
|
|
}
|
|
|
/** 如果四个是否留样中有一个为‘是’ 则 留样日期 和对应的留样位置就不能为空 */
|
|
|
if (ypInfoList[yp].shi_fou_liu_yang_yi == "是" ||
|
|
|
- (ypInfoList[yp].flag2 == true && ypInfoList[yp].shi_fou_liu_yang_er == "是") ||
|
|
|
- (ypInfoList[yp].flag3 == true && ypInfoList[yp].shi_fou_liu_yang_san == "是") ||
|
|
|
- (ypInfoList[yp].flag4 == true && ypInfoList[yp].shi_fou_liu_yang_si == "是")) {
|
|
|
+ (ypInfoList[yp].flag2 == true && ypInfoList[yp].shi_fou_liu_yang_er == "是") ||
|
|
|
+ (ypInfoList[yp].flag3 == true && ypInfoList[yp].shi_fou_liu_yang_san == "是") ||
|
|
|
+ (ypInfoList[yp].flag4 == true && ypInfoList[yp].shi_fou_liu_yang_si == "是")) {
|
|
|
if (ypInfoList[yp].liu_yang_ri_qi_ == null || ypInfoList[yp].liu_yang_ri_qi_ == '') {
|
|
|
this_.$message.error('留样时必须填写留样日期!')
|
|
|
return;
|
|
|
// this_.handleErrorData("") todo 失效
|
|
|
}
|
|
|
- if (ypInfoList[yp].shi_fou_liu_yang_yi == "是") {
|
|
|
+ if(ypInfoList[yp].shi_fou_liu_yang_yi == "是"){
|
|
|
// 判断位置是否为空
|
|
|
if (ypInfoList[yp].liu_yang_wei_zhi_yi == null || ypInfoList[yp].liu_yang_wei_zhi_yi == '') {
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样位置选择不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
- if (ypInfoList[yp].liu_yang_shu_lian_yi == null || ypInfoList[yp].liu_yang_shu_lian_yi == '') {
|
|
|
+ if(ypInfoList[yp].liu_yang_shu_lian_yi == null || ypInfoList[yp].liu_yang_shu_lian_yi == ''){
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的留样数量不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if (ypInfoList[yp].shi_fou_liu_yang_er == "是") {
|
|
|
- if (ypInfoList[yp].flag2 == true) {
|
|
|
+ if(ypInfoList[yp].shi_fou_liu_yang_er == "是"){
|
|
|
+ if(ypInfoList[yp].flag2 == true){
|
|
|
if (ypInfoList[yp].liu_yang_wei_zhi_er == '' || ypInfoList[yp].liu_yang_wei_zhi_er == null) {
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样位置选择不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
- if (ypInfoList[yp].liu_yang_shu_lian_er == null || ypInfoList[yp].liu_yang_shu_lian_er == '') {
|
|
|
+ if(ypInfoList[yp].liu_yang_shu_lian_er == null || ypInfoList[yp].liu_yang_shu_lian_er == ''){
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的留样数量不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (ypInfoList[yp].shi_fou_liu_yang_san == "是") {
|
|
|
- if (ypInfoList[yp].flag3 == true) {
|
|
|
+ if(ypInfoList[yp].shi_fou_liu_yang_san == "是"){
|
|
|
+ if(ypInfoList[yp].flag3 == true ){
|
|
|
if (ypInfoList[yp].liu_yang_wei_zhi_san == '' || ypInfoList[yp].liu_yang_wei_zhi_san == null) {
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样位置选择不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
- if (ypInfoList[yp].liu_yang_shu_lian_san == null || ypInfoList[yp].liu_yang_shu_lian_san == '') {
|
|
|
+ if(ypInfoList[yp].liu_yang_shu_lian_san == null || ypInfoList[yp].liu_yang_shu_lian_san == ''){
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的留样数量不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if (ypInfoList[yp].shi_fou_liu_yang_si == "是") {
|
|
|
- if (ypInfoList[yp].flag4 == true) {
|
|
|
+ if(ypInfoList[yp].shi_fou_liu_yang_si == "是"){
|
|
|
+ if(ypInfoList[yp].flag4 == true ){
|
|
|
if (ypInfoList[yp].liu_yang_wei_zhi_si == '' || ypInfoList[yp].liu_yang_wei_zhi_si == null) {
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样位置选择不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
- if (ypInfoList[yp].liu_yang_shu_lian_si == null || ypInfoList[yp].liu_yang_shu_lian_si == '') {
|
|
|
+ if(ypInfoList[yp].liu_yang_shu_lian_si == null || ypInfoList[yp].liu_yang_shu_lian_si == ''){
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的留样数量不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
@@ -266,41 +266,63 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 判断位置是否为空
|
|
|
+ // 判断位置是否为空 且判断单位是否为空
|
|
|
if (ypInfoList[yp].shou_yang_wei_zhi_yi == null || ypInfoList[yp].shou_yang_wei_zhi_yi == '') {
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的位置选择不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
- if (ypInfoList[yp].flag2 == true && (ypInfoList[yp].shou_yang_wei_zhi_er == '' || ypInfoList[yp].shou_yang_wei_zhi_er == null)) {
|
|
|
- this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的位置选择不能为空!')
|
|
|
+ if(ypInfoList[yp].dan_wei_yi == null || ypInfoList[yp].dan_wei_yi == ''){
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型1的单位不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
- if (ypInfoList[yp].flag3 == true && (ypInfoList[yp].shou_yang_wei_zhi_san == '' || ypInfoList[yp].shou_yang_wei_zhi_san == null)) {
|
|
|
- this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的位置选择不能为空!')
|
|
|
- return;
|
|
|
+ if(ypInfoList[yp].flag2 == true){
|
|
|
+ if (ypInfoList[yp].shou_yang_wei_zhi_er == '' || ypInfoList[yp].shou_yang_wei_zhi_er == null) {
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的位置选择不能为空!')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ypInfoList[yp].dan_wei_er == null || ypInfoList[yp].dan_wei_er == ''){
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型2的单位不能为空!')
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
- if (ypInfoList[yp].flag4 == true && (ypInfoList[yp].shou_yang_wei_zhi_si == '' || ypInfoList[yp].shou_yang_wei_zhi_si == null)) {
|
|
|
- this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的位置选择不能为空!')
|
|
|
- return;
|
|
|
+ if(ypInfoList[yp].flag3 == true){
|
|
|
+ if(ypInfoList[yp].shou_yang_wei_zhi_san == '' || ypInfoList[yp].shou_yang_wei_zhi_san == null) {
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的位置选择不能为空!')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ypInfoList[yp].dan_wei_san == null || ypInfoList[yp].dan_wei_san == ''){
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型3的单位不能为空!')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ypInfoList[yp].flag4 == true){
|
|
|
+ if (ypInfoList[yp].shou_yang_wei_zhi_si == '' || ypInfoList[yp].shou_yang_wei_zhi_si == null) {
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的位置选择不能为空!')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(ypInfoList[yp].dan_wei_si == null || ypInfoList[yp].dan_wei_si == ''){
|
|
|
+ this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 类型4的单位不能为空!')
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
// 判断留样日期不得早于当前日期
|
|
|
- if (ypInfoList[yp].liu_yang_ri_qi_ != null && ypInfoList[yp].liu_yang_ri_qi_ != '') {
|
|
|
- if (ypInfoList[yp].liu_yang_ri_qi_ < curTime) {
|
|
|
- console.log(ypInfoList[yp].liu_yang_ri_qi_, curTime)
|
|
|
+ if(ypInfoList[yp].liu_yang_ri_qi_ != null && ypInfoList[yp].liu_yang_ri_qi_ != ''){
|
|
|
+ if(ypInfoList[yp].liu_yang_ri_qi_ < curTime){
|
|
|
+ console.log(ypInfoList[yp].liu_yang_ri_qi_,curTime)
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 的留样日期不得早于收样日期!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
// 判断留样期限日期不得早于当前日期
|
|
|
- if (ypInfoList[yp].liu_yang_qi_xian != null && ypInfoList[yp].liu_yang_qi_xian != '') {
|
|
|
- if (ypInfoList[yp].liu_yang_qi_xian < curTime) {
|
|
|
+ if(ypInfoList[yp].liu_yang_qi_xian != null && ypInfoList[yp].liu_yang_qi_xian != ''){
|
|
|
+ if(ypInfoList[yp].liu_yang_qi_xian < curTime){
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 的留样期限日期不得早于收样日期!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
// 判断返样日期不得早于当前日期
|
|
|
- if (ypInfoList[yp].fan_yang_ri_qi_ != null && ypInfoList[yp].fan_yang_ri_qi_ != '') {
|
|
|
- if (ypInfoList[yp].fan_yang_ri_qi_ < curTime) {
|
|
|
+ if(ypInfoList[yp].fan_yang_ri_qi_ != null && ypInfoList[yp].fan_yang_ri_qi_ != ''){
|
|
|
+ if(ypInfoList[yp].fan_yang_ri_qi_ < curTime){
|
|
|
this_.$message.error('操作失败,[' + ypInfoList[yp].yang_pin_ming_che + '] 的返样日期不得早于收样日期!')
|
|
|
return;
|
|
|
}
|
|
|
@@ -324,10 +346,10 @@ export default {
|
|
|
)
|
|
|
|
|
|
let o = {
|
|
|
- where: {
|
|
|
- id_: ypInfoList[yp].id_
|
|
|
+ where:{
|
|
|
+ id_ : ypInfoList[yp].id_
|
|
|
},
|
|
|
- param: {
|
|
|
+ param:{
|
|
|
yang_pin_lei_xing: ypInfoList[yp].yang_pin_lei_xing,
|
|
|
yang_ben_yun_shu_: ypInfoList[yp].yang_ben_yun_shu_,
|
|
|
shu_liang_: ypInfoList[yp].shu_liang_,
|
|
|
@@ -348,9 +370,9 @@ export default {
|
|
|
shu_liang_si_: ypInfoList[yp].shu_liang_si_,
|
|
|
yang_pin_gui_si_: ypInfoList[yp].yang_pin_gui_si_,
|
|
|
|
|
|
- jie_yang_zhuang_t: "已接收",
|
|
|
- yang_pin_zong_shu: ypInfoList[yp].yang_pin_zong_shu,
|
|
|
- bei_zhu_1_: ypInfoList[yp].bei_zhu_1_
|
|
|
+ jie_yang_zhuang_t:"已接收",
|
|
|
+ yang_pin_zong_shu:ypInfoList[yp].yang_pin_zong_shu,
|
|
|
+ bei_zhu_1_:ypInfoList[yp].bei_zhu_1_
|
|
|
}
|
|
|
}
|
|
|
sampleList.push(o)
|
|
|
@@ -375,11 +397,11 @@ export default {
|
|
|
// console.log('当前选择的位置ids:',locationIds)
|
|
|
var allLocal = `select * from t_ypcfwz where find_in_set(id_,'${localStr}')`
|
|
|
Promise.all([repostCurd("sql", allSQL), repostCurd("sql", allLocal)]).then((res) => {
|
|
|
- let initResult = res[0].variables.data
|
|
|
+ let initResult = res[0].variables.data
|
|
|
let result = []
|
|
|
let localInfo = res[1].variables.data
|
|
|
// 排序
|
|
|
- ypInfoList.forEach(item => {
|
|
|
+ ypInfoList.forEach(item=>{
|
|
|
result.push(initResult.find(i => i.yang_pin_bian_hao === item.yang_pin_bian_hao))
|
|
|
})
|
|
|
|
|
|
@@ -392,29 +414,29 @@ export default {
|
|
|
ypInfoList.forEach(item => {
|
|
|
allUUID.push(item.biao_zhi_uuid_1, item.biao_zhi_uuid_2, item.biao_zhi_uuid_3, item.biao_zhi_uuid_4)
|
|
|
let allResult = []
|
|
|
- if (item.shou_yang_wei_zhi_yi != undefined && item.shou_yang_wei_zhi_yi) {
|
|
|
- allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_yi, '否', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime, item.yang_pin_lei_xing, item.liu_yang_shu_lian_yi))
|
|
|
+ if(item.shou_yang_wei_zhi_yi != undefined && item.shou_yang_wei_zhi_yi){
|
|
|
+ allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_yi, '否', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime,item.yang_pin_lei_xing,item.liu_yang_shu_lian_yi))
|
|
|
}
|
|
|
if (item.shou_yang_wei_zhi_er != undefined && item.shou_yang_wei_zhi_er) {
|
|
|
- allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_er, '否', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime, item.yang_pin_lei_er_, item.liu_yang_shu_lian_er))
|
|
|
+ allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_er, '否', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime,item.yang_pin_lei_er_,item.liu_yang_shu_lian_er))
|
|
|
}
|
|
|
if (item.shou_yang_wei_zhi_san != undefined && item.shou_yang_wei_zhi_san) {
|
|
|
- allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_san, '否', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime, item.yang_pin_lei_san_, item.liu_yang_shu_lian_san))
|
|
|
+ allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_san, '否', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime,item.yang_pin_lei_san_,item.liu_yang_shu_lian_san))
|
|
|
}
|
|
|
if (item.shou_yang_wei_zhi_si != undefined && item.shou_yang_wei_zhi_si) {
|
|
|
- allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_si, '否', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime, item.yang_pin_lei_si_, item.liu_yang_shu_lian_si))
|
|
|
+ allResult.push(this.handleLocationInfo(item.shou_yang_wei_zhi_si, '否', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime,item.yang_pin_lei_si_,item.liu_yang_shu_lian_si))
|
|
|
}
|
|
|
- if (item.liu_yang_wei_zhi_yi != undefined && item.liu_yang_wei_zhi_yi && item.shi_fou_liu_yang_yi === '是') {
|
|
|
- allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_yi, '是', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime, item.yang_pin_lei_xing, item.liu_yang_shu_lian_yi))
|
|
|
+ if(item.liu_yang_wei_zhi_yi != undefined && item.liu_yang_wei_zhi_yi && item.shi_fou_liu_yang_yi === '是'){
|
|
|
+ allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_yi, '是', localInfo, locationIds, item, item.biao_zhi_uuid_1, currentTime,item.yang_pin_lei_xing,item.liu_yang_shu_lian_yi))
|
|
|
}
|
|
|
if (item.liu_yang_wei_zhi_er != undefined && item.liu_yang_wei_zhi_er && item.shi_fou_liu_yang_er === '是') {
|
|
|
- allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_er, '是', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime, item.yang_pin_lei_er_, item.liu_yang_shu_lian_er))
|
|
|
+ allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_er, '是', localInfo, locationIds, item, item.biao_zhi_uuid_2, currentTime,item.yang_pin_lei_er_,item.liu_yang_shu_lian_er))
|
|
|
}
|
|
|
if (item.liu_yang_wei_zhi_san != undefined && item.liu_yang_wei_zhi_san && item.shi_fou_liu_yang_san === '是') {
|
|
|
- allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_san, '是', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime, item.yang_pin_lei_san_, item.liu_yang_shu_lian_san))
|
|
|
+ allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_san, '是', localInfo, locationIds, item, item.biao_zhi_uuid_3, currentTime,item.yang_pin_lei_san_,item.liu_yang_shu_lian_san))
|
|
|
}
|
|
|
if (item.liu_yang_wei_zhi_si != undefined && item.liu_yang_wei_zhi_si && item.shi_fou_liu_yang_si === '是') {
|
|
|
- allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_si, '是', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime, item.yang_pin_lei_si_, item.liu_yang_shu_lian_si))
|
|
|
+ allResult.push(this.handleLocationInfo(item.liu_yang_wei_zhi_si, '是', localInfo, locationIds, item, item.biao_zhi_uuid_4, currentTime,item.yang_pin_lei_si_,item.liu_yang_shu_lian_si))
|
|
|
}
|
|
|
allResult.forEach(item => {
|
|
|
item.name === 'emptyLocation' ? this.emptyLocal.push(item.value) : this.fullLocal.push(item.value)
|
|
|
@@ -423,7 +445,7 @@ export default {
|
|
|
let allUUIDStr = allUUID.filter(i => i).join(',')
|
|
|
// 更新样品位置list
|
|
|
// console.log('emptyLocal:',this.emptyLocal)
|
|
|
- if (this.emptyLocal.length > 0) {
|
|
|
+ if(this.emptyLocal.length > 0){
|
|
|
let allParams = {
|
|
|
tableName: 't_ypcfwz',
|
|
|
updList: this.emptyLocal
|
|
|
@@ -431,9 +453,8 @@ export default {
|
|
|
repostCurd('updatesByWhere', JSON.stringify(allParams))
|
|
|
}
|
|
|
// 插入样品位置list
|
|
|
- // console.log('fullLocal:',this.fullLocal)
|
|
|
- console.log('fullLocal:', this.fullLocal)
|
|
|
- if (this.fullLocal.length == 0) {
|
|
|
+ console.log('fullLocal:',this.fullLocal)
|
|
|
+ if(this.fullLocal.length == 0){
|
|
|
/* 2、封装样品登记表对象,插入样品登记表 顺便封装任务分配表 */
|
|
|
let ypdjb = []
|
|
|
let rws = []
|
|
|
@@ -446,10 +467,10 @@ export default {
|
|
|
let liuYangList = []
|
|
|
lxList.push(ypInfoList[index].yang_pin_lei_xing, ypInfoList[index].yang_pin_lei_er_, ypInfoList[index].yang_pin_lei_san_, ypInfoList[index].yang_pin_lei_si_)
|
|
|
ypggList.push(
|
|
|
- ypInfoList[index].yang_pin_gui_ge_ ? ypInfoList[index].yang_pin_gui_ge_ + '*' + ypInfoList[index].shu_liang_ + ypInfoList[index].dan_wei_yi : '',
|
|
|
- ypInfoList[index].yang_pin_gui_ge_e ? ypInfoList[index].yang_pin_gui_ge_e + '*' + ypInfoList[index].shu_liang_er_ + ypInfoList[index].dan_wei_er : '',
|
|
|
- ypInfoList[index].yang_pin_gui_ge_s ? ypInfoList[index].yang_pin_gui_ge_s + '*' + ypInfoList[index].shu_liang_san_ + ypInfoList[index].dan_wei_san : '',
|
|
|
- ypInfoList[index].yang_pin_gui_si_ ? ypInfoList[index].yang_pin_gui_si_ + '*' + ypInfoList[index].shu_liang_si_ + ypInfoList[index].dan_wei_si : '')
|
|
|
+ ypInfoList[index].yang_pin_gui_ge_? ypInfoList[index].yang_pin_gui_ge_ +'*'+ ypInfoList[index].shu_liang_+ ypInfoList[index].dan_wei_yi:'',
|
|
|
+ ypInfoList[index].yang_pin_gui_ge_e? ypInfoList[index].yang_pin_gui_ge_e+'*'+ ypInfoList[index].shu_liang_er_+ ypInfoList[index].dan_wei_er:'',
|
|
|
+ ypInfoList[index].yang_pin_gui_ge_s?ypInfoList[index].yang_pin_gui_ge_s +'*'+ ypInfoList[index].shu_liang_san_+ ypInfoList[index].dan_wei_san:'',
|
|
|
+ ypInfoList[index].yang_pin_gui_si_?ypInfoList[index].yang_pin_gui_si_ +'*'+ ypInfoList[index].shu_liang_si_+ ypInfoList[index].dan_wei_si:'')
|
|
|
liuYangList.push(ypInfoList[index].liu_yang_shu_lian_yi, ypInfoList[index].liu_yang_shu_lian_er, ypInfoList[index].liu_yang_shu_lian_san, ypInfoList[index].liu_yang_shu_lian_si)
|
|
|
let yplxz = lxList.filter(i => i).join(';')
|
|
|
let ypggStr = ypggList.filter(i => i).join(';')
|
|
|
@@ -458,82 +479,83 @@ export default {
|
|
|
let size = lxList.filter(i => i).join(',').match(/,/g)
|
|
|
let count = 1
|
|
|
size == null ? count = 1 : count = size.length + 1
|
|
|
+ let xmmc = []
|
|
|
+ xmmc.push(item.chang_gui_xiang_m, item.tao_can_ming_chen)
|
|
|
+ let xiangMuZh = xiangMuZh = xmmc.filter(i => i).join(',')
|
|
|
for (let c = 0; c < count; c++) {
|
|
|
- let xmmc = []
|
|
|
- xmmc.push(item.chang_gui_xiang_m, item.tao_can_ming_chen)
|
|
|
- let xiangMuZh = xmmc.filter(i => i).join(',')
|
|
|
|
|
|
let yblx = c == 0 ? ypInfoList[index].yang_pin_lei_xing :
|
|
|
- c == 1 ? ypInfoList[index].yang_pin_lei_er_ :
|
|
|
- c == 2 ? ypInfoList[index].yang_pin_lei_san_ :
|
|
|
- c == 3 ? ypInfoList[index].yang_pin_lei_si_ : ''
|
|
|
- let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ :
|
|
|
- c == 1 ? ypInfoList[index].yang_pin_yun_shu_ :
|
|
|
- c == 2 ? ypInfoList[index].yang_pin_yun_san :
|
|
|
- c == 3 ? ypInfoList[index].yang_pin_yun_si_ : ''
|
|
|
- let ypsl = c == 0 ? ypInfoList[index].shu_liang_ :
|
|
|
- c == 1 ? ypInfoList[index].shu_liang_er_ :
|
|
|
- c == 2 ? ypInfoList[index].shu_liang_san_ :
|
|
|
- c == 3 ? ypInfoList[index].shu_liang_si_ : ''
|
|
|
- let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ :
|
|
|
- c == 1 ? ypInfoList[index].yang_pin_gui_ge_e :
|
|
|
- c == 2 ? ypInfoList[index].yang_pin_gui_ge_s :
|
|
|
- c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
|
|
|
- let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi :
|
|
|
- c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er :
|
|
|
- c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san :
|
|
|
- c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
|
|
|
- let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi :
|
|
|
- c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er :
|
|
|
- c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san :
|
|
|
- c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
|
|
|
- let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi :
|
|
|
- c == 1 ? ypInfoList[index].liu_yang_shu_lian_er :
|
|
|
- c == 2 ? ypInfoList[index].liu_yang_shu_lian_san :
|
|
|
- c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
|
|
|
- let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 :
|
|
|
- c == 1 ? ypInfoList[index].biao_zhi_uuid_2 :
|
|
|
- c == 2 ? ypInfoList[index].biao_zhi_uuid_3 :
|
|
|
- c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
|
|
|
- let ifLy = c == 0 ? ypInfoList[index].shi_fou_liu_yang_yi :
|
|
|
- c == 1 ? ypInfoList[index].shi_fou_liu_yang_er :
|
|
|
- c == 2 ? ypInfoList[index].shi_fou_liu_yang_san :
|
|
|
- c == 3 ? ypInfoList[index].shi_fou_liu_yang_si : ''
|
|
|
+ c == 1 ? ypInfoList[index].yang_pin_lei_er_ :
|
|
|
+ c == 2 ? ypInfoList[index].yang_pin_lei_san_ :
|
|
|
+ c == 3 ? ypInfoList[index].yang_pin_lei_si_ : ''
|
|
|
+ let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ :
|
|
|
+ c == 1 ? ypInfoList[index].yang_pin_yun_shu_ :
|
|
|
+ c == 2 ? ypInfoList[index].yang_pin_yun_san :
|
|
|
+ c == 3 ? ypInfoList[index].yang_pin_yun_si_ : ''
|
|
|
+ let ypsl = c == 0 ? ypInfoList[index].shu_liang_ :
|
|
|
+ c == 1 ? ypInfoList[index].shu_liang_er_ :
|
|
|
+ c == 2 ? ypInfoList[index].shu_liang_san_ :
|
|
|
+ c == 3 ? ypInfoList[index].shu_liang_si_ : ''
|
|
|
+ let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ :
|
|
|
+ c == 1 ? ypInfoList[index].yang_pin_gui_ge_e :
|
|
|
+ c == 2 ? ypInfoList[index].yang_pin_gui_ge_s :
|
|
|
+ c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
|
|
|
+ let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi :
|
|
|
+ c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er :
|
|
|
+ c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san :
|
|
|
+ c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
|
|
|
+ let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi :
|
|
|
+ c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er :
|
|
|
+ c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san :
|
|
|
+ c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
|
|
|
+ let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi :
|
|
|
+ c == 1 ? ypInfoList[index].liu_yang_shu_lian_er :
|
|
|
+ c == 2 ? ypInfoList[index].liu_yang_shu_lian_san :
|
|
|
+ c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
|
|
|
+ let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 :
|
|
|
+ c == 1 ? ypInfoList[index].biao_zhi_uuid_2 :
|
|
|
+ c == 2 ? ypInfoList[index].biao_zhi_uuid_3 :
|
|
|
+ c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
|
|
|
+ let ifLy = c == 0 ? ypInfoList[index].shi_fou_liu_yang_yi :
|
|
|
+ c == 1 ? ypInfoList[index].shi_fou_liu_yang_er :
|
|
|
+ c == 2 ? ypInfoList[index].shi_fou_liu_yang_san:
|
|
|
+ c == 3 ? ypInfoList[index].shi_fou_liu_yang_si : ''
|
|
|
let obj = {
|
|
|
- wei_tuo_dan_hao_: item.wei_tuo_bian_hao_,
|
|
|
- wei_tuo_dan_wei_: item.wtdh,
|
|
|
- lian_xi_ren_: item.wei_tuo_fang_lian,
|
|
|
- lian_xi_dian_hua_: item.wei_tuo_lian,
|
|
|
- yang_ben_ming_che: item.yang_pin_ming_che,
|
|
|
- yang_ben_bian_hao: item.yang_pin_bian_hao,
|
|
|
- pi_hao_bian_hao_: item.song_jian_pi_hao_,
|
|
|
- song_jian_dan_wei: item.song_jian_dan_wei,
|
|
|
- xing_ming_: ypInfoList[index].xing_ming_ === undefined ? '' : ypInfoList[index].xing_ming_,
|
|
|
- xing_bie_: ypInfoList[index].xing_bie_ === undefined ? '' : ypInfoList[index].xing_bie_,
|
|
|
- nian_ling_: ypInfoList[index].nian_ling_ === undefined ? '' : ypInfoList[index].nian_ling_,
|
|
|
- yang_ben_zhuang_t: item.yang_pin_zhuang_t,
|
|
|
- shou_yang_ri_qi_: currentTime,
|
|
|
- bei_zhu_: ypInfoList[index].bei_zhu_1_ === undefined ? '' : ypInfoList[index].bei_zhu_1_,
|
|
|
- yang_ben_lei_xing: yblx,
|
|
|
- yun_shu_tiao_jian: ystj,
|
|
|
- yang_pin_shu_lian: ypsl,
|
|
|
- yang_ben_gui_ge_s: ybgg,
|
|
|
- yan_shou_jie_guo_: ypInfoList[index].yan_shou_jie_guo_,
|
|
|
- cun_fang_wei_zhi_: sywz,
|
|
|
- liu_zhuan_zhuang_: '待任务分配',
|
|
|
- shi_fou_liu_yang_: ifLy,
|
|
|
- liu_yang_ri_qi_: ifLy == '是' ? ypInfoList[index].liu_yang_ri_qi_ : '',
|
|
|
- liu_yang_cun_fang: ifLy == '是' ? lycf : '',
|
|
|
- liu_yang_shu_lian: ifLy == '是' ? (lysl == null ? '' : lysl) : '',
|
|
|
- liu_yang_qi_xian: ifLy == '是' ? ypInfoList[index].liu_yang_qi_xian : '',
|
|
|
- xiao_hui_ri_qi_: ypInfoList[index].xiao_hui_ri_qi_ === undefined ? '' : ypInfoList[index].xiao_hui_ri_qi_,
|
|
|
- fan_yang_ri_qi_: ypInfoList[index].fan_yang_ri_qi_ === undefined ? '' : ypInfoList[index].fan_yang_ri_qi_,
|
|
|
- fan_yang_jyr: ypInfoList[index].fan_yang_jyr === undefined ? '' : ypInfoList[index].fan_yang_jyr,
|
|
|
- biao_zhi_uuid_: currentUUID,
|
|
|
- song_yang_yao_qiu: ypInfoList[index].song_yang_yao_qiu === undefined ? '' : ypInfoList[index].song_yang_yao_qiu,
|
|
|
- jian_ce_xiang_mu_: xiangMuZh,
|
|
|
- shou_yang_ren_: this.$store.getters.userInfo.user.name
|
|
|
- }
|
|
|
+ wei_tuo_dan_hao_: item.wei_tuo_bian_hao_,
|
|
|
+ wei_tuo_dan_wei_: item.wtdh,
|
|
|
+ lian_xi_ren_: item.wei_tuo_fang_lian,
|
|
|
+ lian_xi_dian_hua_: item.wei_tuo_lian,
|
|
|
+ yang_ben_ming_che: item.yang_pin_ming_che,
|
|
|
+ yang_ben_bian_hao: item.yang_pin_bian_hao,
|
|
|
+ pi_hao_bian_hao_: item.song_jian_pi_hao_,
|
|
|
+ song_jian_dan_wei: item.song_jian_dan_wei,
|
|
|
+ xing_ming_: ypInfoList[index].xing_ming_=== undefined?'':ypInfoList[index].xing_ming_,
|
|
|
+ xing_bie_: ypInfoList[index].xing_bie_=== undefined?'':ypInfoList[index].xing_bie_,
|
|
|
+ nian_ling_: ypInfoList[index].nian_ling_=== undefined?'':ypInfoList[index].nian_ling_,
|
|
|
+ yang_ben_zhuang_t: item.yang_pin_zhuang_t,
|
|
|
+ shou_yang_ri_qi_: currentTime,
|
|
|
+ bei_zhu_: ypInfoList[index].bei_zhu_1_ === undefined?'':ypInfoList[index].bei_zhu_1_,
|
|
|
+ yang_ben_lei_xing: yblx,
|
|
|
+ yun_shu_tiao_jian: ystj,
|
|
|
+ yang_pin_shu_lian: ypsl,
|
|
|
+ yang_ben_gui_ge_s: ybgg,
|
|
|
+ yan_shou_jie_guo_: ypInfoList[index].yan_shou_jie_guo_,
|
|
|
+ cun_fang_wei_zhi_: sywz,
|
|
|
+ liu_zhuan_zhuang_: '待任务分配',
|
|
|
+ shi_fou_liu_yang_: ifLy,
|
|
|
+ liu_yang_ri_qi_: ifLy == '是'? ypInfoList[index].liu_yang_ri_qi_:'',
|
|
|
+ liu_yang_cun_fang: ifLy == '是'?lycf:'',
|
|
|
+ liu_yang_shu_lian: ifLy == '是'? (lysl == null ?'':lysl) : '',
|
|
|
+ liu_yang_qi_xian: ifLy == '是'? ypInfoList[index].liu_yang_qi_xian:'',
|
|
|
+ xiao_hui_ri_qi_: ypInfoList[index].xiao_hui_ri_qi_=== undefined?'':ypInfoList[index].xiao_hui_ri_qi_,
|
|
|
+ fan_yang_ri_qi_: ypInfoList[index].fan_yang_ri_qi_=== undefined?'':ypInfoList[index].fan_yang_ri_qi_,
|
|
|
+ fan_yang_jyr: ypInfoList[index].fan_yang_jyr=== undefined?'':ypInfoList[index].fan_yang_jyr,
|
|
|
+ biao_zhi_uuid_: currentUUID,
|
|
|
+ song_yang_yao_qiu: ypInfoList[index].song_yang_yao_qiu=== undefined?'':ypInfoList[index].song_yang_yao_qiu,
|
|
|
+ jian_ce_xiang_mu_: xiangMuZh,
|
|
|
+ shou_yang_ren_:this.$store.getters.userInfo.user.name,
|
|
|
+ wei_tuo_lei_xing_:item.wei_tuo_lei_xing_
|
|
|
+ }
|
|
|
// console.log(obj)
|
|
|
ypdjb.push(obj)
|
|
|
}
|
|
|
@@ -553,12 +575,12 @@ export default {
|
|
|
xin_xiang_mu_ming: item.xiang_mu_ming_che,
|
|
|
zhan_shi_biao_id_: item.zhan_shi_biao_id_,
|
|
|
fen_zhuang_liu_ya: liuyangStr,
|
|
|
- shi_fou_jia_ji_: item.chu_ju_bao_gao_ya, // 是否加急【2023/2/23王嘎嘎提出】
|
|
|
- yang_pin_shu_lian: ypInfoList[index].jie_yang_shu_lian // 样品确认总数【2023/3/7王嘎嘎提出】
|
|
|
+ shi_fou_jia_ji_: item.chu_ju_bao_gao_ya, // 是否加急【2023/2/23王提出】
|
|
|
+ yang_pin_shu_lian: ypInfoList[index].jie_yang_shu_lian, // 样品确认总数【2023/3/7王提出】
|
|
|
+ suo_you_xiang_mu_: xiangMuZh, // 所有项目的中文名称 【2023/12/11 Mr王】
|
|
|
+ song_jian_pi_hao_: item.song_jian_pi_hao_// 送检批号 【2023/12/11 Mr王】
|
|
|
}
|
|
|
rws.push(rw)
|
|
|
-
|
|
|
-
|
|
|
lhwtzsbID.push('{"shen_qing_id_":"' + item.zhan_shi_biao_id_ + '"}')
|
|
|
lhwtbID.push('{"id_":"' + item.wtID + '"}')
|
|
|
|
|
|
@@ -573,8 +595,8 @@ export default {
|
|
|
优化:将其他不冲突的更改状态脚本放在任务分配后并行处理
|
|
|
*/
|
|
|
|
|
|
- // console.log("4、任务分配",rws)
|
|
|
- repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":' + JSON.stringify(rws) + ',"defKey":"Process_04o0csc","formKey":"lhrwfp"}').then(res => {
|
|
|
+ // console.log("4、任务分配",rws) 2023/12/11 Mr王 去掉 ,"defKey":"Process_04o0csc","formKey":"lhrwfp"
|
|
|
+ repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":' + JSON.stringify(rws) + '}').then(res=>{
|
|
|
// console.log('4、更改委托表的 委托状态',lhwtbID)
|
|
|
repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
|
|
|
/* 5、更新展示表 */
|
|
|
@@ -582,17 +604,17 @@ export default {
|
|
|
// console.log('5、更新展示表',lhwtzsbID)
|
|
|
repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":[' + lhwtzsbID + '],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
|
|
|
}
|
|
|
- console.log('样品登记表:', ypdjb)
|
|
|
- if (ypdjb.length > 0) {
|
|
|
- repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}').then(() => {
|
|
|
+ console.log('样品登记表:',ypdjb)
|
|
|
+ if(ypdjb.length > 0){
|
|
|
+ repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}').then(()=>{
|
|
|
console.log("样品登记表数据添加成功!")
|
|
|
this.$emit('callback', true)
|
|
|
- }).catch(error => {
|
|
|
+ }).catch(error =>{
|
|
|
console.log(error)
|
|
|
- this.handleAnySituation(true, "样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决", 'error')
|
|
|
+ this.handleAnySituation(true,"样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决",'error')
|
|
|
})
|
|
|
- } else {
|
|
|
- this.handleAnySituation(true, "样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决", 'error')
|
|
|
+ }else{
|
|
|
+ this.handleAnySituation(true,"样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决",'error')
|
|
|
}
|
|
|
/* 3、更新样品表
|
|
|
// console.log('3、更新样品表',lhypIdNewList)
|
|
|
@@ -600,17 +622,17 @@ export default {
|
|
|
this.handleAnySituation(true,"样品成功接收,正在开启任务分配!",'success')
|
|
|
})
|
|
|
*/
|
|
|
- console.log('更新样品表', sampleList)
|
|
|
- let allSampleParams = {
|
|
|
- tableName: 't_lhypb',
|
|
|
- updList: sampleList
|
|
|
+ console.log('更新样品表',sampleList)
|
|
|
+ let allSampleParams ={
|
|
|
+ tableName:'t_lhypb',
|
|
|
+ updList:sampleList
|
|
|
}
|
|
|
- repostCurd('updatesByWhere', JSON.stringify(allSampleParams)).then(res => {
|
|
|
- this.handleAnySituation(true, "样品成功接收,正在开启任务分配!", 'success')
|
|
|
+ repostCurd('updatesByWhere', JSON.stringify(allSampleParams)).then(res=>{
|
|
|
+ this.handleAnySituation(true,"样品成功接收,正在开启任务分配!",'success')
|
|
|
})
|
|
|
|
|
|
})
|
|
|
- } else {
|
|
|
+ }else{
|
|
|
repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(this.fullLocal) + '}').then(res => {
|
|
|
// 再次查询位置表,对比当前样品列表 替换初始值为占用的样品位置id
|
|
|
let findLocationAgain = `select id_,shi_fou_liu_yang_,biao_zhi_uuid_ from t_ypcfwz where find_in_set(biao_zhi_uuid_,'${allUUIDStr}')`
|
|
|
@@ -630,9 +652,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
// repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
|
|
|
-
|
|
|
+
|
|
|
/* 2、封装样品登记表对象,插入样品登记表 顺便封装任务分配表 */
|
|
|
let ypdjb = []
|
|
|
let rws = []
|
|
|
@@ -645,10 +667,10 @@ export default {
|
|
|
let liuYangList = []
|
|
|
lxList.push(ypInfoList[index].yang_pin_lei_xing, ypInfoList[index].yang_pin_lei_er_, ypInfoList[index].yang_pin_lei_san_, ypInfoList[index].yang_pin_lei_si_)
|
|
|
ypggList.push(
|
|
|
- ypInfoList[index].yang_pin_gui_ge_ ? ypInfoList[index].yang_pin_gui_ge_ + '*' + ypInfoList[index].shu_liang_ + ypInfoList[index].dan_wei_yi : '',
|
|
|
- ypInfoList[index].yang_pin_gui_ge_e ? ypInfoList[index].yang_pin_gui_ge_e + '*' + ypInfoList[index].shu_liang_er_ + ypInfoList[index].dan_wei_er : '',
|
|
|
- ypInfoList[index].yang_pin_gui_ge_s ? ypInfoList[index].yang_pin_gui_ge_s + '*' + ypInfoList[index].shu_liang_san_ + ypInfoList[index].dan_wei_san : '',
|
|
|
- ypInfoList[index].yang_pin_gui_si_ ? ypInfoList[index].yang_pin_gui_si_ + '*' + ypInfoList[index].shu_liang_si_ + ypInfoList[index].dan_wei_si : '')
|
|
|
+ ypInfoList[index].yang_pin_gui_ge_? ypInfoList[index].yang_pin_gui_ge_ +'*'+ ypInfoList[index].shu_liang_+ ypInfoList[index].dan_wei_yi:'',
|
|
|
+ ypInfoList[index].yang_pin_gui_ge_e? ypInfoList[index].yang_pin_gui_ge_e+'*'+ ypInfoList[index].shu_liang_er_+ ypInfoList[index].dan_wei_er:'',
|
|
|
+ ypInfoList[index].yang_pin_gui_ge_s?ypInfoList[index].yang_pin_gui_ge_s +'*'+ ypInfoList[index].shu_liang_san_+ ypInfoList[index].dan_wei_san:'',
|
|
|
+ ypInfoList[index].yang_pin_gui_si_?ypInfoList[index].yang_pin_gui_si_ +'*'+ ypInfoList[index].shu_liang_si_+ ypInfoList[index].dan_wei_si:'')
|
|
|
liuYangList.push(ypInfoList[index].liu_yang_shu_lian_yi, ypInfoList[index].liu_yang_shu_lian_er, ypInfoList[index].liu_yang_shu_lian_san, ypInfoList[index].liu_yang_shu_lian_si)
|
|
|
let yplxz = lxList.filter(i => i).join(';')
|
|
|
let ypggStr = ypggList.filter(i => i).join(';')
|
|
|
@@ -657,82 +679,82 @@ export default {
|
|
|
let size = lxList.filter(i => i).join(',').match(/,/g)
|
|
|
let count = 1
|
|
|
size == null ? count = 1 : count = size.length + 1
|
|
|
+ let xmmc = []
|
|
|
+ xmmc.push(item.chang_gui_xiang_m, item.tao_can_ming_chen)
|
|
|
+ let xiangMuZh = xiangMuZh = xmmc.filter(i => i).join(',')
|
|
|
for (let c = 0; c < count; c++) {
|
|
|
- let xmmc = []
|
|
|
- xmmc.push(item.chang_gui_xiang_m, item.tao_can_ming_chen)
|
|
|
- let xiangMuZh = xmmc.filter(i => i).join(',')
|
|
|
-
|
|
|
let yblx = c == 0 ? ypInfoList[index].yang_pin_lei_xing :
|
|
|
- c == 1 ? ypInfoList[index].yang_pin_lei_er_ :
|
|
|
- c == 2 ? ypInfoList[index].yang_pin_lei_san_ :
|
|
|
- c == 3 ? ypInfoList[index].yang_pin_lei_si_ : ''
|
|
|
- let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ :
|
|
|
- c == 1 ? ypInfoList[index].yang_pin_yun_shu_ :
|
|
|
- c == 2 ? ypInfoList[index].yang_pin_yun_san :
|
|
|
- c == 3 ? ypInfoList[index].yang_pin_yun_si_ : ''
|
|
|
- let ypsl = c == 0 ? ypInfoList[index].shu_liang_ :
|
|
|
- c == 1 ? ypInfoList[index].shu_liang_er_ :
|
|
|
- c == 2 ? ypInfoList[index].shu_liang_san_ :
|
|
|
- c == 3 ? ypInfoList[index].shu_liang_si_ : ''
|
|
|
- let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ :
|
|
|
- c == 1 ? ypInfoList[index].yang_pin_gui_ge_e :
|
|
|
- c == 2 ? ypInfoList[index].yang_pin_gui_ge_s :
|
|
|
- c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
|
|
|
- let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi :
|
|
|
- c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er :
|
|
|
- c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san :
|
|
|
- c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
|
|
|
- let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi :
|
|
|
- c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er :
|
|
|
- c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san :
|
|
|
- c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
|
|
|
- let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi :
|
|
|
- c == 1 ? ypInfoList[index].liu_yang_shu_lian_er :
|
|
|
- c == 2 ? ypInfoList[index].liu_yang_shu_lian_san :
|
|
|
- c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
|
|
|
- let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 :
|
|
|
- c == 1 ? ypInfoList[index].biao_zhi_uuid_2 :
|
|
|
- c == 2 ? ypInfoList[index].biao_zhi_uuid_3 :
|
|
|
- c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
|
|
|
- let ifLy = c == 0 ? ypInfoList[index].shi_fou_liu_yang_yi :
|
|
|
- c == 1 ? ypInfoList[index].shi_fou_liu_yang_er :
|
|
|
- c == 2 ? ypInfoList[index].shi_fou_liu_yang_san :
|
|
|
- c == 3 ? ypInfoList[index].shi_fou_liu_yang_si : ''
|
|
|
+ c == 1 ? ypInfoList[index].yang_pin_lei_er_ :
|
|
|
+ c == 2 ? ypInfoList[index].yang_pin_lei_san_ :
|
|
|
+ c == 3 ? ypInfoList[index].yang_pin_lei_si_ : ''
|
|
|
+ let ystj = c == 0 ? ypInfoList[index].yang_ben_yun_shu_ :
|
|
|
+ c == 1 ? ypInfoList[index].yang_pin_yun_shu_ :
|
|
|
+ c == 2 ? ypInfoList[index].yang_pin_yun_san :
|
|
|
+ c == 3 ? ypInfoList[index].yang_pin_yun_si_ : ''
|
|
|
+ let ypsl = c == 0 ? ypInfoList[index].shu_liang_ :
|
|
|
+ c == 1 ? ypInfoList[index].shu_liang_er_ :
|
|
|
+ c == 2 ? ypInfoList[index].shu_liang_san_ :
|
|
|
+ c == 3 ? ypInfoList[index].shu_liang_si_ : ''
|
|
|
+ let ybgg = c == 0 ? ypInfoList[index].yang_pin_gui_ge_ :
|
|
|
+ c == 1 ? ypInfoList[index].yang_pin_gui_ge_e :
|
|
|
+ c == 2 ? ypInfoList[index].yang_pin_gui_ge_s :
|
|
|
+ c == 3 ? ypInfoList[index].yang_pin_gui_si_ : ''
|
|
|
+ let sywz = c == 0 ? ypInfoList[index].shou_yang_wei_zhi_yi :
|
|
|
+ c == 1 ? ypInfoList[index].shou_yang_wei_zhi_er :
|
|
|
+ c == 2 ? ypInfoList[index].shou_yang_wei_zhi_san :
|
|
|
+ c == 3 ? ypInfoList[index].shou_yang_wei_zhi_si : ''
|
|
|
+ let lycf = c == 0 ? ypInfoList[index].liu_yang_wei_zhi_yi :
|
|
|
+ c == 1 ? ypInfoList[index].liu_yang_wei_zhi_er :
|
|
|
+ c == 2 ? ypInfoList[index].liu_yang_wei_zhi_san :
|
|
|
+ c == 3 ? ypInfoList[index].liu_yang_wei_zhi_si : ''
|
|
|
+ let lysl = c == 0 ? ypInfoList[index].liu_yang_shu_lian_yi :
|
|
|
+ c == 1 ? ypInfoList[index].liu_yang_shu_lian_er :
|
|
|
+ c == 2 ? ypInfoList[index].liu_yang_shu_lian_san :
|
|
|
+ c == 3 ? ypInfoList[index].liu_yang_shu_lian_si : ''
|
|
|
+ let currentUUID = c == 0 ? ypInfoList[index].biao_zhi_uuid_1 :
|
|
|
+ c == 1 ? ypInfoList[index].biao_zhi_uuid_2 :
|
|
|
+ c == 2 ? ypInfoList[index].biao_zhi_uuid_3 :
|
|
|
+ c == 3 ? ypInfoList[index].biao_zhi_uuid_4 : ''
|
|
|
+ let ifLy = c == 0 ? ypInfoList[index].shi_fou_liu_yang_yi :
|
|
|
+ c == 1 ? ypInfoList[index].shi_fou_liu_yang_er :
|
|
|
+ c == 2 ? ypInfoList[index].shi_fou_liu_yang_san:
|
|
|
+ c == 3 ? ypInfoList[index].shi_fou_liu_yang_si : ''
|
|
|
let obj = {
|
|
|
- wei_tuo_dan_hao_: item.wei_tuo_bian_hao_,
|
|
|
- wei_tuo_dan_wei_: item.wtdh,
|
|
|
- lian_xi_ren_: item.wei_tuo_fang_lian,
|
|
|
- lian_xi_dian_hua_: item.wei_tuo_lian,
|
|
|
- yang_ben_ming_che: item.yang_pin_ming_che,
|
|
|
- yang_ben_bian_hao: item.yang_pin_bian_hao,
|
|
|
- pi_hao_bian_hao_: item.song_jian_pi_hao_,
|
|
|
- song_jian_dan_wei: item.song_jian_dan_wei,
|
|
|
- xing_ming_: ypInfoList[index].xing_ming_ === undefined ? '' : ypInfoList[index].xing_ming_,
|
|
|
- xing_bie_: ypInfoList[index].xing_bie_ === undefined ? '' : ypInfoList[index].xing_bie_,
|
|
|
- nian_ling_: ypInfoList[index].nian_ling_ === undefined ? '' : ypInfoList[index].nian_ling_,
|
|
|
- yang_ben_zhuang_t: item.yang_pin_zhuang_t,
|
|
|
- shou_yang_ri_qi_: currentTime,
|
|
|
- bei_zhu_: ypInfoList[index].bei_zhu_1_ === undefined ? '' : ypInfoList[index].bei_zhu_1_,
|
|
|
- yang_ben_lei_xing: yblx,
|
|
|
- yun_shu_tiao_jian: ystj,
|
|
|
- yang_pin_shu_lian: ypsl,
|
|
|
- yang_ben_gui_ge_s: ybgg,
|
|
|
- yan_shou_jie_guo_: ypInfoList[index].yan_shou_jie_guo_,
|
|
|
- cun_fang_wei_zhi_: sywz,
|
|
|
- liu_zhuan_zhuang_: '待任务分配',
|
|
|
- shi_fou_liu_yang_: ifLy,
|
|
|
- liu_yang_ri_qi_: ifLy == '是' ? ypInfoList[index].liu_yang_ri_qi_ : '',
|
|
|
- liu_yang_cun_fang: ifLy == '是' ? lycf : '',
|
|
|
- liu_yang_shu_lian: ifLy == '是' ? (lysl == null ? '' : lysl) : '',
|
|
|
- liu_yang_qi_xian: ifLy == '是' ? ypInfoList[index].liu_yang_qi_xian : '',
|
|
|
- xiao_hui_ri_qi_: ypInfoList[index].xiao_hui_ri_qi_ === undefined ? '' : ypInfoList[index].xiao_hui_ri_qi_,
|
|
|
- fan_yang_ri_qi_: ypInfoList[index].fan_yang_ri_qi_ === undefined ? '' : ypInfoList[index].fan_yang_ri_qi_,
|
|
|
- fan_yang_jyr: ypInfoList[index].fan_yang_jyr === undefined ? '' : ypInfoList[index].fan_yang_jyr,
|
|
|
- biao_zhi_uuid_: currentUUID,
|
|
|
- song_yang_yao_qiu: ypInfoList[index].song_yang_yao_qiu === undefined ? '' : ypInfoList[index].song_yang_yao_qiu,
|
|
|
- jian_ce_xiang_mu_: xiangMuZh,
|
|
|
- shou_yang_ren_: this.$store.getters.userInfo.user.name
|
|
|
- }
|
|
|
+ wei_tuo_dan_hao_: item.wei_tuo_bian_hao_,
|
|
|
+ wei_tuo_dan_wei_: item.wtdh,
|
|
|
+ lian_xi_ren_: item.wei_tuo_fang_lian,
|
|
|
+ lian_xi_dian_hua_: item.wei_tuo_lian,
|
|
|
+ yang_ben_ming_che: item.yang_pin_ming_che,
|
|
|
+ yang_ben_bian_hao: item.yang_pin_bian_hao,
|
|
|
+ pi_hao_bian_hao_: item.song_jian_pi_hao_,
|
|
|
+ song_jian_dan_wei: item.song_jian_dan_wei,
|
|
|
+ xing_ming_: ypInfoList[index].xing_ming_=== undefined?'':ypInfoList[index].xing_ming_,
|
|
|
+ xing_bie_: ypInfoList[index].xing_bie_=== undefined?'':ypInfoList[index].xing_bie_,
|
|
|
+ nian_ling_: ypInfoList[index].nian_ling_=== undefined?'':ypInfoList[index].nian_ling_,
|
|
|
+ yang_ben_zhuang_t: item.yang_pin_zhuang_t,
|
|
|
+ shou_yang_ri_qi_: currentTime,
|
|
|
+ bei_zhu_: ypInfoList[index].bei_zhu_1_ === undefined?'':ypInfoList[index].bei_zhu_1_,
|
|
|
+ yang_ben_lei_xing: yblx,
|
|
|
+ yun_shu_tiao_jian: ystj,
|
|
|
+ yang_pin_shu_lian: ypsl,
|
|
|
+ yang_ben_gui_ge_s: ybgg,
|
|
|
+ yan_shou_jie_guo_: ypInfoList[index].yan_shou_jie_guo_,
|
|
|
+ cun_fang_wei_zhi_: sywz,
|
|
|
+ liu_zhuan_zhuang_: '待任务分配',
|
|
|
+ shi_fou_liu_yang_: ifLy,
|
|
|
+ liu_yang_ri_qi_: ifLy == '是'? ypInfoList[index].liu_yang_ri_qi_:'',
|
|
|
+ liu_yang_cun_fang: ifLy == '是'?lycf:'',
|
|
|
+ liu_yang_shu_lian: ifLy == '是'? (lysl == null ?'':lysl) : '',
|
|
|
+ liu_yang_qi_xian: ifLy == '是'? ypInfoList[index].liu_yang_qi_xian:'',
|
|
|
+ xiao_hui_ri_qi_: ypInfoList[index].xiao_hui_ri_qi_=== undefined?'':ypInfoList[index].xiao_hui_ri_qi_,
|
|
|
+ fan_yang_ri_qi_: ypInfoList[index].fan_yang_ri_qi_=== undefined?'':ypInfoList[index].fan_yang_ri_qi_,
|
|
|
+ fan_yang_jyr: ypInfoList[index].fan_yang_jyr=== undefined?'':ypInfoList[index].fan_yang_jyr,
|
|
|
+ biao_zhi_uuid_: currentUUID,
|
|
|
+ song_yang_yao_qiu: ypInfoList[index].song_yang_yao_qiu=== undefined?'':ypInfoList[index].song_yang_yao_qiu,
|
|
|
+ jian_ce_xiang_mu_: xiangMuZh,
|
|
|
+ shou_yang_ren_:this.$store.getters.userInfo.user.name,
|
|
|
+ wei_tuo_lei_xing_:item.wei_tuo_lei_xing_
|
|
|
+ }
|
|
|
// console.log(obj)
|
|
|
ypdjb.push(obj)
|
|
|
}
|
|
|
@@ -752,18 +774,19 @@ export default {
|
|
|
xin_xiang_mu_ming: item.xiang_mu_ming_che,
|
|
|
zhan_shi_biao_id_: item.zhan_shi_biao_id_,
|
|
|
fen_zhuang_liu_ya: liuyangStr,
|
|
|
- shi_fou_jia_ji_: item.chu_ju_bao_gao_ya, // 是否加急【2023/2/23王嘎嘎提出】
|
|
|
- yang_pin_shu_lian: ypInfoList[index].jie_yang_shu_lian // 样品确认总数【2023/3/7王嘎嘎提出】
|
|
|
+ shi_fou_jia_ji_: item.chu_ju_bao_gao_ya, // 是否加急【2023/2/23王嘎嘎提出】
|
|
|
+ yang_pin_shu_lian: ypInfoList[index].jie_yang_shu_lian, // 样品确认总数【2023/3/7王嘎嘎提出】
|
|
|
+ suo_you_xiang_mu_: xiangMuZh, // 所有项目的中文名称 【2023/12/11 Mr王】
|
|
|
+ song_jian_pi_hao_: item.song_jian_pi_hao_// 送检批号 【2023/12/11 Mr王】
|
|
|
}
|
|
|
rws.push(rw)
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
lhwtzsbID.push('{"shen_qing_id_":"' + item.zhan_shi_biao_id_ + '"}')
|
|
|
lhwtbID.push('{"id_":"' + item.wtID + '"}')
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/* 4、任务分配
|
|
|
4-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
|
|
|
4-2、根据每个样品一个任务分配流程 遍历样品表开任务分配流程
|
|
|
@@ -771,9 +794,9 @@ export default {
|
|
|
|
|
|
优化:将其他不冲突的更改状态脚本放在任务分配后并行处理
|
|
|
*/
|
|
|
-
|
|
|
- // console.log("4、任务分配",rws)
|
|
|
- repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":' + JSON.stringify(rws) + ',"defKey":"Process_04o0csc","formKey":"lhrwfp"}').then(res => {
|
|
|
+
|
|
|
+ // console.log("4、任务分配",rws) 2023/12/11 Mr王 去掉 ,"defKey":"Process_04o0csc","formKey":"lhrwfp"
|
|
|
+ repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":' + JSON.stringify(rws) + '}').then(res=>{
|
|
|
// console.log('4、更改委托表的 委托状态',lhwtbID)
|
|
|
repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
|
|
|
/* 5、更新展示表 */
|
|
|
@@ -781,17 +804,17 @@ export default {
|
|
|
// console.log('5、更新展示表',lhwtzsbID)
|
|
|
repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":[' + lhwtzsbID + '],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
|
|
|
}
|
|
|
- console.log('样品登记表:', ypdjb)
|
|
|
- if (ypdjb.length > 0) {
|
|
|
- repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}').then(() => {
|
|
|
+ console.log('样品登记表:',ypdjb)
|
|
|
+ if(ypdjb.length > 0){
|
|
|
+ repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}').then(()=>{
|
|
|
console.log("样品登记表数据添加成功!")
|
|
|
this.$emit('callback', true)
|
|
|
- }).catch(error => {
|
|
|
+ }).catch(error =>{
|
|
|
console.log(error)
|
|
|
- this.handleAnySituation(true, "样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决", 'error')
|
|
|
+ this.handleAnySituation(true,"样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决",'error')
|
|
|
})
|
|
|
- } else {
|
|
|
- this.handleAnySituation(true, "样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决", 'error')
|
|
|
+ }else{
|
|
|
+ this.handleAnySituation(true,"样品登记表数据添加失败!请勿关闭此页面,联系开发人员解决",'error')
|
|
|
}
|
|
|
/* 3、更新样品表
|
|
|
// console.log('3、更新样品表',lhypIdNewList)
|
|
|
@@ -799,24 +822,24 @@ export default {
|
|
|
this.handleAnySituation(true,"样品成功接收,正在开启任务分配!",'success')
|
|
|
})
|
|
|
*/
|
|
|
- console.log('更新样品表', sampleList)
|
|
|
- let allSampleParams = {
|
|
|
- tableName: 't_lhypb',
|
|
|
- updList: sampleList
|
|
|
+ console.log('更新样品表',sampleList)
|
|
|
+ let allSampleParams ={
|
|
|
+ tableName:'t_lhypb',
|
|
|
+ updList:sampleList
|
|
|
}
|
|
|
- repostCurd('updatesByWhere', JSON.stringify(allSampleParams)).then(res => {
|
|
|
- this.handleAnySituation(true, "样品成功接收,正在开启任务分配!", 'success')
|
|
|
+ repostCurd('updatesByWhere', JSON.stringify(allSampleParams)).then(res=>{
|
|
|
+ this.handleAnySituation(true,"样品成功接收,正在开启任务分配!",'success')
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
})
|
|
|
|
|
|
}
|
|
|
})
|
|
|
- }).catch(_ => {});
|
|
|
+ }).catch(_ => { });
|
|
|
}
|
|
|
|
|
|
},
|