This commit is contained in:
chenjianan
2019-05-15 15:17:15 +08:00
parent 45b91a958b
commit 82590a9718
7 changed files with 2162 additions and 11 deletions

View File

@@ -1 +1,2 @@
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)

View File

@@ -71,3 +71,15 @@ export function searchtable2(num) {
}
})
}
// 在制零件工艺修改
export function returnEdit(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_在制零件工艺调整_修改工艺',
param: '工艺计划流水号=' + num
}
})
}

View File

@@ -0,0 +1,481 @@
import request from '@/utils/request'
// 典艺查询<高精原有数据>
export function searchProcess11(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_原零件工艺查询_MESWORK',
param: '零件图号=' + num
}
})
}
// 典艺查询<高精原有数据>
export function numChange(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_原零件工艺明细查询_MESWORK',
param: '典艺流水号=' + num
}
})
}
// 保存主表工艺
export function selectRequest(num0, num1, num2, num3, request0) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_根据工序流水号和工艺计划流水号',
param: '工序流水号=' + num0 + '&工艺计划流水号=' + num1 + '&工艺编号=' + num2 + '&工艺顺序=' + num3 + '&工艺要求=' + request0
}
})
}
// 初始化 工艺员A
export function initCraftmen() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=20'
}
})
}
// 查询 未编制 零件号
export function getPartnames1(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_编制工艺_按人员查',
param: '工艺人员编号=' + num1 + '&零件图号=' + num2
}
})
}
// 初始化 已编制 零件号
export function getPartnames2(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_查询已完成工艺制定零件',
param: '工艺人员编号=' + num1 + '&零件图号=' + num2
}
})
}
// 零件详细信息
export function detailInfo(serialNum) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_查已投产零件信息',
param: '工艺计划流水号=' + serialNum + '=int'
}
})
}
// 初始化材质
export function getMaterial(pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_材质表_查询数据',
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 根据材质名称查材质
export function searchMaterial(pageCurrent, pageSize, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_材质表_查询数据_根据材料名称',
param: '材料名称=' + name,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 典型工艺选择零件分类A
export function typicalProcess() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_典型工艺名称_分类_查询数据'
}
})
}
// 典型工艺选择零件名称、工艺号、备注
export function FcK(serialNum) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_查典型工艺名称',
param: '典型工艺名称分类流水号=' + serialNum + '=int'
}
})
}
// 典型工艺查询
export function searchProcess(check1, a, check2, b, check3, c) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_综合查询',
param: '典型工艺名称分类流水号_check=' + check1 + '=bit&典型工艺名称分类流水号=' + a + '=int&典型工艺流水号_check=' + check2 + '=bit&典型工艺流水号=' + b + '=int&典型工艺流水号1_check=' + check3 + '=bit&典型工艺流水号1=' + c + '=int'
}
})
}
// 初始化工艺名称
export function processNameClick() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_工艺分类名称_查询数据_零件工艺制定专用'
}
})
}
// 工艺名称查询
export function processNameSelect(val) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_工艺名称_查询数据',
param: '工艺分类流水号_check=1=bit&工艺分类流水号=' + val + '=int'
}
})
}
// 工艺要求查询
export function processRequestSelect(val) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_基础表_工艺要求_查询数据',
param: '工艺编号=' + val + '=int'
}
})
}
// 初始化公差A
export function initTolerance() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_公差对照表_查询数据'
}
})
}
// 公差查询
export function searchTolerance(val1, val2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_公差对照表_公差_查询数据',
param: '输入数值=' + val1 + '&参数=' + val2
}
})
}
// 工艺定额人员查询
export function initPerson() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=9'
}
})
}
// 完艺工艺查询
export function searchWYgongyi(check1, tuhao, check2, bianhao, check3, start, end, check4, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_查询数据_根据零件图号查询已投产的工艺计划流水号',
param: '零件图号_check=' + check1 + '&零件图号=' + tuhao + '&工艺员编号_check=' + check2 + '&工艺员编号=' + bianhao + '&工艺时间_check=' + check3 + '&工艺开始时间=' + start + '=datetime&工艺结束时间=' + end + '=datetime&零件名称_check=' + check4 + '&零件名称=' + name
}
})
}
// 完艺工艺要求查询
export function gongyiYQ(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_查询数据',
param: '工艺计划流水号=' + num
}
})
}
// 完艺工艺拷贝
export function gongyiCopy(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_工艺拷贝_工艺计划流水号',
param: '工艺计划流水号_完成工艺=' + num1 + '=int&工艺计划流水号_被拷工艺=' + num2 + '=int'
}
})
}
// 主界面选择零件号查主表
export function mainTable(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询工序信息',
param: '工艺计划流水号=' + num + '=int'
}
})
}
// 主界面主表难度等级修改
export function hardEdit(num, hard) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_工艺难度等级',
param: '工序流水号=' + num + '=int&工艺难度等级=' + hard
}
})
}
// 主界面主表工艺要求修改
export function requestEdit(num, request0) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_工艺要求_根据工序流水号',
param: '工序流水号=' + num + '=int&工艺要求=' + request0
}
})
}
// 主界面主表插入功能
export function insertOne(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_工艺计划流水号和工序流水号',
param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int'
}
})
}
// 主界面主表删除功能
export function deleteOne(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_删除数据_工序流水号',
param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int'
}
})
}
// 主界面主表上移功能
export function upOne(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_上移工序',
param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int'
}
})
}
// 主界面主表下移功能
export function downOne(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_下移工序',
param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int'
}
})
}
// 保存变更材质
export function saveMaterial(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_修改零件材料',
param: '工艺计划流水号=' + num0 + '&材料流水号=' + num1
}
})
}
// 核准保存
export function saveApprove(num0, num1, request0, spec, num2, outhelp, num3, num4, weight, area, num5, level) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_增加数据_同时修改工艺计划',
param: '工艺计划流水号=' + num0 + '&工艺编号=' + num1 + '&工艺要求=' + request0 + '&原材料规格=' + spec + '&工序顺序=' + num2 + '&工序间是否外协=' + outhelp + '&工序流水号=' + num3 + '&材料流水号=' + num4 + '&重量=' + weight + '&面积=' + area + '&工艺人员编号=' + num5 + '&工艺难度等级=' + level
}
})
}
// 粘贴
export function pasteTable(oldNum, newNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_拷贝零件工艺',
param: '工艺计划流水号旧=' + oldNum + '&工艺计划流水号新=' + newNum
}
})
}
// 删除
export function deleteTable(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_删除零件工艺',
param: '工艺计划流水号=' + num
}
})
}
// 在制零件工艺修改
export function returnEdit(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_在制零件工艺调整_修改工艺',
param: '工艺计划流水号=' + num
}
})
}
// 查询工艺记录
export function searchRecord(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_在制零件工艺调整_查询工艺',
param: '工艺计划流水号=' + num
}
})
}
// 重量拷贝
export function WeightCopy(num, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_重量拷贝_工艺计划流水号',
param: '工艺计划流水号=' + num + '&重量信息=' + num2
}
})
}
// 保存变更材质
export function saveWeight(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_修改零件重量',
param: '工艺计划流水号=' + num0 + '&重量=' + num1
}
})
}
// 单件工时改变
export function singleChange(val1, val2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_单件准结定额_修改数据',
param: '工序流水号=' + val1 + '&单件定额工时=' + val2
}
})
}
// 准结工时改变
export function readyChange(val1, val2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_单件准结定额_修改数据',
param: '工序流水号=' + val1 + '&准结定额工时=' + val2
}
})
}
// 未编制定额保存
export function TableAddLi1(a, b) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_定额任务分配_保存数据',
param: '工艺计划流水号=' + a + '=string&人员编号=' + b + '=string'
}
})
}
// 已编制定额保存
export function TableAddLi(a, b, c, num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_增加数据_修改数据',
param: '单件定额工时=' + a + '=string&准结定额工时=' + b + '=string&零件图号=' + c + '=string&工序流水号=' + num0 + '=int&工艺计划流水号=' + num1 + '=int'
}
})
}

