rev:出入库编辑异常
This commit is contained in:
@@ -11,19 +11,21 @@
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary"
|
||||
@click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
||||
:model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
@@ -41,33 +43,33 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px" />
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" clearable style="width: 150px" />
|
||||
<el-input v-model="form.source_form_type" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单id" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" clearable style="width: 150px" />
|
||||
<el-input v-model="form.source_form_id" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单时间" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" clearable style="width: 150px" />
|
||||
<el-input v-model="form.source_form_date" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 150px" />
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<slot name="left"/>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
@@ -99,20 +101,24 @@
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格"/>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="160" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].pcsn" class="input-with-select" /></template>
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].pcsn" class="input-with-select"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="计划数量" width="160" align="center">
|
||||
<template scope="scope"><el-input-number v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
<template scope="scope">
|
||||
<el-input-number v-model="tableData[scope.$index].qty" class="input-with-select"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableData[scope.$index].unit_id"
|
||||
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
||||
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
||||
<el-option
|
||||
v-for="item in unitDict"
|
||||
:key="item.value"
|
||||
@@ -143,24 +149,24 @@
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].source_form_type" class="input-with-select" />
|
||||
<el-input v-model="tableData[scope.$index].source_form_type" class="input-with-select"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单id" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].source_form_id" class="input-with-select" />
|
||||
<el-input v-model="tableData[scope.$index].source_form_id" class="input-with-select"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].remark" rows="2" type="textarea"/>
|
||||
<el-input v-model="tableData[scope.$index].remark" rows="2" type="textarea"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
@@ -192,11 +198,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import CRUD, {crud, form} from '@crud/crud'
|
||||
import MaterDialog from '@/views/wms/base_manage/material/MaterDialog'
|
||||
import FormDialog from '@/views/wms/pm_manage/form_data/FormDialog'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
@@ -217,10 +224,10 @@ const defaultForm = {
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, MaterDialog,measureunit, FormDialog },
|
||||
components: {formstruc, MaterDialog, measureunit, FormDialog},
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
statusEnums: [ 'FORM_STATUS', 'IOBILL_TYPE_IN' ],
|
||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code' ],
|
||||
statusEnums: ['FORM_STATUS', 'IOBILL_TYPE_IN'],
|
||||
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -232,20 +239,21 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
tableData: [],
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
formShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
materType: '03', // 关键成品
|
||||
id: '',
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
bill_type: [
|
||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||
{required: true, message: '单据类型不能为空', trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -255,29 +263,38 @@ export default {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
setForm(row) {
|
||||
this.id = row.form.id
|
||||
},
|
||||
open() {
|
||||
this.tableData = [],
|
||||
formstruc.getHeader('st_ivt_iostorinv').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
formstruc.getHeader('st_ivt_iostorinv').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value, '']
|
||||
})
|
||||
})
|
||||
})
|
||||
formstruc.getHeader('st_ivt_iostorinvdtl').then(res => {
|
||||
this.dtlCols = res
|
||||
}),
|
||||
measureunit.getSelect().then(res => {
|
||||
this.unitDict = res.content
|
||||
})
|
||||
console.log(this.id)
|
||||
console.log(2222222)
|
||||
if (this.id !== '' && this.id !== null && this.id !== undefined) {
|
||||
crudProductIn.getIosInvDtl(this.id).then(res => {
|
||||
this.tableData = res
|
||||
this.id = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
|
||||
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
@@ -292,11 +309,11 @@ export default {
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
if (valid) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -311,7 +328,7 @@ export default {
|
||||
|
||||
tableDtlMaterial(rows) {
|
||||
rows.forEach((row) => {
|
||||
const data = {}
|
||||
const data = {}
|
||||
data.material_name = row.material_name
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
@@ -321,12 +338,12 @@ export default {
|
||||
data.source_form_id = ''
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
this.dtlCols.forEach(a => {
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
this.$set(data.form_data, a.value, item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
@@ -337,17 +354,17 @@ export default {
|
||||
this.form.source_form_type = mst.form_type
|
||||
this.form.source_form_id = mst.id
|
||||
let mst_form_data = mst.form_data;
|
||||
if (data['item'] ==null || data['item'].length == 0){
|
||||
rows.push(mst)
|
||||
}else {
|
||||
if (data['item'] == null || data['item'].length == 0) {
|
||||
rows.push(mst)
|
||||
} else {
|
||||
rows = data['item']
|
||||
}
|
||||
this.cols.forEach(a=>{
|
||||
this.cols.forEach(a => {
|
||||
let item = ''
|
||||
if (a.value in mst_form_data) {
|
||||
item = mst_form_data[a.value];
|
||||
}
|
||||
this.$set(this.form.form_data,a.value,item)
|
||||
this.$set(this.form.form_data, a.value, item)
|
||||
})
|
||||
rows.forEach((row) => {
|
||||
const data = {}
|
||||
@@ -361,13 +378,13 @@ export default {
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let fowFormData = row.form_data;
|
||||
let row_form_data = {...fowFormData,...data};
|
||||
this.dtlCols.forEach(a=>{
|
||||
let row_form_data = {...fowFormData, ...data};
|
||||
this.dtlCols.forEach(a => {
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
item = row_form_data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
this.$set(data.form_data, a.value, item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
|
||||
@@ -11,25 +11,27 @@
|
||||
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary"
|
||||
@click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
|
||||
:model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="status">
|
||||
<el-select disabled
|
||||
v-model="form.bill_type"
|
||||
style="width: 100px; height: 35px;top: -5px;"
|
||||
placeholder="业务类型"
|
||||
v-model="form.bill_type"
|
||||
style="width: 100px; height: 35px;top: -5px;"
|
||||
placeholder="业务类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.IOBILL_TYPE_OUT"
|
||||
@@ -40,26 +42,26 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px" />
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" disabled style="width: 150px" />
|
||||
<el-input v-model="form.source_form_type" disabled style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单id" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" disabled style="width: 150px" />
|
||||
<el-input v-model="form.source_form_id" disabled style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单时间" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" disabled style="width: 150px" />
|
||||
<el-input v-model="form.source_form_date" disabled style="width: 150px"/>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" disabled style="width: 150px" />
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" disabled style="width: 150px"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" disabled style="width: 380px;" rows="2" type="textarea" />
|
||||
<el-input v-model="form.remark" disabled style="width: 380px;" rows="2" type="textarea"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
@@ -102,22 +104,23 @@
|
||||
@current-change="handleDtlCurrentChange"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="计划数量" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库" />
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格"/>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次"/>
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="计划数量"/>
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库"/>
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_qty" label="物料数量"/>
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" width="160"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" />
|
||||
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" width="160"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id"/>
|
||||
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
|
||||
:label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
@@ -135,17 +138,17 @@
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="stor_code" label="仓库" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="struct_code" label="载具所在仓位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center"/>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center"/>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center"/>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center"/>
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150"/>
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center"/>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="stor_code" label="仓库" align="center"/>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="struct_code" label="载具所在仓位" align="center"/>
|
||||
<el-table-column prop="point_code1" label="任务起始位置" align="center" width="120"/>
|
||||
<el-table-column prop="point_code2" label="任务目的位置" align="center" width="120"/>
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center"/>
|
||||
<el-table-column prop="status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
<el-table-column prop="source_form_type" label="源单类型" align="center" width="150"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" align="center" width="150"/>
|
||||
@@ -157,25 +160,25 @@
|
||||
title="载具分配"
|
||||
width="700px"
|
||||
>
|
||||
<el-form :model="vehicleform" size="mini" label-width="110px">
|
||||
<el-form :model="vehicleform" size="mini" label-width="110px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="vehicleform.material_name" disabled style="width: 150px;" />
|
||||
<el-input v-model="vehicleform.material_name" disabled style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<el-input v-model="vehicleform.qty" disabled style="width: 150px;" />
|
||||
<el-input v-model="vehicleform.qty" disabled style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<span class="crud-opts-right2">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<slot name="left"/>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
@@ -195,28 +198,29 @@
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center" >
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="vehicledis[scope.$index].vehicle_code" clearable />
|
||||
<el-input v-model="vehicledis[scope.$index].vehicle_code" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="qty" label="物料数量" align="center" >
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="qty" label="物料数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="vehicledis[scope.$index].qty" clearable />
|
||||
<el-input-number v-model="vehicledis[scope.$index].qty" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="subRow(scope.$index, scope.row)">删除</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="subRow(scope.$index, scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16" style="border: 1px solid white">
|
||||
<span />
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitDialogVehicle">保存</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitDialogVehicle">保存</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="closeDialogVehicle">关闭</el-button>
|
||||
@@ -229,7 +233,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import CRUD, {crud} from '@crud/crud'
|
||||
import crudProduct from '@/views/wms/stor_manage/in/storinvin'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import {inDecision} from "./storinvin";
|
||||
@@ -237,10 +241,10 @@ import {inDecision} from "./storinvin";
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: { },
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
|
||||
statusEnums: [ 'IOBILL_TYPE_OUT','FORM_STATUS' ],
|
||||
statusEnums: ['IOBILL_TYPE_OUT', 'FORM_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -267,7 +271,7 @@ export default {
|
||||
tableData: [],
|
||||
tabledis: [],
|
||||
vehicledis: [],
|
||||
vehicleform:{},
|
||||
vehicleform: {},
|
||||
currentDtl: null,
|
||||
form: {
|
||||
id: '',
|
||||
@@ -315,17 +319,17 @@ export default {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
addVehicledis(){
|
||||
this.vehicledis.push({ vehicle_code: '', qty: 0 })
|
||||
addVehicledis() {
|
||||
this.vehicledis.push({vehicle_code: '', qty: 0})
|
||||
},
|
||||
subRow(index,row){
|
||||
this.vehicledis.splice(index,1)
|
||||
subRow(index, row) {
|
||||
this.vehicledis.splice(index, 1)
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
if (current.vehicle_code != null){
|
||||
if (current.vehicle_code != null) {
|
||||
this.divflag = false;
|
||||
}else {
|
||||
} else {
|
||||
this.divflag = true;
|
||||
}
|
||||
this.tabledis = []
|
||||
@@ -359,21 +363,39 @@ export default {
|
||||
|
||||
|
||||
queryTableDdis() {
|
||||
if (this.currentDtl !== null && this.currentDtl.vehicle_code!=null) {
|
||||
crudProduct.getVehicleTask({ 'vehicle_code': this.currentDtl.vehicle_code }).then(res => {
|
||||
if (this.currentDtl !== null && this.currentDtl.vehicle_code != null) {
|
||||
crudProduct.getVehicleTask({'vehicle_code': this.currentDtl.vehicle_code}).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}
|
||||
},
|
||||
closeDialogVehicle(){
|
||||
closeDialogVehicle() {
|
||||
this.dialogVehicle = false
|
||||
this.vehicledis = []
|
||||
this.vehicleform = {}
|
||||
},
|
||||
submitDialogVehicle(){
|
||||
submitDialogVehicle() {
|
||||
//判断每条载具信息的qty是否小于等于0或者大于vehicleform.qty
|
||||
//判断每条载具信息的qty和是否小于0或者大于vehicleform.qty
|
||||
this.vehicleform.item = this.vehicledis
|
||||
const invalidItem = this.vehicleform.item.some(item => item.qty <= 0 || item.qty > this.vehicleform.qty);
|
||||
if (invalidItem) {
|
||||
this.crud.notify('载具分配失败,请检查载具分配中数量是否满足条件大于0或者小于' + this.vehicleform.qty, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return false
|
||||
}
|
||||
|
||||
let sum = 0;
|
||||
this.vehicleform.item.some(item => {
|
||||
sum += item.qty;
|
||||
});
|
||||
|
||||
if (sum <= 0 || sum > this.vehicleform.qty) {
|
||||
this.crud.notify('载具分配失败,请检查载具分配中数量之和是否满足条件大于0或者小于' + this.vehicleform.qty, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return false
|
||||
}
|
||||
|
||||
crudProduct.inDecision(this.vehicleform).then(res => {
|
||||
this.crud.notify('载具分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.dialogVehicle = false
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div >
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
@@ -68,11 +68,11 @@
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
@@ -124,10 +124,10 @@
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column show-overflow-tooltip prop="code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.code }}</el-link>
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_type" label="业务类型">
|
||||
@@ -140,28 +140,29 @@
|
||||
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" min-width="120" label="源单类型" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单编码" min-width="155" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_date" label="源单时间" min-width="140" />
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" min-width="120" label="源单类型"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单编码" min-width="155"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_date" label="源单时间" min-width="140"/>
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" prop="create_name" />
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建人" align="center" prop="create_name"/>
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150"/>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>-->
|
||||
</template>
|
||||
-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<AddDialog ref="editDialog" @AddChanged="querytable"/>
|
||||
<ViewDialog ref="itemview"/>
|
||||
<TaskDialog ref="taskDis"/>
|
||||
</div>
|
||||
@@ -170,7 +171,7 @@
|
||||
<script>
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
import CRUD, { crud, header,form, presenter } from '@crud/crud'
|
||||
import CRUD, {crud, header, form, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
@@ -178,7 +179,7 @@ import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/stor_manage/in/AddDialog'
|
||||
import TaskDialog from '@/views/wms/stor_manage/in/TaskDialog'
|
||||
import ViewDialog from '@/views/wms/stor_manage/in/ViewDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
@@ -199,16 +200,26 @@ const defaultForm = {
|
||||
|
||||
export default {
|
||||
name: 'ProductOut',
|
||||
components: { TaskDialog, AddDialog, ViewDialog, formstruc, crudProductIn, crudOperation, rrOperation, udOperation, pagination },
|
||||
components: {
|
||||
TaskDialog,
|
||||
AddDialog,
|
||||
ViewDialog,
|
||||
formstruc,
|
||||
crudProductIn,
|
||||
crudOperation,
|
||||
rrOperation,
|
||||
udOperation,
|
||||
pagination
|
||||
},
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
optShow: { add: true, reset: true },
|
||||
optShow: {add: true, reset: true},
|
||||
idField: 'id',
|
||||
url: '/api/stIvtIostorinv',
|
||||
crudMethod: { ...crudProductIn },
|
||||
query:{
|
||||
in_storage :true
|
||||
crudMethod: {...crudProductIn},
|
||||
query: {
|
||||
in_storage: true
|
||||
},
|
||||
props: {
|
||||
size: 10
|
||||
@@ -217,10 +228,10 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
statusEnums: ['FORM_STATUS','IOBILL_TYPE_IN','FLOW_STATUS'],
|
||||
statusEnums: ['FORM_STATUS', 'IOBILL_TYPE_IN', 'FLOW_STATUS'],
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
cols: [],
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
dis_flag: true,
|
||||
@@ -243,7 +254,7 @@ export default {
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted: function() {
|
||||
mounted: function () {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
@@ -258,7 +269,9 @@ export default {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
|
||||
[CRUD.HOOK.beforeToEdit](row) {
|
||||
this.$refs.editDialog.setForm(row)
|
||||
},
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.itemview.setForm(row)
|
||||
@@ -270,7 +283,7 @@ export default {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductIn.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
crudProductIn.confirm({'iostorinv_id': this.currentRow.iostorinv_id}).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
@@ -287,7 +300,7 @@ export default {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductIn.taskOpen(this.currentRow ).then(res => {
|
||||
crudProductIn.taskOpen(this.currentRow).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
@@ -314,7 +327,7 @@ export default {
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.status === '10'|| currentRow.status === '13') {
|
||||
if (currentRow.status === '10' || currentRow.status === '13') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
@@ -324,7 +337,7 @@ export default {
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
}
|
||||
if (currentRow.status === '13') {
|
||||
if (currentRow.status === '13') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
|
||||
@@ -227,6 +227,8 @@ import MaterDialog from '@/views/wms/base_manage/material/MaterDialog'
|
||||
import FormDialog from '@/views/wms/pm_manage/form_data/FormDialog'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||
import crudProductIn from '@/views/wms/stor_manage/out/storinvout'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
@@ -267,6 +269,7 @@ export default {
|
||||
tableData:[],
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
id: '',
|
||||
formShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
@@ -288,6 +291,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setForm(row) {
|
||||
this.id = row.form.id
|
||||
},
|
||||
open() {
|
||||
this.tableData = [],
|
||||
formstruc.getHeader('st_ivt_iostorinv').then(res => {
|
||||
@@ -302,6 +308,12 @@ export default {
|
||||
measureunit.getSelect().then(res => {
|
||||
this.unitDict = res.content
|
||||
})
|
||||
if (this.id !== '' && this.id !== null && this.id !== undefined) {
|
||||
crudProductIn.getIosInvDtl(this.id).then(res => {
|
||||
this.tableData = res
|
||||
this.id = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<AddDialog ref="editDialog" @AddChanged="querytable" />
|
||||
<ViewDialog ref="itemview"/>
|
||||
<TaskDialog ref="taskDis"/>
|
||||
</div>
|
||||
@@ -258,7 +258,9 @@ export default {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
|
||||
[CRUD.HOOK.beforeToEdit](row) {
|
||||
this.$refs.editDialog.setForm(row)
|
||||
},
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.itemview.setForm(row)
|
||||
|
||||
Reference in New Issue
Block a user