feat(src/views/reagent/warehousing): 新增绑定入库、新增模板添加client_id校验

duizhaopin_ui
duan 3 years ago
parent c915903832
commit 6b48b3cc5e

@ -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) {

Loading…
Cancel
Save