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. 604
      src/views/modules/schedule/order_schedule.vue
  3. 69
      src/views/modules/schedule/order_schedule_expand.vue
  4. 160
      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)

604
src/views/modules/schedule/order_schedule.vue
File diff suppressed because it is too large
View File

69
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>
@ -1316,46 +1317,13 @@ export default {
this.scheduleVisible = false this.scheduleVisible = false
this.getShopOrderList() this.getShopOrderList()
} else if (data.code == 201) { } else if (data.code == 201) {
this.$message.warning(data.msg.substring(0,data.msg.indexOf(','))+"!")
this.$message.warning(data.msg.substring(0, data.msg.indexOf(',')) + "!")
} else if (data.code == 500) { } else if (data.code == 500) {
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
}, },
/**
* 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;
}) })

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

@ -51,27 +51,30 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<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-form-item >
<el-form-item>
<span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码</a></span> <span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码</a></span>
<el-input v-model="searchData.workCenterNo" style="width: 130px"></el-input> <el-input v-model="searchData.workCenterNo" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
<el-form-item >
<el-form-item>
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号</a></span> <span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号</a></span>
<el-input v-model="searchData.sResourceID" style="width: 130px"></el-input> <el-input v-model="searchData.sResourceID" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
<el-form-item >
<el-form-item>
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产成品编码</a></span> <span slot="label" style="" @click="getBaseList(5)"><a herf="#">产成品编码</a></span>
<el-input v-model="searchData.partNo" style="width: 130px"></el-input> <el-input v-model="searchData.partNo" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'生产订单号:'"> <el-form-item :label="'生产订单号:'">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input> <el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
<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-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-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="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"
@ -111,7 +114,7 @@
:width="item.columnWidth" :width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</template> </template>
@ -126,53 +129,40 @@
</template> </template>
<script> <script>
import Chooselist from '@/views/modules/common/Chooselist';
import column from '@/views/modules/common/column';/*动态表头*/
import Chooselist from '@/views/modules/common/Chooselist';
import column from '@/views/modules/common/column';/*动态表头*/
/*动态表头*/
import {
/*动态表头*/
import {
saveTableDefaultList, saveTableDefaultList,
getTableDefaultListLanguage, getTableDefaultListLanguage,
getTableUserListLanguage, getTableUserListLanguage,
removerDefault, removerDefault,
removerUser removerUser
} from "@/api/table.js";
} from "@/api/table.js";
import {
import {
searchProductionDispatchList, searchProductionDispatchList,
cancelScheduleWithScheduleQuery, cancelScheduleWithScheduleQuery,
} from "@/api/shopOrder/shopOrder.js"
} from "@/api/shopOrder/shopOrder.js"
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()
}
}
},
export default {
data() { data() {
return { return {
tagNo:'',
tagNo: '',
showDefault: false, showDefault: false,
visible: false, visible: false,
// start // start
exportData: [], exportData: [],
exportName: "生产派工单"+this.dayjs().format('YYYYMMDDHHmmss'),
exportName: "生产派工单" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["生产派工单"], exportHeader: ["生产派工单"],
exportFooter: [], exportFooter: [],
// end // end
height: 200, height: 200,
modelFlag:false,
modelInputFlag:true,
selectList:[],
modelFlag: false,
modelInputFlag: true,
selectList: [],
scheduleRow: {}, scheduleRow: {},
pageData: { pageData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -187,21 +177,21 @@
planStartTime: '', planStartTime: '',
}, },
searchData: { searchData: {
site:'',
orderNo:this.$route.query.orderNo,
site: '',
orderNo: this.$route.query.orderNo,
checked: true, checked: true,
partNo:'',
sResourceID:'',
workCenterNo:'',
date1:'',
date2:'',
date3:'',
date4:'',
date5:'',
date6:'',
user:this.$store.state.user.name
},
dataList:[],
partNo: '',
sResourceID: '',
workCenterNo: '',
date1: '',
date2: '',
date3: '',
date4: '',
date5: '',
date6: '',
user: this.$store.state.user.name
},
dataList: [],
dataListLoading: false, dataListLoading: false,
buttons: { buttons: {
settingLanguageList: '按语言设置', settingLanguageList: '按语言设置',
@ -939,7 +929,7 @@
columnWidth: 100 columnWidth: 100
} }
], ],
queryTable:{
queryTable: {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
tableId: "6023Table", tableId: "6023Table",
@ -961,48 +951,72 @@
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){
if (this.tagNo === 24){
getBaseData(val) {
if (this.tagNo === 24) {
this.searchData.workCenterNo = val.WorkCenterNo this.searchData.workCenterNo = val.WorkCenterNo
} }
if (this.tagNo === 88){
if (this.tagNo === 88) {
this.searchData.sResourceID = val.ResourceID this.searchData.sResourceID = val.ResourceID
} }
if (this.tagNo === 5){
if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo this.searchData.partNo = val.PartNo
} }
if (this.tagNo === 18){
if (this.tagNo === 18) {
this.searchData.site = val.Site this.searchData.site = val.Site
} }
}, },
// //
getBaseList(val){
getBaseList(val) {
this.tagNo = val this.tagNo = val
this.$nextTick(() => { this.$nextTick(() => {
let strVal = ""; let strVal = "";
if (val === 24){
if (val === 24) {
strVal = this.searchData.workCenterNo strVal = this.searchData.workCenterNo
} }
if (val === 88){
if (val === 88) {
strVal = this.searchData.sResourceID strVal = this.searchData.sResourceID
} }
if (val === 5){
if (val === 5) {
strVal = this.searchData.partNo strVal = this.searchData.partNo
} }
if (val === 18){
if (val === 18) {
strVal = this.searchData.site strVal = this.searchData.site
} }
this.$refs.baseList.init(val,strVal)
this.$refs.baseList.init(val, strVal)
}) })
}, },
getData(){
getData() {
searchProductionDispatchList(this.searchData).then(({data}) => { searchProductionDispatchList(this.searchData).then(({data}) => {
this.dataList = data.rows this.dataList = data.rows
}); });
@ -1043,17 +1057,17 @@
}, },
/*当前值发生变化的时候修改*/ /*当前值发生变化的时候修改*/
currentSchedulingRow(row, oldRow){
currentSchedulingRow(row, oldRow) {
// //
if(row){
if (row) {
this.scheduleRow = JSON.parse(JSON.stringify(row)); this.scheduleRow = JSON.parse(JSON.stringify(row));
} }
}, },
/*提示取消派工单*/ /*提示取消派工单*/
warnCancelScheduleConfirm(row, $event, column){
warnCancelScheduleConfirm(row, $event, column) {
// //
if(!this.scheduleRow){
if (!this.scheduleRow) {
this.$message.warning('请先选择派工单!'); this.$message.warning('请先选择派工单!');
return false; return false;
} }
@ -1062,14 +1076,14 @@
confirmButtonText: '确认', confirmButtonText: '确认',
celButtonText: '取消', celButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() =>{
}).then(() => {
// //
this.cancelScheduleBun(); this.cancelScheduleBun();
}); });
}, },
/*取消派工单的操作*/ /*取消派工单的操作*/
cancelScheduleBun(){
cancelScheduleBun() {
// //
this.pageData.orderNo = this.scheduleRow.orderNo; this.pageData.orderNo = this.scheduleRow.orderNo;
this.pageData.itemNo = this.scheduleRow.itemNo; this.pageData.itemNo = this.scheduleRow.itemNo;
@ -1082,9 +1096,9 @@
this.pageData.planStartTime = this.scheduleRow.planStartTime; this.pageData.planStartTime = this.scheduleRow.planStartTime;
// //
cancelScheduleWithScheduleQuery(this.pageData).then(({data}) => { cancelScheduleWithScheduleQuery(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.success(data.msg); this.$message.success(data.msg);
// //
this.getData(); this.getData();
@ -1184,11 +1198,11 @@
this.getTableUserColumn(); this.getTableUserColumn();
} }
}
}
</script> </script>
<style >
.el-textarea__inner {
<style>
.el-textarea__inner {
padding: 5px 5px; padding: 5px 5px;
}
}
</style> </style>

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