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 {
isDeleted:'是否删除',
deleterUserId:'删除人',
deletionTime:'删除时间',
classId:'',
classId:'classId',
routingHeaderId:'工艺规程id',
name:'工序名称',
taskSeq:'工序号',
description:'备注',
description:'描述',
taskContent:'工序内容',
resourceId:'资源ID',
resourceType:'资源类型',
runtime:'单件排产工时',
setupTime:'工序准备工时',
runtime:'排产工时',
setupTime:'准备工时',
transportTime:'转运工时',
checkTime:'检验工时',
checkFlag:'检验标识',
efficiencyValue:'效率系数',
singleOut:'单件产出',
isOutside:'是否外协',
departmentId:'工序的承制车间',
isImportant:'是否关键工序',
departmentId:'承制车间',
isImportant:'关键工序',
milestoneId:'里程碑',
phaseId:'阶段id',
phaseId:'工艺阶段',
status:'状态',
remark:'备注',
extend:'扩展字段',
......@@ -1232,7 +1232,7 @@ export default {
realWorkingHours:'实作准结工时',
realRuntime:'实作单件工时',
performanceWorkingHours:'绩效准结工时',
isParticipateIntime:'是否参与工时分配',
isParticipateIntime:'参与工时分配',
equipType:'设备类型',
equipTypeId:'设备类型ID',
note:'备注',
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
<Checkbox
v-model="li.checked"
@on-change="checkData(li)"
:disabled="isdisabled"
:disabled="li.status==0?false:true"
>订单号:{{li.mesCode}}</Checkbox>
</Col>
<Col :span="4" class="order-ringht">
......@@ -114,7 +114,7 @@
</FormItem>
<FormItem>
<Button style="margin-left: 8px" @click="closeOk">取消</Button>
<Button type="primary" @click="lowerHair">下发</Button>
<Button type="primary" @click="lowerHair" v-if="showXia">下发</Button>
</FormItem>
</Form>
</div>
......@@ -135,8 +135,8 @@ export default {
data() {
return {
list: [],
showXia: true,
status: "0", //全部排产-1,0为未排产;2为已排查;
isdisabled: false,
formItem: {
radio: "0",
time: "",
......@@ -192,10 +192,10 @@ export default {
changeStatus(name) {
this.status = name;
this.orderlist(this.status);
if (this.status == 1) {
this.isdisabled = true;
if (this.status == 0) {
this.showXia = true;
} 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>
<div class="results">
<Layout>
......@@ -26,25 +29,36 @@
</div>
</Sider>
<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">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button> -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
<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> -->
</Content>
</Layout>
</div>
</template>
<script>
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 {
components: { expandRow },
components: { resultsList,compareList },
data() {
return {
......@@ -52,81 +66,81 @@ export default {
data: [],
list: [],
id: "",
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"
}
]
// 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 }) {
......@@ -203,59 +217,3 @@ export default {
}
};
</script>
\ No newline at end of file
<style lang="less" scoped>
.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 @@
<span class="expand-key">设备编号</span>
</Col>
</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">
<span>{{ item.task_seq }}</span>
</Col>
......
......@@ -7,7 +7,7 @@
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">未排产</Radio>
<Radio label="2">已排查</Radio>
<Radio label="-1">全部</Radio>
<!-- <Radio label="-1">全部</Radio> -->
</RadioGroup>
</Col>
</Row>
......@@ -48,7 +48,7 @@
<Radio :label="1">一级排产</Radio>
<Radio :label="2">二级排产</Radio>
</RadioGroup>
<Button type="primary" @click="lowerHair" :disabled="!allow">下发</Button>
<Button type="primary" @click="lowerHair" :disabled="!allow" v-if="showXia">下发</Button>
</Col>
</Row>
<Row class="right-body">
......@@ -144,6 +144,7 @@ export default {
},
data() {
return {
showXia: true,
disabled: false,
chaiLIst: [],
mode: 1,
......@@ -176,6 +177,11 @@ export default {
this.orderlist(this.status);
this.orderId = 0;
this.isactive = null;
if (this.status == 0) {
this.showXia = true;
} else {
this.showXia = false;
}
},
//排产池列表
......
<template>
<div class="detail">
<div class="orderDetail">
<Row>
<Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed>
<Filed :span="12" :name="l('taskType')">
<state code="plan.order.taskType" :value="entity.taskType" type="text"></state>
</Filed>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed>
<Filed :span="12" :name="l('status')">
<state code="plan.order.status" :value="entity.status" type="text"></state>
</Filed>
<Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed>
<Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed>
<Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed>
<Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed>
<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>
<Col span="8">
<span class="fwBold">{{l('mesCode')}}</span>
<p>{{entity.mesCode}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('taskType')}}</span>
<p> <state code="plan.order.taskType" :value="entity.taskType" type="text"></state></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('quantity')}}</span>
<p>{{entity.quantity}}</p>
</Col>
</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>
</template>
<script>
......@@ -47,7 +89,7 @@ export default {
l(key) {
key = "mes_plan" + "." + key;
return this.$t(key);
},
}
},
watch: {
row(v) {
......@@ -58,3 +100,20 @@ export default {
}
};
</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 @@
<Modal v-model="editModal" title="编辑" footer-hide width="1200">
<Edit :row="rowData" @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="detailModal" title="详情" width="1200">
<Modal v-model="detailModal" title="订单详情" width="900">
<Detail :row="rowData" />
</Modal>
<Modal v-model="splitModal" title="订单分解" width="1200">
......@@ -297,7 +297,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail", title: "查看" },
attrs: { oprate: "detail", },
on: { click: () => this.detail(params.row) }
},
"查看"
......@@ -305,7 +305,7 @@ export default {
h(
"op",
{
attrs: { oprate: "edit", title: "编辑" },
attrs: { oprate: "edit", },
on: { click: () => this.edit(params.row) },
style:
(params.row.status == 1 &&
......@@ -321,7 +321,7 @@ export default {
h(
"op",
{
attrs: { oprate: "remove", title: "删除" },
attrs: { oprate: "remove", },
on: { click: () => this.remove(params.row) },
style:
(params.row.status == 1 &&
......@@ -336,7 +336,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail", title: "分解" },
attrs: { oprate: "detail", },
on: { click: () => this.split(params.row) },
style:
(params.row.divideMark != 0 &&
......
......@@ -51,7 +51,6 @@
</Menu>
</div>
<div class="bottom_box">
{{headerId}}
<nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div>
</div>
......
This diff is collapsed.
import Api from '@/plugins/request'
export default {
index:`${technologyUrl}routingdetail/paged`,
paged(params){
return Api.post(`${technologyUrl}routingdetail/paged`,params);
index: `${technologyUrl}routingdetail/paged`,
paged(params) {
return Api.post(`${technologyUrl}routingdetail/paged`, params);
},
get(params){
return Api.get(`${technologyUrl}routingdetail/get`,params);
get(params) {
return Api.get(`${technologyUrl}routingdetail/get`, params);
},
create(params){
return Api.post(`${technologyUrl}routingdetail/create`,params);
create(params) {
return Api.post(`${technologyUrl}routingdetail/create`, params);
},
update(params){
return Api.post(`${technologyUrl}routingdetail/update`,params);
update(params) {
return Api.post(`${technologyUrl}routingdetail/update`, params);
},
delete(id) {
return Api.delete(`${technologyUrl}routingdetail/delete`,{params:{id:id}});
return Api.delete(`${technologyUrl}routingdetail/delete`, {
params: {
id: id
}
});
},
deletes(params) {
return Api.post(`${technologyUrl}routingdetail/batchdelete`,params);
}
}
\ No newline at end of file
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 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Add",
data() {
......@@ -174,7 +175,7 @@ export default {
entity: {
routingHeaderId: null,
routingDetailId: null,
routingStepId: null,
routingStepId: 0,
checkContent: "",
checkType: null,
checkParams: "",
......@@ -209,15 +210,13 @@ export default {
},
props: {
v: Object,
eid: Number
eid: Number,
headid:Number,
},
mounted() {
this.loadDetails();
this.parms.eid = this.$u.guid()
this.$refs.refFile.intFiles()
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
......@@ -238,6 +237,7 @@ export default {
this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
}
this.entity.routingHeaderId=this.headid
Api.create(this.entity)
.then(r => {
......@@ -271,9 +271,9 @@ export default {
loadDetails() {
//获取工序列表
let parms = {
headerID: 181
headerID: this.headid
};
Api.pagedDetails(parms).then(r => {
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
......@@ -310,7 +310,7 @@ export default {
},
eid(v) {
if (v > 0) {
this.load(v);
// this.load(v);
}
}
}
......
......@@ -23,7 +23,4 @@ export default {
deletes(params) {
return Api.post(`${technologyUrl}routingqccard/batchdelete`, params);
},
pagedDetails(params) {//获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
}
......@@ -26,7 +26,7 @@
<Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed>
<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 :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed>
......
......@@ -156,6 +156,7 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Edit",
data() {
......@@ -175,6 +176,7 @@ export default {
};
},
props: {
headid: Number,
eid: Number
},
mounted() {
......@@ -218,9 +220,9 @@ export default {
loadDetails() {
//获取工序列表
let parms = {
headerID: 181
headerID: this.headid
};
Api.pagedDetails(parms).then(r => {
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
......
<template>
<div>
{{info}}
<DataGrid :columns="columns" ref="grid" :action="action">
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -16,14 +15,14 @@
</Form>
</template>
<template slot="searchForm">
<Search />
<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" @on-close="cancel" @on-ok="ok" />
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
......@@ -40,9 +39,7 @@ export default {
author: "henq",
description: "routing_qc_card 4/27/2020 10:31:00 AM"
},
props: {
info: { type: String }
},
props: ["headerid"],
data() {
return {
action: Api.index,
......@@ -51,12 +48,14 @@ export default {
op:
"checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch",
value: null
}
},
routingHeaderId: { op: "Equal", value: -1 }
},
modal: false,
title: "新增",
detail: null,
curId: 0,
hid:0,
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
......@@ -256,9 +255,18 @@ export default {
downUrl: fileUrlDown,
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() {
console.log(this);
this.search()
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -274,6 +282,7 @@ export default {
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
......
......@@ -8,7 +8,13 @@
</Col>
<Col :span="12" v-if="condition.routingDetailId.show">
<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>
</Col>
......@@ -129,8 +135,12 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Add",
props: {
headid:Number,
},
data() {
return {
condition: {
......@@ -139,7 +149,7 @@ export default {
lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true },
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 },
routingStepId: { op: "Equal", value: null, show: false },
checkType: { op: "Equal", value: null, show: true },
......@@ -159,8 +169,12 @@ export default {
inspectionTime: { op: "Equal", value: null, show: true },
sampling: { op: "Equal", value: null, show: true },
samplingBatch: { op: "Equal", value: null, show: true }
}
},
routingDetailList: [],
};
},
mounted() {
this.loadDetails();
},
methods: {
handleClose() {
......@@ -169,6 +183,30 @@ export default {
l(key) {
key = "routing_qc_card" + "." + 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 @@
<Input v-model="entity.extend"></Input>
</FormItem>
</Col>
-->
<Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
-->
<Col :span="8">
<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>
</Col>
<Col :span="8">
......@@ -105,6 +112,7 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Add",
data() {
......@@ -113,7 +121,7 @@ export default {
entity: {
routingHeaderId: null,
routingDetailId: null,
routingStepId: null,
routingStepId: 0,
quantity: null,
materialId: null,
materialType: "",
......@@ -132,23 +140,24 @@ export default {
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
routingDetailList: [],
};
},
props: {
v: Object,
eid: Number
eid: Number,
headid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
this.loadDetails();
},
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;
......@@ -170,10 +179,21 @@ export default {
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.id = 0;
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;
});
},
l(key) {
......
......@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input>
</FormItem>
</Col>
-->
<Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
-->
<Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber>
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem>
</Col>
<Col :span="8">
......@@ -105,6 +112,7 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Edit",
data() {
......@@ -113,13 +121,16 @@ export default {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
routingDetailList: []
};
},
props: {
headid: Number,
eid: Number
},
mounted() {
this.loadDetails();
if (this.eid > 0) {
this.load(this.eid);
}
......@@ -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() {
this.$emit("on-close");
},
......
......@@ -8,7 +8,13 @@
</Col>
<Col :span="12" v-if="condition.routingDetailId.show">
<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>
</Col>
<Col :span="12" v-if="condition.routingStepId.show">
......@@ -94,12 +100,16 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Add",
props: {
headid:Number,
},
data() {
return {
condition: {
routingHeaderId: { op: "Equal", value: null, show: true },
routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false },
quantity: { op: "Equal", value: null, show: true },
......@@ -116,8 +126,12 @@ export default {
state: { op: "Equal", value: null, show: true },
remark: { op: "Equal", value: null, show: false },
drawNum: { op: "Equal", value: null, show: true }
}
},
routingDetailList: [],
};
},
mounted() {
this.loadDetails();
},
methods: {
handleClose() {
......@@ -126,7 +140,24 @@ export default {
l(key) {
key = "routingsupporting" + "." + 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>
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