Merge pull request '更新' (#7) from zwq into develop
Reviewed-on: #7
Este cometimento está contido em:
cometimento
8f01c92374
@ -2,20 +2,47 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:25:25
|
||||
* @LastEditTime: 2022-01-17 13:59:54
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function StorageBoxInfoList(data) { // 获取存储箱使用情况
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/page',
|
||||
url: '/api/wms/storage/box/circ/info/his/page/by/code',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxInfoDetail(id) { // 获取工厂单条数据
|
||||
export function StorageBoxInfoDetail(id) { // 获取存储箱单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/storage/box/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackList(data) { // 获取存储箱上架列表
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/page/for/bind',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function locationList(data) { // 获取库位列表
|
||||
return request({
|
||||
url: '/api/wms/location/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackDetail(id) { // 获取存储箱上架单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
@ -26,7 +53,7 @@ export function StorageBoxInfoDetail(id) { // 获取工厂单条数据
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryUpdate(data) { // 更新工厂单条数据
|
||||
export function StorageBoxRackUpdate(data) { // 更新存储箱上架单条数据
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/update',
|
||||
method: 'post',
|
||||
@ -34,7 +61,7 @@ export function factoryUpdate(data) { // 更新工厂单条数据
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryAdd(data) { // 新增工厂单条数据
|
||||
export function StorageBoxRackAdd(data) { // 新增存储箱上架单条数据
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/add',
|
||||
method: 'post',
|
||||
@ -42,14 +69,15 @@ export function factoryAdd(data) { // 新增工厂单条数据
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryCode() { // 获取工厂code
|
||||
export function StorageBoxRackCode(data) { // 获取存储箱上架code
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/get-code',
|
||||
method: 'post'
|
||||
url: '/api/wms/storagebox/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryDelete(id) { // 删除工厂单条数据
|
||||
export function StorageBoxRackDelete(id) { // 删除存储箱上架单条数据
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/delete',
|
||||
method: 'post',
|
||||
|
47
src/api/orderManage/00A.js
Ficheiro normal
47
src/api/orderManage/00A.js
Ficheiro normal
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-01-17 14:55:09
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-17 14:59:07
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function ProcessInfoList(data) { // 获取工单工艺列表
|
||||
return request({
|
||||
url: '/api/wms/work/order/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ProcessInfoDetail(id) { // 获取工单工艺单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/work/order/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ExecutionInfoList(data) { // 获取工单执行列表
|
||||
return request({
|
||||
url: '/api/wms/work/order/execute/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ExecutionInfoDetail(id) { // 获取工单执行单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/work/order/execute/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
33
src/filters/basicData/warehouse.js
Ficheiro normal
33
src/filters/basicData/warehouse.js
Ficheiro normal
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-01-17 11:30:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-17 11:33:29
|
||||
* @Description:
|
||||
*/
|
||||
/*
|
||||
* @Date: 2020-12-29 16:49:28
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-04-13 13:49:51
|
||||
* @FilePath: \basic-admin\src\filters\DataDict\index.js
|
||||
* @Description: 部分常量的数据字典定义
|
||||
*/
|
||||
|
||||
import i18n from '@/lang'
|
||||
|
||||
const table = {
|
||||
yesOrNo: {
|
||||
'0': i18n.t('baseDict.yesOrNo.no'),
|
||||
'1': i18n.t('baseDict.yesOrNo.yes')
|
||||
},
|
||||
enableState: {
|
||||
'0': i18n.t('basicDataFilter.enableState.disable'),
|
||||
'1': i18n.t('basicDataFilter.enableState.enable')
|
||||
}
|
||||
}
|
||||
|
||||
export default function(dictTable) {
|
||||
return function(val) {
|
||||
return table?.[dictTable]?.[val]
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
* @Author: gtz
|
||||
* @Date: 2021-03-04 16:13:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:34:25
|
||||
* @LastEditTime: 2022-01-17 15:12:18
|
||||
* @Description: file content
|
||||
*/
|
||||
export default {
|
||||
@ -293,6 +293,16 @@ export default {
|
||||
TaskLocation: 'Task Location',
|
||||
TargetLocation: 'Target Location',
|
||||
OrderName: 'Order Name',
|
||||
OrderCode: 'Order Code',
|
||||
IssueOrderTime: 'Issue Order Time',
|
||||
TotalProcessName: 'Total Process Name',
|
||||
Priority: 'Priority',
|
||||
OrderStatus: 'Order Status',
|
||||
ProcessOrNot: 'Process Or Not',
|
||||
Unit: 'Unit',
|
||||
RelateProcess: 'Relate Process',
|
||||
PlanProcessQuantity: 'Plan Process Quantity',
|
||||
SubProcessName: 'Sub Process Name',
|
||||
TaskBoxNumber: 'Task Box Number',
|
||||
FullBoxNumber: 'Full Box Number',
|
||||
EmptyFork: 'Empty Fork',
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: gtz
|
||||
* @Date: 2021-03-04 16:13:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:34:19
|
||||
* @LastEditTime: 2022-01-17 15:12:12
|
||||
* @Description: file content
|
||||
*/
|
||||
export default {
|
||||
@ -293,6 +293,16 @@ export default {
|
||||
TaskLocation: '任务库位',
|
||||
TargetLocation: '目标库位',
|
||||
OrderName: '工单名',
|
||||
OrderCode: '工单编码',
|
||||
IssueOrderTime: '下发工单时间',
|
||||
TotalProcessName: '总工艺名称',
|
||||
Priority: '优先级',
|
||||
OrderStatus: '工单状态',
|
||||
ProcessOrNot: '是否关联工艺',
|
||||
Unit: '单位',
|
||||
RelateProcess: '关联工艺',
|
||||
PlanProcessQuantity: '计划加工数量',
|
||||
SubProcessName: '分工艺',
|
||||
TaskBoxNumber: '任务箱号',
|
||||
FullBoxNumber: '空箱号',
|
||||
EmptyFork: '空箱货叉',
|
||||
|
@ -2,51 +2,53 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:29:02
|
||||
* @LastEditTime: 2022-01-17 14:03:24
|
||||
* @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"
|
||||
<el-form ref="listQuery" :model="listQuery" :inline="true" label-width="120px" @keyup.enter.native="getList()">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.StorageBoxNumber')" prop="code">
|
||||
<el-select
|
||||
v-model="listQuery.code"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.StorageBoxNumber')])"
|
||||
clearable
|
||||
filterable
|
||||
:style="{width: '100%'}"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storageBoxList"
|
||||
:key="index"
|
||||
:label="item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList()">{{ 'btn.search' | i18nFilter }}</el-button>
|
||||
</el-form-item>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</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>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</el-form></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { StorageBoxInfoList } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
||||
import FactoryAdd from './components/StorageBoxInfoDetail.vue'
|
||||
import HeadForm from '@/components/basicData/HeadForm'
|
||||
import { StorageBoxInfoList, StorageBoxRackCode } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
||||
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 warehouse from '@/filters/basicData/warehouse'
|
||||
import i18n from '@/lang'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
@ -64,39 +66,34 @@ import i18n from '@/lang'
|
||||
*
|
||||
*/
|
||||
|
||||
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'),
|
||||
filter: warehouse('enableState'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'locationName',
|
||||
prop: 'currLocation',
|
||||
label: i18n.t('module.basicData.Warehouse.CurrentLocation'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'isEmpty',
|
||||
label: i18n.t('module.basicData.Warehouse.IsEmpty'),
|
||||
filter: warehouse('yesOrNo'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'StorageBoxInfo',
|
||||
components: { Pagination, BaseTable, MethodBtn, HeadForm, FactoryAdd },
|
||||
components: { Pagination, BaseTable },
|
||||
filters: {
|
||||
statusFilter(status) {
|
||||
const statusMap = {
|
||||
@ -111,31 +108,32 @@ export default {
|
||||
return {
|
||||
keyName: i18n.t('module.basicData.Warehouse.StorageBoxNumber'),
|
||||
placeholderName: this.$t('module.basicData.Warehouse.StorageBoxNumber'),
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
storageBoxList: [],
|
||||
total: 0,
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
code: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
const listQuery1 = {
|
||||
current: 1,
|
||||
size: 100
|
||||
}
|
||||
StorageBoxRackCode(listQuery1).then(res => {
|
||||
this.storageBoxList = res.data.records
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
this.addNew(raw.data.id)
|
||||
},
|
||||
getList(key) {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.listQuery.code = key
|
||||
StorageBoxInfoList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
@ -145,13 +143,6 @@ export default {
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,17 +2,49 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:34:33
|
||||
* @LastEditTime: 2022-01-17 14:06:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<head-form
|
||||
:placeholder-name="placeholderName"
|
||||
:key-name="keyName"
|
||||
@getDataList="getList"
|
||||
@add="addNew"
|
||||
/>
|
||||
<el-form ref="listQuery" :model="listQuery" :inline="true" label-width="120px" @keyup.enter.native="getList()">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.LocationName')" prop="currLocationId">
|
||||
<el-select
|
||||
v-model="listQuery.currLocationId"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.LocationName')])"
|
||||
clearable
|
||||
filterable
|
||||
:style="{width: '100%'}"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in LocationList"
|
||||
:key="index"
|
||||
:label="item.locationName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.StorageBoxNumber')" prop="storageBoxId">
|
||||
<el-select
|
||||
v-model="listQuery.storageBoxId"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.StorageBoxNumber')])"
|
||||
clearable
|
||||
filterable
|
||||
:style="{width: '100%'}"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storageBoxList"
|
||||
:key="index"
|
||||
:label="item.code"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList()">{{ 'btn.search' | i18nFilter }}</el-button>
|
||||
<el-button type="primary" @click="addNew()">{{ 'btn.add' | i18nFilter }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
@ -39,13 +71,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { StorageBoxInfoList } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
||||
import FactoryAdd from './components/StorageBoxInfoDetail.vue'
|
||||
import HeadForm from '@/components/basicData/HeadForm'
|
||||
import { StorageBoxRackList, StorageBoxRackDelete, StorageBoxRackCode, locationList } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
||||
import FactoryAdd from './components/StorageBoxRack-add.vue'
|
||||
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 warehouse from '@/filters/basicData/warehouse'
|
||||
import i18n from '@/lang'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
@ -65,8 +97,12 @@ import i18n from '@/lang'
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'see',
|
||||
btnName: 'btn.see'
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
@ -79,34 +115,35 @@ const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.basicData.Warehouse.StorageBoxNumber'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.basicData.Warehouse.BoxStatus'),
|
||||
filter: warehouse('enableState'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'locationName',
|
||||
prop: 'currLocation',
|
||||
label: i18n.t('module.basicData.Warehouse.LocationName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'locationCode',
|
||||
prop: 'currLocationName',
|
||||
label: i18n.t('module.basicData.Warehouse.LocationCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'isEmpty',
|
||||
label: i18n.t('module.basicData.Warehouse.IsEmptyBox'),
|
||||
filter: warehouse('yesOrNo'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'StorageBoxInfo',
|
||||
components: { Pagination, BaseTable, MethodBtn, HeadForm, FactoryAdd },
|
||||
components: { Pagination, BaseTable, MethodBtn, FactoryAdd },
|
||||
filters: {
|
||||
statusFilter(status) {
|
||||
const statusMap = {
|
||||
@ -127,26 +164,57 @@ export default {
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
LocationList: [],
|
||||
storageBoxList: [],
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
code: ''
|
||||
storageBoxId: '',
|
||||
currLocationId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
const listQuery1 = {
|
||||
current: 1,
|
||||
size: 100
|
||||
}
|
||||
locationList(listQuery1).then(response => {
|
||||
this.LocationList = response.data
|
||||
})
|
||||
StorageBoxRackCode(listQuery1).then(res => {
|
||||
this.storageBoxList = res.data.records
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
this.addNew(raw.data.id)
|
||||
console.log(raw)
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.code}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
StorageBoxRackDelete(raw.data.id).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.addNew(raw.data.id)
|
||||
}
|
||||
},
|
||||
getList(key) {
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.listQuery.code = key
|
||||
StorageBoxInfoList(this.listQuery).then(response => {
|
||||
StorageBoxRackList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-04-12 16:24:32
|
||||
* @LastEditTime: 2022-01-17 10:19:45
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -10,7 +10,7 @@
|
||||
: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 ref="dataForm" :model="dataForm" label-width="120px">
|
||||
<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>
|
||||
@ -26,13 +26,12 @@
|
||||
</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'
|
||||
import { StorageBoxInfoDetail } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -44,20 +43,6 @@ export default {
|
||||
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' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -67,57 +52,12 @@ export default {
|
||||
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')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
StorageBoxInfoDetail(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
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-04-12 16:24:32
|
||||
* @LastEditTime: 2022-01-17 11:21:26
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -11,17 +11,57 @@
|
||||
: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 :label="$t('module.basicData.Warehouse.LocationName')" prop="currLocationId">
|
||||
<el-select
|
||||
v-model="dataForm.currLocationId"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.LocationName')])"
|
||||
clearable
|
||||
filterable
|
||||
:style="{width: '100%'}"
|
||||
@change="selectGetLabel1"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in LocationList"
|
||||
:key="index"
|
||||
:label="item.locationName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</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 :label="$t('module.basicData.Warehouse.StorageBoxNumber')" prop="storageBoxId">
|
||||
<el-select
|
||||
v-model="dataForm.storageBoxId"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.basicData.Warehouse.StorageBoxNumber')])"
|
||||
clearable
|
||||
filterable
|
||||
:style="{width: '100%'}"
|
||||
@change="selectGetLabel2"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storageBoxList"
|
||||
:key="index"
|
||||
:label="item.code"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</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 :label="$t('module.basicData.Warehouse.BoxStatus')" prop="status">
|
||||
<el-switch
|
||||
v-model="dataForm.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#AAAAAA"
|
||||
/>
|
||||
</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 :label="$t('module.basicData.Warehouse.IsEmptyBox')" prop="isEmpty">
|
||||
<el-switch
|
||||
v-model="dataForm.isEmpty"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#AAAAAA"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -32,7 +72,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { factoryDetail, factoryUpdate, factoryAdd, factoryCode } from '@/api/basicData/FactoryManagement/factory'
|
||||
import { StorageBoxRackDetail, StorageBoxRackUpdate, StorageBoxRackAdd, StorageBoxRackCode, locationList } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -40,22 +80,26 @@ export default {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: '',
|
||||
code: '',
|
||||
address: '',
|
||||
description: ''
|
||||
locationName: '',
|
||||
currLocationId: '',
|
||||
storageBoxId: '',
|
||||
status: '',
|
||||
isEmpty: ''
|
||||
},
|
||||
LocationList: [],
|
||||
storageBoxList: [],
|
||||
dataRule: {
|
||||
name: [
|
||||
currLocationId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.factory.FactoryName')]),
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.Warehouse.LocationName')]),
|
||||
trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
storageBoxId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.factory.FactoryCode')]),
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.Warehouse.StorageBoxNumber')]),
|
||||
trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
@ -65,35 +109,46 @@ export default {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
const listQuery = {
|
||||
current: 1,
|
||||
size: 100
|
||||
}
|
||||
locationList(listQuery).then(response => {
|
||||
this.LocationList = response.data
|
||||
})
|
||||
StorageBoxRackCode(listQuery).then(res => {
|
||||
this.storageBoxList = res.data.records
|
||||
})
|
||||
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
|
||||
StorageBoxRackDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selectGetLabel1(vId) {
|
||||
let obj = {}
|
||||
obj = this.LocationList.find((item) => {
|
||||
return item.id === vId
|
||||
})
|
||||
this.dataForm.locationName = obj.locationName
|
||||
},
|
||||
selectGetLabel2(vId) {
|
||||
let obj = {}
|
||||
obj = this.storageBoxList.find((item) => {
|
||||
return item.id === vId
|
||||
})
|
||||
this.dataForm.code = obj.code
|
||||
},
|
||||
// 表单提交
|
||||
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
|
||||
}
|
||||
const data = this.dataForm
|
||||
if (this.dataForm.id) {
|
||||
factoryUpdate(data).then(res => {
|
||||
StorageBoxRackUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
@ -105,7 +160,7 @@ export default {
|
||||
})
|
||||
})
|
||||
} else {
|
||||
factoryAdd(data).then(res => {
|
||||
StorageBoxRackAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
|
@ -1,7 +1,174 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2022-01-14 16:40:26
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:40:27
|
||||
* @LastEditTime: 2022-01-17 15:00:35
|
||||
* @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 { ExecutionInfoList } from '@/api/orderManage/00A'
|
||||
import FactoryAdd from './components/ExecutionInfoDetail.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: 'name',
|
||||
label: i18n.t('module.basicData.Warehouse.OrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.basicData.Warehouse.IssueOrderTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'craftName',
|
||||
label: i18n.t('module.basicData.Warehouse.TotalProcessName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
label: i18n.t('module.basicData.Warehouse.Priority'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.basicData.Warehouse.OrderStatus'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ExecutionInfo',
|
||||
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.OrderName'),
|
||||
placeholderName: this.$t('module.basicData.Warehouse.OrderName'),
|
||||
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
|
||||
ExecutionInfoList(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>
|
||||
|
@ -1,7 +1,181 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2022-01-14 16:37:39
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 16:37:39
|
||||
* @LastEditTime: 2022-01-17 15:12:20
|
||||
* @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 { ProcessInfoList } from '@/api/orderManage/00A'
|
||||
import FactoryAdd from './components/ProcessInfoDetail.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 processLinkBtn from './components/processLinkBtn'
|
||||
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: 'name',
|
||||
label: i18n.t('module.basicData.Warehouse.OrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.basicData.Warehouse.IssueOrderTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'craftName',
|
||||
label: i18n.t('module.basicData.Warehouse.TotalProcessName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
label: i18n.t('module.basicData.Warehouse.Priority'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.basicData.Warehouse.OrderStatus'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'attribute',
|
||||
label: i18n.t('module.basicData.Warehouse.RelateProcess'),
|
||||
subcomponent: processLinkBtn,
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ProcessInfo',
|
||||
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.OrderName'),
|
||||
placeholderName: this.$t('module.basicData.Warehouse.OrderName'),
|
||||
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
|
||||
ProcessInfoList(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>
|
||||
|
116
src/views/orderManage/components/ExecutionInfoDetail.vue
Ficheiro normal
116
src/views/orderManage/components/ExecutionInfoDetail.vue
Ficheiro normal
@ -0,0 +1,116 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-17 15:04:42
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'btn.see' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
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.OrderName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm([$t('module.basicData.Warehouse.OrderName')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.IssueOrderTime')" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" :placeholder="$i18nForm([$t('module.basicData.Warehouse.IssueOrderTime')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.PlanProcessQuantity')" prop="planQuantity">
|
||||
<el-input v-model="dataForm.planQuantity" :placeholder="$i18nForm([$t('module.basicData.Warehouse.PlanProcessQuantity')])" 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.OrderCode')" prop="taskCode">
|
||||
<el-input v-model="dataForm.taskCode" :placeholder="$i18nForm([$t('module.basicData.Warehouse.OrderCode')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.OrderStatus')" prop="taskType">
|
||||
<el-input v-model="dataForm.taskType" :placeholder="$i18nForm([$t('module.basicData.Warehouse.OrderStatus')])" 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.TotalProcessName')" prop="craftName">
|
||||
<el-input v-model="dataForm.craftName" :placeholder="$i18nForm([$t('module.basicData.Warehouse.TotalProcessName')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.SubProcessName')" prop="subProccessName">
|
||||
<el-input
|
||||
v-model="dataForm.subProccessName"
|
||||
:placeholder="$i18nForm([$t('module.basicData.Warehouse.SubProcessName')])"
|
||||
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 { ExecutionInfoDetail } from '@/api/orderManage/00A'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: undefined,
|
||||
createTime: undefined,
|
||||
taskCode: undefined,
|
||||
taskType: undefined,
|
||||
craftName: undefined,
|
||||
planQuantity: undefined,
|
||||
subProccessName: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
ExecutionInfoDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
116
src/views/orderManage/components/ProcessInfoDetail.vue
Ficheiro normal
116
src/views/orderManage/components/ProcessInfoDetail.vue
Ficheiro normal
@ -0,0 +1,116 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-17 15:04:50
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'btn.see' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
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.OrderName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm([$t('module.basicData.Warehouse.OrderName')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.IssueOrderTime')" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" :placeholder="$i18nForm([$t('module.basicData.Warehouse.IssueOrderTime')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.PlanProcessQuantity')" prop="planQuantity">
|
||||
<el-input v-model="dataForm.planQuantity" :placeholder="$i18nForm([$t('module.basicData.Warehouse.PlanProcessQuantity')])" 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.OrderCode')" prop="taskCode">
|
||||
<el-input v-model="dataForm.taskCode" :placeholder="$i18nForm([$t('module.basicData.Warehouse.OrderCode')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.OrderStatus')" prop="taskType">
|
||||
<el-input v-model="dataForm.taskType" :placeholder="$i18nForm([$t('module.basicData.Warehouse.OrderStatus')])" 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.TotalProcessName')" prop="craftName">
|
||||
<el-input v-model="dataForm.craftName" :placeholder="$i18nForm([$t('module.basicData.Warehouse.TotalProcessName')])" readonly :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('module.basicData.Warehouse.SubProcessName')" prop="subProccessName">
|
||||
<el-input
|
||||
v-model="dataForm.subProccessName"
|
||||
:placeholder="$i18nForm([$t('module.basicData.Warehouse.SubProcessName')])"
|
||||
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 { ProcessInfoDetail } from '@/api/orderManage/00A'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: undefined,
|
||||
createTime: undefined,
|
||||
taskCode: undefined,
|
||||
taskType: undefined,
|
||||
craftName: undefined,
|
||||
planQuantity: undefined,
|
||||
subProccessName: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
ProcessInfoDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
64
src/views/orderManage/components/processLinkBtn.vue
Ficheiro normal
64
src/views/orderManage/components/processLinkBtn.vue
Ficheiro normal
@ -0,0 +1,64 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-17 15:16:29
|
||||
* @FilePath: \basic-admin\src\components\BaseTable\subcomponents\CheckDetail.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-popover
|
||||
v-model="visible"
|
||||
placement="top"
|
||||
width="160"
|
||||
>
|
||||
<div>
|
||||
<el-select v-model="value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="emitClick">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="text">{{ $t('module.basicData.Warehouse.RelateProcess') }}</el-button>
|
||||
</el-popover>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}
|
||||
],
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
console.log(this.injectData)
|
||||
console.log(this.value)
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Carregando…
Criar uma nova questão referindo esta
Bloquear um utilizador