Commit 10eb0d8e authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents e2b29d32 b7502324
...@@ -119,15 +119,15 @@ ...@@ -119,15 +119,15 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('run_time')" prop="run_time"> <FormItem :label="l('run_time')" prop="run_time">
<span v-text="run_time"></span> <span v-text="run_time"></span>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Divider /> <Divider />
<FormItem :label="l('isDiscrete')" prop="lisan"> <FormItem :label="l('isDiscrete')" prop="isDiscrete">
<i-switch v-model="entity.lisan" size="large"> <i-switch v-model="entity.isDiscrete" size="large">
<span slot="open"></span> <span slot="open"></span>
<span slot="close"></span> <span slot="close"></span>
</i-switch> </i-switch>
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
overTime: "不加班", //"六日加班", 不加班 加班 overTime: "不加班", //"六日加班", 不加班 加班
efficiencyValue: 11, // 效率系数, 必须大于 0 efficiencyValue: 11, // 效率系数, 必须大于 0
shopId: null, shopId: null,
lisan: true, isDiscrete: true,
isDiscrete: "否", isDiscrete: "否",
discrete: 1, //离散数值 必须大于 1 discrete: 1, //离散数值 必须大于 1
multiple: true, multiple: true,
...@@ -231,9 +231,15 @@ export default { ...@@ -231,9 +231,15 @@ export default {
type: Number, type: Number,
default: 0 default: 0
}, },
run_time:{ run_time: {
type: Number, type: Number,
default:0 default: 0
},
row: {
type: Object,
default: () => {
return null;
}
} }
}, },
created() { created() {
...@@ -272,26 +278,37 @@ export default { ...@@ -272,26 +278,37 @@ export default {
this.entity.over = u.OverTime == "不加班"; this.entity.over = u.OverTime == "不加班";
this.entity.overTime = u.parameterValue; this.entity.overTime = u.parameterValue;
} else if (u.parametersCode == "Discrete") { } else if (u.parametersCode == "Discrete") {
this.entity.lisan = u.parameterValue == "是"; this.entity.isDiscrete = u.parameterValue == "是";
this.entity.isDiscrete = u.parameterValue; this.entity.isDiscrete = u.parameterValue;
} }
}); });
}, },
handleSubmit() { handleSubmit() {
alert(2)
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
alert(3)
if (valid) { if (valid) {
if(this.opTaskPk==0&&this.partTaskPk>0&&this.entity.flog<1){ alert(4)
this.$Message.error("计划参数调整参数应用范围不能是工序级的") if (
this.entity.flog=1; this.opTaskPk == 0 &&
this.partTaskPk > 0 &&
this.entity.flog < 1
) {
this.$Message.error("计划参数调整参数应用范围不能是工序级的");
this.entity.flog = 1;
return; return;
} }
this.entity.multipleEquipIds = this.entity.multipleEquipPks.join(); if(this.entity.multipleEquipPks){
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 ? "不加班" : "加班";
this.entity.isDiscrete = this.entity.lisan ? "是" : "否"; this.entity.isDiscrete = this.entity.isDiscrete ? "是" : "否";
this.entity.multipleEquip = this.entity.multiple ? "是" : "否"; this.entity.multipleEquip = this.entity.multiple ? "是" : "否";
Api.apsschedulupdateparameter(this.entity) Api.apsschedulupdateparameter(this.entity)
.then(res => { .then(res => {
alert(5)
if (res.result.state) { if (res.result.state) {
this.$Message.success(res.result.msg); this.$Message.success(res.result.msg);
this.$emit("on-parameter-ok"); this.$emit("on-parameter-ok");
...@@ -336,11 +353,35 @@ export default { ...@@ -336,11 +353,35 @@ export default {
}, },
opTaskPk(v, n) { opTaskPk(v, n) {
this.entity.opTaskPk = v; this.entity.opTaskPk = v;
if(v>0){
let entity={
partTaskPk: this.row.part_task_pk,
opTaskPk: this.row.op_task_pk,
taskSeq: this.row.task_seq,
flog: 5, //参数应用范围
calId: null,
planState: true,
planMethod: this.row.plan_method, // 平行 重叠
over: false,
overTime: this.row.over_time, //"六日加班", 不加班 加班
efficiencyValue:this.row.efficiency_value, // 效率系数, 必须大于 0
shopId: null,
isDiscrete: this.row.isdiscrete,
isDiscrete: "否",
discrete: this.row.discrete_value, //离散数值 必须大于 1
multiple: true,
multipleEquip: this.row.multi_machine, //"是否多台安排设备", 否 是
multipleCount: 1, //多台数量
multipleEquipPks: [],
multipleEquipIds: "", //"设备id", 用英文逗号分隔
}
this.entity=entity
}
this.entity.taskSeq = this.taskSeq; this.entity.taskSeq = this.taskSeq;
}, },
count(v, n) { count(v, n) {
this.entity.discrete = 1; this.entity.discrete = 1;
} },
} }
}; };
</script> </script>
...@@ -375,7 +416,7 @@ export default { ...@@ -375,7 +416,7 @@ export default {
} }
} }
} }
.h50{ .h50 {
height: 115px; height: 115px;
} }
.click-btn { .click-btn {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
:partTaskPk="setParams.partTaskPk" :partTaskPk="setParams.partTaskPk"
:taskSeq="setParams.taskSeq" :taskSeq="setParams.taskSeq"
:count="setParams.count" :count="setParams.count"
:row="rowData"
/> />
</Modal> </Modal>
</div> </div>
...@@ -429,6 +430,7 @@ export default { ...@@ -429,6 +430,7 @@ export default {
taskSeq: row.task_seq, taskSeq: row.task_seq,
count: row.put_into_qty count: row.put_into_qty
}; };
this.rowData=row
this.setParsModal = true; this.setParsModal = true;
}, },
//单个工序进行参数设置end---- //单个工序进行参数设置end----
......
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