更新仓库管理
This commit is contained in:
199
src/views/warehouse/warehouse-info/add-or-updata.vue
Normal file
199
src/views/warehouse/warehouse-info/add-or-updata.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-11-02 16:13:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
v-if="visible"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="90px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库编码" prop="warehouseCode">
|
||||
<el-input
|
||||
v-model="dataForm.warehouseCode"
|
||||
readonly
|
||||
placeholder="请输入仓库编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库名称" prop="warehouseName">
|
||||
<el-input
|
||||
v-model="dataForm.warehouseName"
|
||||
readonly
|
||||
placeholder="请输入仓库名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库位编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
clearable
|
||||
placeholder="请输入库位编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库位名称" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
placeholder="请输入库位名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="排" prop="arrange">
|
||||
<el-input
|
||||
v-model="dataForm.arrange"
|
||||
clearable
|
||||
placeholder="请输入排" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="列" prop="col">
|
||||
<el-input v-model="dataForm.col" clearable placeholder="请输入列" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="层" prop="layer">
|
||||
<el-input v-model="dataForm.layer" clearable placeholder="请输入层" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="type" label="库位类型">
|
||||
<el-select
|
||||
v-model="dataForm.type"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择库位类型">
|
||||
<el-option
|
||||
v-for="item in urlOptions.dictList.dict0"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="parseInt(item.value)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="enabled" label="是否可用">
|
||||
<el-select
|
||||
v-model="dataForm.enabled"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择是否可用">
|
||||
<el-option
|
||||
v-for="item in isorno"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="dataForm.remark"
|
||||
clearable
|
||||
placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../mixins/basic-add';
|
||||
import {
|
||||
createWarehouseLocation,
|
||||
updateWarehouseLocation,
|
||||
getWarehouseLocation,
|
||||
getCode,
|
||||
} from '@/api/warehouse/warehouseLocation';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
getDictList: true,
|
||||
codeURL: getCode,
|
||||
createURL: createWarehouseLocation,
|
||||
updateURL: updateWarehouseLocation,
|
||||
infoURL: getWarehouseLocation,
|
||||
},
|
||||
nameList: ['location_type'],
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
arrange: undefined,
|
||||
col: undefined,
|
||||
layer: undefined,
|
||||
type: undefined,
|
||||
enabled: 1,
|
||||
remark: undefined,
|
||||
warehouseId: undefined,
|
||||
warehouseName: undefined,
|
||||
warehouseCode: undefined,
|
||||
},
|
||||
dataRule: {
|
||||
code: [
|
||||
{ required: true, message: '库位编码不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '库位名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
arrange: [{ required: true, message: '排不能为空', trigger: 'blur' }],
|
||||
col: [{ required: true, message: '列不能为空', trigger: 'blur' }],
|
||||
layer: [{ required: true, message: '层不能为空', trigger: 'blur' }],
|
||||
},
|
||||
isorno: [
|
||||
{
|
||||
id: 0,
|
||||
name: '不可用',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '可用',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id, info) {
|
||||
this.dataForm.id = id || '';
|
||||
this.dataForm.warehouseName = info.warehouseName;
|
||||
this.dataForm.warehouseCode = info.warehouseCode;
|
||||
this.dataForm.warehouseId = info.warehouseId;
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr();
|
||||
}
|
||||
if (this.urlOptions.getDictList) {
|
||||
this.getDict();
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
if (this.setData) {
|
||||
this.setDataForm();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
127
src/views/warehouse/warehouse-info/add-or-updata1.vue
Normal file
127
src/views/warehouse/warehouse-info/add-or-updata1.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-11-02 15:45:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
v-if="visible"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="90px">
|
||||
<el-form-item label="仓库编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入仓库编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入仓库名称" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label="仓库类型">
|
||||
<el-select
|
||||
v-model="dataForm.type"
|
||||
:disabled="isdetail"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择仓库类型">
|
||||
<el-option
|
||||
v-for="item in urlOptions.dictList.dict0"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="parseInt(item.value)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="storageType" v-if="!isdetail" label="物料类型">
|
||||
<el-select
|
||||
v-model="dataForm.storageType"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择物料类型">
|
||||
<el-option
|
||||
v-for="item in urlOptions.dictList.dict1"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="parseInt(item.value)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../mixins/basic-add';
|
||||
import {
|
||||
getCode,
|
||||
createWarehouse,
|
||||
updateWarehouse,
|
||||
getWarehouse,
|
||||
} from '@/api/warehouse/warehouse-info';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
getDictList: true,
|
||||
codeURL: getCode,
|
||||
createURL: createWarehouse,
|
||||
updateURL: updateWarehouse,
|
||||
infoURL: getWarehouse,
|
||||
},
|
||||
nameList: ['warehouse_type', 'warehouse_good_type'],
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
type: undefined,
|
||||
storageType: undefined,
|
||||
},
|
||||
dataRule: {
|
||||
code: [
|
||||
{ required: true, message: '仓库编码不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '仓库名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
storageType: [
|
||||
{ required: true, message: '物料类型不能为空', trigger: 'change' },
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '仓库类型不能为空', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
isdetail: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id, isdetail) {
|
||||
this.dataForm.id = id || '';
|
||||
this.isdetail = isdetail || false;
|
||||
this.visible = true;
|
||||
this.getDict();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
407
src/views/warehouse/warehouse-info/index.vue
Normal file
407
src/views/warehouse/warehouse-info/index.vue
Normal file
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-hasPermi="['warehouse:warehouse-info:create']"
|
||||
plain
|
||||
size="mini"
|
||||
@click="addWare">
|
||||
新增仓库
|
||||
</el-button>
|
||||
<el-divider content-position="left">仓库列表</el-divider>
|
||||
<el-card
|
||||
v-for="item in wareArr"
|
||||
:key="item.id"
|
||||
shadow="hover"
|
||||
@click.native="setWareInfo(item)"
|
||||
:style="{
|
||||
background: item.id === wareInfo.warehouseId ? '#37D97F' : '',
|
||||
color: item.id === wareInfo.warehouseId ? 'white' : ''
|
||||
}"
|
||||
class="ware-card">
|
||||
{{ item.name }}
|
||||
<el-dropdown class="el-dropdown-div">
|
||||
<span class="el-dropdown-link">
|
||||
<i
|
||||
class="el-icon-s-tools"
|
||||
style="color: #409eff; cursor: pointer; font-size: 25px" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
v-hasPermi="['warehouse:warehouse-info:update']"
|
||||
@click.native="dropdown(1, item.id)">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="dropdown(2, item.id)">
|
||||
详情
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-hasPermi="['warehouse:warehouse-info:delete']"
|
||||
@click.native="dropdown(3, item.id, item.name)">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="80"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
:destroy-on-close="true"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"></add-or-update>
|
||||
<add-or-update1
|
||||
ref="addOrUpdate1"
|
||||
@refreshDataList="successSubmit1"></add-or-update1>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import AddOrUpdate1 from './add-or-updata1';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import {
|
||||
deleteWarehouse,
|
||||
getWarehouseList,
|
||||
} from '@/api/warehouse/warehouse-info';
|
||||
import {
|
||||
deleteWarehouseLocation,
|
||||
getWarehouseLocationPage,
|
||||
} from '@/api/warehouse/warehouseLocation';
|
||||
import { BackgroundClass } from 'quill';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'warehouseCode',
|
||||
label: '仓库编码',
|
||||
},
|
||||
{
|
||||
prop: 'warehouseName',
|
||||
label: '仓库名称',
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '库位编码',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '库位名称',
|
||||
},
|
||||
{
|
||||
prop: 'arrange',
|
||||
label: '排',
|
||||
},
|
||||
{
|
||||
prop: 'col',
|
||||
label: '列',
|
||||
},
|
||||
{
|
||||
prop: 'layer',
|
||||
label: '层',
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '库位类型',
|
||||
filter: codeFilter('wareType'),
|
||||
},
|
||||
{
|
||||
prop: 'enabled',
|
||||
label: '是否可用',
|
||||
filter: codeFilter('deactivate'),
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseLocationPage,
|
||||
deleteURL: deleteWarehouseLocation,
|
||||
getWareListURL: getWarehouseList,
|
||||
deleteWareURL: deleteWarehouse,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`extend:warehouse-location:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`extend:warehouse-location:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位名称',
|
||||
placeholder: '库位名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位编码',
|
||||
placeholder: '库位编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('extend:warehouse-location:create')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
// {
|
||||
// type: 'button',
|
||||
// btnName: '重置',
|
||||
// name: 'reset',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('extend:warehouse-location:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('extend:warehouse-location:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
wareArr: [],
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
warehouseId: '',
|
||||
},
|
||||
wareInfo: {},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
AddOrUpdate1,
|
||||
},
|
||||
created() {
|
||||
this.urlOptions.getWareListURL().then((response) => {
|
||||
this.wareArr = response.data;
|
||||
if (this.wareArr) {
|
||||
this.wareInfo.warehouseId = this.wareArr[0].id;
|
||||
this.wareInfo.warehouseName = this.wareArr[0].name;
|
||||
this.wareInfo.warehouseCode = this.wareArr[0].code;
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
if (!this.wareInfo.warehouseId) {
|
||||
return;
|
||||
}
|
||||
this.listQuery.warehouseId = this.wareInfo.warehouseId;
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.tableData = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.code = val.code;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增库位';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
getWareArr() {
|
||||
this.urlOptions.getWareListURL().then((response) => {
|
||||
this.wareArr = response.data;
|
||||
});
|
||||
},
|
||||
addWare() {
|
||||
this.addOrEditTitle = '新增仓库';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdate = 'addOrUpdate1';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate1.init();
|
||||
});
|
||||
},
|
||||
//dropdown点击
|
||||
dropdown(val, id, name) {
|
||||
if (val === 1) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '编辑仓库';
|
||||
this.addOrUpdate = 'addOrUpdate1';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate1.init(id);
|
||||
});
|
||||
} else if (val === 2) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '仓库详情';
|
||||
this.addOrUpdate = 'addOrUpdate1';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate1.init(id, true);
|
||||
});
|
||||
} else if (val === 3) {
|
||||
this.deleteWare(id, name);
|
||||
} else {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 删除仓库
|
||||
deleteWare(id, name) {
|
||||
this.$confirm(`确定对仓库[${name}]进行删除操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
this.urlOptions.deleteWareURL(id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getWareArr();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//tableBtn点击
|
||||
handleClick(val) {
|
||||
if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '编辑';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, this.wareInfo);
|
||||
});
|
||||
} else if (val.type === 'delete') {
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex);
|
||||
} else if (val.type === 'change') {
|
||||
this.changeStatus(val.data.id);
|
||||
} else {
|
||||
this.otherMethods(val);
|
||||
}
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id, this.wareInfo);
|
||||
});
|
||||
},
|
||||
successSubmit1() {
|
||||
this.handleCancel();
|
||||
this.getWareArr();
|
||||
},
|
||||
setWareInfo(info) {
|
||||
this.wareInfo.warehouseName = info.name;
|
||||
this.wareInfo.warehouseCode = info.code;
|
||||
this.wareInfo.warehouseId = info.id;
|
||||
this.getDataList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ware-card {
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ware-card >>> .el-card__body {
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.el-dropdown-div {
|
||||
float: right;
|
||||
padding-top: 3px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user