Commit da368512 authored by YLKCNK's avatar YLKCNK

库存管理 更新接口变更

parent 201bdfe7
import request from '@/utils/request' import request from '@/utils/request'
export function listdevice_t(query) { export function listdevice_t(query) {
return request({ return request({
// url: '/wbwarehouse/queryWbWarehouseByPagination',
url: '/wbwarehouse-test/queryWbWarehouseByPagination', url: '/wbwarehouse-test/queryWbWarehouseByPagination',
method: 'get', method: 'get',
params: query params: query
}) })
} }
export function getDetailById_t(id) {
return request({
url: '/wbwarehouse-test/detail/' + id,
method: 'get'
})
}
export function updatadevice_t(data) {
return request({
url: '/wbwarehouse-test/update',
method: 'put',
data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
// 查询设备列表 // 查询设备列表
export function listdevice(query) { export function listdevice(query) {
return request({ return request({
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
</template> </template>
<script> <script>
import { updatadevice, getDetailById, listdevice_t} from '@/api/magnagement' import { listdevice_t, getDetailById_t, updatadevice_t } from '@/api/magnagement'
import { resetForm } from '@/utils/common' import { resetForm } from '@/utils/common'
export default { export default {
...@@ -298,7 +298,7 @@ export default { ...@@ -298,7 +298,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.title = '库存管理' this.title = '库存管理'
const id = row.businessId const id = row.businessId
getDetailById(id).then(res => { getDetailById_t(id).then(res => {
this.form = res.data this.form = res.data
this.open = true this.open = true
}) })
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
// 校验通过,提交表单或进行其他操作 // 校验通过,提交表单或进行其他操作
updatadevice(this.form).then(res => { updatadevice_t(this.form).then(res => {
console.log('res', res) console.log('res', res)
if (res.code === 200) { if (res.code === 200) {
this.open = false this.open = false
......
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