init:合并基础版本

This commit is contained in:
zhangzq
2025-09-01 16:43:59 +08:00
parent ada07e70d5
commit dc30a81b5a
48 changed files with 865 additions and 679 deletions

View File

@@ -35,8 +35,10 @@ export function editUser(data) {
export function updatePass(user) {
const data = {
oldPass: encrypt(user.oldPass),
newPass: encrypt(user.newPass)
// oldPass: encrypt(user.oldPass),
// newPass: encrypt(user.newPass)
oldPass: user.oldPass,
newPass: user.newPass
}
return request({
url: 'api/users/updatePass/',

View File

@@ -24,4 +24,12 @@ export function edit(data) {
})
}
export default { add, edit, del }
export function getAllGroupInfo(data) {
return request({
url: 'api/group/getAllGroupInfo',
method: 'post',
data
})
}
export default { add, edit, del, getAllGroupInfo }

View File

@@ -2,62 +2,62 @@
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<el-row>
<el-col :span="4">
物料查询
<el-input
v-model="query.material_code"
clearable
style="width: 150px"
size="mini"
placeholder="物料编码、名称"
@keyup.enter.native="crud.toQuery"
<el-row>
<el-col :span="4">
物料查询
<el-input
v-model="query.material_code"
clearable
style="width: 150px"
size="mini"
placeholder="物料编码、名称"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
批次查询
<el-input
v-model="query.pcsn"
clearable
style="width: 150px"
size="mini"
placeholder="批次"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
载具编码
<el-input
v-model="query.storagevehicle_code"
clearable
style="width: 150px"
size="mini"
placeholder="载具编码"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
组盘状态
<el-select
v-model="query.status"
clearable
style="width: 150px"
size="mini"
placeholder="状态"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.GROUP_STATUS"
:label="item.label"
:value="item.value"
/>
</el-col>
<el-col :span="4">
批次查询
<el-input
v-model="query.pcsn"
clearable
style="width: 150px"
size="mini"
placeholder="批次"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
载具编码
<el-input
v-model="query.storagevehicle_code"
clearable
style="width: 150px"
size="mini"
placeholder="载具编码"
@keyup.enter.native="crud.toQuery"
/>
</el-col>
<el-col :span="4">
组盘状态
<el-select
v-model="query.status"
clearable
style="width: 150px"
size="mini"
placeholder="状态"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.GROUP_STATUS"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="4">
<rrOperation />
</el-col>
</el-row>
</el-select>
</el-col>
<el-col :span="4">
<rrOperation />
</el-col>
</el-row>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--新增表格-->
@@ -179,6 +179,8 @@
</div>
<!--放引用的组件-->
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
<AddDialog @AddChanged="querytable" />
</div>
</template>
@@ -190,6 +192,7 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
import AddDialog from '@/views/wms/basedata/group/AddDialog'
const defaultForm = {
group_id: null,
@@ -211,7 +214,7 @@ const defaultForm = {
}
export default {
name: 'Group',
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation },
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation, AddDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
// 数据字典
@@ -243,6 +246,9 @@ export default {
[CRUD.HOOK.beforeRefresh]() {
return true
},
querytable() {
this.crud.toQuery()
},
formattStatus(row) {
return this.dict.label.GROUP_STATUS[row.status]
},

View File

@@ -29,7 +29,7 @@
<!--表格渲染-->
<el-table
ref="table"
ref="table2"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
@@ -37,9 +37,7 @@
border
:cell-style="{'text-align':'center'}"
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
@select="handleSelectionChange"
@select-all="onSelectAll"
@current-change="clickChange"
@selection-change="clickChange"
>
<el-table-column v-if="!isSingle" type="selection" width="55" />
<el-table-column v-if="isSingle" label="选择" width="55">
@@ -51,7 +49,7 @@
<el-table-column prop="material_name" label="物料名称" width="170" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="170" show-overflow-tooltip/>
<el-table-column prop="class_name" label="物料分类" width="140" />
<el-table-column prop="unit_name" label="计量单位" />
<el-table-column prop="qty_unit_name" label="计量单位" />
<el-table-column prop="product_series_name" label="系列" />
<el-table-column prop="update_optname" label="修改人" />
<el-table-column prop="update_time" label="修改时间" width="135" />
@@ -87,7 +85,7 @@ export default {
},
isSingle: {
type: Boolean,
default: true
default: false
}
},
data() {
@@ -102,6 +100,11 @@ export default {
handler(newValue) {
this.dialogVisible = newValue
}
},
isSingle: {
handler(newValue) {
this.isSingle = newValue
}
}
},
methods: {
@@ -109,31 +112,21 @@ export default {
this.tableRadio = item
},
open() {
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
} else {
this.checkrow = row
}
},
onSelectAll() {
this.$refs.table.clearSelection()
this.crud.refresh()
},
close() {
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)
},
submit() {
debugger
// 处理单选
if (this.isSingle && this.tableRadio) {
this.$emit('update:dialogShow', false)
this.$emit('materialChoose', this.tableRadio)
return
}
this.rows = this.$refs.table.selection
this.rows = this.$refs.table2.selection
if (this.rows.length <= 0) {
this.$message('请先勾选物料')
return
@@ -146,8 +139,8 @@ export default {
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -43,7 +43,7 @@
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
<el-row>
<el-col :span="8">
<el-form-item label="物料编码" prop="material_code">
<el-form-item label="物料编码" prop="material_code" >
<el-input v-model="form.material_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
</el-form-item>
</el-col>
@@ -102,9 +102,9 @@
@selection-change="crud.selectionChangeHandler"
>
<el-table-column prop="material_code" label="物料编码" width="160" />
<el-table-column prop="material_name" label="物料名称" width="160" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="160" show-overflow-tooltip />
<el-table-column prop="material_model" label="物料型号" width="680" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="140" />
<el-table-column prop="material_model" label="物料型号" />
<el-table-column prop="class_name" label="物料分类" width="140" />
<el-table-column label="启用" align="center" prop="is_used">
<template slot-scope="scope">
@@ -138,7 +138,7 @@
<!--分页组件-->
<pagination />
</div>
<UploadDialog :dialog-show.sync="uploadShow" />
<UploadDialog :dialog-show.sync="uploadShow"/>
</div>
</template>

View File

@@ -32,6 +32,7 @@ export function getSect(params) {
})
}
export function getSectCode(params) {
return request({
url: 'api/sectattr/getSectCode',

View File

@@ -40,7 +40,7 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
<rrOperation/>
</el-form>
</div>
@@ -67,34 +67,30 @@
>
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
<el-form-item label="载具编码" prop="vehicle_code">
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;" />
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;"/>
</el-form-item>
<el-form-item label="物料编码" prop="material_code">
<template slot-scope="scope">
<el-input
v-model="materialForm.material_code"
clearable
style="width: 370px"
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''"
>
<el-button slot="append" icon="el-icon-plus" @click="queryMater" />
<el-input v-model="materialForm.material_code" clearable style="width: 370px"
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''">
<el-button slot="append" icon="el-icon-plus" @click="queryMater"/>
</el-input>
</template>
</el-form-item>
<el-form-item label="物料规格" prop="material_spec">
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;"/>
</el-form-item>
<el-form-item label="批 次" prop="pcsn">
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;" />
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;"/>
</el-form-item>
<el-form-item label="物料数量" prop="qty">
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
<el-input v-model="materialForm.qty" clearable style="width: 370px;"/>
</el-form-item>
<el-form-item label="冻结数量" prop="frozen_qty">
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;" />
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;"/>
</el-form-item>
<el-form-item label="流程实例" prop="proc_inst_id">
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;" />
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -112,11 +108,11 @@
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
<el-form-item label="载具编号" prop="vehicle_code">
<template slot-scope="scope">
<el-input v-model="updateForm.vehicle_code" clearable />
<el-input v-model="updateForm.vehicle_code" clearable/>
</template>
</el-form-item>
<el-form-item label="载具重量(g)" prop="vehicle_weight">
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;" />
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -133,22 +129,22 @@
>
<el-form ref="form" :model="printForm" size="mini" label-width="150px">
<el-form-item label="纸张高度(mm)" prop="pageh">
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;" />
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="纸张宽度(mm)" prop="pagew">
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;" />
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="页边距top(mm)" prop="pagetop">
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;" />
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="页边距right(mm)" prop="pageright">
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;" />
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="页边距down(mm)" prop="pagedown">
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;" />
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="页边距left(mm)" prop="pageleft">
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;" />
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;"/>
</el-form-item>
<br>
</el-form>
@@ -184,22 +180,22 @@
</el-form-item>
<br>
<el-form-item label="起始载具号" prop="vehicle_code">
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;" />
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;"/>
</el-form-item>
<el-form-item label="载具数量" prop="num">
<el-input-number v-model="form.num" :precision="0" style="width: 150px;" />
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="高度(mm)" prop="h">
<el-input-number v-model="form.h" :precision="0" style="width: 150px;" />
<el-input-number v-model="form.h" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="宽度(mm)" prop="w">
<el-input-number v-model="form.w" :precision="0" style="width: 150px;" />
<el-input-number v-model="form.w" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="深度(mm)" prop="l">
<el-input-number v-model="form.l" :precision="0" style="width: 150px;" />
<el-input-number v-model="form.l" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="重量(g)" prop="weight">
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;" />
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="是否启用">
<el-radio v-model="form.is_used" label="0">否</el-radio>
@@ -240,8 +236,8 @@
/>
</template>
</el-table-column>
<el-table-column prop="create_name" label="创建人" />
<el-table-column prop="create_time" label="创建时间" width="150px" />
<el-table-column prop="create_name" label="创建人"/>
<el-table-column prop="create_time" label="创建时间" width="150px"/>
<el-table-column
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
label="操作"
@@ -253,13 +249,12 @@
<udOperation
:data="scope.row"
:permission="permission"
:disabled-edit="true"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页组件-->
<pagination />
<pagination/>
</div>
<MaterDtl
:dialog-show.sync="materialShow"
@@ -280,6 +275,7 @@ import pagination from '@crud/Pagination'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
const defaultForm = {
vehicle_code: null,
vehicle_name: null,
@@ -302,7 +298,7 @@ const defaultForm = {
}
export default {
name: 'Storagevehicleinfo',
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
dicts: ['storagevehicle_type', "VEHICLE_OVER_TYPE"],
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -351,23 +347,23 @@ export default {
permission: {},
rules: {
vehicle_code: [
{ required: true, message: '不能为空', trigger: 'blur' }
{required: true, message: '不能为空', trigger: 'blur'}
],
is_delete: [
{ required: true, message: '不能为空', trigger: 'blur' }
{required: true, message: '不能为空', trigger: 'blur'}
],
is_used: [
{ required: true, message: '不能为空', trigger: 'blur' }
{required: true, message: '不能为空', trigger: 'blur'}
],
vehicle_type: [
{ required: true, message: '不能为空', trigger: 'blur' }
{required: true, message: '不能为空', trigger: 'blur'}
],
overstruct_type: [
{ required: true, message: '不能为空', trigger: 'blur' }
{required: true, message: '不能为空', trigger: 'blur'}
],
num: [
{ required: true, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
{required: true, message: '不能为空', trigger: 'blur'},
{validator: numberOne}
]
}
}

View File

@@ -133,7 +133,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归属库区" prop="sect_id">
<el-form-item label="归属库区" prop="sect_code">
<el-cascader
v-model="form.cascader"
style="width: 200px;"
@@ -272,17 +272,16 @@
{{ dict.label.placement_type[scope.row.placement_type] }}
</template>
</el-table-column>
<!-- <el-table-column label="是否启用" align="center" prop="is_used">-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- :value="format_is_used(scope.row.is_used)"-->
<!-- active-color="#409EFF"-->
<!-- inactive-color="#F56C6C"-->
<!-- @change="changeEnabled(scope.row, scope.row.is_used)"-->
<!-- />-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="is_used" label="是否启用" />-->
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
:value="format_is_used(scope.row.is_used)"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.is_used)"
/>
</template>
</el-table-column>
<el-table-column prop="taskdtl_type" label="锁定任务类型" width="150" :formatter="taskdtl_typeFormat" />
<el-table-column prop="task_code" label="锁定任务编码" width="150" />
<el-table-column prop="inv_code" label="锁定单据编码" width="150" />
@@ -327,10 +326,8 @@ const defaultForm = {
struct_code: null,
struct_name: null,
simple_name: null,
sect_id: null,
sect_code: null,
sect_name: null,
stor_id: null,
stor_code: null,
stor_name: null,
stor_type: null,
@@ -424,10 +421,10 @@ export default {
struct_name: [
{ required: true, message: '仓位名称不能为空', trigger: 'blur' }
],
sect_id: [
sect_code: [
{ required: true, message: '库区标识不能为空', trigger: 'blur' }
],
stor_id: [
stor_code: [
{ required: true, message: '仓库标识不能为空', trigger: 'blur' }
],
capacity: [
@@ -457,7 +454,7 @@ export default {
}
},
created() {
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
crudSectattr.getSectCode({ 'stor_code': '' }).then(res => {
this.sects = res.content
})
},
@@ -468,12 +465,12 @@ export default {
},
[CRUD.HOOK.afterToEdit](crud, form) {
const val = []
val[0] = form.stor_id
val[1] = form.sect_id
val[0] = form.stor_code
val[1] = form.sect_code
form.cascader = val
},
sectChange(val) {
this.form.sect_id = val[1]
this.form.sect_code = val[1]
},
openOneCreate() {
this.openOneCreateDialog = true
@@ -490,16 +487,16 @@ export default {
},
sectQueryChange(val) {
if (val.length === 1) {
this.query.stor_id = val[0]
this.query.sect_id = ''
this.query.stor_code= val[0]
this.query.sect_code = ''
}
if (val.length === 0) {
this.query.sect_id = ''
this.query.stor_id = ''
this.query.sect_code = ''
this.query.stor_code = ''
}
if (val.length === 2) {
this.query.stor_id = val[0]
this.query.sect_id = val[1]
this.query.stor_code = val[0]
this.query.sect_code = val[1]
}
this.crud.toQuery()
},

View File

@@ -40,6 +40,14 @@ export function getPointList(data) {
})
}
export function getRegionPoints(params) {
return request({
url: 'api/schBasePoint/getRegionPoints',
method: 'get',
params
})
}
export function changeLock(data) {
return request({
url: 'api/schBasePoint/changeLock',
@@ -48,4 +56,4 @@ export function changeLock(data) {
})
}
export default { add, edit, del, changeUsed, getPointList, changeLock }
export default { add, edit, del, changeUsed, getPointList, getRegionPoints, changeLock }

View File

@@ -313,7 +313,7 @@ export default {
rows.forEach((item) => {
let same_mater = true
this.form.tableData.forEach((row) => {
if (row.pcsn === item.pcsn) {
if (row.pcsn === item.pcsn && row.material_id === item.material_id && row.storagevehicle_code === item.storagevehicle_code) {
same_mater = false
}
})

View File

@@ -77,12 +77,12 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker/index'
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
import group, { getAllGroupInfo } from '@/views/wms/basedata/group/group.js'
const start = new Date()
export default {
name: 'AddDtl',
components: { crudOperation, rrOperation, pagination, DateRangePicker },
components: { crudOperation, rrOperation, pagination, DateRangePicker, group },
cruds() {
return CRUD({
title: '用户',
@@ -149,10 +149,10 @@ export default {
console.log('获取的rows:')
console.log(this.rows)
this.$emit('tableChanged', this.rows)
// crudRawAssist.queryBoxMater(this.rows).then(res => {
// this.rows = res
// this.$emit('tableChanged', this.rows)
// })
group.getAllGroupInfo(this.rows).then(res => {
this.rows = res.content
this.$emit('tableChanged', this.rows)
})
// this.form = this.$options.data().form
}
}

View File

@@ -72,6 +72,20 @@
label="数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="assign_qty"
:formatter="crud.formatNum3"
label="分配数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="unassign_qty"
:formatter="crud.formatNum3"
label="未分配数量"
align="center"
/>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
@@ -155,10 +169,13 @@
:data="form.tableMater"
style="width: 100%;"
max-height="300"
highlight-current-row
@row-click="clcikDisRow"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" />
@@ -215,7 +232,7 @@ export default {
type: String,
default: null
},
storId: {
storCode: {
type: String,
default: null
}
@@ -236,6 +253,7 @@ export default {
sect_val: null,
form: {
dtl_row: null,
dis_row: null,
storage_qty: '',
point_code: null,
checked: true,
@@ -255,7 +273,7 @@ export default {
},
methods: {
open() {
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
crudSectattr.getSectCode({ 'stor_code': this.storCode }).then(res => {
this.sects = res.content
})
@@ -283,11 +301,15 @@ export default {
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
this.openParam = res
this.form.dtl_row = res[row.index]
this.form.dis_row = null
})
crudRawAssist.getDisDtl(row).then(res => {
this.form.tableMater = res
})
},
clcikDisRow(row, column, event) {
this.form.dis_row = row
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
@@ -369,6 +391,10 @@ export default {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form.dis_row) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 如果勾选了,直接跳后台
if (this.form.checked) {
if (!this.sect_code) {
@@ -385,6 +411,7 @@ export default {
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.divBtn = false
this.form.dis_row = null
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).finally(() => {
@@ -403,9 +430,8 @@ export default {
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const flag = this.form.tableMater.some(mater => !mater.struct_code)
if (flag) {
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
if (!this.form.dis_row) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 如果勾选了,直接跳后台
@@ -415,6 +441,7 @@ export default {
})
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.form.dis_row = null
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})

View File

@@ -379,7 +379,7 @@ export default {
divOpen() {
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
this.openParam = res
this.storId = this.currentRow.stor_id
this.storCode = this.currentRow.stor_code
this.billType = this.currentRow.bill_type
this.divShow = true
})

View File

@@ -157,21 +157,14 @@
disabled
/>
</el-form-item>
<el-form-item label="出库" prop="point_code">
<el-select
v-model="form2.point_code"
clearable
<el-form-item label="出库" prop="gender2">
<el-cascader
placeholder="请选择"
class="filter-item"
style="width: 150px;"
>
<el-option
v-for="item in pointList"
:key="item.point_code"
:label="item.point_name"
:value="item.point_code"
/>
</el-select>
:options="outBoundRegion"
:props="{ checkStrictly: true }"
clearable
@change="outBoundChange"
/>
</el-form-item>
</el-form>
</div>
@@ -211,6 +204,7 @@
<el-table-column prop="material_name" label="物料名称" width="170px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="storagevehicle_code" label="载具号" width="150px" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
<el-table-column prop="pcsn" label="批次号" width="150px" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
<el-table-column show-overflow-tooltip prop="qty" label="物料总数" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" align="center" width="120px" :min-width="flexWidth('plan_qty',crud.data,'出库重量')">
<template scope="scope">
<el-input-number v-show="mstrow.bill_type === '1011'" v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 90px" />
@@ -239,7 +233,7 @@ import CRUD, { crud } from '@crud/crud'
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
import StructIvt from '@/views/wms/st/outbill/StructIvt'
import PointDialog from '@/views/wms/sch/point/PointDialog'
import crudPoint from '@/views/wms/sch/point/schBasePoint'
import crudPoint, { getRegionPoints } from '@/views/wms/sch/point/schBasePoint'
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
import { autoCancel, getOutBillDis } from './checkoutbill'
@@ -260,7 +254,7 @@ export default {
type: Array,
default: () => { return [] }
},
storId: {
storCode: {
type: String,
default: null
}
@@ -292,9 +286,11 @@ export default {
form2: {
unassign_qty: '0',
assign_qty: '0',
point_code: ''
point_code: '',
region_code: ''
},
sects: [],
outBoundRegion: [],
pointList: [],
rules: {
}
@@ -320,13 +316,11 @@ export default {
},
methods: {
open() {
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
crudSectattr.getSectCode({ 'stor_code': this.storCode }).then(res => {
this.sects = res.content
})
const area_type = 'CKQ'
crudPoint.getPointList({ 'region_code': area_type }).then(res => {
this.pointList = res
crudPoint.getRegionPoints({ 'region_code': 'CKQ' }).then(res => {
this.outBoundRegion = res.content
})
},
close() {
@@ -340,10 +334,11 @@ export default {
},
PointChanged(row) {
this.form2.point_code = row.point_code
this.form2.region_code = row.region_code
},
openStructIvt() {
this.currentRow.remark = ''
this.currentRow.stor_id = this.storId
this.currentRow.stor_code = this.storCode
this.loadingAlldiv = true
checkoutbill.getStructIvt(this.currentRow).then(res => {
this.openParam = res
@@ -368,6 +363,20 @@ export default {
this.mstrow.sect_code = val[1]
}
},
outBoundChange(val) {
if (val.length === 1) {
this.form2.region_code = val[0]
this.form2.point_code = ''
}
if (val.length === 0) {
this.form2.region_code = ''
this.form2.point_code = ''
}
if (val.length === 2) {
this.form2.region_code = val[0]
this.form2.point_code = val[1]
}
},
tabledisabled(row) {
if ((row.work_status === '00' || row.work_status === '01') && row.is_issued === '0') {
return false
@@ -460,13 +469,14 @@ export default {
}
},
allSetPointAllDtl() {
if (this.form2.point_code === '') {
if (this.form2.regon_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.loadingSetAllPoint = true
const data = {
'point_code': this.form2.point_code,
'region_code': this.form2.region_code,
'iostorinv_id': this.mstrow.iostorinv_id,
'bill_code': this.mstrow.bill_code,
'checked': this.checked

View File

@@ -93,7 +93,11 @@
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘编码" align="center" width="250px" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="批次号" align="center" width="150px" />
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="qty" label="可出重量" :formatter="crud.formatNum3" align="center" >
<template slot-scope="scope">
<el-input v-model="scope.row.qty" clearable style="width: 120px"></el-input>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -200,15 +204,15 @@ export default {
}
row.edit = !row.edit
if (row.edit) {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.qty)
} else {
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.qty)
// 如果待分配重量等于0则 明细重量 - 已分配重量
if (parseInt(this.queryrow.unassign_qty) === 0) {
this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.qty)
}
if (this.queryrow.unassign_qty > this.goal_unassign_qty) {
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))

View File

@@ -203,7 +203,7 @@
</div>
<AddDialog @AddChanged="querytable" />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :rowmst="mstrow" @DivChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-code="storCode" :rowmst="mstrow" @DivChanged="querytable" />
</div>
</template>
@@ -262,7 +262,7 @@ export default {
checkrows: [],
storlist: [],
billtypelist: [],
storId: null
storCode: null
}
},
mounted: function() {
@@ -382,7 +382,7 @@ export default {
divOpen() {
checkoutbill.getOutBillDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.openParam = res
this.storId = this.currentRow.stor_id
this.storCode = this.currentRow.stor_code
this.divShow = true
this.mstrow = this.currentRow
})