View File

@@ -16,13 +16,7 @@ export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoice
export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop)
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})

View File

@@ -32,15 +32,13 @@
</el-col>
<el-col style="width: 290px">
<span>工艺员</span>
<el-select v-model="personValue" placeholder="工艺员" size="small" clearable>
<el-select v-model="personValue" placeholder="工艺员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col style="width: 290px">
<el-button type="success" size="small" style="margin-left: 10px" icon="el-icon-search" @click="pageCurrent=1;pageSize=10;total=0;searchData()">查询</el-button>
</el-col>
</el-row>
@@ -81,6 +79,9 @@
</div>
</el-card>
<el-card v-if="tableData2.length">
<div slot="header">
<el-button v-show="true" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>
</div>
<table class="tg">
<tr>
<td class="tg-x61c" colspan="4" rowspan="2">江苏高精</td>
@@ -151,7 +152,8 @@
</template>
<script>
import { initMachineProject, searchgroup, initPerson, search, searchtable1 } from '@/api/ManufacturingCenter/PartWorkCraftSelect_rdlc'
import { initMachineProject, searchgroup, initPerson, search, searchtable1,
returnEdit } from '@/api/ManufacturingCenter/PartWorkCraftSelect_rdlc'
export default {
data() {
@@ -187,6 +189,33 @@ export default {
this.searchData()
},
methods: {
returnEdit() { // 在制零件工艺修改
if (this.partNumValue === '' || this.partNumValue === null) {
this.$message.error('请选择零件')
} else {
this.$confirm(`此操作会将 ${this.零件图号} 打回至未编制状态, 是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
returnEdit(this.partNumValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('打回成功')
this.partNumValue = ''
this.tableData = []
this.tableData2 = []
} else {
this.$message.error('打回失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
},
fetchData() {
initMachineProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
@@ -227,12 +256,13 @@ export default {
this.personValue ? check4 = 1 : check4 = 0
search(this.pageCurrent, this.pageSize, check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.PrNum, check4, this.personValue).then(response => {
this.tableData = response.data.rows
console.log(response)
this.total = response.data.total
this.loading = false
})
},
click(row) {
this.partNumValue = row.工艺计划流水号
this.零件图号 = row.零件图号
searchtable1(row.工艺计划流水号).then(response => {
this.tableData2 = response.data
})

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,11 @@ const tableToExcel = (function() {
return function(table, filename, sheetname) {
if (!table.nodeType) table = document.getElementById(table)
const ctx = { worksheet: sheetname || 'Worksheet', table: table.innerHTML }
const blob = new Blob([format(template, ctx)])
if ('msSaveOrOpenBlob' in navigator) {
window.navigator.msSaveOrOpenBlob(blob, filename + '.xls')
return
}
const aTag = document.createElement('a')
aTag.href = uri + base64(format(template, ctx))
aTag.download = filename