init:版本说明
This commit is contained in:
@@ -72,45 +72,65 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码" prop="material_code" >
|
||||
<el-input v-model="form.material_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||
<el-input v-model="form.material_code" @focus="getMaterial" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" style="width: 200px;" />
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input disabled v-model="form.material_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="规格" prop="material_spec">
|
||||
<el-form-item label="规格" prop="material_spec">
|
||||
<label slot="label">规 格</label>
|
||||
<el-input v-model="form.material_spec" style="width: 200px;" />
|
||||
<el-input disabled v-model="form.material_spec" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="型号" prop="material_model">
|
||||
<label slot="label">型 号</label>
|
||||
<el-input v-model="form.material_model" style="width: 200px;" />
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<label slot="label">载具编码</label>
|
||||
<el-input v-model="form.storagevehicle_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="外部标识" prop="ext_id">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
<el-form-item label="物料批号" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<el-input-number v-model="form.qty" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="静置时间" prop="standing_time">
|
||||
<el-input-number v-model="form.standing_time" :controls="false" :min="0" label="分钟" style="width: 200px;" />
|
||||
<el-form-item label="单位" prop="qty_unit_name">
|
||||
<el-select
|
||||
v-model="form.qty_unit_name"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
@change="unitChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableEnum.md_pb_measureunit"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value+'@'+item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_used" label="1">是</el-radio>
|
||||
<el-form-item label="源单号" prop="ext_code">
|
||||
<el-input v-model="form.ext_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="源单类型" prop="ext_type">
|
||||
<el-input v-model="form.ext_type" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -157,6 +177,8 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<!--放引用的组件-->
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -167,11 +189,14 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
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'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
storagevehicle_code: null,
|
||||
material_id: null,
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
pcsn: null,
|
||||
qty_unit_id: null,
|
||||
qty_unit_name: null,
|
||||
@@ -186,8 +211,9 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Group',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
||||
// 数据字典
|
||||
dicts: ['is_used', 'GROUP_STATUS'],
|
||||
cruds() {
|
||||
@@ -206,6 +232,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
materialDialog: false,
|
||||
classes: [],
|
||||
rules: {
|
||||
}
|
||||
@@ -218,6 +245,20 @@ export default {
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.GROUP_STATUS[row.status]
|
||||
},
|
||||
getMaterial() {
|
||||
this.materialDialog = true
|
||||
},
|
||||
unitChange(row) {
|
||||
const split = row.split('@')
|
||||
this.form.qty_unit_id = split[0]
|
||||
this.form.qty_unit_name = split[1]
|
||||
},
|
||||
materialChoose(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_spec = row.material_spec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
153
nladmin-ui/src/views/wms/basedata/material/MaterialDialog.vue
Normal file
153
nladmin-ui/src/views/wms/basedata/material/MaterialDialog.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:cell-style="{'text-align':'center'}"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" width="140" />
|
||||
<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="product_series_name" label="系列" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
name: 'MaterialDialog',
|
||||
components: { rrOperation, pagination },
|
||||
dicts: ['is_used'],
|
||||
cruds() {
|
||||
return CRUD({ title: '物料选择', url: 'api/Materia', optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
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()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('materialChoose', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('materialChoose', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
>
|
||||
<el-form-item label="载具类型">
|
||||
<el-select
|
||||
v-model="query.storagevehicle_type"
|
||||
v-model="query.vehicle_type"
|
||||
clearable
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
@change="crud.toQuery"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
@@ -26,13 +28,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊搜索">
|
||||
|
||||
<el-form-item label="载具号">
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="载具号、载具名称"
|
||||
style="width: 200px;"
|
||||
placeholder="载具号"
|
||||
style="width: 110px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
@@ -42,8 +45,114 @@
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
@click="printView"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="载具物料信息"
|
||||
width="540px"
|
||||
@close="materiValueCancel()"
|
||||
>
|
||||
<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-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>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<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-form-item>
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<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-form-item>
|
||||
<el-form-item label="流程实例" prop="proc_inst_id">
|
||||
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="materiValueSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="pointMVisible"
|
||||
title="载具信息"
|
||||
width="540px"
|
||||
@close="materiValueCancel()"
|
||||
>
|
||||
<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/>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
title="打印配置"
|
||||
:visible.sync="printVisible"
|
||||
width="450px"
|
||||
>
|
||||
<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-form-item>
|
||||
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
||||
<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-form-item>
|
||||
<el-form-item label="页边距right(mm)" prop="pageright">
|
||||
<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-form-item>
|
||||
<el-form-item label="页边距left(mm)" prop="pageleft">
|
||||
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="printClose">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="print">打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
@@ -52,29 +161,41 @@
|
||||
width="450px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="载具类型" prop="storagevehicle_type">
|
||||
<el-form-item label="载具类型" prop="vehicle_type">
|
||||
<el-select
|
||||
v-model="form.storagevehicle_type"
|
||||
class="filter-item"
|
||||
v-model="form.vehicle_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
:disabled="crud.status.edit > 0"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
style="width: 250px;"
|
||||
@change="getVehicle"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:value="item.para1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<el-input v-model="form.storagevehicle_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||
<br>
|
||||
<el-form-item label="起始载具号" prop="vehicle_code">
|
||||
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具名称" prop="storagevehicle_name">
|
||||
<el-input v-model="form.storagevehicle_name" style="width: 200px;" />
|
||||
<el-form-item label="载具数量" prop="num">
|
||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具重量" prop="weigth">
|
||||
<el-input-number v-model="form.weigth" :precision="1" style="width: 200px;" />
|
||||
<el-form-item label="高度(mm)" prop="h">
|
||||
<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-form-item>
|
||||
<el-form-item label="深度(mm)" prop="l">
|
||||
<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-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
@@ -83,7 +204,8 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">生成</el-button>
|
||||
<el-button type="primary" @click="addAndprint">生成并打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -131,50 +253,53 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<!-- 分页组件-->
|
||||
<pagination/>
|
||||
</div>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="setMaterValue"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStoragevehicleinfo from '@/views/wms/basedata/storagevehicleinfo/storagevehicleinfo'
|
||||
import crudStoragevehicleinfo from './storagevehicleinfo'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
storagevehicle_name: null,
|
||||
vehicle_code: null,
|
||||
vehicle_name: null,
|
||||
one_code: null,
|
||||
two_code: null,
|
||||
rfid_code: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
is_used: '1',
|
||||
storagevehicle_type: null,
|
||||
weigth: null,
|
||||
vehicle_width: null,
|
||||
vehicle_long: null,
|
||||
vehicle_height: null,
|
||||
overstruct_type: null,
|
||||
occupystruct_qty: null,
|
||||
ext_id: null,
|
||||
qty: null,
|
||||
pcsn: null
|
||||
w: null,
|
||||
l: null,
|
||||
h: null,
|
||||
weight: null,
|
||||
overstruct_type: '0',
|
||||
occupystruct_qty: '1',
|
||||
ext_json: null,
|
||||
num: '1'
|
||||
}
|
||||
export default {
|
||||
name: 'Storagevehicleinfo',
|
||||
dicts: ['storagevehicle_type', 'is_used'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['storagevehicle_type', "VEHICLE_OVER_TYPE"],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -203,31 +328,42 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
printVisible: false,
|
||||
updateForm: {},
|
||||
printForm: {
|
||||
pageh: '40mm',
|
||||
pagew: '60mm',
|
||||
pagetop: '4.3mm',
|
||||
pagedown: '50mm',
|
||||
pageright: '30mm',
|
||||
pageleft: '8mm'
|
||||
},
|
||||
pointMVisible: false,
|
||||
materType: '01',
|
||||
materialShow: false,
|
||||
dialogVisible: false,
|
||||
materialForm: {},
|
||||
resultCodeArr: [],
|
||||
permission: {},
|
||||
classes1: [],
|
||||
rules: {
|
||||
vehicle_code: [
|
||||
{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'}
|
||||
],
|
||||
storagevehicle_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
storagevehicle_code: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
storagevehicle_name: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
vehicle_type: [
|
||||
{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}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -237,39 +373,155 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
onCloseDialog() {
|
||||
this.form = defaultForm
|
||||
},
|
||||
queryMater() {
|
||||
this.materialShow = true
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.$set(this.materialForm, 'material_code', row.material_code)
|
||||
this.$set(this.materialForm, 'material_id', row.material_id)
|
||||
this.$set(this.materialForm, 'material_code', row.material_code)
|
||||
},
|
||||
materiValueCancel() {
|
||||
this.updateForm = {}
|
||||
this.pointMVisible = false
|
||||
this.dialogVisible = false
|
||||
},
|
||||
materiValueSubmit() {
|
||||
crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
})
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(data, val) {
|
||||
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.storagevehicle_code + ', 是否继续?', '提示', {
|
||||
let msg = '此操作将停用载具,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用载具,是否继续!'
|
||||
}
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudStoragevehicleinfo.edit(data).then(res => {
|
||||
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
crudStoragevehicleinfo.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
if (data.is_used === '0') {
|
||||
data.is_used = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_used === '1') {
|
||||
data.is_used = '0'
|
||||
}
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
if (data.is_used === '0') {
|
||||
data.is_used = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_used === '1') {
|
||||
data.is_used = '0'
|
||||
}
|
||||
})
|
||||
},
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
formattType(row) {
|
||||
return this.dict.label.storagevehicle_type[row.storagevehicle_type]
|
||||
},
|
||||
printView() {
|
||||
this.printForm = {
|
||||
pageh: '40mm',
|
||||
pagew: '60mm',
|
||||
pagetop: '4.3mm',
|
||||
pagedown: '50mm',
|
||||
pageright: '30mm',
|
||||
pageleft: '8mm'
|
||||
}
|
||||
this.printVisible = true
|
||||
},
|
||||
printClose() {
|
||||
this.printVisible = false
|
||||
this.printForm = {
|
||||
pageh: '40mm',
|
||||
pagew: '60mm',
|
||||
pagetop: '4.3mm',
|
||||
pagedown: '50mm',
|
||||
pageright: '30mm',
|
||||
pageleft: '8mm'
|
||||
}
|
||||
},
|
||||
print() {
|
||||
this.printVisible = false
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (!_selectData || _selectData.length < 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
console.log(_selectData.length)
|
||||
console.log(this.printForm)
|
||||
for (let i = 0; i < _selectData.length; i++) {
|
||||
const code = _selectData[i].vehicle_code
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.SET_PRINT_PAGESIZE(1, this.printForm.pagew, this.printForm.pageh, '1')
|
||||
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '50mm', '30mm', 0, 1)
|
||||
LODOP.ADD_PRINT_BARCODE(this.printForm.pagetop, this.printForm.pageleft, this.printForm.pagedown, this.printForm.pageright, '128Auto', code)
|
||||
// LODOP.PREVIEW()// 预览
|
||||
LODOP.PRINT()// 打印
|
||||
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}
|
||||
},
|
||||
toView(row) {
|
||||
this.dialogVisible = true
|
||||
crudStoragevehicleinfo.getMaterialByVehicle(row).then(res => {
|
||||
this.materialForm = res
|
||||
})
|
||||
},
|
||||
updateweight(row) {
|
||||
this.pointMVisible = true
|
||||
this.updateForm = row
|
||||
},
|
||||
pointMateriSubmit() {
|
||||
console.log(this.updateForm)
|
||||
crudStoragevehicleinfo.edit(this.updateForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
this.updateForm = {}
|
||||
this.pointMVisible = false
|
||||
this.crud.refresh()
|
||||
},
|
||||
addAndprint() {
|
||||
const data = this.form
|
||||
if (!this.form.storagevehicle_type) {
|
||||
this.crud.notify('载具类型不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.num) {
|
||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
crudStoragevehicleinfo.add(data).then(res => {
|
||||
res.forEach((item) => {
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '60mm', '40mm', '1')
|
||||
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '50mm', '30mm', 0, 1)
|
||||
LODOP.ADD_PRINT_BARCODE('4.3mm', '8mm', '50mm', '30mm', '128Auto', item)
|
||||
// LODOP.PREVIEW()// 预览
|
||||
LODOP.PRINT()// 打印
|
||||
})
|
||||
this.crud.status.add = CRUD.STATUS.NORMAL
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
getVehicle(code) {
|
||||
if (!code) {
|
||||
this.crud.notify('请选择载具类型', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.form.vehicle_code = ''
|
||||
return false
|
||||
}
|
||||
crudStoragevehicleinfo.getVehicle(code).then(res => {
|
||||
this.form.vehicle_code = res.value
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user