Browse Source

11月份问题清单 2022年12月2日 sxm

master
[li_she] 3 years ago
parent
commit
6752fe62bf
  1. 3
      src/api/schedule/order_schedule.js
  2. 218
      src/views/modules/schedule/order_schedule.vue
  3. 67
      src/views/modules/schedule/order_schedule_expand.vue
  4. 44
      src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue
  5. 13
      src/views/modules/shopOrder/shopOrder/common/tool_add_and_edit.vue
  6. 16
      src/views/modules/shopOrder/shopOrder/shopOrder.vue

3
src/api/schedule/order_schedule.js

@ -38,3 +38,6 @@ export const refreshScheduleByRouting = data => createAPI('scheduling/refreshSch
//派工单按照日历 //派工单按照日历
export const refreshScheduleByCalendar = data => createAPI('scheduling/refreshScheduleByCalendar', 'POST', data) export const refreshScheduleByCalendar = data => createAPI('scheduling/refreshScheduleByCalendar', 'POST', data)
// 产能汇总
export const sumProductionCapacity = data => createAPI('schedule/sumProductionCapacity', 'POST', data)

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

@ -5,22 +5,27 @@
<legend>{{ buttons.menuButton }}</legend> <legend>{{ buttons.menuButton }}</legend>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;"> <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item :label="''" style="margin-left: 30px;"> <el-form-item :label="''" style="margin-left: 30px;">
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables" style="margin-left: 10px; margin-bottom: 5px;">{{buttons.refreshButton}}</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button class="customer-bun-min" :disabled = "authEdit" type="primary" @click="moveUpScheduleBun" style="margin-left: 10px; margin-bottom: 5px;">{{buttons.moveUp}}</el-button>
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.refreshButton }}
</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="''"> <el-form-item :label="''">
<el-button class="customer-bun-min" :disabled = "authEdit" type="primary" @click="moveDownScheduleBun" style="margin-left: 10px; margin-bottom: 5px;">{{buttons.moveDown}}</el-button>
<el-button class="customer-bun-min" :disabled="authEdit" type="primary" @click="moveUpScheduleBun"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.moveUp }}
</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="''"> <el-form-item :label="''">
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
<el-button class="customer-bun-min" :disabled="authEdit" type="primary" @click="moveDownScheduleBun"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.moveDown }}
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</fieldset> </fieldset>
<!-- 排序规则 --> <!-- 排序规则 -->
<fieldset class="customer-field" style="margin-left: 640px; margin-top: -41px; width: 135px;"> <fieldset class="customer-field" style="margin-left: 640px; margin-top: -41px; width: 135px;">
<legend>{{labels.sortNo}}</legend><br>
<legend>{{ labels.sortNo }}</legend>
<br>
<el-form :inline="true" style="margin-top: -10px; margin-bottom: 10px;" label-position="top" label-width="100px"> <el-form :inline="true" style="margin-top: -10px; margin-bottom: 10px;" label-position="top" label-width="100px">
<el-form-item :label="''" style="margin-bottom: 10px;"> <el-form-item :label="''" style="margin-bottom: 10px;">
<el-radio-group v-model="pageData.sortField"> <el-radio-group v-model="pageData.sortField">
@ -80,7 +85,8 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="''" style="margin-top: -10px;"> <el-form-item :label="''" style="margin-top: -10px;">
<el-checkbox v-model="pageData.specifiedTime" true-label="Y" false-label="N" style="margin-top: 28px; margin-right: -20px;" ></el-checkbox>
<el-checkbox v-model="pageData.specifiedTime" true-label="Y" false-label="N"
style="margin-top: 28px; margin-right: -20px;"></el-checkbox>
<el-time-picker <el-time-picker
format="HH:mm" format="HH:mm"
arrow-control arrow-control
@ -99,7 +105,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">{{ labels.resourceId }}</a></span> <span slot="label" style="" @click="getBaseList(88)"><a herf="#">{{ labels.resourceId }}</a></span>
<el-input v-model="pageData.resourceId" @blur="getCurrentWorkCenterNoByResourceId" style="width: 120px"></el-input>
<el-input v-model="pageData.resourceId" @blur="getCurrentWorkCenterNoByResourceId"
style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label=labels.workCenterNo> <el-form-item :label=labels.workCenterNo>
<el-input v-model="pageData.workCenterNo" readonly="readonly" style="width: 120px"></el-input> <el-input v-model="pageData.workCenterNo" readonly="readonly" style="width: 120px"></el-input>
@ -130,7 +137,9 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="''" style="text-align: center; margin-top: 15px; margin-bottom: 9px;"> <el-form-item :label="''" style="text-align: center; margin-top: 15px; margin-bottom: 9px;">
<el-button type="primary" :disabled = "authAdd" @click="addWaitScheduleBun" style="margin-left: 30px; margin-top: 10px; margin-bottom: 15px;">{{buttons.insertWaitOrder}}</el-button>
<el-button type="primary" :disabled="authAdd" @click="addWaitScheduleBun"
style="margin-left: 30px; margin-top: 10px; margin-bottom: 15px;">{{ buttons.insertWaitOrder }}
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</fieldset> </fieldset>
@ -174,30 +183,47 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="生产工单" <el-dropdown-item class="customer-li" command="生产工单"
:disabled="primaryMenuButton.shopOrderFlag">{{buttons.shopOrder}}</el-dropdown-item>
:disabled="primaryMenuButton.shopOrderFlag">{{ buttons.shopOrder }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="工作日历" <el-dropdown-item class="customer-li" command="工作日历"
:disabled="primaryMenuButton.workCalendarOutFlag">{{buttons.workCalendar}}</el-dropdown-item>
:disabled="primaryMenuButton.workCalendarOutFlag">{{ buttons.workCalendar }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="批量维护工作日历" <el-dropdown-item class="customer-li" command="批量维护工作日历"
:disabled="primaryMenuButton.batchWorkCalendarFlag">{{buttons.batchWorkCalendar}}</el-dropdown-item>
:disabled="primaryMenuButton.batchWorkCalendarFlag">{{ buttons.batchWorkCalendar }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="分批排产" <el-dropdown-item class="customer-li" command="分批排产"
:disabled="primaryMenuButton.splitScheduleFlag">{{buttons.splitScheduleOrder}}</el-dropdown-item>
:disabled="primaryMenuButton.splitScheduleFlag">{{ buttons.splitScheduleOrder }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="重新排产" <el-dropdown-item class="customer-li" command="重新排产"
:disabled="primaryMenuButton.reScheduleOrderFlag">{{buttons.reScheduleOrder}}</el-dropdown-item>
:disabled="primaryMenuButton.reScheduleOrderFlag">{{ buttons.reScheduleOrder }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="更改工艺路线" <el-dropdown-item class="customer-li" command="更改工艺路线"
:disabled="primaryMenuButton.updateProductRouting">{{buttons.changeRouting}}</el-dropdown-item>
:disabled="primaryMenuButton.updateProductRouting">{{ buttons.changeRouting }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="更改工艺路线版本" <el-dropdown-item class="customer-li" command="更改工艺路线版本"
:disabled="primaryMenuButton.updateProductRouting">{{buttons.changeRoutingRev}}</el-dropdown-item>
:disabled="primaryMenuButton.updateProductRouting">{{ buttons.changeRoutingRev }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="查看物料库存" <el-dropdown-item class="customer-li" command="查看物料库存"
:disabled="primaryMenuButton.partStockFlag">{{buttons.viewPartStock}}</el-dropdown-item>
:disabled="primaryMenuButton.partStockFlag">{{ buttons.viewPartStock }}
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button @click="userSetting('5303Order')" type="primary">{{ buttons.settingTable }}</el-button> <el-button @click="userSetting('5303Order')" type="primary">{{ buttons.settingTable }}</el-button>
<el-button v-if="showDefault" @click="saveColumnList('5303Order')" type="primary">{{ buttons.defaultTable }}</el-button>
<el-button v-if="showDefault" @click="saveColumnList('5303Order')" type="primary">{{
buttons.defaultTable
}}
</el-button>
<el-link style="margin-left: 30px;color: #0000cc" :underline="false">
{{ '加工中心: ' + pageData.workCenterNo }}
</el-link>
<el-link style="margin-left: 10px;color: #0000cc" :underline="false">
{{ '总产能需求: ' + sumProductionCapacity }}
</el-link>
</el-form> </el-form>
<el-table <el-table
:height="height - 50" :height="height - 50"
@ -239,27 +265,39 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="生产工单" <el-dropdown-item class="customer-li" command="生产工单"
:disabled="detailMenuButton.shopOrderFlag">{{buttons.shopOrder}}</el-dropdown-item>
:disabled="detailMenuButton.shopOrderFlag">{{ buttons.shopOrder }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="工作日历" <el-dropdown-item class="customer-li" command="工作日历"
:disabled="detailMenuButton.workCalendarOutFlag">{{buttons.workCalendar}}</el-dropdown-item>
:disabled="detailMenuButton.workCalendarOutFlag">{{ buttons.workCalendar }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="更改等待时间" <el-dropdown-item class="customer-li" command="更改等待时间"
:disabled="detailMenuButton.changeWaitTimeFlag">{{buttons.updateWaitTimes}}</el-dropdown-item>
:disabled="detailMenuButton.changeWaitTimeFlag">{{ buttons.updateWaitTimes }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="根据工艺路线调整" <el-dropdown-item class="customer-li" command="根据工艺路线调整"
:disabled="detailMenuButton.changeScheduleByRoutingFlag">{{buttons.baseRoutingUpdate}}</el-dropdown-item>
:disabled="detailMenuButton.changeScheduleByRoutingFlag">{{ buttons.baseRoutingUpdate }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="根据工作日历调整" <el-dropdown-item class="customer-li" command="根据工作日历调整"
:disabled="detailMenuButton.changeScheduleByRoutingFlag">{{buttons.baseCalendarUpdate}}</el-dropdown-item>
:disabled="detailMenuButton.changeScheduleByRoutingFlag">{{ buttons.baseCalendarUpdate }}
</el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<el-dropdown-item class="customer-li" command="查看物料库存" <el-dropdown-item class="customer-li" command="查看物料库存"
:disabled="detailMenuButton.partStockFlag">{{buttons.viewPartStock}}</el-dropdown-item>
:disabled="detailMenuButton.partStockFlag">{{ buttons.viewPartStock }}
</el-dropdown-item>
<hr width="95%"/>
<!-- <el-dropdown-item class="customer-li" command="copyShopOrder"-->
<!-- :disabled="this.currentSchedlingRow?false:true">{{ '复制派工单' }}-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item class="customer-li" command="insertShopOrder"-->
<!-- :disabled="this.currentSchedlingRow?false:true">{{ '插入派工单' }}-->
<!-- </el-dropdown-item>-->
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button @click="userSetting('5303Schedule')" type="primary">{{ buttons.settingTable }}</el-button> <el-button @click="userSetting('5303Schedule')" type="primary">{{ buttons.settingTable }}</el-button>
<el-button v-if="showDefault" @click="saveColumnList('5303Schedule')" type="primary">{{ buttons.defaultTable }}</el-button>
</el-form> </el-form>
<el-table class="schedule-table" <el-table class="schedule-table"
:height="height + 50"
:height="height + 25"
:data="orderScheduleList" :data="orderScheduleList"
border border
highlight-current-row highlight-current-row
@ -372,6 +410,7 @@ import {
updateScheduleWaitTimes, updateScheduleWaitTimes,
refreshScheduleByRouting, refreshScheduleByRouting,
refreshScheduleByCalendar, refreshScheduleByCalendar,
sumProductionCapacity
} from '@/api/schedule/order_schedule.js' } from '@/api/schedule/order_schedule.js'
import { import {
@ -392,6 +431,7 @@ import {
export default { export default {
data() { data() {
return { return {
sumProductionCapacity: 0,
height: 200, height: 200,
authEdit: false, authEdit: false,
authAdd: false, authAdd: false,
@ -413,6 +453,8 @@ export default {
currentRoutingRow: {}, currentRoutingRow: {},
currentSchedlingRow: {}, currentSchedlingRow: {},
selectList: [], selectList: [],
copyShopOrder: {},
insertShopOrder: {},
pageData: { pageData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
username: this.$store.state.user.name, username: this.$store.state.user.name,
@ -2322,8 +2364,8 @@ export default {
getResourceShiftData() { getResourceShiftData() {
let queryData = { let queryData = {
site: this.$store.state.user.site, site: this.$store.state.user.site,
workCenterNo: this.pageData.workCenterNo,
resourceId: this.pageData.resourceId,
workCenterNo: this.pageData.workCenterNo.trim(),
resourceId: this.pageData.resourceId.trim(),
scheduleDate: this.pageData.scheduleDate scheduleDate: this.pageData.scheduleDate
} }
getResourceRestList(queryData).then(({data}) => { getResourceRestList(queryData).then(({data}) => {
@ -2341,7 +2383,14 @@ export default {
this.currentRoutingRow = null; this.currentRoutingRow = null;
}) })
}, },
//
getSumProductionCapacity() {
sumProductionCapacity(this.pageData).then(({data}) => {
if (data && data.code == 0) {
this.sumProductionCapacity = data.data.toFixed(2)
}
})
},
/*获取派工单的信息*/ /*获取派工单的信息*/
getOrderScheduleList() { getOrderScheduleList() {
getOrderScheduleList(this.pageData).then(({data}) => { getOrderScheduleList(this.pageData).then(({data}) => {
@ -2363,6 +2412,7 @@ export default {
this.getResourceShiftData(); this.getResourceShiftData();
this.getShopOrderList(); this.getShopOrderList();
this.getOrderScheduleList(); this.getOrderScheduleList();
this.getSumProductionCapacity()
}, },
/*列表方法的回调*/ /*列表方法的回调*/
@ -2419,8 +2469,10 @@ export default {
//this.$message.error('!'); //this.$message.error('!');
//return false; //return false;
} }
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
let tempData = {
'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate
};
// //
this.$nextTick(() => { this.$nextTick(() => {
this.showWorkCalendarOut = true; this.showWorkCalendarOut = true;
@ -2436,8 +2488,10 @@ export default {
//this.$message.error('!'); //this.$message.error('!');
//return false; //return false;
} }
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
let tempData = {
'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate
};
// //
this.$nextTick(() => { this.$nextTick(() => {
this.showBatchWorkCalendar = true; this.showBatchWorkCalendar = true;
@ -2488,7 +2542,12 @@ export default {
this.$message.error(this.labels.pleaseSelectOrder); this.$message.error(this.labels.pleaseSelectOrder);
return false; return false;
} }
let tempData = {'site': this.pageData.site, 'orderNo': this.currentRoutingRow.orderNo,'partNo': this.currentRoutingRow.partNo,'partDesc': this.currentRoutingRow.partDesc};
let tempData = {
'site': this.pageData.site,
'orderNo': this.currentRoutingRow.orderNo,
'partNo': this.currentRoutingRow.partNo,
'partDesc': this.currentRoutingRow.partDesc
};
// //
this.$nextTick(() => { this.$nextTick(() => {
this.updateProductRouting = true; this.updateProductRouting = true;
@ -2503,7 +2562,11 @@ export default {
this.$message.error(this.labels.pleaseSelectOrder); this.$message.error(this.labels.pleaseSelectOrder);
return false; return false;
} }
let tempData = {'site': this.pageData.site, 'orderNo': this.currentRoutingRow.orderNo,'partNo': this.currentRoutingRow.partNo};
let tempData = {
'site': this.pageData.site,
'orderNo': this.currentRoutingRow.orderNo,
'partNo': this.currentRoutingRow.partNo
};
// //
this.$nextTick(() => { this.$nextTick(() => {
this.updateRoutingRev = true; this.updateRoutingRev = true;
@ -2541,8 +2604,10 @@ export default {
this.$message.error(this.labels.pleaseSelectSchedule); this.$message.error(this.labels.pleaseSelectSchedule);
return false; return false;
} }
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
let tempData = {
'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate
};
// //
this.$nextTick(() => { this.$nextTick(() => {
this.showWorkCalendarOut = true; this.showWorkCalendarOut = true;
@ -2561,9 +2626,11 @@ export default {
let waitTimes = parseFloat(this.currentSchedlingRow.timeRequired) * 60; let waitTimes = parseFloat(this.currentSchedlingRow.timeRequired) * 60;
// //
waitTimes = parseInt(waitTimes); waitTimes = parseInt(waitTimes);
let tempData = {'site': this.pageData.site, 'orderNo': this.currentSchedlingRow.orderNo,
let tempData = {
'site': this.pageData.site, 'orderNo': this.currentSchedlingRow.orderNo,
'itemNo': this.currentSchedlingRow.itemNo, 'seqNo': this.currentSchedlingRow.seqNo, 'itemNo': this.currentSchedlingRow.itemNo, 'seqNo': this.currentSchedlingRow.seqNo,
'waitTimes': waitTimes};
'waitTimes': waitTimes
};
// //
this.$nextTick(() => { this.$nextTick(() => {
this.showChangeWaitTime = true; this.showChangeWaitTime = true;
@ -2605,9 +2672,29 @@ export default {
this.showPartStockFlag = true; this.showPartStockFlag = true;
this.$refs.comPartStock.init(tempData); this.$refs.comPartStock.init(tempData);
}) })
}else if(menuName == 'copyShopOrder'){
//
this.copyShopOrder = JSON.parse(JSON.stringify(this.currentSchedlingRow))
}else if(menuName == 'insertShopOrder'){
//
this.insertShopOrder = JSON.parse(JSON.stringify(this.currentSchedlingRow))
} }
}, },
//
copyShopOrder(){
},
//
insertShopOrder(){
if (!this.copyShopOrder){
this.$message.warning('请复制派工单,再执行插入派工单操作!')
return;
}
if (this.copyShopOrder){
this.$message.warning('请复制派工单,再执行插入派工单操作!')
return;
}
},
/*打开分批排产*/ /*打开分批排产*/
openSplitScheduleModal() { openSplitScheduleModal() {
let routingRow = this.currentRoutingRow; let routingRow = this.currentRoutingRow;
@ -2645,7 +2732,6 @@ export default {
}, },
/*设置工艺的行*/ /*设置工艺的行*/
setCurrentRoutingRow(row, column, event) { setCurrentRoutingRow(row, column, event) {
this.currentRoutingRow = row; this.currentRoutingRow = row;
@ -2857,10 +2943,12 @@ export default {
return false; return false;
} }
// //
let requestData = {'site': this.pageData.site,
'workCenterNo': this.pageData.workCenterNo,
'resourceId': this.pageData.resourceId,
'scheduleSeqNo': scheduleRow.scheduledSeqNo};
let requestData = {
'site': this.pageData.site,
'workCenterNo': this.pageData.workCenterNo.trim(),
'resourceId': this.pageData.resourceId.trim(),
'scheduleSeqNo': scheduleRow.scheduledSeqNo
};
// //
moveUpSchedule(requestData).then(({data}) => { moveUpSchedule(requestData).then(({data}) => {
if (data.code != 200) { if (data.code != 200) {
@ -2890,10 +2978,12 @@ export default {
return false; return false;
} }
// //
let requestData = {'site': this.pageData.site,
'workCenterNo': this.pageData.workCenterNo,
'resourceId': this.pageData.resourceId,
'scheduleSeqNo': scheduleRow.scheduledSeqNo};
let requestData = {
'site': this.pageData.site,
'workCenterNo': this.pageData.workCenterNo.trim(),
'resourceId': this.pageData.resourceId.trim(),
'scheduleSeqNo': scheduleRow.scheduledSeqNo
};
// //
moveDownSchedule(requestData).then(({data}) => { moveDownSchedule(requestData).then(({data}) => {
if (data.code != 200) { if (data.code != 200) {
@ -2974,9 +3064,11 @@ export default {
/*调整等待派工单的等待时间*/ /*调整等待派工单的等待时间*/
changeScheduleWaitTimes(tempData) { changeScheduleWaitTimes(tempData) {
// //
let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
'seqNo': tempData.seqNo, 'waitTimes': tempData.waitTimes, 'workCenterNo': this.pageData.workCenterNo,
'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo};
let requestData = {
'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
'seqNo': tempData.seqNo, 'waitTimes': tempData.waitTimes, 'workCenterNo': this.pageData.workCenterNo.trim(),
'resourceId': this.pageData.resourceId.trim(), 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo
};
updateScheduleWaitTimes(requestData).then(({data}) => { updateScheduleWaitTimes(requestData).then(({data}) => {
if (data.code != 200) { if (data.code != 200) {
this.$message.error(data.msg); this.$message.error(data.msg);
@ -2991,9 +3083,11 @@ export default {
/*根据工艺路线调整派工单*/ /*根据工艺路线调整派工单*/
changeScheduleByRouting(tempData) { changeScheduleByRouting(tempData) {
// //
let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo,
'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo};
let requestData = {
'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo.trim(),
'resourceId': this.pageData.resourceId.trim(), 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo
};
refreshScheduleByRouting(requestData).then(({data}) => { refreshScheduleByRouting(requestData).then(({data}) => {
if (data.code != 200) { if (data.code != 200) {
this.$message.error(data.msg); this.$message.error(data.msg);
@ -3021,9 +3115,11 @@ export default {
/*根据日历调整派工单*/ /*根据日历调整派工单*/
changeScheduleByCalendar(tempData) { changeScheduleByCalendar(tempData) {
// //
let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo,
'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo};
let requestData = {
'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo,
'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo.trim(),
'resourceId': this.pageData.resourceId.trim(), 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo
};
refreshScheduleByCalendar(requestData).then(({data}) => { refreshScheduleByCalendar(requestData).then(({data}) => {
if (data.code != 200) { if (data.code != 200) {
this.$message.error(data.msg); this.$message.error(data.msg);
@ -3240,6 +3336,7 @@ export default {
.customer-card .el-form-item__content { .customer-card .el-form-item__content {
margin-top: -15px; margin-top: -15px;
} }
.customer-card .el-form-item { .customer-card .el-form-item {
height: 22px; height: 22px;
} }
@ -3252,11 +3349,13 @@ export default {
div.el-time-width { div.el-time-width {
width: 110px !important; width: 110px !important;
} }
/* 全局时间右边框*/ /* 全局时间右边框*/
.customer-css input.el-input__inner { .customer-css input.el-input__inner {
height: 22px !important; height: 22px !important;
padding-right: 0px !important; padding-right: 0px !important;
} }
/* 控制el-card标签的数据*/ /* 控制el-card标签的数据*/
div.customer-el-card { div.customer-el-card {
margin-left: 110px; margin-left: 110px;
@ -3264,6 +3363,7 @@ div.customer-el-card {
height: 20px; height: 20px;
width: 60px; width: 60px;
} }
/* 颜色控制 */ /* 颜色控制 */
div.customer-el-card-pink { div.customer-el-card-pink {
background: #2fff00; background: #2fff00;
@ -3298,6 +3398,7 @@ div.customer-el-card-blue {
width: 80px; width: 80px;
text-align: center; text-align: center;
} }
/*当前按钮的通用样式*/ /*当前按钮的通用样式*/
.customer-css .el-button--medium { .customer-css .el-button--medium {
padding: 5px 5px; padding: 5px 5px;
@ -3342,6 +3443,7 @@ div.customer-el-card-blue {
.el-input /deep/ .el-icon-time { .el-input /deep/ .el-icon-time {
display: none; display: none;
} }
/*控制上下间距*/ /*控制上下间距*/
hr { hr {
margin-top: 0px; margin-top: 0px;

67
src/views/modules/schedule/order_schedule_expand.vue

@ -76,7 +76,8 @@
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.refreshButton }} style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.refreshButton }}
</el-button> </el-button>
<el-button :disabled="dataListSelections.length <= 0" type="primary" @click="scheduleBatchDialog()" <el-button :disabled="dataListSelections.length <= 0" type="primary" @click="scheduleBatchDialog()"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.scheduleBatch }}
style="margin-left: 10px; margin-bottom: 5px;">
{{ buttons.scheduleBatch ? buttons.scheduleBatch : '批量排产' }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form-item> </el-form-item>
@ -137,8 +138,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden && item.columnProp == 'resourceList'"> <span v-if="!item.columnHidden && item.columnProp == 'resourceList'">
<el-select class="table-select-input" v-model="scope.row.resourceId"> <el-select class="table-select-input" v-model="scope.row.resourceId">
<el-option v-for="(item,index) in scope.row.resourceList.split(';')" :key="index"
:value="item.split(':')[0]" :label="item.split(':')[1]">
<el-option v-for="(item,index) in scope.row.resourceList" :key="index"
:value="item.resourceId" :label="item.resourceDesc">
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
@ -1322,40 +1323,7 @@ export default {
} }
}) })
}, },
/**
* this.$confirm(data.msg, '提示', {
* confirmButtonText: this.labels.confirmLabel,
* celButtonText: this.labels.cancelLabel,
* type: 'warning'
* }).then(() => {
* newItemList = []
* for (let i = 0; i < this.dataListSelections.length; i++) {
* let item = this.dataListSelections[i]
* let newItem = {
* checkFlag: false,
* itemNo: item.itemNo,
* orderNo: item.orderNo,
* qtyToSchedule: item.scheduledQty,
* resourceId: item.resourceId,
* scheduleDate: this.scheduleDate,
* scheduleTime: this.scheduleTime,
* scheduledQty: item.qtyToSchedule,
* site: item.site,
* specifiedTime: this.specifiedTime,
* username: this.$store.state.user.name,
* workCenterNo: item.workCenterNo
* }
* newItemList.push(newItem)
* }
* batchScheduleOrderWithExpand(newItemList).then(({data}) => {
* if (data.code == 200) {
* this.$message.success(data.msg)
* } else if (data.code == 500) {
* this.$message.error(data.msg)
* }
* })
* });
*/
// scheduleBatchDialog // scheduleBatchDialog
scheduleBatchDialog() { scheduleBatchDialog() {
if (this.dataListSelections.find(item => item.resourceId == '' || item.resourceId == null)) { if (this.dataListSelections.find(item => item.resourceId == '' || item.resourceId == null)) {
@ -1376,7 +1344,30 @@ export default {
/*获取工单信息*/ /*获取工单信息*/
getShopOrderList() { getShopOrderList() {
getShopOrderList(this.pageData).then(({data}) => { getShopOrderList(this.pageData).then(({data}) => {
this.shopOrderList = data.rows;
if (this.pageData.resourceId) {
this.shopOrderList = data.rows.map(item => {
item.resourceId = this.pageData.resourceId
item.resourceList = item.resourceList.split(';').map(resItem => {
let newItem = {
resourceId: resItem.split(':')[0],
resourceDesc: resItem.split(':')[1]
}
return newItem;
})
return item;
})
} else {
this.shopOrderList = data.rows.map(item => {
item.resourceList = item.resourceList.split(';').map(resItem => {
let newItem = {
resourceId: resItem.split(':')[0],
resourceDesc: resItem.split(':')[1]
}
return newItem;
})
return item;
})
}
// //
this.currentRoutingRow = null; this.currentRoutingRow = null;
}) })

44
src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue

@ -69,9 +69,12 @@
<el-form-item> <el-form-item>
<span slot="label" style="" @click="getBaseList(18)"><a herf="#">工厂编码</a></span> <span slot="label" style="" @click="getBaseList(18)"><a herf="#">工厂编码</a></span>
<el-input v-model="searchData.site" style="width: 80px"></el-input> <el-input v-model="searchData.site" style="width: 80px"></el-input>
<el-checkbox style="margin-left: 2px;margin-top: 0px" v-model="searchData.checked">仅显示当前排产的派工单</el-checkbox>
<el-checkbox style="margin-left: 2px;margin-top: 0px" v-model="searchData.checked">仅显示当前排产的派工单
</el-checkbox>
<el-button @click="getData()" type="primary" style="margin-left: 100px;margin-top: 0px">{{ '查询' }}</el-button> <el-button @click="getData()" type="primary" style="margin-left: 100px;margin-top: 0px">{{ '查询' }}</el-button>
<el-button @click="warnCancelScheduleConfirm" type="primary" style="margin-left: 30px; margin-top: 0px; margin-right: 20px;">{{'取消排产'}}</el-button>
<el-button @click="warnCancelScheduleConfirm" type="primary"
style="margin-left: 30px; margin-top: 0px; margin-right: 20px;">{{ '取消排产' }}
</el-button>
<download-excel <download-excel
:fields="fields()" :fields="fields()"
:data="exportData" :data="exportData"
@ -145,19 +148,6 @@
} from "@/api/shopOrder/shopOrder.js" } from "@/api/shopOrder/shopOrder.js"
export default { export default {
//-
name: "searchProductionDispatchList",
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
this.searchData.sResourceID = this.searchData.sResourceID.toUpperCase()
this.searchData.orderNo = this.searchData.orderNo.toUpperCase()
this.searchData.workCenterNo = this.searchData.workCenterNo.toUpperCase()
}
}
},
data() { data() {
return { return {
tagNo: '', tagNo: '',
@ -961,11 +951,35 @@
Chooselist, Chooselist,
column,/*动态列*/ column,/*动态列*/
}, },
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
this.searchData.sResourceID = this.searchData.sResourceID.toUpperCase()
this.searchData.orderNo = this.searchData.orderNo.toUpperCase()
this.searchData.workCenterNo = this.searchData.workCenterNo.toUpperCase()
}
},
$route: {
handler: function (val, oldVal) {
this.$router.onReady(() => {
if (this.$route.query.orderNo) {
this.searchData.orderNo = this.$route.query.orderNo,
this.getData()
}
})
},
//
deep: true
},
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 180; this.height = window.innerHeight - 180;
}) })
}, },
methods: { methods: {
getBaseData(val) { getBaseData(val) {
if (this.tagNo === 24) { if (this.tagNo === 24) {

13
src/views/modules/shopOrder/shopOrder/common/tool_add_and_edit.vue

@ -5,7 +5,7 @@
@close="closeDialog" @close="closeDialog"
width="390px" width="390px"
class="sxm" class="sxm"
:title="titleCon"
:title="titile"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible"> :visible.sync="visible">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
@ -130,7 +130,9 @@
objectType: 'button' objectType: 'button'
}, },
labels: { labels: {
titleCon: '工具信息维护',
titleCon: '工具新增',
titleEdit: '工具信息维护',
titleCopy: '复制工具信息',
itemNo: '工序号:', itemNo: '工序号:',
itemDesc: '工序名称:', itemDesc: '工序名称:',
toolId: '工具编码:', toolId: '工具编码:',
@ -159,16 +161,17 @@
this.oriToolId = selectRow.toolId; this.oriToolId = selectRow.toolId;
} else if (operationType === 2){ } else if (operationType === 2){
this.operationFlag = true; this.operationFlag = true;
this.selectRow.itemNo = '';
} else { } else {
this.operationFlag = false; this.operationFlag = false;
} }
// //
if(operationType === 0){ if(operationType === 0){
this.titile = '新增工具信息';
this.titile = this.labels.titleCon
}else if(operationType === 1){ }else if(operationType === 1){
this.titile = '编辑工具信息';
this.titile = this.labels.titleEdit
}else if(operationType === 2){ }else if(operationType === 2){
this.titile = '复制工具信息';
this.titile = this.labels.titleCopy
} }
// //
this.searchShopOrderSoRouting(); this.searchShopOrderSoRouting();

16
src/views/modules/shopOrder/shopOrder/shopOrder.vue

@ -35,14 +35,16 @@
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand"> <el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
<el-button type="primary" :disabled="authEdit"> <el-button type="primary" :disabled="authEdit">
{{ buttons.orderPrimaryMenu }}<i class="el-icon-arrow-down el-icon--right"></i>
{{ buttons.orderPrimaryMenu?buttons.orderPrimaryMenu:'主菜单' }}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="orderToScheduling"><span>{{ <el-dropdown-item class="customer-li" command="orderToScheduling"><span>{{
buttons.orderToScheduling
buttons.orderToScheduling?buttons.orderToScheduling: '查看派工单信息'
}}</span> }}</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item class="customer-li" command="changeRouting"><span>{{ buttons.changeRouting }}</span>
<el-dropdown-item class="customer-li" command="changeRouting"><span>{{
buttons.changeRouting ? buttons.changeRouting :'变更工艺路线'
}}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -264,10 +266,8 @@
{{ buttons.routingPrimaryMenu }}<i class="el-icon-arrow-down el-icon--right"></i> {{ buttons.routingPrimaryMenu }}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="0"><span>{{ buttons.routingMenu }}</span>
<el-dropdown-item class="customer-li" command="routingMenu"><span>{{ buttons.routingMenu }}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="routingResource"><span>{{ buttons.resources }}</span> <el-dropdown-item class="customer-li" command="routingResource"><span>{{ buttons.resources }}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
@ -304,7 +304,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label=labels.toolLabel name="forth">
<el-tab-pane :label="labels.toolLabel?labels.toolLabel:'工具'" name="forth">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<download-excel <download-excel
@ -1979,7 +1979,7 @@ export default {
// //
handleCommand(command) { handleCommand(command) {
switch (command) { switch (command) {
case '0':
case 'routingMenu':
// //
this.getRouting() this.getRouting()
break; break;

Loading…
Cancel
Save