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 source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -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>
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<Col :span="12"><FormItem :label="l('classId')" prop="classId"> <InputNumber v-model="entity.classId"></InputNumber> <!--
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <InputNumber v-model="entity.routingHeaderId"></InputNumber> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
</FormItem></Col> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
<Col :span="12"><FormItem :label="l('name')" prop="name"> <Input v-model="entity.name"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('taskSeq')" prop="taskSeq"> <InputNumber v-model="entity.taskSeq"></InputNumber> <Col :span="12">
</FormItem></Col> <FormItem :label="l('classId')" prop="classId">
<Col :span="24"><FormItem :label="l('description')" prop="description"> <Input v-model="entity.description" type="textarea" :rows="5"></Input> <InputNumber v-model="entity.classId"></InputNumber>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('taskContent')" prop="taskContent"> <Input v-model="entity.taskContent"> </Input> </Col>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('resourceId')" prop="resourceId"> <InputNumber v-model="entity.resourceId"></InputNumber> <FormItem :label="l('note')" prop="note">
</FormItem></Col> <Input v-model="entity.note"></Input>
<Col :span="12"><FormItem :label="l('resourceType')" prop="resourceType"> <Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('runtime')" prop="runtime"> <InputNumber v-model="entity.runtime"></InputNumber>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('setupTime')" prop="setupTime"> <InputNumber v-model="entity.setupTime"></InputNumber> <FormItem :label="l('milestoneId')" prop="milestoneId">
</FormItem></Col> <InputNumber v-model="entity.milestoneId"></InputNumber>
<Col :span="12"><FormItem :label="l('transportTime')" prop="transportTime"> <InputNumber v-model="entity.transportTime"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('checkTime')" prop="checkTime"> <InputNumber v-model="entity.checkTime"></InputNumber>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('checkFlag')" prop="checkFlag"> <Dictionary code="Process.routing_detail.check_flag" v-model="entity.checkFlag"></Dictionary> <FormItem :label="l('status')" prop="status">
</FormItem></Col> <Dictionary code="Process.Status" v-model="entity.status"></Dictionary>
<Col :span="12"><FormItem :label="l('efficiencyValue')" prop="efficiencyValue"> <InputNumber v-model="entity.efficiencyValue"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('singleOut')" prop="singleOut"> <InputNumber v-model="entity.singleOut"></InputNumber> <Col :span="24">
</FormItem></Col> <FormItem :label="l('remark')" prop="remark">
<Col :span="12"><FormItem :label="l('isOutside')" prop="isOutside"> <Dictionary code="Process.state" v-model="entity.isOutside"></Dictionary> <Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('departmentId')" prop="departmentId"> <InputNumber v-model="entity.departmentId"></InputNumber> </Col>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('isImportant')" prop="isImportant"> <Dictionary code="Process.state" v-model="entity.isImportant"></Dictionary> <FormItem :label="l('extend')" prop="extend">
</FormItem></Col> <Input v-model="entity.extend"></Input>
<Col :span="12"><FormItem :label="l('milestoneId')" prop="milestoneId"> <InputNumber v-model="entity.milestoneId"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('phaseId')" prop="phaseId"> <InputNumber v-model="entity.phaseId"></InputNumber>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('status')" prop="status"> <Dictionary code="Process.Status" v-model="entity.status"></Dictionary> <FormItem :label="l('performanceHours')" prop="performanceHours">
</FormItem></Col> <InputNumber v-model="entity.performanceHours"></InputNumber>
<Col :span="24"><FormItem :label="l('remark')" prop="remark"> <Input v-model="entity.remark" type="textarea" :rows="5"></Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('extend')" prop="extend"> <Input v-model="entity.extend"> </Input> <Col :span="12">
</FormItem></Col> <FormItem :label="l('resourceCode')" prop="resourceCode">
<Col :span="12"><FormItem :label="l('outsideTime')" prop="outsideTime"> <InputNumber v-model="entity.outsideTime"></InputNumber> <Input v-model="entity.resourceCode"></Input>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('performanceHours')" prop="performanceHours"> <InputNumber v-model="entity.performanceHours"></InputNumber> </Col>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('resourceCode')" prop="resourceCode"> <Input v-model="entity.resourceCode"> </Input> <FormItem :label="l('performanceWorkingHours')" prop="performanceWorkingHours">
</FormItem></Col> <InputNumber v-model="entity.performanceWorkingHours"></InputNumber>
<Col :span="12"><FormItem :label="l('isImportantResources')" prop="isImportantResources"> <Dictionary code="Process.state" v-model="entity.isImportantResources"></Dictionary> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('schedulingWorkingHours')" prop="schedulingWorkingHours"> <InputNumber v-model="entity.schedulingWorkingHours"></InputNumber>
</FormItem></Col> <Col :span="12">
<Col :span="12"><FormItem :label="l('realWorkingHours')" prop="realWorkingHours"> <InputNumber v-model="entity.realWorkingHours"></InputNumber> <FormItem :label="l('equipType')" prop="equipType">
</FormItem></Col> <Input v-model="entity.equipType"></Input>
<Col :span="12"><FormItem :label="l('realRuntime')" prop="realRuntime"> <InputNumber v-model="entity.realRuntime"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('performanceWorkingHours')" prop="performanceWorkingHours"> <InputNumber v-model="entity.performanceWorkingHours"></InputNumber> <Col :span="12">
</FormItem></Col> <FormItem :label="l('equipTypeId')" prop="equipTypeId">
<Col :span="12"><FormItem :label="l('isParticipateIntime')" prop="isParticipateIntime"> <Dictionary code="Process.state" v-model="entity.isParticipateIntime"></Dictionary> <InputNumber v-model="entity.equipTypeId"></InputNumber>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('equipType')" prop="equipType"> <Input v-model="entity.equipType"> </Input> </Col>
</FormItem></Col> <Col :span="24">
<Col :span="12"><FormItem :label="l('equipTypeId')" prop="equipTypeId"> <InputNumber v-model="entity.equipTypeId"></InputNumber> <FormItem :label="l('remark')" prop="remark">
</FormItem></Col> <Input v-model="entity.remark" type="textarea" :rows="5"></Input>
<Col :span="12"><FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input> </FormItem>
</FormItem></Col> </Col>
</Row> -->
<FormItem> <Col :span="8">
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <FormItem :label="l('taskSeq')" prop="taskSeq">
<Button @click="handleClose" class="ml20">取消</Button> <InputNumber v-model="entity.taskSeq"></InputNumber>
</FormItem> </FormItem>
</Form> </Col>
</template> <Col :span="8">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('equipType')" prop="equipType">
<EquipSelect v-model="entity.equipType"></EquipSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('resourceType')" prop="resourceType">
<Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isImportant')" prop="isImportant">
<Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isImportantResources')" prop="isImportantResources">
<Dictionary code="Process.state" v-model="entity.isImportantResources" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('schedulingWorkingHours')" prop="schedulingWorkingHours">
<InputTime v-model="entity.schedulingWorkingHours" />
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('runtime')" prop="runtime">
<InputTime v-model="entity.runtime" />
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('realRuntime')" prop="realRuntime">
<InputTime v-model="entity.realRuntime" />
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('realWorkingHours')" prop="realWorkingHours">
<InputTime v-model="entity.realWorkingHours" />
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('outsideTime')" prop="outsideTime">
<InputTime v-model="entity.outsideTime" />
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isOutside')" prop="isOutside">
<Dictionary code="Process.state" v-model="entity.isOutside" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isParticipateIntime')" prop="isParticipateIntime">
<Dictionary code="Process.state" v-model="entity.isParticipateIntime" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('efficiencyValue')" prop="efficiencyValue">
<InputNumber v-model="entity.efficiencyValue"></InputNumber>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('singleOut')" prop="singleOut">
<InputNumber v-model="entity.singleOut"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('taskContent')" prop="taskContent">
<i-quill
v-model="entity.taskContent"
:height="200"
v-paste="handleImg"
/>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script> <script>
import Api from './api' import Api from "./api";
export default { import iQuill from "@/components/quill";
name: 'Add', export default {
data() { name: "Add",
return { components: { iQuill },
disabled: false, data() {
entity: {classId: null, return {
routingHeaderId: null, disabled: false,
name: "", entity: {
taskSeq: null, routingHeaderId: null,
description: "", name: "",
taskContent: "", taskSeq: null,
resourceId: null, taskContent: "",
resourceType: null, resourceType: null,
runtime: null, runtime: null,
setupTime: null, efficiencyValue: null,
transportTime: null, singleOut: null,
checkTime: null, isOutside: null,
checkFlag: null, isImportant: null,
efficiencyValue: null, outsideTime: null,
singleOut: null, isImportantResources: null,
isOutside: null, schedulingWorkingHours: null,
departmentId: null, realWorkingHours: null,
isImportant: null, realRuntime: null,
milestoneId: null, isParticipateIntime: null,
phaseId: null, equipType: "",
status: null, },
remark: "", rules: {
extend: "", name: [{ required: true, message: "必填", trigger: "blur" }]
outsideTime: null,
performanceHours: null,
resourceCode: "",
isImportantResources: null,
schedulingWorkingHours: null,
realWorkingHours: null,
realRuntime: null,
performanceWorkingHours: null,
isParticipateIntime: null,
equipType: "",
equipTypeId: null,
note: ""},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
v: Object,
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key)
} }
}, };
watch: { },
v() { props: {
this.entity = this.$u.clone(this.v) v: Object,
}, eid: Number,
eid(v) { headid:Number,
if (v > 0) { },
this.load(v); mounted() {
} if (this.eid > 0) {
} this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
this.entity.routingHeaderId=this.headid
Api.create(this.entity)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
} }
});
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
handleImg(e) {
console.warn(e);
// let file = null
// if (
// e.clipboardData &&
// e.clipboardData.items[0] &&
// e.clipboardData.items[0].type &&
// e.clipboardData.items[0].type.indexOf('image') > -1
// ) {
// //这里就是判断是否有粘贴进来的文件且文件为图片格式
// file = e.clipboardData.items[0].getAsFile()
// let reader = new FileReader()
// reader.readAsDataURL(file)
// setTimeout(() => {
// var img = '<img src="' + reader.result + '" alt=""/>'
// this.bugForm.content += img
// }, 1000)
// // new R
// }
},
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key);
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v > 0) {
this.load(v);
}
} }
</script> }
\ No newline at end of file };
</script>
\ No newline at end of file
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
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action"> <DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字工序名称/备注/备注/资源编号/设备类型/备注" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询 {{headerid}}vv</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</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>
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
import expandRow from "./expand.vue";
export default { export default {
name: "list", name: "list",
components: { components: {
...@@ -47,228 +35,222 @@ export default { ...@@ -47,228 +35,222 @@ export default {
}, },
routingHeaderId: { op: "Equal", value: -1 } routingHeaderId: { op: "Equal", value: -1 }
}, },
// conditions: { routingHeaderId: { op: "Equal", value: -1 } }, // conditions: { 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: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left"
},
{ {
key: "lastModifierUserId", type: "expand",
title: this.l("lastModifierUserId"), width: 50,
hide: true, render: (h, params) => {
align: "left" return h(expandRow, {
}, props: {
{ key: "classId", title: this.l("classId"), align: "left", high: true }, row: params.row.steps
{ }
key: "routingHeaderId", });
title: this.l("routingHeaderId"), }
align: "left",
high: true
}, },
{ key: "taskSeq", title: this.l("taskSeq"), align: "left" },
{ {
key: "name", key: "name",
title: this.l("name"), title: this.l("name"),
align: "left", align: "left"
easy: true,
high: true
},
{ key: "taskSeq", title: this.l("taskSeq"), align: "left", high: true },
{
key: "description",
title: this.l("description"),
align: "left",
easy: true,
high: true
}, },
{ {
key: "resourceId", key: "equipType",
title: this.l("resourceId"), title: this.l("equipType"),
align: "left", align: "left",
high: true easy: true
}, },
{ {
key: "resourceType", key: "resourceType",
title: this.l("resourceType"), title: this.l("resourceType"),
align: "left", align: "left",
high: true,
code: "Process.routing_detail.resource_type" code: "Process.routing_detail.resource_type"
}, },
{ key: "runtime", title: this.l("runtime"), align: "left", high: true },
{
key: "setupTime",
title: this.l("setupTime"),
align: "left",
high: true
},
{ {
key: "transportTime", key: "isImportantResources",
title: this.l("transportTime"), title: this.l("isImportantResources"),
align: "left", align: "center",
high: true code: "Process.state"
},
{
key: "checkTime",
title: this.l("checkTime"),
align: "left",
high: true
}, },
{ {
key: "checkFlag", key: "schedulingWorkingHours",
title: this.l("checkFlag"), title: this.l("schedulingWorkingHours"),
align: "left", align: "right"
high: true,
code: "Process.routing_detail.check_flag"
}, },
{ key: "runtime", title: this.l("runtime"), align: "right" },
{ {
key: "efficiencyValue", key: "realRuntime",
title: this.l("efficiencyValue"), title: this.l("realRuntime"),
align: "left", align: "right"
high: true
}, },
{ {
key: "singleOut", key: "outsideTime",
title: this.l("singleOut"), title: this.l("outsideTime"),
align: "left", align: "right"
high: true
}, },
{ {
key: "isOutside", key: "isParticipateIntime",
title: this.l("isOutside"), title: this.l("isParticipateIntime"),
align: "left", align: "center",
high: true,
code: "Process.state" code: "Process.state"
}, },
{
key: "departmentId",
title: this.l("departmentId"),
align: "left",
high: true
},
{ {
key: "isImportant", key: "isImportant",
title: this.l("isImportant"), title: this.l("isImportant"),
align: "left", align: "center",
high: true,
code: "Process.state" code: "Process.state"
}, },
{ {
key: "milestoneId", key: "isOutside",
title: this.l("milestoneId"), title: this.l("isOutside"),
align: "left",
high: true
},
{ key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "Process.Status"
},
{
key: "outsideTime",
title: this.l("outsideTime"),
align: "left",
high: true
},
{
key: "performanceHours",
title: this.l("performanceHours"),
align: "left",
high: true
},
{
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true,
high: true
},
{
key: "isImportantResources",
title: this.l("isImportantResources"),
align: "left", align: "left",
high: true, hide: true,
code: "Process.state" code: "Process.state"
}, },
{ {
key: "schedulingWorkingHours", key: "efficiencyValue",
title: this.l("schedulingWorkingHours"), title: this.l("efficiencyValue"),
align: "left",
high: true
},
{
key: "realWorkingHours",
title: this.l("realWorkingHours"),
align: "left",
high: true
},
{
key: "realRuntime",
title: this.l("realRuntime"),
align: "left", align: "left",
high: true hide: true
}, },
{ {
key: "performanceWorkingHours", key: "singleOut",
title: this.l("performanceWorkingHours"), title: this.l("singleOut"),
align: "left", align: "left",
high: true hide: true
}, },
// {
// key: "resourceId",
// title: this.l("resourceId"),
// align: "left"
// },
// {
// key: "setupTime",
// title: this.l("setupTime"),
// align: "left"
// },
// {
// key: "transportTime",
// title: this.l("transportTime"),
// align: "left"
// },
// {
// key: "checkTime",
// title: this.l("checkTime"),
// align: "left"
// },
// {
// key: "checkFlag",
// title: this.l("checkFlag"),
// align: "left",
// code: "Process.routing_detail.check_flag"
// },
// {
// key: "departmentId",
// title: this.l("departmentId"),
// align: "left"
// },
// {
// key: "milestoneId",
// title: this.l("milestoneId"),
// align: "left"
// },
// { key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
// {
// key: "status",
// title: this.l("status"),
// align: "left",
// code: "Process.Status"
// },
// {
// key: "performanceHours",
// title: this.l("performanceHours"),
// align: "left"
// },
// {
// key: "resourceCode",
// title: this.l("resourceCode"),
// align: "left",
// easy: true
// },
// {
// key: "realWorkingHours",
// title: this.l("realWorkingHours"),
// align: "left"
// },
// {
// key: "performanceWorkingHours",
// title: this.l("performanceWorkingHours"),
// align: "left"
// },
// {
// key: "equipTypeId",
// title: this.l("equipTypeId"),
// align: "left"
// },
// {
// key: "note",
// title: this.l("note"),
// align: "left",
// easy: true
// },
{ {
key: "isParticipateIntime", key: "creationTime",
title: this.l("isParticipateIntime"), title: this.l("creationTime"),
align: "left", hide: true,
high: true, align: "left"
code: "Process.state"
}, },
{ {
key: "equipType", key: "creatorUserId",
title: this.l("equipType"), title: this.l("creatorUserId"),
align: "left", hide: true,
easy: true, align: "left"
high: true
}, },
{ {
key: "equipTypeId", key: "lastModificationTime",
title: this.l("equipTypeId"), title: this.l("lastModificationTime"),
align: "left", hide: true,
high: true align: "left"
}, },
{ {
key: "note", key: "lastModifierUserId",
title: this.l("note"), title: this.l("lastModifierUserId"),
align: "left", hide: true,
easy: true, align: "left"
high: true
}, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 180,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
},
"新增"
),
h( h(
"op", "op",
{ {
...@@ -297,18 +279,21 @@ export default { ...@@ -297,18 +279,21 @@ export default {
]); ]);
} }
} }
] ],
list: []
}; };
}, },
created() { created() {
console.warn("dfadf:",this.headerid) console.warn("dfadf:", this.headerid);
if(this.headerid!=-1){ if (this.headerid != -1) {
this.easySearch.routingHeaderId.value = this.headerid; this.easySearch.routingHeaderId.value = this.headerid;
}else{ } else {
this.easySearch.routingHeaderId.value=this.$route.query.id; this.easySearch.routingHeaderId.value = this.$route.query.id;
} }
this.hid = this.$route.query.id;
}, },
mounted() { mounted() {
this.load();
// console.log(this); // console.log(this);
// alert(this.headerid); // alert(this.headerid);
// if(this.headerid){ // if(this.headerid){
...@@ -320,6 +305,20 @@ export default { ...@@ -320,6 +305,20 @@ export default {
}, },
methods: { methods: {
load() {
let params = {
id: this.$route.query.id
};
Api.getdetailsteps(params)
.then(r => {
if (r.success) {
this.list = r.result;
}
})
.catch(err => {
this.$Message.error("连接错误");
});
},
ok() { ok() {
this.$refs.grid.load(); this.$refs.grid.load();
this.modal = false; this.modal = false;
......
...@@ -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");
}, },
......
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字物料类型/物料编号/物料名称/牌号/规格/型号规格/材质/采购标准/质量等级/备注/产品图号" v-model="easySearch.keys.value" /> </FormItem> <DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <template slot="easySearch">
</Form></template> <Form ref="formInline" :model="easySearch" inline>
<template slot="searchForm"> <FormItem prop="keys">
<Search /> <Input
</template> placeholder="请输入关键字物料类型/物料编号/物料名称/牌号/规格/型号规格/材质/采购标准/质量等级/备注/产品图号"
<template slot="buttons"> v-model="easySearch.keys.value"
<Button type="primary" @click="add">新增</Button> />
</template> </FormItem>
</DataGrid> <FormItem>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Button type="primary" @click="search">查询</Button>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> </FormItem>
</Modal> </Form>
</div> </template>
<template slot="searchForm">
<Search :headid="hid"/>
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Search from './search' import Search from "./search";
export default { export default {
name: 'list', name: "list",
components:{ components: {
Search Search
}, },
head: { head: {
title: "工艺配套表", title: "工艺配套表",
author: "henq", author: "henq",
description: "routingsupporting 4/27/2020 10:35:33 AM", description: "routingsupporting 4/27/2020 10:35:33 AM"
}, },
props: ["headerid"],
data() { data() {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys:{op:"materialType,materialNumber,nameMaterial,brand,specifications,xhgg,texture,procurementStandards,qualityGrade,remark,drawNum",value:null} keys: {
}, op:
modal: false, "materialType,materialNumber,nameMaterial,brand,specifications,xhgg,texture,procurementStandards,qualityGrade,remark,drawNum",
title:"新增", value: null
detail:null, },
curId: 0, routingHeaderId: { op: "Equal", value: -1 }
},
modal: false,
title: "新增",
detail: null,
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" },
{ key:"creationTime",title:this.l("creationTime") ,hide:true ,align:"left" }, {
{ key:"creatorUserId",title:this.l("creatorUserId") ,hide:true ,align:"left" }, key: "creationTime",
{ key:"lastModificationTime",title:this.l("lastModificationTime") ,hide:true ,align:"left" }, title: this.l("creationTime"),
{ key:"lastModifierUserId",title:this.l("lastModifierUserId") ,hide:true ,align:"left" }, hide: true,
{ key:"isDeleted",title:this.l("isDeleted") ,hide:true ,align:"left" }, align: "left"
{ key:"deletionTime",title:this.l("deletionTime") ,hide:true ,align:"left" }, },
{ key:"deleterUserId",title:this.l("deleterUserId") ,hide:true ,align:"left" }, {
{ key:"routingHeaderId",title:this.l("routingHeaderId") ,align:"left" ,high:true }, key: "creatorUserId",
{ key:"routingDetailId",title:this.l("routingDetailId") ,align:"left" ,high:true }, title: this.l("creatorUserId"),
{ key:"routingStepId",title:this.l("routingStepId") ,align:"left" ,high:true }, hide: true,
{ key:"quantity",title:this.l("quantity") ,align:"left" ,high:true }, align: "left"
{ key:"materialId",title:this.l("materialId") ,align:"left" ,high:true }, },
{ key:"materialType",title:this.l("materialType") ,align:"left" ,easy:true ,high:true ,code:'mes_xingchi_resource.material.materialReType' }, {
{ key:"materialNumber",title:this.l("materialNumber") ,align:"left" ,easy:true ,high:true }, key: "lastModificationTime",
{ key:"nameMaterial",title:this.l("nameMaterial") ,align:"left" ,easy:true ,high:true }, title: this.l("lastModificationTime"),
{ key:"brand",title:this.l("brand") ,align:"left" ,easy:true ,high:true }, hide: true,
{ key:"specifications",title:this.l("specifications") ,align:"left" ,easy:true ,high:true }, align: "left"
{ key:"xhgg",title:this.l("xhgg") ,align:"left" ,easy:true ,high:true }, },
{ key:"texture",title:this.l("texture") ,align:"left" ,easy:true ,high:true }, {
{ key:"procurementStandards",title:this.l("procurementStandards") ,align:"left" ,easy:true ,high:true }, key: "lastModifierUserId",
{ key:"qualityGrade",title:this.l("qualityGrade") ,align:"left" ,easy:true ,high:true }, title: this.l("lastModifierUserId"),
{ key:"state",title:this.l("state") ,align:"left" ,high:true ,code:'Process.Status' }, hide: true,
{ key:"remark",title:this.l("remark") ,align:"left" ,easy:true ,high:true }, align: "left"
{ key:"drawNum",title:this.l("drawNum") ,align:"left" ,easy:true ,high:true }, },
{ {
title: '操作', key: "isDeleted",
key: 'action', title: this.l("isDeleted"),
width: 140, hide: true,
align: 'center', align: "left"
render: (h, params) => { },
return h('div', { class: "action" }, [ {
h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.view(params.row.id) } }, '查看'), key: "deletionTime",
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), title: this.l("deletionTime"),
h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'), hide: true,
h('op', { attrs: { oprate: 'delete' }, on: { click: () => this.remove(params.row.id) } }, '删除') align: "left"
]) },
} {
}, key: "deleterUserId",
title: this.l("deleterUserId"),
hide: true,
align: "left"
},
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left",
high: true
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
align: "left",
high: true
},
{
key: "routingStepId",
title: this.l("routingStepId"),
align: "left",
high: true
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
high: true
},
{
key: "materialId",
title: this.l("materialId"),
align: "left",
high: true
},
{
key: "materialType",
title: this.l("materialType"),
align: "left",
easy: true,
high: true,
code: "mes_xingchi_resource.material.materialReType"
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
easy: true,
high: true
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
align: "left",
easy: true,
high: true
},
{
key: "brand",
title: this.l("brand"),
align: "left",
easy: true,
high: true
},
{
key: "specifications",
title: this.l("specifications"),
align: "left",
easy: true,
high: true
},
{
key: "xhgg",
title: this.l("xhgg"),
align: "left",
easy: true,
high: true
},
{
key: "texture",
title: this.l("texture"),
align: "left",
easy: true,
high: true
},
{
key: "procurementStandards",
title: this.l("procurementStandards"),
align: "left",
easy: true,
high: true
},
{
key: "qualityGrade",
title: this.l("qualityGrade"),
align: "left",
easy: true,
high: true
},
{
key: "state",
title: this.l("state"),
align: "left",
high: true,
code: "Process.Status"
},
{
key: "remark",
title: this.l("remark"),
align: "left",
easy: true,
high: true
},
{
key: "drawNum",
title: this.l("drawNum"),
align: "left",
easy: true,
high: true
},
{
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: 'copy' }, on: { click: () => this.copy(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) }
},
"删除"
)
]);
}
}
] ]
};
},
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"); // 加载数据字典
}, },
methods:{ methods: {
ok() { ok() {
this.$refs.grid.load() this.$refs.grid.load();
this.modal = false this.modal = false;
this.curId = 0; this.curId = 0;
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.hid = Number(this.headerid);
this.detail =()=> import('./add') this.title = "新增";
this.modal = true; this.detail = () => import("./add");
}, this.modal = true;
copy(id) { },
this.curId = id; copy(id) {
this.title = "克隆"; this.curId = id;
this.detail = () =>import('./add') this.title = "克隆";
this.modal = true; this.detail = () => import("./add");
}, this.modal = true;
view(id) { },
this.curId = id; view(id) {
this.title = "详情"; this.curId = id;
this.detail = () =>import('./detail') this.title = "详情";
this.modal = true; this.detail = () => import("./detail");
}, this.modal = true;
edit(id) { },
this.curId = id; edit(id) {
this.title = "编辑"; this.curId = id;
this.detail = () => import('./edit') this.hid = Number(this.headerid);
this.modal = true; this.title = "编辑";
}, this.detail = () => import("./edit");
remove(id) { this.modal = true;
Api.delete(id).then((r) => { },
if (r.success) { remove(id) {
this.$refs.grid.load(); Api.delete(id).then(r => {
this.$Message.success('删除成功') if (r.success) {
} this.$refs.grid.load();
}) this.$Message.success("删除成功");
}, }
cancel() { });
this.curId = 0; },
this.modal = false cancel() {
}, this.curId = 0;
l(key) { this.modal = false;
let vkey = "routingsupporting" + "." + key; },
return this.$t(vkey)||key l(key) {
} let vkey = "routingsupporting" + "." + key;
return this.$t(vkey) || key;
}
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
...@@ -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