Commit 2c8b7272 authored by hubaoshan's avatar hubaoshan

1

parent 416303e4
......@@ -27,6 +27,13 @@ export function getIncomeWmsBox(businessId) {
method: 'get'
})
}
export function getIncomeWmsBoxId(data) {
return request({
url: '/incomewmsbox/detailId/',
method: 'get',
data: data
})
}
// 3. 新增库存管理
export function addIncomeWmsBox(data) {
......@@ -49,6 +56,15 @@ export function updateIncomeWmsBox(data) {
})
}
export function updateIncomeWmsBoxId(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/incomewmsbox/updateId/' + businessId,
method: 'put',
data
})
}
// 5. 逻辑删除库存管理
export function delIncomeWmsBox(businessId) {
return request({
......
......@@ -5,8 +5,6 @@ import request from '@/utils/request'
* 2. 查询详细信息
*/
// 3. 保存
// export function addBIchnography(data) {
// return request({
......@@ -17,7 +15,6 @@ import request from '@/utils/request'
// })
// }
// 查询最近一条数据
export function findLatestData(query) {
return request({
......@@ -41,6 +38,6 @@ export function addBIchnography(data) {
export function findLabelWithBoxes() {
return request({
url: '/incomewmsbox/findLabelWithBoxes',
method: 'get',
method: 'get'
})
}
......@@ -128,7 +128,7 @@
<el-table-column label="cj" prop="cj" :show-overflow-tooltip="true" min-width="120">
<template slot-scope="scope">
<span v-if="scope.row.cj ">{{ getManufacturerLabel(scope.row.cj) ||'-' }}</span>
<span v-if="scope.row.cj ">{{ getManufacturerLabel(scope.row.cj) || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="code" prop="orderCode" :show-overflow-tooltip="true" min-width="150">
......@@ -155,6 +155,8 @@
<template slot-scope="scope">
<span v-if="scope.row.ioType === '1'"></span>
<span v-else-if="scope.row.ioType === '2'"></span>
<span v-else-if="scope.row.ioType === '3'">手动入</span>
<span v-else-if="scope.row.ioType === '4'">手动出</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -228,9 +230,8 @@
<el-row>
<el-col :span="12">
<el-form-item label="仓库:" prop="whId">
<span v-if="singleDetails.whId && getDataDictLabel(singleDetails.whId)">{{
getDataDictLabel(singleDetails.whId)
}}</span>
<span v-if="singleDetails.whId && getDataDictLabel(singleDetails.whId)">
{{ getDataDictLabel(singleDetails.whId) }}</span>
<span v-else>-</span>
<!-- <el-input v-model.trim="singleDetails.whId" :readonly="true" />-->
</el-form-item>
......@@ -293,6 +294,8 @@
<el-form-item label="出入情况:" prop="ioType">
<span v-if="singleDetails.ioType === '1'"></span>
<span v-else-if="singleDetails.ioType === '2'"></span>
<span v-else-if="singleDetails.ioType === '3'">手动入</span>
<span v-else-if="singleDetails.ioType === '4'">手动出</span>
<span v-else>-</span>
<!-- <el-input v-model.trim="singleDetails.ioType" :readonly="true" />-->
</el-form-item>
......
......@@ -216,10 +216,10 @@
style="width: 300px"
>
<el-option
v-for="(type,index) in typeList"
:key="index"
:label="type"
:value="type"
v-for="dict in typeList"
:key="dict.v"
:label="dict.v"
:value="dict.v"
/>
</el-select>
</el-form-item>
......@@ -239,10 +239,11 @@ import {
delIncomeWmsBox,
addIncomeWmsBox,
updateIncomeWmsBox,
exportIncomeWmsBox } from '@/api/incomeWmsBox'
exportIncomeWmsBox, getIncomeWmsBoxId, updateIncomeWmsBoxId
} from '@/api/incomeWmsBox'
import commonField from '@/utils/commonField'
import manufacturer from '@/data/cjlist'
import { listIncomeWmsLabel } from '@/api/incomeWmsLabel'
import { getIncomeWmsLabel, listIncomeWmsLabel } from '@/api/incomeWmsLabel'
export default {
name: 'IncomeWmsBox',
data() {
......@@ -317,7 +318,9 @@ export default {
},
typeList: [],
typelistTemp: [],
temp: []
temp: [],
id: '',
pn: ''
}
},
computed: {
......@@ -439,16 +442,21 @@ export default {
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
const Item = this.typeList.find(item => item.v === this.form.type)
if (Item) {
const data = {
labelId: this.form.businessId
businessId: this.id,
labelId: Item.k,
location: Item.l,
pn: this.pn
}
console.log(this.form)
updateIncomeWmsBox(data).then(response => {
updateIncomeWmsBoxId(data).then(response => {
this.msgSuccess('修改成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
......@@ -471,21 +479,19 @@ export default {
},
handleMove(row) {
this.reset()
listIncomeWmsLabel().then(response => {
this.typelistTemp = response.rows
this.id = row.businessId
this.pn = row.pn
getIncomeWmsBoxId(this.pn).then(response => {
this.typeList = []
console.log(row.pn)
this.typelistTemp = response.data
this.typelistTemp.forEach(item => {
if (item.pn === row.pn) {
this.form = item
const type = item.mac + ' ' + item.location
const abc = {
businessId: item.businessId,
location: item.location
}
this.typeList.push(type)
this.temp.push(abc)
}
// this.typeList.push(type)
this.typeList.push({
k: item.businessId,
l: item.location,
v: type
})
})
this.open = true
this.title = '修改库存管理'
......
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