Commit a9654517 authored by renjintao's avatar renjintao

ordersend

parent f978979b
...@@ -304,6 +304,9 @@ export default { ...@@ -304,6 +304,9 @@ export default {
}, },
getTimeQuotationFD(value) { getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = value; this.orderForm.QuotationFinishDate = value;
},
p(s) {
return s < 10 ? "0" + s : s;
} }
}, },
created() { created() {
......
...@@ -35,6 +35,9 @@ export default { ...@@ -35,6 +35,9 @@ export default {
pauseCauseGetpaged(params){//获取工单暂停记录 pauseCauseGetpaged(params){//获取工单暂停记录
return Api.get(`${PlanUrl}/orderexecutepausecause/getpaged`, params); return Api.get(`${PlanUrl}/orderexecutepausecause/getpaged`, params);
}, },
orderrecovery(params) {//订单回收
return Api.post(`${PlanUrl}/mesorders/orderrecovery`, params);
},
// getplantdepartments(params) {// 组织为”车间“的部门 // getplantdepartments(params) {// 组织为”车间“的部门
// return Api.get(`${systemUrl}/department/getplantdepartments`, params); // return Api.get(`${systemUrl}/department/getplantdepartments`, params);
......
...@@ -28,7 +28,30 @@ ...@@ -28,7 +28,30 @@
<Record :eid="recordId" /> <Record :eid="recordId" />
</Modal> </Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM"> <Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM">
<Speed :result="result" :load="loading" :executeId="dispatchExecuteId" :orderId="orderId" /> <Speed :result="result" :load="loading" :executeId="dispatchExecuteId" :orderId="orderId" />
</Modal>
<Modal v-model="recycleModal" title="确定回收订单" width="600" class="suspend">
<Form ref="form" :model="recovery" :rules="rulesRecycle" :label-width="120">
<Row>
<Col :span="24">
<FormItem :label="l('mesCode')">{{mesCode}}</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('demandFinishDate')" prop="demandFinishDate">
<DatePicker
type="date"
placeholder="请选择日期"
style="width:240px"
v-model="recovery.demandFinishDate"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<div slot="footer">
<Button @click="cancelRecycle">取消</Button>
<Button type="primary" @click="changeFinishiDate">确定</Button>
</div>
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -50,8 +73,8 @@ export default { ...@@ -50,8 +73,8 @@ export default {
data() { data() {
return { return {
result: [], result: [],
dispatchExecuteId:null,//任务id dispatchExecuteId: null, //任务id
orderId:null,//订单id orderId: null, //订单id
SpeedModal: false, SpeedModal: false,
rowSuspend: {}, rowSuspend: {},
recordId: 0, recordId: 0,
...@@ -64,6 +87,7 @@ export default { ...@@ -64,6 +87,7 @@ export default {
suspendModal: false, suspendModal: false,
recordModal: false, recordModal: false,
deletelModal: false, deletelModal: false,
recycleModal: false,
curId: 0, curId: 0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
...@@ -175,7 +199,7 @@ export default { ...@@ -175,7 +199,7 @@ export default {
title: this.l("productName"), title: this.l("productName"),
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true
}, },
{ {
...@@ -245,7 +269,7 @@ export default { ...@@ -245,7 +269,7 @@ export default {
code: "mes_xingchi_plan.order_material.routingType", code: "mes_xingchi_plan.order_material.routingType",
easy: true, easy: true,
high: true, high: true,
width: 100, width: 100
}, },
{ {
title: this.l("jindu"), title: this.l("jindu"),
...@@ -334,7 +358,7 @@ export default { ...@@ -334,7 +358,7 @@ export default {
key: "remark", key: "remark",
title: this.l("remark"), title: this.l("remark"),
align: "center", align: "center",
hide:true hide: true
}, },
{ {
title: "暂停记录", title: "暂停记录",
...@@ -362,7 +386,9 @@ export default { ...@@ -362,7 +386,9 @@ export default {
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
h( h(
params.row.status == 5&&params.row.upSplitId==0 ? "Button" : "", //订单状态暂停,启动 params.row.status == 5 && params.row.upSplitId == 0
? "Button"
: "", //订单状态暂停,启动
{ {
props: { props: {
type: "error", type: "error",
...@@ -385,13 +411,16 @@ export default { ...@@ -385,13 +411,16 @@ export default {
"" ""
), ),
h( h(
params.row.status == 6&&params.row.upSplitId==0 ? "Button" : "", //订单状态执行中,暂停 params.row.status == 6 && params.row.upSplitId == 0
? "Button"
: "", //订单状态执行中,暂停
{ {
props: { props: {
type: "success", type: "success",
size: "small", size: "small",
icon: "ios-pause", icon: "ios-pause",
ghost: true ghost: true,
tooltip: "暂停"
}, },
style: { style: {
fontSize: "18px", fontSize: "18px",
...@@ -406,12 +435,44 @@ export default { ...@@ -406,12 +435,44 @@ export default {
} }
}, },
"" ""
),
h(
params.row.status == 5 && params.row.upSplitId > 0 ? "op" : "", //订单状态执行中,暂停
{
attrs: {
icon: "md-sync",
type: "icon",
title: "回收订单",
oprate: "edit",
msg: "确认要恢复工序吗?"
},
on: {
click: () => {
this.recycle(params.row);
}
}
}
) )
]); ]);
} }
} }
], ],
loading: false loading: false,
recovery: {
orderId: null,
demandFinishDate: "" //计划完成时间
},
mesCode: "",
rulesRecycle: {
demandFinishDate: [
{
required: true,
message: "请选择计划完成时间",
trigger: "change",
type: "date"
}
]
}
}; };
}, },
mounted() {}, mounted() {},
...@@ -438,19 +499,21 @@ export default { ...@@ -438,19 +499,21 @@ export default {
this.result = []; this.result = [];
this.loading = true; this.loading = true;
this.SpeedModal = true; this.SpeedModal = true;
this.dispatchExecuteId=row.dispatchExecuteId this.dispatchExecuteId = row.dispatchExecuteId;
this.orderId=row.id this.orderId = row.id;
Api.info({ Api.info({
routingHeaderId: row.routingHeaderId, routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId dispatchExecuteId: row.dispatchExecuteId
}).then(r => { })
if (r.success) { .then(r => {
this.result = r.result; if (r.success) {
this.loading = false; this.result = r.result;
} this.loading = false;
}).catch(err=>{ }
this.$Message.error("连接错误"); })
}); .catch(err => {
this.$Message.error("连接错误");
});
} }
}, },
suspendOk() { suspendOk() {
...@@ -499,6 +562,53 @@ export default { ...@@ -499,6 +562,53 @@ export default {
} }
}); });
}, },
recycle(row) {
//回收订单
this.recycleModal = true;
this.mesCode = row.mesCode;
this.recovery = {
orderId: row.id,
demandFinishDate: row.demandFinishDate
};
},
changeFinishiDate() {
let temTime = this.recovery.demandFinishDate;
this.recovery.demandFinishDate = "";
this.recovery.demandFinishDate = this.getFormatDateEnd(temTime);
Api.orderrecovery(this.recovery)
.then(res => {
if (res.success) {
this.$Message.success("回收成功");
this.$refs.grid.reload(this.easySearch);
this.recycleModal = false;
}
})
.catch(err => {
this.$Message.error("数据连接错误");
});
},
cancelRecycle() {
this.mesCode = "";
this.recovery = {
orderId: null,
demandFinishDate: "" //计划完成时间
};
this.recycleModal = false;
},
getFinishedDate(value) {
this.recovery.demandFinishDate = value;
},
getFormatDateEnd(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate()) +
" 23:59:59";
return resDate;
},
//截取字符串 //截取字符串
sliceStr(str, lenS, lenE) { sliceStr(str, lenS, lenE) {
return str.slice(lenS, lenE); return str.slice(lenS, lenE);
...@@ -507,6 +617,9 @@ export default { ...@@ -507,6 +617,9 @@ export default {
this.curId = 0; this.curId = 0;
this.suspendModal = false; this.suspendModal = false;
}, },
p(s) {
return Number(s) < 10 ? "0" + s : s;
},
l(key) { l(key) {
let vkey = "mes_order_watch" + "." + key; let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment