Browse Source

提示样式变换

master
Rui_Li 4 years ago
parent
commit
1fab149452
  1. 9
      src/views/modules/schedule/com_split_schedule.vue
  2. 143
      src/views/modules/schedule/order_schedule.vue
  3. 2
      src/views/modules/yieldReport/com_cutting_material.vue
  4. 2
      src/views/modules/yieldReport/com_produce_material.vue
  5. 8
      src/views/modules/yieldReport/com_produce_report_normal.vue

9
src/views/modules/schedule/com_split_schedule.vue

@ -30,7 +30,8 @@ export default {
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,
scheduleQty: 0
scheduleQty: 0,
maxScheduleQty: 0
}, },
} }
}, },
@ -40,6 +41,7 @@ export default {
this.titleCon = '工单:' + scheduleRow.orderNo + ',分批排产'; this.titleCon = '工单:' + scheduleRow.orderNo + ',分批排产';
// //
this.pageData.scheduleQty = scheduleRow.qtyToSchedule; this.pageData.scheduleQty = scheduleRow.qtyToSchedule;
this.pageData.maxScheduleQty = scheduleRow.qtyToSchedule;
// //
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scheduleQty.focus(); this.$refs.scheduleQty.focus();
@ -60,6 +62,11 @@ export default {
this.$message.error('排产数量必须大于0!'); this.$message.error('排产数量必须大于0!');
return false; return false;
} }
/*判断是否超过最大可排产的数量*/
if(this.pageData.maxScheduleQty < scheduleQty){
this.$message.error('该订单累计排产数量超过订单数量!');
return false;
}
// //
this.closeDialog(); this.closeDialog();
// //

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

