This commit is contained in:
2022-01-14 16:41:37 +08:00
parent 602af58f2d
commit b0f0582e51
16 changed files with 1426 additions and 217 deletions

View File

@@ -1,7 +1,254 @@
<!--
* @Author: zwq
* @Date: 2022-01-12 15:35:11
* @Date: 2020-12-29 15:41:11
* @LastEditors: zwq
* @LastEditTime: 2022-01-12 15:35:11
* @LastEditTime: 2022-01-14 15:54:12
* @Description:
-->
<template>
<div class="app-container">
<el-form
ref="formData"
:model="formData"
:inline="true"
size="medium"
label-width="100px"
>
<el-form-item :label="$t('module.basicData.Warehouse.TaskType')" prop="taskType">
<el-select v-model="formData.taskType" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.TaskType')])" clearable>
<el-option
v-for="item in taskTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('module.basicData.Warehouse.TaskStatus')" prop="status">
<el-select v-model="formData.status" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.TaskStatus')])" clearable>
<el-option
v-for="item in TaskStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('module.basicData.Warehouse.VehicleName')" prop="equipmentId">
<el-select v-model="formData.equipmentId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.VehicleName')])" clearable>
<el-option
v-for="item in VehicleNameList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
</el-form-item>
</el-form>
<base-table
:page="formData.current"
:limit="formData.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="formData.current"
:limit.sync="formData.size"
@pagination="getList()"
/>
<current-task-info v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
</div>
</template>
<script>
import { CurrentTaskList } from '@/api/basicData/Warehouse/HistoricalTask'
import CurrentTaskInfo from './components/CurrentTaskInfo.vue'
import i18n from '@/lang'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
// import { timeFormatter } from '@/filters'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableBtn = [
{
type: 'view',
btnName: 'btn.see'
}
]
const tableProps = [
{
prop: 'taskCode',
label: i18n.t('module.basicData.Warehouse.Code'),
align: 'center'
},
{
prop: 'createTime',
label: i18n.t('module.basicData.Warehouse.ExecutionTime'),
align: 'center'
},
{
prop: 'taskSource',
label: i18n.t('module.basicData.Warehouse.TaskSource'),
align: 'center'
},
{
prop: 'taskType',
label: i18n.t('module.basicData.Warehouse.TaskType'),
align: 'center'
},
{
prop: 'fullCode',
label: i18n.t('module.basicData.Warehouse.TaskBoxNumber'),
align: 'center'
},
{
prop: 'emptyCode',
label: i18n.t('module.basicData.Warehouse.FullBoxNumber'),
align: 'center'
},
{
prop: 'wcurrProcessCode',
label: i18n.t('module.basicData.Warehouse.PreviousOperation'),
align: 'center'
},
{
prop: 'wnextProcessCode',
label: i18n.t('module.basicData.Warehouse.NextOperation'),
align: 'center'
},
{
prop: 'anotherCurrLocation',
label: i18n.t('module.basicData.Warehouse.StartLocation'),
align: 'center'
},
{
prop: 'anotherTargetLocation',
label: i18n.t('module.basicData.Warehouse.TargetLocation'),
align: 'center'
},
{
prop: 'currLocation',
label: i18n.t('module.basicData.Warehouse.FullBoxStartLocation'),
align: 'center'
},
{
prop: 'name',
label: i18n.t('module.basicData.Warehouse.VehicleName'),
align: 'center'
}
]
export default {
name: 'ScrapInfo',
components: { Pagination, BaseTable, MethodBtn, CurrentTaskInfo },
data() {
return {
trueWidth: 100,
addOrUpdateVisible: false,
tableProps,
tableBtn,
list: [],
total: 0,
listLoading: false,
formData: {
taskType: '',
status: '',
equipmentId: '',
current: 1,
size: 10
},
taskTypeList: [{
'label': '出库',
'value': 0
}, {
'label': '入库',
'value': 1
}, {
'label': '流转',
'value': 2
}],
TaskStatusList: [{
'label': '初始化',
'value': 0
}, {
'label': '损坏',
'value': 1
}],
VehicleNameList: [{
'label': '小车1',
'value': 0
}, {
'label': '小车2',
'value': 1
}]
}
},
created() {
this.getList()
},
methods: {
getList() {
this.listLoading = true
CurrentTaskList(this.formData).then(response => {
if (response.data.records) {
this.list = response.data.records
} else {
this.list.splice(0, this.list.length)
}
this.total = response.data.total
this.listLoading = false
})
},
handleClick(raw) {
console.log(raw)
this.addNew(raw.data.id)
},
// 新增 / 修改
addNew(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: zwq
* @LastEditTime: 2022-01-12 16:27:58
* @LastEditTime: 2022-01-13 15:49:01
* @Description:
-->
<template>
@@ -27,20 +27,20 @@
<el-form-item :label="$t('module.basicData.Warehouse.TaskStatus')" prop="status">
<el-select v-model="formData.status" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.TaskStatus')])" clearable>
<el-option
v-for="item in equipmentList"
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in TaskStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('module.basicData.Warehouse.VehicleName')" prop="equipmentId">
<el-select v-model="formData.equipmentId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.VehicleName')])" clearable>
<el-option
v-for="item in equipmentList"
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in VehicleNameList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
@@ -66,7 +66,14 @@
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
/>
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
@@ -74,15 +81,17 @@
:limit.sync="formData.size"
@pagination="getList()"
/>
<historical-task-info v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
</div>
</template>
<script>
import { equipmentInfoList } from '@/api/basicData/Equipment/equipmentInfo'
import { HistoricalTaskList } from '@/api/basicData/Warehouse/HistoricalTask'
import HistoricalTaskInfo from './components/HistoricalTaskInfo.vue'
import i18n from '@/lang'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
// import { timeFormatter } from '@/filters'
/**
* 表格表头配置项 TypeScript接口注释
@@ -100,6 +109,12 @@ import Pagination from '@/components/Pagination' // Secondary package based on e
*
*/
const tableBtn = [
{
type: 'view',
btnName: 'btn.see'
}
]
const tableProps = [
{
prop: 'taskCode',
@@ -165,11 +180,13 @@ const tableProps = [
export default {
name: 'ScrapInfo',
components: { Pagination, BaseTable },
components: { Pagination, BaseTable, MethodBtn, HistoricalTaskInfo },
data() {
return {
trueWidth: 200,
trueWidth: 100,
addOrUpdateVisible: false,
tableProps,
tableBtn,
list: [],
total: 0,
listLoading: false,
@@ -193,26 +210,26 @@ export default {
'label': '流转',
'value': 2
}],
equipmentList: []
TaskStatusList: [{
'label': '初始化',
'value': 0
}, {
'label': '损坏',
'value': 1
}],
VehicleNameList: [{
'label': '小车1',
'value': 0
}, {
'label': '小车2',
'value': 1
}]
}
},
created() {
this.init()
this.getList()
},
methods: {
init() {
const listQuery = {
current: 1,
size: 500
}
this.equipmentList.splice(0, this.equipmentList.length)
equipmentInfoList(listQuery).then(response => {
if (response.data.records) {
this.equipmentList = response.data.records
}
})
},
getList() {
if (this.formData.timeSlot) {
this.formData.startTime = this.formData.timeSlot[0]
@@ -231,6 +248,17 @@ export default {
this.total = response.data.total
this.listLoading = false
})
},
handleClick(raw) {
console.log(raw)
this.addNew(raw.data.id)
},
// 新增 / 修改
addNew(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
}
}
}

View File

@@ -1,7 +1,169 @@
<!--
* @Author: zwq
* @Date: 2022-01-12 15:32:02
* @Date: 2020-12-29 15:41:11
* @LastEditors: zwq
* @LastEditTime: 2022-01-12 15:32:03
* @LastEditTime: 2022-01-14 16:29:02
* @Description:
-->
<template>
<div class="app-container">
<head-form
:placeholder-name="placeholderName"
:key-name="keyName"
:show-add="false"
@getDataList="getList"
@add="addNew"
/>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<Factory-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
</div>
</template>
<script>
import { StorageBoxInfoList } from '@/api/basicData/Warehouse/StorageBoxInfo'
import FactoryAdd from './components/StorageBoxInfoDetail.vue'
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { timeFormatter } from '@/filters'
import i18n from '@/lang'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableBtn = [
{
type: 'see',
btnName: 'btn.see'
}
]
const tableProps = [
{
prop: 'code',
label: i18n.t('module.basicData.Warehouse.StorageBoxNumber'),
filter: timeFormatter,
align: 'center'
},
{
prop: 'status',
label: i18n.t('module.basicData.Warehouse.BoxStatus'),
align: 'center'
},
{
prop: 'locationName',
label: i18n.t('module.basicData.Warehouse.CurrentLocation'),
align: 'center'
},
{
prop: 'isEmpty',
label: i18n.t('module.basicData.Warehouse.IsEmpty'),
align: 'center'
}
]
export default {
name: 'StorageBoxInfo',
components: { Pagination, BaseTable, MethodBtn, HeadForm, FactoryAdd },
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'info',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
keyName: i18n.t('module.basicData.Warehouse.StorageBoxNumber'),
placeholderName: this.$t('module.basicData.Warehouse.StorageBoxNumber'),
addOrUpdateVisible: false,
tableBtn,
trueWidth: 200,
tableProps,
list: [],
total: 0,
listLoading: true,
listQuery: {
current: 1,
size: 10,
name: '',
code: ''
}
}
},
created() {
this.getList()
},
methods: {
handleClick(raw) {
this.addNew(raw.data.id)
},
getList(key) {
this.listLoading = true
this.listQuery.code = key
StorageBoxInfoList(this.listQuery).then(response => {
if (response.data.records) {
this.list = response.data.records
} else {
this.list.splice(0, this.list.length)
}
this.total = response.data.total
this.listLoading = false
})
},
// 新增 / 修改
addNew(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,179 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: zwq
* @LastEditTime: 2022-01-14 16:34:33
* @Description:
-->
<template>
<div class="app-container">
<head-form
:placeholder-name="placeholderName"
:key-name="keyName"
@getDataList="getList"
@add="addNew"
/>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<Factory-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
</div>
</template>
<script>
import { StorageBoxInfoList } from '@/api/basicData/Warehouse/StorageBoxInfo'
import FactoryAdd from './components/StorageBoxInfoDetail.vue'
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { timeFormatter } from '@/filters'
import i18n from '@/lang'
/**
* 表格表头配置项 TypeScript接口注释
* tableConfig<ConfigItem> = []
*
* Interface ConfigItem = {
* prop: string,
* label: string,
* width: string,
* align: string,
* subcomponent: function,
* filter: function
* }
*
*
*/
const tableBtn = [
{
type: 'see',
btnName: 'btn.see'
}
]
const tableProps = [
{
prop: 'createTime',
label: i18n.t('module.basicData.factory.createTime'),
filter: timeFormatter,
align: 'center'
},
{
prop: 'code',
label: i18n.t('module.basicData.Warehouse.StorageBoxNumber'),
filter: timeFormatter,
align: 'center'
},
{
prop: 'status',
label: i18n.t('module.basicData.Warehouse.BoxStatus'),
align: 'center'
},
{
prop: 'locationName',
label: i18n.t('module.basicData.Warehouse.LocationName'),
align: 'center'
},
{
prop: 'locationCode',
label: i18n.t('module.basicData.Warehouse.LocationCode'),
align: 'center'
},
{
prop: 'isEmpty',
label: i18n.t('module.basicData.Warehouse.IsEmptyBox'),
align: 'center'
}
]
export default {
name: 'StorageBoxInfo',
components: { Pagination, BaseTable, MethodBtn, HeadForm, FactoryAdd },
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'info',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
keyName: i18n.t('module.basicData.Warehouse.StorageBoxNumber'),
placeholderName: this.$t('module.basicData.Warehouse.StorageBoxNumber'),
addOrUpdateVisible: false,
tableBtn,
trueWidth: 200,
tableProps,
list: [],
total: 0,
listLoading: true,
listQuery: {
current: 1,
size: 10,
name: '',
code: ''
}
}
},
created() {
this.getList()
},
methods: {
handleClick(raw) {
this.addNew(raw.data.id)
},
getList(key) {
this.listLoading = true
this.listQuery.code = key
StorageBoxInfoList(this.listQuery).then(response => {
if (response.data.records) {
this.list = response.data.records
} else {
this.list.splice(0, this.list.length)
}
this.total = response.data.total
this.listLoading = false
})
},
// 新增 / 修改
addNew(id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
}
}
}
</script>
<style scoped>
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 10px;
}
</style>

View File

@@ -0,0 +1,178 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-01-14 15:55:39
* @Description:
-->
<template>
<el-dialog
:title="'btn.see' | i18nFilter"
:visible.sync="visible"
>
<el-row :gutter="10">
<el-form
ref="dataForm"
:model="dataForm"
size="medium"
label-width="110px"
label-position="left"
>
<el-col :span="8">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.Code')" prop="taskCode">
<el-input v-model="dataForm.taskCode" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.OrderName')" prop="orderName">
<el-input v-model="dataForm.orderName" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskBoxNumber')" prop="fullCode">
<el-input v-model="dataForm.fullCode" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.VehicleName')" prop="name">
<el-input v-model="dataForm.name" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.EmptyFork')" prop="field124">
<el-input v-model="dataForm.field124" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.EmptyHandlingTime')" prop="field119">
<el-input v-model="dataForm.field119" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.ExecutionTime')" prop="createTime">
<el-input v-model="dataForm.createTime" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskType')" prop="taskType">
<el-input v-model="dataForm.taskType" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.FullBoxNumber')" prop="emptyCode">
<el-input v-model="dataForm.emptyCode" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskLocation')" prop="anotherCurrLocation">
<el-input
v-model="dataForm.anotherCurrLocation"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskBoxFork')" prop="field121">
<el-input v-model="dataForm.field121" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskSource')" prop="taskSource">
<el-input v-model="dataForm.taskSource" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.PreviousOperation')" prop="anotherCurrProcessCode">
<el-input
v-model="dataForm.anotherCurrProcessCode"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.NextOperation')" prop="anotherNextProcessCode">
<el-input
v-model="dataForm.anotherNextProcessCode"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TargetLocation')" prop="anotherTargetLocation">
<el-input
v-model="dataForm.anotherTargetLocation"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.BoxStatus')" prop="field126">
<el-input v-model="dataForm.field126" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { CurrentTaskDetail } from '@/api/basicData/Warehouse/HistoricalTask'
export default {
data() {
return {
visible: false,
dataForm: {
id: '',
taskCode: undefined,
orderName: undefined,
fullCode: undefined,
name: undefined,
field124: undefined,
field119: undefined,
createTime: undefined,
taskType: undefined,
emptyCode: undefined,
anotherCurrLocation: undefined,
field121: undefined,
taskSource: undefined,
anotherCurrProcessCode: undefined,
anotherNextProcessCode: undefined,
anotherTargetLocation: undefined,
field126: undefined
}
}
},
methods: {
init(id) {
this.dataForm.id = id
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
CurrentTaskDetail(this.dataForm.id).then(res => {
this.dataForm = res.data
})
})
}
}
}
</script>

View File

@@ -0,0 +1,194 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-01-13 16:22:39
* @Description:
-->
<template>
<el-dialog
:title="'btn.see' | i18nFilter"
:visible.sync="visible"
>
<el-row :gutter="10">
<el-form
ref="dataForm"
:model="dataForm"
size="medium"
label-width="110px"
label-position="left"
>
<el-col :span="8">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.Code')" prop="taskCode">
<el-input v-model="dataForm.taskCode" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.OrderName')" prop="orderName">
<el-input v-model="dataForm.orderName" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskBoxNumber')" prop="fullCode">
<el-input v-model="dataForm.fullCode" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.VehicleName')" prop="name">
<el-input v-model="dataForm.name" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.EmptyFork')" prop="field124">
<el-input v-model="dataForm.field124" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.EmptyHandlingTime')" prop="field119">
<el-input v-model="dataForm.field119" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.ExecutionTime')" prop="createTime">
<el-input v-model="dataForm.createTime" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskType')" prop="taskType">
<el-input v-model="dataForm.taskType" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.FullBoxNumber')" prop="emptyCode">
<el-input v-model="dataForm.emptyCode" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskLocation')" prop="anotherCurrLocation">
<el-input
v-model="dataForm.anotherCurrLocation"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskBoxFork')" prop="field121">
<el-input v-model="dataForm.field121" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskBoxHandlingTime')" prop="field122">
<el-input
v-model="dataForm.field122"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TaskSource')" prop="taskSource">
<el-input v-model="dataForm.taskSource" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.PreviousOperation')" prop="anotherCurrProcessCode">
<el-input
v-model="dataForm.anotherCurrProcessCode"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.NextOperation')" prop="anotherNextProcessCode">
<el-input
v-model="dataForm.anotherNextProcessCode"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.TargetLocation')" prop="anotherTargetLocation">
<el-input
v-model="dataForm.anotherTargetLocation"
readonly
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.CompletionTime')" prop="field125">
<el-input v-model="dataForm.field125" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('module.basicData.Warehouse.BoxStatus')" prop="field126">
<el-input v-model="dataForm.field126" readonly :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { HistoricalTaskDetail } from '@/api/basicData/Warehouse/HistoricalTask'
export default {
data() {
return {
visible: false,
dataForm: {
id: '',
taskCode: undefined,
orderName: undefined,
fullCode: undefined,
name: undefined,
field124: undefined,
field119: undefined,
createTime: undefined,
taskType: undefined,
emptyCode: undefined,
anotherCurrLocation: undefined,
field121: undefined,
field122: undefined,
taskSource: undefined,
anotherCurrProcessCode: undefined,
anotherNextProcessCode: undefined,
anotherTargetLocation: undefined,
field125: undefined,
field126: undefined
}
}
},
methods: {
init(id) {
this.dataForm.id = id
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
HistoricalTaskDetail(this.dataForm.id).then(res => {
this.dataForm = res.data
})
})
}
}
}
</script>

View File

@@ -0,0 +1,125 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2021-04-12 16:24:32
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
:visible.sync="visible"
>
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="120px" @keyup.enter.native="dataFormSubmit()">
<el-form-item :label="$t('module.basicData.factory.FactoryName')" prop="name">
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.factory.FactoryName')])" clearable />
</el-form-item>
<el-form-item :label="$t('module.basicData.factory.FactoryCode')" prop="code">
<el-input v-model="dataForm.code" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.factory.FactoryCode')])" clearable />
</el-form-item>
<el-form-item :label="$t('module.basicData.factory.Address')" prop="address">
<el-input v-model="dataForm.address" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.factory.Address')])" clearable />
</el-form-item>
<el-form-item :label="$t('module.basicData.visual.Remarks')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.visual.Remarks')])" clearable />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { factoryDetail, factoryUpdate, factoryAdd, factoryCode } from '@/api/basicData/FactoryManagement/factory'
export default {
data() {
return {
visible: false,
dataForm: {
id: 0,
name: '',
code: '',
address: '',
description: ''
},
dataRule: {
name: [
{
required: true,
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.factory.FactoryName')]),
trigger: 'blur' }
],
code: [
{
required: true,
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.factory.FactoryCode')]),
trigger: 'blur' }
]
}
}
},
methods: {
init(id) {
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
factoryDetail(this.dataForm.id).then(res => {
this.dataForm.name = res.data.name
this.dataForm.code = res.data.code
this.dataForm.address = res.data.address
this.dataForm.description = res.data.description
})
} else {
factoryCode().then(res => {
this.dataForm.code = res.data
})
}
})
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
const data = {
'name': this.dataForm.name,
'code': this.dataForm.code,
'address': this.dataForm.address,
'description': this.dataForm.description,
'id': this.dataForm.id
}
if (this.dataForm.id) {
factoryUpdate(data).then(res => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
} else {
factoryAdd(data).then(res => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
}
}
})
}
}
}
</script>

View File

@@ -0,0 +1,125 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2021-04-12 16:24:32
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
:visible.sync="visible"
>
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="120px" @keyup.enter.native="dataFormSubmit()">
<el-form-item :label="$t('module.basicData.factory.FactoryName')" prop="name">
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.factory.FactoryName')])" clearable />
</el-form-item>
<el-form-item :label="$t('module.basicData.factory.FactoryCode')" prop="code">
<el-input v-model="dataForm.code" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.factory.FactoryCode')])" clearable />
</el-form-item>
<el-form-item :label="$t('module.basicData.factory.Address')" prop="address">
<el-input v-model="dataForm.address" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.factory.Address')])" clearable />
</el-form-item>
<el-form-item :label="$t('module.basicData.visual.Remarks')" prop="description">
<el-input v-model="dataForm.description" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.visual.Remarks')])" clearable />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { factoryDetail, factoryUpdate, factoryAdd, factoryCode } from '@/api/basicData/FactoryManagement/factory'
export default {
data() {
return {
visible: false,
dataForm: {
id: 0,
name: '',
code: '',
address: '',
description: ''
},
dataRule: {
name: [
{
required: true,
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.factory.FactoryName')]),
trigger: 'blur' }
],
code: [
{
required: true,
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.factory.FactoryCode')]),
trigger: 'blur' }
]
}
}
},
methods: {
init(id) {
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
factoryDetail(this.dataForm.id).then(res => {
this.dataForm.name = res.data.name
this.dataForm.code = res.data.code
this.dataForm.address = res.data.address
this.dataForm.description = res.data.description
})
} else {
factoryCode().then(res => {
this.dataForm.code = res.data
})
}
})
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
const data = {
'name': this.dataForm.name,
'code': this.dataForm.code,
'address': this.dataForm.address,
'description': this.dataForm.description,
'id': this.dataForm.id
}
if (this.dataForm.id) {
factoryUpdate(data).then(res => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
} else {
factoryAdd(data).then(res => {
this.$message({
message: this.$t('module.basicData.visual.success'),
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
}
}
})
}
}
}
</script>