|
|
@@ -463,12 +463,15 @@ export default {
|
|
|
|
|
|
// console.log('dwhere:',dWhere)
|
|
|
// console.log('cfwzIdList:',cfwzIdList)
|
|
|
- /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID */
|
|
|
+ /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID
|
|
|
+ 判断是否是留样位置,如果是留样位置 位置表shi_fou_liu_yang_字段值为`是` 否则 值为`否`
|
|
|
+ */
|
|
|
for (let num in dWhere) {
|
|
|
let firstIfEmpty = true
|
|
|
let secondIfEmpty = true
|
|
|
for(let index = 0; index<cfwzIdList[num].length; index++){
|
|
|
let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num][index] + "'"
|
|
|
+ let isLiuYang = index == 1 ? "是" : "否"
|
|
|
// console.log(sql)
|
|
|
repostCurd('sql', sql).then(response => {
|
|
|
let resArr = response.variables.data
|
|
|
@@ -480,11 +483,25 @@ export default {
|
|
|
}else{
|
|
|
secondIfEmpty = false
|
|
|
}
|
|
|
- let content = '{"id_":"' + cfwzIdList[num][index] + '"}'
|
|
|
- repostCurd('update',
|
|
|
- '{"tableName":"t_ypcfwz","paramWhere":'+content+',"paramCond":{"wei_zhi_zhuang_ta":"占用","ru_ku_shi_jian_":"'+this_.dateFormat()+'","yang_pin_bian_hao":"'+ypbh[num]+'","yang_pin_ming_che":"'+lhypmcList[num]+'"}}').then(res=>{
|
|
|
- console.log('空余')
|
|
|
+ let content = {
|
|
|
+ id_ : cfwzIdList[num][index]
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ wei_zhi_zhuang_ta : "占用",
|
|
|
+ ru_ku_shi_jian_ : this_.dateFormat(),
|
|
|
+ yang_pin_bian_hao : ypbh[num],
|
|
|
+ yang_pin_ming_che : lhypmcList[num],
|
|
|
+ shi_fou_liu_yang_ : isLiuYang
|
|
|
+ }
|
|
|
+ let o = {
|
|
|
+ tableName:'t_ypcfwz',
|
|
|
+ paramWhere:content,
|
|
|
+ paramCond : params
|
|
|
+ }
|
|
|
+ repostCurd('update',JSON.stringify(o)).then(res=>{
|
|
|
+ console.log("空余位置修改")
|
|
|
})
|
|
|
+
|
|
|
} else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
|
|
|
// 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
|
|
|
let cfNewList = []
|
|
|
@@ -504,6 +521,7 @@ export default {
|
|
|
// cfNew["yang_pin_bian_hao"] = lhypIdList[num]
|
|
|
cfNew["yang_pin_ming_che"] = lhypmcList[num]
|
|
|
cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
|
|
|
+ cfNew["shi_fou_liu_yang_"] = isLiuYang
|
|
|
cfNew["biao_zhi_uuid_"] = uuidList[num]
|
|
|
cfNewList.push(cfNew)
|
|
|
let uuid = cfNew["biao_zhi_uuid_"];
|