|
|
@ -277,9 +277,14 @@ export default {
|
|
|
|
// 扫码后提交后台并自动选择下一行
|
|
|
|
// 扫码后提交后台并自动选择下一行
|
|
|
|
barCode: function(newCode, oldCode) {
|
|
|
|
barCode: function(newCode, oldCode) {
|
|
|
|
if (newCode) {
|
|
|
|
if (newCode) {
|
|
|
|
|
|
|
|
if (!this.client_id) {
|
|
|
|
|
|
|
|
this.$message.warning('请选择存储柜体!')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
bind_tmp_enter_warehouse(stringify({
|
|
|
|
bind_tmp_enter_warehouse(stringify({
|
|
|
|
'tmplate_content': JSON.stringify(this.currentRow),
|
|
|
|
'tmplate_content': JSON.stringify(this.currentRow),
|
|
|
|
'bar_code': newCode
|
|
|
|
'bar_code': newCode,
|
|
|
|
|
|
|
|
'client_id': this.client_id
|
|
|
|
})).then(res => {
|
|
|
|
})).then(res => {
|
|
|
|
if (res.status === 0) {
|
|
|
|
if (res.status === 0) {
|
|
|
|
let cindex = 0 // 记录成功后的下一个index
|
|
|
|
let cindex = 0 // 记录成功后的下一个index
|
|
|
@ -436,7 +441,15 @@ export default {
|
|
|
|
this.reagentAddTmpData = []
|
|
|
|
this.reagentAddTmpData = []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleAddSave() {
|
|
|
|
handleAddSave() {
|
|
|
|
const data = stringify({ 'template_name': this.reagentAddTmpName, 'template_content': JSON.stringify(this.reagentAddTmpData) })
|
|
|
|
if (!this.reagentAddTmpName) {
|
|
|
|
|
|
|
|
this.$message.warning('请输入模板名称!')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.reagentAddClient) {
|
|
|
|
|
|
|
|
this.$message.warning('请选择存储柜体!')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const data = stringify({ 'template_name': this.reagentAddTmpName, 'template_content': JSON.stringify(this.reagentAddTmpData), 'client_id': this.reagentAddClient })
|
|
|
|
add_tmp(data).then(
|
|
|
|
add_tmp(data).then(
|
|
|
|
res => {
|
|
|
|
res => {
|
|
|
|
if (res.status === 0) {
|
|
|
|
if (res.status === 0) {
|
|
|
|