@ -162,9 +162,16 @@
<el-form :inline="true" label-position="top" label-width="100px"> <el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="'主记录'"> <el-form-item :label="'主记录'">
</el-form-item> </el-form-item>
<span @click="openRoutingMenuModal">
<icon-svg name="open-menu" style="height: 20px; width: 20px;"></icon-svg>
</span>
<el-dropdown class="customer-dropdown" @command="handleCommand">
<el-button type="primary">
主菜单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="分批排产">分批排产</el-dropdown-item>
<el-dropdown-item class="customer-li" command="重新排产">重新排产</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-form> </el-form>
<el-table <el-table
@ -200,9 +207,6 @@
<el-form :inline="true" label-position="top" label-width="100px"> <el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="'明细记录'"> <el-form-item :label="'明细记录'">
</el-form-item> </el-form-item>
<span @click="openScheduleMenuModal">
<icon-svg name="open-menu" style="height: 20px; width: 20px;" ></icon-svg>
</span>
</el-form> </el-form>
<el-table <el-table
height="135" height="135"
@ -257,19 +261,7 @@
</comSplitSchedule> </comSplitSchedule>
<!-- 分批排产的组件 -->
<comOpenRoutingMenu ref="comOpenRoutingMenu" :close-on-click-modal="false"
:visible.sync="showRoutingMenu"
@initProcessRoutingMenu="initProcessRoutingMenu">
</comOpenRoutingMenu>
<!-- 分批排产的组件 -->
<comOpenScheduleMenu ref="comOpenScheduleMenu" :close-on-click-modal="false"
:visible.sync="showScheduleMenu"
@initProcessScheduleMenu="initProcessScheduleMenu">
</comOpenScheduleMenu>
</div> </div>
</template> </template>
@ -277,8 +269,6 @@
<script> <script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import comSplitSchedule from '@/views/modules/schedule/com_split_schedule';/*分批排产的modal*/ import comSplitSchedule from '@/views/modules/schedule/com_split_schedule';/*分批排产的modal*/
import comOpenRoutingMenu from "./com_open_routing_menu";/*工艺路线的菜单页面*/
import comOpenScheduleMenu from "./com_open_schedule_menu";/* 派工单的菜单*/
import { import {
getResourceRestList, getResourceRestList,
getShopOrderList, getShopOrderList,
@ -1762,8 +1752,6 @@ export default {
/*组件*/ /*组件*/
components: { components: {
Chooselist,/*列表的组件*/ Chooselist,/*列表的组件*/
comOpenRoutingMenu,/* 工艺路线的菜单页面 */
comOpenScheduleMenu,/*派工单的菜单*/
comSplitSchedule,/* 分批排产的组件 */ comSplitSchedule,/* 分批排产的组件 */
}, },
@ -1841,46 +1829,32 @@ export default {
}) })
}, },
/*打开routing操作菜单的页面*/
openRoutingMenuModal(){
//
this.showRoutingMenu = true;
//
this.$nextTick(() => {
this.$refs.comOpenRoutingMenu.init(this.currentRoutingRow);
});
},
/*打开派工单操作菜单的页面*/
openScheduleMenuModal(){
//
this.showScheduleMenu = true;
//
this.$nextTick(() => {
this.$refs.comOpenScheduleMenu.init(this.currentSchedlingRow);
});
},
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ /*区分不同的菜单 调用不同的方法 调用不同的方法*/
initProcessRoutingMenu(menuName){
handleCommand(menuName){
// //
if('splitSchedule' === menuName){
let routingRow = this.currentRoutingRow;
//
if(null == routingRow){
this.$message.error("请先单击选择行!")
return false;
}
//
this.showSplitScheduleFlag = true;
//
this.$refs.comSplitSchedule.init(this.currentRoutingRow);
}else if('reSchedule' === menuName){
this.initReScheduleWorkOrders();
if('分批排产' === menuName){
this.openSplitScheduleModal();
}else if('重新排产' === menuName){
//
this.warnReScheduleConfirm();
} }
}, },
/*打开分批排产*/
openSplitScheduleModal(){
let routingRow = this.currentRoutingRow;
//
if(null == routingRow){
this.$message.error("请先单击选择行!")
return false;
}
//
this.showSplitScheduleFlag = true;
//
this.$refs.comSplitSchedule.init(this.currentRoutingRow);
},
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ /*区分不同的菜单 调用不同的方法 调用不同的方法*/
initProcessScheduleMenu(menuName){ initProcessScheduleMenu(menuName){
@ -1910,7 +1884,7 @@ export default {
/*设置工艺的行*/ /*设置工艺的行*/
setCurrentRoutingRow(row, column, event) { setCurrentRoutingRow(row, column, event) {
this.currentRoutingRow = JSON.parse(JSON.stringify(row));
this.currentRoutingRow = row;
}, },
/*开始排产的操作*/ /*开始排产的操作*/
@ -1925,19 +1899,20 @@ export default {
return false; return false;
} }
// //
row.qtyScheduled = row.qtyToSchedule;
this.pageData.scheduledQty = row.qtyScheduled;
let scheduledQty = row.qtyToSchedule;
debugger;
row.qtyScheduled = scheduledQty;
row.qtyToSchedule = row.lotSize - row.qtyScheduled;
this.pageData.scheduledQty = scheduledQty;
// //
this.pageData.orderNo = row.orderNo; this.pageData.orderNo = row.orderNo;
this.pageData.itemNo = row.itemNo; this.pageData.itemNo = row.itemNo;
// //
this.scheduleWorkOrderOperation();
this.scheduleWorkOrderOperation(scheduledQty);
}, },
/*分批排产*/ /*分批排产*/
initAddSplitSchedule(scheduledQty){ initAddSplitSchedule(scheduledQty){
//
this.pageData.scheduledQty = scheduledQty;
// //
// //
if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){ if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
@ -1948,17 +1923,22 @@ export default {
this.$message.error('机台不能为空!') this.$message.error('机台不能为空!')
return false; return false;
} }
this.currentRoutingRow.qtyScheduled = this.currentRoutingRow.qtyScheduled + parseFloat(scheduledQty);
this.currentRoutingRow.qtyToSchedule = parseFloat(this.currentRoutingRow.lotSize) - this.currentRoutingRow.qtyScheduled;
// //
this.scheduleWorkOrderOperation();
this.scheduleWorkOrderOperation(scheduledQty);
}, },
/*排产生产工单*/ /*排产生产工单*/
scheduleWorkOrderOperation(){
scheduleWorkOrderOperation(scheduledQty){
//
this.pageData.scheduledQty = scheduledQty;
scheduleWorkOrder(this.pageData).then(({data}) => { scheduleWorkOrder(this.pageData).then(({data}) => {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
this.pageData.scheduledQty = 0;
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.getOrderScheduleList(); this.getOrderScheduleList();
} }
@ -1998,7 +1978,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.getOrderScheduleList(); this.getOrderScheduleList();
} }
@ -2033,15 +2013,16 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.getOrderScheduleList(); this.getOrderScheduleList();
} }
}); });
}, },
/*重新排产的方法*/
initReScheduleWorkOrders(){
/*提示取消派工单*/
warnReScheduleConfirm(){
//
// //
if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){ if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
this.$message.error('加工中心不能为空!') this.$message.error('加工中心不能为空!')
@ -2051,11 +2032,24 @@ export default {
this.$message.error('机台不能为空!') this.$message.error('机台不能为空!')
return false; return false;
} }
//
this.$confirm('确实要对排产清单中的未完成派工单进行排产吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() =>{
//
this.initReScheduleWorkOrders();
});
},
/*重新排产的方法*/
initReScheduleWorkOrders(){
reScheduleWorkOrders(this.pageData).then(({data}) => { reScheduleWorkOrders(this.pageData).then(({data}) => {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.getOrderScheduleList(); this.getOrderScheduleList();
} }
@ -2162,5 +2156,14 @@ div.customer-el-card-blue {
background-color: transparent !important; background-color: transparent !important;
} }
/*添加主菜单和明细菜单的样式*/
.customer-css .customer-dropdown .el-button--primary{
padding: 2px;
font-size: 12px;
}
.el-dropdown-menu /deep/ li.customer-li{
font-size: 10px;
}
/*控制上下间距*/ /*控制上下间距*/
</style> </style>

2
src/views/modules/yieldReport/com_cutting_material.vue

@ -173,7 +173,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.$emit('refreshPageData'); this.$emit('refreshPageData');
// //

2
src/views/modules/yieldReport/com_produce_material.vue

@ -204,7 +204,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.pageData.rmRollNo = ''; this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1; this.pageData.bomItemNo = -1;

8
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -3372,7 +3372,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.resultMap.resultMsg);
this.$message.success(data.resultMap.resultMsg);
// //
this.refreshPageData(); this.refreshPageData();
} }
@ -3402,7 +3402,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.resultMap.resultMsg);
this.$message.success(data.resultMap.resultMsg);
// //
this.refreshPageData(); this.refreshPageData();
} }
@ -3432,7 +3432,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.refreshPageData(); this.refreshPageData();
} }
@ -3462,7 +3462,7 @@ export default {
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
}else{ }else{
this.$message.info(data.msg);
this.$message.success(data.msg);
// //
this.refreshPageData(); this.refreshPageData();
} }

Loading…
Cancel
Save