成品工单加顺序

yangwl
zhaoxiaolin 1 year ago
parent 92ff4350e6
commit da2b7358b3

@ -33,6 +33,19 @@ export function getProRoutes(prodCode) {
})
}
// 获取当天的递增工单执行顺序
export function getProSortNo(productDate) {
const data = {
productDate
}
return request({
url: '/plan/order/getProSortNo',
method: 'put',
data: data
})
}
// 通过工艺code获取设备信息
export function getProEquipment(routeCode) {
return request({

@ -361,7 +361,7 @@
:total="consumeTotal"
:page.sync="consumeQueryParams.consumePageNum"
:limit.sync="consumeQueryParams.consumePageSize"
@pagination="getReportWorkConsumeList"
@pagination="getList"
/>
</el-dialog>
@ -370,7 +370,6 @@
<script>
import { listReportWork, getReportWork, delReportWork, addReportWork, updateReportWork } from "@/api/mes/reportWork";
import { listReportWorkConsume, getReportWorkConsume, delReportWorkConsume, addReportWorkConsume, updateReportWorkConsume} from "@/api/mes/reportWorkConsume";
import ReportWorkConsume from "./reportWorkConsume.vue";
export default {
@ -543,7 +542,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加报工报表";
this.title = "添加报工记录";
this.optType = "add";
},
/** 修改按钮操作 */

@ -388,13 +388,15 @@
</el-form-item>
</el-col>
<el-col :offset="1" :span="7">
<el-form-item label="选择设备:">
<el-cascader
@focus="changeEquipment"
:options="eRouteOptions"
:props="eRouteProps"
v-model="splitForm.prodLineCodeArray"
clearable></el-cascader>
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: ">
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :offset="1" :span="7">
<el-form-item label="工单排序(插单<=0)" label-width="130px">
<el-input type="number" v-model="splitForm.sortNo"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -416,11 +418,17 @@
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
</el-form-item>
</el-col>
<el-col :offset="1" :span="5">
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: ">
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="选择设备:">
<div style="height: 130px;overflow-y: auto;">
<el-cascader
:options="eRouteOptions"
:props="eRouteProps"
v-model="splitForm.prodLineCodeArray"
clearable></el-cascader>
</div>
</el-form-item>
</el-col>
</el-row>
@ -483,7 +491,7 @@
import {
getCascadeProOrder,
getProEquipment,
getProRoutes,
getProRoutes,getProSortNo,
getProShifts,
getWorkOrderList,
subSplitOrder,
@ -801,6 +809,7 @@ export default {
splitBtn(e) {
//
var row;
let _this = this;
getCascadeProOrder(e.orderCode).then(response => {
row = response.data
@ -843,6 +852,12 @@ export default {
this.routes = response.data
})
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
//
getProSortNo(ymd).then(response => {
_this.splitForm.sortNo = response
})
this.workerLoading = true // true
//
getWorkOrderList(row.id).then(response => {
@ -946,7 +961,8 @@ export default {
},
// -
checkDate(e) {
var now = new Date()
var now = new Date();
let _this = this;
if (e < now) {
e = now
this.splitForm.productDate = now
@ -954,6 +970,12 @@ export default {
message: "工单日期不能早于今天",
type: "warning"
})
}else{
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
//
getProSortNo(ymd).then(response => {
_this.splitForm.sortNo = response
})
}
},
// -
@ -1068,6 +1090,13 @@ export default {
})
return
}
if (this.splitForm.sortNo == null) {
this.$message({
message: '工单生产顺序不能为空!',
type: 'warning'
})
return
}
if (this.splitForm.prodLineCodeArray.length == 0) {
this.$message({
message: '请选择各流程节点的设备!',
@ -1139,7 +1168,8 @@ export default {
shiftId: this.splitForm.shiftId,
splitNum: this.splitForm.splitNum,
product: this.productData[0],
routeCode: this.splitForm.routeCode
routeCode: this.splitForm.routeCode,
sortNo: this.splitForm.sortNo
}
subSplitOrder(data).then(response => {
@ -1160,7 +1190,7 @@ export default {
splitNum: null,
productDate: null,
shiftId: null,
formFields: []
formFields: [],
}
this.formFields = [{
batchCode: '',
@ -1256,11 +1286,13 @@ export default {
handleSyncSAP() {
this.loading = true;
let _this = this;
this.$modal.confirm('是否确认SAP同步操作步骤').then(function () {
return syncSAP()
this.$modal.confirm('是否确认SAP同步操作步骤执行后需要一分钟后查看同步结果').then(function () {
_this.loading = false;
syncSAP()
}).then(() => {
this.getList()
this.loading = false;
//this.getList()
_this.loading = false;
this.$modal.msgSuccess('同步成功')
}).catch(
function (e) {

@ -395,6 +395,10 @@
<el-form-item v-if="checkType" size="small" label="分配车数:">
<el-input disabled type="number" @input="changeCarNum" v-model="splitForm.carNum"></el-input>
</el-form-item>
<el-form-item v-else label="工单排序(插单<=0)" label-width="130px">
<el-input type="number" v-model="splitForm.sortNo" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -526,7 +530,7 @@ import {
listWorkorder,
delWorkorder,
downWorkorder,
getOrderAndWork,
getOrderAndWork,getProSortNo,
getWorkBatchList,
subChangeWorkOrder,
checkWorkOrder
@ -890,6 +894,11 @@ export default {
}
//
if (this.productData[0],prototype != 'white'){
if(this.splitData[0].sortNo != null){
this.splitForm.sortNo = this.splitData[0].sortNo
}
//
function setAtrr1(order, work) {
order.quantitySplit = Number(order.quantitySplit) - Number(work.quantitySplit);
@ -901,6 +910,7 @@ export default {
}
setAtrr1(this.productData[0], this.splitData[0]);
}
})

Loading…
Cancel
Save