4 changed files with 747 additions and 22 deletions
-
5src/api/test/testSoRouting.js
-
68src/views/modules/test/requestForTest.vue
-
9src/views/modules/test/testSoBom/testTable.vue
-
687src/views/modules/test/testSoRouting/testRoutingTable.vue
@ -0,0 +1,5 @@ |
|||||
|
import {createAPI} from "../../utils/httpRequest"; |
||||
|
export const selectTestSoRoutingList = (data) => createAPI(`/test/soRouting/list`,'post',data) |
||||
|
export const saveTestSoRouting = (data) => createAPI(`/test/soRouting/save`,'post',data) |
||||
|
export const updateTestSoRouting = (data) => createAPI(`/test/soRouting/update`,'post',data) |
||||
|
export const removeBatchTestSoRouting = (data) => createAPI(`/test/soRouting/remove`,'post',data) |
||||
@ -0,0 +1,687 @@ |
|||||
|
<script> |
||||
|
import { |
||||
|
removeBatchTestSoRouting, |
||||
|
saveTestSoRouting, |
||||
|
selectTestSoRoutingList, |
||||
|
updateTestSoRouting |
||||
|
} from "../../../../api/test/testSoRouting"; |
||||
|
import {searchWorkCenter} from "../../../../api/part/workCenter"; |
||||
|
|
||||
|
export default { |
||||
|
name:"testRoutingTable", |
||||
|
props:{ |
||||
|
dataList:{ |
||||
|
type: Array, |
||||
|
default:()=>[] |
||||
|
}, |
||||
|
testNo:{ |
||||
|
type: String, |
||||
|
request: true |
||||
|
}, |
||||
|
columnList:{ |
||||
|
type: Array, |
||||
|
default: ()=>[], |
||||
|
}, |
||||
|
height:{ |
||||
|
type:Number, |
||||
|
default:300 |
||||
|
} |
||||
|
}, |
||||
|
model:{ |
||||
|
prop:"dataList", |
||||
|
event:"change", |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
workCenter:{ |
||||
|
workCenterNo:undefined, |
||||
|
workCenterDesc:undefined, |
||||
|
workCenterType:undefined, |
||||
|
}, |
||||
|
workCenterList:[], |
||||
|
workCenterDialogFlag:false, |
||||
|
saveStatus:true, |
||||
|
saveFlag:false, |
||||
|
testSoRoutingLabel:{ |
||||
|
itemNo:"工序号", |
||||
|
workCenterNo:"加工中心", |
||||
|
workCenterDesc:"加工中心名称", |
||||
|
workCenterType:"加工中心类别", |
||||
|
machSetupTime:"准备时间", |
||||
|
factorUnit:'产出单位', |
||||
|
machRunFactor:'单位产出量', |
||||
|
requiredTime:'需求时间', |
||||
|
requiredQty:'需求数量', |
||||
|
reportedQty:'报告数量', |
||||
|
approveQty:'合格数量', |
||||
|
planStartTime:'计划开工时间', |
||||
|
planFinishTime:'计划完工时间', |
||||
|
}, |
||||
|
testSoRouting:{ |
||||
|
itemNo:0, |
||||
|
site:this.$store.state.user.site, |
||||
|
testNo:undefined, |
||||
|
workCenterNo:undefined, |
||||
|
workCenterDesc:undefined, |
||||
|
workCenterType:undefined, |
||||
|
machSetupTime:0, |
||||
|
factorUnit:'单位/小时', |
||||
|
machRunFactor:0, |
||||
|
requiredTime:0, |
||||
|
requiredQty:0, |
||||
|
reportedQty:0, |
||||
|
approveQty:0, |
||||
|
planStartTime:undefined, |
||||
|
planFinishTime:undefined, |
||||
|
remark:undefined, |
||||
|
}, |
||||
|
testSoRoutingRule:{ |
||||
|
itemNo:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
workCenterNo:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
workCenterDesc:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
workCenterType:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
machSetupTime:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
factorUnit:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
machRunFactor:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
requiredTime:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
requiredQty:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
reportedQty:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
approveQty:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
planStartTime:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
planFinishTime:[{required: true,message: ' ',trigger: ['change','blur']}], |
||||
|
}, |
||||
|
selectionTestSoRoutingList:[], |
||||
|
testSoRoutingColumnList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3ItemNo', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'itemNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '工序号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3WorkCenterNo', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'workCenterNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '加工中心', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3WorkCenterDesc', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'workCenterDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '加工中心名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3WorkCenterType', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'workCenterType', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '加工中心类别', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3MachSetupTime', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'machSetupTime', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '准备时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3MachRunFactor', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'machRunFactor', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '单位产出量', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3FactorUnit', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'factorUnit', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '产出单位', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3RequiredTime', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'requiredTime', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '需求时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3RequiredQty', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'requiredQty', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '需求数量', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3ReportedQty', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'reportedQty', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '报告数量', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3ApproveQty', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'approveQty', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '合格数量', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3PlanStartTime', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'planStartTime', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '计划开工时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3PlanFinishTime', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'planFinishTime', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '计划完工时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 102001, |
||||
|
serialNumber: '102001Table3Remark', |
||||
|
tableId: '102001Table3', |
||||
|
tableName: '测试工艺路线', |
||||
|
columnProp: 'remark', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '备注', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 140 |
||||
|
}, |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
if (this.columnList.length !== 0){ |
||||
|
this.testSoRoutingColumnList = [...this.columnList] |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
dblClickWorkCenterTable(row){ |
||||
|
this.testSoRouting.workCenterNo = row.workCenterNo |
||||
|
this.testSoRouting.workCenterDesc = row.workCenterDesc |
||||
|
this.testSoRouting.workCenterType = row.workCenterType |
||||
|
this.workCenterDialogFlag = false |
||||
|
}, |
||||
|
searchWorkCenter(){ |
||||
|
let params = { |
||||
|
site:this.$store.state.user.site, |
||||
|
workCenterNo:this.workCenter.workCenterNo, |
||||
|
workCenterDesc:this.workCenter.workCenterDesc, |
||||
|
workCenterType:this.workCenter.workCenterType, |
||||
|
}; |
||||
|
this.workCenterList = [] |
||||
|
searchWorkCenter(params).then(({data})=>{ |
||||
|
if (data && data.code === 200){ |
||||
|
this.workCenterList = data.data; |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
saveTestSoRoutingBtn(row){ |
||||
|
if (row){ |
||||
|
this.saveStatus = false |
||||
|
this.testSoRouting = {...row} |
||||
|
}else { |
||||
|
this.testSoRouting.testNo = this.testNo |
||||
|
this.testSoRouting.planStartTime = new Date() |
||||
|
this.testSoRouting.planFinishTime = new Date() |
||||
|
} |
||||
|
this.saveFlag = true; |
||||
|
}, |
||||
|
closeWorkCenterDialog(){ |
||||
|
this.workCenter = { |
||||
|
workCenterNo:undefined, |
||||
|
workCenterDesc:undefined, |
||||
|
workCenterType:undefined, |
||||
|
} |
||||
|
}, |
||||
|
closeTestSoRoutingDialog(){ |
||||
|
this.saveStatus = true; |
||||
|
this.$refs.saveForm.resetFields(); |
||||
|
this.testSoRouting = { |
||||
|
itemNo:0, |
||||
|
site:this.$store.state.user.site, |
||||
|
testNo: this.testNo, |
||||
|
workCenterNo:undefined, |
||||
|
workCenterDesc:undefined, |
||||
|
workCenterType:undefined, |
||||
|
machSetupTime:0, |
||||
|
factorUnit:'单位/小时', |
||||
|
machRunFactor:0, |
||||
|
requiredTime:0, |
||||
|
requiredQty:0, |
||||
|
reportedQty:0, |
||||
|
approveQty:0, |
||||
|
planStartTime:undefined, |
||||
|
planFinishTime:undefined, |
||||
|
remark:undefined, |
||||
|
} |
||||
|
}, |
||||
|
selectTestSoRoutingList(){ |
||||
|
let params = { |
||||
|
site:this.$store.state.user.site, |
||||
|
testNo: this.testNo, |
||||
|
} |
||||
|
selectTestSoRoutingList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$emit("change",data.rows); |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
saveTestSoRouting(){ |
||||
|
this.$refs.saveForm.validate((validate,objects)=>{ |
||||
|
if (validate){ |
||||
|
if (!this.saveStatus){ |
||||
|
// 修改 |
||||
|
this.testSoRouting.planStartTime = this.dayjs(new Date(this.testSoRouting.planStartTime)).format("YYYY-MM-DD HH:mm:ss") |
||||
|
this.testSoRouting.planFinishTime = this.dayjs(new Date(this.testSoRouting.planFinishTime)).format("YYYY-MM-DD HH:mm:ss") |
||||
|
updateTestSoRouting(this.testSoRouting).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.selectTestSoRoutingList(); |
||||
|
this.$message.success(data.msg) |
||||
|
this.saveFlag = false |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}else { |
||||
|
// 新增 |
||||
|
this.testSoRouting.planStartTime = this.dayjs(new Date(this.testSoRouting.planStartTime)).format("YYYY-MM-DD HH:mm:ss") |
||||
|
this.testSoRouting.planFinishTime = this.dayjs(new Date(this.testSoRouting.planFinishTime)).format("YYYY-MM-DD HH:mm:ss") |
||||
|
saveTestSoRouting(this.testSoRouting).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.selectTestSoRoutingList(); |
||||
|
this.$message.success(data.msg) |
||||
|
this.saveFlag = false |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
} |
||||
|
}else { |
||||
|
for (let key in objects) { |
||||
|
this.$message.error(this.testSoRoutingLabel[key]+"不能为空") |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
testSoRoutingClickRow(row,column){ |
||||
|
if (column.label !== '操作'){ |
||||
|
this.$refs.testSoRoutingTable.toggleRowSelection(row,true) |
||||
|
} |
||||
|
}, |
||||
|
selectionTestSoRouting(val){ |
||||
|
this.selectionTestSoRoutingList = val |
||||
|
}, |
||||
|
removeTestSoRouting(){ |
||||
|
if (this.selectionTestSoRoutingList.length === 0){ |
||||
|
this.$message.warning("请选择要删除的工艺路线") |
||||
|
return |
||||
|
} |
||||
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
removeBatchTestSoRouting(this.selectionTestSoRoutingList).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.selectTestSoRoutingList(); |
||||
|
this.$message.success(data.msg) |
||||
|
} else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error) => { |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}).catch(()=>{}) |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<div style="margin-bottom: 5px"> |
||||
|
<el-button type="primary" @click="saveTestSoRoutingBtn()">新增</el-button> |
||||
|
<el-button type="primary" @click="removeTestSoRouting">删除</el-button> |
||||
|
</div> |
||||
|
<el-table |
||||
|
:height="height" border |
||||
|
:data="dataList" |
||||
|
ref="testSoRoutingTable" |
||||
|
@row-click="testSoRoutingClickRow" |
||||
|
@selection-change="selectionTestSoRouting"> |
||||
|
<el-table-column |
||||
|
type="selection" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in testSoRoutingColumnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed===''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" fixed="right"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<a type="text" style="cursor:pointer;" @click="saveTestSoRoutingBtn(row)">编辑</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-dialog :title="(saveStatus?'新增':'编辑')+'-工艺路线'" :visible.sync="saveFlag" v-drag width="32vw" append-to-body @close="closeTestSoRoutingDialog"> |
||||
|
<el-form :model="testSoRouting" label-position="top" ref="saveForm" :rules="testSoRoutingRule"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="工序号" prop="itemNo"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.itemNo" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="准备时间" prop="machSetupTime"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.machSetupTime" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="加工中心" prop="workCenterNo"> |
||||
|
<span slot="label" style="cursor:pointer;" @click="workCenterDialogFlag = true"><a>加工中心</a></span> |
||||
|
<el-input readonly v-model="testSoRouting.workCenterNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="加工中心名称" prop="workCenterDesc"> |
||||
|
<el-input disabled v-model="testSoRouting.workCenterDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="加工中心类别" prop="workCenterType"> |
||||
|
<el-input disabled v-model="testSoRouting.workCenterType"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="单位产出量" prop="machRunFactor"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.machRunFactor" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="产出单位" prop="factorUnit"> |
||||
|
<el-select v-model="testSoRouting.factorUnit" |
||||
|
style="width: 100%" placeholder="请选择" default-first-option> |
||||
|
<el-option label="单位/小时" :value="'单位/小时'"></el-option> |
||||
|
<el-option label="小时/单位" :value="'小时/单位'"></el-option> |
||||
|
<el-option label="小时" :value="'小时'"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="需求时间" prop="requiredTime"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.requiredTime" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="需求数量" prop="requiredQty"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.requiredQty" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="报告数量" prop="reportedQty"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.reportedQty" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="合格数量" prop="approveQty"> |
||||
|
<el-input-number style="width: 100%;margin-top: -5px;" :min="0" v-model="testSoRouting.approveQty" :controls="false"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="计划开工时间" prop="planStartTime"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="testSoRouting.planStartTime" |
||||
|
type="datetime" |
||||
|
placeholder="选择日期时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="计划完工时间" prop="planFinishTime"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="testSoRouting.planFinishTime" |
||||
|
type="datetime" |
||||
|
placeholder="选择日期时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item label="备注" prop="remark" style="height: 90px"> |
||||
|
<el-input type="textarea" resize='none' :autosize="{ minRows: 3, maxRows: 3 }" v-model="testSoRouting.remark"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="saveTestSoRouting">确 定</el-button> |
||||
|
<el-button @click="saveFlag = false">取 消</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<el-dialog title="加工中心信息" @open="searchWorkCenter" :visible.sync="workCenterDialogFlag" width="30vw" append-to-body @close="closeWorkCenterDialog"> |
||||
|
<el-form :model="workCenter" label-position="top"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="加工中心"> |
||||
|
<el-input v-model="workCenter.workCenterNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="加工中心名称"> |
||||
|
<el-input v-model="workCenter.workCenterDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="加工中心类别"> |
||||
|
<el-input v-model="workCenter.workCenterType"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="6"> |
||||
|
<el-button type="primary" @click="searchWorkCenter">查询</el-button> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-table border height="200px" stripe |
||||
|
:data="workCenterList" @row-dblclick="dblClickWorkCenterTable"> |
||||
|
<el-table-column label="加工中心" prop="workCenterNo"></el-table-column> |
||||
|
<el-table-column label="加工中心名称" prop="workCenterDesc"></el-table-column> |
||||
|
<el-table-column label="加工中心类别" prop="workCenterType"></el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
.el-input-number /deep/ .el-input__inner{ |
||||
|
text-align: right; |
||||
|
padding-right: 5px !important; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue