This commit is contained in:
bryan sun
2019-12-09 11:04:55 +08:00
parent 05254fef9c
commit 23bf9ec44f
4 changed files with 61 additions and 178 deletions

View File

@@ -1,14 +0,0 @@
import request from '@/utils/request'
// 查询供应商
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
}
})
}

View File

@@ -23,10 +23,10 @@ export const ExcelDownLoad = 'http://192.168.0.110:8002/submit/downloadFile.ashx
export const ServerIP = `http://192.168.1.231:8411/webpage/file/` export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231 export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231 export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx` export const MESUploadFile = `http://192.168.0.110:8002/submit/MESUploadFile.ashx`
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx` export const MESDownloadFile = `http://192.168.0.110:8002/submit/MESDownloadFile.ashx`
const service = axios.create({ const service = axios.create({
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`, baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间
}) })
export default service export default service

View File

@@ -27,6 +27,18 @@
</el-select> </el-select>
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button> <el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button>
<el-upload
:disabled="disabled"
:action="action"
:on-success="uploadSuccess"
:on-error="uploadFailure"
:show-file-list="showFileList"
:file-list="fileList"
style="float: right; margin: 0px 50px"
class="upload-demo"
multiple>
<el-button type="success" size="small" style="float: right; margin: 0px 50px" @click="batchImportOfDrawings">图纸批量导入</el-button>
</el-upload>
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-table
@@ -176,9 +188,11 @@ export default {
disabled: false, disabled: false,
tableName: '机加工MES_零件图PDF表', tableName: '机加工MES_零件图PDF表',
num: '', num: '',
num1: '1',
hadFile: [], hadFile: [],
isDeleteShow: false, isDeleteShow: false,
deleteShow: '1', deleteShow: '1',
row1: [],
operationType: '0' operationType: '0'
} }
}, },
@@ -239,10 +253,14 @@ export default {
this.num = row.基本件流水号 this.num = row.基本件流水号
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}` this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}`
}, },
batchImportOfDrawings() {
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}`
},
getNum(row) { getNum(row) {
this.row1 = row
this.dialogVisible = true this.dialogVisible = true
this.num = row.基本件流水号 this.num = row.基本件流水号
this.getFileList(this.num) this.getFileList(row.零件图号)
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
if (res[0].result === '1') { if (res[0].result === '1') {
@@ -291,18 +309,22 @@ export default {
this.getTableData() this.getTableData()
}, },
async getFileList(value) { async getFileList(value) {
// console.log(this.row1.零件图号, 11111)
// console.log(value, 121212)
this.hadFile = [] this.hadFile = []
this.deleteShow === '1' ? this.isDeleteShow = true : this.isDeleteShow = false this.deleteShow === '1' ? this.isDeleteShow = true : this.isDeleteShow = false
if (value) { if (value) {
// if (value === 1) {
await request({ await request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '3', type: '3',
name: `select * from ${this.tableName} where 是否启用 = 1 and num = ${value}` name: `select * from ${this.tableName} where 是否启用 = 1 and name = '${value}'`
} }
}).then(data => { }).then(data => {
this.suffix = data.data this.suffix = data.data
console.log(this.suffix, 11111)
if (data.data.length > 0) { if (data.data.length > 0) {
if (this.operationType === '1') { if (this.operationType === '1') {
data.data.map(item => { data.data.map(item => {
@@ -326,6 +348,40 @@ 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) { async deleteFileData(id) {

View File

@@ -1,159 +0,0 @@
<template>
<div class="app-container">
<el-card>
<span>供应商</span>
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="margin: 3px 20px 3px 0px" filterable clearable>
<el-option
v-for="item in supplierName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px;margin: 3px 20px 3px 0px"/>
<span>备料</span>
<el-select v-model="sparePartValue" placeholder="供应商" size="small" style="margin: 3px 20px 3px 0px" filterable clearable>
<el-option
v-for="item in spareParts"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>结算</span>
<el-select v-model="businessAccountingValue" placeholder="供应商" size="small" style="margin: 3px 20px 3px 0px" filterable clearable>
<el-option
v-for="item in businessAccounting"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="danger" size="small">删除</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%;max-height: 460px;"
height="460"
size="mini">
<el-table-column label="备料" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small">未到</el-tag>
<el-tag v-else type="success" size="small">已到</el-tag>
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料编号" min-width="150" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="材料" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="备料件数" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="备料时间" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
</template>
</el-table-column>
<el-table-column label="到货件数" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.到货件数 }}
</template>
</el-table-column>
<el-table-column label="到货时间" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.到货时间 }}
</template>
</el-table-column>
<el-table-column label="结算" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.结算 }}
</template>
</el-table-column>
<el-table-column label="结算时间" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.结算时间 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchSupplier } from '@/api/WorkshopProcurement/PurchaseMaterialPreparationQuery.js'
export default {
data() {
return {
supplierNameValue: '', // 供应商
supplierName: [],
partName: '', // 零件图号
spareParts: [{
value: '0',
label: '未到'
}, {
value: '1',
label: '已到'
}], // 备料
sparePartValue: '',
businessAccountingValue: '',
businessAccounting: [{
value: '0',
label: '未结算'
}, {
value: '1',
label: '已结算'
}] // 核算
}
},
created() {
this.fetchdata()
},
methods: {
fetchdata() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplierName.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
}
}
}
</script>
<style scoped>
</style>