零件图维护
This commit is contained in:
@@ -26,7 +26,7 @@ export function search3() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: 'SELECT count(客户名称) as 客户数量,[省份] FROM [客户关系管理系统_客户_查询数据_MESWOR_视图]where [客户名称是否启用] = 1 group by [省份]'
|
||||
name: `select 项目名称,sum(已收金额) as 已收金额,SUM(应收金额) as 应收金额 from 视图_分批资金查询 where 是否启用= 1 group by 项目流水号,项目名称`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small">
|
||||
<el-select v-model="projectValue" placeholder="请选择项目名称" style="width: 150px" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号</span>
|
||||
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
|
||||
<el-select v-model="machineValue" placeholder="请选择机床图号" style="width: 150px" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
@@ -18,14 +18,14 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号</span>
|
||||
<el-select v-model="groupValue" placeholder="请选择组号" filterable size="small">
|
||||
<el-select v-model="groupValue" placeholder="请选择组号" style="width: 150px" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="whetherToImport" clearable placeholder="是否导入" filterable size="small">
|
||||
<el-select v-model="whetherToImport" clearable placeholder="是否导入" style="width: 150px" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in whetherToImports"
|
||||
:key="item.value"
|
||||
@@ -48,84 +48,56 @@
|
||||
</el-upload>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
style="width: 100%;max-height: 520px"
|
||||
height="520">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
label="机床图号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.机床图号 }}</template>
|
||||
<el-table v-loading="loading" :data="tableData" border size="mini" style="width: 100%;max-height: 520px" height="520">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="机床图号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件图号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件图号 }}</template>
|
||||
<el-table-column label="零件图号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件名称"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||
<el-table-column label="零件名称" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.组号 }}</template>
|
||||
<el-table-column label="组号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="材料"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.材料 }}</template>
|
||||
<el-table-column label="材料" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.零件备注 }}</template>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件类型"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.零件类型名称 }}</template>
|
||||
<el-table-column label="零件类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否导入"
|
||||
align="center">
|
||||
<el-table-column label="是否导入" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否导入)===1" type="success">已导入</el-tag>
|
||||
<el-tag v-else type="danger">未导入</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="50px"
|
||||
label="零件图纸"
|
||||
align="center">
|
||||
<el-table-column min-width="50px" label="零件图纸" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button circle icon="el-icon-search" size="small" @click="getNum(scope.row)"/>
|
||||
<!--<el-button slot="reference" type="success" icon="el-icon-search" circle size="mini"></el-button>-->
|
||||
<!--<el-button type="success" icon="el-icon-search" circle size="mini"></el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
min-width="80px"
|
||||
label="操作"
|
||||
align="center">
|
||||
<el-table-column min-width="80px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!--<FileUpload ref="FileUpload" :num="scope.row.基本件流水号" table-name="机加工MES_零件图PDF表" @listenMsg ="listenMsgFromChid"/>-->
|
||||
<el-upload
|
||||
:disabled="disabled"
|
||||
:action="action"
|
||||
@@ -150,7 +122,6 @@
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:show-close="close"
|
||||
@@ -198,7 +169,7 @@ export default {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
showFileList: true,
|
||||
showFileList: false,
|
||||
action: '',
|
||||
disabled: false,
|
||||
tableName: '机加工MES_零件图PDF表',
|
||||
@@ -275,11 +246,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getAction(row) {
|
||||
this.num = row.基本件流水号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}`
|
||||
this.num = row.零件图号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}&type=2`
|
||||
},
|
||||
batchImportOfDrawings() {
|
||||
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}`
|
||||
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}&type=1`
|
||||
},
|
||||
getNum(row) {
|
||||
this.row1 = row
|
||||
@@ -288,26 +259,36 @@ export default {
|
||||
this.getFileList(row.零件图号)
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
console.log(res[0].result, 12345)
|
||||
if (res[0].result === '1') {
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
} else {
|
||||
this.str = res[0].result
|
||||
this.arr = this.str.split('|')
|
||||
console.log(this.arr[0], 0)
|
||||
console.log(this.arr[1], 1)
|
||||
if (this.arr[1] === '无该零件') {
|
||||
this.$notify.error(`${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`)
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
if (this.arr[1] === '重复') {
|
||||
this.$notify.error(`${this.arr[0]}请勿重复上传!`)
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}请勿重复上传!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
if (this.arr[1] === '零件图号不正确') {
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}和所选图号不符!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
// this.$message.error(`${file.name}该零件不存在,请检查上传文件名称是否正确!`)
|
||||
}
|
||||
if (fileList.length === 0) {
|
||||
this.$message.success('文件上传成功')
|
||||
// this.$refs.FileDown.getFileList(this.num)
|
||||
this.getTableData()
|
||||
}
|
||||
},
|
||||
@@ -347,12 +328,9 @@ export default {
|
||||
this.getTableData()
|
||||
},
|
||||
async getFileList(value) {
|
||||
// console.log(this.row1.零件图号, 11111)
|
||||
// console.log(value, 121212)
|
||||
this.hadFile = []
|
||||
this.deleteShow === '1' ? this.isDeleteShow = true : this.isDeleteShow = false
|
||||
if (value) {
|
||||
// if (value === 1) {
|
||||
await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -362,7 +340,6 @@ export default {
|
||||
}
|
||||
}).then(data => {
|
||||
this.suffix = data.data
|
||||
console.log(this.suffix, 11111)
|
||||
if (data.data.length > 0) {
|
||||
if (this.operationType === '1') {
|
||||
data.data.map(item => {
|
||||
@@ -386,40 +363,6 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
// } else {
|
||||
// await request({
|
||||
// url: '',
|
||||
// method: 'post',
|
||||
// data: {
|
||||
// type: '3',
|
||||
// name: `select * from ${this.tableName} where 是否启用 = 1 and num = ${value}`
|
||||
// }
|
||||
// }).then(data => {
|
||||
// this.suffix = data.data
|
||||
// if (data.data.length > 0) {
|
||||
// if (this.operationType === '1') {
|
||||
// data.data.map(item => {
|
||||
// this.hadFile.push({
|
||||
// url: `${MESDownloadFile}?id=${item.uid}.${item.suffix}&name=${item.name}.${item.suffix}`,
|
||||
// name: `${item.name}.${item.suffix}`,
|
||||
// suffix: item.suffix,
|
||||
// id: item.uid
|
||||
// })
|
||||
// })
|
||||
// } else if (this.operationType === '0') {
|
||||
// const server = `${MESDownloadFile}`.split('/')
|
||||
// data.data.map(item => {
|
||||
// this.hadFile.push({
|
||||
// url: `http://${server[2]}/webpage/part/${item.uid}.${item.suffix}`,
|
||||
// name: `${item.name}.${item.suffix}`,
|
||||
// suffix: item.suffix,
|
||||
// id: item.uid
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
},
|
||||
async deleteFileData(id) {
|
||||
@@ -439,9 +382,11 @@ export default {
|
||||
this.getTableData()
|
||||
if (response.data.length === 0) {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible = false
|
||||
this.getFileList(this.num)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.dialogVisible = false
|
||||
this.getFileList(this.num)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user