基础信息下页面国际化
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
<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="portName">
|
||||
<el-form-item :label="$t('BasPort.portName')" prop="portName"> <!-- 点位名称 -->
|
||||
<el-input
|
||||
v-model="queryParams.portName"
|
||||
placeholder="请输入点位名称"
|
||||
:placeholder="$t('BasPort.inputPortName')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位分类" prop="portType">
|
||||
<el-form-item :label="$t('BasPort.portType')" prop="portType"> <!-- 点位分类 -->
|
||||
<el-input
|
||||
v-model="queryParams.portType"
|
||||
placeholder="请输入点位分类"
|
||||
:placeholder="$t('BasPort.inputPortType')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位描述" prop="portDesc">
|
||||
<el-form-item :label="$t('BasPort.portDesc')" prop="portDesc"> <!-- 点位描述 -->
|
||||
<el-input
|
||||
v-model="queryParams.portDesc"
|
||||
placeholder="请输入点位描述"
|
||||
:placeholder="$t('BasPort.inputPortDesc')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('BasPort.search') }}</el-button> <!-- 搜索 -->
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('BasPort.reset') }}</el-button> <!-- 重置 -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['bas:port:add']"
|
||||
>新增</el-button>
|
||||
>{{ $t('BasPort.add') }}</el-button> <!-- 新增 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -51,7 +51,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['bas:port:edit']"
|
||||
>修改</el-button>
|
||||
>{{ $t('BasPort.edit') }}</el-button> <!-- 修改 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['bas:port:remove']"
|
||||
>删除</el-button>
|
||||
>{{ $t('BasPort.delete') }}</el-button> <!-- 删除 -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -72,7 +72,7 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['bas:port:export']"
|
||||
>导出</el-button>
|
||||
>{{ $t('BasPort.export') }}</el-button> <!-- 导出 -->
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
@@ -80,13 +80,13 @@
|
||||
|
||||
<el-table v-loading="loading" :data="portList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="id" />
|
||||
<el-table-column label="点位名称" align="center" prop="portName" />
|
||||
<el-table-column label="点位分类" align="center" prop="portType" />
|
||||
<el-table-column label="点位描述" align="center" prop="portDesc" />
|
||||
<el-table-column label="创建人" align="center" prop="createMan" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column :label="$t('BasPort.id')" align="center" prop="id" /> <!-- id -->
|
||||
<el-table-column :label="$t('BasPort.portName')" align="center" prop="portName" /> <!-- 点位名称 -->
|
||||
<el-table-column :label="$t('BasPort.portType')" align="center" prop="portType" /> <!-- 点位分类 -->
|
||||
<el-table-column :label="$t('BasPort.portDesc')" align="center" prop="portDesc" /> <!-- 点位描述 -->
|
||||
<el-table-column :label="$t('BasPort.createMan')" align="center" prop="createMan" /> <!-- 创建人 -->
|
||||
<el-table-column :label="$t('BasPort.createTime')" align="center" prop="createTime" /> <!-- 创建时间 -->
|
||||
<el-table-column :label="$t('BasPort.operation')" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -94,14 +94,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['bas:port:edit']"
|
||||
>修改</el-button>
|
||||
>{{ $t('BasPort.edit') }}</el-button> <!-- 修改 -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['bas:port:remove']"
|
||||
>删除</el-button>
|
||||
>{{ $t('BasPort.delete') }}</el-button> <!-- 删除 -->
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -109,7 +109,7 @@
|
||||
icon="el-icon-plus"
|
||||
@click="handleBindProduct(scope.row)"
|
||||
v-hasPermi="['bas:portProductRel:list']"
|
||||
>绑定物料</el-button>
|
||||
>{{ $t('BasPort.bindProduct') }}</el-button> <!-- 绑定物料 -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -125,43 +125,43 @@
|
||||
<!-- 添加或修改基础点位对话框 -->
|
||||
<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="portName">
|
||||
<el-input v-model="form.portName" placeholder="请输入点位名称" />
|
||||
<el-form-item :label="$t('BasPort.portName')" prop="portName"> <!-- 点位名称 -->
|
||||
<el-input v-model="form.portName" :placeholder="$t('BasPort.inputPortName')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位分类" prop="portDesc">
|
||||
<el-input v-model="form.portType" placeholder="请输入点位分类" />
|
||||
<el-form-item :label="$t('BasPort.portType')" prop="portType"> <!-- 点位分类 -->
|
||||
<el-input v-model="form.portType" :placeholder="$t('BasPort.inputPortType')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位描述" prop="portDesc">
|
||||
<el-input v-model="form.portDesc" placeholder="请输入点位描述" />
|
||||
<el-form-item :label="$t('BasPort.portDesc')" prop="portDesc"> <!-- 点位描述 -->
|
||||
<el-input v-model="form.portDesc" :placeholder="$t('BasPort.inputPortDesc')" />
|
||||
</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>
|
||||
<el-button type="primary" @click="submitForm">{{ $t('BasPort.confirm') }}</el-button> <!-- 确定 -->
|
||||
<el-button @click="cancel">{{ $t('BasPort.cancel') }}</el-button> <!-- 取消 -->
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 选择物料对话框 -->
|
||||
<el-dialog :title="$t('receiveStockinAdd.selectProduct')" :visible.sync="productSelectVisible" width="1300px" append-to-body>
|
||||
<el-dialog :title="$t('BasPort.selectProduct')" :visible.sync="productSelectVisible" width="1300px" append-to-body>
|
||||
<el-form :model="queryProductParams" :inline="true" label-width="80px">
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-form-item :label="$t('BasPort.productCode')" prop="productId">
|
||||
<el-input
|
||||
v-model="queryProductParams.productId"
|
||||
placeholder="请输入物料编码"
|
||||
:placeholder="$t('BasPort.inputProductCode')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="productName">
|
||||
<el-form-item :label="$t('BasPort.productName')" prop="productName">
|
||||
<el-input
|
||||
v-model="queryProductParams.productName"
|
||||
placeholder="请输入物料名称"
|
||||
:placeholder="$t('BasPort.inputProductName')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否绑定" prop="bindStatus">
|
||||
<el-select v-model="queryProductParams.bindStatus" placeholder="请选择状态" clearable @change="handleProductQuery">
|
||||
<el-form-item :label="$t('BasPort.bindStatus')" prop="bindStatus">
|
||||
<el-select v-model="queryProductParams.bindStatus" :placeholder="$t('BasPort.selectBindStatus')" clearable @change="handleProductQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.product_port_rel_status"
|
||||
:key="dict.value"
|
||||
@@ -171,54 +171,53 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" v-hasPermi="['bas:portProdcutRel:list']" @click="handleProductQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetProductQuery">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" v-hasPermi="['bas:portProdcutRel:list']" @click="handleProductQuery">{{ $t('BasPort.search') }}</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetProductQuery">{{ $t('BasPort.reset') }}</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"
|
||||
v-if="queryProductParams.bindStatus === '0'"
|
||||
:disabled="selectedProducts.length === 0"
|
||||
@click="handleBatchBindProduct"
|
||||
v-hasPermi="['bas:portProductRel:add']"
|
||||
>批量绑定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
v-if="queryProductParams.bindStatus === '1'"
|
||||
:disabled="selectedProducts.length === 0"
|
||||
@click="handleBatchUnbindProduct"
|
||||
v-hasPermi="['bas:portProductRel:remove']"
|
||||
>批量删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="productOptions" border @selection-change="handleProductSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="英文描述" align="center" prop="spare1"/>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="单件净重KG" align="center" prop="spare2" />
|
||||
<el-table-column label="箱号" align="center" prop="spare3" />
|
||||
<el-table-column label="包装方式" align="center" prop="spare4" />
|
||||
<el-table-column label="长MM" align="center" prop="spare5" />
|
||||
<el-table-column label="宽MM" align="center" prop="spare6" />
|
||||
<el-table-column label="高MM" align="center" prop="spare7" />
|
||||
<el-table-column label="体积m³" align="center" prop="spare8" />
|
||||
<!-- <el-table-column label="净重KG" align="center" prop="spare8" />
|
||||
<el-table-column label="毛重KG" align="center" prop="spare9" />-->
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-if="queryProductParams.bindStatus === '0'"
|
||||
:disabled="selectedProducts.length === 0"
|
||||
@click="handleBatchBindProduct"
|
||||
v-hasPermi="['bas:portProductRel:add']"
|
||||
>{{ $t('BasPort.batchBind') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
v-if="queryProductParams.bindStatus === '1'"
|
||||
:disabled="selectedProducts.length === 0"
|
||||
@click="handleBatchUnbindProduct"
|
||||
v-hasPermi="['bas:portProductRel:remove']"
|
||||
>{{ $t('BasPort.batchUnbind') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="productOptions" border @selection-change="handleProductSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column :label="$t('BasPort.productCode')" align="center" prop="productId" />
|
||||
<el-table-column :label="$t('BasPort.productName')" align="center" prop="productName" />
|
||||
<el-table-column :label="$t('BasPort.productEnDesc')" align="center" prop="spare1"/>
|
||||
<el-table-column :label="$t('BasPort.unit')" align="center" prop="unit" />
|
||||
<el-table-column :label="$t('BasPort.netWeight')" align="center" prop="spare2" />
|
||||
<el-table-column :label="$t('BasPort.boxNo')" align="center" prop="spare3" />
|
||||
<el-table-column :label="$t('BasPort.packWay')" align="center" prop="spare4" />
|
||||
<el-table-column :label="$t('BasPort.length')" align="center" prop="spare5" />
|
||||
<el-table-column :label="$t('BasPort.width')" align="center" prop="spare6" />
|
||||
<el-table-column :label="$t('BasPort.height')" align="center" prop="spare7" />
|
||||
<el-table-column :label="$t('BasPort.volume')" align="center" prop="spare8" />
|
||||
<el-table-column :label="$t('BasPort.price')" align="center" prop="price" />
|
||||
<el-table-column :label="$t('BasPort.description')" align="center" prop="remark" />
|
||||
<el-table-column :label="$t('BasPort.operation')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -227,7 +226,7 @@
|
||||
@click="handleBatchBindProduct(scope.row)"
|
||||
v-hasPermi="['bas:portProductRel:add']"
|
||||
v-if="queryProductParams.bindStatus === '0'"
|
||||
>绑定物料</el-button>
|
||||
>{{ $t('BasPort.bindProduct') }}</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -235,7 +234,7 @@
|
||||
@click="handleBatchUnbindProduct(scope.row)"
|
||||
v-hasPermi="['bas:portProductRel:remove']"
|
||||
v-if="queryProductParams.bindStatus === '1'"
|
||||
>删除物料</el-button>
|
||||
>{{ $t('BasPort.unbindProduct') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -339,18 +338,20 @@ export default {
|
||||
portName: null,
|
||||
portType: null,
|
||||
portDesc: null,
|
||||
}
|
||||
this.resetForm("form")
|
||||
createMan: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@@ -360,19 +361,19 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加基础点位"
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = this.$t('BasPort.addTitle');
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPort(id).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改基础点位"
|
||||
})
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = this.$t('BasPort.editTitle');
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
@@ -380,29 +381,29 @@ export default {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePort(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
this.$modal.msgSuccess(this.$t('BasPort.editSuccess'));
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPort(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
this.$modal.msgSuccess(this.$t('BasPort.addSuccess'));
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除基础点位编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delPort(ids)
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm(this.$t('BasPort.deleteConfirm', { ids: ids })).then(function() {
|
||||
return delPort(ids);
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
this.getList();
|
||||
this.$modal.msgSuccess(this.$t('BasPort.deleteSuccess'));
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@@ -447,7 +448,7 @@ export default {
|
||||
productIds: ids
|
||||
}
|
||||
addPortProductRel(data).then(response => {
|
||||
this.$modal.msgSuccess("绑定成功")
|
||||
this.$modal.msgSuccess(this.$t('BasPort.bindSuccess'))
|
||||
this.getProductList()
|
||||
});
|
||||
},
|
||||
@@ -465,7 +466,7 @@ export default {
|
||||
productIds: ids
|
||||
}
|
||||
delPortProductRel(data).then(response => {
|
||||
this.$modal.msgSuccess("解绑成功")
|
||||
this.$modal.msgSuccess(this.$t('BasPort.unbindSuccess'))
|
||||
this.getProductList()
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user