2025-06-23 18:18:19 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<div v-if="crud.props.searchToggle">
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
|
label-position="right"
|
|
|
|
|
|
label-width="80px"
|
|
|
|
|
|
label-suffix=":"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form-item label="载具类型">
|
|
|
|
|
|
<el-select
|
2025-07-10 19:49:53 +08:00
|
|
|
|
v-model="query.vehicle_type"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
clearable
|
2025-07-10 19:49:53 +08:00
|
|
|
|
size="mini"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
placeholder="请选择"
|
2025-07-10 19:49:53 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
style="width: 180px;"
|
|
|
|
|
|
@change="hand"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.storagevehicle_type"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="载具号">
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-input
|
2025-07-10 19:49:53 +08:00
|
|
|
|
v-model="query.vehicle_code"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2025-07-10 19:49:53 +08:00
|
|
|
|
placeholder="载具号"
|
|
|
|
|
|
style="width: 110px;"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<rrOperation />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<crudOperation :permission="permission">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
icon="el-icon-printer"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="printView"
|
|
|
|
|
|
>
|
|
|
|
|
|
打印
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</crudOperation>
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<!--表单组件-->
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<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">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="物料编码" prop="material_code">
|
|
|
|
|
|
<template slot-scope="scope">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<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" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="物料规格" prop="material_spec">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="批 次" prop="pcsn">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="物料数量" prop="qty">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="冻结数量" prop="frozen_qty">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="流程实例" prop="proc_inst_id">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</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">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="updateForm.vehicle_code" clearable />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="载具重量(g)" prop="vehicle_weight">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</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">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="页边距top(mm)" prop="pagetop">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="页边距right(mm)" prop="pageright">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="页边距down(mm)" prop="pagedown">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="页边距left(mm)" prop="pageleft">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</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>
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
:before-close="crud.cancelCU"
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
:title="crud.status.title"
|
|
|
|
|
|
:visible.sync="crud.status.cu > 0"
|
|
|
|
|
|
width="450px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="载具类型" prop="vehicle_type">
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-select
|
2025-07-10 19:49:53 +08:00
|
|
|
|
v-model="form.vehicle_type"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="mini"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
placeholder="请选择"
|
2025-07-10 19:49:53 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
style="width: 250px;"
|
|
|
|
|
|
@change="getVehicle"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.storagevehicle_type"
|
|
|
|
|
|
:label="item.label"
|
2025-07-10 19:49:53 +08:00
|
|
|
|
:value="item.para1"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<br>
|
|
|
|
|
|
<el-form-item label="起始载具号" prop="vehicle_code">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;" />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</el-form-item>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="载具数量" prop="num">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input-number v-model="form.num" :precision="0" style="width: 150px;" />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</el-form-item>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="高度(mm)" prop="h">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input-number v-model="form.h" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="宽度(mm)" prop="w">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input-number v-model="form.w" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="深度(mm)" prop="l">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input-number v-model="form.l" :precision="0" style="width: 150px;" />
|
2025-07-10 19:49:53 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="重量(g)" prop="weight">
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;" />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="是否启用">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">生成</el-button>
|
|
|
|
|
|
<el-button type="primary" @click="addAndprint">生成并打印</el-button>
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--表格渲染-->
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
|
|
|
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识" />
|
|
|
|
|
|
<el-table-column prop="storagevehicle_type_name" label="载具类型" :formatter="formattType" />
|
|
|
|
|
|
<el-table-column prop="storagevehicle_code" label="载具编码" />
|
|
|
|
|
|
<el-table-column prop="storagevehicle_name" label="载具名称" />
|
|
|
|
|
|
<el-table-column prop="pcsn" label="绑定物料" />
|
|
|
|
|
|
<el-table-column prop="weigth" label="托盘重量" />
|
|
|
|
|
|
<el-table-column label="是否启用" align="center" prop="is_used">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-switch
|
|
|
|
|
|
v-model="scope.row.is_used"
|
|
|
|
|
|
active-color="#409EFF"
|
|
|
|
|
|
inactive-color="#F56C6C"
|
|
|
|
|
|
active-value="1"
|
|
|
|
|
|
inactive-value="0"
|
|
|
|
|
|
@change="changeEnabled(scope.row, scope.row.is_used)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<el-table-column prop="create_name" label="创建人" />
|
|
|
|
|
|
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
width="150px"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
fixed="right"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<udOperation
|
|
|
|
|
|
:data="scope.row"
|
|
|
|
|
|
:permission="permission"
|
2025-07-29 16:37:27 +08:00
|
|
|
|
:disabled-edit="true"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<!-- 分页组件-->
|
2025-07-29 16:37:27 +08:00
|
|
|
|
<pagination />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</div>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<MaterDtl
|
|
|
|
|
|
:dialog-show.sync="materialShow"
|
|
|
|
|
|
:is-single="true"
|
|
|
|
|
|
:mater-opt-code="materType"
|
|
|
|
|
|
@setMaterValue="setMaterValue"
|
|
|
|
|
|
/>
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
import crudStoragevehicleinfo from './storagevehicleinfo'
|
2025-06-23 18:18:19 +08:00
|
|
|
|
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'
|
2025-07-10 19:49:53 +08:00
|
|
|
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
|
|
|
|
|
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
|
|
|
|
|
|
2025-06-23 18:18:19 +08:00
|
|
|
|
const defaultForm = {
|
2025-07-10 19:49:53 +08:00
|
|
|
|
vehicle_code: null,
|
|
|
|
|
|
vehicle_name: null,
|
2025-06-23 18:18:19 +08:00
|
|
|
|
one_code: null,
|
|
|
|
|
|
two_code: null,
|
|
|
|
|
|
rfid_code: null,
|
2025-07-10 19:49:53 +08:00
|
|
|
|
update_name: null,
|
2025-06-23 18:18:19 +08:00
|
|
|
|
update_time: null,
|
|
|
|
|
|
is_delete: null,
|
|
|
|
|
|
is_used: '1',
|
|
|
|
|
|
storagevehicle_type: null,
|
2025-07-10 19:49:53 +08:00
|
|
|
|
w: null,
|
|
|
|
|
|
l: null,
|
|
|
|
|
|
h: null,
|
|
|
|
|
|
weight: null,
|
|
|
|
|
|
overstruct_type: '0',
|
|
|
|
|
|
occupystruct_qty: '1',
|
|
|
|
|
|
ext_json: null,
|
|
|
|
|
|
num: '1'
|
2025-06-23 18:18:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'Storagevehicleinfo',
|
2025-07-29 16:37:27 +08:00
|
|
|
|
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
|
2025-07-10 19:49:53 +08:00
|
|
|
|
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
2025-06-23 18:18:19 +08:00
|
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
|
|
|
|
cruds() {
|
|
|
|
|
|
return CRUD({
|
|
|
|
|
|
title: '载具',
|
|
|
|
|
|
url: 'api/storagevehicleinfo',
|
|
|
|
|
|
idField: 'storagevehicle_id',
|
|
|
|
|
|
sort: 'storagevehicle_id,desc',
|
|
|
|
|
|
crudMethod: { ...crudStoragevehicleinfo },
|
|
|
|
|
|
optShow: {
|
|
|
|
|
|
add: true,
|
|
|
|
|
|
edit: false,
|
|
|
|
|
|
del: false,
|
|
|
|
|
|
download: false,
|
|
|
|
|
|
reset: true
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
var numberOne = (rule, value, callback) => {
|
|
|
|
|
|
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
|
|
|
|
|
|
const numRe = new RegExp(numReg)
|
|
|
|
|
|
if (!numRe.test(value)) {
|
|
|
|
|
|
callback(new Error('只能输入数字'))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return {
|
2025-07-10 19:49:53 +08:00
|
|
|
|
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: {},
|
2025-06-23 18:18:19 +08:00
|
|
|
|
resultCodeArr: [],
|
|
|
|
|
|
permission: {},
|
|
|
|
|
|
rules: {
|
2025-07-10 19:49:53 +08:00
|
|
|
|
vehicle_code: [
|
2025-07-29 16:37:27 +08:00
|
|
|
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
2025-07-10 19:49:53 +08:00
|
|
|
|
],
|
2025-06-23 18:18:19 +08:00
|
|
|
|
is_delete: [
|
2025-07-29 16:37:27 +08:00
|
|
|
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
2025-06-23 18:18:19 +08:00
|
|
|
|
],
|
|
|
|
|
|
is_used: [
|
2025-07-29 16:37:27 +08:00
|
|
|
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
2025-06-23 18:18:19 +08:00
|
|
|
|
],
|
2025-07-10 19:49:53 +08:00
|
|
|
|
vehicle_type: [
|
2025-07-29 16:37:27 +08:00
|
|
|
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
2025-06-23 18:18:19 +08:00
|
|
|
|
],
|
|
|
|
|
|
overstruct_type: [
|
2025-07-29 16:37:27 +08:00
|
|
|
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
2025-06-23 18:18:19 +08:00
|
|
|
|
],
|
|
|
|
|
|
num: [
|
2025-07-29 16:37:27 +08:00
|
|
|
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
|
|
|
|
|
{ validator: numberOne }
|
2025-06-23 18:18:19 +08:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
return true
|
|
|
|
|
|
},
|
2025-07-10 19:49:53 +08:00
|
|
|
|
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()
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2025-06-23 18:18:19 +08:00
|
|
|
|
hand(value) {
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
},
|
|
|
|
|
|
changeEnabled(data, val) {
|
2025-07-10 19:49:53 +08:00
|
|
|
|
let msg = '此操作将停用载具,是否继续!'
|
|
|
|
|
|
if (val !== '1') {
|
|
|
|
|
|
msg = '此操作将启用载具,是否继续!'
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$confirm(msg, '提示', {
|
2025-06-23 18:18:19 +08:00
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2025-07-10 19:49:53 +08:00
|
|
|
|
crudStoragevehicleinfo.changeActive(data).then(res => {
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
2025-06-23 18:18:19 +08:00
|
|
|
|
}).catch(() => {
|
2025-07-10 19:49:53 +08:00
|
|
|
|
data.is_used = !data.is_used
|
2025-06-23 18:18:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2025-07-10 19:49:53 +08:00
|
|
|
|
format_is_used(is_used) {
|
|
|
|
|
|
return is_used === '1'
|
|
|
|
|
|
},
|
2025-06-23 18:18:19 +08:00
|
|
|
|
formattType(row) {
|
|
|
|
|
|
return this.dict.label.storagevehicle_type[row.storagevehicle_type]
|
2025-07-10 19:49:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
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
|
|
|
|
|
|
})
|
2025-06-23 18:18:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|