Browse Source

排产页面的BUG 和 列表的功能

master
Rui_Li 4 years ago
parent
commit
b73001aa6d
  1. 5
      src/api/schedule/order_schedule.js
  2. 88
      src/views/modules/schedule/order_schedule.vue

5
src/api/schedule/order_schedule.js

@ -8,3 +8,8 @@ export const getShopOrderList = data => createAPI('schedule/getShopOrderList', '
// 获取信息 // 获取信息
export const getOrderScheduleList = data => createAPI('schedule/getOrderScheduleList', 'POST', data) export const getOrderScheduleList = data => createAPI('schedule/getOrderScheduleList', 'POST', data)
//获取当前加工中心对应的机台数据
export const getCurrentWorkCenterNoByResourceId = data => createAPI('scheduling/getCurrentWorkCenterNoByResourceId', 'POST', data)

88
src/views/modules/schedule/order_schedule.vue

@ -5,13 +5,10 @@
<legend>菜单</legend> <legend>菜单</legend>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -2px;" > <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -2px;" >
<el-form-item :label="''"> <el-form-item :label="''">
<el-button type="primary" style="margin-left: 30px; margin-bottom: 5px;">列表</el-button>
<el-button class="customer-bun-min" type="primary" style="margin-left: 10px; margin-bottom: 5px;">关闭</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="''"> <el-form-item :label="''">
<el-button type="primary" style="margin-left: 10px; margin-bottom: 5px;">关闭</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-bottom: 5px;">查询</el-button>
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-bottom: 5px;">刷新</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</fieldset> </fieldset>
@ -92,10 +89,12 @@
<el-form-item :label="'工厂编号:'"> <el-form-item :label="'工厂编号:'">
<el-input v-model="searchData.site" style="width: 85px"></el-input> <el-input v-model="searchData.site" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'机台编号:'">
<el-form-item>
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span>
<el-input v-model="searchData.resourceId" style="width: 120px"></el-input> <el-input v-model="searchData.resourceId" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'加工中心编码:'">
<el-form-item>
<span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码:</a></span>
<el-input v-model="searchData.workCenterNo" style="width: 120px"></el-input> <el-input v-model="searchData.workCenterNo" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -218,21 +217,24 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-main> </el-main>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
</template> </template>
<script> <script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import { import {
getResourceRestList, getResourceRestList,
getShopOrderList, getShopOrderList,
getOrderScheduleList, getOrderScheduleList,
getCurrentWorkCenterNoByResourceId,
} from '@/api/schedule/order_schedule.js' } from '@/api/schedule/order_schedule.js'
export default { export default {
data() { data() {
return { return {
height: 200, height: 200,
tagNo: '',
modelFlag: false, modelFlag: false,
modelInputFlag: true, modelInputFlag: true,
selectList: [], selectList: [],
@ -244,7 +246,7 @@ export default {
enterTime2: new Date(), enterTime2: new Date(),
needTime1: '', needTime1: '',
needTime2: new Date(), needTime2: new Date(),
scheduleDate: '',
scheduleDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
sortField: '', sortField: '',
status: 1, status: 1,
user: this.$store.state.user.name user: this.$store.state.user.name
@ -1686,6 +1688,12 @@ export default {
], ],
} }
}, },
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 300; this.height = window.innerHeight - 300;
@ -1724,7 +1732,47 @@ export default {
/*开始排产的操作*/ /*开始排产的操作*/
startScheduleOperation(row, $event){ startScheduleOperation(row, $event){
this.$message.error('字段time_required找不到!'); this.$message.error('字段time_required找不到!');
}
},
/*列表方法的回调*/
getBaseData(val){
if (this.tagNo === 88){
this.searchData.resourceId = val.ResourceID;
//
this.getCurrentWorkCenterNoByResourceId();
}else if(this.tagNo == 24){
this.searchData.workCenterNo = val.WorkCenterNo;
}
},
/*获取当前的机台对应的加工中心*/
getCurrentWorkCenterNoByResourceId(){
getCurrentWorkCenterNoByResourceId(this.searchData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else{
this.searchData.workCenterNo = data.workCenterNo;
}
this.searchData.workCenterNo = data.workCenterNo;
});
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 88){
strVal = this.searchData.resourceId;
}else if(val === 24){
strVal = this.searchData.workCenterNo;
}
this.$refs.baseList.init(val,strVal)
})
},
}, },
created() { created() {
// //
@ -1787,5 +1835,25 @@ div.customer-el-card-blue {
} }
/*当前按钮的通用样式*/
.customer-css .customer-bun-mid{
width: 60px;
text-align: center;
}
.customer-css .customer-bun-min{
width: 50px;
text-align: center;
}
.customer-css .customer-bun-max{
width: 80px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
/*控制上下间距*/ /*控制上下间距*/
</style> </style>
Loading…
Cancel
Save