Commit 573e9b6e authored by 周远喜's avatar 周远喜

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

parents ad837727 ba204561
...@@ -1201,26 +1201,26 @@ export default { ...@@ -1201,26 +1201,26 @@ export default {
isDeleted:'是否删除', isDeleted:'是否删除',
deleterUserId:'删除人', deleterUserId:'删除人',
deletionTime:'删除时间', deletionTime:'删除时间',
classId:'', classId:'classId',
routingHeaderId:'工艺规程id', routingHeaderId:'工艺规程id',
name:'工序名称', name:'工序名称',
taskSeq:'工序号', taskSeq:'工序号',
description:'备注', description:'描述',
taskContent:'工序内容', taskContent:'工序内容',
resourceId:'资源ID', resourceId:'资源ID',
resourceType:'资源类型', resourceType:'资源类型',
runtime:'单件排产工时', runtime:'排产工时',
setupTime:'工序准备工时', setupTime:'准备工时',
transportTime:'转运工时', transportTime:'转运工时',
checkTime:'检验工时', checkTime:'检验工时',
checkFlag:'检验标识', checkFlag:'检验标识',
efficiencyValue:'效率系数', efficiencyValue:'效率系数',
singleOut:'单件产出', singleOut:'单件产出',
isOutside:'是否外协', isOutside:'是否外协',
departmentId:'工序的承制车间', departmentId:'承制车间',
isImportant:'是否关键工序', isImportant:'关键工序',
milestoneId:'里程碑', milestoneId:'里程碑',
phaseId:'阶段id', phaseId:'工艺阶段',
status:'状态', status:'状态',
remark:'备注', remark:'备注',
extend:'扩展字段', extend:'扩展字段',
...@@ -1232,7 +1232,7 @@ export default { ...@@ -1232,7 +1232,7 @@ export default {
realWorkingHours:'实作准结工时', realWorkingHours:'实作准结工时',
realRuntime:'实作单件工时', realRuntime:'实作单件工时',
performanceWorkingHours:'绩效准结工时', performanceWorkingHours:'绩效准结工时',
isParticipateIntime:'是否参与工时分配', isParticipateIntime:'参与工时分配',
equipType:'设备类型', equipType:'设备类型',
equipTypeId:'设备类型ID', equipTypeId:'设备类型ID',
note:'备注', note:'备注',
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<Checkbox <Checkbox
v-model="li.checked" v-model="li.checked"
@on-change="checkData(li)" @on-change="checkData(li)"
:disabled="isdisabled" :disabled="li.status==0?false:true"
>订单号:{{li.mesCode}}</Checkbox> >订单号:{{li.mesCode}}</Checkbox>
</Col> </Col>
<Col :span="4" class="order-ringht"> <Col :span="4" class="order-ringht">
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button style="margin-left: 8px" @click="closeOk">取消</Button> <Button style="margin-left: 8px" @click="closeOk">取消</Button>
<Button type="primary" @click="lowerHair">下发</Button> <Button type="primary" @click="lowerHair" v-if="showXia">下发</Button>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
...@@ -135,8 +135,8 @@ export default { ...@@ -135,8 +135,8 @@ export default {
data() { data() {
return { return {
list: [], list: [],
showXia: true,
status: "0", //全部排产-1,0为未排产;2为已排查; status: "0", //全部排产-1,0为未排产;2为已排查;
isdisabled: false,
formItem: { formItem: {
radio: "0", radio: "0",
time: "", time: "",
...@@ -192,10 +192,10 @@ export default { ...@@ -192,10 +192,10 @@ export default {
changeStatus(name) { changeStatus(name) {
this.status = name; this.status = name;
this.orderlist(this.status); this.orderlist(this.status);
if (this.status == 1) { if (this.status == 0) {
this.isdisabled = true; this.showXia = true;
} else { } else {
this.isdisabled = false; this.showXia = false;
} }
}, },
//排产池列表 //排产池列表
......
<template>
<div class="compare">
<div class="btn">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div class="compare_box">
<div class="left_list">
</div>
<div class="right_add"></div>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
code: '2',
name: '添加',
tree: []
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
components: {},
created() {},
mounted() {},
methods: {
// 下发
parameter() {
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
tabChange(name) {
if(name=='technicalcoordination')
{
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder')
{
this.$refs.unqualifiedorder.loadchangelist();
}
},
}
}
</script>
<style lang="less">
</style>
<style lang="less">
@import './results.less';
</style>
<template> <template>
<div class="results"> <div class="results">
<Layout> <Layout>
...@@ -26,25 +29,36 @@ ...@@ -26,25 +29,36 @@
</div> </div>
</Sider> </Sider>
<Content> <Content>
<h4>排产结果</h4> <Tabs value="name1" :animated="false">
<TabPane label="结果列表" name="name1">
<resultsList ref="resultsList"/>
</TabPane>
<!-- <TabPane label="结果甘特图" name="name2">结果甘特图</TabPane> -->
<TabPane label="方案对比" name="name3">
<compareList ref="compareList"/>
</TabPane>
</Tabs>
<!-- <h4>排产结果</h4>
<div class="btn"> <div class="btn">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter">下发</Button> -->
<!-- <Button type="primary">导出</Button> --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <!-- <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div> </div>
<div> <div>
<Table :columns="columns" :data="data"></Table> <Table :columns="columns" :data="data"></Table>
</div> </div> -->
</Content> </Content>
</Layout> </Layout>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import expandRow from "./table-expand.vue"; // import expandRow from "./table-expand.vue";expandRow,
import resultsList from "./result.vue";
import compareList from "./compare.vue";
export default { export default {
components: { expandRow }, components: { resultsList,compareList },
data() { data() {
return { return {
...@@ -52,81 +66,81 @@ export default { ...@@ -52,81 +66,81 @@ export default {
data: [], data: [],
list: [], list: [],
id: "", id: "",
columns: [ // columns: [
{ // {
type: "expand", // type: "expand",
width: 50, // width: 50,
render: (h, params) => { // render: (h, params) => {
return h(expandRow, { // return h(expandRow, {
props: { // props: {
row: params.row // row: params.row
} // }
}); // });
} // }
}, // },
{ // {
title: "超期预警", // title: "超期预警",
key: "alert", // key: "alert",
align: "center", // align: "center",
render: (h, params) => { // render: (h, params) => {
return h("div", [ // return h("div", [
h("Icon", { // h("Icon", {
props: { // props: {
type: // type:
params.row.alert == true // params.row.alert == true
? "ios-information-circle-outline" // ? "ios-information-circle-outline"
: "ios-remove-circle-outline" // : "ios-remove-circle-outline"
}, // },
style: { // style: {
marginRight: "5px", // marginRight: "5px",
fontSize: "18px", // fontSize: "18px",
fontWeight: "bold", // fontWeight: "bold",
color: params.row.alert == true ? "#FE7777" : "#0DD78D" // color: params.row.alert == true ? "#FE7777" : "#0DD78D"
} // }
}) // })
]); // ]);
} // }
}, // },
{ // {
title: "零件图号", // title: "零件图号",
key: "part_id", // key: "part_id",
align: "center" // align: "center"
}, // },
{ // {
title: "零件名称", // title: "零件名称",
key: "part_name", // key: "part_name",
align: "center" // align: "center"
}, // },
{ // {
title: "计划开始时间", // title: "计划开始时间",
key: "plan_start", // key: "plan_start",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "计划结束时间", // title: "计划结束时间",
key: "plan_start", // key: "plan_start",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "投料时间", // title: "投料时间",
key: "demand_start", // key: "demand_start",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "节点时间", // title: "节点时间",
key: "demand_finish", // key: "demand_finish",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "计划数量", // title: "计划数量",
key: "plan_qty", // key: "plan_qty",
align: "center" // align: "center"
} // }
] // ]
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -202,60 +216,4 @@ export default { ...@@ -202,60 +216,4 @@ export default {
} }
} }
}; };
</script> </script>
<style lang="less" scoped> \ No newline at end of file
.results {
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: none;
height: 90vh;
border-right: 1px solid #e4e6ed;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
}
.addclass {
border-color: #2680eb !important;
}
h4 {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
margin-right: 15px;
}
.left-body:hover {
cursor: pointer;
border-color: #2680eb;
}
.left-body {
margin: 10px 15px 0 0;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
font-weight: bold;
}
.fa {
height: 30px;
line-height: 30px;
}
}
.ivu-layout-content {
margin-left: 15px;
.btn {
float: right;
margin-top: -52px;
margin-right: 15px;
}
}
}
</style>
\ No newline at end of file
<style lang="less">
@import './results.less';
</style>
<template>
<div>
<div class="btn">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div>
<Table :columns="columns" :data="data"></Table>
</div>
</div>
</template>
<script>
import Api from "./api";
import expandRow from "./table-expand.vue";
export default {
components: { expandRow },
data() {
return {
isactive: 0,
data: [],
list: [],
columns: [
{
type: "expand",
width: 50,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row
}
});
}
},
{
title: "超期预警",
key: "alert",
align: "center",
render: (h, params) => {
return h("div", [
h("Icon", {
props: {
type:
params.row.alert == true
? "ios-information-circle-outline"
: "ios-remove-circle-outline"
},
style: {
marginRight: "5px",
fontSize: "18px",
fontWeight: "bold",
color: params.row.alert == true ? "#FE7777" : "#0DD78D"
}
})
]);
}
},
{
title: "零件图号",
key: "part_id",
align: "center"
},
{
title: "零件名称",
key: "part_name",
align: "center"
},
{
title: "计划开始时间",
key: "plan_start",
width: 200,
align: "center"
},
{
title: "计划结束时间",
key: "plan_start",
width: 200,
align: "center"
},
{
title: "投料时间",
key: "demand_start",
width: 200,
align: "center"
},
{
title: "节点时间",
key: "demand_finish",
width: 200,
align: "center"
},
{
title: "计划数量",
key: "plan_qty",
align: "center"
}
],
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
components: {},
created() {
this.orderlist();
},
mounted() {},
methods: {
orderlist() {
Api.getall()
.then(r => {
if (r.success) {
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null);
}
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
listData(id, index) {
this.$emit.isactive = index;
this.id = id;
Api.paged({ scheduleId: id })
.then(r => {
if (r.success) {
this.data = r.result;
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
// 下发
parameter() {
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
tabChange(name) {
if(name=='technicalcoordination')
{
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder'){
this.$refs.unqualifiedorder.loadchangelist();
}
},
}
}
</script>
<style lang="less">
</style>
.results {
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: none;
height: 90vh;
border-right: 1px solid #e4e6ed;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
}
.addclass {
border-color: #2680eb !important;
}
h4 {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
margin-right: 15px;
}
.left-body:hover {
cursor: pointer;
border-color: #2680eb;
}
.left-body {
margin: 10px 15px 0 0;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
font-weight: bold;
}
.fa {
height: 30px;
line-height: 30px;
}
}
.ivu-layout-content {
margin-left: 15px;
.btn {
float: right;
margin-top: -52px;
margin-right: 15px;
}
}
}
.compare{
.compare_box{
border: 1px solid #ccc;
height: 200px;
}
}
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<span class="expand-key">设备编号</span> <span class="expand-key">设备编号</span>
</Col> </Col>
</Row> </Row>
<Row v-for="(item,index) in dataList" :key="item.id"> <Row v-for="(item,index) in dataList" :key="item.index">
<Col span="4" class="expand-value"> <Col span="4" class="expand-value">
<span>{{ item.task_seq }}</span> <span>{{ item.task_seq }}</span>
</Col> </Col>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small"> <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">未排产</Radio> <Radio label="0">未排产</Radio>
<Radio label="2">已排查</Radio> <Radio label="2">已排查</Radio>
<Radio label="-1">全部</Radio> <!-- <Radio label="-1">全部</Radio> -->
</RadioGroup> </RadioGroup>
</Col> </Col>
</Row> </Row>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<Radio :label="1">一级排产</Radio> <Radio :label="1">一级排产</Radio>
<Radio :label="2">二级排产</Radio> <Radio :label="2">二级排产</Radio>
</RadioGroup> </RadioGroup>
<Button type="primary" @click="lowerHair" :disabled="!allow">下发</Button> <Button type="primary" @click="lowerHair" :disabled="!allow" v-if="showXia">下发</Button>
</Col> </Col>
</Row> </Row>
<Row class="right-body"> <Row class="right-body">
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
}, },
data() { data() {
return { return {
showXia: true,
disabled: false, disabled: false,
chaiLIst: [], chaiLIst: [],
mode: 1, mode: 1,
...@@ -176,6 +177,11 @@ export default { ...@@ -176,6 +177,11 @@ export default {
this.orderlist(this.status); this.orderlist(this.status);
this.orderId = 0; this.orderId = 0;
this.isactive = null; this.isactive = null;
if (this.status == 0) {
this.showXia = true;
} else {
this.showXia = false;
}
}, },
//排产池列表 //排产池列表
......
<template> <template>
<div class="detail"> <div class="orderDetail">
<Row> <Row>
<Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed> <Col span="8">
<Filed :span="12" :name="l('taskType')"> <span class="fwBold">{{l('mesCode')}}</span>
<state code="plan.order.taskType" :value="entity.taskType" type="text"></state> <p>{{entity.mesCode}}</p>
</Filed> </Col>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed> <Col span="8">
<Filed :span="12" :name="l('status')"> <span class="fwBold">{{l('taskType')}}</span>
<state code="plan.order.status" :value="entity.status" type="text"></state> <p> <state code="plan.order.taskType" :value="entity.taskType" type="text"></state></p>
</Filed> </Col>
<Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed> <Col span="8">
<Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed> <span class="fwBold">{{l('quantity')}}</span>
<Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed> <p>{{entity.quantity}}</p>
<Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed> </Col>
<Filed :span="12" :name="l('urgencyLevel')">
<state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state>
</Filed>
<Filed :span="12" :name="l('demandStartDate')"><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></Filed>
<Filed :span="12" :name="l('demandFinishDate')"><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></Filed>
<Filed :span="12" :name="l('taskRequire')">{{entity.taskRequire}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
</Row> </Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('status')}}</span>
<p><state code="plan.order.status" :value="entity.status" type="text"></state></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('productName')}}</span>
<p>{{entity.productName}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('drawnNumber')}}</span>
<p>{{entity.drawnNumber}}</p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('batchNumber')}}</span>
<p>{{entity.batchNumber}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('projectNumber')}}</span>
<p>{{entity.projectNumber}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('urgencyLevel')}}</span>
<p><state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state></p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('demandStartDate')}}</span>
<p><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('demandFinishDate')}}</span>
<p><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('taskRequire')}}</span>
<p>{{entity.taskRequire}}</p>
</Col>
</Row>
<Row class="lastRow">
<Col span="24">
<span class="fwBold">{{l('remark')}}</span>
<p>{{entity.remark}}</p>
</Col>
</Row>
</div> </div>
</template> </template>
<script> <script>
...@@ -47,7 +89,7 @@ export default { ...@@ -47,7 +89,7 @@ export default {
l(key) { l(key) {
key = "mes_plan" + "." + key; key = "mes_plan" + "." + key;
return this.$t(key); return this.$t(key);
}, }
}, },
watch: { watch: {
row(v) { row(v) {
...@@ -58,3 +100,20 @@ export default { ...@@ -58,3 +100,20 @@ export default {
} }
}; };
</script> </script>
<style lang="less">
.orderDetail
{
line-height: 30px;
width: 90%;
margin: 0 auto;
.ivu-row{
padding-top: 20px;
padding-bottom: 20px;
border-bottom:#ccc solid 1px;
}
.lastRow
{
border-bottom:none;
}
}
</style>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<Modal v-model="editModal" title="编辑" footer-hide width="1200"> <Modal v-model="editModal" title="编辑" footer-hide width="1200">
<Edit :row="rowData" @on-close="cancel" @on-ok="addOk" /> <Edit :row="rowData" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
<Modal v-model="detailModal" title="详情" width="1200"> <Modal v-model="detailModal" title="订单详情" width="900">
<Detail :row="rowData" /> <Detail :row="rowData" />
</Modal> </Modal>
<Modal v-model="splitModal" title="订单分解" width="1200"> <Modal v-model="splitModal" title="订单分解" width="1200">
...@@ -297,7 +297,7 @@ export default { ...@@ -297,7 +297,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", title: "查看" }, attrs: { oprate: "detail", },
on: { click: () => this.detail(params.row) } on: { click: () => this.detail(params.row) }
}, },
"查看" "查看"
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "edit", title: "编辑" }, attrs: { oprate: "edit", },
on: { click: () => this.edit(params.row) }, on: { click: () => this.edit(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "remove", title: "删除" }, attrs: { oprate: "remove", },
on: { click: () => this.remove(params.row) }, on: { click: () => this.remove(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", title: "分解" }, attrs: { oprate: "detail", },
on: { click: () => this.split(params.row) }, on: { click: () => this.split(params.row) },
style: style:
(params.row.divideMark != 0 && (params.row.divideMark != 0 &&
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
</Menu> </Menu>
</div> </div>
<div class="bottom_box"> <div class="bottom_box">
{{headerId}}
<nuxt-child keep-alive :headerid="headerId"></nuxt-child> <nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div> </div>
</div> </div>
......
This diff is collapsed.
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index:`${technologyUrl}routingdetail/paged`, index: `${technologyUrl}routingdetail/paged`,
paged(params){ paged(params) {
return Api.post(`${technologyUrl}routingdetail/paged`,params); return Api.post(`${technologyUrl}routingdetail/paged`, params);
}, },
get(params){ get(params) {
return Api.get(`${technologyUrl}routingdetail/get`,params); return Api.get(`${technologyUrl}routingdetail/get`, params);
}, },
create(params){ create(params) {
return Api.post(`${technologyUrl}routingdetail/create`,params); return Api.post(`${technologyUrl}routingdetail/create`, params);
}, },
update(params){ update(params) {
return Api.post(`${technologyUrl}routingdetail/update`,params); return Api.post(`${technologyUrl}routingdetail/update`, params);
}, },
delete(id) { delete(id) {
return Api.delete(`${technologyUrl}routingdetail/delete`,{params:{id:id}}); return Api.delete(`${technologyUrl}routingdetail/delete`, {
}, params: {
deletes(params) { id: id
return Api.post(`${technologyUrl}routingdetail/batchdelete`,params); }
} });
} },
\ No newline at end of file deletes(params) {
return Api.post(`${technologyUrl}routingdetail/batchdelete`, params);
},
pagedDetails(params) { //根据工艺规程ID获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
getdetailsteps(params) { //根据工艺规程ID获取工序及对应工步的列表
return Api.get(`${technologyUrl}routingdetail/getdetailsteps`, params);
},
}
<template>
<div class="excute">
<DataGrid
:columns="columnsExpand"
ref="gridExpand"
:data="listExpand"
:tool="false"
:height="gridHeight"
:page="false"
></DataGrid>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "expand",
props: {
row: { type: Array, default: [] }
},
data() {
return {
columnsExpand: [
{
key: "id",
title: this.l("id"),
align: "left",
hide: true
},
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
hide: true,
align: "left",
hide: true
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
hide: true,
align: "left"
},
{
key: "classId",
title: this.l("classId"),
align: "left",
hide: true
},
{
key: "stepSeq",
title: this.l("stepSeq"),
align: "left",
width:120
},
{
key: "name",
title: this.l("name"),
align: "left"
},
{
key: "status",
title: this.l("status"),
align: "center",
code: "Process.Status",
width: 100
},
{
key: "stepContent",
title: this.l("stepContent"),
align: "left",
width: 800,
tooltip: true
},
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
},
"查看"
),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
],
listExpand: [],
gridHeight: 50
};
},
mounted() {
this.loadList();
},
methods: {
loadList() {
this.listExpand = this.row;
this.gridHeight = 50;
if (this.listExpand.length > 0) {
this.gridHeight = 52 + this.listExpand.length * 50;
} else {
this.gridHeight = 102;
}
},
l(key) {
let vkey = "routing_step" + "." + key;
return this.$t(vkey) || key;
}
},
watch: {
row(v) {
if (v && v.length > 0) {
this.listExpand = v;
}
}
}
};
</script>
<style scoped>
.excute table tr th span,
.excute table tr td {
font-size: 10px;
}
</style>
\ No newline at end of file
This diff is collapsed.
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
...@@ -174,7 +175,7 @@ export default { ...@@ -174,7 +175,7 @@ export default {
entity: { entity: {
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: 0,
checkContent: "", checkContent: "",
checkType: null, checkType: null,
checkParams: "", checkParams: "",
...@@ -209,15 +210,13 @@ export default { ...@@ -209,15 +210,13 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid:Number,
}, },
mounted() { mounted() {
this.loadDetails(); this.loadDetails();
this.parms.eid = this.$u.guid() this.parms.eid = this.$u.guid()
this.$refs.refFile.intFiles() this.$refs.refFile.intFiles()
if (this.eid > 0) {
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
...@@ -238,6 +237,7 @@ export default { ...@@ -238,6 +237,7 @@ export default {
this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称 this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'') this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
} }
this.entity.routingHeaderId=this.headid
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
...@@ -271,9 +271,9 @@ export default { ...@@ -271,9 +271,9 @@ export default {
loadDetails() { loadDetails() {
//获取工序列表 //获取工序列表
let parms = { let parms = {
headerID: 181 headerID: this.headid
}; };
Api.pagedDetails(parms).then(r => { ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result; let tempDetails = r.result;
let tempD = []; let tempD = [];
tempDetails.forEach(data => { tempDetails.forEach(data => {
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
}, },
eid(v) { eid(v) {
if (v > 0) { if (v > 0) {
this.load(v); // this.load(v);
} }
} }
} }
......
...@@ -23,7 +23,4 @@ export default { ...@@ -23,7 +23,4 @@ export default {
deletes(params) { deletes(params) {
return Api.post(`${technologyUrl}routingqccard/batchdelete`, params); return Api.post(`${technologyUrl}routingqccard/batchdelete`, params);
}, },
pagedDetails(params) {//获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed> <Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed>
<Filed :span="12" :name="l('checkType')"> <Filed :span="12" :name="l('checkType')">
<state code="QC.checktype" v-modev="entity.checkType+''"></state> <state code="QC.checktype" :value="entity.checkType+''" type="text"></state>
</Filed> </Filed>
<Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed> <Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed>
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Edit", name: "Edit",
data() { data() {
...@@ -175,6 +176,7 @@ export default { ...@@ -175,6 +176,7 @@ export default {
}; };
}, },
props: { props: {
headid: Number,
eid: Number eid: Number
}, },
mounted() { mounted() {
...@@ -218,9 +220,9 @@ export default { ...@@ -218,9 +220,9 @@ export default {
loadDetails() { loadDetails() {
//获取工序列表 //获取工序列表
let parms = { let parms = {
headerID: 181 headerID: this.headid
}; };
Api.pagedDetails(parms).then(r => { ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result; let tempDetails = r.result;
let tempD = []; let tempD = [];
tempDetails.forEach(data => { tempDetails.forEach(data => {
......
<template> <template>
<div> <div>
{{info}} <DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
...@@ -16,14 +15,14 @@ ...@@ -16,14 +15,14 @@
</Form> </Form>
</template> </template>
<template slot="searchForm"> <template slot="searchForm">
<Search /> <Search :headid="hid"/>
</template> </template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -40,9 +39,7 @@ export default { ...@@ -40,9 +39,7 @@ export default {
author: "henq", author: "henq",
description: "routing_qc_card 4/27/2020 10:31:00 AM" description: "routing_qc_card 4/27/2020 10:31:00 AM"
}, },
props: { props: ["headerid"],
info: { type: String }
},
data() { data() {
return { return {
action: Api.index, action: Api.index,
...@@ -51,12 +48,14 @@ export default { ...@@ -51,12 +48,14 @@ export default {
op: op:
"checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch", "checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch",
value: null value: null
} },
routingHeaderId: { op: "Equal", value: -1 }
}, },
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
hid:0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
...@@ -256,9 +255,18 @@ export default { ...@@ -256,9 +255,18 @@ export default {
downUrl: fileUrlDown, downUrl: fileUrlDown,
fileUrlPath: "" fileUrlPath: ""
}; };
},
created() {
if(this.headerid!=-1){
this.easySearch.routingHeaderId.value = this.headerid;
}else{
this.easySearch.routingHeaderId.value=this.$route.query.id;
}
this.hid=Number(this.easySearch.routingHeaderId.value)
}, },
mounted() { mounted() {
console.log(this); console.log(this);
this.search()
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
...@@ -274,6 +282,7 @@ export default { ...@@ -274,6 +282,7 @@ export default {
}, },
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
</Col> </Col>
<Col :span="12" v-if="condition.routingDetailId.show"> <Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input> <Select v-model="condition.routingDetailId.value">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
...@@ -129,8 +135,12 @@ ...@@ -129,8 +135,12 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
props: {
headid:Number,
},
data() { data() {
return { return {
condition: { condition: {
...@@ -139,7 +149,7 @@ export default { ...@@ -139,7 +149,7 @@ export default {
lastModificationTime: { op: "Range", value: null, show: true }, lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true }, lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: false }, deletionTime: { op: "Range", value: null, show: false },
routingHeaderId: { op: "Equal", value: null, show: false }, routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true }, routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false }, routingStepId: { op: "Equal", value: null, show: false },
checkType: { op: "Equal", value: null, show: true }, checkType: { op: "Equal", value: null, show: true },
...@@ -159,8 +169,12 @@ export default { ...@@ -159,8 +169,12 @@ export default {
inspectionTime: { op: "Equal", value: null, show: true }, inspectionTime: { op: "Equal", value: null, show: true },
sampling: { op: "Equal", value: null, show: true }, sampling: { op: "Equal", value: null, show: true },
samplingBatch: { op: "Equal", value: null, show: true } samplingBatch: { op: "Equal", value: null, show: true }
} },
routingDetailList: [],
}; };
},
mounted() {
this.loadDetails();
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -169,6 +183,30 @@ export default { ...@@ -169,6 +183,30 @@ export default {
l(key) { l(key) {
key = "routing_qc_card" + "." + key; key = "routing_qc_card" + "." + key;
return this.$t(key); return this.$t(key);
},
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
},
watch: {
headid(v) {
if (v > 0) {
// this.load(v);
}
} }
} }
}; };
......
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input> <Input v-model="entity.extend"></Input>
</FormItem> </FormItem>
</Col> </Col>
--> <Col :span="8">
<Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber> <Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -93,7 +100,7 @@ ...@@ -93,7 +100,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input> <Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -105,6 +112,7 @@ ...@@ -105,6 +112,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
...@@ -113,7 +121,7 @@ export default { ...@@ -113,7 +121,7 @@ export default {
entity: { entity: {
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: 0,
quantity: null, quantity: null,
materialId: null, materialId: null,
materialType: "", materialType: "",
...@@ -132,23 +140,24 @@ export default { ...@@ -132,23 +140,24 @@ export default {
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
routingDetailList: [],
}; };
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid: Number
}, },
mounted() { mounted() {
if (this.eid > 0) { this.loadDetails();
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.routingHeaderId = this.headid;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -170,10 +179,21 @@ export default { ...@@ -170,10 +179,21 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
load(v) { loadDetails() {
Api.get({ id: v }).then(r => { //获取工序列表
this.entity = r.result; let parms = {
this.entity.id = 0; headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
}); });
}, },
l(key) { l(key) {
......
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input> <Input v-model="entity.extend"></Input>
</FormItem> </FormItem>
</Col> </Col>
--> <Col :span="8">
<Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailName')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber> <Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -93,7 +100,7 @@ ...@@ -93,7 +100,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input> <Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -105,6 +112,7 @@ ...@@ -105,6 +112,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Edit", name: "Edit",
data() { data() {
...@@ -113,13 +121,16 @@ export default { ...@@ -113,13 +121,16 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
routingDetailList: []
}; };
}, },
props: { props: {
headid: Number,
eid: Number eid: Number
}, },
mounted() { mounted() {
this.loadDetails();
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
...@@ -152,6 +163,23 @@ export default { ...@@ -152,6 +163,23 @@ export default {
} }
}); });
}, },
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
</Col> </Col>
<Col :span="12" v-if="condition.routingDetailId.show"> <Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input> <Select v-model="condition.routingDetailId.value">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" v-if="condition.routingStepId.show"> <Col :span="12" v-if="condition.routingStepId.show">
...@@ -94,12 +100,16 @@ ...@@ -94,12 +100,16 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
props: {
headid:Number,
},
data() { data() {
return { return {
condition: { condition: {
routingHeaderId: { op: "Equal", value: null, show: true }, routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true }, routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false }, routingStepId: { op: "Equal", value: null, show: false },
quantity: { op: "Equal", value: null, show: true }, quantity: { op: "Equal", value: null, show: true },
...@@ -116,8 +126,12 @@ export default { ...@@ -116,8 +126,12 @@ export default {
state: { op: "Equal", value: null, show: true }, state: { op: "Equal", value: null, show: true },
remark: { op: "Equal", value: null, show: false }, remark: { op: "Equal", value: null, show: false },
drawNum: { op: "Equal", value: null, show: true } drawNum: { op: "Equal", value: null, show: true }
} },
routingDetailList: [],
}; };
},
mounted() {
this.loadDetails();
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -126,7 +140,24 @@ export default { ...@@ -126,7 +140,24 @@ export default {
l(key) { l(key) {
key = "routingsupporting" + "." + key; key = "routingsupporting" + "." + key;
return this.$t(key); return this.$t(key);
} },
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
} }
}; };
</script> </script>
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