Commit 9e6da03f authored by 徐来柯's avatar 徐来柯

fix bug

parent 467a4f73
......@@ -2,7 +2,7 @@
<div class="box-container">
<div class="wrap">
<h1 class="page-title">物料出库管理</h1>
<search-form :formList="[1,2,3]" :searchList="searchList" :btnList="[1,2]" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<search-form ref="form" :formList="[1,2,3]" :searchList="searchList" :btnList="[1,2]" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<el-table
border
:height="$store.getters.someHeight"
......@@ -187,9 +187,18 @@ export default {
method:"post",
url:`/api/MaterialDelivery/MaterialDelivery_ScanCodeAdd?ScanCode=${value}`,
}).then((res)=>{
console.log('扫码成功。。。')
var postData = this.resetData()
this.searchData(this.postData)
if (res.data.code !== -1) {
console.log('扫码成功。。。')
this.$refs.form.formData.scanValue = ''
var postData = this.resetData()
this.searchData(postData)
} else {
console.log('扫码失败。。。')
this.typeV = '5'
this.deleteShow = true
this.deletetext = res.data.msg
this.$refs.form.$refs.codeInput.blur()
}
}).catch(() => {
console.log('扫码失败。。。')
})
......
......@@ -2,7 +2,7 @@
<div class="box-container">
<div class="wrap">
<h1 class="page-title">物料入库管理</h1>
<search-form :formList="[1,2,3]" :btnList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<search-form ref="form" :formList="[1,2,3]" :btnList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<el-table
border
:height="$store.getters.someHeight"
......@@ -204,15 +204,24 @@ export default {
url:`/api/MaterialWarehousing/MWarehousing_ScanCodeAdd?ScanCode=${value}`,
}).then((res)=>{
console.log('扫码成功。。。')
var postData = {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
Stime: this.formData.dateValue ? this.$moment(this.formData.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : ' ',
Etime: this.formData.dateValue ? this.$moment(this.formData.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ' '
if (res.data.code !== -1) {
var postData = {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
Stime: this.formData.dateValue ? this.$moment(this.formData.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : ' ',
Etime: this.formData.dateValue ? this.$moment(this.formData.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ' '
}
this.$refs.form.formData.scanValue = ''
this.searchData(postData)
} else {
console.log('扫码失败。。。')
this.typeV = '5'
this.deleteShow = true
this.deletetext = res.data.msg
this.$refs.form.$refs.codeInput.blur()
}
this.searchData(this.postData)
}).catch(() => {
console.log('扫码失败。。。')
console.log('扫描错误。。。')
})
},
resetData () {
......
......@@ -2,7 +2,7 @@
<div class="box-container">
<div class="wrap">
<h1 class="page-title">产品出库管理</h1>
<search-form :formList="[1,2,3]" :btnList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<search-form ref="form" :formList="[1,2,3]" :btnList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<el-table
border
:height="$store.getters.someHeight"
......@@ -198,9 +198,18 @@ export default {
method:"post",
url:`/api/ProductDelivery/ProductDelivery_ScanCodeAdd?ScanCode=${value}`,
}).then((res)=>{
if (res.data.code !== -1) {
console.log('扫码成功。。。')
this.$refs.form.formData.scanValue = ''
var postData = this.resetData()
this.searchData(this.postData)
this.searchData(postData)
} else {
console.log('扫码失败。。。')
this.typeV = '5'
this.deleteShow = true
this.deletetext = res.data.msg
this.$refs.form.$refs.codeInput.blur()
}
}).catch(() => {
console.log('扫码失败。。。')
})
......
......@@ -2,7 +2,7 @@
<div class="box-container">
<div class="wrap">
<h1 class="page-title">产品入库管理</h1>
<search-form :formList="[1,2,3]" :btnList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<search-form ref="form" :formList="[1,2,3]" :btnList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<el-table
border
ref="multipleTable"
......@@ -198,14 +198,23 @@ export default {
method:"post",
url:`/api/ProductStorage/ProductStorage_ScanCodeAdd?ScanCode=${value}`,
}).then((res)=>{
if (res.data.code !== -1) {
console.log('扫码成功。。。')
this.$refs.form.formData.scanValue = ''
var postData = {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
Stime: this.formData.dateValue ? this.$moment(this.formData.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : ' ',
Etime: this.formData.dateValue ? this.$moment(this.formData.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ' '
}
this.searchData(this.postData)
this.searchData(postData)
} else {
console.log('扫码失败。。。')
this.typeV = '5'
this.deleteShow = true
this.deletetext = res.data.msg
this.$refs.form.$refs.codeInput.blur()
}
}).catch(() => {
console.log('扫码失败。。。')
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment