Commit c68b98ba authored by renjintao's avatar renjintao

technology/details/add/index/detailExamine/zhcn...

parent 20bb7d43
......@@ -611,7 +611,7 @@ export default {
id: 'id',
productName: '产品名称',
name: '工艺名称',
routingType: '',
routingType: '工艺类型',
routingTypeDesc: '工艺类型',
version: '文档版本',
code: '规程编号',
......@@ -1169,7 +1169,7 @@ export default {
classId: '类id',
unicode: 'unicode',
name: '工艺名称',
code: '工艺编号',
code: '工艺文件编号',
productId: '产品id',
productName:'产品名称',
version: '版本',
......@@ -1188,7 +1188,7 @@ export default {
auditUserId2: '审批人',
isDeleted: '是否删除',
platesnum: '板数',
isEffect: '效',
isEffect: '效',
versionnotes: '版本说明',
phase: '阶段',
versionid: '版本ID',
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row>
<!-- <Col :span="12">
<FormItem :label="l('classId')" prop="classId">
......@@ -30,7 +30,7 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('productId')" prop="productId">
<FormItem :label="l('productName')" prop="productId">
<ProductSelect v-model="entity.productId" @on-change="proChange"></ProductSelect>
</FormItem>
</Col>
......@@ -41,7 +41,7 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('departmentId')" prop="departmentId">
<FormItem :label="l('departmentName')" prop="departmentId">
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
</FormItem>
</Col>
......@@ -161,9 +161,11 @@ export default {
name: "",
code: "",
productId: null,
productName:'',
version: "",
author: null,
departmentId: null,
departmentName:'',
isMain: 1,
upId: null,
upDetailId: null,
......@@ -197,7 +199,7 @@ export default {
props: {
v: Object,
eid: Number,
title: String
title: String,
},
mounted() {
this.parms.eid = this.$u.guid();
......@@ -308,11 +310,12 @@ export default {
},
proChange(v,items)
{
alert(v+"__"+JSON.stringify(items))
this.entity.productName=items.name
},
departChange(v,items)
{
alert(v+"__"+JSON.stringify(items))
this.entity.departmentName=items.name
}
},
watch: {
......
<template>
<div class="detail">
<Row>
<Filed :span="5" :name="l('productName')">{{info.productName}}</Filed>
<Filed :span="6" :name="l('name')">{{info.name}}</Filed>
<Filed :span="5" :name="l('code')">{{info.code}}</Filed>
<Filed :span="5" :name="l('routingType')"><state code="Process.Routing.routingType" :value="info.routingType" type="text"></state></Filed>
<Filed :span="3" :name="l('version')">{{info.version}}</Filed>
</Row>
</div>
</template>
<script>
export default {
name: 'detailExamine',
props: ['info'],
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
data() {
return {}
},
methods: {
arry2Name(arryList, values) {
//预警类别转换
var codes = arryList
var name = ''
for (let i in codes) {
if (values == codes[i].value) {
name = codes[i].name
}
}
return name
},
l(key) {
key = 'processList' + '.' + key
return this.$t(key)
}
}
}
</script>
<style lang="less" scope>
.detail {
display: table;
border-collapse: collapse;
width: 100%;
.ivu-row {
display: table-row;
.filed-col {
display: table-cell;
margin: 0 0 -1px 0px;
line-height: 30px;
box-sizing: border-box;
.label {
background: #e8eaf1;
display: inline-block;
width: 120px;
text-align: right;
padding: 0 5px;
}
}
}
}
</style>
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<div class="details">
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row>
<!--
<Col :span="12">
......@@ -74,7 +75,7 @@
-->
<Col :span="8">
<FormItem :label="l('taskSeq')" prop="taskSeq">
<InputNumber v-model="entity.taskSeq"></InputNumber>
<InputNumber v-model="maxNum" style="width:100%"></InputNumber>
</FormItem>
</Col>
<Col :span="8">
......@@ -122,9 +123,14 @@
<InputTime v-model="entity.realWorkingHours" />
</FormItem>
</Col>
<Col :span="8" >
<Col :span="8">
<FormItem :label="l('isOutside')" prop="isOutside">
<Dictionary code="Process.state" v-model="entity.isOutside" type="radio" style="height:20px"></Dictionary>
<Dictionary
code="Process.state"
v-model="entity.isOutside"
type="radio"
style="height:20px"
></Dictionary>
</FormItem>
</Col>
<Col :span="8" v-show="entity.isOutside==1">
......@@ -140,22 +146,17 @@
</Col>
<Col :span="8">
<FormItem :label="l('efficiencyValue')" prop="efficiencyValue">
<InputNumber v-model="entity.efficiencyValue"></InputNumber>
<InputNumber v-model="entity.efficiencyValue" style="width:100%"></InputNumber>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('singleOut')" prop="singleOut">
<InputNumber v-model="entity.singleOut"></InputNumber>
<InputNumber v-model="entity.singleOut" style="width:100%"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('taskContent')" prop="taskContent">
<i-quill
v-model="entity.taskContent"
:height="200"
v-paste="handleImg"
border
/>
<i-quill v-model="entity.taskContent" :height="200" v-paste="handleImg" border />
</FormItem>
</Col>
</Row>
......@@ -164,6 +165,7 @@
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</div>
</template>
<script>
import Api from "./api";
......@@ -191,7 +193,7 @@ export default {
realWorkingHours: 0,
realRuntime: 0,
isParticipateIntime: null,
equipType: "",
equipType: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
......@@ -201,7 +203,8 @@ export default {
props: {
v: Object,
eid: Number,
headid:Number,
headid: Number,
maxNum:Number,
},
mounted() {
if (this.eid > 0) {
......@@ -213,7 +216,8 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
this.entity.routingHeaderId=this.headid
this.entity.routingHeaderId = this.headid;
this.entity.taskSeq=this.maxNum
Api.create(this.entity)
.then(r => {
this.disabled = false;
......@@ -279,3 +283,5 @@ export default {
}
};
</script>
<style type="less">
</style>
\ No newline at end of file
......@@ -11,6 +11,7 @@
:eid="curId"
:headid="hid"
:eName="curName"
:maxNum="maxNum"
@on-close="cancel"
@on-ok="ok"
/>
......@@ -70,18 +71,24 @@ export default {
});
}
},
{ key: "taskSeq", title: this.l("taskSeq"), align: "left",width:100,sortable:true },
{
key: "taskSeq",
title: this.l("taskSeq"),
align: "left",
width: 100,
sortable: true
},
{
key: "name",
title: this.l("name"),
align: "left",
align: "left"
},
{
key: "equipType",
title: this.l("equipType"),
align: "left",
easy: true,
hide:true,
hide: true
},
{
key: "resourceType",
......@@ -119,15 +126,15 @@ export default {
title: this.l("isParticipateIntime"),
align: "center",
code: "Process.state",
hide: true,
hide: true
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "center",
code: "Process.state",
width:100,
hide: true,
width: 100,
hide: true
},
{
key: "isOutside",
......@@ -135,7 +142,7 @@ export default {
align: "center",
hide: true,
code: "Process.state",
width:100
width: 100
},
{
......@@ -270,7 +277,7 @@ export default {
{
attrs: { oprate: "detail" },
on: {
click: () => this.addStep(params.row.id, params.row.name)
click: () => this.addStep(params.row.id, params.row.name,params.row.maxNumStep)
}
},
"新增"
......@@ -304,17 +311,18 @@ export default {
}
}
],
list: []
list: [],
maxNum: 0,
maxNumTemp:0,
};
},
created() {
console.warn("dfadf:", this.headerid);
if (this.headerid != -1) {
this.easySearch.routingHeaderId.value = this.headerid;
} else {
this.easySearch.routingHeaderId.value = this.$route.query.id;
}
this.hid = this.easySearch.routingHeaderId.value;
this.hid =Number(this.easySearch.routingHeaderId.value);
},
mounted() {
this.load();
......@@ -337,7 +345,30 @@ export default {
Api.getdetailsteps(params)
.then(r => {
if (r.success) {
this.list = r.result;
this.list = [];
let tempNum = [];
let listTemp = r.result;
if (listTemp.length > 0) {
listTemp.forEach(data => {
tempNum.push(data.taskSeq);
let listStepTemp = [];
if (data.steps.length > 0) {
listStepTemp = data.steps;
let tempNum1 = [];
listStepTemp.forEach(dataStep => {
tempNum1.push(dataStep.stepSeq);
});
let maxNumStep = Math.max(...tempNum1) + 1;
data.maxNumStep = maxNumStep;
} else {
data.maxNumStep = 1;
}
});
this.maxNumTemp = Math.max(...tempNum) + 1;
} else {
this.maxNumTemp = 1;
}
this.list = listTemp;
}
})
.catch(err => {
......@@ -354,6 +385,7 @@ export default {
},
add() {
this.curId = 0;
this.maxNum=this.maxNumTemp
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
......@@ -388,9 +420,10 @@ export default {
this.curId = 0;
this.modal = false;
},
addStep(detailId, detailName) {
addStep(detailId, detailName,detailMaxNumStep) {
this.curId = detailId;
this.curName = detailName;
this.maxNum=detailMaxNumStep;
this.title = "新增工步";
this.detail = () => import("./routingStep/add");
this.modal = true;
......
......@@ -14,7 +14,7 @@
<Col :span="12">
<FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<InputNumber v-model="entity.stepSeq"></InputNumber>
<InputNumber v-model="maxNum"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
......@@ -133,7 +133,7 @@ export default {
eid: Number,//工序id
eName:String,//工序名称
headid:Number,//工艺id
maxNum:Number,
},
mounted() {
......@@ -145,6 +145,7 @@ export default {
this.disabled = true;
this.entity.routingHeaderId=this.headid
this.entity.routingDetailId=this.eid
this.entity.stepSeq=this.maxNum
Api.create(this.entity)
.then(r => {
this.disabled = false;
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row>
<!-- <Col :span="12">
<FormItem :label="l('classId')" prop="classId">
......@@ -27,8 +27,8 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('productId')" prop="productId">
<ProductSelect v-model="entity.productId"></ProductSelect>
<FormItem :label="l('productName')" prop="productId">
<ProductSelect v-model="entity.productId" @on-change="proChange"></ProductSelect>
</FormItem>
</Col>
......@@ -38,26 +38,21 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('author')" prop="author">
<UserSelect v-model="entity.author"></UserSelect>
<FormItem :label="l('departmentName')" prop="departmentId">
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('departmentId')" prop="departmentId">
<departmentSelect v-model="entity.departmentId"></departmentSelect>
</FormItem>
</Col>
<Col :span="5">
<FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<Col :span="8">
<FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="5">
<Col :span="8">
<FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem>
......@@ -151,7 +146,9 @@ export default {
data() {
return {
disabled: false,
entity: {},
entity: {
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
......@@ -230,6 +227,15 @@ export default {
l(key) {
key = "routingHeader" + "." + key;
return this.$t(key);
},
proChange(v,items)
{
this.entity.productName=items.name
},
departChange(v,items)
{
this.entity.departmentName=items.name
}
},
watch: {
......
......@@ -64,6 +64,22 @@
@on-ok="ok"
/>
</Modal>
<Modal
v-model="documentShow"
title="送审"
:mask-closable="false"
:scrollable="true"
ok-text="确定"
cancel-text="取消"
fullscreen
>
<sendAudit ref="sendAudit"></sendAudit>
<div slot="footer">
<Button @click="documentShow = false">取消</Button>
<Button type="primary" @click="passDocument">工艺规程送审</Button>
</div>
</Modal>
<div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex">
<div v-width="200">
......@@ -71,17 +87,17 @@
<Icon type="ios-undo-outline" size="24" />返回工艺规程
</a>
</div>
<div class="fg tc f14 fwBold blueTitle">
<div class="fg tc f14 fwBold blueTitle" style="padding-right:200px;">
{{l('code')}}:
<span class="grayTitle mr10">{{titleObj.code}}</span>
{{l('name')}}:
<span class="grayTitle mr10">{{titleObj.name}}</span>
{{l('routingType')}}:
<span class="grayTitle mr10">{{titleObj.routingType}}</span>
<span class="grayTitle mr10"><state code="Process.Routing.routingType" :value="titleObj.routingType" type="text"></state></span>
{{l('version')}}:
<span class="grayTitle">{{titleObj.version}}</span>
<!-- {{l('departmentId')}}:
<span class="grayTitle">{{titleObj.departmentId}}</span>-->
{{l('departmentName')}}:
<span class="grayTitle">{{titleObj.departmentName}}</span>
</div>
</div>
<div class="fg">
......@@ -96,8 +112,9 @@
import Api from "./api";
import Search from "./search";
import ProductTree from "@/components/page/productTree.vue";
import sendAudit from './sendAudit.vue'
export default {
components: { ProductTree, Search },
components: { ProductTree, Search,sendAudit},
head: {
title: "工艺规程",
author: "henq",
......@@ -119,6 +136,7 @@ export default {
detail: null,
curId: 0,
uId: "",
documentShow: false,
columns: [
{ key: "id", title: this.$t("id"), hide: true, align: "left" },
......@@ -142,21 +160,26 @@ export default {
key: "name",
title: this.l("name"),
align: "left",
width: 200,
easy: true,
high: true
},
{
key: "productId",
title: this.l("productId"),
key: "productName",
title: this.l("productName"),
align: "left",
high: true
},
{ key: "version", title: this.l("version"), align: "left", high: true },
{ key: "creatorUserId", title: this.l("author"), align: "left", high: true,type:"user" },
{
key: "departmentId",
title: this.l("departmentId"),
key: "creatorUserId",
title: this.l("author"),
align: "left",
high: true,
type: "user"
},
{
key: "departmentName",
title: this.l("departmentName"),
width: 100,
align: "left",
high: true
......@@ -184,7 +207,6 @@ export default {
align: "center",
width: 80,
high: true,
hide: true,
code: "Process.Status"
},
{
......@@ -252,8 +274,8 @@ export default {
{
title: "操作",
key: "action",
width: 180,
align: "center",
width: 210,
align: "left",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
......@@ -295,6 +317,16 @@ export default {
on: { click: () => this.remove(params.row.id) }
},
"删除"
),
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.sendAuditFun(params.row) }
},
params.row.approvalStatus == 4
? "送审"
: ""
)
]);
}
......@@ -305,7 +337,7 @@ export default {
name: "", //工艺名称
routingType: 0, //工艺类型
version: "", //工艺版本
departmentId: null //车间
departmentName: null //车间
},
processviewModal: false
};
......@@ -344,7 +376,7 @@ export default {
name: row.name,
routingType: row.routingType,
version: row.version,
departmentId: row.departmentId
departmentName: row.departmentName
};
// this.info=()=>import("./details")
this.src = "/technology/details?id=" + row.id;
......@@ -421,6 +453,29 @@ export default {
l(key) {
let vkey = "routingHeader" + "." + key;
return this.$t(vkey) || key;
},
//送审
sendAuditFun(row) {
this.documentShow = true;
this.$refs.sendAudit.intData(row);
},
saveDocument() {
this.documentShow = true;
this.$refs.sendAudit.intData(this.headerInfo);
},
passDocument() {
this.dataListRetrun = [];
this.dataListRetrun = this.$refs.sendAudit.returnDataList();
this.$http.order.batchstart(this.dataListRetrun).then(res => {
if (res.success) {
this.$Message.success("工艺规程送审成功!");
this.loaddata();
//this.easySearch('')
} else {
this.$Message.error("工艺规程送审失败!");
}
});
this.documentShow = false;
}
}
};
......
<template>
<div style="width:80%;margin:0 auto">
<DetailExamine :info="info"></DetailExamine>
<Process
ref="userProcess"
schemaIdVal="2085025d-9c38-4834-846a-8f9d2f4c8553"
/>
</div>
</template>
<script>
import Process from '@/components/orderOperator/process'
import DetailExamine from './detailExamine'
export default {
name: 'sendAudit',
components: {
Process,
DetailExamine
},
data() {
return {
info: {},
dataList: {},
dataListRetrun: [], //确定后返回数据
dataListRetrunNew: {
schemaId: '2085025d-9c38-4834-846a-8f9d2f4c8553', //订单送审的schemaId
idList: [], //订单id List
codeList: [], //订单编号List
operatorIdList: [] //操作员id
} //确定后返回数据
}
},
created: function() {},
methods: {
intData(data) {
//打开modal层时给订单list赋值
this.dataList ={}
this.dataList = data
this.info = data
},
returnDataList() {
this.dataListRetrunNew.idList = []
this.dataListRetrunNew.codeList = []
this.dataListRetrunNew.operatorIdList = []
this.dataListRetrunNew.idList.push(this.dataList.id)
this.dataListRetrunNew.codeList.push(this.dataList.code)
let ues = this.$refs.userProcess
this.dataListRetrunNew.operatorIdList = ues.immutData
// alert(JSON.stringify( this.dataListRetrunNew))
//返回审批数据
return this.dataListRetrunNew
}
}
}
</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