Commit 198fcd9e authored by renjintao's avatar renjintao

aps

parent 0492b90e
...@@ -496,6 +496,11 @@ export default { ...@@ -496,6 +496,11 @@ export default {
}) })
return cols return cols
} }
},
watch:{
"data.length"(){
this.list=this.data;
}
} }
} }
</script> </script>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
style="margin-top:-25px;margin-bottom:-25px" style="margin-top:-25px;margin-bottom:-25px"
:columns="columns" :columns="columns"
ref="grid" ref="grid"
:action="action"
:easy="false" :easy="false"
:high="false" :high="false"
:set="false" :set="false"
...@@ -330,110 +329,7 @@ export default { ...@@ -330,110 +329,7 @@ export default {
} }
} }
], ],
data1: [ data1: [],
{
id: "1",
op_task_pk: "001",
part_task_pk: "001",
task_seq: "1",
task_name: "测试工序1",
put_into_qty: "10",
plan_start: "04/05/2020",
plan_finish: "06/05/2020",
setup_time: "5",
run_time: "1",
transport_time: "1",
check_time: "1",
efficiency_value: "0.5",
singleout: "2",
first_equip: "NTY-0012",
equip_type: "加工设备",
cal_id: "日历id",
machine_rule: "优先",
plan_method: "是",
over_time: "1",
isdiscrete: "是",
discrete_value: "1.2",
multi_machine: "5",
notes: "暂无备注信息test",
insert_flag: 1,
outside_time: "04/06/2020",
taskseq_des: "",
workshopcode: "",
routing_detail_id: "",
routing_header_id: "",
comb_param: "",
rule_qty: ""
},
{
id: "2",
op_task_pk: "002",
part_task_pk: "002",
task_seq: "2",
task_name: "测试工序2",
put_into_qty: "10",
plan_start: "04/05/2020",
plan_finish: "06/05/2020",
setup_time: "5",
run_time: "1",
transport_time: "1",
check_time: "1",
efficiency_value: "0.5",
singleout: "2",
first_equip: "NTY-0012",
equip_type: "加工设备",
cal_id: "日历id",
machine_rule: "优先",
plan_method: "是",
over_time: "1",
isdiscrete: "是",
discrete_value: "1.2",
multi_machine: "5",
notes: "暂无备注信息test",
insert_flag: 0,
outside_time: "04/06/2020",
taskseq_des: "",
workshopcode: "",
routing_detail_id: "",
routing_header_id: "",
comb_param: "",
rule_qty: ""
},
{
id: "3",
op_task_pk: "003",
part_task_pk: "003",
task_seq: "3",
task_name: "测试工序3",
put_into_qty: "10",
plan_start: "04/05/2020",
plan_finish: "06/05/2020",
setup_time: "5",
run_time: "1",
transport_time: "1",
check_time: "1",
efficiency_value: "0.5",
singleout: "2",
first_equip: "NTY-0012",
equip_type: "加工设备",
cal_id: "日历id",
machine_rule: "优先",
plan_method: "是",
over_time: "1",
isdiscrete: "是",
discrete_value: "1.2",
multi_machine: "5",
notes: "暂无备注信息test",
insert_flag: 0,
outside_time: "04/06/2020",
taskseq_des: "",
workshopcode: "",
routing_detail_id: "",
routing_header_id: "",
comb_param: "",
rule_qty: ""
}
],
insertTItle: "插单" insertTItle: "插单"
}; };
}, },
...@@ -449,9 +345,8 @@ export default { ...@@ -449,9 +345,8 @@ export default {
let params = { let params = {
id: expendId id: expendId
} }
Api.getbyorderid(params).then(res => { Api.getbyorderid(params).then((res) => {
if (res.sucess) { if (res.success) {
this.data1 = [];
this.data1 = res.result; this.data1 = res.result;
} }
}); });
......
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Add from './add' import Add from "./add";
import Expand from './components/excute' import Expand from "./components/excute";
export default { export default {
name: 'list', name: "list",
components: { components: {
Add, Add,
Expand Expand
...@@ -53,252 +53,248 @@ export default { ...@@ -53,252 +53,248 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: 'notes', value: null } keys: { op: "notes", value: null }
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
detailModal: false, detailModal: false,
deletelModal: false, deletelModal: false,
apsModal: false, apsModal: false,
list: [ list: [],
],
curId: 0, curId: 0,
columns: [ columns: [
{ {
key: 'move', key: "move",
title: ' ', title: " ",
hide: false, hide: false,
align: 'center', align: "center",
width: 30, width: 30,
render: (h, params) => { render: (h, params) => {
return h('Icon', { return h("Icon", {
attrs: { attrs: {
type: 'md-more', type: "md-more",
size: 18 size: 18
}, },
class: 'drag' class: "drag"
}) });
} }
}, },
{ {
type: 'expand', type: "expand",
width: 50, width: 50,
render: (h, params) => { render: (h, params) => {
return h(Expand, { return h(Expand, {
props: { props: {
rowId: params.row.id rowId: params.row.part_task_pk
} }
}) });
} }
}, },
{ {
key: 'selection', key: "selection",
type: 'selection', type: "selection",
width: 50, width: 50,
align: 'center' align: "center"
}, },
{ {
key: 'id', key: "id",
title: this.l('id'), title: this.l("id"),
hide: true, hide: true,
align: 'left', align: "left",
sortable: true, sortable: true,
width: 50 width: 50
}, },
{ {
key: 'insert_flag', key: "insert_flag",
title: this.l('insert_flag'), title: this.l("insert_flag"),
align: 'center', align: "center",
width: 70, width: 70,
high: true, high: true,
code: 'aps.aps.insert_flag', code: "aps.aps.insert_flag",
category: 'icon' category: "icon"
}, },
{ {
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
}, },
{ {
key: 'priority', key: "priority",
title: this.l('priority'), title: this.l("priority"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
key: 'plan_qty', key: "plan_qty",
title: this.l('plan_qty'), title: this.l("plan_qty"),
align: 'left', align: "left",
high: true, high: true,
sortable: true sortable: true
}, },
{ {
key: 'spare_qty', key: "spare_qty",
title: this.l('spare_qty'), title: this.l("spare_qty"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
key: 'plan_start', key: "plan_start",
title: this.l('plan_start'), title: this.l("plan_start"),
align: 'center', align: "center",
high: true, high: true,
resizable: true, resizable: true,
width: 140 width: 140
}, },
{ {
key: 'plan_finish', key: "plan_finish",
title: this.l('plan_finish'), title: this.l("plan_finish"),
align: 'center', align: "center",
high: true, high: true,
sortable: true, sortable: true,
resizable: true, resizable: true,
width: 140 width: 140
}, },
{ {
key: 'notes', key: "notes",
title: this.l('notes'), title: this.l("notes"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
}, },
{ {
key: 'demand_start', key: "demand_start",
title: this.l('demand_start'), title: this.l("demand_start"),
align: 'center', align: "center",
hide: true, hide: true,
resizable: true, resizable: true,
width: 100 width: 100
}, },
{ {
key: 'demand_finish', key: "demand_finish",
title: this.l('demand_finish'), title: this.l("demand_finish"),
align: 'center', align: "center",
high: true, high: true,
resizable: true, resizable: true,
width: 140 width: 140
}, },
{ {
key: 'badjustflag', key: "badjustflag",
title: this.l('badjustflag'), title: this.l("badjustflag"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
title: '操作', title: "操作",
key: 'action', key: "action",
width: 140, width: 140,
align: 'center', align: "center",
// fixed:"right", // fixed:"right",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h('op', { h("op", {
attrs: { attrs: {
icon: 'md-options', icon: "md-options",
type: 'icon', type: "icon",
title: '工序参数设置' title: "工序参数设置"
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row.id) }
}), }),
h('op', { h("op", {
attrs: { attrs: {
icon: 'md-return-left', icon: "md-return-left",
type: 'icon', type: "icon",
title: '移出排产池', title: "移出排产池",
oprate: 'delete', oprate: "delete",
msg: '确认要移出排产吗?' msg: "确认要移出排产吗?"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}), }),
h('op', { h("op", {
attrs: { attrs: {
icon: 'md-refresh', icon: "md-refresh",
type: 'icon', type: "icon",
title: '恢复工序', title: "恢复工序",
oprate: 'delete', oprate: "delete",
msg: '确认要恢复工序吗?' msg: "确认要恢复工序吗?"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}) })
]) ]);
} }
} }
] ]
} };
}, },
mounted() { mounted() {
this.loadList() this.loadList();
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
//排产池加载数据列表 //排产池加载数据列表
loadList() loadList() {
{ Api.getall().then(res => {
Api.getall().then((res)=>{ if (res.success) {
if(res.success) this.list = res.result;
{
this.list=res.result
} }
}) });
}, },
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.curId = 0 this.curId = 0;
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
remove(id) { remove(id) {
this.deletelModal = true this.deletelModal = true;
this.curId = id this.curId = id;
}, },
onSelect(a, b) {}, onSelect(a, b) {},
removeOk() { removeOk() {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: this.curId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.deletelModal = false this.deletelModal = false;
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
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]));
}, },
openParms(id) { openParms(id) {
this.addModal = true this.addModal = true;
}, },
l(key) { l(key) {
let vkey = 'mes_part_task_plan_simulate' + '.' + key let vkey = "mes_part_task_plan_simulate" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.drag { .drag {
......
...@@ -457,10 +457,6 @@ export default { ...@@ -457,10 +457,6 @@ export default {
} }
} }
}); });
this.$router.push({
name: "aps-aps"
// params: { customerId: id }
});
}, },
addOk() { addOk() {
this.$refs.grid.load(); this.$refs.grid.load();
......
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