Commit 8a7ddb29 authored by 佟礼's avatar 佟礼

料单确认

parents 4518c49d 9c542e45
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<state code="plan.order.guestName" :value="info.orderInfo.guestName+''" type="text"></state> <state code="plan.order.guestName" :value="info.orderInfo.guestName+''" type="text"></state>
</Filed> </Filed>
<Filed :span="6" :name="l('functionaryOffice')">>{{info.orderInfo.functionaryOffice}}</Filed> <Filed :span="6" :name="l('functionaryOffice')">{{info.orderInfo.functionaryOffice}}</Filed>
<Filed :span="6" :name="l('taskRequire')">{{info.orderInfo.taskRequire}}</Filed> <Filed :span="6" :name="l('taskRequire')">{{info.orderInfo.taskRequire}}</Filed>
<Filed :span="6" :name="l('taskInputDate')">{{info.orderInfo.taskInputDate}}</Filed> <Filed :span="6" :name="l('taskInputDate')">{{info.orderInfo.taskInputDate}}</Filed>
<Filed :span="6" :name="l('mainDepartmentId')"> <Filed :span="6" :name="l('mainDepartmentId')">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</FormItem> </FormItem>
</div> </div>
</div> </div>
<div class="filedset"> <div class="filedset h50">
<p class="title">快速设置</p> <p class="title">快速设置</p>
<div class="icon"> <div class="icon">
<Dropdown trigger="hover"> <Dropdown trigger="hover">
...@@ -59,23 +59,30 @@ ...@@ -59,23 +59,30 @@
</Dropdown> </Dropdown>
</div> </div>
<div class="slider"> <div class="slider">
<h3 v-text="entity.level"></h3>
<Slider <Slider
v-model="entity.level" v-model="level"
:step="1" :step="1"
:min="0" :min="0"
:max="levelRules.length-1" :max="5"
:marks="levelMarks" :marks="levelMarks"
show-stops show-stops
@on-change="setParameter" @on-change="setParameter"
></Slider> ></Slider>
</div> </div>
</div> </div>
<div class="filedset"> <div class="filedset h50">
<p class="title">应用范围</p> <p class="title">应用范围</p>
<div class="slider"> <div class="slider">
<Slider v-model="entity.flog" :step="1" :min="0" :max="5" :marks="marks" size="large"></Slider> <Slider
v-model="entity.flog"
:step="1"
:min="0"
:max="5"
:marks="marks"
:disabled="partTaskPk==0"
size="large"
></Slider>
<!-- :disabled="partTaskPk==0" -->
</div> </div>
</div> </div>
</Col> </Col>
...@@ -105,9 +112,19 @@ ...@@ -105,9 +112,19 @@
<span slot="close">不加班</span> <span slot="close">不加班</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
<Row>
<Col :span="12">
<FormItem :label="l('efficiencyValue')" prop="efficiencyValue"> <FormItem :label="l('efficiencyValue')" prop="efficiencyValue">
<InputNumber v-model="entity.efficiencyValue" :step="0.1"></InputNumber> <InputNumber v-model="entity.efficiencyValue" :step="0.01"></InputNumber>
</FormItem> </FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('run_time')" prop="run_time">
<span v-text="run_time"></span>
</FormItem>
</Col>
</Row>
<Divider /> <Divider />
<FormItem :label="l('isDiscrete')" prop="lisan"> <FormItem :label="l('isDiscrete')" prop="lisan">
<i-switch v-model="entity.lisan" size="large"> <i-switch v-model="entity.lisan" size="large">
...@@ -116,10 +133,16 @@ ...@@ -116,10 +133,16 @@
</i-switch> </i-switch>
</FormItem> </FormItem>
<FormItem :label="l('discrete')" prop="discrete"> <FormItem :label="l('discrete')" prop="discrete">
<InputNumber v-model="entity.discrete"></InputNumber> <InputNumber
v-model="entity.discrete"
:disabled="count==0"
:min="1"
:max="count==0?1:count"
></InputNumber>
<!-- <span>{{count}}</span> -->
</FormItem> </FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent"> <FormItem :label="l('discrete_percent')" prop="discrete_percent">
<InputNumber v-model="entity.discrete_percent"></InputNumber> <span v-text="k"></span>
</FormItem> </FormItem>
</div> </div>
</Col> </Col>
...@@ -140,8 +163,7 @@ export default { ...@@ -140,8 +163,7 @@ export default {
partTaskPk: 0, partTaskPk: 0,
opTaskPk: 0, opTaskPk: 0,
taskSeq: "", taskSeq: "",
flog: 0, //参数应用范围 flog: 5, //参数应用范围
level: 0, //参数规则ID
calId: null, calId: null,
planState: true, planState: true,
planMethod: "重叠", // 平行 重叠 planMethod: "重叠", // 平行 重叠
...@@ -158,7 +180,9 @@ export default { ...@@ -158,7 +180,9 @@ export default {
multipleEquipPks: [], multipleEquipPks: [],
multipleEquipIds: "" //"设备id", 用英文逗号分隔 multipleEquipIds: "" //"设备id", 用英文逗号分隔
}, },
levelRules:[], // discrete_percent:1,//"离散度"
level: 0, //参数规则ID
levelRules: [],
levelMarks: { levelMarks: {
0: "慢", 0: "慢",
5: "快" 5: "快"
...@@ -206,6 +230,10 @@ export default { ...@@ -206,6 +230,10 @@ export default {
//生产计划数量 //生产计划数量
type: Number, type: Number,
default: 0 default: 0
},
run_time:{
type: Number,
default:0
} }
}, },
created() { created() {
...@@ -224,14 +252,12 @@ export default { ...@@ -224,14 +252,12 @@ export default {
apsGet() { apsGet() {
Api.apsGetall().then(res => { Api.apsGetall().then(res => {
if (res.success) { if (res.success) {
console.log(res.result)
this.levelRules = res.result; this.levelRules = res.result;
let max=this.levelRules.length-1; // let max = this.levelRules.length - 1;
// let marks = `{0:"慢", ${max}:"快"}`; // let marks = `{0:"慢", ${max}:"快"}`;
// marks = marks.replace(/(\d+):/g,"\"$1\":"); // marks = marks.replace(/(\d+):/g,"\"$1\":");
// this.levelMarks = JSON.parse(marks); // this.levelMarks = JSON.parse(marks);
// this.entity.level=0; this.level = 0;
} }
}); });
}, },
...@@ -249,12 +275,16 @@ export default { ...@@ -249,12 +275,16 @@ export default {
this.entity.lisan = u.parameterValue == "是"; this.entity.lisan = u.parameterValue == "是";
this.entity.isDiscrete = u.parameterValue; this.entity.isDiscrete = u.parameterValue;
} }
console.log(u);
}); });
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if(this.opTaskPk==0&&this.partTaskPk>0&&this.entity.flog<1){
this.$Message.error("计划参数调整参数应用范围不能是工序级的")
this.entity.flog=1;
return;
}
this.entity.multipleEquipIds = this.entity.multipleEquipPks.join(); this.entity.multipleEquipIds = this.entity.multipleEquipPks.join();
this.entity.planMethod = this.entity.planState ? "重叠" : "平行"; this.entity.planMethod = this.entity.planState ? "重叠" : "平行";
this.entity.overTime = this.entity.over ? "不加班" : "加班"; this.entity.overTime = this.entity.over ? "不加班" : "加班";
...@@ -283,12 +313,34 @@ export default { ...@@ -283,12 +313,34 @@ export default {
return this.$t(vkey) || key; return this.$t(vkey) || key;
} }
}, },
watch:{ computed: {
"entity.partTaskPk"(v,n){ k() {
if(v){ if (this.count == 0) return 0;
else {
return (
(100 * this.count - 100 * this.entity.discrete) / (this.count - 1)
);
} }
} }
},
watch: {
partTaskPk(v, n) {
if (v == 0) {
this.entity.flog = 5;
} else if (v > 0 && this.opTaskPk == 0) {
this.entity.flog = 1;
} else {
this.entity.flog = 0;
}
this.entity.partTaskPk = v;
},
opTaskPk(v, n) {
this.entity.opTaskPk = v;
this.entity.taskSeq = this.taskSeq;
},
count(v, n) {
this.entity.discrete = 1;
}
} }
}; };
</script> </script>
...@@ -323,6 +375,9 @@ export default { ...@@ -323,6 +375,9 @@ export default {
} }
} }
} }
.h50{
height: 115px;
}
.click-btn { .click-btn {
text-align: right; text-align: right;
margin-top: 15px; margin-top: 15px;
......
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('tASKSEQ')" prop="tASKSEQ"> <FormItem :label="l('tASKSEQ')" prop="tASKSEQ">
<Input></Input> <Input v-model="entity.task_seq"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('tASKNAME')" prop="tASKNAME"> <FormItem :label="l('tASKNAME')" prop="tASKNAME">
<Input></Input> <Input v-model="entity.task_name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('sHOPID')" prop="sHOPID"> <FormItem :label="l('sHOPID')" prop="sHOPID">
<!-- v-model="orderSearchForm.orderCat" --> <!-- v-model="orderSearchForm.orderCat" -->
<Select > <Select v-model="entity.sHOPID">
<Option value="" class="option-text">请选择</Option> <Option value="" class="option-text">请选择</Option>
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option> <Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select> </Select>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('eQUIPID')" prop="eQUIPID"> <FormItem :label="l('eQUIPID')" prop="eQUIPID">
<Select > <Select v-model="entity.eQUIPID">
<Option value="" class="option-text">请选择</Option> <Option value="" class="option-text">请选择</Option>
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option> <Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select> </Select>
...@@ -30,16 +30,16 @@ ...@@ -30,16 +30,16 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem label="关重资源名称" prop="rUNTIME"> <FormItem label="关重资源名称" prop="rUNTIME">
<Select > <Select v-model="entity.run_time">
<Option value="" class="option-text">请选择</Option> <Option value="" class="option-text">请选择</Option>
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option> <Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12" v-model="entity.rUNTIME">
<FormItem :label="l('rUNTIME')" prop="rUNTIME"> <FormItem :label="l('rUNTIME')" prop="rUNTIME">
<!-- v-model="value1" --> <!-- v-model="value1" -->
<InputNumber :max="100" :min="1"></InputNumber> <InputNumber v-model="entity.run_time" :max="100" :min="1"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -75,10 +75,7 @@ export default { ...@@ -75,10 +75,7 @@ export default {
}, },
methods: { methods: {
load(v) { load(v) {
// Api.get({ id: v }).then((r) => { this.entity = v
// this.entity = r.result
// this.$emit('on-load')
// })
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
...@@ -111,9 +108,10 @@ export default { ...@@ -111,9 +108,10 @@ export default {
} }
}, },
watch: { watch: {
eid(v) { row(v) {
if (v != 0) { if (v != {}) {
this.load(v) //alert(JSON.stringify(v))
this.entity = v
} }
} }
} }
......
<template> <template>
<div style="padding:0"> <div style="padding: 0;">
<DataGrid <DataGrid
style="margin-top:-25px;margin-bottom:-25px" style="margin-top: -25px; margin-bottom: -25px;"
:columns="columns" :columns="columns"
ref="grid" ref="grid"
:easy="false" :easy="false"
...@@ -12,15 +12,26 @@ ...@@ -12,15 +12,26 @@
:page="false" :page="false"
:height="gridHeight" :height="gridHeight"
></DataGrid> ></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :eid="curId" @on-close="cancel" /> <Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal> </Modal>
<Modal v-model="insertlModal" title="插单" @on-ok="insertOk" @on-cancel="cancel"> <Modal
<p>确定进行 {{insertTItle}} 操作?</p> v-model="insertlModal"
:title="insertTItle"
@on-ok="insertOk"
@on-cancel="cancel"
>
<p>确定进行 {{ insertTItle }} 操作?</p>
</Modal> </Modal>
<Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000">
<Add :eid="curId" @on-close="cancel" /> <Add
@on-parameter-ok="addOk"
@on-close="cancel"
:opTaskPk="setParams.opTaskPk"
:partTaskPk="setParams.partTaskPk"
:taskSeq="setParams.taskSeq"
:count="setParams.count"
/>
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -32,10 +43,10 @@ export default { ...@@ -32,10 +43,10 @@ export default {
name: "list", name: "list",
components: { components: {
Edit, Edit,
Add Add,
}, },
props: { props: {
rowId: { type: Number } rowId: { type: Number },
}, },
data() { data() {
return { return {
...@@ -43,8 +54,8 @@ export default { ...@@ -43,8 +54,8 @@ export default {
easySearch: { easySearch: {
keys: { keys: {
op: "task_seq", op: "task_seq",
value: null value: null,
} },
}, },
setParsModal: false, setParsModal: false,
editModal: false, editModal: false,
...@@ -57,7 +68,7 @@ export default { ...@@ -57,7 +68,7 @@ export default {
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ title: " ", width: 130 }, { title: " ", width: 130 },
{ {
key: "important_flag",//insert_flag? key: "important_flag", //insert_flag?
title: this.l("important_flag"), title: this.l("important_flag"),
align: "center", align: "center",
high: true, high: true,
...@@ -69,9 +80,9 @@ export default { ...@@ -69,9 +80,9 @@ export default {
props: { props: {
content: content:
params.row.important_flag == 1 ? "取消插单" : "进行插单", params.row.important_flag == 1 ? "取消插单" : "进行插单",
placement: "top" placement: "top",
}, },
class: "ico" class: "ico",
}, },
[ [
h("Icon", { h("Icon", {
...@@ -81,43 +92,43 @@ export default { ...@@ -81,43 +92,43 @@ export default {
? "ios-flag" ? "ios-flag"
: "ios-flag-outline", : "ios-flag-outline",
size: 20, size: 20,
color: params.row.important_flag == 1 ? "#2680EB" : "#aaa" color: params.row.important_flag == 1 ? "#2680EB" : "#aaa",
}, },
on: { on: {
click: () => this.changeFlag(params.row.id, params.index) click: () => this.changeFlag(params.row.id, params.index),
} },
}) }),
] ]
); );
} },
}, },
{ {
key: "task_seq", key: "task_seq",
title: this.l("task_seq"), title: this.l("task_seq"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "op_task_pk", key: "op_task_pk",
title: this.l("op_task_pk"), title: this.l("op_task_pk"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "task_name", key: "task_name",
title: this.l("task_name"), title: this.l("task_name"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "part_task_pk", key: "part_task_pk",
title: this.l("part_task_pk"), title: this.l("part_task_pk"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
...@@ -125,7 +136,7 @@ export default { ...@@ -125,7 +136,7 @@ export default {
title: this.l("put_into_qty"), title: this.l("put_into_qty"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "plan_start", key: "plan_start",
...@@ -133,7 +144,7 @@ export default { ...@@ -133,7 +144,7 @@ export default {
align: "center", align: "center",
high: true, high: true,
width: 140, width: 140,
hide: true hide: true,
}, },
{ {
key: "plan_finish", key: "plan_finish",
...@@ -141,26 +152,26 @@ export default { ...@@ -141,26 +152,26 @@ export default {
align: "center", align: "center",
high: true, high: true,
width: 140, width: 140,
hide: true hide: true,
}, },
{ {
key:"first_equip", key: "first_equip",
title:this.l("first_equip"), title: this.l("first_equip"),
align:"left", align: "left",
easy:true, easy: true,
high:true, high: true,
}, },
{ {
key: "setup_time", key: "setup_time",
title: this.l("setup_time"), title: this.l("setup_time"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "run_time", key: "run_time",
title: this.l("run_time"), title: this.l("run_time"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "outside_time", key: "outside_time",
...@@ -173,20 +184,20 @@ export default { ...@@ -173,20 +184,20 @@ export default {
title: this.l("transport_time"), title: this.l("transport_time"),
align: "right", align: "right",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "check_time", key: "check_time",
title: this.l("check_time"), title: this.l("check_time"),
align: "right", align: "right",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "efficiency_value", key: "efficiency_value",
title: this.l("efficiency_value"), title: this.l("efficiency_value"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "machine_rule", key: "machine_rule",
...@@ -194,14 +205,14 @@ export default { ...@@ -194,14 +205,14 @@ export default {
align: "center", align: "center",
easy: true, easy: true,
high: true, high: true,
width: 140 width: 140,
}, },
{ {
key: "singleout", key: "singleout",
title: this.l("singleout"), title: this.l("singleout"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "equip_type", key: "equip_type",
...@@ -209,7 +220,7 @@ export default { ...@@ -209,7 +220,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "first_equip", key: "first_equip",
...@@ -217,48 +228,48 @@ export default { ...@@ -217,48 +228,48 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "cal_id", key: "cal_id",
title: this.l("cal_id"), title: this.l("cal_id"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "plan_method", key: "plan_method",
title: this.l("plan_method"), title: this.l("plan_method"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "over_time", key: "over_time",
title: this.l("over_time"), title: this.l("over_time"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "isdiscrete", key: "isdiscrete",
title: this.l("isdiscrete"), title: this.l("isdiscrete"),
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "discrete_value", key: "discrete_value",
title: this.l("discrete_value"), title: this.l("discrete_value"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "multi_machine", key: "multi_machine",
title: this.l("multi_machine"), title: this.l("multi_machine"),
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "notes", key: "notes",
...@@ -266,7 +277,7 @@ export default { ...@@ -266,7 +277,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
...@@ -275,7 +286,7 @@ export default { ...@@ -275,7 +286,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "workshopcode", key: "workshopcode",
...@@ -283,21 +294,21 @@ export default { ...@@ -283,21 +294,21 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "routing_detail_id", key: "routing_detail_id",
title: this.l("routing_detail_id"), title: this.l("routing_detail_id"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "routing_header_id", key: "routing_header_id",
title: this.l("routing_header_id"), title: this.l("routing_header_id"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "comb_param", key: "comb_param",
...@@ -305,14 +316,14 @@ export default { ...@@ -305,14 +316,14 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "rule_qty", key: "rule_qty",
title: this.l("rule_qty"), title: this.l("rule_qty"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
title: "操作", title: "操作",
...@@ -326,9 +337,9 @@ export default { ...@@ -326,9 +337,9 @@ export default {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
oprate: "detail", oprate: "detail",
title: "工序参数设置" title: "工序参数设置",
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row) },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -336,9 +347,8 @@ export default { ...@@ -336,9 +347,8 @@ export default {
type: "icon", type: "icon",
title: "編輯工序", title: "編輯工序",
oprate: "edit", oprate: "edit",
msg: "确认要移出排产吗?"
}, },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row) },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -346,17 +356,26 @@ export default { ...@@ -346,17 +356,26 @@ export default {
type: "icon", type: "icon",
title: "删除工序", title: "删除工序",
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?",
}, },
on: { click: () => this.remove(params.row, params.index) } on: { click: () => this.remove(params.row, params.index) },
}) }),
]); ]);
} },
} },
], ],
data1: [], data1: [],
insertTItle: "插单", insertTItle: "插单",
selectRoutingDetail: {} //需那种工序 selectRoutingDetail: {}, //需那种工序
//设置参数开始
setParams: {
opTaskPk: 0, //工单ID
partTaskPk: 0, //生产计划ID
taskSeq: "", //工序编号
count: 0,//生产计划数量
},
//设置参数结束
rowData:{},//编辑时传入行数据
}; };
}, },
mounted() { mounted() {
...@@ -369,12 +388,12 @@ export default { ...@@ -369,12 +388,12 @@ export default {
//根据点击副组件传过来id进行加载数据 //根据点击副组件传过来id进行加载数据
loadData(expendId) { loadData(expendId) {
let params = { let params = {
id: expendId id: expendId,
}; };
Api.getbyorderid(params).then(res => { Api.getbyorderid(params).then((res) => {
if (res.success) { if (res.success) {
this.gridHeight = 50; this.gridHeight = 50;
this.gridHeight = (res.result.length + 1) * 48; this.gridHeight = (res.result.length + 1) * 51;
this.data1 = res.result; this.data1 = res.result;
} }
}); });
...@@ -406,15 +425,21 @@ export default { ...@@ -406,15 +425,21 @@ export default {
//插单事件end---- //插单事件end----
//单个工序进行参设置start---- //单个工序进行参设置start----
openParms(id) { openParms(row) {
this.setParams = {
opTaskPk: row.op_task_pk,
partTaskPk: row.part_task_pk,
taskSeq: row.task_seq,
count: row.put_into_qty,
};
this.setParsModal = true; this.setParsModal = true;
}, },
//单个工序进行参数设置end---- //单个工序进行参数设置end----
//编辑工序start---- //编辑工序start----
edit(id) { edit(row) {
this.editModal = true; this.editModal = true;
this.curId = Number(id); this.rowData = row;
}, },
//编辑工序end---- //编辑工序end----
...@@ -425,16 +450,21 @@ export default { ...@@ -425,16 +450,21 @@ export default {
this.selectRoutingDetail = row; this.selectRoutingDetail = row;
let params = { let params = {
partPk: this.selectRoutingDetail.part_task_pk, partPk: this.selectRoutingDetail.part_task_pk,
detailIdstr: this.selectRoutingDetail.routing_detail_id detailIdstr: this.selectRoutingDetail.routing_detail_id,
}; };
Api.removeoptasksimluate(params).then(r => { Api.removeoptasksimluate(params).then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("删除成功"); this.$Message.success("删除成功");
this.data1.splice(this.rowIndex, 1); this.data1.splice(this.rowIndex, 1);
} }
}); });
}, },
addOk() {
this.data1 = [];
this.loadData(this.rowId);
this.setParsModal = false;
this.editModal = false;
},
//删除工序时间end----- //删除工序时间end-----
cancel() { cancel() {
this.curId = 0; this.curId = 0;
...@@ -447,9 +477,8 @@ export default { ...@@ -447,9 +477,8 @@ export default {
l(key) { l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less"></style>
</style>
\ No newline at end of file
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
<DatePicker <DatePicker
type="date" type="date"
placeholder="设置基准日期" placeholder="设置基准日期"
style="width: 150px" style="width: 150px;"
v-model="entity.setTime" v-model="entity.setTime"
@on-change="getTime" @on-change="getTime"
></DatePicker> ></DatePicker>
<a style="font-weight:bold;" @click="addModal=true"> <a style="font-weight: bold;" @click="openAddModel(1)">
<Icon type="ios-options" size="14" />&nbsp;工序参数调整 <Icon type="ios-options" size="14" />&nbsp;工序参数调整
</a> </a>
</template> </template>
...@@ -38,11 +38,29 @@ ...@@ -38,11 +38,29 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="addModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="addModal" title="工序参数设置" footer-hide width="1000">
<Add @on-close="cancel" @on-ok="addOk" /> <Add
@on-close="cancel"
@on-parameter-ok="addOk"
:opTaskPk="setParams.opTaskPk"
:partTaskPk="setParams.partTaskPk"
:taskSeq="setParams.taskSeq"
:count="setParams.count"
/>
</Modal> </Modal>
<Modal v-model="apsModal" title="确定APS排产" @on-ok="apsOk" @on-cancel="cancel"> <Modal v-model="apsModal" title="确定APS排产" @on-ok="apsOk" @on-cancel="cancel">
<p>确定进行APS排产?</p> <p>确定进行APS排产?</p>
</Modal> </Modal>
<Modal v-model="circleModal" title footer-hide :mask-closable="false">
<div slot="close"></div>
<Row>
<Col class="demo-spin-col" span="24">
<Spin fix>
<Icon type="ios-loading" size="36" class="demo-spin-icon-load"></Icon>
<div>APS排产进行中......</div>
</Spin>
</Col>
</Row>
</Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -197,7 +215,7 @@ export default { ...@@ -197,7 +215,7 @@ export default {
title: this.l("badjustflag"), title: this.l("badjustflag"),
align: "left", align: "left",
high: true, high: true,
hide:true, hide: true
}, },
{ {
title: "操作", title: "操作",
...@@ -213,7 +231,7 @@ export default { ...@@ -213,7 +231,7 @@ export default {
type: "icon", type: "icon",
title: "工序参数设置" title: "工序参数设置"
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openAddModel(2, params.row) }
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -239,7 +257,16 @@ export default { ...@@ -239,7 +257,16 @@ export default {
} }
} }
], ],
arrPartPkId: [] arrPartPkId: [],
//设置参数开始
setParams: {
opTaskPk: 0, //工单ID
partTaskPk: 0, //生产计划ID
taskSeq: "", //工序编号
count: 0 //生产计划数量
},
//设置参数结束
circleModal: false //进度条
}; };
}, },
mounted() { mounted() {
...@@ -258,7 +285,8 @@ export default { ...@@ -258,7 +285,8 @@ export default {
}); });
}, },
addOk() { addOk() {
this.$refs.grid.load(); this.list = [];
this.loadList();
this.addModal = false; this.addModal = false;
this.detailModal = false; this.detailModal = false;
this.editModal = false; this.editModal = false;
...@@ -326,11 +354,12 @@ export default { ...@@ -326,11 +354,12 @@ export default {
this.deletedlModal = false; this.deletedlModal = false;
this.apsModal = false; this.apsModal = false;
}, },
onDragDrop(a, b) {//拖拽排序 onDragDrop(a, b) {
//拖拽排序
//this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b])); //this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b]));
let tempArray=this.list[a] let tempArray = this.list[a];
this.list.splice(a,1) this.list.splice(a, 1);
this.list.splice(b,0,tempArray) this.list.splice(b, 0, tempArray);
}, },
openParms(id) { openParms(id) {
this.addModal = true; this.addModal = true;
...@@ -359,6 +388,7 @@ export default { ...@@ -359,6 +388,7 @@ export default {
}, },
//确定aps排产 //确定aps排产
apsOk() { apsOk() {
this.circleModal = true;
//APS排产前订单优先级功能 //APS排产前订单优先级功能
let parmsOrderpriority = { alls: [] }; let parmsOrderpriority = { alls: [] };
let arryIds = []; let arryIds = [];
...@@ -387,6 +417,7 @@ export default { ...@@ -387,6 +417,7 @@ export default {
if (res2.success) { if (res2.success) {
if (res2.result.res) { if (res2.result.res) {
this.$Message.success("排产计算成功"); this.$Message.success("排产计算成功");
this.circleModal = false;
this.$router.push({ this.$router.push({
name: "aps-results" name: "aps-results"
// params: { customerId: id } // params: { customerId: id }
...@@ -412,6 +443,25 @@ export default { ...@@ -412,6 +443,25 @@ export default {
this.$Message.error("操作失败:排序"); this.$Message.error("操作失败:排序");
} }
}); });
},
//打开设置参数
openAddModel(type, row) {
if (type == 2) {
this.setParams = {
opTaskPk: 0,
partTaskPk: row.part_task_pk,
taskSeq: "",
count: row.plan_qty
};
} else {
this.setParams = {
opTaskPk: 0,
partTaskPk: 0,
taskSeq: "",
count: 0
};
}
this.addModal = true;
} }
} }
}; };
...@@ -420,4 +470,32 @@ export default { ...@@ -420,4 +470,32 @@ export default {
.drag { .drag {
cursor: move; cursor: move;
} }
.demo-spin-icon-load {
animation: ani-demo-spin 1s linear infinite;
}
@keyframes ani-demo-spin {
from {
transform: rotate(0deg);
}
50% {
transform: rotate(180deg);
}
to {
transform: rotate(360deg);
}
}
.demo-spin-col {
height: 100px;
position: relative;
border: 0px solid #eee;
}
.vertical-center-modal {
display: flex;
align-items: center;
justify-content: center;
.ivu-modal {
top: 0;
}
}
</style> </style>
...@@ -14,4 +14,10 @@ export default { ...@@ -14,4 +14,10 @@ export default {
getdetail(params) { getdetail(params) {
return Api.get(`${apsUrl}/scheduletotal/getdetail`, params); return Api.get(`${apsUrl}/scheduletotal/getdetail`, params);
}, },
processschemedispatch(params) {
return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params);
},
moveintoaps() {//跳转进入排产池前判断
return Api.post(`${PlanUrl}/messchedule/moveintoaps`);
},
} }
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
isactive: 0, isactive: 0,
data: [], data: [],
list: [], list: [],
id: "",
columns: [ columns: [
{ {
type: "expand", type: "expand",
...@@ -99,25 +100,25 @@ export default { ...@@ -99,25 +100,25 @@ export default {
{ {
title: "计划开始时间", title: "计划开始时间",
key: "plan_start", key: "plan_start",
width: 220, width: 200,
align: "center" align: "center"
}, },
{ {
title: "计划结束时间", title: "计划结束时间",
key: "plan_start", key: "plan_start",
width: 220, width: 200,
align: "center" align: "center"
}, },
{ {
title: "投料时间", title: "投料时间",
key: "demand_start", key: "demand_start",
width: 220, width: 200,
align: "center" align: "center"
}, },
{ {
title: "节点时间", title: "节点时间",
key: "demand_finish", key: "demand_finish",
width: 220, width: 200,
align: "center" align: "center"
}, },
{ {
...@@ -153,6 +154,7 @@ export default { ...@@ -153,6 +154,7 @@ export default {
}, },
listData(id, index) { listData(id, index) {
this.isactive = index; this.isactive = index;
this.id = id;
Api.paged({ scheduleId: id }) Api.paged({ scheduleId: id })
.then(r => { .then(r => {
if (r.success) { if (r.success) {
...@@ -183,11 +185,33 @@ export default { ...@@ -183,11 +185,33 @@ export default {
} }
}, },
parameter() {}, parameter() {
addOk() {}, Api.processschemedispatch({
cancel() {}, id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
comeBlck() { comeBlck() {
this.$router.push({ path: "/aps/aps" }); this.$router.push({ path: "/aps/aps" });
Api.moveintoaps().then(res => {
if (res.success) {
if (res.result.res) {
this.$router.push({
name: "aps-aps"
});
} else {
this.$router.push({
name: "aps-plan"
});
}
}
});
} }
} }
}; };
......
<style lang="less"> <style lang="less">
@import "../../../processDesign/Process/menu.less"; @import "../processDesign/Process/menu.less";
</style> </style>
<template> <template>
<div class="new_box"> <div class="new_box">
...@@ -335,7 +335,7 @@ export default { ...@@ -335,7 +335,7 @@ export default {
this.newModel = true; this.newModel = true;
}, },
loaddata(orderid) { loaddata(orderid) {
if (this.formValidate.id != 0) {
var url = var url =
`${designUrl}/ordersupport/getbyid?id=` + this.formValidate.id; `${designUrl}/ordersupport/getbyid?id=` + this.formValidate.id;
service.get(`${url}`).then(response => { service.get(`${url}`).then(response => {
...@@ -351,7 +351,7 @@ export default { ...@@ -351,7 +351,7 @@ export default {
obj.actual_quantity = obj.quantity; obj.actual_quantity = obj.quantity;
} }
}); });
}
}, },
SaveLd() {}, SaveLd() {},
......
...@@ -53,7 +53,7 @@ function errorLog (err) { ...@@ -53,7 +53,7 @@ function errorLog (err) {
// 创建一个 axios 实例 // 创建一个 axios 实例
const service = axios.create({ const service = axios.create({
baseURL: Setting.apiBaseURL, baseURL: Setting.apiBaseURL,
timeout: 5000, // 请求超时时间 timeout: 60000, // 请求超时时间
transformRequest:[(data)=>{ transformRequest:[(data)=>{
function dateFormat(date, fmt) { function dateFormat(date, fmt) {
if (null == date || undefined == date) return ''; if (null == date || undefined == date) return '';
......
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