1
This commit is contained in:
@@ -27,6 +27,18 @@
|
||||
</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-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-table
|
||||
@@ -176,9 +188,11 @@ export default {
|
||||
disabled: false,
|
||||
tableName: '机加工MES_零件图PDF表',
|
||||
num: '',
|
||||
num1: '1',
|
||||
hadFile: [],
|
||||
isDeleteShow: false,
|
||||
deleteShow: '1',
|
||||
row1: [],
|
||||
operationType: '0'
|
||||
}
|
||||
},
|
||||
@@ -239,10 +253,14 @@ export default {
|
||||
this.num = row.基本件流水号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}`
|
||||
},
|
||||
batchImportOfDrawings() {
|
||||
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}`
|
||||
},
|
||||
getNum(row) {
|
||||
this.row1 = row
|
||||
this.dialogVisible = true
|
||||
this.num = row.基本件流水号
|
||||
this.getFileList(this.num)
|
||||
this.getFileList(row.零件图号)
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
if (res[0].result === '1') {
|
||||
@@ -291,18 +309,22 @@ 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',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from ${this.tableName} where 是否启用 = 1 and num = ${value}`
|
||||
name: `select * from ${this.tableName} where 是否启用 = 1 and name = '${value}'`
|
||||
}
|
||||
}).then(data => {
|
||||
this.suffix = data.data
|
||||
console.log(this.suffix, 11111)
|
||||
if (data.data.length > 0) {
|
||||
if (this.operationType === '1') {
|
||||
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) {
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user