add:增加单据管理
This commit is contained in:
@@ -55,26 +55,26 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="210px">
|
||||
<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="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130"/>
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip/>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column width="130" show-overflow-tooltip 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 prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130" />
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" width="130" show-overflow-tooltip :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间"/>
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="120px"
|
||||
@@ -107,22 +107,23 @@
|
||||
>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
:data="childrenList">
|
||||
:data="childrenList"
|
||||
>
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="210px" />
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130"/>
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip/>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column width="130" show-overflow-tooltip 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 prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130" />
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" width="130" show-overflow-tooltip :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间"/>
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -135,11 +136,11 @@
|
||||
|
||||
<script>
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
// import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
// import crudClassstandard from '@/views/wms/base_manage/class_standard/classstandard'
|
||||
import crudFormData from "./formData";
|
||||
import crudFormData from './formData'
|
||||
export default {
|
||||
name: 'FormDia',
|
||||
components: { rrOperation, pagination },
|
||||
@@ -147,7 +148,7 @@ export default {
|
||||
return CRUD({ title: '单据', url: 'api/pmFormData', crudMethod: { ...crudFormData }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
tableEnums: [ 'bm_form_struc#form_name#form_type' ],
|
||||
tableEnums: ['bm_form_struc#form_name#form_type'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -193,10 +194,10 @@ export default {
|
||||
// return false
|
||||
},
|
||||
|
||||
toView(row){
|
||||
if (row.hasChildren){
|
||||
toView(row) {
|
||||
if (row.hasChildren) {
|
||||
this.dtlVisible = true
|
||||
this.childrenList = row.children;
|
||||
this.childrenList = row.children
|
||||
}
|
||||
},
|
||||
clickChange(item) {
|
||||
@@ -223,7 +224,7 @@ export default {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.dialogVisible = false
|
||||
let subData = {}
|
||||
const subData = {}
|
||||
this.$set(subData, 't', this.form)
|
||||
this.$set(subData, 'item', this.tableRadio)
|
||||
this.$emit('update:dialogShow', false)
|
||||
@@ -237,11 +238,11 @@ export default {
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
let subData = {}
|
||||
const subData = {}
|
||||
this.$set(subData, 't', this.rows[0])
|
||||
this.$set(subData, 'item', this.rows[0].children)
|
||||
this.$emit('setMaterValue', subData)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -108,15 +108,15 @@
|
||||
>
|
||||
全部展开
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
>
|
||||
导入
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- type="warning"-->
|
||||
<!-- icon="el-icon-upload2"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- >-->
|
||||
<!-- 导入-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- slot="right"-->
|
||||
<!-- class="filter-item"-->
|
||||
@@ -133,6 +133,82 @@
|
||||
@click="hideShow"
|
||||
/>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="820px">
|
||||
<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="135px" label-suffix=":">
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
filterable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 235px;"
|
||||
popper-append-to-body="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据类型" prop="form_type">
|
||||
<el-select
|
||||
v-model="form.form_type"
|
||||
filterable
|
||||
style="width: 240px;"
|
||||
placeholder="请选择/搜索"
|
||||
class="filter-item"
|
||||
popper-append-to-body="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.INANDOUT_BILL_TYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="source_form_date">
|
||||
<el-date-picker v-model="form.source_form_date" type="date" placeholder="选择日期" style="width: 240px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.material_code" style="width: 240px;">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater(form.material_code)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="form.material_spec" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<el-input-number
|
||||
v-model.number="form.qty"
|
||||
:min="1"
|
||||
:max="999999"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materOptCode" @setMaterValue="setMaterValue" />
|
||||
</el-dialog>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -209,43 +285,46 @@
|
||||
<script>
|
||||
import crudFormData from './formData'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
// import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import ViewDialog from './ViewDialog'
|
||||
|
||||
import ViewDialog from './ViewDialog.vue'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
// import UploadDialog from './UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
code: null,
|
||||
bill_type: null,
|
||||
proc_inst_id: null,
|
||||
biz_id: null,
|
||||
source_form_date: new Date(),
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
boz_code: null,
|
||||
biz_date: null,
|
||||
form_type: null,
|
||||
status: null,
|
||||
mater: null,
|
||||
create_time: null,
|
||||
create_name: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
qty: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
from_data: null,
|
||||
parent_id: null
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'FormData',
|
||||
dicts: ['base_data', 'ST_INV_IN_TYPE', 'INANDOUT_BILL_TYPE', 'io_bill_status'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog, MaterDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '表单数据',
|
||||
title: '单据数据',
|
||||
url: 'api/pmFormData',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
@@ -265,8 +344,18 @@ export default {
|
||||
classes: [],
|
||||
uploadShow: false,
|
||||
// fromTypes: [],
|
||||
storlist: [],
|
||||
permission: {},
|
||||
rules: {},
|
||||
materShow: false,
|
||||
materOptCode: '',
|
||||
rules: {
|
||||
stor_id: [{ required: true, message: '请选择仓库', trigger: 'change' }],
|
||||
form_type: [{ required: true, message: '请选择单据类型', trigger: 'change' }],
|
||||
source_form_date: [{ required: true, message: '请选择源单日期', trigger: 'change' }],
|
||||
material_code: [{ required: true, message: '请输入物料编码', trigger: 'blur' }],
|
||||
qty: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
pcsn: [{ required: true, message: '请输入批次号', trigger: 'blur' }]
|
||||
},
|
||||
hideShowDialog: false,
|
||||
formStatus: [
|
||||
{
|
||||
@@ -290,7 +379,9 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// 获取分类
|
||||
// this.getFromTypes()
|
||||
crudBsrealstorattr.getStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
@@ -308,6 +399,16 @@ export default {
|
||||
// }
|
||||
// return false
|
||||
},
|
||||
async queryMater(material_code) {
|
||||
this.materShow = true
|
||||
this.materOptCode = material_code
|
||||
},
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_spec = row.material_spec
|
||||
},
|
||||
// getFromTypes() {
|
||||
// crudFormData.getParentFormTypes().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
|
||||
// this.fromTypes = res
|
||||
|
||||
Reference in New Issue
Block a user