Commit 2c8b7272 authored by hubaoshan's avatar hubaoshan

1

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