修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="移库单新增"
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
@@ -10,24 +10,37 @@
|
||||
>
|
||||
<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-input v-show="false" v-model="form.stor_code" placeholder="仓库编码"/>
|
||||
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称"/>
|
||||
<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-input v-show="false" v-model="form.stor_code" placeholder="仓库编码" />
|
||||
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称" />
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
@@ -81,7 +94,7 @@
|
||||
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px"/>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
@@ -95,13 +108,24 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"
|
||||
value-format="yyyy-MM-dd" :disabled="crud.status.view > 0"/>
|
||||
<el-date-picker
|
||||
v-model="form.biz_date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
style="width: 210px"
|
||||
value-format="yyyy-MM-dd"
|
||||
:disabled="crud.status.view > 0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea"
|
||||
:disabled="crud.status.view > 0"/>
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
style="width: 380px;"
|
||||
rows="2"
|
||||
type="textarea"
|
||||
:disabled="crud.status.view > 0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -110,7 +134,7 @@
|
||||
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
|
||||
|
||||
<!--左侧插槽-->
|
||||
<slot name="left"/>
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
@@ -132,51 +156,87 @@
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column key="1" type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column v-if="crud.status.add!==1" key="2" prop="work_status" label="状态" align="center"
|
||||
:formatter="bill_statusFormat"/>
|
||||
<el-table-column key="3" show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center"/>
|
||||
<el-table-column key="4" prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column key="5" prop="pcsn" label="批次号" align="center" min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column key="6" prop="qty_unit_name" label="单位" align="center"/>
|
||||
<el-table-column key="7" prop="quality_scode" label="品质类型" align="center" width="110px"
|
||||
:formatter="quality_scodeFormat"/>
|
||||
<el-table-column key="10" show-overflow-tooltip prop="qty" label="重量" :formatter="crud.formatNum3" width="120"
|
||||
align="center"/>
|
||||
<el-table-column key="11" show-overflow-tooltip prop="storagevehicle_code" label="载具号"/>
|
||||
<el-table-column key="12" show-overflow-tooltip prop="turnout_sect_name" label="移出库区"/>
|
||||
<el-table-column key="13" show-overflow-tooltip prop="turnout_struct_code" label="移出货位"/>
|
||||
<el-table-column key="14" show-overflow-tooltip prop="turnin_sect_name" label="移入库区"/>
|
||||
<el-table-column key="1" type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column
|
||||
v-if="crud.status.add!==1"
|
||||
key="2"
|
||||
prop="work_status"
|
||||
label="状态"
|
||||
align="center"
|
||||
:formatter="bill_statusFormat"
|
||||
/>
|
||||
<el-table-column key="3" show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center" />
|
||||
<el-table-column key="4" prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column key="5" prop="pcsn" label="批次号" align="center" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column key="6" prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column
|
||||
key="7"
|
||||
prop="quality_scode"
|
||||
label="品质类型"
|
||||
align="center"
|
||||
width="110px"
|
||||
:formatter="quality_scodeFormat"
|
||||
/>
|
||||
<el-table-column
|
||||
key="10"
|
||||
show-overflow-tooltip
|
||||
prop="qty"
|
||||
label="重量"
|
||||
:formatter="crud.formatNum3"
|
||||
width="120"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column key="11" show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column key="12" show-overflow-tooltip prop="turnout_sect_name" label="移出库区" />
|
||||
<el-table-column key="13" show-overflow-tooltip prop="turnout_struct_code" label="移出货位" />
|
||||
<el-table-column key="14" show-overflow-tooltip prop="turnin_sect_name" label="移入库区" />
|
||||
<el-table-column key="15" show-overflow-tooltip prop="turnin_struct_code" label="移入货位" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.turnin_struct_code" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryStruct(scope.$index, scope.row)"/>
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryStruct(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
<span v-show="scope.row.edit">{{ scope.row.turnin_struct_code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" key="16" align="center" label="操作" width="160" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"/>
|
||||
<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
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
<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>
|
||||
<el-button v-show="scope.row.edit" type="success" class="filter-item" size="mini" icon="el-icon-check"
|
||||
@click="handleEdit(scope.$index, scope.row)">完成
|
||||
<el-button
|
||||
v-show="scope.row.edit"
|
||||
type="success"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-check"
|
||||
@click="handleEdit(scope.$index, scope.row)"
|
||||
>完成
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<AddDtl :dialog-show.sync="dtlShow" @tableChanged="tableChanged"/>
|
||||
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged"/>
|
||||
<AddDtl :dialog-show.sync="dtlShow" @tableChanged="tableChanged" />
|
||||
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import AddDtl from '@/views/wms/st/inStor/moveStor/AddDtl'
|
||||
import handmovestor from '@/views/wms/st/inStor/moveStor/index'
|
||||
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
|
||||
@@ -240,7 +300,7 @@ export default {
|
||||
open() {
|
||||
debugger
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
||||
crudStorattr.getStor({ 'is_productstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
@@ -259,6 +319,7 @@ export default {
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
debugger
|
||||
handmovestor.getOutBillDtl({ 'moveinv_id': this.form.moveinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
@@ -310,25 +371,25 @@ export default {
|
||||
}
|
||||
}
|
||||
if (!this.flagnow) {
|
||||
item.edit = false
|
||||
item.work_status = '10'
|
||||
item.turnin_sect_id = ''
|
||||
item.turnin_struct_id = ''
|
||||
item.turnin_sect_code = ''
|
||||
item.turnin_sect_name = ''
|
||||
item.turnin_struct_code = ''
|
||||
item.turnin_struct_name = ''
|
||||
this.$set(item, 'edit', false)
|
||||
this.$set(item, 'work_status', '10')
|
||||
this.$set(item, 'turnin_sect_id', '')
|
||||
this.$set(item, 'turnin_struct_id', '')
|
||||
this.$set(item, 'turnin_sect_code', '')
|
||||
this.$set(item, 'turnin_sect_name', '')
|
||||
this.$set(item, 'turnin_struct_code', '')
|
||||
this.$set(item, 'turnin_struct_name', '')
|
||||
tablemap.set(item.stockrecord_id, item)
|
||||
}
|
||||
} else {
|
||||
item.edit = false
|
||||
item.work_status = '10'
|
||||
item.turnin_sect_id = ''
|
||||
item.turnin_struct_id = ''
|
||||
item.turnin_sect_code = ''
|
||||
item.turnin_sect_name = ''
|
||||
item.turnin_struct_code = ''
|
||||
item.turnin_struct_name = ''
|
||||
this.$set(item, 'edit', false)
|
||||
this.$set(item, 'work_status', '10')
|
||||
this.$set(item, 'turnin_sect_id', '')
|
||||
this.$set(item, 'turnin_struct_id', '')
|
||||
this.$set(item, 'turnin_sect_code', '')
|
||||
this.$set(item, 'turnin_sect_name', '')
|
||||
this.$set(item, 'turnin_struct_code', '')
|
||||
this.$set(item, 'turnin_struct_name', '')
|
||||
tablemap.set(item.stockrecord_id, item)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -169,19 +169,19 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="订单编码">
|
||||
<el-table-column :selectable="checkboxT" type="selection" />
|
||||
<el-table-column prop="bill_code" label="单据号" :min-width="flexWidth('bill_code',crud.data,'单据号')">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" width="100" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" width="100" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip width="135" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
|
||||
<el-table-column show-overflow-tooltip prop="input_time" width="135" label="创建日期" />
|
||||
<el-table-column :formatter="stateFormat" prop="bill_status" label="单据状态" :min-width="flexWidth('bill_status',crud.data,'单据状态')"/>
|
||||
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')"/>
|
||||
<el-table-column prop="bill_type" :formatter="bill_typeFormat" label="业务类型" :min-width="flexWidth('bill_type',crud.data,'业务类型')"/>
|
||||
<el-table-column prop="biz_date" label="业务日期" :min-width="flexWidth('biz_date',crud.data,'业务日期')"/>
|
||||
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" :min-width="flexWidth('create_mode',crud.data,'生成方式')"/>
|
||||
<el-table-column label="明细数" prop="detail_count" :min-width="flexWidth('detail_count',crud.data,'明细数')"/>
|
||||
<el-table-column prop="input_time" label="创建日期" :min-width="flexWidth('input_time',crud.data,'创建日期')"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -191,7 +191,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import handmovestor from '@/views/wms/st/inStor/moveStor/index'
|
||||
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -204,7 +204,7 @@ export default {
|
||||
name: 'Handmovestor',
|
||||
components: { AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', idField: 'moveinv_id', url: 'api/handmovestor', crudMethod: { ...handmovestor },
|
||||
return CRUD({ title: '移库单', idField: 'moveinv_id', url: 'api/handmovestor', crudMethod: { ...handmovestor },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
|
||||
Reference in New Issue
Block a user