'基础资料部分'
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-11 16:26:29
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 14:21:53
|
||||
* @enName:
|
||||
-->
|
||||
<template>
|
||||
@@ -104,11 +104,11 @@
|
||||
|
||||
<script>import i18n from '@/lang'
|
||||
import { cacheDetail, cacheUpdate, cacheAdd, cacheCode } from '@/api/basicData/Cache/cache'
|
||||
import { areaList, areaDelete } from '@/api/basicData/Cache/area'
|
||||
import { shelfList, shelfDelete } from '@/api/basicData/Cache/shelf'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import shelfAttrAdd from './shelfAttr-add.vue'
|
||||
import shelfBtn from './shelfBtn.vue'
|
||||
import locationBtn from './locationBtn.vue'
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
@@ -121,7 +121,7 @@ const tableBtn = [
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'shelfName',
|
||||
label: i18n.t('module.basicData.cache.AreaName'),
|
||||
align: 'center'
|
||||
},
|
||||
@@ -131,7 +131,7 @@ const tableProps = [
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'shelfNum',
|
||||
prop: 'total',
|
||||
label: i18n.t('module.basicData.cache.StorageQuantity'),
|
||||
align: 'center'
|
||||
},
|
||||
@@ -148,7 +148,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'shelf',
|
||||
label: i18n.t('module.basicData.cache.Location'),
|
||||
subcomponent: shelfBtn,
|
||||
subcomponent: locationBtn,
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
@@ -219,9 +219,20 @@ export default {
|
||||
if (this.id) {
|
||||
cacheDetail(this.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
// console.log(this.dataForm)
|
||||
})
|
||||
this.listQuery.id = this.id
|
||||
areaList(this.listQuery).then(response => {
|
||||
console.log(this.listQuery.id)
|
||||
// shelfDetail(this.listQuery).then(response => {
|
||||
// console.log(response)
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// })
|
||||
shelfList(this.listQuery).then(response => {
|
||||
console.log(response)
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
@@ -236,7 +247,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
areaList(this.listQuery).then(response => {
|
||||
shelfList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
}
|
||||
@@ -249,7 +260,7 @@ export default {
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
areaDelete(raw.data.id).then(response => {
|
||||
shelfDelete(raw.data.id).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-11 16:44:10
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 19:37:48
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -34,7 +34,6 @@ import { locationList, locationDelete } from '@/api/basicData/Cache/location'
|
||||
import locationAttrAdd from './locationAttr-add.vue'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
@@ -62,10 +61,15 @@ const tableBtn = [
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: i18n.t('module.basicData.factory.createTime'),
|
||||
// filter: timeFormatter,
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.basicData.factory.createTime'),
|
||||
filter: timeFormatter,
|
||||
prop: 'locationName',
|
||||
label: i18n.t('module.basicData.cache.LocationName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -74,23 +78,28 @@ const tableProps = [
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.basicData.cache.LocationName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'anotherName',
|
||||
prop: 'locationNameAlias',
|
||||
label: i18n.t('module.basicData.cache.anotherName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'place',
|
||||
label: i18n.t('module.basicData.cache.place'),
|
||||
prop: 'rowNum',
|
||||
label: i18n.t('module.basicData.cache.rowMark'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.basicData.visual.Remarks'),
|
||||
prop: 'columns',
|
||||
label: i18n.t('module.basicData.cache.columnMark'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'locationType',
|
||||
label: i18n.t('module.basicData.cache.locationType'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.basicData.cache.status'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
@@ -130,7 +139,8 @@ export default {
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
console.log(raw.data)
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.locationName}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
@@ -156,6 +166,7 @@ export default {
|
||||
locationList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
console.log(this.list)
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
|
||||
@@ -1,30 +1,33 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:23:03
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 19:42:43
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.shelfId ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="130px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.basicData.cache.LocationName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.LocationName')])" clearable />
|
||||
<el-form-item :label="$t('module.basicData.cache.LocationName')" prop="locationName">
|
||||
<el-input v-model="dataForm.locationName" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.LocationName')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.cache.LocationCode')" prop="code">
|
||||
<el-input v-model="dataForm.code" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.LocationCode')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.cache.anotherName')" prop="anotherName">
|
||||
<el-input v-model="dataForm.anotherName" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.anotherName')])" clearable />
|
||||
<el-form-item :label="$t('module.basicData.cache.anotherName')" prop="locationNameAlias">
|
||||
<el-input v-model="dataForm.locationNameAlias" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.anotherName')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.cache.place')" prop="place">
|
||||
<el-input v-model="dataForm.place" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.place')])" clearable />
|
||||
<el-form-item :label="$t('module.basicData.cache.rowMark')" prop="layers">
|
||||
<el-input v-model="dataForm.layers" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.rowMark')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.visual.Remarks')" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.visual.Remarks')])" clearable />
|
||||
<el-form-item :label="$t('module.basicData.cache.columnMark')" prop="columns">
|
||||
<el-input v-model="dataForm.columns" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.columnMark')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.cache.status')" prop="status">
|
||||
<el-input v-model="dataForm.status" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.status')])" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -51,11 +54,14 @@ export default {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: '',
|
||||
locationName: '',
|
||||
code: '',
|
||||
anotherName: '',
|
||||
place: '',
|
||||
remark: ''
|
||||
locationNameAlias: '',
|
||||
rowNum: '',
|
||||
columns: '',
|
||||
layers: '',
|
||||
status: '',
|
||||
locationType: ''
|
||||
},
|
||||
dataRule: {
|
||||
name: [
|
||||
@@ -89,13 +95,15 @@ export default {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
'name': this.dataForm.name,
|
||||
'locationName': this.dataForm.locationName,
|
||||
'code': this.dataForm.code,
|
||||
'anotherName': this.dataForm.anotherName,
|
||||
'place': this.dataForm.place,
|
||||
'remark': this.dataForm.remark,
|
||||
'locationNameAlias': this.dataForm.locationNameAlias,
|
||||
'columns': this.dataForm.columns,
|
||||
'layers': this.dataForm.layers,
|
||||
'shelfId': this.shelfId,
|
||||
'id': this.dataForm.id
|
||||
'id': this.dataForm.id,
|
||||
'status': this.dataForm.status,
|
||||
'locationType': this.dataForm.locationType
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
locationUpdate(data).then(res => {
|
||||
@@ -111,6 +119,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
locationAdd(data).then(res => {
|
||||
// console.log(data)
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 13:12:47
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 18:39:03
|
||||
* @FilePath: \basic-admin\src\components\BaseTable\subcomponents\CheckDetail.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.basicData.cache.ManageLocation') }}</el-button>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.basicData.cache.addLocation') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-04-16 15:01:45
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 19:00:08
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<!-- 新增/编辑识别 :title="!dataForm.areaId ? 'btn.add' : 'btn.edit' | i18nFilter" -->
|
||||
<el-dialog
|
||||
:title="!dataForm.areaId ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="130px" @keyup.enter.native="dataFormSubmit()">
|
||||
@@ -17,6 +18,7 @@
|
||||
<el-form-item :label="$t('module.basicData.cache.ShelfCode')" prop="code">
|
||||
<el-input v-model="dataForm.code" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.ShelfCode')])" clearable />
|
||||
</el-form-item>
|
||||
<!-- 选择货架code的下拉框
|
||||
<el-form-item v-if="isPage" :label="$t('module.basicData.cache.AreaName')" prop="areaId">
|
||||
<el-select v-model="dataForm.areaId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.AreaName')])" clearable>
|
||||
<el-option
|
||||
@@ -26,9 +28,15 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('module.basicData.cache.StorageQuantity')" prop="total">
|
||||
<el-input-number v-model="dataForm.total" :step="1" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.StorageQuantity')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.cache.StorageQuantity')" prop="shelfNumber">
|
||||
<el-input-number v-model="dataForm.shelfNumber" :step="1" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.StorageQuantity')])" clearable />
|
||||
<el-form-item :label="$t('module.basicData.cache.rowNum')" prop="rowNum">
|
||||
<el-input-number v-model="dataForm.rowNum" :step="1" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.rowNum')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.cache.columnNum')" prop="columnNum">
|
||||
<el-input-number v-model="dataForm.columnNum" :step="1" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.cache.columnNum')])" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -39,8 +47,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { shelfDetail, shelfUpdate, shelfAdd, shelfCode } from '@/api/basicData/Cache/shelf'
|
||||
import { areaList } from '@/api/basicData/Cache/area'
|
||||
import { shelfList, shelfDetail, shelfUpdate, shelfAdd, shelfCode } from '@/api/basicData/Cache/shelf'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -90,7 +97,7 @@ export default {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
areaList(params).then(response => {
|
||||
shelfList(params).then(response => {
|
||||
if (response.data.records) {
|
||||
this.areaArr = response.data.records
|
||||
}
|
||||
@@ -114,7 +121,7 @@ export default {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = this.dataForm
|
||||
console.log(data)
|
||||
// console.log(data)
|
||||
if (this.dataForm.id) {
|
||||
shelfUpdate(data).then(res => {
|
||||
this.$message({
|
||||
@@ -129,6 +136,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
shelfAdd(data).then(res => {
|
||||
console.log(res)
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 13:03:40
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-02 19:00:47
|
||||
* @FilePath: \basic-admin\src\components\BaseTable\subcomponents\CheckDetail.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.basicData.cache.ManageShelves') }}</el-button>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.basicData.cache.addLocation') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user