Commit 237513ab authored by renjintao's avatar renjintao

自定义排序模板ok

parent 6421e0e6
......@@ -952,6 +952,20 @@ export default {
demand_finish: '计划要求结束',
insert_flag: '插单',
badjustflag: '',
//自定义模板相关
templateName: '模板名称',
templateDesc: '模板描述',
templateList: '排序规则',
//外协工期相关
outSideTime: '外协工期',
taskSeq: '工序号',
taskName: '工序名称',
productName:'产品名称',
drawingNum:'产品图号',
batchNum:'批次号',
projectNo:'项目号',
partTaskPk:'计划编号',
opTaskPk:'工单Id',
}, //多租户-服务器数据源
host: {
id: '',
......@@ -1279,7 +1293,7 @@ export default {
holidayCalId: '加班日历编号',
calName: '工作日历名称',
holidayCalName: '加班日历名称',
isimportant:'关重',
capabilityValue:'能力值',
isimportant: '关重',
capabilityValue: '能力值',
}
}
......@@ -7,15 +7,15 @@
<Form ref="form" label-position="top" :model="entity" :rules="rules">
<Row :gutter="24">
<Col span="24" style="height:80px;">
<FormItem label="模板名称" prop="tempName">
<FormItem :label="l('templateName')" prop="tempName">
<Input v-model="entity.tempName"></Input>
</FormItem>
</Col>
<Col span="24" style="height:60px;">
<FormItem label="模板描述">{{entity.tempInfo}}</FormItem>
<FormItem :label="l('templateDesc')">{{entity.tempInfo}}</FormItem>
</Col>
<Col span="24">
<FormItem label="排序规则"></FormItem>
<FormItem :label="l('templateList')"></FormItem>
</Col>
</Row>
</Form>
......@@ -185,7 +185,6 @@ export default {
});
}
params.templateList.push(dataArray);
alert(JSON.stringify(params.templateList));
});
Api.savesorttemplate(params)
......@@ -229,7 +228,7 @@ export default {
this.$emit("on-close");
},
l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key;
let vkey = "mes_part_task_plan_simulate" + "." + key;
return this.$t(vkey) || key;
}
},
......
......@@ -110,4 +110,18 @@ export default {
return Api.get(`${apsUrl}/apspoolappservices/getsorttemplate`,params);
},
//排序模板相关end-----
//修改外协工期相关start-----
//得到外协任务列表
getoutsidetimelist() {
return Api.get(`${apsUrl}/apspoolappservices/getoutsidetimelist`);
},
//保存外协任务工期
saveoutsidetime(params){
return Api.post(`${apsUrl}/apspoolappservices/saveoutsidetime `,params)
},
//保存插单任务
saveinsertorder(params){
return Api.post(`${apsUrl}/apspoolappservices/saveinsertorder `,params)
},
//修改外协工期相关end-----
}
<template>
<div>
<Row>
<Col span="24">
<DataGrid
:columns="columnsDuration"
ref="gridDuration"
:data="data"
:high="false"
:page="false"
:batch="false"
:easy="false"
:set="false"
:height="400"
:tool="false"
></DataGrid>
</Col>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
add: null,
tempModal: false,
columnsDuration: [
{
key: "projectNo",
title: this.l("projectNo"),
align: "left",
},
{
key: "batchNum",
title: this.l("batchNum"),
align: "left",
width: 100
},
{
key: "drawingNum",
title: this.l("drawingNum"),
align: "left",
width: 150
},
{
key: "productName",
title: this.l("productName"),
align: "left",
width: 150
},
{
key: "taskSeq",
title: this.l("taskSeq"),
align: "left",
width: 80
},
{
key: "taskName",
title: this.l("taskName"),
align: "left",
width: 120
},
{
key: "outSideTime",
title: this.l("outSideTime"),
align: "right",
width: 100
},
{
title: " ",
key: "action",
width: 80,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h("op", {
props: {
icon: "md-create",
type: "icon",
title: "修改外协工期",
oprate: "edit"
},
on: { click: () => this.edit(params.row.id) }
})
]);
}
}
],
data: []
};
},
created() {},
mounted() {
this.loadDuration();
},
methods: {
loadDuration() {
Api.getoutsidetimelist().then(r => {
if (r.success) {
this.data = r.result;
}
});
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
}
});
},
handleClose() {
this.$emit("on-close");
},
cancel() {
this.add = null;
this.tempModal = false;
},
cancelModal() {
this.$refs.tempRef.handleClose();
this.tempModal = false;
this.add = null;
},
edit(id) {
if (this.add == null) {
this.id = id;
this.tempTitle = "编辑模板";
this.tempModal = true;
this.add = () => import("./addTemp");
}
},
l(key) {
let vkey = "mes_part_task_plan_simulate" + "." + key;
return this.$t(vkey) || key;
}
},
computed: {},
watch: {}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
......@@ -26,6 +26,9 @@
</Select>
<a style="font-weight: bold;" @click="openaddModalTemp">
<Icon type="md-color-palette" size="14" />&nbsp;自定义排序模板
</a>
<a style="font-weight: bold;" @click="openDuration">
<Icon type="md-create" size="14" />&nbsp;修改外协工期
</a>&nbsp;&nbsp;&nbsp;&nbsp;
<Select placeholder="选择历史方案" style="width: 150px;"></Select>&nbsp;&nbsp;&nbsp;&nbsp;
<DatePicker
......@@ -54,14 +57,11 @@
<Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button>
</template>
</DataGrid>
<Modal
v-model="addModalTemp"
title="自定义排序模板"
footer-hide
width="1000"
class="tempModal"
>
<Temp :data="listTemp" ref="tempRef"></Temp>
<Modal v-model="addModalTemp" title="自定义排序模板" footer-hide width="1000" class="tempModal">
<Temp :data="listTemp" ref="tempRef"></Temp>
</Modal>
<Modal v-model="modalDuration" title="外协任务" footer-hide width="1000" class="tempModal">
<Duration ref="durationRef"></Duration>
</Modal>
<Modal v-model="addModal" title="工序参数设置" footer-hide width="1000">
<Add
......@@ -93,13 +93,15 @@
import Api from "./api";
import Add from "./add";
import Temp from "./temp";
import Duration from "./duration";
import Expand from "./components/excute";
export default {
name: "list",
components: {
Add,
Expand,
Temp
Temp,
Duration
},
data() {
return {
......@@ -116,6 +118,7 @@ export default {
deletelModal: false,
apsModal: false,
addModalTemp: false,
modalDuration: false,
list: [],
curId: 0,
columns: [
......@@ -364,7 +367,7 @@ export default {
}
});
},
addOk() {
this.list = [];
this.loadList();
......@@ -593,21 +596,27 @@ export default {
let params = {
id: val
};
Api.usesorttemplate(params).then(r => {
if (r.success) {
this.$Message.success("设置成功");
this.list = [];
this.loadList();
}
else
{
this.$Message.error("设置失败");
}
}).catch(e=>{
this.$Message.error("访问失败");
});
Api.usesorttemplate(params)
.then(r => {
if (r.success) {
this.$Message.success("设置成功");
this.list = [];
this.loadList();
} else {
this.$Message.error("设置失败");
}
})
.catch(e => {
this.$Message.error("访问失败");
});
},
//自定义排序模板相关end------
//外协工期修改start------
//打开外协工期任务modal
openDuration() {
this.modalDuration = true;
}
//外协工期修改end
}
};
</script>
......
......@@ -49,7 +49,7 @@ export default {
columnsTemp: [
{
key: "name",
title: "模板名称",
title: this.l("templateName"),
align: "left",
render: (h, params) => {
return h(
......@@ -68,7 +68,7 @@ export default {
},
{
key: "desc",
title: "模板描述",
title: this.l("templateDesc"),
align: "left",
width: 650
},
......@@ -155,7 +155,7 @@ export default {
let dataTemp = this.data;
this.data = [];
dataTemp.forEach(rowData => {
if (rowData.id ==this.id) {
if (rowData.id == this.id) {
rowData.name = obj.name;
rowData.desc = obj.desc;
}
......@@ -181,7 +181,7 @@ export default {
}
},
l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key;
let vkey = "mes_part_task_plan_simulate" + "." + 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