rev:增加库存等级修改功能
This commit is contained in:
35
mes/qd/src/api/wms/statistics/updateIvt.js
Normal file
35
mes/qd/src/api/wms/statistics/updateIvt.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/ivtQuery',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/ivtQuery/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/ivtQuery',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateIvt(data) {
|
||||
return request({
|
||||
url: 'api/ivtQuery/updateIvt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, updateIvt }
|
||||
@@ -180,6 +180,7 @@ export default {
|
||||
}
|
||||
},
|
||||
tableChanged(rows) {
|
||||
debugger
|
||||
let flag1 = true
|
||||
if (rows.length > 0) {
|
||||
let sum = 0.0
|
||||
@@ -189,7 +190,7 @@ export default {
|
||||
if (rows[i].device_code.includes('PWT')) {
|
||||
if (flag1) {
|
||||
sum = sum + parseFloat(rows[i].device_capacity_qty)
|
||||
flag1 = false
|
||||
// flag1 = false
|
||||
}
|
||||
} else {
|
||||
sum = sum + parseFloat(rows[i].device_capacity_qty)
|
||||
|
||||
134
mes/qd/src/views/wms/statistics/ivtQuery/UpdateIvtDialog.vue
Normal file
134
mes/qd/src/views/wms/statistics/ivtQuery/UpdateIvtDialog.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="修改库存等级"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="600px"
|
||||
@close="close"
|
||||
>
|
||||
<div class="head-container">
|
||||
<el-form
|
||||
size="mini"
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料批次">
|
||||
<el-input
|
||||
v-model="form2.pcsn"
|
||||
clearable
|
||||
placeholder="物料批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存等级">
|
||||
<el-select
|
||||
v-model="form2.ivt_level"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="库存等级"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_IVT_LEVEL"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="24" style="padding-top: 20px">
|
||||
<el-col :span="16" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="updateIvt">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { presenter, header } from '@crud/crud'
|
||||
import updateIvt from '@/api/wms/statistics/updateIvt'
|
||||
|
||||
export default {
|
||||
name: 'UpdateIvtDialog',
|
||||
dicts: ['ST_IVT_LEVEL'],
|
||||
components: {},
|
||||
mixins: [presenter(), header()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: false
|
||||
}
|
||||
})
|
||||
},
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
form2: {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form2 = {}
|
||||
},
|
||||
updateIvt() {
|
||||
if (!this.form2.pcsn) {
|
||||
this.crud.notify('物料批次不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.form2.ivt_level) {
|
||||
this.crud.notify('库存等级不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
|
||||
updateIvt.updateIvt(this.form2).then(res => {
|
||||
this.close()
|
||||
this.$parent.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -144,6 +144,16 @@
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="updateIvt"
|
||||
>
|
||||
修改库存等级
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<!--表格渲染-->
|
||||
@@ -191,6 +201,7 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<BucketDialog :dialog-show.sync="bucketDialog" :open-param="openParam" />
|
||||
<UpdateIvtDialog :dialog-show.sync="updateIvtDialogShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -202,6 +213,7 @@ import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import BucketDialog from '@/views/wms/statistics/ivtQuery/BucketDialog'
|
||||
import UpdateIvtDialog from '@/views/wms/statistics/ivtQuery/UpdateIvtDialog'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
@@ -213,7 +225,7 @@ import crudBucketrecord from '@/api/wms/basedata/master/bucketrecord'
|
||||
export default {
|
||||
name: 'IvtQuery',
|
||||
dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_usable'],
|
||||
components: { pagination, rrOperation, crudOperation, BucketDialog, Treeselect },
|
||||
components: { pagination, rrOperation, crudOperation, BucketDialog, Treeselect, UpdateIvtDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -240,6 +252,7 @@ export default {
|
||||
return {
|
||||
sects: [],
|
||||
classes: [],
|
||||
updateIvtDialogShow: false,
|
||||
permission: {
|
||||
},
|
||||
class_idStr: null,
|
||||
@@ -349,6 +362,12 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
})
|
||||
},
|
||||
updateIvt() {
|
||||
this.updateIvtDialogShow = true
|
||||
},
|
||||
toQuery() {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user