初始化
This commit is contained in:
574
ruoyi-ui/src/views/search/ViewStockDetail/index.vue
Normal file
574
ruoyi-ui/src/views/search/ViewStockDetail/index.vue
Normal file
@@ -0,0 +1,574 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="品号" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入品号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="品名" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入品名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="序列号" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入序列号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="巷道" prop="roadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.roadwayId"
|
||||
placeholder="请输入巷道"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位-排" prop="thePlatoon">
|
||||
<el-input
|
||||
v-model="queryParams.thePlatoon"
|
||||
placeholder="请输入货位-排"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 列 -->
|
||||
<el-form-item label="货位-列" prop="theColumn">
|
||||
<el-input
|
||||
v-model="queryParams.theColumn"
|
||||
placeholder="请输入货位-列"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 层 -->
|
||||
<el-form-item label="货位-层" prop="theFloor">
|
||||
<el-input
|
||||
v-model="queryParams.theFloor"
|
||||
placeholder="请输入货位-层"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime"> <!-- 开始时间 -->
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择开始时间" style="width: 206px">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结束时间" prop="finishTime"> <!-- 结束时间 -->
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束时间" style="width: 206px">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">清空</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['search:ViewStockDetail:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['search:ViewStockDetail:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['search:ViewStockDetail:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['search:ViewStockDetail:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="ViewStockDetailList" @selection-change="handleSelectionChange" max-height="650">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="序号" align="right" prop="onlyIdentity" width="80"/> -->
|
||||
<el-table-column label="库存ID" align="left" prop="stockId" width="160"/>
|
||||
<el-table-column label="订单号" align="left" prop="orderId" width="160"/>
|
||||
<el-table-column label="品号" align="left" prop="productId" width="160"/>
|
||||
<el-table-column label="品名" align="left" prop="productName" width="160"/>
|
||||
<el-table-column label="巷道号" align="left" prop="roadwayId" width="160"/>
|
||||
<el-table-column label="货位名称" align="left" prop="cargoSpaceName" width="160"/>
|
||||
<!-- <el-table-column label="货位ID" align="left" prop="cargoSpaceId" width="120"/>-->
|
||||
<el-table-column label="序列号" align="left" prop="trayCode" width="160"/>
|
||||
<!-- <el-table-column label="数量" align="right" prop="quantity" width="120"/>-->
|
||||
<el-table-column label="作业ID" align="left" prop="jobId" width="160"/>
|
||||
<el-table-column label="批号" align="left" prop="lotNo" width="120"/>
|
||||
<el-table-column label="入库子单ID" align="left" prop="stockinDetailId" width="160"/>
|
||||
<el-table-column label="入库时间" align="left" prop="inDate" width="160"/>
|
||||
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseId" width="120"/>-->
|
||||
<!-- <el-table-column label="仓库名称" align="left" prop="warehouseName" width="120"/>-->
|
||||
<!-- <el-table-column label="垛型ID" align="left" prop="stackingId" width="120"/>-->
|
||||
|
||||
<el-table-column label="货位状态" align="left" prop="cargoSpaceStatus" width="160">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存状态" align="left" prop="stockStatus" width="160">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料状态" align="left" prop="productStatus" width="160">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否锁定" align="left" prop="locked" width="160">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="物料GUID" align="left" prop="productGuid" width="180"/> -->
|
||||
<el-table-column label="规格" align="left" prop="spec" width="160"/>
|
||||
<!-- <el-table-column label="单位" align="left" prop="unit" width="100"/> -->
|
||||
<el-table-column label="价格" align="right" prop="price" width="160"/>
|
||||
<el-table-column label="产品分类" align="left" prop="parentId" width="160"/>
|
||||
<el-table-column label="品号描述" align="left" prop="cargoNo" width="160"/>
|
||||
<el-table-column label="英文名称" align="left" prop="spare1" width="160"/>
|
||||
<!-- <el-table-column label="单件净重" align="right" prop="spare2" width="120"/> -->
|
||||
<!-- <el-table-column label="颜色" align="left" prop="spare3" width="120"/> -->
|
||||
<!-- <el-table-column label="序列号" align="left" prop="spare4" width="120"/> -->
|
||||
<!-- <el-table-column label="电压" align="left" prop="spare5" width="120"/> -->
|
||||
<!-- <el-table-column label="功率" align="left" prop="spare6" width="120"/> -->
|
||||
<!-- <el-table-column label="相位" align="left" prop="spare7" width="120"/> -->
|
||||
<!-- <el-table-column label="毛重" align="right" prop="spare8" width="120"/> -->
|
||||
<el-table-column label="NC号" align="left" prop="spare9" width="160"/>
|
||||
<el-table-column label="电源线" align="left" prop="spare10" width="160"/>
|
||||
<el-table-column label="插头" align="left" prop="spare11" width="160"/>
|
||||
<el-table-column label="接嘴" align="left" prop="spare12" width="160"/>
|
||||
<el-table-column label="快捷码" align="left" prop="spare13" width="160"/>
|
||||
<el-table-column label="库存单位编号" align="left" prop="spare14" width="160"/>
|
||||
<el-table-column label="库存单位名称" align="left" prop="spare15" width="160"/>
|
||||
<el-table-column label="品号群组" align="left" prop="spare16" width="160"/>
|
||||
<el-table-column label="归类品" align="left" prop="spare17" width="160"/>
|
||||
<el-table-column label="计量体系" align="left" prop="spare18" width="160"/>
|
||||
<el-table-column label="群组名称" align="left" prop="spare19" width="160"/>
|
||||
<el-table-column label="批号管理" align="left" prop="spare20" width="160"/>
|
||||
<el-table-column label="状态" align="left" prop="spare21" width="160"/>
|
||||
<el-table-column label="产品大类" align="left" prop="spare22" width="160"/>
|
||||
<el-table-column label="产品二类" align="left" prop="spare23" width="160"/>
|
||||
<el-table-column label="产品线/产品系列" align="left" prop="spare24" width="160"/>
|
||||
<el-table-column label="BOM状态" align="left" prop="spare25" width="160"/>
|
||||
<el-table-column label="产品定位" align="left" prop="spare26" width="160"/>
|
||||
<el-table-column label="电脑板型号" align="left" prop="spare27" width="160"/>
|
||||
<el-table-column label="非标要求" align="left" prop="spare28" width="160"/>
|
||||
<el-table-column label="品牌" align="left" prop="spare29" width="160"/>
|
||||
<el-table-column label="非标颜色" align="left" prop="spare30" width="160"/>
|
||||
<el-table-column label="主颜色" align="left" prop="spare31" width="160"/>
|
||||
<el-table-column label="辅助颜色" align="left" prop="spare32" width="160"/>
|
||||
<el-table-column label="是否标准款" align="left" prop="spare33" width="160"/>
|
||||
<el-table-column label="包装方式" align="left" prop="spare34" width="160"/>
|
||||
<el-table-column label="主要包装方式" align="left" prop="spare35" width="160"/>
|
||||
<el-table-column label="长" align="right" prop="spare36" width="160"/>
|
||||
<el-table-column label="宽" align="right" prop="spare37" width="160"/>
|
||||
<el-table-column label="高" align="right" prop="spare38" width="160"/>
|
||||
<el-table-column label="包装材积" align="right" prop="spare39" width="160"/>
|
||||
<el-table-column label="描述" align="left" prop="remark" width="160"/>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['search:ViewStockDetail:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['search:ViewStockDetail:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改库存明细查询对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="唯一标识" prop="onlyIdentity">
|
||||
<el-input v-model="form.onlyIdentity" placeholder="请输入唯一标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库存ID" prop="stockId">
|
||||
<el-input v-model="form.stockId" placeholder="请输入库存ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货位ID" prop="cargoSpaceId">
|
||||
<el-input v-model="form.cargoSpaceId" placeholder="请输入货位ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘号" prop="trayCode">
|
||||
<el-input v-model="form.trayCode" placeholder="请输入托盘号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="作业ID" prop="jobId">
|
||||
<el-input v-model="form.jobId" placeholder="请输入作业ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="lotNo">
|
||||
<el-input v-model="form.lotNo" placeholder="请输入批号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库子单ID" prop="stockinDetailId">
|
||||
<el-input v-model="form.stockinDetailId" placeholder="请输入入库子单ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="inDate">
|
||||
<el-input v-model="form.inDate" placeholder="请输入入库时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-input v-model="form.warehouseId" placeholder="请输入仓库" />
|
||||
</el-form-item>
|
||||
<el-form-item label="剁型ID" prop="stackingId">
|
||||
<el-input v-model="form.stackingId" placeholder="请输入剁型ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货位名称" prop="cargoSpaceName">
|
||||
<el-input v-model="form.cargoSpaceName" placeholder="请输入货位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="巷道ID" prop="roadwayId">
|
||||
<el-input v-model="form.roadwayId" placeholder="请输入巷道ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否锁定" prop="locked">
|
||||
<el-input v-model="form.locked" placeholder="请输入是否锁定" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料ID" prop="productId">
|
||||
<el-input v-model="form.productId" placeholder="请输入物料ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品名" prop="productName">
|
||||
<el-input v-model="form.productName" placeholder="请输入品名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="spec">
|
||||
<el-input v-model="form.spec" placeholder="请输入规格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入价格" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listViewStockDetail, getViewStockDetail, delViewStockDetail, addViewStockDetail, updateViewStockDetail } from "@/api/search/ViewStockDetail"
|
||||
import { listWarehouse } from "@/api/bas/warehouse"
|
||||
|
||||
export default {
|
||||
name: "ViewStockDetail",
|
||||
dicts: ['product_status', 'stock_status','cargo_space_status','cargo_space_lock_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 仓库选项
|
||||
warehouseOptions: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 库存明细查询表格数据
|
||||
ViewStockDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
onlyIdentity: null,
|
||||
stockId: null,
|
||||
cargoSpaceId: null,
|
||||
trayCode: null,
|
||||
quantity: null,
|
||||
jobId: null,
|
||||
lotNo: null,
|
||||
stockinDetailId: null,
|
||||
inDate: null,
|
||||
warehouseId: null,
|
||||
warehouseName: null,
|
||||
stackingId: null,
|
||||
cargoSpaceName: null,
|
||||
roadwayId: null,
|
||||
cargoSpaceStatus: null,
|
||||
stockStatus: null,
|
||||
productStatus: null,
|
||||
locked: null,
|
||||
productGuid: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
unit: null,
|
||||
price: null,
|
||||
parentId: null,
|
||||
cargoNo: null,
|
||||
spare1: null,
|
||||
spare2: null,
|
||||
spare3: null,
|
||||
spare4: null,
|
||||
spare5: null,
|
||||
spare6: null,
|
||||
spare7: null,
|
||||
spare8: null,
|
||||
spare9: null,
|
||||
spare10: null,
|
||||
spare11: null,
|
||||
spare12: null,
|
||||
spare13: null,
|
||||
spare14: null,
|
||||
spare15: null,
|
||||
spare16: null,
|
||||
spare17: null,
|
||||
spare18: null,
|
||||
spare19: null,
|
||||
spare20: null,
|
||||
spare21: null,
|
||||
spare22: null,
|
||||
spare23: null,
|
||||
spare24: null,
|
||||
spare25: null,
|
||||
spare26: null,
|
||||
spare27: null,
|
||||
spare28: null,
|
||||
spare29: null,
|
||||
spare30: null,
|
||||
spare31: null,
|
||||
spare32: null,
|
||||
spare33: null,
|
||||
spare34: null,
|
||||
spare35: null,
|
||||
spare36: null,
|
||||
spare37: null,
|
||||
spare38: null,
|
||||
spare39: null,
|
||||
remark: null,
|
||||
thePlatoon: null,
|
||||
theColumn: null,
|
||||
theFloor: null,
|
||||
startTime: null,
|
||||
finishTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
stockId: [
|
||||
{ required: true, message: "库存ID不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getWarehouseList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询仓库列表 */
|
||||
getWarehouseList() {
|
||||
var quaryParam = {
|
||||
pageNum:1,
|
||||
pageSize:99
|
||||
}
|
||||
listWarehouse(quaryParam).then(response => {
|
||||
this.warehouseOptions = response.rows;
|
||||
});
|
||||
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
|
||||
},
|
||||
/** 查询库存明细查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listViewStockDetail(this.queryParams).then(response => {
|
||||
this.ViewStockDetailList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
onlyIdentity: null,
|
||||
stockId: null,
|
||||
cargoSpaceId: null,
|
||||
trayCode: null,
|
||||
quantity: null,
|
||||
jobId: null,
|
||||
lotNo: null,
|
||||
stockinDetailId: null,
|
||||
inDate: null,
|
||||
warehouseId: null,
|
||||
stackingId: null,
|
||||
cargoSpaceName: null,
|
||||
roadwayId: null,
|
||||
cargoSpaceStatus: null,
|
||||
locked: null,
|
||||
productId: null,
|
||||
productName: null,
|
||||
spec: null,
|
||||
unit: null,
|
||||
price: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.onlyIdentity)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "新增库存详情"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const onlyIdentity = row.onlyIdentity || this.ids
|
||||
getViewStockDetail(onlyIdentity).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改库存详情"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.onlyIdentity != null) {
|
||||
updateViewStockDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addViewStockDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const onlyIdentitys = row.onlyIdentity || this.ids
|
||||
this.$modal.confirm("是否确认删除库存详情编号为" + onlyIdentitys + "的数据项?").then(function() {
|
||||
return delViewStockDetail(onlyIdentitys)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('search/ViewStockDetail/export', {
|
||||
...this.queryParams
|
||||
}, `库存明细_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-table >>> .current-row {
|
||||
background-color: #f0f9eb;
|
||||
}
|
||||
.el-form-item >>> .el-form-item__label {
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
min-width: fit-content;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user