init
This commit is contained in:
41
src/views/orderManage/components/detailBtn.vue
Normal file
41
src/views/orderManage/components/detailBtn.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-20 15:17:31
|
||||
* @FilePath:
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<span>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ 'routerTitle.order.workOrderManage.tagDetail' | i18nFilter }}</el-button>
|
||||
</span>
|
||||
<tag-detail v-if="tagDetailVisible" ref="tagDetail" :packaging-box-id="injectData.id" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tagDetail from './tagDetail'
|
||||
export default {
|
||||
components: { tagDetail },
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tagDetailVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
this.tagDetailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tagDetail.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
108
src/views/orderManage/components/echarts-Bar.vue
Normal file
108
src/views/orderManage/components/echarts-Bar.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-03-03 16:39:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-23 10:30:57
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div :id="id" :style="barStyle" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return 'barChart'
|
||||
}
|
||||
},
|
||||
barStyle: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
series: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
color: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return ['#5470C6']
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
|
||||
this.chart.setOption({
|
||||
color: this.color,
|
||||
title: this.title,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: this.legend,
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: this.xAxis,
|
||||
yAxis: this.yAxis,
|
||||
series: this.series
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
135
src/views/orderManage/components/powerClassification-add.vue
Normal file
135
src/views/orderManage/components/powerClassification-add.vue
Normal file
@@ -0,0 +1,135 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:42:17
|
||||
* @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="110px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.orderManage.powerClassification.typeName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.powerClassification.typeName')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.powerClassification.typeCode')" prop="code">
|
||||
<el-input v-model="dataForm.code" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.powerClassification.typeCode')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.powerClassification.parentClass')" prop="parentId">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
v-model="dataForm.parentId"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.powerClassification.parentClass')])"
|
||||
:props="{ checkStrictly: true,value: 'id',label: 'name' }"
|
||||
:options="parentArr"
|
||||
filterable
|
||||
clearable
|
||||
@change="setParent"
|
||||
/>
|
||||
</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>
|
||||
</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 { powerClassificationTree, powerClassificationDetail, powerClassificationUpdate, powerClassificationAdd, powerClassificationCode } from '@/api/orderManage/powerClassification'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: '',
|
||||
code: '',
|
||||
parentId: '',
|
||||
parentName: '',
|
||||
remark: ''
|
||||
},
|
||||
parentArr: [],
|
||||
dataRule: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.powerClassification.typeName')]),
|
||||
trigger: 'blur' }
|
||||
],
|
||||
parentId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.powerClassification.parentClass')]),
|
||||
trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
this.parentArr.splice(0, this.parentArr.length)
|
||||
powerClassificationTree().then(res => {
|
||||
this.parentArr = res.data
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
powerClassificationDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
} else {
|
||||
powerClassificationCode().then(res => {
|
||||
this.dataForm.code = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = this.dataForm
|
||||
data.parentId = data.parentId[data.parentId.length - 1]
|
||||
if (this.dataForm.id) {
|
||||
powerClassificationUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
powerClassificationAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
setParent(val) {
|
||||
this.dataForm.parentName = this.$refs['cascader'].getCheckedNodes()[0].pathLabels[this.$refs['cascader'].getCheckedNodes()[0].pathLabels.length - 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
131
src/views/orderManage/components/substrateBatchAttr-add.vue
Normal file
131
src/views/orderManage/components/substrateBatchAttr-add.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-30 18:39:46
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:append-to-body="true"
|
||||
:show-close="false"
|
||||
:visible.sync="visible"
|
||||
size="40%"
|
||||
>
|
||||
<div slot="title" style=" background-color:#02BCFF;font-size:1.5em;color:white;padding:5px 20px">
|
||||
{{ !dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter }}
|
||||
</div>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.basicData.visual.AttributeName')" prop="attrName">
|
||||
<el-input v-model="dataForm.attrName" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.visual.AttributeName')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.visual.AttributeValue')" prop="attrValue">
|
||||
<el-input v-model="dataForm.attrValue" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.visual.AttributeValue')])" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="drawer-footer">
|
||||
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
|
||||
<el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { substrateBatchAttrDetail, substrateBatchAttrUpdate, substrateBatchAttrAdd } from '@/api/orderManage/substrateBatchAttr'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
subId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
btnLoading: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
attrName: '',
|
||||
attrValue: ''
|
||||
},
|
||||
dataRule: {
|
||||
attrName: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.visual.AttributeName')]), trigger: 'blur' }
|
||||
],
|
||||
attrValue: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.visual.AttributeValue')]), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.btnLoading = false
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
substrateBatchAttrDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm.attrName = res.data.name
|
||||
this.dataForm.attrValue = res.data.value
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.btnLoading = true
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
'name': this.dataForm.attrName,
|
||||
'value': this.dataForm.attrValue,
|
||||
'subId': this.subId,
|
||||
'id': this.dataForm.id
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
substrateBatchAttrUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
substrateBatchAttrAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer-footer {
|
||||
width: 100%;
|
||||
margin-top: 50px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 50px;
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
235
src/views/orderManage/components/substrateBatchAttr.vue
Normal file
235
src/views/orderManage/components/substrateBatchAttr.vue
Normal file
@@ -0,0 +1,235 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-31 11:24:59
|
||||
* @enName:
|
||||
-->
|
||||
<template>
|
||||
<div style="margin:20px">
|
||||
<div slot="title" style=" background-color:#02BCFF;font-size:1.5em;color:white;padding:5px 20px;margin:20px">{{ isdetail? 'btn.detail' : !dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter }}</div>
|
||||
<div style="margin:0 15px">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.orderManage.substrateBatch.batchName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :disabled="isdetail" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.substrateBatch.batchName')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.substrateBatch.batchCode')" prop="code">
|
||||
<el-input v-model="dataForm.code" :disabled="isdetail" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.substrateBatch.batchCode')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.basicData.visual.Remarks')" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :disabled="isdetail" :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.visual.Remarks')])" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="margin:20px">
|
||||
<el-button type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">{{ 'btn.edit' | i18nFilter }}</el-button>
|
||||
<span v-if="!isdetail">
|
||||
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.save' | i18nFilter }}</el-button>
|
||||
<el-button v-if="listQuery.subId" type="primary" @click="addNew()">{{ 'btn.addattr' | i18nFilter }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div style="height:380px;overflow:auto">
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
>
|
||||
<method-btn
|
||||
v-if="!isdetail"
|
||||
slot="handleBtn"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
</div>
|
||||
</div>
|
||||
<substrate-batch-attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :sub-id="listQuery.subId" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import i18n from '@/lang'
|
||||
import { substrateBatchDetail, substrateBatchUpdate, substrateBatchAdd, substrateBatchCode } from '@/api/orderManage/substrateBatch'
|
||||
import { substrateBatchAttrList, substrateBatchAttrDelete } from '@/api/orderManage/substrateBatchAttr'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import substrateBatchAttrAdd from './substrateBatchAttr-add'
|
||||
import { timeFormatter } from '@/filters'
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.basicData.factory.createTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.basicData.visual.AttributeName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'value',
|
||||
label: i18n.t('module.basicData.visual.AttributeValue'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
components: { BaseTable, MethodBtn, substrateBatchAttrAdd },
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
dataForm: {
|
||||
name: '',
|
||||
code: '',
|
||||
enName: '',
|
||||
abbr: '',
|
||||
category: '',
|
||||
description: '',
|
||||
remark: ''
|
||||
},
|
||||
dataRule: {
|
||||
name: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.material.MaterialName')]), trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.material.MaterialCoding')]), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 990,
|
||||
subId: ''
|
||||
},
|
||||
isdetail: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listQuery.subId = this.$route.query.id
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.isdetail = false
|
||||
this.isdetail = Boolean(this.$route.query.isdetail)
|
||||
this.list.splice(0, this.list.length)
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.listQuery.subId) {
|
||||
substrateBatchDetail(this.listQuery.subId).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
substrateBatchAttrList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
substrateBatchCode().then(res => {
|
||||
this.dataForm.code = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
substrateBatchAttrList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
substrateBatchAttrDelete(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)
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dataForm.id = this.listQuery.subId
|
||||
const data = this.dataForm
|
||||
if (this.listQuery.subId) {
|
||||
substrateBatchUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
})
|
||||
} else {
|
||||
substrateBatchAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
this.listQuery.subId = res.data.id
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
goEdit() {
|
||||
this.isdetail = false
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer-footer {
|
||||
width: 100%;
|
||||
margin-top: 50px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding: 10px 50px;
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
197
src/views/orderManage/components/tagDetail.vue
Normal file
197
src/views/orderManage/components/tagDetail.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-07-21 09:33:06
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:append-to-body="true"
|
||||
:show-close="false"
|
||||
:visible.sync="visible"
|
||||
size="55%"
|
||||
>
|
||||
<div
|
||||
slot="title"
|
||||
style=" background-color:#02BCFF;font-size:1.5em;color:white;padding:5px 20px"
|
||||
>
|
||||
{{ "routerTitle.order.workOrderManage.tagDetail" | i18nFilter }}
|
||||
</div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ "BOX_ID:" + dataForm.id }}</b></span>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="float:right"
|
||||
size="small"
|
||||
@click="btnClickPrint"
|
||||
>{{ "btn.print" | i18nFilter }}</el-button>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col
|
||||
:span="6"
|
||||
><div>{{ "Power:" + dataForm.power }}</div></el-col>
|
||||
<el-col
|
||||
:span="6"
|
||||
><div>{{ "SAP Material:" + dataForm.sapMaterial }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<div id="tablePrint">
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import {
|
||||
packagingDetail,
|
||||
packagingBoxList
|
||||
} from '@/api/orderManage/workOrder/workOrder'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
import { getLodop } from '@/assets/libs/LodopFuncs.js'
|
||||
import { getInfo } from '@/api/packing-manage/packing-label.js'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'woSubstrateId',
|
||||
label: i18n.t('module.orderManage.packingTags.moduleId'),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'finishProduceTime',
|
||||
// label: i18n.t('module.orderManage.packingTags.UnloadingTime'),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'name',
|
||||
// label: i18n.t('module.orderManage.packingTags.UnloadingEquipment'),
|
||||
// align: 'center',
|
||||
// filter: timeFormatter
|
||||
// },
|
||||
{
|
||||
prop: 'oneCode',
|
||||
label: i18n.t('module.orderManage.packingTags.oneDimensionalCode'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
packagingBoxId: {
|
||||
type: String,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
dataForm: {},
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true
|
||||
this.listLoading = true
|
||||
packagingDetail(this.packagingBoxId).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.listQuery.packagingBoxId = this.packagingBoxId
|
||||
this.listLoading = true
|
||||
packagingBoxList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// btnClickPrint() {
|
||||
// const LODOP = getLodop()
|
||||
// const strHTML = document.getElementById('tablePrint').innerHTML
|
||||
// LODOP.ADD_PRINT_HTM(30, 5, '100%', '80%', strHTML) // 装载模板
|
||||
// LODOP.PREVIEW()
|
||||
// }
|
||||
btnClickPrint() {
|
||||
getInfo({ id: '1387070313172353025' }).then(res => {
|
||||
this.printPreview('预览', res.data.content)
|
||||
})
|
||||
},
|
||||
printPreview(name = '预览', modelCode) {
|
||||
console.log(modelCode)
|
||||
const LODOP = getLodop()
|
||||
LODOP.PRINT_INIT(name)
|
||||
const aaa = LODOP.ADD_PRINT_DATA('ProgramData', modelCode)
|
||||
console.log(aaa)
|
||||
const obj = {
|
||||
time: this.dataForm.packagingTime,
|
||||
orderCode: this.orderCode,
|
||||
power: this.dataForm.power,
|
||||
sapMaterial: this.dataForm.sapMaterial,
|
||||
BarCode: this.dataForm.boxNo
|
||||
}
|
||||
this.list.forEach((item, index) => {
|
||||
const str = 'modul' + (index + 1)
|
||||
obj[str] = item.woSubstrateId
|
||||
})
|
||||
Object.keys(obj).forEach(key => {
|
||||
LODOP.SET_PRINT_STYLEA(key, 'CONTENT', obj[key])
|
||||
})
|
||||
LODOP.NewPageA()
|
||||
LODOP.PREVIEW()
|
||||
},
|
||||
print(name = '打印') {
|
||||
console.log(name, this.currentIndex)
|
||||
// 装载模板
|
||||
const modelCode = this.printModels[this.currentIndex].printModelContent
|
||||
console.log(modelCode)
|
||||
this.objs.forEach(obj => {
|
||||
const LODOP = getLodop() // 调用getLodop获取LODOP对象
|
||||
LODOP.PRINT_INIT(name)
|
||||
const aaa = LODOP.ADD_PRINT_DATA('ProgramData', modelCode)
|
||||
console.log(aaa)
|
||||
obj.partCode = obj.itemCode
|
||||
obj.productTypeName = obj.itemTypeName
|
||||
Object.keys(obj).forEach(key => {
|
||||
LODOP.SET_PRINT_STYLEA(key, 'CONTENT', obj[key])
|
||||
})
|
||||
// LODOP.ADD_PRINT_HTM(10, 10, 350, 600, `--------${index}----------`);
|
||||
LODOP.NewPageA()
|
||||
LODOP.PRINT()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer-footer {
|
||||
width: 100%;
|
||||
margin-top: 50px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 50px;
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
125
src/views/orderManage/consumption/consumption.vue
Normal file
125
src/views/orderManage/consumption/consumption.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-07-21 16:13:20
|
||||
* @LastEditTime: 2021-07-21 17:32:59
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \mt-bus-fe\src\views\orderManage\consumption\consumption.vue
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="method-btn-area">
|
||||
<el-input v-model="listQuery.key" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.consumption.workOrderId')])" filterable clearable style="width: 200px;" />
|
||||
<!-- <el-select v-model="listQuery.workerId" :placeholder="$t('module.equipmentManager.eqManagerManage.worker')" clearable style="width: 200px;">
|
||||
<el-option
|
||||
v-for="item in workerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select> -->
|
||||
<el-button type="primary" @click="getList">{{ 'btn.search' | i18nFilter }}</el-button>
|
||||
</div>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
>
|
||||
<method-btn
|
||||
slot="handleBtn"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList1()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import i18n from '@/lang'
|
||||
import { getPower } from '@/api/orderManage/order/order'
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: 'btn.detail'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'workOrderId',
|
||||
label: i18n.t('module.orderManage.consumption.workOrderId'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'power',
|
||||
label: i18n.t('module.orderManage.consumption.power'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderStatus',
|
||||
label: i18n.t('module.orderManage.consumption.workOrderStatus'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
components: {
|
||||
BaseTable,
|
||||
Pagination,
|
||||
MethodBtn
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
tableBtn,
|
||||
list: [],
|
||||
listLoading: true,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
key: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
getPower(this.listQuery).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records
|
||||
this.listLoading = false
|
||||
}
|
||||
})
|
||||
// this.list = result.data.records
|
||||
},
|
||||
handleClick(raw) {
|
||||
const id = raw.data.workOrderId
|
||||
this.$router.push({
|
||||
path: '/powerList',
|
||||
query: {
|
||||
id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.method-btn-area{
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
100
src/views/orderManage/consumption/list.vue
Normal file
100
src/views/orderManage/consumption/list.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-07-21 17:08:01
|
||||
* @LastEditTime: 2021-07-21 17:33:37
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \mt-bus-fe\src\views\orderManage\consumption\list.vue
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-row style="padding: 20px">
|
||||
<el-button type="primary" icon="el-icon-arrow-left" @click="goBack">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
</el-row>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList1()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import i18n from '@/lang'
|
||||
import { getPower } from '@/api/orderManage/order/order'
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: 'btn.detail'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
label: i18n.t('module.orderManage.consumption.equipmentName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'power',
|
||||
label: i18n.t('module.orderManage.consumption.power'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderStatus',
|
||||
label: i18n.t('module.orderManage.consumption.workOrderStatus'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
components: {
|
||||
BaseTable,
|
||||
Pagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
tableBtn,
|
||||
list: [],
|
||||
listLoading: true,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
workOrderId: this.$route.query.id
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
console.log(this.listQuery.workOrderId)
|
||||
getPower(this.listQuery).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records
|
||||
this.listLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
237
src/views/orderManage/erpToMesData.vue
Normal file
237
src/views/orderManage/erpToMesData.vue
Normal file
@@ -0,0 +1,237 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-06-24 15:21:19
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-21 16:45:26
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div style="padding:10px">
|
||||
<span>{{ $t('module.orderManage.erpToMes.erpToMesMaterial') }}</span>
|
||||
<base-table
|
||||
:page="listQuery1.current"
|
||||
:limit="listQuery1.size"
|
||||
:table-config="tableProps1"
|
||||
:table-data="list1"
|
||||
:is-loading="listLoading1"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total1 > 0"
|
||||
:total="total1"
|
||||
:page.sync="listQuery1.current"
|
||||
:limit.sync="listQuery1.size"
|
||||
@pagination="getList1()"
|
||||
/>
|
||||
<hr>
|
||||
<span>{{ $t('module.orderManage.erpToMes.erpToMesMaterialBom') }}</span>
|
||||
<base-table
|
||||
:page="listQuery2.current"
|
||||
:limit="listQuery2.size"
|
||||
:table-config="tableProps2"
|
||||
:table-data="list2"
|
||||
:is-loading="listLoading2"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="listQuery2.current"
|
||||
:limit.sync="listQuery2.size"
|
||||
@pagination="getLis2()"
|
||||
/>
|
||||
<hr>
|
||||
<span>{{ $t('module.orderManage.erpToMes.erpToMesOrder') }}</span>
|
||||
<base-table
|
||||
:page="listQuery3.current"
|
||||
:limit="listQuery3.size"
|
||||
:table-config="tableProps3"
|
||||
:table-data="list3"
|
||||
:is-loading="listLoading3"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
:page.sync="listQuery3.current"
|
||||
:limit.sync="listQuery3.size"
|
||||
@pagination="getList3()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { erpToMesMaterialList, erpToMesMaterialBomList, erpToMesOrderList } from '@/api/orderManage/erpToMes'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import i18n from '@/lang'
|
||||
|
||||
const tableProps1 = [
|
||||
{
|
||||
prop: 'batchNumber',
|
||||
label: i18n.t('module.orderManage.erpToMes.batchNumber'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'materialsCode',
|
||||
label: i18n.t('module.orderManage.erpToMes.materialsCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'materialsName',
|
||||
label: i18n.t('module.orderManage.erpToMes.materialsName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'quantity',
|
||||
label: i18n.t('module.orderManage.erpToMes.quantity'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: i18n.t('module.orderManage.erpToMes.unit'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableProps2 = [
|
||||
{
|
||||
prop: 'bomContent',
|
||||
label: i18n.t('module.orderManage.erpToMes.bomContent'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'craftCode',
|
||||
label: i18n.t('module.orderManage.erpToMes.craftCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'craftName',
|
||||
label: i18n.t('module.orderManage.erpToMes.craftName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'materialsBomCode',
|
||||
label: i18n.t('module.orderManage.erpToMes.materialsBomCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'materialsBomName',
|
||||
label: i18n.t('module.orderManage.erpToMes.materialsBomName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'substrateBatch',
|
||||
label: i18n.t('module.orderManage.erpToMes.substrateBatch'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableProps3 = [
|
||||
{
|
||||
prop: 'customerCode',
|
||||
label: i18n.t('module.orderManage.erpToMes.customerCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'customerName',
|
||||
label: i18n.t('module.orderManage.erpToMes.customerName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'orderCode',
|
||||
label: i18n.t('module.orderManage.erpToMes.orderCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: i18n.t('module.orderManage.erpToMes.orderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'quantity',
|
||||
label: i18n.t('module.orderManage.erpToMes.quantity'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ErpToMesData',
|
||||
components: { Pagination, BaseTable },
|
||||
data() {
|
||||
return {
|
||||
tableProps1,
|
||||
tableProps2,
|
||||
tableProps3,
|
||||
list1: [],
|
||||
list2: [],
|
||||
list3: [],
|
||||
total1: 0,
|
||||
total2: 0,
|
||||
total3: 0,
|
||||
listLoading1: true,
|
||||
listLoading2: true,
|
||||
listLoading3: true,
|
||||
listQuery1: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
listQuery2: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
listQuery3: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList1()
|
||||
this.getList2()
|
||||
this.getList3()
|
||||
},
|
||||
methods: {
|
||||
getList1() {
|
||||
this.listLoading1 = true
|
||||
erpToMesMaterialList(this.listQuery1).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list1 = response.data.records
|
||||
} else {
|
||||
this.list1.splice(0, this.list1.length)
|
||||
}
|
||||
this.total1 = response.data.total
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
getList2() {
|
||||
this.listLoading2 = true
|
||||
erpToMesMaterialBomList(this.listQuery2).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list2 = response.data.records
|
||||
} else {
|
||||
this.list2.splice(0, this.list2.length)
|
||||
}
|
||||
this.total2 = response.data.total
|
||||
this.listLoading2 = false
|
||||
})
|
||||
},
|
||||
getList3() {
|
||||
this.listLoading3 = true
|
||||
erpToMesOrderList(this.listQuery3).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list3 = response.data.records
|
||||
} else {
|
||||
this.list3.splice(0, this.list3.length)
|
||||
}
|
||||
this.total3 = response.data.total
|
||||
this.listLoading3 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
background-color: #ECF5FF;
|
||||
font-size: 20px;
|
||||
padding: 5px;
|
||||
color: #409EFF;
|
||||
}
|
||||
</style>
|
||||
12
src/views/orderManage/index.vue
Normal file
12
src/views/orderManage/index.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-12 11:13:03
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-02-23 13:35:09
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div id="orderManage">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
197
src/views/orderManage/infoTrack/equipmentEventTrack.vue
Normal file
197
src/views/orderManage/infoTrack/equipmentEventTrack.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-18 18:35:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="workOrderId">
|
||||
<el-select v-model="formData.workOrderId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in WorkOrderList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.EquipmentName')" prop="equipmentId">
|
||||
<el-select v-model="formData.equipmentId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.EquipmentName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in equipmentList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.track.event')" prop="equipmentEventId">
|
||||
<el-input v-model="formData.equipmentEventId" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.track.event')])" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.track.parameterName')" prop="equipmentParameterId">
|
||||
<el-input v-model="formData.equipmentParameterId" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.track.parameterName')])" style="width:200px" clearable />
|
||||
</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"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="formData.current"
|
||||
:limit.sync="formData.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { equipmentInfoList } from '@/api/basicData/Equipment/equipmentInfo'
|
||||
import { equipmentEventTrackList } from '@/api/orderManage/infoTrack/infoTrack'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: i18n.t('module.orderManage.track.parameterName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramValue',
|
||||
label: i18n.t('module.orderManage.track.parameterValue'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eventName',
|
||||
label: i18n.t('module.orderManage.track.event'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable },
|
||||
data() {
|
||||
return {
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
workOrderId: '',
|
||||
equipmentId: '',
|
||||
equipmentEventId: '',
|
||||
equipmentParameterId: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
equipmentList: [],
|
||||
WorkOrderList: [],
|
||||
rules: {
|
||||
workOrderId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
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
|
||||
}
|
||||
})
|
||||
this.WorkOrderList.splice(0, this.WorkOrderList.length)
|
||||
workOrderList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.WorkOrderList = response.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
equipmentEventTrackList(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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
210
src/views/orderManage/infoTrack/equipmentParametersTrack.vue
Normal file
210
src/views/orderManage/infoTrack/equipmentParametersTrack.vue
Normal file
@@ -0,0 +1,210 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:23:00
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="workOrderId">
|
||||
<el-select v-model="formData.workOrderId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in WorkOrderList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.EquipmentName')" prop="equipmentId">
|
||||
<el-select v-model="formData.equipmentId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.EquipmentName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in equipmentList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.basePlate')" prop="substrateNo">
|
||||
<el-input v-model="formData.substrateNo" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.basePlate')])" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.track.parameterName')" prop="equipmentParameterId">
|
||||
<el-input v-model="formData.equipmentParameterId" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.track.parameterName')])" style="width:200px" clearable />
|
||||
</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"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="formData.current"
|
||||
:limit.sync="formData.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { equipmentInfoList } from '@/api/basicData/Equipment/equipmentInfo'
|
||||
import { equipmentParametersTrackList } from '@/api/orderManage/infoTrack/infoTrack'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableProps = [
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: i18n.t('module.orderManage.order.createTime'),
|
||||
// filter: timeFormatter
|
||||
// },
|
||||
// {
|
||||
// prop: 'workOrderNo',
|
||||
// label: i18n.t('module.orderManage.order.WorkOrderCode'),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'code',
|
||||
// label: i18n.t('module.orderManage.order.processCode'),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'substrateNo',
|
||||
label: i18n.t('module.orderManage.order.basePlateId'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eventName',
|
||||
label: i18n.t('module.orderManage.track.event'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: i18n.t('module.orderManage.track.parameterName')
|
||||
},
|
||||
{
|
||||
prop: 'paramValue',
|
||||
label: i18n.t('module.orderManage.track.parameterValue')
|
||||
},
|
||||
{
|
||||
prop: 'eventTime',
|
||||
label: i18n.t('module.orderManage.track.occurTime'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable },
|
||||
data() {
|
||||
return {
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
substrateNo: '',
|
||||
workOrderId: '',
|
||||
equipmentId: '',
|
||||
equipmentParameterId: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
WorkOrderList: [],
|
||||
equipmentList: [],
|
||||
rules: {
|
||||
workOrderId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
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
|
||||
}
|
||||
})
|
||||
this.WorkOrderList.splice(0, this.WorkOrderList.length)
|
||||
workOrderList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.WorkOrderList = response.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
equipmentParametersTrackList(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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
195
src/views/orderManage/infoTrack/processSubstrateDataTrack.vue
Normal file
195
src/views/orderManage/infoTrack/processSubstrateDataTrack.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:24:13
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="workOrderId">
|
||||
<el-select v-model="formData.workOrderId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in WorkOrderList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.basePlateCode')" prop="substrateNo">
|
||||
<el-input v-model="formData.substrateNo" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.basePlateCode')])" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.loadingTime')" prop="time">
|
||||
<el-date-picker
|
||||
v-model="formData.timeSlot"
|
||||
type="daterange"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:start-placeholder="$t('module.orderManage.order.StartTime')"
|
||||
:end-placeholder="$t('module.orderManage.order.StartTime')"
|
||||
:range-separator="$t('module.orderManage.order.To')"
|
||||
clearable
|
||||
/>
|
||||
</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"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="formData.current"
|
||||
:limit.sync="formData.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { processSubstrateDataTrackList } from '@/api/orderManage/infoTrack/infoTrack'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'workOrderNo',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderCode'),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'processFlowCode',
|
||||
// label: i18n.t('module.orderManage.order.processCode'),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'substrateNo',
|
||||
label: i18n.t('module.orderManage.order.basePlateId'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
label: i18n.t('module.orderManage.order.loadingTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'finishProduceTime',
|
||||
label: i18n.t('module.orderManage.order.unLoadingTime'),
|
||||
filter: timeFormatter
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable },
|
||||
data() {
|
||||
return {
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
workOrderId: '',
|
||||
substrateNo: '',
|
||||
timeSlot: [],
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
WorkOrderList: [],
|
||||
rules: {
|
||||
workOrderId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const listQuery = {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
this.WorkOrderList.splice(0, this.WorkOrderList.length)
|
||||
workOrderList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.WorkOrderList = response.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.formData.timeSlot) {
|
||||
this.formData.startTime = this.formData.timeSlot[0]
|
||||
this.formData.endTime = this.formData.timeSlot[1]
|
||||
} else {
|
||||
this.formData.startTime = ''
|
||||
this.formData.endTime = ''
|
||||
}
|
||||
this.listLoading = true
|
||||
processSubstrateDataTrackList(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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
224
src/views/orderManage/infoTrack/substrateEquipment.vue
Normal file
224
src/views/orderManage/infoTrack/substrateEquipment.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-30 19:05:32
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="workOrderId">
|
||||
<el-select v-model="formData.workOrderId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in WorkOrderList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.EquipmentName')" prop="equipmentId">
|
||||
<el-select v-model="formData.equipmentId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.EquipmentName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in equipmentList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.basePlateCode')" prop="substrateNo">
|
||||
<el-input v-model="formData.substrateNo" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.basePlateCode')])" style="width:200px" clearable />
|
||||
</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"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="formData.current"
|
||||
:limit.sync="formData.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
<substrateEquipmentDetail v-if="substrateVisible" ref="substrateDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { equipmentInfoList } from '@/api/basicData/Equipment/equipmentInfo'
|
||||
import { substrateEquipmentList } from '@/api/orderManage/infoTrack/infoTrack'
|
||||
import substrateEquipmentDetail from './substrateEquipmentDetail'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: 'btn.detail'
|
||||
}
|
||||
]
|
||||
|
||||
const tableProps = [
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: i18n.t('module.orderManage.order.createTime'),
|
||||
// filter: timeFormatter
|
||||
// },
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'substrateNo',
|
||||
label: i18n.t('module.orderManage.order.basePlateCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.StartTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
label: i18n.t('module.orderManage.track.ProcessTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'finishProduceTime',
|
||||
label: i18n.t('module.orderManage.order.finishTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable, MethodBtn, substrateEquipmentDetail },
|
||||
data() {
|
||||
return {
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
tableBtn,
|
||||
list: [],
|
||||
total: 0,
|
||||
substrateVisible: false,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
substrateNo: '',
|
||||
workOrderId: '',
|
||||
equipmentId: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
equipmentList: [],
|
||||
WorkOrderList: [],
|
||||
rules: {
|
||||
workOrderId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
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
|
||||
}
|
||||
})
|
||||
this.WorkOrderList.splice(0, this.WorkOrderList.length)
|
||||
workOrderList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.WorkOrderList = response.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
substrateEquipmentList(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) {
|
||||
this.substrateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.substrateDetail.init(raw)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
118
src/views/orderManage/infoTrack/substrateEquipmentDetail.vue
Normal file
118
src/views/orderManage/infoTrack/substrateEquipmentDetail.vue
Normal file
@@ -0,0 +1,118 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-30 19:08:59
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:append-to-body="true"
|
||||
:show-close="false"
|
||||
:visible.sync="visible"
|
||||
size="55%"
|
||||
>
|
||||
<el-card class="box-card">
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.basePlateCode')+':'+dataForm.substrateNo }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.EquipmentName')+':'+dataForm.name }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { substrateEquipmentDetail } from '@/api/orderManage/infoTrack/infoTrack'
|
||||
import { timeFormatter } from '@/filters'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'eventName',
|
||||
label: i18n.t('module.orderManage.track.event'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: i18n.t('module.orderManage.track.parameterName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramValue',
|
||||
label: i18n.t('module.orderManage.track.parameterValue'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
components: { BaseTable, Pagination },
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
dataForm: {},
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true
|
||||
this.listLoading = true
|
||||
this.getList()
|
||||
},
|
||||
getList(raw) {
|
||||
this.dataForm = raw
|
||||
this.listQuery.orderId = raw.id
|
||||
this.listLoading = true
|
||||
substrateEquipmentDetail(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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer-footer {
|
||||
width: 100%;
|
||||
margin-top: 50px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 50px;
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
174
src/views/orderManage/infoTrack/substrateParametersTrack.vue
Normal file
174
src/views/orderManage/infoTrack/substrateParametersTrack.vue
Normal file
@@ -0,0 +1,174 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:24:41
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="workOrderId">
|
||||
<el-select v-model="formData.workOrderId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable>
|
||||
<el-option
|
||||
v-for="item in WorkOrderList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.basePlateCode')" prop="substrateNo">
|
||||
<el-input v-model="formData.substrateNo" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.basePlateCode')])" style="width:200px" clearable />
|
||||
</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"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="formData.current"
|
||||
:limit.sync="formData.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { substrateParametersTrackList } from '@/api/orderManage/infoTrack/infoTrack'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramName',
|
||||
label: i18n.t('module.orderManage.track.parameterName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'paramValue',
|
||||
label: i18n.t('module.orderManage.track.parameterValue'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eventName',
|
||||
label: i18n.t('module.orderManage.track.event'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable },
|
||||
data() {
|
||||
return {
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
substrateNo: '',
|
||||
workOrderId: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
WorkOrderList: [],
|
||||
rules: {
|
||||
workOrderId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const listQuery = {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
this.WorkOrderList.splice(0, this.WorkOrderList.length)
|
||||
workOrderList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.WorkOrderList = response.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
substrateParametersTrackList(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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
345
src/views/orderManage/mesToErp.vue
Normal file
345
src/views/orderManage/mesToErp.vue
Normal file
@@ -0,0 +1,345 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 10:54:06
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
size="medium"
|
||||
label-width="130px"
|
||||
style="margin:30px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="grade" prop="grade">
|
||||
<el-input v-model="dataForm.grade" placeholder="grade" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('module.orderManage.erpToMes.mfoCode')" prop="mfoCode">
|
||||
<el-input v-model="dataForm.mfoCode" :placeholder="$t('module.orderManage.erpToMes.mfoCode')" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('module.orderManage.erpToMes.packagingBoxId')" prop="packagingBoxId">
|
||||
<el-input
|
||||
v-model="dataForm.packagingBoxId"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
:placeholder="$t('module.orderManage.erpToMes.packagingBoxId')"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('module.orderManage.erpToMes.reportTime')" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.reportTime"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$t('module.orderManage.erpToMes.reportTime')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="totlePower" prop="totlePower">
|
||||
<el-input
|
||||
v-model="dataForm.totlePower"
|
||||
placeholder="totlePower"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId1" prop="substrateId1">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId1"
|
||||
placeholder="substrateId1"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId2" prop="substrateId2">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId2"
|
||||
placeholder="substrateId2"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId3" prop="substrateId3">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId3"
|
||||
placeholder="substrateId3"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId4" prop="substrateId4">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId4"
|
||||
placeholder="substrateId4"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId5" prop="substrateId5">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId5"
|
||||
placeholder="substrateId5"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId6" prop="substrateId6">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId6"
|
||||
placeholder="substrateId6"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId7" prop="substrateId7">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId7"
|
||||
placeholder="substrateId7"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId8" prop="substrateId8">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId8"
|
||||
placeholder="substrateId8"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId9" prop="substrateId9">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId9"
|
||||
placeholder="substrateId9"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId10" prop="substrateId10">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId10"
|
||||
placeholder="substrateId10"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId11" prop="substrateId11">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId11"
|
||||
placeholder="substrateId11"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId12" prop="substrateId12">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId12"
|
||||
placeholder="substrateId12"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId13" prop="substrateId13">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId13"
|
||||
placeholder="substrateId13"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId14" prop="substrateId14">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId14"
|
||||
placeholder="substrateId14"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId15" prop="substrateId15">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId15"
|
||||
placeholder="substrateId15"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId16" prop="substrateId16">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId16"
|
||||
placeholder="substrateId16"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId17" prop="substrateId17">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId17"
|
||||
placeholder="substrateId17"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId18" prop="substrateId18">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId18"
|
||||
placeholder="substrateId18"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId19" prop="substrateId19">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId19"
|
||||
placeholder="substrateId19"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="substrateId20" prop="substrateId20">
|
||||
<el-input
|
||||
v-model="dataForm.substrateId20"
|
||||
placeholder="substrateId20"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="0" prop="">
|
||||
<el-button type="primary" size="medium" @click="submit"> 提交 </el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mesToErpAdd } from '@/api/orderManage/erpToMes'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
grade: undefined,
|
||||
mfoCode: undefined,
|
||||
packagingBoxId: undefined,
|
||||
reportTime: undefined,
|
||||
totlePower: undefined,
|
||||
substrateId1: undefined,
|
||||
substrateId2: undefined,
|
||||
substrateId3: undefined,
|
||||
substrateId4: undefined,
|
||||
substrateId5: undefined,
|
||||
substrateId6: undefined,
|
||||
substrateId7: undefined,
|
||||
substrateId8: undefined,
|
||||
substrateId9: undefined,
|
||||
substrateId10: undefined,
|
||||
substrateId11: undefined,
|
||||
substrateId12: undefined,
|
||||
substrateId13: undefined,
|
||||
substrateId14: undefined,
|
||||
substrateId15: undefined,
|
||||
substrateId16: undefined,
|
||||
substrateId17: undefined,
|
||||
substrateId18: undefined,
|
||||
substrateId19: undefined,
|
||||
substrateId20: undefined
|
||||
},
|
||||
rules: {
|
||||
grade: [],
|
||||
mfoCode: [],
|
||||
packagingBoxId: [],
|
||||
reportTime: [],
|
||||
totlePower: [],
|
||||
substrateId1: []
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
mesToErpAdd(this.dataForm).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
122
src/views/orderManage/order/components/materialBomInfo.vue
Normal file
122
src/views/orderManage/order/components/materialBomInfo.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-04-27 09:40:10
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list } from '@/api/material-manage/bom-list.js'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.materialManager.materialbom.name'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.materialManager.materialbom.bomcode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'quantity',
|
||||
label: i18n.t('module.materialManager.materialbom.quantity'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: i18n.t('module.materialManager.materialbom.unit'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.orderManage.order.Remarks'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
bomId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 500,
|
||||
bomId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery.bomId = this.bomId
|
||||
if (this.bomId) {
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(this.$t('module.orderManage.order.materialBomMessage'))
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
list(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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
417
src/views/orderManage/order/components/order-add.vue
Normal file
417
src/views/orderManage/order/components/order-add.vue
Normal file
@@ -0,0 +1,417 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-03-04 15:58:33
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:20:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
width="60%"
|
||||
@open="onOpen"
|
||||
@close="onClose"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
size="medium"
|
||||
label-width="165px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.OrderName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.OrderName')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.OrderCode')" prop="orderNo">
|
||||
<el-input v-model="dataForm.orderNo" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.OrderCode')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.powerClass')" prop="powerClass">
|
||||
<el-input v-model="dataForm.powerClass" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.powerClass')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlannedProcessingVolume')" prop="planQuantity">
|
||||
<el-input-number v-model="dataForm.planQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlannedProcessingVolume')])" :step="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="dataForm.id" :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ActualTargetQuantity')" prop="targetNumber">
|
||||
<el-input-number v-model="dataForm.targetNumber" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ActualTargetQuantity')])" :step="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.OrderType')" prop="orderType">
|
||||
<el-select v-model="dataForm.orderType" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.OrderType')])" clearable>
|
||||
<el-option
|
||||
v-for="item in orderTypeArr"
|
||||
:key="item.id"
|
||||
:label="item.dataName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.customer')" prop="customerName">
|
||||
<el-input v-model="dataForm.customerName" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.customer')])" clearable :style="{width: '100%'}" />
|
||||
<!-- <el-select v-model="dataForm.customerName" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.customer')])" clearable>
|
||||
<el-option
|
||||
v-for="item in customerArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.priority')" prop="priority">
|
||||
<el-select v-model="dataForm.priority" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.priority')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in priorityOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductProcess')" prop="processFlowId" label-width="175px">
|
||||
<el-select v-model="dataForm.processFlowId" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductProcess')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in processOptions"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductName')" prop="productId">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductName')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in productOptions"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductType')" prop="productType">
|
||||
<el-select v-model="dataForm.productType" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductType')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in productTypeOptions"
|
||||
:key="index"
|
||||
:label="item.dataName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.materialBom')" prop="bomId">
|
||||
<el-select v-model="dataForm.bomId" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.materialBom')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in materialBomOptions"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="false" :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlanningStartTime')" prop="planStartProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planStartProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlanningStartTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.DeliveryTime')" prop="deliveryTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.deliveryTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.DeliveryTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="dataForm.id" :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlanningEndTime')" prop="planFinishProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planFinishProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlanningEndTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16" />
|
||||
<el-col :span="8" style="word-break:break-word">
|
||||
<el-form-item label="power Classification" prop="powerClassification">
|
||||
<el-select v-model="dataForm.powerClassification" placeholder="power Classification" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in powerClassificationArr"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.Remarks')" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.Remarks')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.Description')" prop="description">
|
||||
<el-input v-model="dataForm.description" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.Description')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<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 { powerClassificationList } from '@/api/orderManage/powerClassification'
|
||||
import { orderDetail, orderUpdate, orderAdd, orderCode } from '@/api/orderManage/order/order'
|
||||
import { dataDictionaryDataList } from '@/api/basicData/dataDictionary'
|
||||
// import { customerList } from '@/api/basicData/CustomerSupplier/customer'
|
||||
import { ProductPoolList } from '@/api/basicData/ProductPool'
|
||||
import { list as BomList } from '@/api/material-manage/bom'
|
||||
import { list } from '@/api/art-manage/art.js'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
inheritAttrs: false,
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
name: undefined,
|
||||
orderNo: undefined,
|
||||
planQuantity: undefined,
|
||||
orderType: '',
|
||||
powerClass: '',
|
||||
customerName: undefined,
|
||||
priority: undefined,
|
||||
processFlowId: undefined,
|
||||
productType: undefined,
|
||||
planStartProduceTime: null,
|
||||
powerClassification: '',
|
||||
deliveryTime: '',
|
||||
bomId: '',
|
||||
targetNumber: '',
|
||||
planFinishProduceTime: null,
|
||||
remark: undefined,
|
||||
description: undefined
|
||||
},
|
||||
rules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.OrderName')]),
|
||||
trigger: 'blur'
|
||||
}],
|
||||
orderNo: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.OrderCode')]),
|
||||
trigger: 'blur'
|
||||
}],
|
||||
powerClass: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.powerClass')]),
|
||||
trigger: 'blur'
|
||||
}],
|
||||
bomId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.materialBom')]),
|
||||
trigger: 'change'
|
||||
}],
|
||||
deliveryTime: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.DeliveryTime')]),
|
||||
trigger: 'change'
|
||||
}],
|
||||
planQuantity: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.PlannedProcessingVolume')]),
|
||||
trigger: 'blur'
|
||||
}],
|
||||
customerName: [],
|
||||
priority: [],
|
||||
processFlowId: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.ProductProcess')]),
|
||||
trigger: 'change'
|
||||
}],
|
||||
productType: [],
|
||||
planStartProduceTime: [],
|
||||
remark: [],
|
||||
description: []
|
||||
},
|
||||
powerClassificationArr: [],
|
||||
orderTypeArr: [],
|
||||
priorityOptions: [{
|
||||
'label': '正常',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '高',
|
||||
'value': 2
|
||||
}, {
|
||||
'label': '低',
|
||||
'value': 0
|
||||
}],
|
||||
processOptions: [],
|
||||
productOptions: [],
|
||||
productTypeOptions: [],
|
||||
materialBomOptions: [],
|
||||
customerArr: []
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init(id) {
|
||||
const listQuery = {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
powerClassificationList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.powerClassificationArr = response.data.records
|
||||
} else {
|
||||
this.powerClassificationArr.splice(0, this.powerClassificationArr.length)
|
||||
}
|
||||
})
|
||||
this.dataForm.id = id || ''
|
||||
// this.customerArr.splice(0, this.customerArr.length)
|
||||
// customerList(listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.customerArr = response.data.records
|
||||
// }
|
||||
// })
|
||||
const listQuery1 = {
|
||||
current: 1,
|
||||
size: 500,
|
||||
dictTypeId: '1386554664951058433'
|
||||
}
|
||||
this.orderTypeArr.splice(0, this.orderTypeArr.length)
|
||||
dataDictionaryDataList(listQuery1).then(response => {
|
||||
if (response.data.records) {
|
||||
this.orderTypeArr = response.data.records
|
||||
}
|
||||
})
|
||||
const listQuery2 = {
|
||||
current: 1,
|
||||
size: 500,
|
||||
dictTypeId: '1386586276368023554'
|
||||
}
|
||||
this.productTypeOptions.splice(0, this.productTypeOptions.length)
|
||||
dataDictionaryDataList(listQuery2).then(response => {
|
||||
if (response.data.records) {
|
||||
this.productTypeOptions = response.data.records
|
||||
}
|
||||
})
|
||||
this.materialBomOptions.splice(0, this.materialBomOptions.length)
|
||||
BomList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.materialBomOptions = response.data.records
|
||||
}
|
||||
})
|
||||
this.productOptions.splice(0, this.productOptions.length)
|
||||
ProductPoolList(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.productOptions = response.data.records
|
||||
}
|
||||
})
|
||||
this.processOptions.splice(0, this.processOptions.length)
|
||||
list(listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.processOptions = response.data.records
|
||||
}
|
||||
})
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
orderDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
} else {
|
||||
orderCode().then(res => {
|
||||
this.dataForm.orderNo = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen() {},
|
||||
onClose() {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = this.dataForm
|
||||
if (this.dataForm.id) {
|
||||
orderUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
orderAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
202
src/views/orderManage/order/components/orderDetail.vue
Normal file
202
src/views/orderManage/order/components/orderDetail.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-23 11:05:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-07-20 14:57:19
|
||||
* @Description: 工单监控
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="margin-right:50px" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
<span><b>{{ 'routerTitle.order.orderManage.orderDetail' | i18nFilter }}</b></span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.OrderName')+':'+stringfilter(dataForm.name) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.OrderCode')+':'+stringfilter(dataForm.orderNo) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.process')+':'+stringfilter(dataForm.processFlowName) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.customer')+':'+stringfilter(dataForm.customerName) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-col :span="6"><div>{{ $t('module.orderManage.orderDetail.issueTime')+':'+timefilter(dataForm.startProduceTime) }}</div></el-col> -->
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.status')+':'+stringfilter(statusfilter(dataForm.status)) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ActualTargetQuantity')+':'+stringfilter(dataForm.planQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.DeliveryTime')+':'+timefilter(dataForm.deliveryTime) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.orderDetail.completionSchedule')+':'+towNumber((stringfilter(dataForm.actualQuantity/dataForm.planQuantity))*100)+'%' }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ActualFinishedProduct')+':'+stringfilter(dataForm.actualQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.NumberOfDamages')+':'+stringfilter(dataForm.scrapQuantity) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row v-if="false">
|
||||
<el-col>
|
||||
<el-button type="primary" @click="scrapClick()"> {{ 'routerTitle.order.orderManage.scrapDetail' | i18nFilter }} </el-button>
|
||||
<el-button type="primary" @click="packageClick()"> {{ 'routerTitle.order.orderManage.packageDetail' | i18nFilter }} </el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="1">{{ $t('module.orderManage.order.workOrderInfo') }}</el-menu-item>
|
||||
<!-- <el-menu-item index="2">{{ $t('module.orderManage.order.OrderReportInfo') }}</el-menu-item> -->
|
||||
<el-menu-item index="3">{{ $t('module.orderManage.order.materialBom') }}</el-menu-item>
|
||||
</el-menu>
|
||||
</el-card>
|
||||
<order-info v-if="orderVisible" ref="orderInfo" :order-id="OrderId" @getQuantity="getQuantity" />
|
||||
<report-info v-if="reportVisible" ref="reportInfo" :order-id="OrderId" @refreshDataList="handleClick" />
|
||||
<materialBom-info v-if="materialBomVisible" ref="materialBomInfo" :bom-id="dataForm.bomId" @refreshDataList="handleClick" />
|
||||
<package-detail v-if="packageVisible" ref="packageDetail" :order-id="OrderId" @refreshDataList="handleClick" />
|
||||
<scrap-detail v-if="scrapVisible" ref="scrapDetail" :order-id="OrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderDetail } from '@/api/orderManage/order/order'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import orderInfo from './orderInfo'
|
||||
import reportInfo from './reportInfo'
|
||||
import materialBomInfo from './materialBomInfo'
|
||||
import packageDetail from './packageDetail'
|
||||
import scrapDetail from './scrapDetail'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { orderInfo, reportInfo, scrapDetail, packageDetail, materialBomInfo },
|
||||
data() {
|
||||
return {
|
||||
orderVisible: false,
|
||||
reportVisible: false,
|
||||
materialBomVisible: false,
|
||||
packageVisible: false,
|
||||
scrapVisible: false,
|
||||
OrderId: '',
|
||||
activeIndex: '1',
|
||||
dataForm: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.OrderId = this.$route.query.id
|
||||
this.handleSelect('1')
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
init() {
|
||||
this.dataForm = {}
|
||||
orderDetail(this.OrderId).then(res => {
|
||||
this.dataForm = res.data
|
||||
this.dataForm.actualQuantity = 0
|
||||
this.dataForm.scrapQuantity = 0
|
||||
})
|
||||
},
|
||||
handleSelect(key, keyPath) {
|
||||
this.orderVisible = false
|
||||
this.reportVisible = false
|
||||
this.materialBomVisible = false
|
||||
switch (key) {
|
||||
case '1':
|
||||
this.orderVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.orderInfo.init()
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
this.reportVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.reportInfo.init()
|
||||
})
|
||||
break
|
||||
case '3':
|
||||
this.materialBomVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.materialBomInfo.init()
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
scrapClick() {
|
||||
this.scrapVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.scrapDetail.init()
|
||||
})
|
||||
},
|
||||
packageClick() {
|
||||
this.packageVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.packageDetail.init()
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
towNumber(val) {
|
||||
return val.toFixed(2)
|
||||
},
|
||||
timefilter(obj) {
|
||||
return timeFormatter(obj).substring(0, timeFormatter(obj).lastIndexOf(' '))
|
||||
},
|
||||
statusfilter(val) {
|
||||
const orderStatus = {
|
||||
'1': '新增',
|
||||
'2': '启动',
|
||||
'3': '暂停',
|
||||
'9': '完成'
|
||||
}
|
||||
return orderStatus?.[val]
|
||||
},
|
||||
getQuantity(actual, scrap) {
|
||||
this.dataForm = Object.assign({}, this.dataForm, { actualQuantity: actual, scrapQuantity: scrap })
|
||||
// this.$set(this.dataForm, 'actualQuantity', actualQuantity)
|
||||
// this.$set(this.dataForm, 'scrapQuantity', scrapQuantity)
|
||||
},
|
||||
stringfilter(objString) {
|
||||
return objString || ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
font-size: 20px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
33
src/views/orderManage/order/components/orderDetailBtn.vue
Normal file
33
src/views/orderManage/order/components/orderDetailBtn.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:45:49
|
||||
* @FilePath:
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.orderManage.order.detail') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
this.$router.push({
|
||||
name: 'orderDetail',
|
||||
query: {
|
||||
id: this.injectData.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
133
src/views/orderManage/order/components/orderInfo.vue
Normal file
133
src/views/orderManage/order/components/orderInfo.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-30 11:22:36
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
label: i18n.t('module.orderManage.order.executionTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'code',
|
||||
// label: i18n.t('module.orderManage.order.WorkOrderCode'),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'actualQuantity',
|
||||
label: i18n.t('module.orderManage.order.completQuantity'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'finishProduceTime',
|
||||
label: i18n.t('module.orderManage.order.finishTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.orderManage.order.Remarks'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
orderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 500,
|
||||
orderId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery.orderId = this.orderId
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
workOrderList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
let actualQuantity = 0
|
||||
let scrapQuantity = 0
|
||||
this.list.forEach(item => {
|
||||
actualQuantity += item.actualQuantity
|
||||
scrapQuantity += item.scrapQuantity
|
||||
})
|
||||
this.$emit('getQuantity', actualQuantity, scrapQuantity)
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
134
src/views/orderManage/order/components/orderIssue-add.vue
Normal file
134
src/views/orderManage/order/components/orderIssue-add.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 18:39:26
|
||||
* @enName:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'routerTitle.order.orderManage.orderIssue' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<div style="font-size:20px;margin:0 0 18px 10% ;color:#1890FF;">{{ $t('module.orderManage.orderDetail.remainingPlannedQuantity')+':'+remainingPlannedQuantity }}</div>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="110px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderCode')" prop="workOrderNo">
|
||||
<el-input v-model="dataForm.workOrderNo" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderCode')])" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.PlannedProcessingVolume')" prop="planQuantity">
|
||||
<el-input-number v-model="dataForm.planQuantity" :max="remainingPlannedQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlannedProcessingVolume')])" :step="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.priority')" prop="priority">
|
||||
<el-select v-model="dataForm.priority" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.priority')])" clearable>
|
||||
<el-option
|
||||
v-for="item in priorityArr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.Remarks')" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.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 { workOrderAdd, workOrderCode } from '@/api/orderManage/workOrder/workOrder'
|
||||
export default {
|
||||
props: {
|
||||
orderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
name: '',
|
||||
orderId: '',
|
||||
workOrderNo: '',
|
||||
priority: 2,
|
||||
planQuantity: '',
|
||||
remark: ''
|
||||
},
|
||||
priorityArr: [
|
||||
{
|
||||
label: '低',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '正常',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
label: '高',
|
||||
value: 3
|
||||
}
|
||||
],
|
||||
remainingPlannedQuantity: 0,
|
||||
dataRule: {
|
||||
name: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]), trigger: 'blur' }
|
||||
],
|
||||
workOrderNo: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderCode')]), trigger: 'blur' }
|
||||
],
|
||||
planQuantity: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.PlannedProcessingVolume')]), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(remainingPlannedQuantity) {
|
||||
this.remainingPlannedQuantity = remainingPlannedQuantity
|
||||
this.visible = true
|
||||
this.dataForm.orderId = this.orderId
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
workOrderCode().then(res => {
|
||||
this.dataForm.workOrderNo = res.data
|
||||
})
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.dataForm.planQuantity > 0) {
|
||||
workOrderAdd(this.dataForm).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '计划加工量不能小于1',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
241
src/views/orderManage/order/components/orderIssue.vue
Normal file
241
src/views/orderManage/order/components/orderIssue.vue
Normal file
@@ -0,0 +1,241 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-23 11:05:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-06-22 16:29:19
|
||||
* @Description: 工单监控
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="margin-right:50px" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
<span><b>{{ $t('module.orderManage.order.OrderCode')+':'+stringfilter(dataForm.orderNo) }}</b></span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.OrderName')+':'+stringfilter(dataForm.name) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.process')+':'+stringfilter(dataForm.processFlowName) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.customer')+':'+stringfilter(dataForm.customerName) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ActualTargetQuantity')+':'+stringfilter(dataForm.planQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.orderDetail.issuedQuantity')+':'+stringfilter(issuedQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.orderDetail.remainingPlannedQuantity')+':'+stringfilter(remainingPlannedQuantity) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-col :span="6"><div>{{ $t('module.orderManage.orderDetail.issueTime')+':'+timefilter(dataForm.startProduceTime) }}</div></el-col> -->
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.DeliveryTime')+':'+timefilter(dataForm.deliveryTime) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button type="primary" :disabled="remainingPlannedQuantity<1" :order-id="orderId" @click="issueClick()"> {{ 'routerTitle.order.orderManage.orderIssue' | i18nFilter }} </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<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()"
|
||||
/>
|
||||
<orderIssue-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="orderId" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderDetail } from '@/api/orderManage/order/order'
|
||||
import { workOrderList, workOrderDelete } from '@/api/orderManage/workOrder/workOrder'
|
||||
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 orderIssueAdd from './orderIssue-add'
|
||||
import { timeFormatter } from '@/filters'
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNo',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'planQuantity',
|
||||
label: i18n.t('module.orderManage.order.PlannedProcessingVolume'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.orderManage.order.Remarks'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
name: '',
|
||||
components: { Pagination, BaseTable, MethodBtn, orderIssueAdd },
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
addOrUpdateVisible: false,
|
||||
tableProps,
|
||||
tableBtn,
|
||||
list: [],
|
||||
total: 0,
|
||||
trueWidth: 200,
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
orderId: ''
|
||||
},
|
||||
dataForm: {},
|
||||
issuedQuantity: 0,
|
||||
remainingPlannedQuantity: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.orderId = this.$route.query.id
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery.orderId = this.orderId
|
||||
this.issuedQuantity = 0
|
||||
this.dataForm = {}
|
||||
orderDetail(this.orderId).then(res => {
|
||||
this.dataForm = res.data
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
workOrderDelete(raw.data.id).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.issuedQuantity = 0
|
||||
this.remainingPlannedQuantity = this.dataForm.planQuantity
|
||||
workOrderList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
this.list.forEach(item => {
|
||||
this.issuedQuantity += item.planQuantity
|
||||
})
|
||||
this.remainingPlannedQuantity = this.remainingPlannedQuantity - this.issuedQuantity
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
issueClick() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(this.remainingPlannedQuantity)
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
towNumber(val) {
|
||||
return val.toFixed(2)
|
||||
},
|
||||
timefilter(obj) {
|
||||
return timeFormatter(obj).substring(0, timeFormatter(obj).lastIndexOf(' '))
|
||||
},
|
||||
statusfilter(val) {
|
||||
const orderStatus = {
|
||||
'1': '新增',
|
||||
'2': '启动',
|
||||
'3': '暂停',
|
||||
'9': '完成'
|
||||
}
|
||||
return orderStatus?.[val]
|
||||
},
|
||||
stringfilter(objString) {
|
||||
return objString || ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
font-size: 20px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
148
src/views/orderManage/order/components/packageDetail.vue
Normal file
148
src/views/orderManage/order/components/packageDetail.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:33:10
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:append-to-body="true"
|
||||
size="65%"
|
||||
>
|
||||
<div slot="title" style=" background-color:#02BCFF;font-size:1.5em;color:white;padding:5px 20px">{{ 'routerTitle.order.orderManage.packageDetail' | i18nFilter }}</div>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</base-table></el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import detailBtn from '../../components/detailBtn'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.reportingTime')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.order.packageNumber'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'SAP',
|
||||
label: i18n.t('module.orderManage.order.SAPMaterial')
|
||||
},
|
||||
{
|
||||
prop: 'power',
|
||||
label: i18n.t('module.orderManage.order.power')
|
||||
},
|
||||
{
|
||||
prop: 'detail',
|
||||
label: i18n.t('module.orderManage.order.detail'),
|
||||
subcomponent: detailBtn
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { Pagination, BaseTable },
|
||||
props: {
|
||||
orderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'createTime': '2020-12-21 13:44:15',
|
||||
'code': '110',
|
||||
'SAP': ''
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(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
|
||||
// })
|
||||
},
|
||||
goback() {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
120
src/views/orderManage/order/components/reportInfo.vue
Normal file
120
src/views/orderManage/order/components/reportInfo.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-22 14:23:15
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import { reportList } from '@/api/orderManage/order/order'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'reportTime',
|
||||
label: i18n.t('module.orderManage.order.reportingTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'reportType',
|
||||
label: i18n.t('module.orderManage.order.workReportMethod'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderStatus',
|
||||
label: i18n.t('module.orderManage.order.status'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'goodQuantity',
|
||||
label: i18n.t('module.orderManage.order.goodQuantity'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'scrapQuantity',
|
||||
label: i18n.t('module.orderManage.order.scrapQuantity'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
orderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
orderId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery.orderId = this.orderId
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
reportList(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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
139
src/views/orderManage/order/components/scrapDetail.vue
Normal file
139
src/views/orderManage/order/components/scrapDetail.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:33:27
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'routerTitle.order.orderManage.scrapDetail' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
:before-close="goback"
|
||||
:append-to-body="true"
|
||||
width="80%"
|
||||
>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</base-table></el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.initiateTime')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'scrapId',
|
||||
label: i18n.t('module.orderManage.order.scrapId'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'scrapLevel',
|
||||
label: i18n.t('module.orderManage.order.scrapLevel')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { Pagination, BaseTable },
|
||||
props: {
|
||||
orderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'createTime': '2020-12-21 13:44:15',
|
||||
'scrapId': '110',
|
||||
'scrapLevel': ''
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(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
|
||||
// })
|
||||
},
|
||||
goback() {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
237
src/views/orderManage/order/order.vue
Normal file
237
src/views/orderManage/order/order.vue
Normal file
@@ -0,0 +1,237 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:15:49
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.keyword')" prop="name">
|
||||
<el-input v-model="formData.name" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.OrderName')])" style="width:200px" clearable />
|
||||
</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"
|
||||
: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()"
|
||||
/>
|
||||
<order-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderList, orderDelete } from '@/api/orderManage/order/order'
|
||||
import i18n from '@/lang'
|
||||
import orderAdd from './components/order-add'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import orderDetailBtn from './components/orderDetailBtn'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'issue',
|
||||
btnName: 'routerTitle.order.orderManage.orderIssue'
|
||||
},
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.OrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'orderNo',
|
||||
label: i18n.t('module.orderManage.order.OrderCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
label: i18n.t('module.orderManage.order.priority'),
|
||||
align: 'center',
|
||||
filter: basicData('priority')
|
||||
},
|
||||
// {
|
||||
// prop: 'customerName',
|
||||
// label: i18n.t('module.orderManage.order.customer'),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'source',
|
||||
label: i18n.t('module.orderManage.order.source'),
|
||||
align: 'center',
|
||||
filter: basicData('source')
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.orderManage.order.status'),
|
||||
align: 'center',
|
||||
filter: basicData('orderStatus')
|
||||
},
|
||||
{
|
||||
prop: 'planQuantity',
|
||||
label: i18n.t('module.orderManage.order.PlannedProcessingVolume'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'detail',
|
||||
label: i18n.t('module.orderManage.order.detail'),
|
||||
subcomponent: orderDetailBtn,
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable, MethodBtn, orderAdd },
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
trueWidth: 280,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
name: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
if (raw.data.status !== 4) {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
orderDelete(raw.data.id).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.$message({
|
||||
message: this.$t('module.orderManage.order.warnMessage'),
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
} else if (raw.type === 'edit') {
|
||||
this.addNew(raw.data.id)
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: 'orderIssue',
|
||||
query: {
|
||||
id: raw.data.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
orderList(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
|
||||
})
|
||||
},
|
||||
// 新增 / 修改
|
||||
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>
|
||||
183
src/views/orderManage/packingTags.vue
Normal file
183
src/views/orderManage/packingTags.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:39:57
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-06-22 16:25:52
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="margin-right:50px" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
<span><b>{{ $t('module.orderManage.order.WorkOrderCode')+':'+stringfilter(dataForm.workOrderNo) }}</b></span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.WorkOrderName')+':'+stringfilter(dataForm.name) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.status')+':' }}{{ dataForm.status|commonFilter(basicData('workOrderStatus')) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.workOrderDetail.workOrderSource')+':' }}{{ dataForm.triggerOrigin|commonFilter(basicData('source')) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.createTime')+':'+timefilter(dataForm.createTime) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.PlannedProcessingVolume')+':'+stringfilter(dataForm.planQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.workOrderDetail.processingTechnology')+':'+stringfilter(dataForm.processFlowName) }}</div></el-col>
|
||||
<!-- <el-col :span="6"><div>{{ $t('module.orderManage.order.PlanningEndTime')+':'+timefilter(dataForm.planFinishProduceTime) }}</div></el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import { workOrderDetail, packagingList } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import detailBtn from './components/detailBtn'
|
||||
import Pagination from '@/components/Pagination'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'boxNo',
|
||||
label: 'boxID',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'power',
|
||||
label: 'power',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'grade',
|
||||
label: i18n.t('module.orderManage.packingTags.plateGrade'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'printTime',
|
||||
label: i18n.t('module.orderManage.packingTags.PrintingTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'substrateQuantity',
|
||||
label: i18n.t('module.orderManage.packingTags.moduleQuantity'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.orderManage.order.Remarks'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'opration',
|
||||
label: i18n.t('module.orderManage.packingTags.opration'),
|
||||
subcomponent: detailBtn
|
||||
}
|
||||
]
|
||||
export default {
|
||||
name: '',
|
||||
filters: {
|
||||
commonFilter: (source, filterType = a => a) => {
|
||||
return filterType(source)
|
||||
}
|
||||
},
|
||||
components: { BaseTable, Pagination },
|
||||
data() {
|
||||
return {
|
||||
workOrderId: '',
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
dataForm: {},
|
||||
basicData
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.dataForm = {}
|
||||
workOrderDetail(this.workOrderId).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
this.listQuery.workOrderId = this.workOrderId
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
packagingList(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
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
timefilter(obj) {
|
||||
return timeFormatter(obj).substring(0, timeFormatter(obj).lastIndexOf(' '))
|
||||
},
|
||||
stringfilter(objString) {
|
||||
return objString || ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
190
src/views/orderManage/powerClassification.vue
Normal file
190
src/views/orderManage/powerClassification.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-05-28 16:22:44
|
||||
* @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()"
|
||||
/>
|
||||
<powerClassification-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { powerClassificationList, powerClassificationDelete } from '@/api/orderManage/powerClassification'
|
||||
import powerClassificationAdd from './components/powerClassification-add.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 i18n from '@/lang'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'parentName',
|
||||
label: i18n.t('module.orderManage.powerClassification.parentClass'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.powerClassification.typeName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.powerClassification.typeCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.orderManage.powerClassification.Remarks'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'PowerClassification',
|
||||
components: { Pagination, BaseTable, MethodBtn, HeadForm, powerClassificationAdd },
|
||||
filters: {
|
||||
statusFilter(status) {
|
||||
const statusMap = {
|
||||
published: 'success',
|
||||
draft: 'info',
|
||||
deleted: 'danger'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyName: i18n.t('module.basicData.visual.keyword'),
|
||||
placeholderName: this.$t('module.orderManage.powerClassification.typeName'),
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
code: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
powerClassificationDelete(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) {
|
||||
this.listLoading = true
|
||||
this.listQuery.name = key
|
||||
this.listQuery.code = key
|
||||
powerClassificationList(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>
|
||||
196
src/views/orderManage/substrateBatch.vue
Normal file
196
src/views/orderManage/substrateBatch.vue
Normal file
@@ -0,0 +1,196 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-21 16:55:18
|
||||
* @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()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import i18n from '@/lang'
|
||||
import { substrateBatchList, substrateBatchDelete } from '@/api/orderManage/substrateBatch'
|
||||
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'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
},
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: 'btn.detail'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.basicData.factory.createTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.substrateBatch.batchName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.substrateBatch.batchCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t('module.basicData.visual.Remarks'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'SubstrateBatch',
|
||||
components: { Pagination, BaseTable, MethodBtn, HeadForm },
|
||||
filters: {
|
||||
statusFilter(status) {
|
||||
const statusMap = {
|
||||
published: 'success',
|
||||
draft: 'info',
|
||||
deleted: 'danger'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyName: i18n.t('module.basicData.visual.keyword'),
|
||||
placeholderName: this.$t('module.orderManage.substrateBatch.batchCode'),
|
||||
tableBtn,
|
||||
trueWidth: 240,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
console.log(raw)
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
substrateBatchDelete(raw.data.id).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else if (raw.type === 'edit') {
|
||||
this.addNew(raw.data.id)
|
||||
} else {
|
||||
this.addNew(raw.data.id, true)
|
||||
}
|
||||
},
|
||||
getList(key) {
|
||||
this.listLoading = true
|
||||
this.listQuery.name = key
|
||||
this.listQuery.code = key
|
||||
substrateBatchList(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, isdetail) {
|
||||
this.$router.push({
|
||||
name: 'substrateBatchAttr',
|
||||
query: {
|
||||
id: id,
|
||||
isdetail: isdetail
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
142
src/views/orderManage/visualization.vue
Normal file
142
src/views/orderManage/visualization.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-07-23 09:33:49
|
||||
* @LastEditTime: 2021-07-23 10:40:57
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \mt-bus-fe\src\views\orderManage\visualization.vue
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col>
|
||||
<div>
|
||||
<echarts-bar-a
|
||||
id="bar1"
|
||||
ref="BarRef"
|
||||
:bar-style="barStyle"
|
||||
:title="barTitle"
|
||||
:legend="legend"
|
||||
:x-axis="xAxis"
|
||||
:y-axis="yAxis"
|
||||
:series="series"
|
||||
@refreshDataList="getList"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<div>
|
||||
<echarts-bar-b
|
||||
id="bar2"
|
||||
ref="BarRef"
|
||||
:bar-style="barStyle"
|
||||
:title="barTitle1"
|
||||
:legend="legend1"
|
||||
:x-axis="xAxis1"
|
||||
:y-axis="yAxis1"
|
||||
:series="series1"
|
||||
@refreshDataList="getList"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echartsBarA from './components/echarts-Bar.vue'
|
||||
import echartsBarB from './components/echarts-Bar.vue'
|
||||
export default {
|
||||
components: {
|
||||
echartsBarA,
|
||||
echartsBarB
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeIndex: '1',
|
||||
// 假数据
|
||||
barStyle: {
|
||||
height: '500px',
|
||||
width: '100%',
|
||||
margin: '20px'
|
||||
},
|
||||
barTitle: {
|
||||
text: 'Erp To Mes物料柱状图'
|
||||
},
|
||||
legend: {
|
||||
data: []
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['q', '1'],
|
||||
name: '物料编码',
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
formatter: function(value) {
|
||||
return value.split('').join('\n')
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '数量'
|
||||
},
|
||||
series: [{
|
||||
data: [1, 1],
|
||||
type: 'scatter',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(220, 220, 220, 0.8)'
|
||||
}
|
||||
}],
|
||||
barTitle1: {
|
||||
text: 'Erp To Mes订单柱状图'
|
||||
},
|
||||
legend1: {
|
||||
data: []
|
||||
},
|
||||
xAxis1: {
|
||||
type: 'category',
|
||||
data: ['1', '2'],
|
||||
name: '订单名称',
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
formatter: function(value) {
|
||||
return value.split('').join('\n')
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis1: {
|
||||
type: 'value',
|
||||
name: '数量'
|
||||
},
|
||||
series1: [{
|
||||
data: [1, 1],
|
||||
type: 'scatter',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(220, 220, 220, 0.8)'
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
if (this.formData.timeSlot) {
|
||||
this.formData.startTime = this.formData.timeSlot[0]
|
||||
this.formData.endTime = this.formData.timeSlot[1]
|
||||
} else {
|
||||
this.formData.startTime = ''
|
||||
this.formData.endTime = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
68
src/views/orderManage/workOrder/components/monitor-chart.vue
Normal file
68
src/views/orderManage/workOrder/components/monitor-chart.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-03-03 16:39:34
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-04 10:10:45
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div id="monitorChart" :style="{width: '700px', height: '500px'}" style="margin-left:10%" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.chart = echarts.init(document.getElementById('monitorChart'))
|
||||
|
||||
this.chart.setOption({
|
||||
color: '#91cc75',
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['设备1', '设备2', '设备3', '设备4', '设备5', '设备6', '设备7']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
name: '电量消耗',
|
||||
data: [323.234, 323.841, 755.45, 251.453, 454.786, 484.786, 154.786],
|
||||
barWidth: '60%',
|
||||
type: 'bar'
|
||||
}]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
134
src/views/orderManage/workOrder/components/monitor-table.vue
Normal file
134
src/views/orderManage/workOrder/components/monitor-table.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 17:48:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'consume',
|
||||
label: i18n.t('module.orderManage.order.PowerConsumption'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '设备1',
|
||||
'consume': '323,234'
|
||||
},
|
||||
{
|
||||
'name': '设备2',
|
||||
'consume': '323.841'
|
||||
},
|
||||
{
|
||||
'name': '设备3',
|
||||
'consume': '755.45'
|
||||
},
|
||||
{
|
||||
'name': '设备4',
|
||||
'consume': '251.453'
|
||||
},
|
||||
{
|
||||
'name': '设备5',
|
||||
'consume': '454.786'
|
||||
},
|
||||
{
|
||||
'name': '设备6',
|
||||
'consume': '484.786'
|
||||
},
|
||||
{
|
||||
'name': '设备7',
|
||||
'consume': '154.786'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
100
src/views/orderManage/workOrder/components/verify-craft.vue
Normal file
100
src/views/orderManage/workOrder/components/verify-craft.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:49:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:22:29
|
||||
* @Description: 工单验证
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div class="text item">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData22') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData23') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData24') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData25') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData26') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData5') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData27') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData23') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData524') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData25') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData28') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData29') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 80%;
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title{
|
||||
font-size: 40px;
|
||||
color: #1588F5;
|
||||
}
|
||||
</style>
|
||||
138
src/views/orderManage/workOrder/components/verify-equipment.vue
Normal file
138
src/views/orderManage/workOrder/components/verify-equipment.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:17:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.VerifyTable.EquipmentCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'abbr',
|
||||
label: i18n.t('module.orderManage.VerifyTable.equipmentAbbreviation')
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.orderManage.order.status')
|
||||
},
|
||||
{
|
||||
prop: 'formula',
|
||||
label: i18n.t('module.orderManage.VerifyTable.EquipmentFormula')
|
||||
},
|
||||
{
|
||||
prop: 'formula1',
|
||||
label: i18n.t('module.orderManage.VerifyTable.ProcessFormulaRequir')
|
||||
},
|
||||
{
|
||||
prop: 'same',
|
||||
label: i18n.t('module.orderManage.VerifyTable.IsSame')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '承压机',
|
||||
'code': 'SB001',
|
||||
'abbr': 'CYS',
|
||||
'status': '运行正常'
|
||||
},
|
||||
{
|
||||
'name': '传输线',
|
||||
'code': 'SB002',
|
||||
'abbr': 'TTS',
|
||||
'status': '报警'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
139
src/views/orderManage/workOrder/components/verify-group.vue
Normal file
139
src/views/orderManage/workOrder/components/verify-group.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:34:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.VerifyTable.teamName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'leader',
|
||||
label: i18n.t('module.orderManage.VerifyTable.teamLeader'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: i18n.t('module.orderManage.VerifyTable.number')
|
||||
},
|
||||
{
|
||||
prop: 'major',
|
||||
label: i18n.t('module.orderManage.VerifyTable.professional')
|
||||
},
|
||||
{
|
||||
prop: 'wtime',
|
||||
label: i18n.t('module.orderManage.VerifyTable.workingHours')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '班组1',
|
||||
'leader': '张三',
|
||||
'num': '21',
|
||||
'major': '电工,维修工,计划员,仓管员',
|
||||
'wtime': '2020-11-26 19:12:37'
|
||||
},
|
||||
{
|
||||
'name': '班组2',
|
||||
'leader': '卫升',
|
||||
'num': '12',
|
||||
'major': '电工,维修工,仓管员',
|
||||
'wtime': '2020-11-11 06:12:57'
|
||||
},
|
||||
{
|
||||
'name': '班组3',
|
||||
'leader': '李渊',
|
||||
'num': '32',
|
||||
'major': '会计,审核员',
|
||||
'wtime': '2020-11-05 12:10:17'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
115
src/views/orderManage/workOrder/components/verify-materiel.vue
Normal file
115
src/views/orderManage/workOrder/components/verify-materiel.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:25:55
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.VerifyTable.materielName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.VerifyTable.materielCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'spec',
|
||||
label: i18n.t('module.orderManage.VerifyTable.Spec')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '001油漆',
|
||||
'code': 'YQ-110',
|
||||
'spec': '30D * 11B'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
99
src/views/orderManage/workOrder/components/verify-plate.vue
Normal file
99
src/views/orderManage/workOrder/components/verify-plate.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:49:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-03 16:28:15
|
||||
* @Description: 工单验证
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div class="text item">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData31') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData32') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData33') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData34') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData38') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData35') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData33') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData36') }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData37') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 80%;
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title{
|
||||
font-size: 40px;
|
||||
color: #1588F5;
|
||||
}
|
||||
</style>
|
||||
269
src/views/orderManage/workOrder/components/workOrder-add.vue
Normal file
269
src/views/orderManage/workOrder/components/workOrder-add.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-26 15:32:13
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:33:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
@open="onOpen"
|
||||
@close="onClose"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
size="medium"
|
||||
label-width="96px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderCode')" prop="workOrderNo">
|
||||
<el-input v-model="dataForm.workOrderNo" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderCode')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderType')" prop="gtype">
|
||||
<el-select v-model="dataForm.gtype" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderType')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in gtypeOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlannedProcessingVolume')" prop="planQuantity">
|
||||
<el-input-number v-model="dataForm.planQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlannedProcessingVolume')])" :step="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.unit')" prop="unit">
|
||||
<el-input v-model="dataForm.unit" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.unit')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.priority')" prop="priority">
|
||||
<el-select v-model="dataForm.priority" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.priority')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in youxianjiOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductProcess')" prop="gongyi">
|
||||
<el-select v-model="dataForm.gongyi" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductProcess')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in gongyiOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlanningStartTime')" prop="planStartProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planStartProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlanningStartTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlanningEndTime')" prop="planFinishProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planFinishProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlanningEndTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductName')" prop="chanpinname">
|
||||
<el-select v-model="dataForm.chanpinname" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductName')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in chanpinnameOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.Remarks')" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.Remarks')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.Description')" prop="description">
|
||||
<el-input v-model="dataForm.description" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.Description')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<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 { workOrderDetail, workOrderUpdate, workOrderAdd, workOrderCode } from '@/api/orderManage/workOrder/workOrder'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
inheritAttrs: false,
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: '',
|
||||
workOrderNo: '',
|
||||
gtype: '',
|
||||
planQuantity: '',
|
||||
unit: '',
|
||||
priority: '',
|
||||
gongyi: '',
|
||||
planStartProduceTime: '',
|
||||
planFinishProduceTime: '',
|
||||
chanpinname: '',
|
||||
remark: '',
|
||||
description: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'blur'
|
||||
}]
|
||||
},
|
||||
gtypeOptions: [{
|
||||
'label': '测试工单',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '重工工单',
|
||||
'value': 2
|
||||
}, {
|
||||
'label': '正常工单',
|
||||
'value': 0
|
||||
}],
|
||||
youxianjiOptions: [{
|
||||
'label': '正常',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '高',
|
||||
'value': 2
|
||||
}, {
|
||||
'label': '低',
|
||||
'value': 0
|
||||
}],
|
||||
gongyiOptions: [{
|
||||
'label': '工艺1',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '工艺2',
|
||||
'value': 2
|
||||
}],
|
||||
chanpinnameOptions: [{
|
||||
'label': '产品1',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '产品2',
|
||||
'value': 2
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
workOrderDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
} else {
|
||||
workOrderCode().then(res => {
|
||||
this.dataForm.workOrderNo = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen() {},
|
||||
onClose() {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = this.dataForm
|
||||
if (this.dataForm.id) {
|
||||
workOrderUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
workOrderAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-04-15 14:00:51
|
||||
* @enName:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'routerTitle.order.workOrderManage.closeworkorder' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="110px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.orderManage.order.CompletionTime')" prop="finishProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.finishProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
:style="{width: '50%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.CompletionTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.ActualFinishedProduct')" prop="actualQuantity">
|
||||
<el-input-number v-model="dataForm.actualQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ActualFinishedProduct')])" :step="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.DamageQuantityPlate')" prop="scrapQuantity">
|
||||
<el-input-number v-model="dataForm.scrapQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.DamageQuantityPlate')])" :step="1" />
|
||||
</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 { workOrderUpdate } from '@/api/orderManage/workOrder/workOrder'
|
||||
export default {
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
finishProduceTime: '',
|
||||
actualQuantity: '',
|
||||
scrapQuantity: ''
|
||||
},
|
||||
closeData: {},
|
||||
dataRule: {
|
||||
finishProduceTime: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.CompletionTime')]), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(dataForm) {
|
||||
this.visible = true
|
||||
this.closeData = dataForm
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.closeData.status = 9
|
||||
this.closeData.finishProduceTime = this.dataForm.finishProduceTime
|
||||
this.closeData.actualQuantity = this.dataForm.actualQuantity
|
||||
this.closeData.scrapQuantity = this.dataForm.scrapQuantity
|
||||
workOrderUpdate(this.closeData).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
207
src/views/orderManage/workOrder/components/workOrder-issue.vue
Normal file
207
src/views/orderManage/workOrder/components/workOrder-issue.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:34:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'routerTitle.order.workOrderManage.issueworkorder' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
:before-close="goback"
|
||||
:append-to-body="true"
|
||||
width="80%"
|
||||
>
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.destination')" prop="syncTarget">
|
||||
<el-select v-model="formData.syncTarget" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.destination')])" clearable>
|
||||
<el-option
|
||||
v-for="item in issueDestination"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="issueworkorder()"> {{ 'routerTitle.order.workOrderManage.issueworkorder' | i18nFilter }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderIssueList, syncAdd } from '@/api/orderManage/workOrder/workOrder'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.initiateTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'syncTarget',
|
||||
label: i18n.t('module.orderManage.order.destination'),
|
||||
align: 'center',
|
||||
filter: basicData('source')
|
||||
},
|
||||
{
|
||||
prop: 'syncStatus',
|
||||
label: i18n.t('module.orderManage.order.status'),
|
||||
align: 'center',
|
||||
filter: basicData('workStatus')
|
||||
},
|
||||
{
|
||||
prop: 'reason',
|
||||
label: i18n.t('module.orderManage.order.reason'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { Pagination, BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
syncTarget: ''
|
||||
},
|
||||
issueDestination: [
|
||||
{
|
||||
label: '00A',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
label: 'PID1',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
label: '00C',
|
||||
value: 5
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
workOrderId: ''
|
||||
},
|
||||
rules: {
|
||||
syncTarget: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.destination')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.visible = true
|
||||
this.listQuery.workOrderId = this.workOrderId
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
workOrderIssueList(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
|
||||
})
|
||||
},
|
||||
issueworkorder() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
'wordOrderId': this.workOrderId,
|
||||
'syncTarget': this.formData.syncTarget
|
||||
}
|
||||
syncAdd(data).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
33
src/views/orderManage/workOrder/components/workOrderBtn.vue
Normal file
33
src/views/orderManage/workOrder/components/workOrderBtn.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-12 10:01:59
|
||||
* @FilePath:
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.orderManage.order.workOrderDetail') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
this.$router.push({
|
||||
name: 'workOrderOperation',
|
||||
query: {
|
||||
id: this.injectData.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
134
src/views/orderManage/workOrder/components/workOrderMonitor.vue
Normal file
134
src/views/orderManage/workOrder/components/workOrderMonitor.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-23 11:05:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 17:45:45
|
||||
* @Description: 工单监控
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.order.WorkOrderProgress') }}</b></span>
|
||||
<el-button style="float: right;" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData2') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData3') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData5') }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData6') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData8') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData9') }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="width:50%">
|
||||
<el-progress :text-inside="true" :stroke-width="26" :percentage="78" />
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.order.energyConsumption') }}</b></span>
|
||||
</div>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="1">{{ $t('module.orderManage.order.energyConsumptionChart') }}</el-menu-item>
|
||||
<el-menu-item index="2">{{ $t('module.orderManage.order.energyConsumptionTable') }}</el-menu-item>
|
||||
</el-menu>
|
||||
</el-card>
|
||||
<monitor-chart v-if="chartVisible" ref="monitorChart" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<monitor-table v-if="tableVisible" ref="monitorTable" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import monitorChart from './monitor-chart'
|
||||
import monitorTable from './monitor-table'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { monitorChart, monitorTable },
|
||||
data() {
|
||||
return {
|
||||
chartVisible: false,
|
||||
tableVisible: false,
|
||||
workOrderId: '',
|
||||
activeIndex: '1'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.handleSelect('1')
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
handleSelect(key, keyPath) {
|
||||
this.chartVisible = false
|
||||
this.tableVisible = false
|
||||
switch (key) {
|
||||
case '1':
|
||||
this.chartVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.monitorChart.init()
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
this.tableVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.monitorTable.init()
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 70%;
|
||||
font-size: 20px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,186 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:39:57
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-07-20 14:56:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="margin-right:50px" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
<span><b>{{ $t('module.orderManage.order.WorkOrderCode')+':'+stringfilter(dataForm.workOrderNo) }}</b></span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.WorkOrderName')+':'+stringfilter(dataForm.name) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.status')+':' }}{{ dataForm.status|commonFilter(basicData('workOrderStatus')) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.workOrderDetail.workOrderSource')+':' }}{{ dataForm.triggerOrigin|commonFilter(basicData('source')) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.createTime')+':'+timefilter(dataForm.createTime) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.PlannedProcessingVolume')+':'+stringfilter(dataForm.planQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.workOrderDetail.processingTechnology')+':'+stringfilter(dataForm.processFlowName) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.StartTime')+':'+timefilter(dataForm.startProduceTime) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.EndTime')+':'+timefilter(dataForm.finishProduceTime) }}</div></el-col>
|
||||
<!-- <el-col :span="6"><div>{{ $t('module.orderManage.order.PlanningEndTime')+':'+timefilter(dataForm.planFinishProduceTime) }}</div></el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ActualFinishedProduct')+':'+stringfilter(dataForm.actualQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.NumberOfDamages')+':'+stringfilter(dataForm.scrapQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ProductName')+':'+stringfilter(dataForm.productName) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.priority')+':' }}{{ dataForm.priority | commonFilter(basicData('priority')) }}</div></el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.initiateTime')+':'+timefilter(dataForm.startProduceTime) }}</div></el-col>
|
||||
</el-row> -->
|
||||
</div>
|
||||
<el-card class="box-card" style="margin-top:40px">
|
||||
<el-row type="flex" justify="space-around" style="margin:0">
|
||||
<el-col v-if="dataForm.status !==3 && dataForm.status !==9" :span="4.8"><div><el-button type="primary" @click="issueClick()"> {{ 'routerTitle.order.workOrderManage.issueworkorder' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col v-if="dataForm.status !==3 && dataForm.status !==9" :span="4.8"><div><el-button type="primary" @click="activation()"> {{ $t('module.orderManage.order.activation') }} </el-button></div></el-col>
|
||||
<el-col :span="4.8"><div><el-button :disabled="dataForm.status===9" type="primary" @click="closeClick()"> {{ 'routerTitle.order.workOrderManage.closeworkorder' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col :span="4.8"><div><el-button type="primary" @click="tagsClick()"> {{ 'routerTitle.order.workOrderManage.viewpackingTags' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col v-if="false" :span="4.8"><div><el-button type="primary" @click="verifyClick()"> {{ 'routerTitle.order.workOrderManage.workOrderVerify' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col v-if="false" :span="4.8"><div><el-button type="primary" @click="monitorClick()"> {{ 'routerTitle.order.workOrderManage.workOrderMonitor' | i18nFilter }} </el-button></div></el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-card>
|
||||
<workOrder-close v-if="closeVisible" ref="closeWorkOrder" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<workOrder-issue v-if="issueVisible" ref="issueWorkOrder" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import workOrderClose from './workOrder-close'
|
||||
import workOrderIssue from './workOrder-issue'
|
||||
import { workOrderDetail, updateForStatus } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
filters: {
|
||||
commonFilter: (source, filterType = a => a) => {
|
||||
return filterType(source)
|
||||
}
|
||||
},
|
||||
components: { workOrderClose, workOrderIssue },
|
||||
data() {
|
||||
return {
|
||||
closeVisible: false,
|
||||
issueVisible: false,
|
||||
workOrderId: '',
|
||||
dataForm: {},
|
||||
basicData
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.dataForm = {}
|
||||
workOrderDetail(this.workOrderId).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
},
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
activation() {
|
||||
const data = {}
|
||||
data.status = '3'
|
||||
data.id = this.workOrderId
|
||||
updateForStatus(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
})
|
||||
},
|
||||
closeClick() {
|
||||
this.closeVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.closeWorkOrder.init(this.dataForm)
|
||||
})
|
||||
},
|
||||
issueClick() {
|
||||
this.issueVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.issueWorkOrder.init()
|
||||
})
|
||||
},
|
||||
tagsClick() {
|
||||
this.$router.push({
|
||||
name: 'packingTags',
|
||||
query: {
|
||||
id: this.workOrderId
|
||||
}
|
||||
})
|
||||
},
|
||||
verifyClick() {
|
||||
this.$router.push({
|
||||
name: 'workOrderVerify',
|
||||
query: {
|
||||
id: this.workOrderId
|
||||
}
|
||||
})
|
||||
},
|
||||
monitorClick() {
|
||||
this.$router.push({
|
||||
name: 'workOrderMonitor',
|
||||
query: {
|
||||
id: this.workOrderId
|
||||
}
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
timefilter(obj) {
|
||||
return timeFormatter(obj).substring(0, timeFormatter(obj).lastIndexOf(' '))
|
||||
},
|
||||
stringfilter(objString) {
|
||||
return objString || ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
163
src/views/orderManage/workOrder/components/workOrderVerify.vue
Normal file
163
src/views/orderManage/workOrder/components/workOrderVerify.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:49:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 17:58:53
|
||||
* @Description: 工单验证
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.FalseData.FalseData1') }}</b></span>
|
||||
<el-button style="float: right;" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData2') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData3') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData5') }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData6') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData8') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData9') }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.order.workOrderVerificationResult') }}</b></span>
|
||||
</div>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="1">{{ $t('module.orderManage.order.deviceDetection') }}</el-menu-item>
|
||||
<el-menu-item index="2">{{ $t('module.orderManage.order.process') }}</el-menu-item>
|
||||
<el-menu-item index="3">{{ $t('module.orderManage.order.useMaterial') }}</el-menu-item>
|
||||
<el-menu-item index="4">{{ $t('module.orderManage.order.basePlate') }}</el-menu-item>
|
||||
<el-menu-item index="5">{{ $t('module.orderManage.order.team') }}</el-menu-item>
|
||||
</el-menu>
|
||||
</el-card>
|
||||
<verify-equipment v-if="equipmentVisible" ref="verifyEquipment" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-craft v-if="craftVisible" ref="verifyCraft" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-group v-if="groupVisible" ref="verifyGroup" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-materiel v-if="materielVisible" ref="verifyMateriel" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-plate v-if="plateVisible" ref="verifyPlate" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import verifyEquipment from './verify-equipment'
|
||||
import verifyCraft from './verify-craft'
|
||||
import verifyGroup from './verify-group'
|
||||
import verifyMateriel from './verify-materiel'
|
||||
import verifyPlate from './verify-plate'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { verifyEquipment, verifyCraft, verifyGroup, verifyMateriel, verifyPlate },
|
||||
data() {
|
||||
return {
|
||||
equipmentVisible: false,
|
||||
craftVisible: false,
|
||||
groupVisible: false,
|
||||
materielVisible: false,
|
||||
plateVisible: false,
|
||||
workOrderId: '',
|
||||
activeIndex: '1'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.handleSelect('1')
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
handleSelect(key, keyPath) {
|
||||
this.equipmentVisible = false
|
||||
this.craftVisible = false
|
||||
this.groupVisible = false
|
||||
this.materielVisible = false
|
||||
this.plateVisible = false
|
||||
switch (key) {
|
||||
case '1':
|
||||
this.equipmentVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyEquipment.init()
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
this.craftVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyCraft.init()
|
||||
})
|
||||
break
|
||||
case '3':
|
||||
this.materielVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyMateriel.init()
|
||||
})
|
||||
break
|
||||
case '4':
|
||||
this.plateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyPlate.init()
|
||||
})
|
||||
break
|
||||
case '5':
|
||||
this.groupVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyGroup.init()
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 80%;
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
269
src/views/orderManage/workOrder/workOrder.vue
Normal file
269
src/views/orderManage/workOrder/workOrder.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:13:58
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="130px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.keyword')" prop="key">
|
||||
<el-input v-model="formData.key" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.NameOrCode')])" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.ActualStartTime')" prop="time">
|
||||
<el-date-picker
|
||||
v-model="formData.timeSlot"
|
||||
type="daterange"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:start-placeholder="$t('module.orderManage.order.StartTime')"
|
||||
:end-placeholder="$t('module.orderManage.order.StartTime')"
|
||||
:range-separator="$t('module.orderManage.order.To')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
|
||||
<el-button v-if="false" type="primary" @click="addNew()"> {{ 'btn.add' | i18nFilter }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
>
|
||||
<method-btn
|
||||
v-if="false"
|
||||
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()"
|
||||
/>
|
||||
<workOrder-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList, workOrderDelete } from '@/api/orderManage/workOrder/workOrder'
|
||||
import i18n from '@/lang'
|
||||
import workOrderAdd from './components/workOrder-add'
|
||||
import workOrderBtn from './components/workOrderBtn'
|
||||
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 basicData from '@/filters/basicData'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderName'),
|
||||
align: 'center',
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNo',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderCode'),
|
||||
align: 'center',
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: i18n.t('module.orderManage.order.OrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
label: i18n.t('module.orderManage.order.ActualStartTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
label: i18n.t('module.orderManage.order.priority'),
|
||||
align: 'center',
|
||||
filter: basicData('priority')
|
||||
},
|
||||
// {
|
||||
// prop: 'planStartProduceTime',
|
||||
// label: i18n.t('module.orderManage.order.WorkOrderInitiation'),
|
||||
// align: 'center',
|
||||
// filter: timeFormatter
|
||||
// },
|
||||
{
|
||||
prop: 'triggerOrigin',
|
||||
label: i18n.t('module.orderManage.order.source'),
|
||||
align: 'center',
|
||||
filter: basicData('source')
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.orderManage.order.status'),
|
||||
align: 'center',
|
||||
filter: basicData('workOrderStatus')
|
||||
},
|
||||
{
|
||||
prop: 'planQuantity',
|
||||
label: i18n.t('module.orderManage.order.PlannedProcessingVolume'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'actualQuantity',
|
||||
label: i18n.t('module.orderManage.order.ActualFinishedProduct'),
|
||||
align: 'center',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
prop: 'scrapQuantity',
|
||||
label: i18n.t('module.orderManage.order.NumberOfDamages'),
|
||||
align: 'center',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
prop: 'workOrder',
|
||||
label: i18n.t('module.orderManage.order.workOrderDetail'),
|
||||
subcomponent: workOrderBtn,
|
||||
align: 'center',
|
||||
width: '150px'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable, MethodBtn, workOrderAdd },
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
timeSlot: [],
|
||||
key: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
workOrderDelete(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() {
|
||||
this.listLoading = true
|
||||
if (this.formData.timeSlot) {
|
||||
this.formData.startTime = this.formData.timeSlot[0]
|
||||
this.formData.endTime = this.formData.timeSlot[1]
|
||||
} else {
|
||||
this.formData.startTime = ''
|
||||
this.formData.endTime = ''
|
||||
}
|
||||
this.formData.name = this.formData.key
|
||||
this.formData.workOrderNo = this.formData.key
|
||||
workOrderList(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
|
||||
})
|
||||
},
|
||||
// 新增 / 修改
|
||||
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>
|
||||
Reference in New Issue
Block a user