Commit 2b7a2554 authored by renjintao's avatar renjintao

tech

parent f07e0df8
......@@ -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,7 +172,6 @@
<Row>
<Col span="12">
<FormItem label="工艺类型" style="width:100%">
<dictionary
code="Process.Routing.routingType"
v-model="SearchForm.routingType"
......@@ -193,22 +191,20 @@
<!-- 工艺更改表弹框 -->
<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,
......@@ -219,69 +215,68 @@ export default {
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,9 +366,9 @@ export default {
Data_inventory03: [],
createShow: false,
treeInputSearch: '',
treeInputSearch: "",
ocolumn: [],
treeHeight: '',
treeHeight: "",
modal1: false,
modalShow: false,
documentShow: false,
......@@ -381,7 +376,7 @@ export default {
pdfviewerVis: false,
modelSpecialty: false,
selectFault: 'greateArt',
selectFault: "greateArt",
greateArtmodel: true,
showBtn: true,
inventorymodel: false,
......@@ -393,65 +388,65 @@ 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)
return this.$t(key);
},
loaddata() {
let model = {
......@@ -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,394 @@ 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}`,
{
.post(`${url}`, {
routingHeaderEntity: a.formValidate,
FileList: filelist
}
)
.then((response) => {
})
.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
}
let that = this
this.modal1 = true
this.addpdefm = this.$refs.processMain
this.addpdefm.selectpdefmid = 0
this.isview = false
this.createtype = 1
this.headeroldid = 0
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;
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.modalShow = true;
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid
this.$refs.processNew.isview = true
this.$refs.processNew.loaddata()
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 => {
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) => {
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
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.$Message.error("该工艺规程没有更改单!");
this.$refs.changelist.show3 = false;
return;
}
this.$refs.changelist.show3 = true
})
this.$refs.changelist.show3 = true;
});
}
}
}
};
</script>
<style lang="less" scoped>
.order-quotation {
......
......@@ -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">
......@@ -112,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 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",
......@@ -290,9 +297,9 @@ export default {
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.sendAuditFun(params.row) }
// on: { click: () => this.TechnologyChange(params.row) }
},
params.row.approvalStatus == 4 ? "新增更改单" : "查看更改单"
"新增更改单"
),
h(
"op",
......@@ -450,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
})
}
}
};
......
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