Commit cf9954dc authored by 仇晓婷's avatar 仇晓婷

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

parents 60717e9d 0c2008ed
<template>
<Select :placeholder="placeholder" v-model="name" @on-change="change" :multiple="multiple" clearable >
<Option v-for="item in dic" :value="item.value" :key="item.value" :label="item.label">
</Option>
</Select>
<Select
:placeholder="placeholder"
v-model="name"
@on-change="change"
:multiple="multiple"
clearable
@on-clear="onClear"
>
<Option v-for="item in dic" :value="item.value" :key="item.value" :label="item.label"></Option>
</Select>
</template>
<script>
export default {
model: {
prop: 'value',
event: 'on-change'
model: {
prop: "value",
event: "on-change"
},
data() {
return {
// name: [8,9],
name: this.value,
data: []
};
},
created() {
let url = `${systemUrl}/equipinfo/getlistall`;
this.$api.get(url).then(r => {
this.data = r.result;
});
},
props: {
value: [String, Number, Array],
placeholder: {
type: String,
default: "请选择设备"
},
data() {
return {
// name: [8,9],
name: this.value,
data: []
}
},
created() {
let url = `${systemUrl}/equipinfo/getlistall`;
this.$api.get(url).then(r=>{
this.data=r.result;
})
},
props: {
value: [String, Number,Array],
placeholder: {
type: String,
default: '请选择设备'
},
multiple:{
type:Boolean,
default:false
}
},
methods: {
change(event) {
// console.log(event)
this.$emit('on-change', event)
},
getTitle(){
var title="";
this.dic.forEach(u=>{
if(u.value==this.value){
title = u.label;
}
})
return title;
}
multiple: {
type: Boolean,
default: false
}
},
methods: {
change(v) {
// console.log(event)
this.name = v;
var item;
var items = this.data.filter(u => {
return u.id == v;
});
if (items && items.length > 0) {
item = items[0];
}
this.$emit("on-change", v, item);
// this.$emit("on-change", event);
},
computed: {
dic() {
let result = []
this.data.forEach((u) => {
result.push({
value:u.id,
label:u.equip_name
})
})
return result
getTitle() {
var title = "";
this.dic.forEach(u => {
if (u.value == this.value) {
title = u.label;
}
});
return title;
},
watch:{
value(v,o){
this.name=v;
// console.log(v,o)
}
onClear() {
this.placeholdeinfo = "请选择";
this.$emit("on-change", null, {});
}
}
},
computed: {
dic() {
let result = [];
this.data.forEach(u => {
result.push({
value: u.id,
label: u.equip_name
});
});
return result;
}
},
watch: {
value(v, o) {
this.name = v;
// console.log(v,o)
}
}
};
</script>
<style lang="less">
.w200 {
......
<template>
<TreeSelect
v-model="dep"
:data="data"
@on-change="change"
:disabled="disabled"
:multiple="multiple"
/>
<template>
<Select v-model="dep" :placeholder="placeholdeinfo" clearable @on-clear="onClear">
<Option
v-for="(item,index) in list"
:key="index"
:value="item.value"
style="display:none"
:label="item.label"
></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select>
</template>
<script>
<script>
export default {
name: "Add",
model: {
prop: "value",
event: "on-change"
......@@ -17,37 +20,22 @@ export default {
data() {
return {
dep: "",
data: [],
list: []
};
},
created() {
this.dep = this.value | "";
//http://39.100.148.168:10030/api/services/app/productlevel/getproducttreenew
this.$api.get(`${designUrl}/productlevel/getproducttreenew`).then(r => {
this.list = r.result;
setTree(r.result)
function setTree(data) {
data.map(u => {
u.title = u.name;
u.value = u.id;
u.expand = true;
u.selected = false;
u.checked = false;
if (u.children) {
setTree(u.children);
}
});
list: [],
data1: [],
selectdata: [],
placeholdeinfo: "请选择",
orderSearchForm: {
productId: null, //产品id
productName: "", //产品名称
drawingNo: "" //图号
}
var data = r.result;
this.data = this.$u.clone(data);
});
};
},
props: {
value: [String, Number, Array],
placeholder: {
type: String,
default: "请选择产品"
default: "请选择部门"
},
multiple: {
type: Boolean,
......@@ -58,28 +46,111 @@ export default {
default: false
}
},
mounted() {},
created() {
this.dep = this.value | "";
this.loadTree();
},
methods: {
change(v,item,items) {
console.log(v);
this.dep = v;
var item;
var items = this.list.filter(u => {
return u.id == v;
});
if (items && items.length > 0) {
item = items[0];
handleSelect(data) {
if (data.length > 0) {
this.selectdata = [];
this.selectdata = data;
if (data[0].isProduct == "1") {
this.list = [];
this.list.push({ label: data[0].title, value: data[0].id });
this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId;
this.orderSearchForm.drawingNo = data[0].drawingNo;
this.$emit(
"on-change",
this.orderSearchForm.productId,
this.orderSearchForm
);
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
}
this.$emit("on-change", v, item);
console.log(v,item,items)
},
resetFields() {
this.orderSearchForm = {
productId: null, //产品id
productName: "", //产品名称
drawingNo: "" //图号
};
},
loadTree() {
//打开新增订单窗口加载产品
this.resetFields();
var sumData = [];
this.$http.order.getallselecttree().then(res => {
if (res.result) {
for (var i = 0; i < res.result.length; i++) {
sumData = sumData.concat(res.result[i]);
}
this.data1 = sumData;
} else {
this.$Message.error("加载产品树失败!");
}
});
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
"span",
{
style: {
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = [];
arrTree.push(data);
this.handleSelect(arrTree); //手动选择树节点
}
}
},
data.title
);
},
onClear() {
this.list = [];
this.placeholdeinfo = "请选择";
this.resetFields();
this.$emit("on-change", null, this.orderSearchForm);
}
},
watch: {
value: {
handler(v, o) {
this.dep = v | "";
this.resetFields();
var sumData = [];
this.$http.order.getallselecttree().then(res => {
if (res.result) {
for (var i = 0; i < res.result.length; i++) {
sumData = sumData.concat(res.result[i]);
}
this.data1 = sumData;
let temData = this.$u.clone(this.data1);
this.list = [];
if (v != "" && v != null) {
let dataTemp = this.$u.treeToList(temData);
dataTemp.forEach(data => {
if (data.isProduct == 1 && data.id == this.dep) {
this.placeholdeinfo = data.title;
this.list.push({ label: data.title, value: data.id });
}
});
}
} else {
this.$Message.error("加载产品树失败!");
}
});
},
deep: true
}
}
};
</script>
\ No newline at end of file
</script>
......@@ -103,9 +103,9 @@ export default {
// this.cssId = remoteData.cssId;
// }else{
if (this.$props.url) {
const res = await Axios.get(this.$props.url);
const res = await this.$api.get(this.$props.url);
// this.cssId = this.getId();
this.resData = res.data;
this.resData = res;
console.log(this.resData)
}
......
......@@ -41,7 +41,7 @@ export default {
this.types.map(u => {
let item = {
label: u.name,
value: u.code
value: parseInt(u.code)
};
var children = this.resources.filter(r => {
return r.type == u.code;
......
......@@ -1171,11 +1171,12 @@ export default {
name: '工艺名称',
code: '工艺文件编号',
productId: '产品id',
productName:'产品名称',
productName: '产品名称',
drawingNo: '图号',
version: '版本',
author: '编制人',
departmentId: '主制车间',
departmentName:'主制车间',
departmentName: '主制车间',
isMain: '主工艺',
upId: '父工艺',
upDetailId: '上级工序',
......@@ -1190,75 +1191,73 @@ export default {
platesnum: '板数',
isEffect: '有效',
versionnotes: '版本说明',
phase: '阶段',
phase: '工艺阶段',
versionid: '版本ID',
isSendPpm: '发送PPM',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'最近修改时间',
lastModifierUserId:'最近修改人',
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '最近修改时间',
lastModifierUserId: '最近修改人',
},
routing_detail: {
id: '',
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '最近修改时间',
lastModifierUserId: '最近修改人',
isDeleted: '是否删除',
deleterUserId: '删除人',
deletionTime: '删除时间',
classId: 'classId',
routingHeaderId: '工艺规程id',
name: '工序名称',
taskSeq: '工序号',
description: '描述',
taskContent: '工序内容',
resourceId: '资源ID',
resourceType: '资源类型',
resourceCode: '资源类型',
runtime: '排产单件工时',
setupTime: '准备工时',
transportTime: '转运工时',
checkTime: '检验工时',
checkFlag: '检验标识',
efficiencyValue: '效率系数',
singleOut: '单件产出',
isOutside: '是否外协',
departmentId: '承制车间',
isImportant: '关键工序',
milestoneId: '里程碑',
phaseId: '工艺阶段',
status: '状态',
remark: '备注',
extend: '扩展字段',
outsideTime: '外协工期',
performanceHours: '绩效工时',
isImportantResources: '关重资源',
schedulingWorkingHours: '排产准结工时',
realWorkingHours: '实作准结工时',
realRuntime: '实作单件工时',
performanceWorkingHours: '绩效准结工时',
isParticipateIntime: '参与工时分配',
equipType: '设备类型',
equipTypeId: '设备类型ID',
note: '备注',
},
routing_detail:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'最近修改时间',
lastModifierUserId:'最近修改人',
isDeleted:'是否删除',
deleterUserId:'删除人',
deletionTime:'删除时间',
classId:'classId',
routingHeaderId:'工艺规程id',
name:'工序名称',
taskSeq:'工序号',
description:'描述',
taskContent:'工序内容',
resourceId:'资源ID',
resourceType:'资源类型',
runtime:'排产工时',
setupTime:'准备工时',
transportTime:'转运工时',
checkTime:'检验工时',
checkFlag:'检验标识',
efficiencyValue:'效率系数',
singleOut:'单件产出',
isOutside:'是否外协',
departmentId:'承制车间',
isImportant:'关键工序',
milestoneId:'里程碑',
phaseId:'工艺阶段',
status:'状态',
remark:'备注',
extend:'扩展字段',
outsideTime:'外协工期',
performanceHours:'绩效工时',
resourceCode:'资源编号',
isImportantResources:'关重资源',
schedulingWorkingHours:'排产准结工时',
realWorkingHours:'实作准结工时',
realRuntime:'实作单件工时',
performanceWorkingHours:'绩效准结工时',
isParticipateIntime:'参与工时分配',
equipType:'设备类型',
equipTypeId:'设备类型ID',
note:'备注',
},
RoutingSupporting: {
id: '',
routingHeaderId: '工艺规程ID',
routingHeaderId: '工艺规程ID',
routingDetailId: '工序ID',
routingStepId: '工步ID',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
routingHeaderId: '工艺规程ID',
routingDetailId: '工序ID',
routingStepId: '工步ID',
quantity: '数量',
singlequantity: '总计数量',
routingDetailName: '工序名称',
routingDetailNo:'工序号',
routingDetailNo: '工序号',
materialId: '物料id',
materialType: '物料类型',
materialNumber: '物料编号',
......@@ -1289,7 +1288,7 @@ export default {
routingDetailId: '工序',
classId: '',
stepSeq: '工步号',
name: '名称',
name: '工步名称',
description: '描述',
status: '状态',
remark: '备注',
......@@ -1331,7 +1330,7 @@ export default {
routingHeaderName: '工艺',
routingDetailId: '工序ID',
routingDetailName: '工序名称',
routingDetailNo:'工序号',
routingDetailNo: '工序号',
routingStepId: '工步ID',
checkContent: '检测内容',
checkType: '检测类型',
......@@ -1353,7 +1352,7 @@ export default {
sampling: '抽检',
samplingBatch: '抽检批次',
},
routingsupporting: {//工艺BOM
routingsupporting: { //工艺BOM
id: '',
creationTime: '创建时间',
creatorUserId: '创建人',
......@@ -1366,7 +1365,7 @@ export default {
routingHeaderName: '工艺',
routingDetailId: '工序ID',
routingDetailName: '工序名称',
routingDetailNo:'工序号',
routingDetailNo: '工序号',
routingStepId: '工步ID',
quantity: '数量',
materialId: '物料id',
......@@ -1383,5 +1382,48 @@ export default {
extend: '扩展字段',
remark: '备注',
drawNum: '产品图号',
},
routing_header_changeorder: { //工艺更改单
routingHeaderId: '工艺Id',
classId: '',
proposeUserId: '',
proposeUserName: '提出人',
departmentId: '申请部门Id',
departmentName: '申请部门',
technicalName: '技术文件名称',
technicalCode: '技术文件编号',
changedVersion: '更改后的版本号',
quantity: '数量',
printData: '发行日期',
executiveBranch: '执行部门',
executiveBranchId: '执行部门Id',
handlingOpinionsId: '',
handlingOpinions: '在制品处理意见',
beforeChangeContent: '变更前内容描述(附图)',
afterChangeContent: '变更后内容描述(附图)',
changeorderCode: '更改单编号',
changeReason: '更改原因',
effectiveDate: '有效日期',
checkPerson: '校对人',
approvalPerson: '批准人',
status: '状态',
note: '',
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
//
changeorder_code:'更改单编号',
print_data:'发行日期',
department_name:'申请部门',
propose_user_name:'提出人',
technical_name:'技术文件名称',
technical_code:'技术文件编号',
check_person:'校对人',
executive_branch:'执行部门',
}
}
......@@ -9538,8 +9538,7 @@
"dependencies": {
"deepmerge": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
"bundled": true
}
}
},
......@@ -19891,8 +19890,7 @@
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true,
"optional": true
"dev": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
......
<style lang="less">
@import './menu.less';
@import "./menu.less";
</style>
<template>
<Modal
......@@ -28,9 +28,9 @@
</Modal>
</template>
<script>
import routingchangeorder from './routingchangeorder.vue'
import Preview from './tan'
import service from '@/plugins/request'
import routingchangeorder from "./routingchangeorder.vue";
import Preview from "./tan";
import service from "@/plugins/request";
export default {
components: {
routingchangeorder,
......@@ -38,76 +38,77 @@ export default {
},
data() {
return {
myloading: true,
myloading: true,
show3: false,
seleId: '',
seleId: "",
column2: [
{
type: 'index',
title: '序号',
width: '65',
align: 'center'
type: "index",
title: "序号",
width: "65",
align: "center"
},
{
title: '更改单编号',
key: 'changeorder_code',
align: 'center',
width: '200'
title: "更改单编号",
key: "changeorder_code",
align: "center",
width: "200"
},
{
title: '发行日期',
key: 'print_data',
align: 'center',
width: '200'
title: "发行日期",
key: "print_data",
align: "center",
width: "200"
},
{
title: '申请部门',
key: 'department_name',
align: 'center',
width: '200'
title: "申请部门",
key: "department_name",
align: "center",
width: "200"
},
{
title: '提出人',
key: 'propose_user_name',
align: 'center',
width: '110'
title: "提出人",
key: "propose_user_name",
align: "center",
width: "110"
},
{
title: '技术文件名称',
key: 'technical_name',
align: 'center',
width: '110'
title: "技术文件名称",
key: "technical_name",
align: "center",
width: "110"
},
{
title: '技术文件编号',
key: 'technical_code',
align: 'center',
width: '110'
title: "技术文件编号",
key: "technical_code",
align: "center",
width: "110"
},
{
title: '校对人',
key: 'check_person',
align: 'center',
width: '110'
title: "校对人",
key: "check_person",
align: "center",
width: "110"
},
{
title: '数量',
key: 'quantity',
align: 'center',
width: '110'
},{
title: '状态',
key: 'status',
align: 'center',
title: "数量",
key: "quantity",
align: "center",
width: "110"
},
{
title: "状态",
key: "status",
align: "center",
width: 110,
render: (h,params) => {
return h('state', {
render: (h, params) => {
return h("state", {
props: {
code: 'unProduct.repairstatus',
type: 'text',
value: params.row.status + ''
code: "unProduct.repairstatus",
type: "text",
value: params.row.status + ""
}
})
});
// let statuse = params.row.status
// let text = statuse == 1 ? '待送审' : (statuse==2? '审核中':(statuse==3? '通过':(statuse==4? '驳回':(statuse==5? '终止':''))))
// return h('span',{},text)
......@@ -149,197 +150,184 @@ export default {
// align: 'center',
// width: '110'
// },
{
title: '操作',
key: 'id',
align: 'center',
width: '230',
{
title: "操作",
key: "id",
align: "center",
width: "230",
render: (h, params) => {
let actions = []
let actions = [];
if (params.row.status == 3) {
actions.push(
h(
'op',
{
attrs: {
oprate: 'detail'
},
on: {
click: () => {
// e.stopPropagation()
this.editRow1(params)
h(
"op",
{
attrs: {
oprate: "detail"
},
on: {
click: () => {
// e.stopPropagation()
this.editRow1(params);
}
}
}
},
'预览'
),
)}
if (params.row.status == 1 ||params.row.status == 4 ) {
},
"预览"
)
);
}
if (params.row.status == 1 || params.row.status == 4) {
actions.push(
h(
'op',
{
attrs: {
oprate: 'detail'
},
on: {
click: () => {
// e.stopPropagation()
this.editRow(params)
"op",
{
attrs: {
oprate: "detail"
},
on: {
click: () => {
// e.stopPropagation()
this.editRow(params);
}
}
}
},
'编辑'
))
},
"编辑"
)
);
}
return h('div', { class: 'action' }, actions)
return h("div", { class: "action" }, actions);
}
}
],
data2: []
}
};
},
mounted() {
this.taskTypeList = [
{ name: '五二九纵', value: 1 },
{ name: '五二九横', value: 2 },
{ name: '五二九预', value: 3 }
]
;(this.handlingopinionList = [
{ name: '例外', value: 1 },
{ name: '报废', value: 2 }
{ name: "五二九纵", value: 1 },
{ name: "五二九横", value: 2 },
{ name: "五二九预", value: 3 }
];
(this.handlingopinionList = [
{ name: "例外", value: 1 },
{ name: "报废", value: 2 }
]),
(this.versionList = [
{ name: 'A', value: 1 },
{ name: 'B', value: 2 },
{ name: 'C', value: 2 }
])
},
created() {
{ name: "A", value: 1 },
{ name: "B", value: 2 },
{ name: "C", value: 2 }
]);
},
created() {},
methods: {
editRow(params) {
this.$refs.routingchangeorder.changeorder_code ='',
this.$refs.routingchangeorder.routing_header_Id ='',
this.$refs.routingchangeorder.formValidate = {},
this.$refs.routingchangeorder.flag = 1
var url2 = `${designUrl}/routingheaderchangeorder/getbyid`
service
.get(`${url2}`, { Id: params.row.id } )
.then((response) => {
console.log(response)
this.$refs.routingchangeorder.changeorder_code =
response.result.changeorder_code
this.$refs.routingchangeorder.routing_header_Id =
response.result.routing_header_Id
this.$refs.routingchangeorder.formValidate = {
id: response.result.id,
changeorder_code: response.result.changeorder_code,
routing_header_Id: response.result.routing_header_Id,
propose_user_id: response.result.propose_user_id,
propose_user_name: response.result.propose_user_name,
department_id: response.result.department_id,
department_name: response.result.department_name,
technical_name: response.result.technical_name,
technical_code: response.result.technical_code,
changed_version: response.result.changed_version_id,
quantity: response.result.quantity,
print_data: response.result.print_data,
executive_branch: response.result.executive_branch,
executive_branch_id: response.result.executive_branch_id,
handling_opinions_id: response.result.handling_opinions_id,
handling_opinions: response.result.handling_opinions_id,
before_change_content: response.result.before_change_content,
after_change_content: response.result.after_change_content,
change_reason: response.result.change_reason,
effective_date: response.result.effective_date,
status:response.result.status,
note:response.result.note,
}
})
this.$refs.routingchangeorder.modelChange = true
(this.$refs.routingchangeorder.changeorder_code = ""),
(this.$refs.routingchangeorder.routing_header_Id = ""),
(this.$refs.routingchangeorder.formValidate = {}),
(this.$refs.routingchangeorder.flag = 1);
var url2 = `${designUrl}/routingheaderchangeorder/getbyid`;
service.get(`${url2}`, { Id: params.row.id }).then(response => {
console.log(response);
this.$refs.routingchangeorder.changeorder_code =
response.result.changeorder_code;
this.$refs.routingchangeorder.routing_header_Id =
response.result.routing_header_Id;
this.$refs.routingchangeorder.formValidate = {
id: response.result.id,
changeorder_code: response.result.changeorder_code,
routing_header_Id: response.result.routing_header_Id,
propose_user_id: response.result.propose_user_id,
propose_user_name: response.result.propose_user_name,
department_id: response.result.department_id,
department_name: response.result.department_name,
technical_name: response.result.technical_name,
technical_code: response.result.technical_code,
changed_version: response.result.changed_version_id,
quantity: response.result.quantity,
print_data: response.result.print_data,
executive_branch: response.result.executive_branch,
executive_branch_id: response.result.executive_branch_id,
handling_opinions_id: response.result.handling_opinions_id,
handling_opinions: response.result.handling_opinions_id,
before_change_content: response.result.before_change_content,
after_change_content: response.result.after_change_content,
change_reason: response.result.change_reason,
effective_date: response.result.effective_date,
status: response.result.status,
note: response.result.note
};
});
this.$refs.routingchangeorder.modelChange = true;
},
editRow1(params) {
this.$refs.Preview.name1='';
this.$refs.Preview.name2='';
this.$refs.Preview.name1 = "";
this.$refs.Preview.name2 = "";
//this.flag=1;
var url2 = `${designUrl}/routingheaderchangeorder/getbyidyl`
service
.get(`${url2}`, { Id: params.row.id })
.then((response) => {
console.log(response)
this.$refs.Preview.changeorder_code =
response.result.changeorder_code
this.$refs.Preview.formValidate = {
id: response.result.id,
changeorder_code: response.result.changeorder_code,
routing_header_Id: response.result.routing_header_Id,
propose_user_id: response.result.propose_user_id,
propose_user_name: response.result.propose_user_name,
department_id: response.result.department_id,
department_name: response.result.department_name,
technical_name: response.result.technical_name,
technical_code: response.result.technical_code,
changed_version: response.result.changed_version_name,
quantity: response.result.quantity,
print_data: response.result.print_data,
executive_branch: response.result.executive_branch,
executive_branch_id: response.result.executive_branch_id,
handling_opinions_id: response.result.handling_opinions_id,
handling_opinions: response.result.handling_opinions_name,
before_change_content: response.result.before_change_content,
after_change_content: response.result.after_change_content,
change_reason: response.result.change_reason,
effective_date: response.result.effective_date
}
})
var url3 = `${workflowUrl}/instance/getdetailbycode`
var url2 = `${designUrl}/routingheaderchangeorder/getbyidyl`;
service.get(`${url2}`, { Id: params.row.id }).then(response => {
console.log(response);
this.$refs.Preview.changeorder_code = response.result.changeorder_code;
this.$refs.Preview.formValidate = {
id: response.result.id,
changeorder_code: response.result.changeorder_code,
routing_header_Id: response.result.routing_header_Id,
propose_user_id: response.result.propose_user_id,
propose_user_name: response.result.propose_user_name,
department_id: response.result.department_id,
department_name: response.result.department_name,
technical_name: response.result.technical_name,
technical_code: response.result.technical_code,
changed_version: response.result.changed_version_name,
quantity: response.result.quantity,
print_data: response.result.print_data,
executive_branch: response.result.executive_branch,
executive_branch_id: response.result.executive_branch_id,
handling_opinions_id: response.result.handling_opinions_id,
handling_opinions: response.result.handling_opinions_name,
before_change_content: response.result.before_change_content,
after_change_content: response.result.after_change_content,
change_reason: response.result.change_reason,
effective_date: response.result.effective_date
};
});
var url3 = `${workflowUrl}/instance/getdetailbycode`;
service
.get(`${url3}`, { code: params.row.changeorder_code })
.then((response) => {
console.log(response)
for (var i = 0; i < response.result.nodes.length; i++) {
var id= response.result.nodes[i].id
var status= response.result.nodes[i].status
if(id==152&&status==2)
{
var nameid=response.result.nodes[i].defaultUsers.immutable[0]
var url5 = `${systemUrl}/user/getuser`
service
.get(`${url5}`, { id: nameid})
.then((response) => {
var name=response.result.name
console.log(name)
this.$refs.Preview.name1=name
})
}
if(id==153&&status==2)
{
var nameid=response.result.nodes[i].defaultUsers.immutable[0]
var url5 = `${systemUrl}/user/getuser`
service
.get(`${url5}`, { id: nameid})
.then((response) => {
var name=response.result.name
console.log(name)
this.$refs.Preview.name2=name
})
// console.log(this.$refs.coordinate.hqauditedTime)
}
.then(response => {
console.log(response);
for (var i = 0; i < response.result.nodes.length; i++) {
var id = response.result.nodes[i].id;
var status = response.result.nodes[i].status;
if (id == 152 && status == 2) {
var nameid = response.result.nodes[i].defaultUsers.immutable[0];
var url5 = `${systemUrl}/user/getuser`;
service.get(`${url5}`, { id: nameid }).then(response => {
var name = response.result.name;
console.log(name);
this.$refs.Preview.name1 = name;
});
}
if (id == 153 && status == 2) {
var nameid = response.result.nodes[i].defaultUsers.immutable[0];
var url5 = `${systemUrl}/user/getuser`;
service.get(`${url5}`, { id: nameid }).then(response => {
var name = response.result.name;
console.log(name);
this.$refs.Preview.name2 = name;
});
// console.log(this.$refs.coordinate.hqauditedTime)
}
}
//this.$refs.coordinate.formdata = response.result
})
this.$refs.Preview.modelChange1 = true
});
this.$refs.Preview.modelChange1 = true;
},
loadchangelist() {
let url = `${designUrl}/routingheaderchangeorder/getpaged`
service
.get(`${url}`, { routing_header_id: this.seleId })
.then((res) => {
this.data2 = res.result.items
})
let url = `${designUrl}/routingheaderchangeorder/getpaged`;
service.get(`${url}`, { routing_header_id: this.seleId }).then(res => {
this.data2 = res.result.items;
});
}
}
}
};
</script>
......@@ -21,7 +21,7 @@
<Input
search
enter-button
class=" mr10 fl"
class="mr10 fl"
style="width:240px"
v-model="searchIterms"
placeholder="请输入编号、名称"
......@@ -88,7 +88,6 @@
<Button type="primary" size="large" @click="modalOk">克隆</Button>
<Button type="primary" size="large" @click="nextStep">查看详情</Button>
</template>
</div>
<div v-else slot="footer" v-model="greateArtmodel">
<Button type="text" size="large" @click="saveCancelModel">取消</Button>
......@@ -173,8 +172,7 @@
<Row>
<Col span="12">
<FormItem label="工艺类型" style="width:100%">
<dictionary
<dictionary
code="Process.Routing.routingType"
v-model="SearchForm.routingType"
style="width:240px"
......@@ -193,95 +191,92 @@
<!-- 工艺更改表弹框 -->
<changelist ref="changelist"></changelist>
<!-- 工艺规程预览 -->
</div>
</template>
<script>
import CustomTable from '@/components/customTable/customTable.vue'
import processMain from './processMain.vue'
import processNew from './processNew.vue'
import routingchangeorder from '../../processDesign/Process/routingchangeorder.vue'
import changelist from '../../processDesign/Process/changelist.vue'
import processview from './processview.vue'
import sendAudit from './sendAudit.vue'
import service from '@/plugins/request'
import QS from 'querystring'
import CustomTable from "@/components/customTable/customTable.vue";
import processMain from "./processMain.vue";
import processNew from "./processNew.vue";
import routingchangeorder from "../../processDesign/Process/routingchangeorder.vue";
import changelist from "../../processDesign/Process/changelist.vue";
import processview from "./processview.vue";
import sendAudit from "./sendAudit.vue";
import service from "@/plugins/request";
import QS from "querystring";
export default {
components: {
CustomTable,
processMain,
processNew,
routingchangeorder,
changelist,
processview,
sendAudit
},
data() {
return {
doUpload: '/api/up/file',
tableHeight: '',
doUpload: "/api/up/file",
tableHeight: "",
myloading: true,
gymodaltitle: '创建工艺',
gymodaltitle: "创建工艺",
processviewModal: false,
isview: false,
issendAudit: false,
myechartModal: false,
createtype: 1,
show3: false,
seleId: '',
seleId: "",
flag: 0,
headerid: 0,
headeroldid: 0,
headerInfo: [],
pppss: {
srid: ''
srid: ""
},
column1: [
{
type: 'index',
title: '序号',
width: '65',
align: 'center'
type: "index",
title: "序号",
width: "65",
align: "center"
},
{
title: this.l("productName"),
key: 'productName',
align: 'center'
key: "productName",
align: "center"
},
{
title: this.l("name"),
key: 'name',
align: 'center'
key: "name",
align: "center"
},
{
title: this.l("code"),
key: 'code',
align: 'center',
width: '200'
key: "code",
align: "center",
width: "200"
},
{
title: this.l("author"),
key: 'authorName',
align: 'center',
width: '110'
key: "authorName",
align: "center",
width: "110"
},
{
title: this.l("approvalStatus"),
key: 'approvalStatus',
align: 'center',
width: '90',
key: "approvalStatus",
align: "center",
width: "90",
render: (h, params) => {
let statusColor =
params.row.approvalStatusDesc == '受控中' ? '#26A699' : '#FFCC00'
return h('div', [
params.row.approvalStatusDesc == "受控中" ? "#26A699" : "#FFCC00";
return h("div", [
h(
'b',
"b",
{
style: {
color: statusColor
......@@ -292,72 +287,72 @@ export default {
},
params.row.approvalStatusDesc
)
])
]);
}
},
{
title: this.l("version"),
key: 'version',
align: 'center'
key: "version",
align: "center"
},
{
title: this.l("routingType"),
key: 'routingTypeDesc',
align: 'center'
key: "routingTypeDesc",
align: "center"
},
{
title: '操作',
key: 'id',
align: 'center',
width: '200',
title: "操作",
key: "id",
align: "center",
width: "200",
render: (h, params) => {
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs: {
oprate: 'detail'
oprate: "detail"
},
on: {
click: () => {
// e.stopPropagation()
this.Headerview(params)
this.Headerview(params);
}
}
},
'预览'
"预览"
),
h(
'op',
"op",
{
attrs: {
oprate: 'detail'
oprate: "detail"
},
on: {
click: () => {
// e.stopPropagation()
this.viewFun(params)
this.viewFun(params);
}
}
},
'查看'
"查看"
),
h(
'op',
"op",
{
attrs: {
oprate: 'detail'
oprate: "detail"
},
on: {
click: () => {
this.Main(params)
this.Main(params);
}
}
},
'工艺更改单'
"工艺更改单"
)
])
]);
}
}
],
......@@ -371,17 +366,17 @@ export default {
Data_inventory03: [],
createShow: false,
treeInputSearch: '',
treeInputSearch: "",
ocolumn: [],
treeHeight: '',
treeHeight: "",
modal1: false,
modalShow: false,
documentShow: false,
modelChange: false,
pdfviewerVis: false,
modelSpecialty: false,
selectFault: 'greateArt',
selectFault: "greateArt",
greateArtmodel: true,
showBtn: true,
inventorymodel: false,
......@@ -393,66 +388,66 @@ export default {
pageindex: 1,
pagesize: 10,
datatotal: 0,
pdffileUrl: '',
searchIterms: '',
pdffileUrl: "",
searchIterms: "",
showModel: false,
approvalStatusdata: [],
SearchForm: {
version: null,
approvalStatus: null,
code: '',
name: '',
code: "",
name: "",
routingType: null
},
dataListRetrun: [] //送审提交数据
}
};
},
created() {
this.treeHeight = window.innerHeight - 140
this.tableHeight = window.innerHeight - 230
this.loaddata()
this.getapprovalStatusdata()
this.treeHeight = window.innerHeight - 140;
this.tableHeight = window.innerHeight - 230;
this.loaddata();
this.getapprovalStatusdata();
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.initTree()
this.initTree();
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 140
this.tableHeight = window.innerHeight - 230
})()
}
this.treeHeight = window.innerHeight - 140;
this.tableHeight = window.innerHeight - 230;
})();
};
},
computed: {
searchList() {
let nodeList = this.treeData
var text = this.treeInputSearch
var newNodeList = []
let nodeList = this.treeData;
var text = this.treeInputSearch;
var newNodeList = [];
function searchTree(nodeLists, value) {
for (let i = 0; i < nodeLists.length; i++) {
if (nodeLists[i].title.indexOf(value) != -1) {
newNodeList.push(nodeLists[i])
newNodeList.push(nodeLists[i]);
} else if (nodeLists[i].children.length > 0) {
searchTree(nodeLists[i].children, value)
searchTree(nodeLists[i].children, value);
}
}
}
if (text != '') {
searchTree(nodeList, text)
if (text != "") {
searchTree(nodeList, text);
} else {
return nodeList
return nodeList;
}
return newNodeList
return newNodeList;
}
},
methods: {
l(key) {
key = "routing_header" + "." + key;
return this.$t(key)
},
l(key) {
key = "routing_header" + "." + key;
return this.$t(key);
},
loaddata() {
let model = {
product_id: this.productid,
......@@ -464,115 +459,115 @@ export default {
code: this.SearchForm.code,
name: this.SearchForm.name,
routingType: this.SearchForm.routingType
}
};
var url = `${designUrl}/routingheader/getpaged?` + QS.stringify(model)
var url = `${designUrl}/routingheader/getpaged?` + QS.stringify(model);
service.get(`${url}`).then((response) => {
this.datatotal = response.result.totalCount
this.data1 = response.result.items
})
service.get(`${url}`).then(response => {
this.datatotal = response.result.totalCount;
this.data1 = response.result.items;
});
},
getapprovalStatusdata() {
var url = `${designUrl}/routingheader/getspprovalstatus`
service.get(`${url}`).then((response) => {
let arry = []
response.result.forEach((data) => {
var that = this
let arryObj = {}
arryObj['label'] = data.name
arryObj['value'] = data.code
arry.push(arryObj)
})
this.approvalStatusdata = arry
})
var url = `${designUrl}/routingheader/getspprovalstatus`;
service.get(`${url}`).then(response => {
let arry = [];
response.result.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
this.approvalStatusdata = arry;
});
},
gjSearch() {
this.pageindex = 1
this.searchIterms = ''
this.loaddata()
this.pageindex = 1;
this.searchIterms = "";
this.loaddata();
},
easySearch() {
this.pageindex = 1
this.pageindex = 1;
this.SearchForm = {
version: null,
approvalStatus: null,
code: '',
name: '',
code: "",
name: "",
routingType: null
}
this.loaddata()
};
this.loaddata();
},
//高级搜索
searchModel() {
this.showModel = true
this.showModel = true;
},
searchclose() {
this.showModel = false
this.showModel = false;
},
onPageChanged(page_index) {
this.pageindex = page_index
this.loaddata()
this.pageindex = page_index;
this.loaddata();
},
onPagesizeChanged(page_size) {
this.pagesize = page_size
this.loaddata()
this.pagesize = page_size;
this.loaddata();
},
initTree() {
var sumData = []
this.$http.order.getallselecttree().then((res) => {
var sumData = [];
this.$http.order.getallselecttree().then(res => {
if (res.result) {
for (var i = 0; i < res.result.length; i++) {
sumData = sumData.concat(res.result[i])
sumData = sumData.concat(res.result[i]);
}
this.treeData = sumData
this.treeData = sumData;
} else {
this.$Message.error('加载产品树失败!')
this.$Message.error("加载产品树失败!");
}
})
});
},
selectTreeNode(value) {
if (value != null && value.length > 0) {
this.ProductSelected = value
this.ProductSelected = value;
}
if (value.length > 0) {
this.ids = []
this.getAllIds(value)
this.ids = [];
this.getAllIds(value);
if (this.ids.length > 0) {
this.productid = this.ids.join(',')
this.productid = this.ids.join(",");
} else {
this.productid = '-1'
this.productid = "-1";
}
this.pageindex = 1
this.loaddata()
this.pageindex = 1;
this.loaddata();
}
},
getAllIds(trees) {
trees.forEach((data, index) => {
var that = this
var that = this;
if (data.isProduct) {
this.ids.push(data.productId)
this.ids.push(data.productId);
}
if (data.children.length > 0) {
this.getAllIds(data.children)
this.getAllIds(data.children);
}
})
});
},
selectedrow(currentRow, oldCurrentRow) {
this.headerSelected = currentRow
this.headerSelected = currentRow;
if (currentRow.approvalStatus == 4 || currentRow.approvalStatus == 0) {
this.isshowedit = true
this.isshowdel = true
this.isshowedit = true;
this.isshowdel = true;
} else {
this.isshowedit = false
this.isshowdel = false
this.isshowedit = false;
this.isshowdel = false;
}
},
......@@ -582,401 +577,395 @@ export default {
this.ProductSelected == null ||
this.ProductSelected[0].isProduct != 1
) {
this.$Message.error('请选择产品!')
return
this.$Message.error("请选择产品!");
return;
}
this.createtype = 1
this.gymodaltitle = '创建工艺规程'
this.modal1 = true
this.createtype = 1;
this.gymodaltitle = "创建工艺规程";
this.modal1 = true;
this.addpdefm = this.$refs.processMain;
this.clearModal()
this.addpdefm.formValidate.id = 0
this.addpdefm.formValidate.productids = this.ProductSelected[0].id
this.addpdefm.formValidate.routingType = 1
this.addpdefm.selectpdefmid = 0
this.headeroldid = 0
this.addpdefm.createtype = '1'
let that = this
var url = `${systemUrl}/cache/generate_serialcode_x?Code=GY`
service.get(`${url}`).then((response) => {
that.addpdefm.formValidate.code = response.result[0]
that.addpdefm.gycode = response.result[0]
}) //编号
this.clearModal();
this.addpdefm.formValidate.id = 0;
this.addpdefm.formValidate.productids = this.ProductSelected[0].id;
this.addpdefm.formValidate.routingType = 1;
this.addpdefm.selectpdefmid = 0;
this.headeroldid = 0;
this.addpdefm.createtype = "1";
let that = this;
var url = `${systemUrl}/cache/generate_serialcode_x?Code=GY`;
service.get(`${url}`).then(response => {
that.addpdefm.formValidate.code = response.result[0];
that.addpdefm.gycode = response.result[0];
}); //编号
var url =
`${designUrl}/productinfo/getbyid?id=` + this.ProductSelected[0].id
service.get(`${url}`).then((response) => {
this.addpdefm.ProductName = response.result.name
this.addpdefm.ProductCode = response.result.drawingNo
}) //产品名称
this.addpdefm.Loadfile(0)
this.addpdefm.setshow()
`${designUrl}/productinfo/getbyid?id=` + this.ProductSelected[0].id;
service.get(`${url}`).then(response => {
this.addpdefm.ProductName = response.result.name;
this.addpdefm.ProductCode = response.result.drawingNo;
}); //产品名称
this.addpdefm.Loadfile(0);
this.addpdefm.setshow();
},
saveCancelModel() {
this.modal1 = false
this.modal1 = false;
},
clearModal() {
this.addpdefm.id = 0
this.addpdefm.formValidate.name = ''
this.addpdefm.formValidate.version = '1'
this.addpdefm.formValidate.versioncode = 1
this.addpdefm.formValidate.task_type_str = '1'
this.addpdefm.formValidate.print_data_name = ''
this.addpdefm.formValidate.print_data_version = '1'
this.addpdefm.formValidate.print_data_versioncode = 1
this.addpdefm.formValidate.production_batch = ''
this.addpdefm.formValidate.remark = ''
this.addpdefm.Mianids = ''
this.addpdefm.MianCode = ''
this.addpdefm.MianVer = ''
this.addpdefm.ProductCode = ''
this.addpdefm.formValidate.change_order_code = ''
this.addpdefm.formValidate.change_order_date = ''
this.addpdefm.formValidate.change_method = ''
this.addpdefm.formValidate.change_order_id = 0
this.addpdefm.id = 0;
this.addpdefm.formValidate.name = "";
this.addpdefm.formValidate.version = "1";
this.addpdefm.formValidate.versioncode = 1;
this.addpdefm.formValidate.task_type_str = "1";
this.addpdefm.formValidate.print_data_name = "";
this.addpdefm.formValidate.print_data_version = "1";
this.addpdefm.formValidate.print_data_versioncode = 1;
this.addpdefm.formValidate.production_batch = "";
this.addpdefm.formValidate.remark = "";
this.addpdefm.Mianids = "";
this.addpdefm.MianCode = "";
this.addpdefm.MianVer = "";
this.addpdefm.ProductCode = "";
this.addpdefm.formValidate.change_order_code = "";
this.addpdefm.formValidate.change_order_date = "";
this.addpdefm.formValidate.change_method = "";
this.addpdefm.formValidate.change_order_id = 0;
},
modalOk() {
if (this.createtype == 2 && this.headerid == 0) {
this.$Message.error('请选择要克隆的工艺规程')
return
this.$Message.error("请选择要克隆的工艺规程");
return;
} else {
this.saveHeader(false)
this.saveHeader(false);
}
},
//保存增加修改
saveHeader(next) {
var a = this.addpdefm
var filelist = a.getfile()
var a = this.addpdefm;
var filelist = a.getfile();
let isvalidate = false
a.$refs['formValidate'].validate((valid) => {
let isvalidate = false;
a.$refs["formValidate"].validate(valid => {
if (valid) {
isvalidate = valid
isvalidate = valid;
} else {
}
})
});
if (!isvalidate) {
return
return;
}
var ar = this.data1.find((val) => {
return val.code == a.formValidate.code
})
var ar = this.data1.find(val => {
return val.code == a.formValidate.code;
});
if (ar && a.formValidate.id == 0) {
this.$Message.error('文件编号已存在')
this.$Message.error("文件编号已存在");
return
return;
}
if (a.formValidate.code != null) {
var url = `${designUrl}/routingheader/createorupdate`
var url = `${designUrl}/routingheader/createorupdate`;
service
.post(
`${url}`,
{
routingHeaderEntity: a.formValidate,
FileList: filelist
}
)
.then((response) => {
.post(`${url}`, {
routingHeaderEntity: a.formValidate,
FileList: filelist
})
.then(response => {
if (response.success) {
if (!next) {
if (this.headeroldid == 0) {
this.$Message.success('保存成功')
this.$Message.success("保存成功");
}
}
if (a.formValidate.id == 0) {
this.pageindex = 0
this.loaddata()
this.pageindex = 0;
this.loaddata();
} else {
this.loaddata()
this.loaddata();
}
this.headeroldid = a.selectpdefmid
this.headerInfo = a.formValidate
this.headeroldid = a.selectpdefmid;
this.headerInfo = a.formValidate;
let versioncode = this.headerInfo.versioncode
let task_type = this.headerInfo.task_type
let development_mode = this.headerInfo.development_mode
let versioncode = this.headerInfo.versioncode;
let task_type = this.headerInfo.task_type;
let development_mode = this.headerInfo.development_mode;
let print_data_versioncode = this.headerInfo
.print_data_versioncode
.print_data_versioncode;
a.formValidate = response.result
a.formValidate = response.result;
a.formValidate.versioncode = versioncode
a.formValidate.task_type = task_type
a.formValidate.development_mode = development_mode
a.formValidate.print_data_versioncode = print_data_versioncode
a.formValidate.versioncode = versioncode;
a.formValidate.task_type = task_type;
a.formValidate.development_mode = development_mode;
a.formValidate.print_data_versioncode = print_data_versioncode;
this.headerInfo.id = response.result.id
this.headerInfo.id = response.result.id;
a.updateEid(response.result.id)
a.updateEid(response.result.id);
this.modal1 = false
this.headerid = response.result.id
this.modal1 = false;
this.headerid = response.result.id;
if (this.headeroldid != 0) {
var url =
`${designUrl}/routingdetail/copybyheader?headerID=` +
this.headeroldid +
'&headerNewID=' +
this.headerid
service.post(`${url}`).then((response) => {
"&headerNewID=" +
this.headerid;
service.post(`${url}`).then(response => {
if (next) {
this.headeroldid = 0
this.modalShow = true
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid
this.$refs.processNew.isview = false
this.$refs.processNew.loaddata()
this.headeroldid = 0;
this.modalShow = true;
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid;
this.$refs.processNew.isview = false;
this.$refs.processNew.loaddata();
} else {
this.$Message.success('克隆成功')
this.headeroldid = 0
a.selectpdefmid = 0
this.editProcess(this.headerid)
this.$Message.success("克隆成功");
this.headeroldid = 0;
a.selectpdefmid = 0;
this.editProcess(this.headerid);
}
})
});
} else {
if (next) {
this.modalShow = true
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid
this.$refs.processNew.isview = false
this.$refs.processNew.loaddata()
this.modalShow = true;
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid;
this.$refs.processNew.isview = false;
this.$refs.processNew.loaddata();
} else {
if (this.issendAudit) {
this.saveDocument()
this.saveDocument();
}
}
}
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
} else {
this.$Message.error('请输入工艺文件编号')
this.$Message.error("请输入工艺文件编号");
}
},
editFun() {
this.gymodaltitle = '编辑工艺规程'
this.gymodaltitle = "编辑工艺规程";
if (this.headerSelected == null) {
this.$Message.error('请选择要修改的工艺规程')
return
this.$Message.error("请选择要修改的工艺规程");
return;
}
let that = this
this.modal1 = true
this.addpdefm = this.$refs.processMain
this.addpdefm.selectpdefmid = 0
this.isview = false
this.createtype = 1
this.headeroldid = 0
let that = this;
this.modal1 = true;
this.addpdefm = this.$refs.processMain;
this.addpdefm.selectpdefmid = 0;
this.isview = false;
this.createtype = 1;
this.headeroldid = 0;
var url =
`${designUrl}/routingheader/getbyid?id=` + this.headerSelected.id
service.get(`${url}`).then((response) => {
that.addpdefm.formValidate = response.result
that.addpdefm.isview = this.isview
that.addpdefm.ProductName = response.result.productName
that.addpdefm.ProductCode = response.result.productCode
this.headerInfo = response.result
this.headerid = response.result.id
that.addpdefm.MianVer = response.result.mianVer
that.addpdefm.MianCode = response.result.mianCode
that.addpdefm.setshow()
})
`${designUrl}/routingheader/getbyid?id=` + this.headerSelected.id;
service.get(`${url}`).then(response => {
that.addpdefm.formValidate = response.result;
that.addpdefm.isview = this.isview;
that.addpdefm.ProductName = response.result.productName;
that.addpdefm.ProductCode = response.result.productCode;
this.headerInfo = response.result;
this.headerid = response.result.id;
that.addpdefm.MianVer = response.result.mianVer;
that.addpdefm.MianCode = response.result.mianCode;
that.addpdefm.setshow();
});
},
editProcess(id) {
let that = this
this.modal1 = true
this.addpdefm = this.$refs.processMain
this.addpdefm.selectpdefmid = 0
this.isview = false
this.createtype = 1
this.headeroldid = 0
var url = `${designUrl}/routingheader/getbyid?id=` + id
service.get(`${url}`).then((response) => {
that.addpdefm.formValidate = response.result
that.addpdefm.isview = this.isview
that.addpdefm.ProductName = response.result.productName
that.addpdefm.ProductCode = response.result.productCode
this.headerInfo = response.result
this.headerid = response.result.id
that.addpdefm.MianVer = response.result.mianVer
that.addpdefm.MianCode = response.result.mianCode
that.addpdefm.setshow()
})
let that = this;
this.modal1 = true;
this.addpdefm = this.$refs.processMain;
this.addpdefm.selectpdefmid = 0;
this.isview = false;
this.createtype = 1;
this.headeroldid = 0;
var url = `${designUrl}/routingheader/getbyid?id=` + id;
service.get(`${url}`).then(response => {
that.addpdefm.formValidate = response.result;
that.addpdefm.isview = this.isview;
that.addpdefm.ProductName = response.result.productName;
that.addpdefm.ProductCode = response.result.productCode;
this.headerInfo = response.result;
this.headerid = response.result.id;
that.addpdefm.MianVer = response.result.mianVer;
that.addpdefm.MianCode = response.result.mianCode;
that.addpdefm.setshow();
});
},
viewFun(params) {
this.gymodaltitle = '查看工艺规程'
this.isview = true
let that = this
this.modal1 = true
this.addpdefm = this.$refs.processMain
this.addpdefm.selectpdefmid = 0
this.headeroldid = 0
var url = `${designUrl}/routingheader/getbyid?id=` + params.row.id
service.get(`${url}`).then((response) => {
that.addpdefm.formValidate = response.result
that.addpdefm.isview = this.isview
that.addpdefm.ProductName = response.result.productName
that.addpdefm.ProductCode = response.result.productCode
this.headerInfo = response.result
this.headerid = response.result.id
that.addpdefm.MianVer = response.result.mianVer
that.addpdefm.MianCode = response.result.mianCode
that.addpdefm.setshow()
})
this.gymodaltitle = "查看工艺规程";
this.isview = true;
let that = this;
this.modal1 = true;
this.addpdefm = this.$refs.processMain;
this.addpdefm.selectpdefmid = 0;
this.headeroldid = 0;
var url = `${designUrl}/routingheader/getbyid?id=` + params.row.id;
service.get(`${url}`).then(response => {
that.addpdefm.formValidate = response.result;
that.addpdefm.isview = this.isview;
that.addpdefm.ProductName = response.result.productName;
that.addpdefm.ProductCode = response.result.productCode;
this.headerInfo = response.result;
this.headerid = response.result.id;
that.addpdefm.MianVer = response.result.mianVer;
that.addpdefm.MianCode = response.result.mianCode;
that.addpdefm.setshow();
});
},
deleteFun() {
if (this.headerSelected == null) {
this.$Message.error('请选择要删除的工艺规程')
return
this.$Message.error("请选择要删除的工艺规程");
return;
}
this.$Modal.confirm({
title: '提示',
content: '确定要删除当前行?',
title: "提示",
content: "确定要删除当前行?",
onOk: () => {
var url =
`${designUrl}/routingheader/delete?id=` + this.headerSelected.id
`${designUrl}/routingheader/delete?id=` + this.headerSelected.id;
service
.delete(`${url}`)
.then((response) => {
.then(response => {
if (response.success) {
this.$Message.success('删除成功')
this.loaddata()
this.$Message.success("删除成功");
this.loaddata();
}
})
.catch((error) => {
this.$Message.error('删除失败')
})
.catch(error => {
this.$Message.error("删除失败");
});
},
onCancel: () => {}
})
});
},
sendAuditFun() {
if (this.headerSelected == null) {
this.$Message.error('请选择要送审的工艺规程')
return
this.$Message.error("请选择要送审的工艺规程");
return;
}
this.documentShow = true
this.$refs.sendAudit.intData(this.headerSelected)
this.documentShow = true;
this.$refs.sendAudit.intData(this.headerSelected);
},
saveDocument() {
this.documentShow = true
this.$refs.sendAudit.intData(this.headerInfo)
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) => {
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.$Message.success("工艺规程送审成功!");
this.loaddata();
//this.easySearch('')
} else {
this.$Message.error('工艺规程送审失败!')
this.$Message.error("工艺规程送审失败!");
}
})
this.documentShow = false
});
this.documentShow = false;
},
cancel() {},
nextStepandSave() {
this.saveHeader(true)
this.saveHeader(true);
},
nextStep() {
this.modalShow = true
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid
this.$refs.processNew.isview = true
this.$refs.processNew.loaddata()
this.modalShow = true;
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid;
this.$refs.processNew.isview = true;
this.$refs.processNew.loaddata();
},
laststep() {
this.modalShow = false
this.modal1 = true
this.modalShow = false;
this.modal1 = true;
this.addpdefm = this.$refs.processMain
this.addpdefm = this.$refs.processMain;
this.addpdefm.formValidate = this.headerInfo
that.addpdefm.isview = this.isview
that.addpdefm.ProductName = this.headerInfo.productName
that.addpdefm.ProductCode = this.headerInfo.productCode
this.addpdefm.formValidate = this.headerInfo;
that.addpdefm.isview = this.isview;
that.addpdefm.ProductName = this.headerInfo.productName;
that.addpdefm.ProductCode = this.headerInfo.productCode;
that.addpdefm.MianVer = this.headerInfo.mianVer
that.addpdefm.MianCode = this.headerInfo.mianCode
that.addpdefm.MianVer = this.headerInfo.mianVer;
that.addpdefm.MianCode = this.headerInfo.mianCode;
this.addpdefm.setshow()
this.addpdefm.setshow();
},
saveCancel1() {
this.modalShow = false
this.modalShow = false;
},
Headerview(params) {
//预览
this.processviewModal = true
this.$refs.processview.loaddata(params.row.id)
this.processviewModal = true;
this.$refs.processview.loaddata(params.row.id);
},
saveProcessView() {
this.processviewModal = true
this.processviewModal = true;
this.$refs.processview.loaddata(this.headerid)
this.$refs.processview.loaddata(this.headerid);
},
//工艺更改
TechnologyChange() {
if (this.headerSelected == null) {
this.$Message.error('请选择工艺!')
return
this.$Message.error("请选择工艺!");
return;
}
this.$refs.routingchangeorder.flag = 0
this.$refs.routingchangeorder.routing_header_Id = this.headerSelected.id
var userId =this.$store.state.userInfo.userId
this.$refs.routingchangeorder.flag = 0;
this.$refs.routingchangeorder.routing_header_Id = this.headerSelected.id;
var userId = this.$store.state.userInfo.userId;
let parma = {
Id: userId
}
this.$refs.routingchangeorder.changeorder_code = ''
this.$http.sysUser.getuserinfo(parma).then((res) => {
};
this.$refs.routingchangeorder.changeorder_code = "";
this.$http.sysUser.getuserinfo(parma).then(res => {
if (res.result) {
this.$refs.routingchangeorder.formValidate = {
technical_name: this.headerSelected.name,
technical_code: this.headerSelected.code,
department_name: res.result.departmentTitle,
propose_user_name: res.result.userName
}
};
}
})
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JSWJGGD`
service.get(`${url1}`).then((response) => {
this.$refs.routingchangeorder.changeorder_code = response.result
})
this.$refs.routingchangeorder.modelChange = true
});
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JSWJGGD`;
service.get(`${url1}`).then(response => {
alert(JSON.stringify(response))
this.$refs.routingchangeorder.changeorder_code = response.result;
});
this.$refs.routingchangeorder.modelChange = true;
},
Main(data) {
// this.eid1 = ''
this.seleId = data.row.id
this.$refs.changelist.seleId = data.row.id
let url = `${designUrl}/routingheaderchangeorder/getpaged`
service
.get(`${url}`, { routing_header_id: this.seleId })
.then((res) => {
//console.log(res)
this.$refs.changelist.data2 = res.result.items
this.$refs.changelist.myloading = false
if (this.$refs.changelist.data2.length == 0) {
this.$Message.error('该工艺规程没有更改单!')
this.$refs.changelist.show3 = false
return
}
this.$refs.changelist.show3 = true
})
this.seleId = data.row.id;
this.$refs.changelist.seleId = data.row.id;
let url = `${designUrl}/routingheaderchangeorder/getpaged`;
service.get(`${url}`, { routing_header_id: this.seleId }).then(res => {
//console.log(res)
this.$refs.changelist.data2 = res.result.items;
this.$refs.changelist.myloading = false;
if (this.$refs.changelist.data2.length == 0) {
this.$Message.error("该工艺规程没有更改单!");
this.$refs.changelist.show3 = false;
return;
}
this.$refs.changelist.show3 = true;
});
}
}
}
};
</script>
<style lang="less" scoped>
.order-quotation {
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="addd">
<ul>
<li><a @click="gnFunto(0,0)" :class="{active:gnFlag == 0}"><Icon type="ios-clipboard" /> 进度汇报</a></li>
<li><a @click="gnFunto(1,1)" :class="{active:gnFlag == 1}"><Icon type="ios-cube" /> 物料领用</a></li>
<li><a @click="gnFunto(2,2)" :class="{active:gnFlag == 2}"><Icon type="md-build" /> 产品装配</a></li>
<li><a @click="gnFunto(3,3)" :class="{active:gnFlag == 3}"><Icon type="ios-time" /> 工时分配</a></li>
<li><a @click="gnFunto(4,4)" :class="{active:gnFlag == 4}"><Icon type="ios-checkmark-circle" /> 生产准备</a></li>
<li><a @click="gnFunto(5,5)" :class="{active:gnFlag == 5}"><Icon type="ios-eye" /> 工艺查看</a></li>
<li><a @click="gnFunto(6,6)" :class="{active:gnFlag == 6}"><Icon type="ios-paper" /> 工艺案例</a></li>
<li><a @click="gnFunto(7,7)" :class="{active:gnFlag == 7}"><Icon type="ios-medal" /> 质量判定</a></li>
<li><a @click="gnFunto(8,8)" :class="{active:gnFlag == 8}"><Icon type="ios-create" /> 数据填报</a></li>
<li><a @click="gnFunto(9,9)" :class="{active:gnFlag == 9}"><Icon type="logo-codepen" /> 测试数据</a></li>
</ul>
</div>
</template>
<script>
export default {
name:'functional',
data(){
return{
gnFlag:0,
}
},
methods: {
gnFunto(number,type){
this.gnFlag = number
}
},
}
</script>
\ No newline at end of file
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="order_list">
<!-- <div slot="header">
<span class="gd_tt">工单列表</span>
<a ><Icon type="ios-list" size="18" /> 展开全部列表</a>
</div> -->
<!-- <div class="select_t">
<!-- <Icon type="md-arrow-dropright" />
<Select v-model="odermodel" style="width:100px" @on-change="searchOrder">
<Option v-for="item in oderList" :value="item.value" :key="item.index">{{ item.label }}</Option>
</Select>
<Button class="fr">时间正序排列</Button>
</div> -->
<div class="card_box">
<Card class="card_order" v-for="(item,index) in listTasks"
@click.native="goPage(item)" :key="index"
:class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
(item.status=='交检中'?'card_border4':(item.status=='交接中'?'card_border5':''))))"
>
<p slot="title">{{item.title}} <span class="fr" >{{item.status}}</span></p>
<p class="order_tit">{{item.shebei}}</p>
<p><Icon type="ios-pricetags" />{{item.gongxu}}</p>
<p>{{item.time}}</p>
</Card>
<!-- <Card class="card_order">
<p slot="title">CJ_181212_002_001 <span class="fr">未开工</span></p>
<p class="order_tit">发动机</p>
<p><Icon type="ios-pricetags" />工序1:领料</p>
<p>2018-12-12 ~ 2018-12-30</p>
</Card>
<Card class="card_order">
<p slot="title">CJ_181212_002_001 <span class="fr">执行中</span></p>
<p class="order_tit">发动机</p>
<p><Icon type="ios-pricetags" />工序1:领料</p>
<p>2018-12-12 ~ 2018-12-30</p>
</Card>
<Card class="card_order">
<p slot="title">CJ_181212_002_001 <span class="fr">暂停中</span></p>
<p class="order_tit">发动机</p>
<p><Icon type="ios-pricetags" />工序1:领料</p>
<p>2018-12-12 ~ 2018-12-30</p>
</Card>
<Card class="card_order">
<p slot="title">CJ_181212_002_001 <span class="fr">交检中</span></p>
<p class="order_tit">发动机</p>
<p><Icon type="ios-pricetags" />工序1:领料</p>
<p>2018-12-12 ~ 2018-12-30</p>
</Card>
<Card class="card_order">
<p slot="title">CJ_181212_002_001 <span class="fr">已完成</span></p>
<p class="order_tit">发动机</p>
<p><Icon type="ios-pricetags" />工序1:领料</p>
<p>2018-12-12 ~ 2018-12-30</p>
</Card> -->
</div>
</div>
</template>
<script>
export default {
name:'orderlist',
data(){
return{
gnFlag:0,
odermodel:'全部',
oderList:[
{
value: '全部',
label: '全部'
},{
value: '未开工',
label: '未开工'
},{
value: '执行中',
label: '执行中'
},{
value: '暂停中',
label: '暂停中'
},{
value: '交检中',
label: '交检中'
},{
value: '交接中',
label: '交接中'
},{
value: '已完成',
label: '已完成'
},
],
listTasks:[],
listTask:[
{
title: 'CJ_181212_002_001',
status: '已完成',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},{
title: 'CJ_181212_002_002',
status: '未开工',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},{
title: 'CJ_181212_002_003',
status: '执行中',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},{
title: 'CJ_181212_002_004',
status: '暂停中',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},{
title: 'CJ_181212_002_005',
status: '交检中',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},{
title: 'CJ_181212_002_006',
status: '交接中',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},{
title: 'CJ_181212_002_007',
status: '已完成',
shebei: '发动机',
gongxu: '工序1:领料',
time: '2018-12-12 ~ 2018-12-30',
},
],
}
},
created() {
this.loadTree();
},
methods: {
loadTree(){
this.listTasks = this.listTask
},
gnFunto(number,type){
this.gnFlag = number
},
goPage(item){
console.log(item)
},
searchOrder(value){
let allList = this.listTask;
let newitems = [];
if(value=="全部"){
this.loadTree();
}else{
allList.map((u,i)=>{
// console.log(i,":",u)
if(u.status==value){
newitems.push(u)
}
})
this.listTasks = newitems
}
},
},
}
</script>
\ No newline at end of file
.execute_box{
.top_title{
height: 50px;
line-height: 49px;
text-align: center;
font-weight: 600;
border-bottom: 1px solid #CACBD0;
}
.star{
height: 33vh;
padding: 6vh 0;
border-bottom: 1px solid #CACBD0;
.start{
width: 177px;
height: 177px;
background: url("../image/starbg.png")no-repeat center;
background-size: 100%;
display: block;
margin: 0 auto;
text-align: center;
line-height: 176px;
font-size: 22px;
color: #fff;
}
.button{
margin: 0 9%;
}
}
.gd_list{
position: absolute;
top: 45%;
left: 0px;
background: #2680EB;
color: #fff;
width: 32px;
padding: 8px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.gn_area{
position: absolute;
top: 45%;
right: 0px;
background: #515A6E;
color: #fff;
width: 32px;
padding: 8px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.footer_box{
height: calc( 66vh - 142px);
padding: 40px 40px 40px 40px;
.ul_box{
padding: 35px 60px;
min-width: 380px;
min-height: 370px;
border-right: 1px solid #CACBD0;
ul li{
height: 30px;
line-height: 29px;
}
}
.img_box {
text-align: center;
line-height: 350px;
font-size: 32px;
width: 750px;
height: 350px;
background: #ddd;
margin: 10px 0 0 170px;
}
}
}
.gd_box{
.ivu-drawer-wrap{
.ivu-drawer-left{
width: 370px!important;
.ivu-drawer-content{
.ivu-drawer-header{
border: none;
.header {
height: 34px;
margin: 0 -16px;
padding: 0 15px 0;
border-bottom: 1px solid #ccc;
.openAll{
margin: 0 0 0 55px;
}
}
.select_t{
padding: 15px 0 0 0;
}
}
.ivu-drawer-body {
padding: 0;
// .order_title {
// border-bottom: 1px solid #ccc;
// height: 50px;
// line-height: 50px;
// padding: 0 0 0 15px;
// .gd_tt{
// margin: 0 55px 0 0;
// }
// }
.order_list{
.select_t {
padding: 15px 20px;
}
.card_box{
padding: 0 15px 60px;
.card_order{
margin: 15px 0;
border-left: 4px solid #ccc;
cursor: pointer;
.order_tit{
color: #2680EB;
}
}
.card_border1{
border-left: 4px solid #707070;
}
.card_border2{
border-left: 4px solid #0DD78D;
}
.card_border3{
border-left: 4px solid #FE7777;
}
.card_border4{
border-left: 4px solid #FFA000;
}
.card_border5{
border-left: 4px solid #720193;
}
}
}
}
}
}
}
}
.gn_box{
.ivu-drawer-wrap{
.ivu-drawer-right{
width: 180px!important;
.ivu-drawer-content{
background: #515A6E;
.ivu-drawer-body {
padding: 13vh 0;
}
li{
line-height: 66px;
height: 66px;
a{
color: #fff;
width: 100%;
display: block;
text-align: center;
font-size: 16px;
}
a:hover{
background: #2680EB;
}
}
}
}
}
.addd{
a.active{
background: #2680EB;
}
}
}
\ No newline at end of file
<style lang="less">
@import "./execute.less";
</style>
<template>
<div class="execute_box">
<div class="top_title">
<span class="fl">进度汇报</span>
<div>工单编号: 12001011</div>
</div>
<div class="star" v-if="!starmodal">
<a class="start" @click="starFun" >
<Icon type="md-play" />
开工</a>
</div>
<div class="star flex fc-b" v-else-if="starmodal">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
</div>
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>名称:名称1</li>
<li>图号:UIGT-763245</li>
<li>状态:未开工</li>
<li>订单编号:097543346</li>
<li>订单属性1:</li>
<li>订单属性2:</li>
<li>订单属性3:</li>
<li>计划数量:10</li>
<li>节点日期:2020-02-25</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:名称1</li>
<li>工序序号:UIGT-763245</li>
<li>派工数量:66</li>
<li>资源名称:23366</li>
<li>资源编号:986732038</li>
<li>人员信息:</li>
<li>开始时间:</li>
<li>结束时间:</li>
<li>单件工时:10</li>
<li>准备工时:2020-02-25</li>
</ul>
</div>
<div class="img_box fl">
图片区
</div>
</div>
<a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 -->
<Drawer placement="left" class="gd_box" :closable="false" v-model="orderlistMode">
<div slot="header">
<div class="header">
<span class="gd_tt">工单列表</span>
<a class="openAll"><Icon type="ios-list" size="18" /> 展开全部列表</a>
</div>
<div class="select_t">
<!-- <Icon type="md-arrow-dropright" /> -->
<Select v-model="odermodel" style="width:100px" @on-change="searchOrder">
<Option v-for="item in oderList" :value="item.value" :key="item.index">{{ item.label }}</Option>
</Select>
<Button class="fr">时间正序排列</Button>
</div>
</div>
<orderlist ref="orderlist"/>
</Drawer>
<!-- title="功能区" -->
<Drawer class="gn_box" :closable="false" v-model="functionalMode">
<functional ref="functional" />
</Drawer>
</div>
</template>
<script>
import functional from "./components/functional";
import orderlist from "./components/orderlist";
export default {
components: { functional, orderlist},
data(){
return{
starmodal: true,
orderlistMode:false,
functionalMode:false,
oderList:[
{
value: '全部',
label: '全部'
},{
value: '未开工',
label: '未开工'
},{
value: '执行中',
label: '执行中'
},{
value: '暂停中',
label: '暂停中'
},{
value: '交检中',
label: '交检中'
},{
value: '交接中',
label: '交接中'
},{
value: '已完成',
label: '已完成'
},
],
}
},
created() {
// this.treeHeight = window.innerHeight - 120;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
},
methods: {
starFun(){
this.$Message.success("开工...")
},
searchOrder(value){
let allList = this.$refs.orderlist.listTask;
let newitems = [];
if(value=="全部"){
this.$refs.orderlist.loadTree();
}else{
allList.map((u,i)=>{
// console.log(i,":",u)
if(u.status==value){
newitems.push(u)
}
})
this.$refs.orderlist.listTasks = newitems
}
},
},
}
</script>
......@@ -11,11 +11,6 @@
<Input v-model="entity.unicode"></Input>
</FormItem>
</Col>-->
<Col :span="8">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="8">
<!-- <FormItem v-if="title=='新增'" :label="l('code')" prop="code">
<Input v-model="entity.code"></Input>
......@@ -24,17 +19,32 @@
<Input disabled v-model="entity.code"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('phase')" prop="phase">
<Dictionary code="Process.Routing.phase" v-model="entity.phase"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('productName')" prop="productId">
<ProductSelect v-model="entity.productId" @on-change="proChange"></ProductSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('drawingNo')" prop="drawingNo">
<Input v-model="entity.drawingNo" disabled></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input>
......@@ -42,25 +52,25 @@
</Col>
<Col :span="8">
<FormItem :label="l('departmentName')" prop="departmentId">
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem>
</Col>
<!--
<Col :span="8">
<FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<Col :span="8">
<FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem>
</Col>
<!--
<Col :span="12">
<FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber>
......@@ -133,7 +143,7 @@
<Col :span="24">
<FormItem label="多媒体附件" prop="files">
<files ref="refFile" :parms="parms" fileFormat/>
<files ref="refFile" :parms="parms" fileFormat />
</FormItem>
</Col>
</Row>
......@@ -161,11 +171,11 @@ export default {
name: "",
code: "",
productId: null,
productName:'',
productName: "",
version: "",
author: null,
departmentId: null,
departmentName:'',
departmentName: "",
isMain: 1,
upId: null,
upDetailId: null,
......@@ -199,14 +209,14 @@ export default {
props: {
v: Object,
eid: Number,
title: String,
title: String
},
mounted() {
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
if (this.eid > 0) {
this.load(this.eid);
}else{
} else {
this.getCodNumber();
}
},
......@@ -215,40 +225,42 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
if(this.title=='克隆'){
this.$Message.success("克隆");
this.getcloneData()
}else{
if (this.$refs.refFile.nameList.length > 0) {
this.entity.fileId = this.parms.eid;
if (this.title == "克隆") {
this.$Message.success("克隆");
this.getcloneData();
} else {
this.entity.fileId = "";
}
Api.create(this.entity).then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
if (this.$refs.refFile.nameList.length > 0) {
this.entity.fileId = this.parms.eid;
} else {
this.entity.fileId = "";
}
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("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
console.warn(err);
});
}
}
});
},
// 克隆工艺
getcloneData(){
getcloneData() {
let parmese = {
headerId: this.eid,
code: this.entity.code
};
Api.getCloneHeader(parmese).then(r => {
headerId: this.eid,
code: this.entity.code
};
Api.getCloneHeader(parmese)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("克隆成功");
......@@ -295,27 +307,25 @@ export default {
});
this.getCodNumber();
},
getCodNumber(){
Api.getCodeNumber({code:'GY',count:'1'}).then( r => {
if(r.success){
this.entity.code = r.result[0]
}else{
this.$Message.error("生成编号失败");
}
})
getCodNumber() {
Api.getCodeNumber({ code: "GY", count: "1" }).then(r => {
if (r.success) {
this.entity.code = r.result[0];
} else {
this.$Message.error("生成编号失败");
}
});
},
l(key) {
key = "routingHeader" + "." + key;
return this.$t(key);
},
proChange(v,items)
{
this.entity.productName=items.name
proChange(v, items) {
this.entity.productName = items.productName;
this.entity.drawingNo = items.drawingNo;
},
departChange(v,items)
{
this.entity.departmentName=items.name
departChange(v, items) {
this.entity.departmentName = items.name;
}
},
watch: {
......@@ -327,7 +337,7 @@ export default {
if (v != 0) {
this.load(v);
}
},
}
}
};
</script>
\ No newline at end of file
......@@ -48,6 +48,7 @@
<MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId">质控卡</MenuItem>
<MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId">工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
<MenuItem name="5" :to="'/technology/details/routinghcorder?id='+headerId">工艺更改单</MenuItem>
</Menu>
</div>
<div class="bottom_box">
......
......@@ -84,13 +84,14 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('equipType')" prop="equipType">
<EquipSelect v-model="entity.equipType"></EquipSelect>
<FormItem :label="l('equipType')" prop="equipTypeId">
<EquipSelect v-model="entity.equipTypeId" @on-change="equipChange"></EquipSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('resourceType')" prop="resourceType">
<Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary>
<!-- <Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary> -->
<ResourceSelect v-model="entity.resourceId" @on-change="resourceChange"></ResourceSelect>
</FormItem>
</Col>
<Col :span="8">
......@@ -146,12 +147,12 @@
</Col>
<Col :span="8">
<FormItem :label="l('efficiencyValue')" prop="efficiencyValue">
<InputNumber v-model="entity.efficiencyValue" style="width:100%"></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" style="width:100%"></InputNumber>
<InputNumber v-model="entity.singleOut" style="width:100%"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
......@@ -181,7 +182,9 @@ export default {
name: "",
taskSeq: null,
taskContent: "",
resourceId: null,
resourceType: null,
resourceCode: "",
runtime: 0,
efficiencyValue: null,
singleOut: null,
......@@ -204,7 +207,7 @@ export default {
v: Object,
eid: Number,
headid: Number,
maxNum:Number,
maxNum: Number
},
mounted() {
if (this.eid > 0) {
......@@ -217,7 +220,7 @@ export default {
if (v) {
this.disabled = true;
this.entity.routingHeaderId = this.headid;
this.entity.taskSeq=this.maxNum
this.entity.taskSeq = this.maxNum;
Api.create(this.entity)
.then(r => {
this.disabled = false;
......@@ -269,6 +272,15 @@ export default {
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key);
},
equipChange(v, items) {
this.entity.equipType = items.equip_name;
this.entity.equipTypeId = items.id;
},
resourceChange(v, items) {
this.entity.resourceId = v[1];
this.entity.resourceType =v[0];
this.entity.resourceCode = items[1].__label;
}
},
watch: {
......
......@@ -12,13 +12,13 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('equipType')" prop="equipType">
<EquipSelect v-model="entity.equipType"></EquipSelect>
<FormItem :label="l('equipType')" prop="equipTypeId">
<EquipSelect v-model="entity.equipTypeId" @on-change="equipChange"></EquipSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('resourceType')" prop="resourceType">
<Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary>
<ResourceSelect v-model="entity.resourceId" @on-change="resourceChange"></ResourceSelect>
</FormItem>
</Col>
<Col :span="8">
......@@ -121,12 +121,18 @@ export default {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.resourceId = [r.result.resourceType, r.result.resourceId];
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
if (this.entity.resourceId.length > 1) {
this.entity.resourceId = this.entity.resourceId[1];
} else {
this.entity.resourceId = null;
}
if (this.entity.isOutside != 1) {
this.entity.outsideTime = 0;
}
......@@ -154,6 +160,15 @@ export default {
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key);
},
equipChange(v, items) {
this.entity.equipType = items.equip_name;
this.entity.equipTypeId = items.id;
},
resourceChange(v, items) {
this.entity.resourceType = items[0].value;
this.entity.resourceId = v;
this.entity.resourceCode = items[1].__label;
}
},
watch: {
......
......@@ -91,10 +91,10 @@ export default {
hide: true
},
{
key: "resourceType",
title: this.l("resourceType"),
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
code: "Process.routing_detail.resource_type"
easy: true,
},
{
key: "isImportantResources",
......
......@@ -34,16 +34,17 @@
<!-- <Input v-model="entity.stepContent" type="textarea" :minRows="3", :maxRows="7" ></Input> -->
</FormItem>
</Col>
<Col :span="12">
<!--
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<RadioGroup v-model="entity.status">
<Radio :label="1"></Radio>
<Radio :label="0"></Radio>
</RadioGroup>
<!-- <Dictionary style="width:100px" code="Process.Status" v-model="entity.status"></Dictionary> -->
</FormItem>
</Col>
<!--<Col :span="24">
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
......
......@@ -3,13 +3,6 @@
<Row>
<Filed :span="12" :name="l('stepSeq')">{{entity.stepSeq}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('status')">
<state
code="Process.state"
:value="entity.status+''"
type="text"
></state>
</Filed>
<Filed :span="24" :name="l('stepContent')"><div v-html="entity.stepContent" class="html"></div></Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')"><User :value="entity.creatorUserId"></User></Filed>
......
......@@ -24,16 +24,18 @@
<!-- <Input v-model="entity.stepContent" type="textarea" :minRows="3", :maxRows="7" ></Input> -->
</FormItem>
</Col>
<Col :span="12">
<!--
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<RadioGroup v-model="entity.status">
<Radio :label="1"></Radio>
<Radio :label="0"></Radio>
</RadioGroup>
<!-- <Dictionary style="width:100px" code="Process.Status" v-model="entity.status"></Dictionary> -->
</FormItem>
</Col>
<!--<Col :span="24">
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
......
......@@ -111,13 +111,6 @@ export default {
align: "left",
hide: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "Process.Status"
},
{
title: "操作",
key: "action",
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('classId')" prop="classId">
<InputNumber v-model="entity.classId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('proposeUserId')" prop="proposeUserId">
<InputNumber v-model="entity.proposeUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('proposeUserName')" prop="proposeUserName">
<Input v-model="entity.proposeUserName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('departmentId')" prop="departmentId">
<InputNumber v-model="entity.departmentId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('departmentName')" prop="departmentName">
<Input v-model="entity.departmentName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('technicalName')" prop="technicalName">
<Input v-model="entity.technicalName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('technicalCode')" prop="technicalCode">
<Input v-model="entity.technicalCode"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('changedVersion')" prop="changedVersion">
<Input v-model="entity.changedVersion"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('quantity')" prop="quantity">
<InputNumber v-model="entity.quantity"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('printData')" prop="printData">
<Input v-model="entity.printData"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('executiveBranch')" prop="executiveBranch">
<Input v-model="entity.executiveBranch"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('executiveBranchId')" prop="executiveBranchId">
<InputNumber v-model="entity.executiveBranchId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('handlingOpinionsId')" prop="handlingOpinionsId">
<InputNumber v-model="entity.handlingOpinionsId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('handlingOpinions')" prop="handlingOpinions">
<Input v-model="entity.handlingOpinions"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('beforeChangeContent')" prop="beforeChangeContent">
<Input v-model="entity.beforeChangeContent"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('afterChangeContent')" prop="afterChangeContent">
<Input v-model="entity.afterChangeContent"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('changeorderCode')" prop="changeorderCode">
<Input v-model="entity.changeorderCode"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('changeReason')" prop="changeReason">
<Input v-model="entity.changeReason" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('effectiveDate')" prop="effectiveDate">
<Input v-model="entity.effectiveDate"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkPerson')" prop="checkPerson">
<InputNumber v-model="entity.checkPerson"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('approvalPerson')" prop="approvalPerson">
<InputNumber v-model="entity.approvalPerson"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<InputNumber v-model="entity.status"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('note')" prop="note">
<Input v-model="entity.note" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
entity: {
routingHeaderId: null,
classId: null,
proposeUserId: null,
proposeUserName: "",
departmentId: null,
departmentName: "",
technicalName: "",
technicalCode: "",
changedVersion: "",
quantity: null,
printData: "",
executiveBranch: "",
executiveBranchId: null,
handlingOpinionsId: null,
handlingOpinions: "",
beforeChangeContent: "",
afterChangeContent: "",
changeorderCode: "",
changeReason: "",
effectiveDate: "",
checkPerson: null,
approvalPerson: null,
status: 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_header_changeorder" + "." + key;
return this.$t(key);
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
};
</script>
import Api from '@/plugins/request'
export default {
index: `${technologyUrl}routingheaderchangeorder/paged`,
paged(params) {
return Api.post(`${technologyUrl}routingheaderchangeorder/paged`, params);
},
get(params) {
return Api.get(`${technologyUrl}routingheaderchangeorder/get`, params);
},
create(params) {
return Api.post(`${technologyUrl}routingheaderchangeorder/create`, params);
},
update(params) {
return Api.post(`${technologyUrl}routingheaderchangeorder/update`, params);
},
delete(id) {
return Api.delete(`${technologyUrl}routingheaderchangeorder/delete`, {
params: {
id: id
}
});
},
deletes(params) {
return Api.post(`${technologyUrl}routingheaderchangeorder/batchdelete`, params);
}
}
<template>
<div class="detail">
<Row>
<Filed :span="12" :name="l('routingHeaderId')">{{entity.routingHeaderId}}</Filed>
<Filed :span="12" :name="l('classId')">{{entity.classId}}</Filed>
<Filed :span="12" :name="l('proposeUserId')">{{entity.proposeUserId}}</Filed>
<Filed :span="12" :name="l('proposeUserName')">{{entity.proposeUserName}}</Filed>
<Filed :span="12" :name="l('departmentId')">{{entity.departmentId}}</Filed>
<Filed :span="12" :name="l('departmentName')">{{entity.departmentName}}</Filed>
<Filed :span="12" :name="l('technicalName')">{{entity.technicalName}}</Filed>
<Filed :span="12" :name="l('technicalCode')">{{entity.technicalCode}}</Filed>
<Filed :span="12" :name="l('changedVersion')">{{entity.changedVersion}}</Filed>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed>
<Filed :span="12" :name="l('printData')">{{entity.printData}}</Filed>
<Filed :span="12" :name="l('executiveBranch')">{{entity.executiveBranch}}</Filed>
<Filed :span="12" :name="l('executiveBranchId')">{{entity.executiveBranchId}}</Filed>
<Filed :span="12" :name="l('handlingOpinionsId')">{{entity.handlingOpinionsId}}</Filed>
<Filed :span="12" :name="l('handlingOpinions')">{{entity.handlingOpinions}}</Filed>
<Filed :span="12" :name="l('beforeChangeContent')">{{entity.beforeChangeContent}}</Filed>
<Filed :span="12" :name="l('afterChangeContent')">{{entity.afterChangeContent}}</Filed>
<Filed :span="12" :name="l('changeorderCode')">{{entity.changeorderCode}}</Filed>
<Filed :span="24" :name="l('changeReason')">{{entity.changeReason}}</Filed>
<Filed :span="12" :name="l('effectiveDate')">{{entity.effectiveDate}}</Filed>
<Filed :span="12" :name="l('checkPerson')">{{entity.checkPerson}}</Filed>
<Filed :span="12" :name="l('approvalPerson')">{{entity.approvalPerson}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="24" :name="l('note')">{{entity.note}}</Filed>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "routing_header_changeorder" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
};
</script>
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('classId')" prop="classId">
<InputNumber v-model="entity.classId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('proposeUserId')" prop="proposeUserId">
<InputNumber v-model="entity.proposeUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('proposeUserName')" prop="proposeUserName">
<Input v-model="entity.proposeUserName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('departmentId')" prop="departmentId">
<InputNumber v-model="entity.departmentId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('departmentName')" prop="departmentName">
<Input v-model="entity.departmentName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('technicalName')" prop="technicalName">
<Input v-model="entity.technicalName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('technicalCode')" prop="technicalCode">
<Input v-model="entity.technicalCode"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('changedVersion')" prop="changedVersion">
<Input v-model="entity.changedVersion"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('quantity')" prop="quantity">
<InputNumber v-model="entity.quantity"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('printData')" prop="printData">
<Input v-model="entity.printData"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('executiveBranch')" prop="executiveBranch">
<Input v-model="entity.executiveBranch"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('executiveBranchId')" prop="executiveBranchId">
<InputNumber v-model="entity.executiveBranchId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('handlingOpinionsId')" prop="handlingOpinionsId">
<InputNumber v-model="entity.handlingOpinionsId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('handlingOpinions')" prop="handlingOpinions">
<Input v-model="entity.handlingOpinions"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('beforeChangeContent')" prop="beforeChangeContent">
<Input v-model="entity.beforeChangeContent"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('afterChangeContent')" prop="afterChangeContent">
<Input v-model="entity.afterChangeContent"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('changeorderCode')" prop="changeorderCode">
<Input v-model="entity.changeorderCode"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('changeReason')" prop="changeReason">
<Input v-model="entity.changeReason" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('effectiveDate')" prop="effectiveDate">
<Input v-model="entity.effectiveDate"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkPerson')" prop="checkPerson">
<InputNumber v-model="entity.checkPerson"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('approvalPerson')" prop="approvalPerson">
<InputNumber v-model="entity.approvalPerson"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<InputNumber v-model="entity.status"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('note')" prop="note">
<Input v-model="entity.note" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
Api.update(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");
},
l(key) {
key = "routing_header_changeorder" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
};
</script>
<template>
<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>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</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" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
export default {
name: "list",
components: {
Search
},
head: {
title: "工艺变更单",
author: "henq",
description: "routing_header_changeorder 5/11/2020 9:39:04 AM"
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "changeorderCode,",
value: null
}
},
modal: false,
title: "新增",
detail: null,
curId: 0,
columns: [
{
key: "changeorderCode",
title: this.l("changeorderCode"),
align: "left",
high: true
},
{
key: "printData",
title: this.l("printData"),
align: "left",
high: true
},
{
key: "departmentName",
title: this.l("departmentName"),
align: "left",
easy: true,
high: true
},
{
key: "proposeUserId",
title: this.l("proposeUserName"),
align: "left",
high: true,
type: "user"
},
{
key: "technicalName",
title: this.l("technicalName"),
align: "left",
easy: true,
high: true
},
{
key: "technicalCode",
title: this.l("technicalCode"),
align: "left",
easy: true,
high: true
},
{
key: "checkPerson",
title: this.l("checkPerson"),
align: "left",
high: true
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
high: true
},
{ key: "status", title: this.l("status"), align: "left", high: true },
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left",
hide:true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left",
hide:true,
type:'user',
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left",
hide:true,
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left",
hide:true,
type:'user',
},
{
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) }
},
"删除"
)
]);
}
}
]
};
},
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
let vkey = "routing_header_changeorder" + "." + key;
return this.$t(vkey) || key;
}
}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="condition" :label-width="110">
<Row>
<Col :span="12" v-if="condition.id.show">
<FormItem :label="l('id')" prop="id">
<Input v-model="condition.id.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.routingHeaderId.show">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<Input v-model="condition.routingHeaderId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.classId.show">
<FormItem :label="l('classId')" prop="classId">
<Input v-model="condition.classId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.proposeUserId.show">
<FormItem :label="l('proposeUserId')" prop="proposeUserId">
<Input v-model="condition.proposeUserId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.proposeUserName.show">
<FormItem :label="l('proposeUserName')" prop="proposeUserName">
<Input v-model="condition.proposeUserName.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.departmentId.show">
<FormItem :label="l('departmentId')" prop="departmentId">
<Input v-model="condition.departmentId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.departmentName.show">
<FormItem :label="l('departmentName')" prop="departmentName">
<Input v-model="condition.departmentName.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.technicalName.show">
<FormItem :label="l('technicalName')" prop="technicalName">
<Input v-model="condition.technicalName.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.technicalCode.show">
<FormItem :label="l('technicalCode')" prop="technicalCode">
<Input v-model="condition.technicalCode.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.changedVersion.show">
<FormItem :label="l('changedVersion')" prop="changedVersion">
<Input v-model="condition.changedVersion.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.quantity.show">
<FormItem :label="l('quantity')" prop="quantity">
<Input v-model="condition.quantity.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.executiveBranch.show">
<FormItem :label="l('executiveBranch')" prop="executiveBranch">
<Input v-model="condition.executiveBranch.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.executiveBranchId.show">
<FormItem :label="l('executiveBranchId')" prop="executiveBranchId">
<Input v-model="condition.executiveBranchId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.handlingOpinionsId.show">
<FormItem :label="l('handlingOpinionsId')" prop="handlingOpinionsId">
<Input v-model="condition.handlingOpinionsId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.handlingOpinions.show">
<FormItem :label="l('handlingOpinions')" prop="handlingOpinions">
<Input v-model="condition.handlingOpinions.value"></Input>
</FormItem>
</Col>
<Col :span="24" v-if="condition.changeReason.show">
<FormItem :label="l('changeReason')" prop="changeReason">
<Input v-model="condition.changeReason.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.checkPerson.show">
<FormItem :label="l('checkPerson')" prop="checkPerson">
<Input v-model="condition.checkPerson.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.approvalPerson.show">
<FormItem :label="l('approvalPerson')" prop="approvalPerson">
<Input v-model="condition.approvalPerson.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Input v-model="condition.status.value"></Input>
</FormItem>
</Col>
<Col :span="24" v-if="condition.note.show">
<FormItem :label="l('note')" prop="note">
<Input v-model="condition.note.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creationTime.show">
<FormItem :label="$t('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creatorUserId.show">
<FormItem :label="$t('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModificationTime.show">
<FormItem :label="$t('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModifierUserId.show">
<FormItem :label="$t('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value"></Input>
</FormItem>
</Col>
</Row>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
condition: {
id: { op: "Equal", value: null, show: false },
routingHeaderId: { op: "Equal", value: null, show: false },
classId: { op: "Equal", value: null, show: false },
proposeUserId: { op: "Equal", value: null, show: true },
proposeUserName: { op: "Equal", value: null, show: false },
departmentId: { op: "Equal", value: null, show: true },
departmentName: { op: "Equal", value: null, show: false },
technicalName: { op: "Equal", value: null, show: true },
technicalCode: { op: "Equal", value: null, show: true },
changedVersion: { op: "Equal", value: null, show: true },
quantity: { op: "Equal", value: null, show: true },
executiveBranch: { op: "Equal", value: null, show: false },
executiveBranchId: { op: "Equal", value: null, show: true },
handlingOpinionsId: { op: "Equal", value: null, show: true },
handlingOpinions: { op: "Equal", value: null, show: true },
changeReason: { op: "Equal", value: null, show: true },
checkPerson: { op: "Equal", value: null, show: true },
approvalPerson: { op: "Equal", value: null, show: true },
status: { op: "Equal", value: null, show: true },
note: { op: "Equal", value: null, show: true },
creationTime: { op: "Range", value: null, show: true },
creatorUserId: { op: "Equal", value: null, show: true },
lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true },
}
};
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "routing_header_changeorder" + "." + key;
return this.$t(key);
}
}
};
</script>
......@@ -58,22 +58,7 @@ export default {
curId: 0,
hid: 0,
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left",
high: true,
hide: true
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
align: "left",
high: true,
hide: true
},
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
......@@ -88,13 +73,6 @@ export default {
align: "left",
high: true
},
{
key: "routingStepId",
title: this.l("routingStepId"),
align: "left",
high: true,
hide: true
},
{
key: "checkType",
title: this.l("checkType"),
......@@ -150,13 +128,13 @@ export default {
high: true,
hide: true
},
{
key: "standard",
title: this.l("standard"),
align: "left",
easy: true,
high: true,
},
// {
// key: "standard",
// title: this.l("standard"),
// align: "left",
// easy: true,
// high: true,
// },
{
key: "qualityTemplateName",
title: this.l("qualityTemplateName"),
......
......@@ -7,8 +7,8 @@
</FormItem>
</Col>
<Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Select v-model="condition.routingDetailId.value">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="condition.routingDetailId.value" clearable>
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
......@@ -162,7 +162,7 @@ export default {
remark: { op: "Equal", value: null, show: false },
productionRequirement: { op: "Equal", value: null, show: false },
standard: { op: "Equal", value: null, show: false },
qualityTemplateName: { op: "Equal", value: null, show: true },
qualityTemplateName: { op: "Equal", value: null, show: false },
isImportant: { op: "Equal", value: null, show: true },
firstCheck: { op: "Equal", value: null, show: true },
inspection: { op: "Equal", value: null, show: true },
......
......@@ -22,10 +22,20 @@
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('state')" prop="state">
<Dictionary code="Process.state" v-model="entity.state" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
-->
<Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
......@@ -55,7 +65,7 @@
</Col>
<Col :span="8">
<FormItem :label="l('quantity')" prop="quantity">
<InputNumber v-model="entity.quantity"></InputNumber>
<InputNumber v-model="entity.quantity" style="width:100%"></InputNumber>
</FormItem>
</Col>
<Col :span="8">
......@@ -93,16 +103,7 @@
<Input v-model="entity.drawNum"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('state')" prop="state">
<Dictionary code="Process.state" v-model="entity.state" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......
......@@ -22,6 +22,16 @@
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('state')" prop="state">
<Dictionary code="Process.state" v-model="entity.state" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
-->
<Col :span="8">
......@@ -93,16 +103,7 @@
<Input v-model="entity.drawNum"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('state')" prop="state">
<Dictionary code="Process.state" v-model="entity.state" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......
......@@ -57,22 +57,6 @@ export default {
curId: 0,
hid: 0,
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left",
high: true,
hide:true,
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
align: "left",
high: true,
hide:true,
},
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
......@@ -87,13 +71,6 @@ export default {
align: "left",
high: true
},
{
key: "routingStepId",
title: this.l("routingStepId"),
align: "left",
high: true,
hide:true,
},
{
key: "quantity",
title: this.l("quantity"),
......@@ -101,13 +78,6 @@ export default {
high: true,
width:80,
},
{
key: "materialId",
title: this.l("materialId"),
align: "left",
high: true,
hide:true,
},
{
key: "materialType",
title: this.l("materialType"),
......@@ -174,14 +144,6 @@ export default {
easy: true,
high: true
},
{
key: "state",
title: this.l("state"),
align: "center",
high: true,
code: "Process.Status",
width:80,
},
{
key: "drawNum",
title: this.l("drawNum"),
......@@ -202,6 +164,7 @@ export default {
hide: true,
align: "left",
hide:true,
type:'user',
},
{
key: "lastModificationTime",
......@@ -216,27 +179,7 @@ export default {
hide: true,
align: "left",
hide:true,
},
{
key: "isDeleted",
title: this.l("isDeleted"),
hide: true,
align: "left",
hide:true,
},
{
key: "deletionTime",
title: this.l("deletionTime"),
hide: true,
align: "left",
hide:true,
},
{
key: "deleterUserId",
title: this.l("deleterUserId"),
hide: true,
align: "left",
hide:true,
type:'user',
},
{
title: "操作",
......
......@@ -7,8 +7,8 @@
</FormItem>
</Col>
<Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Select v-model="condition.routingDetailId.value">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="condition.routingDetailId.value" clearable>
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
......@@ -123,7 +123,7 @@ export default {
texture: { op: "Equal", value: null, show: true },
procurementStandards: { op: "Equal", value: null, show: true },
qualityGrade: { op: "Equal", value: null, show: true },
state: { op: "Equal", value: null, show: true },
state: { op: "Equal", value: null, show: false },
remark: { op: "Equal", value: null, show: false },
drawNum: { op: "Equal", value: null, show: true }
},
......
......@@ -26,25 +26,29 @@
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('phase')" prop="phase">
<Dictionary code="Process.Routing.phase" v-model="entity.phase"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('productName')" prop="productId">
<ProductSelect v-model="entity.productId" @on-change="proChange"></ProductSelect>
<ProductSelect v-model="entity.productId" @on-change="proChange"></ProductSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input>
<FormItem :label="l('drawingNo')" prop="drawingNo">
<Input v-model="entity.drawingNo" disabled></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('departmentName')" prop="departmentId">
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
<FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
<FormItem :label="l('departmentName')" prop="departmentId">
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
</FormItem>
</Col>
<Col :span="8">
......@@ -58,6 +62,11 @@
</FormItem>
</Col>
<!--
<Col :span="8">
<FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber>
......@@ -124,7 +133,7 @@
<Col :span="24">
<FormItem label="多媒体附件" prop="files">
<files ref="refFile" :parms="parms" fileFormat/>
<files ref="refFile" :parms="parms" fileFormat />
</FormItem>
</Col>
</Row>
......@@ -146,9 +155,7 @@ export default {
data() {
return {
disabled: false,
entity: {
},
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
......@@ -162,7 +169,7 @@ export default {
},
props: {
eid: Number,
uid: String,
uid: String
},
mounted() {
if (this.eid > 0) {
......@@ -228,14 +235,12 @@ export default {
key = "routingHeader" + "." + key;
return this.$t(key);
},
proChange(v,items)
{
this.entity.productName=items.name
proChange(v, items) {
this.entity.productName = items.productName;
this.entity.drawingNo = items.drawingNo;
},
departChange(v,items)
{
this.entity.departmentName=items.name
departChange(v, items) {
this.entity.departmentName = items.name;
}
},
watch: {
......@@ -244,8 +249,7 @@ export default {
this.load(v);
}
},
uid(v) {
}
uid(v) {}
}
};
</script>
\ No newline at end of file
......@@ -80,6 +80,10 @@
<Button type="primary" @click="passDocument">工艺规程送审</Button>
</div>
</Modal>
<!-- 工艺更改弹框 -->
<routingchangeorder ref="routingchangeorder"></routingchangeorder>
<!-- 工艺更改表弹框 -->
<changelist ref="changelist"></changelist>
<div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex">
<div v-width="200">
......@@ -93,7 +97,9 @@
{{l('name')}}:
<span class="grayTitle mr10">{{titleObj.name}}</span>
{{l('routingType')}}:
<span class="grayTitle mr10"><state code="Process.Routing.routingType" :value="titleObj.routingType" type="text"></state></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('departmentName')}}:
......@@ -110,11 +116,14 @@
<script>
import Api from "./api";
import service from '@/plugins/request'
import Search from "./search";
import ProductTree from "@/components/page/productTree.vue";
import sendAudit from './sendAudit.vue'
import sendAudit from "./sendAudit.vue";
import routingchangeorder from '../processDesign/Process/routingchangeorder.vue'
import changelist from '../processDesign/Process/changelist.vue'
export default {
components: { ProductTree, Search,sendAudit},
components: { ProductTree, Search, sendAudit,routingchangeorder,changelist },
head: {
title: "工艺规程",
author: "henq",
......@@ -138,16 +147,7 @@ export default {
uId: "",
documentShow: false,
columns: [
{ key: "id", title: this.$t("id"), hide: true, align: "left" },
{ key: "classId", title: this.l("classId"), align: "left", hide: true },
{
key: "unicode",
title: this.l("unicode"),
align: "left",
easy: false,
hide: true
},
{
key: "code",
title: this.l("code"),
......@@ -164,89 +164,64 @@ export default {
high: true
},
{
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",
key: "phase",
title: this.l("phase"),
align: "center",
high: true,
type: "user"
},
{
key: "departmentName",
title: this.l("departmentName"),
width: 100,
align: "left",
high: true
code: "Process.Routing.phase"
},
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
{ key: "version", title: this.l("version"), align: "left", high: true,width: 100, },
{
key: "routingType",
title: this.l("routingType"),
align: "left",
align: "center",
width: 100,
high: true,
code: "Process.Routing.routingType"
},
// { key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'Process.Status' },
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
// { key:"auditUserId2",title:this.l("auditUserId2") ,align:"left" ,high:true },
// { key:"platesnum",title:this.l("platesnum") ,align:"left" ,high:true },
{
key: "isEffect",
title: this.l("isEffect"),
align: "center",
width: 80,
high: true,
code: "Process.Status"
},
{
key: "versionnotes",
title: this.l("versionnotes"),
key: "drawingNo",
title: this.l("drawingNo"),
align: "left",
high: true,
hide: true
high: true
},
{
key: "phase",
title: this.l("phase"),
key: "productName",
title: this.l("productName"),
align: "left",
high: true,
hide: true,
code: "Process.Routing.phase"
high: true
},
{
key: "versionid",
title: this.l("versionid"),
key: "departmentName",
title: this.l("departmentName"),
width: 100,
align: "left",
hide: true,
code: "Process.Routing.version"
high: true
},
{
key: "isMain",
title: this.l("isMain"),
key: "isEffect",
title: this.l("isEffect"),
align: "center",
width: 80,
high: true,
code: "Process.state"
},
{
key: "isSendPpm",
title: this.l("isSendPpm"),
align: "center",
width: 140,
high: true,
code: "Process.Status"
},
//{ key: "id", title: this.$t("id"), hide: true, align: "left" },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
//{ key: "classId", title: this.l("classId"), align: "left", hide: true },
//{ key: "unicode", title: this.l("unicode"),align: "left",easy: false,hide: true},
// { key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'Process.Status' },
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
// { key:"auditUserId2",title:this.l("auditUserId2") ,align:"left" ,high:true },
// { key:"platesnum",title:this.l("platesnum") ,align:"left" ,high:true },
// { key: "isMain", title: this.l("isMain"),align: "center",width: 80,high: true,code: "Process.state"},
//{key: "creatorUserId",title: this.l("author"),align: "left", high: true,type: "user",hide: true},
//{key: "versionnotes",title: this.l("versionnotes"),align: "left", high: true,hide: true},
//{key: "versionid", title: this.l("versionid"), align: "left", hide: true, code: "Process.Routing.version"},
{
key: "creationTime",
title: this.$t("creationTime"),
......@@ -274,7 +249,7 @@ export default {
{
title: "操作",
key: "action",
width: 210,
width: 320,
align: "left",
render: (h, params) => {
return h("div", { class: "action" }, [
......@@ -318,15 +293,21 @@ export default {
},
"删除"
),
h(
"op",
{
attrs: { oprate: "detail" },
// on: { click: () => this.TechnologyChange(params.row) }
},
"新增更改单"
),
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.sendAuditFun(params.row) }
},
params.row.approvalStatus == 4
? "送审"
: ""
params.row.approvalStatus == 4 ? "送审" : ""
)
]);
}
......@@ -476,6 +457,51 @@ export default {
}
});
this.documentShow = false;
},
//工艺更改
TechnologyChange(row) {
this.$refs.routingchangeorder.flag = 0
this.$refs.routingchangeorder.routing_header_Id = row.id
var userId =this.$store.state.userInfo.userId
let parma = {
Id: userId
}
this.$refs.routingchangeorder.changeorder_code = ''
this.$http.sysUser.getuserinfo(parma).then((res) => {
if (res.result) {
this.$refs.routingchangeorder.formValidate = {
technical_name: row.name,
technical_code: row.code,
department_name: res.result.departmentTitle,
propose_user_name: res.result.userName
}
}
})
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JSWJGGD`
service.get(`${url1}`).then((response) => {
this.$refs.routingchangeorder.changeorder_code = response.result
})
this.$refs.routingchangeorder.modelChange = true
},
Main(data) {
// this.eid1 = ''
this.seleId = data.row.id
this.$refs.changelist.seleId = data.row.id
let url = `${designUrl}/routingheaderchangeorder/getpaged`
service
.get(`${url}`, { routing_header_id: this.seleId })
.then((res) => {
//console.log(res)
this.$refs.changelist.data2 = res.result.items
this.$refs.changelist.myloading = false
if (this.$refs.changelist.data2.length == 0) {
this.$Message.error('该工艺规程没有更改单!')
this.$refs.changelist.show3 = false
return
}
this.$refs.changelist.show3 = true
})
}
}
};
......
<template>
<Form ref="form" :model="condition" :label-width="90">
<Form ref="form" :model="condition" :label-width="100">
<Row>
<Col :span="12" v-if="condition.creationTime.show">
<FormItem :label="$t('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creatorUserId.show">
<FormItem :label="$t('creatorUserId')" prop="creatorUserId">
<UserSelect v-model="condition.creatorUserId.value"></UserSelect>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModificationTime.show">
<FormItem :label="$t('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModifierUserId.show">
<FormItem :label="$t('lastModifierUserId')" prop="lastModifierUserId">
<UserSelect v-model="condition.lastModifierUserId.value"></UserSelect>
</FormItem>
</Col>
<Col :span="12" v-if="condition.classId.show">
<FormItem :label="l('classId')" prop="classId">
<Input v-model="condition.classId.value"></Input>
......@@ -30,34 +10,45 @@
<FormItem :label="l('unicode')" prop="unicode">
<Input v-model="condition.unicode.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.code.show">
<FormItem :label="l('code')" prop="code">
<Input v-model="condition.code.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.name.show">
<FormItem :label="l('name')" prop="name">
<Input v-model="condition.name.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.code.show">
<FormItem :label="l('code')" prop="code">
<Input v-model="condition.code.value"></Input>
<Col :span="12" v-if="condition.routingType.show">
<FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="condition.routingType.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.productId.show">
<FormItem :label="l('productId')" prop="productId">
<ProductSelect v-model="condition.productId.value"></ProductSelect>
<Col :span="12" v-if="condition.phase.show">
<FormItem :label="l('phase')" prop="phase">
<Input v-model="condition.phase.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.version.show">
<Col :span="12" v-if="condition.version.show">
<FormItem :label="l('version')" prop="version">
<Input v-model="condition.version.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.productId.show">
<FormItem :label="l('productName')" prop="productId">
<ProductSelect v-model="condition.productId.value"></ProductSelect>
</FormItem>
</Col>
<Col :span="12" v-if="condition.author.show">
<FormItem :label="l('author')" prop="author">
<UserSelect v-model="condition.author.value"></UserSelect>
</FormItem>
</Col>
<Col :span="12" v-if="condition.departmentId.show">
<FormItem :label="l('departmentId')" prop="departmentId">
<FormItem :label="l('departmentName')" prop="departmentId">
<departmentSelect v-model="condition.departmentId.value"></departmentSelect>
</FormItem>
</Col>
......@@ -71,11 +62,7 @@
<Input v-model="condition.upId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.routingType.show">
<FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="condition.routingType.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="condition.status.value"></Dictionary>
......@@ -121,11 +108,7 @@
<Input v-model="condition.versionnotes.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.phase.show">
<FormItem :label="l('phase')" prop="phase">
<Input v-model="condition.phase.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.versionid.show">
<FormItem :label="l('versionid')" prop="versionid">
<Input v-model="condition.versionid.value"></Input>
......@@ -136,6 +119,26 @@
<Dictionary code="Process.state" v-model="condition.isSendPpm.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creationTime.show">
<FormItem :label="$t('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.creatorUserId.show">
<FormItem :label="$t('creatorUserId')" prop="creatorUserId">
<UserSelect v-model="condition.creatorUserId.value"></UserSelect>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModificationTime.show">
<FormItem :label="$t('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.lastModifierUserId.show">
<FormItem :label="$t('lastModifierUserId')" prop="lastModifierUserId">
<UserSelect v-model="condition.lastModifierUserId.value"></UserSelect>
</FormItem>
</Col>
</Row>
</Form>
</template>
......@@ -158,16 +161,14 @@ export default {
routingType: { op: "Equal", value: null, show: true },
productId: { op: "Equal", value: null, show: true },
version: { op: "Equal", value: null, show: true },
author: { op: "Equal", value: null, show: true },
departmentId: { op: "Equal", value: null, show: true },
isMain: { op: "Equal", value: null, show: true },
isSendPpm: { op: "Equal", value: null, show: true },
isEffect: { op: "Equal", value: null, show: true },
phase: { op: "Equal", value: null, show: true },
author: { op: "Equal", value: null, show: false },
isMain: { op: "Equal", value: null, show: false },
upId: { op: "Equal", value: null, show: false },
upDetailId: { op: "Equal", value: null, show: false },
status: { op: "Equal", value: null, show: false },
......@@ -178,7 +179,7 @@ export default {
auditUserId2: { op: "Equal", value: null, show: false },
platesnum: { op: "Equal", value: null, show: false },
versionnotes: { op: "Equal", value: null, show: false },
phase: { op: "Equal", value: null, show: false },
isSendPpm: { op: "Equal", value: null, show: false },
versionid: { op: "Equal", value: null, show: false },
}
......
......@@ -8,8 +8,8 @@
<Button @click="set">赋值</Button>
<ProductSelect v-model="product" @on-change="pchange"></ProductSelect>
<p>{{product}}</p>
<Button @click="setp">赋值</Button>
</div>
</template>
......@@ -30,10 +30,17 @@
this.text=items.map(u=>u.label).join('/');
},
set(){
this.model=[ "1", 91 ];
this.model=[ "1", 5 ];
},
pchange(v){
pchange(v,item){
// this.text=items.map(u=>u.label).join('/');
if(item.isProduct==0){
this.$Message.error("层级不能选择")
this.product=""
}
},
setp(){
this.prodcut=8;
},
}
}
......
<template>
<div style="padding:50px;">
<UserSelect v-model="user" :multiple="true" theme="list"/>
<!-- <DepartmentSelect v-model="dep" />
<UserSelect v-model="user" :multiple="true"/>
<!-- <DepartmentSelect v-model="dep" /> -->
<Button @click="setUser">Set</Button>{{dep}} -->
<Button @click="setUser">Set</Button>
{{user}}
</div>
</template>
......@@ -12,12 +12,12 @@ export default {
data(){
return {
dep:39,
user:[21,22,23]
user:[128]
}
},
methods:{
setUser(){
this.user=[25]
this.user=[128]
}
}
}
......
......@@ -25,6 +25,7 @@ import WorkShopSelect from '@/components/page/workShopSelect.vue'
import workShopDefault from '@/components/page/workShopDefault.vue'
import WorkShop from '@/components/page/workShop.vue'
import EquipSelect from '@/components/page/equipSelect.vue'
import ResourceSelect from '@/components/page/resourceSelect.vue'
import clipboard from 'clipboard';
// import i18n from '@/i18n';
......@@ -88,6 +89,7 @@ Vue.component("WorkShopSelect", WorkShopSelect)
Vue.component("workShopDefault", workShopDefault)
Vue.component("WorkShop", WorkShop)
Vue.component("EquipSelect", EquipSelect)
Vue.component("ResourceSelect", ResourceSelect)
Vue.component("User", User)
Vue.component("op", op) //DepartmentSelect
Vue.component("DepartmentSelect", DepartmentSelect)
......
const systemApi = {
local: 'localhost',
product: '39.100.148.168',
dev:"49.232.68.61",
aps:'47.92.102.113'
}
//环境切换(只修改此处):
let address=systemApi.dev;
//let address=systemApi.product;
//let address=systemApi.local;
//占位符自动替换:
window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
window.authUrl = `http://${address}:10010`; //Authentication-api //统一登陆认证
window.designUrl = `http://${address}:10030/api/services/app`; //Process-api 工艺规程
window.PlanUrl = `http://${address}:10050/api/services/app`; //Process-api
window.routeUrl = `http://${address}:10050/api/services/app`; //Process-api
window.bugUrl = `http://${address}:10070/api/services/app`; //Process-api
window.fileUrl = `http://${address}:10080/fileServer`; //文件上传url
window.fileUrlDown = `http://${address}`; //文件下载url
window.resourceUrl = `http://${address}:10040/api/services/app`; // 制造资源地址
window.workflowUrl = `http://${address}:10060/api/services/app`; // 工作流地址
window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api
window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理
window.iconImg = `http://${address}:3000/imgicon/`; //待办任务图标路径
window.apsUrl = `http://${systemApi.aps}:10110/api/services/app`;//aps排产
window.technologyUrl =`http://${address}:10031/api/services/app/`;
\ No newline at end of file
const systemApi = {
local: 'localhost',
product: '39.100.148.168',
dev:"49.232.68.61",
aps:'47.92.102.113'
}
//环境切换(只修改此处):
let address=systemApi.dev;
//let address=systemApi.product;
//let address=systemApi.local;
window.systemUrl = `http://${address}:10000/system`; //System-api 系统管理(基础数据)
window.authUrl = `http://${address}:10010`; //Authentication-api //统一登陆认证
window.designUrl = `http://${address}:10000/process`; // 工艺规程
window.PlanUrl = `http://${address}:10000/plan`; //订单
window.bugUrl = `http://${address}:10000/bug`; //bug
window.fileUrl = `http://${address}:10080/fileServer`; //文件上传url
window.fileUrlDown = `http://${address}`; //文件下载url
window.resourceUrl = `http://${address}:10000/resource`; // 制造资源地址
window.workflowUrl = `http://${address}:10000/workflow`; // 工作流地址
window.certificateUrl = `http://${address}:10000/qms`; //质量
window.crmUrl = `http://${address}:10000/crm`; //crm客户、合同、项目管理
window.apsUrl = `http://${address}:10000/aps`;//aps排产
window.technologyUrl =`http://${address}:10000/technology/`;//新工艺规程接口
window.iconImg = `/imgicon/`;
/* window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
window.authUrl = `http://${address}:10010`; //Authentication-api //统一登陆认证
window.designUrl = `http://${address}:10030/api/services/app`; //Process-api 工艺规程
window.PlanUrl = `http://${address}:10050/api/services/app`; //Process-api
window.routeUrl = `http://${address}:10050/api/services/app`; //Process-api
window.bugUrl = `http://${address}:10070/api/services/app`; //Process-api
window.fileUrl = `http://${address}:10080/fileServer`; //文件上传url
window.fileUrlDown = `http://${address}`; //文件下载url
window.resourceUrl = `http://${address}:10040/api/services/app`; // 制造资源地址
window.workflowUrl = `http://${address}:10060/api/services/app`; // 工作流地址
window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api
window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理
window.iconImg = `http://${address}:3006/imgicon/`; //待办任务图标路径
window.apsUrl = `http://${systemApi.aps}:10110/api/services/app`;//aps排产
window.technologyUrl =`http://${address}:10031/api/services/app/`;//新工艺规程接口 */
\ No newline at end of file
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