add:成品入库取消组盘
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="bucketunique" label="箱号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_type" label="箱类型" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="pcsn" label="批次" />
|
||||
@@ -99,6 +99,7 @@ import crudProductIn from '@/views/wms/storage_manage/product/productIn/producti
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'AddBox',
|
||||
dicts: ['BOX_STATUS'],
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -155,6 +156,9 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('tableChanged2', this.tableRadio)
|
||||
},
|
||||
formterStatus(row) {
|
||||
return this.dict.label.BOX_STATUS[row.status]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_code" label="销售单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" :formatter="formterType" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_qty" label="销售数量" />
|
||||
@@ -106,6 +106,7 @@ import crudProductIn from '@/views/wms/storage_manage/product/productIn/producti
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
dicts: ['PCS_SAL_TYPE', 'PCS_SALE_STATUS'],
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -160,6 +161,12 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
},
|
||||
formterType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.sale_type]
|
||||
},
|
||||
formterStatus(row) {
|
||||
return this.dict.label.PCS_SALE_STATUS[row.status]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
<el-form-item label="放入数量:" prop="storage_qty">
|
||||
<el-input-number
|
||||
v-model="form.storage_qty"
|
||||
:disabled="form.bucketunique !== ''"
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
:controls="false"
|
||||
@@ -155,6 +156,16 @@
|
||||
>
|
||||
组盘确认
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="cancelConfirmvehicle()"
|
||||
>
|
||||
取消组盘
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
:loading="divBtn"
|
||||
@@ -231,7 +242,7 @@
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import StructDiv from '@/views/wms/storage_manage/product/productIn/StructDiv'
|
||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||
import crudPoint from '@/views/wms/scheduler_manage/point/point'
|
||||
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
|
||||
@@ -474,6 +485,22 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelConfirmvehicle() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductIn.cancelConfirmvehicle(this.form.dtl_row).then(res => {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
|
||||
this.form.vehicle_code = ''
|
||||
this.form.bucketunique = ''
|
||||
this.openParam = res
|
||||
this.form.tableMater = []
|
||||
this.dis_row = null
|
||||
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
this.sectProp = val
|
||||
@@ -493,20 +520,17 @@ export default {
|
||||
tableChanged(row) {
|
||||
this.form.sect_id = this.sect_id
|
||||
this.form.stor_id = this.stor_id
|
||||
// 新增一行物料时,给行进行赋值
|
||||
for (let i = 0; i < this.form.tableMater.length; i++) {
|
||||
this.form.tableMater[i].struct_id = row.point_id
|
||||
this.form.tableMater[i].struct_code = row.point_code
|
||||
this.form.tableMater[i].struct_name = row.point_name
|
||||
this.form.tableMater[i].region_code = row.region_code
|
||||
this.form.tableMater[i].region_name = row.region_name
|
||||
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
crudProductIn.divStruct(this.form).then(res => {
|
||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
||||
this.dis_row.struct_id = row.struct_id
|
||||
this.divBtn = true
|
||||
crudProductIn.divStruct(this.dis_row).then(res => {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.tableMater = []
|
||||
this.dis_row = null
|
||||
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
this.form.tableMater = []
|
||||
}).finally(() => {
|
||||
this.divBtn = false
|
||||
})
|
||||
},
|
||||
tableChanged2(row) {
|
||||
@@ -520,15 +544,14 @@ export default {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.sect_id) {
|
||||
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
if (this.form.checked) {
|
||||
if (!this.sect_id) {
|
||||
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.divBtn = true
|
||||
|
||||
debugger
|
||||
this.dis_row.stor_id = this.stor_id.toString()
|
||||
this.dis_row.sect_id = this.sect_id.toString()
|
||||
crudProductIn.divStruct(this.dis_row).then(res => {
|
||||
@@ -542,6 +565,10 @@ export default {
|
||||
this.divBtn = false
|
||||
})
|
||||
} else {
|
||||
if (!this.stor_id) {
|
||||
this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(false)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="货位选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-cascader
|
||||
v-model="query.sect"
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input
|
||||
v-model="query.struct_code"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
placeholder="输入货位编码、名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<rrOperation/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="struct_code" label="货位编码"/>
|
||||
<el-table-column prop="struct_name" label="货位名称"/>
|
||||
<el-table-column prop="sect_name" label="库区名称"/>
|
||||
<el-table-column prop="lock_type" :formatter="lockFormat" label="是否锁定"/>
|
||||
<el-table-column prop="storagevehicle_code" label="存储载具号"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, {crud, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
|
||||
export default {
|
||||
name: 'StructDiv',
|
||||
components: {crudOperation, rrOperation, pagination},
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '仓位',
|
||||
optShow: {},
|
||||
url: 'api/structattr',
|
||||
idField: 'struct_id',
|
||||
sort: 'struct_id,desc',
|
||||
query: { search: '', is_lock: '0', sect_id: '', stor_id: '' },
|
||||
crudMethod: { ...crudStructattr }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['d_lock_type'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
classes: [],
|
||||
dialogVisible: false,
|
||||
sect: {},
|
||||
mol_type: '',
|
||||
checkrow: {},
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
sectProp: {
|
||||
handler(newValue, oldValue) {
|
||||
this.sect = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.crud.resetQuery(false)
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
/* if (this.sect) {
|
||||
this.query.sect = this.sect
|
||||
if (this.sect.length === 1) {
|
||||
this.query.stor_id = this.sect[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (this.sect.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (this.sect.length === 2) {
|
||||
this.query.stor_id = this.sect[0]
|
||||
this.query.sect_id = this.sect[1]
|
||||
}
|
||||
}*/
|
||||
this.query.stor_id = this.storId
|
||||
this.query.is_used = '1'
|
||||
this.query.is_delete = '0'
|
||||
this.crud.toQuery()
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.checkrow = row
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.mol_type = msg
|
||||
},
|
||||
lockFormat(row, column) {
|
||||
return this.dict.label.d_lock_type[row.lock_type]
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.sects = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选仓位')
|
||||
return
|
||||
}
|
||||
// 溢单不允许选择已锁定或者有载具的货位
|
||||
if (this.checkrow.lock_type !== '0') {
|
||||
this.$message('不允许选择已锁定的货位!')
|
||||
return
|
||||
}
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.checkrow)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -96,6 +96,14 @@ export function confirm(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelConfirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/productIn/cancelConfirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -108,5 +116,6 @@ export default {
|
||||
divStruct,
|
||||
unDivStruct,
|
||||
setPoint,
|
||||
confirm
|
||||
confirm,
|
||||
cancelConfirmvehicle
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ export default {
|
||||
this.nowrow = row
|
||||
},
|
||||
async queryStruct() {
|
||||
if (!this.form.mol_type) {structShow
|
||||
if (!this.form.mol_type) {
|
||||
this.crud.notify('请先选择损溢类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user