This commit is contained in:
liushuai
2020-02-27 08:35:46 +08:00
parent 7e81b57ab4
commit b740e50051
14 changed files with 568 additions and 458 deletions

View File

@@ -62,7 +62,7 @@ export function initPartDrawing(check1, name) {
}) })
} }
// 查询外购备料 // 查询外购备料
export function searchPurchasedMaterials(check1, name) { export function searchPurchasedMaterials(check1, name, order, partName) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -71,7 +71,7 @@ export function searchPurchasedMaterials(check1, name) {
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '1', type: '1',
name: '备料管理_外购备料_查询数据', name: '备料管理_外购备料_查询数据',
param: `零件图号_check=${check1}&零件图号=${name}` param: `零件图号_check=${check1}&零件图号=${name}&排序名称=${partName}&排序方式=${order}`
} }
}) })
} }

View File

@@ -15,6 +15,19 @@ export function searchCailiao(name) {
} }
}) })
} }
// 获取新到货单编号
export function searchNewOrder() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '备料管理_获取新到货单编号'
}
})
}
// 查询采购单 // 查询采购单
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name, check, num1) { export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name, check, num1) {
return request({ return request({
@@ -74,7 +87,7 @@ export function searchLxMateriel(num, check, num1) {
}) })
} }
// 查询到货单 // 查询到货单
export function searchArriveOrder(num8, num9, num6, num7, datecheck, starttime, endtime, pageCurrent, pageSize) { export function searchArriveOrder(num8, num9, num6, num7, datecheck, starttime, endtime) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -83,8 +96,7 @@ export function searchArriveOrder(num8, num9, num6, num7, datecheck, starttime,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '1', type: '1',
name: '备料管理_到货单查询_新', name: '备料管理_到货单查询_新',
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&是否关联_check=${num6}&是否关联=${num7}&日期check=${datecheck}&开始时间=${starttime}&结束时间=${endtime}`, param: `供应商流水号_check=${num8}&供应商流水号=${num9}&是否关联_check=${num6}&是否关联=${num7}&日期check=${datecheck}&开始时间=${starttime}&结束时间=${endtime}`
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }

View File

@@ -21,16 +21,14 @@
<!--:label="item.label"--> <!--:label="item.label"-->
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<span style="margin-left: 10px">零件图号:</span>
<el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 180px" size="small" clearable/> <el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 180px" size="small" clearable/>
<span class="demonstration" style="margin-left: 10px">时间区间:</span>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
:picker-options="pickerOptions" :picker-options="pickerOptions"
size="small" size="small"
type="daterange" type="daterange"
align="center" align="center"
style="width: 240px;margin: 3px 0" style="width: 240px;margin-left: 10px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
range-separator="" range-separator=""
@@ -52,18 +50,18 @@
<!--type="date"--> <!--type="date"-->
<!--placeholder="选择日期"/>--> <!--placeholder="选择日期"/>-->
<el-tooltip :open-delay="1200" effect="dark" content="查询备料出库记录" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="查询备料出库记录" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 15px" @click="total=0;pageSize=40; pageCurrent=1;selecttable()">查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total=0;pageSize=40; pageCurrent=1;selecttable()">查询</el-button>
</el-tooltip> </el-tooltip>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 580px;margin-top: 3px" height="800px" @sort-change="sortChange"> <el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 600px;margin-top: 3px" height="800px" @sort-change="sortChange">
<!--<el-table-column label="项目名称" prop="项目名称" align="center" width="150" show-overflow-tooltip>--> <!--<el-table-column label="项目名称" prop="项目名称" align="center" width="150" show-overflow-tooltip>-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--{{ scope.row.项目名称 }}--> <!--{{ scope.row.项目名称 }}-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column label="机床图号" prop="机床图号" align="center" width="120" show-overflow-tooltip> <el-table-column label="机床图号" prop="机床图号" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>

View File

@@ -23,7 +23,7 @@
<!-- :label="item.label"--> <!-- :label="item.label"-->
<!-- :value="item.value"/>--> <!-- :value="item.value"/>-->
<!-- </el-select>--> <!-- </el-select>-->
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 180px;margin: 10px 10px 0px 10px"/> <el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 180px;margin-left: 0px"/>
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" plain style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
<el-button type="warning" size="small" style="margin: 15px 0 0 10px" plain @click="wareHousing">出库</el-button> <el-button type="warning" size="small" style="margin: 15px 0 0 10px" plain @click="wareHousing">出库</el-button>
</el-row> </el-row>
@@ -59,7 +59,7 @@
{{ scope.row.出库数量1 }} {{ scope.row.出库数量1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="已出库数量" width="90px"> <el-table-column align="center" label="已出库数量" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.已出库数量 }} {{ scope.row.已出库数量 }}
</template> </template>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 185px" placeholder="机床号" @change="getGroup()"> <el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 150px" placeholder="机床号" @change="getGroup()">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
:key="item.value" :key="item.value"
@@ -11,7 +11,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div> <div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 100px;"> <el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 120px;">
<el-option <el-option
v-for="item in Groups" v-for="item in Groups"
:key="item.value" :key="item.value"

View File

@@ -147,7 +147,7 @@
</template> </template>
<script> <script>
import { searchtable, searchtable2, edit, edit2, getExport } from '@/api/ManufacturingCenter/CreatePreparationBill' import { searchtable, edit, edit2, getExport } from '@/api/ManufacturingCenter/CreatePreparationBill'
import { exportExcelMethod } from './exportExcel' import { exportExcelMethod } from './exportExcel'
import $ from 'jquery' import $ from 'jquery'
export default { export default {
@@ -226,27 +226,8 @@ export default {
// this.tableData.push({ // this.tableData.push({
// 重量: response.data.rows[0].重量 // 重量: response.data.rows[0].重量
// }) // })
this.Data = response.data.rows this.tableData = response.data.rows
this.total = response.data.total this.total = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data.length; i++) {
searchtable2(this.Data[i].工艺计划流水号).then(response => {
this.tableData.push({
工艺计划流水号: this.Data[i].工艺计划流水号,
零件名称: this.Data[i].零件名称,
零件图号: this.Data[i].零件图号,
备料打印: this.Data[i].备料打印,
是否外购备料: this.Data[i].是否外购备料,
工艺要求: response.data[0].工艺要求,
材料: this.Data[i].材料,
重量: this.Data[i].重量,
批次数量: this.Data[i].批次数量,
是否加急: this.Data[i].是否加急,
备料任务接受时间: this.Data[i].备料任务接受时间,
备料任务分配时间: this.Data[i].备料任务分配时间
})
})
this.loading = false this.loading = false
} }
}) })

View File

@@ -250,26 +250,30 @@ export default {
}) })
}, },
exportExcel() { exportExcel() {
if (this.machineNameValue !== '' && this.machineNameValue !== null) { if (this.tableData.length !== 0) {
this.check1 = 1 if (this.machineNameValue !== '' && this.machineNameValue !== null) {
this.check1 = 1
} else {
this.check1 = 0
}
let check7
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
var param = []
param[0] = ['机床流水号_check', this.check1]
param[1] = ['机床流水号', this.machineNameValue]
param[2] = ['报废日期_check', check7]
if (check7 === 0) {
param[3] = ['开始时间', '']
param[4] = ['结束时间', '']
} else {
param[3] = ['开始时间', this.outTime[0]]
param[4] = ['结束时间', this.outTime[1]]
}
var Data = this.CreateData('2001', '报表_报废零件查询', param)
this.exportExcel_NPOI(Data)
} else { } else {
this.check1 = 0 this.$message.warning('暂无数据')
} }
let check7
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
var param = []
param[0] = ['机床流水号_check', this.check1]
param[1] = ['机床流水号', this.machineNameValue]
param[2] = ['报废日期_check', check7]
if (check7 === 0) {
param[3] = ['开始时间', '']
param[4] = ['结束时间', '']
} else {
param[3] = ['开始时间', this.outTime[0]]
param[4] = ['结束时间', this.outTime[1]]
}
var Data = this.CreateData('2001', '报表_报废零件查询', param)
this.exportExcel_NPOI(Data)
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val

View File

@@ -46,16 +46,16 @@
{{ scope.row.终端编号 }} {{ scope.row.终端编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作者" prop="姓名" show-overflow-tooltip align="center" width="60px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="开始加工时间" show-overflow-tooltip align="center" width="90px"> <el-table-column label="开始加工时间" show-overflow-tooltip align="center" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开始加工时间 ? scope.row.开始加工时间.split(' ')[0] : '-' }} {{ scope.row.开始加工时间 ? scope.row.开始加工时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作者" prop="姓名" show-overflow-tooltip align="center" width="60px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="70px" fixed="right"> <el-table-column label="操作" align="center" width="70px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

View File

@@ -11,9 +11,20 @@
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
<el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button> <el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button>
</el-tooltip> </el-tooltip>
<el-table v-loading="loading1" :data="tableData1" :header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}" border stripe highlight-current-row style="width:795px ;margin-top:3px;" height="690" size="mini" @selection-change="handleSelectionChange"> <el-table
v-loading="loading1"
:data="tableData1"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}"
border
stripe
highlight-current-row
style="width:795px ;margin-top:3px;"
height="690"
size="mini"
@sort-change="sortChange"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="45"/> <el-table-column type="selection" align="center" width="45"/>
<el-table-column label="机床图号" prop="机床图号" width="120" align="center"> <el-table-column label="机床图号" prop="机床图号" width="120" sortable="custom" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
@@ -28,7 +39,7 @@
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" prop="零件名称" width="140" align="center" show-overflow-tooltip> <el-table-column label="零件名称" prop="零件名称" width="140" sortable="custom" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
@@ -38,7 +49,7 @@
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料" prop="材料" width="150" align="center" show-overflow-tooltip> <el-table-column label="材料" prop="材料" width="150" sortable="custom" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 }} {{ scope.row.材料 }}
</template> </template>
@@ -83,7 +94,7 @@
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>--> <!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>-->
<!--</el-tooltip>--> <!--</el-tooltip>-->
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable2">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable2">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button> <el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">外购备料</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button> <el-button type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip> </el-tooltip>
@@ -395,6 +406,8 @@ export default {
pageCurrent: 1, pageCurrent: 1,
pageSize: 10, pageSize: 10,
total: null, total: null,
partName: '',
order: '',
partDrawingNumber: '', partDrawingNumber: '',
Buyer: '', Buyer: '',
loading1: false, loading1: false,
@@ -482,10 +495,42 @@ export default {
}, },
created() { created() {
this.searchRawMaterial() this.searchRawMaterial()
this.getCurrentTime()
this.searchTable2()
// this.searchTable1() // this.searchTable1()
// this.searchTable2() // this.searchTable2()
}, },
methods: { methods: {
getCurrentTime() {
this.dateRange = [this.getTime1(70), this.getTime0(0)]
},
getTime0(num) {
var date0 = new Date()
var date = new Date(date0.getTime() + num * 24 * 60 * 60 * 1000)
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
var hour = this.zeroFill(date.getHours())
var minute = this.zeroFill(date.getMinutes())
var second = this.zeroFill(date.getSeconds())
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
},
getTime1(num) {
var date0 = new Date()
var date = new Date(date0.getTime() - num * 24 * 60 * 60 * 1000)
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
var hour = this.zeroFill(date.getHours())
var minute = this.zeroFill(date.getMinutes())
var second = this.zeroFill(date.getSeconds())
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
},
zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
},
// 获取原材料 // 获取原材料
searchRawMaterial() { searchRawMaterial() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => { searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
@@ -562,6 +607,23 @@ export default {
img.src = url img.src = url
}) })
}, },
sortChange(column, prop, order) {
console.log(column + '-' + column.prop + '-' + column.order, 11111)
if (column.prop === '零件名称') {
this.partName = 1
} else if (column.prop === '机床图号') { this.partName = 2 } else if (column.prop === '材料') {
this.partName = 3
} else {
this.partName = ''
}
console.log(this.ordername, 9990999)
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = ''
}
this.searchTable1()
},
fetchData() { fetchData() {
initPartDrawing(0, this.partDrawingNumberValue).then(response => { initPartDrawing(0, this.partDrawingNumberValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
@@ -576,7 +638,7 @@ export default {
this.loading1 = true this.loading1 = true
this.partDrawingNumber ? this.check1 = 1 : this.check1 = 0 this.partDrawingNumber ? this.check1 = 1 : this.check1 = 0
// this.pageCurrent1, this.pageSize1, // this.pageCurrent1, this.pageSize1,
searchPurchasedMaterials(this.check1, this.partDrawingNumber).then(response => { searchPurchasedMaterials(this.check1, this.partDrawingNumber, this.order, this.partName).then(response => {
this.tableData1 = response.data this.tableData1 = response.data
this.total1 = response.data.total this.total1 = response.data.total
this.loading1 = false this.loading1 = false
@@ -706,27 +768,15 @@ export default {
})) }))
}, },
exportExcel2(row) { exportExcel2(row) {
this.searchTable3(row).then(val => { if (this.tableData4.length !== 0) {
console.log(row, 11111) var param = []
console.log(this.tableData4) param[0] = ['采购计划流水号', row.采购计划流水号]
if (this.tableData4.length !== 0) { param[1] = ['供应商', row.供应商名称]
import('@/vendor/Export2Excel').then(excel => { var Data = this.CreateData('2001', '报表_备料管理_采购计划明细_查询数据', param)
const tHeader = ['备料状态', '物料编码', '零件名称', '材料', '数量', '成品尺寸', '单位', '备注'] this.exportExcel_NPOI(Data)
const filterVal = ['备料状态', '物料零件编码', '零件名称', '材料', '总数量', '成品尺寸', '单位', '备注1'] } else {
const list = this.tableData4 this.$message.warning('暂无数据')
const data = this.formatJson(filterVal, list) }
excel.export_json_to_excel({
header: tHeader,
data,
filename: row.采购单名称 + '-' + row.计划完成日期,
autoWidth: true,
bookType: 'xlsx'
})
})
} else {
this.$message.warning('没有导出内容')
}
})
}, },
searchTable3(row) { // 查询采购计划明细 searchTable3(row) { // 查询采购计划明细
this.purchasingOrderNumber = row.采购计划流水号 this.purchasingOrderNumber = row.采购计划流水号

View File

@@ -4,35 +4,33 @@
<div style="white-space: nowrap"> <div style="white-space: nowrap">
<el-card style="width: 1329px;"> <el-card style="width: 1329px;">
<div> <div>
<span style="margin-left: 10px">供应商:</span> <el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="width: 220px" filterable clearable @change="searchTable4()">
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="width: 220px" filterable clearable @change="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">
<el-option <el-option
v-for="item in supplierName" v-for="item in supplierName"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>请款时间段:</span>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
:picker-options="pickerOptions" :picker-options="pickerOptions"
size="small" size="small"
type="daterange" type="daterange"
align="center" align="center"
style="width: 240px;margin: 3px 0" style="width: 240px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
range-separator="" range-separator=""
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"/> end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable4()">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button> <el-button class="button111" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
<el-button type="success" plain size="small" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>
</div> </div>
</el-card> </el-card>
<el-card style="width: 660px;margin-left: 0px;display: inline-block"> <el-card style="width: 650px;margin-left: 0px;display: inline-block">
<span>到货单</span> <el-table v-loading="" :data="tableData4" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" border stripe style="width: 650px" height="260px" size="mini" highlight-current-row @row-click="searchTable5">
<el-table v-loading="" :data="tableData4" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" border stripe style="width: 7000px" height="240px" size="mini" highlight-current-row @row-click="searchTable5"> <el-table-column label="进程" align="center" width="80">
<el-table-column label="关联情况" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</span> <span v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</span>
<span v-else type="primary" size="mini">未结算</span> <span v-else type="primary" size="mini">未结算</span>
@@ -73,21 +71,8 @@
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
</el-table> </el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent4"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize4"
:total="total4"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange4"
@current-change="handleCurrentChange4"/>
</div>
</el-card> </el-card>
<el-card style="width: 660px;margin-left: 3px;display: inline-block;vertical-align: top"> <el-card style="width: 670px;margin-left: 3px;display: inline-block;vertical-align: top">
<span>到货单明细</span>
<el-button type="primary" plain size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>
<!--<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>--> <!--<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>-->
<el-table <el-table
v-loading="" v-loading=""
@@ -117,12 +102,12 @@
{{ scope.row.单位 }} {{ scope.row.单位 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单价" align="right" width="80"> <el-table-column label="单价(元)" align="right" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.单价.toFixed(2) }} {{ scope.row.单价.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="right" width="80"> <el-table-column label="金额(元)" align="right" width="95">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }} {{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
</template> </template>
@@ -144,7 +129,6 @@
</el-table> </el-table>
</el-card> </el-card>
<el-card style="width: 1329px"> <el-card style="width: 1329px">
<span>关联备料材料</span>
<el-table <el-table
v-loading="" v-loading=""
:data="tableData6" :data="tableData6"
@@ -152,7 +136,7 @@
border border
show-summary show-summary
highlight-current-row highlight-current-row
style="margin: 3px 0; width: 1280px" style="margin: 3px 0; width: 1310px"
height="500px" height="500px"
size="mini"> size="mini">
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="150"> <el-table-column label="物料编码" prop="物料零件编码" align="center" width="150">
@@ -175,22 +159,22 @@
{{ scope.row.数量 }} {{ scope.row.数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="240"> <el-table-column label="单位" align="center" width="110" >
<template slot-scope="scope">
{{ scope.row.成品尺寸 }}
</template>
</el-table-column>
<el-table-column label="总重量" align="center" prop="总重量" width="100">
<template slot-scope="scope">
{{ scope.row.重量 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="70" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.单位 }} {{ scope.row.单位 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总金额" align="center" prop="总金额" width="130"> <el-table-column label="成品尺寸(长、宽、高)" align="center" width="210">
<template slot-scope="scope">
{{ scope.row.成品尺寸 }}
</template>
</el-table-column>
<el-table-column label="重量小计(KG)" align="center" prop="总重量" width="130">
<template slot-scope="scope">
{{ scope.row.重量 }}
</template>
</el-table-column>
<el-table-column label="金额小计(KG)" align="center" prop="总金额" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }} {{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
</template> </template>
@@ -212,24 +196,23 @@
</el-table> </el-table>
</el-card> </el-card>
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogVisible" center style="min-height: 400px" width="380px"> <el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogVisible" center style="min-height: 400px" width="360px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
<el-row> <el-form-item label="到货单号">
<el-form-item label="供应商" prop="supplierNameValue"> <el-input v-model="NewOrder" style="width: 180px" size="small" disabled/>
<el-select v-show="title==='新增到货单'" v-model="form.supplierNameValue" placeholder="供应商" size="small" filterable @change="searchTable20()"> </el-form-item>
<el-option <el-form-item label="供应商" prop="supplierNameValue">
v-for="item in supplierNames" <el-select v-show="title==='新增到货单'" v-model="form.supplierNameValue" placeholder="供应商" style="width: 180px" size="small" filterable @change="searchTable20()">
:key="item.value" <el-option
:label="item.label" v-for="item in supplierNames"
:value="item.value"/> :key="item.value"
</el-select> :label="item.label"
</el-form-item> :value="item.value"/>
</el-row> </el-select>
<el-row> </el-form-item>
<el-form-item label="到货日期" prop="invoiceTime"> <el-form-item label="到货日期" prop="invoiceTime">
<el-date-picker v-model="form.日期" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/> <el-date-picker v-model="form.日期" size="small" type="date" value-format="yyyy-MM-dd" style="width: 180px" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item> </el-form-item>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button <el-button
@@ -321,37 +304,37 @@
{{ scope.row.物料零件编码 }} {{ scope.row.物料零件编码 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" align="center" width="90px"> <el-table-column label="零件名称" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料" align="center" width="70px"> <el-table-column label="材料" align="center" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 }} {{ scope.row.材料 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备料数" align="center" width="70px"> <el-table-column label="备料数" align="center" width="65px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购数量 }} {{ scope.row.采购数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到数" align="center" width="70px"> <el-table-column label="已到数" align="center" width="65px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货数量 }} {{ scope.row.到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货数" align="center" width="110px"> <el-table-column label="到货数" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/> <el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货重量" align="center" width="110px" prop="到货重量"> <el-table-column label="到货重量" align="center" width="120px" prop="到货重量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/> <el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成品尺寸长、宽、高" align="center"> <el-table-column label="成品尺寸(长、宽、高)" align="center" width="170px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.成品尺寸 }} {{ scope.row.成品尺寸 }}
</template> </template>
@@ -458,24 +441,24 @@
{{ scope.row.材料 }} {{ scope.row.材料 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备料数" align="center" width="70px"> <el-table-column label="备料数" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购数量 }} {{ scope.row.采购数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到数" align="center" width="70px"> <el-table-column label="已到数" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货数量 }} {{ scope.row.到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货数" align="center" width="110px"> <el-table-column label="到货数" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/> <el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货重量" align="center" width="110px"> <el-table-column label="到货重量" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/> <el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center"> <el-table-column label="成品尺寸(长、宽、高)" align="center">
@@ -504,7 +487,7 @@
</template> </template>
<script> <script>
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5, import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5,
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js' searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel, searchNewOrder } from '@/api/WorkshopProcurement/NewArrivalList.js'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -592,6 +575,7 @@ export default {
pageCurrent4: 1, pageCurrent4: 1,
pageSize4: 10, pageSize4: 10,
tableData5: [], tableData5: [],
NewOrder: '',
到货单流水号: '', 到货单流水号: '',
中间变量: '', 中间变量: '',
form: { form: {
@@ -666,9 +650,40 @@ export default {
created() { created() {
this.fetchdata() this.fetchdata()
this.searchTable2() this.searchTable2()
this.getCurrentTime()
// this.searchTable4() // this.searchTable4()
}, },
methods: { methods: {
getCurrentTime() {
this.dateRange = [this.getTime1(30), this.getTime0(0)]
},
getTime0(num) {
var date0 = new Date()
var date = new Date(date0.getTime() + num * 24 * 60 * 60 * 1000)
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
var hour = this.zeroFill(date.getHours())
var minute = this.zeroFill(date.getMinutes())
var second = this.zeroFill(date.getSeconds())
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
},
getTime1(num) {
var date0 = new Date()
var date = new Date(date0.getTime() - num * 24 * 60 * 60 * 1000)
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
var hour = this.zeroFill(date.getHours())
var minute = this.zeroFill(date.getMinutes())
var second = this.zeroFill(date.getSeconds())
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
},
zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
},
saveData(row) { saveData(row) {
var a = 0 var a = 0
this.tableData30.map(v => { this.tableData30.map(v => {
@@ -748,8 +763,8 @@ export default {
const { columns, data } = param const { columns, data } = param
const sums = [] const sums = []
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 1) { if (index === 0) {
sums[index] = '总重量:' sums[index] = '小计'
return return
} else if (index === 2) { } else if (index === 2) {
const values = data.map(item => Number(item['数量'])) const values = data.map(item => Number(item['数量']))
@@ -769,9 +784,6 @@ export default {
} else if (index === 3) { } else if (index === 3) {
sums[index] = 'KG' sums[index] = 'KG'
return return
} else if (index === 4) {
sums[index] = '总金额:'
return
} else if (index === 5) { } else if (index === 5) {
const values = data.map(item => Number(item['金额'])) const values = data.map(item => Number(item['金额']))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
@@ -799,7 +811,7 @@ export default {
sums[index] = '未绑定重量:' sums[index] = '未绑定重量:'
return return
} else if (index === 4) { } else if (index === 4) {
sums[index] = this.未绑定数量 sums[index] = this.未绑定数量 + ' KG'
} if (index === 5) { } if (index === 5) {
sums[index] = '绑定重量:' sums[index] = '绑定重量:'
return return
@@ -814,7 +826,7 @@ export default {
return parseInt(Number(prev) * 100) / 100 return parseInt(Number(prev) * 100) / 100
} }
}, 0) }, 0)
sums[index] sums[index] += ' KG'
} else { } else {
sums[index] = 'N/A' sums[index] = 'N/A'
} }
@@ -851,28 +863,26 @@ export default {
} else { } else {
this.check2 = 0 this.check2 = 0
} }
searchArriveOrder(this.check, this.supplierNameValue, this.check2, this.PickingValue, this.check1, this.dateRange[0], this.dateRange[1], this.pageCurrent4, this.pageSize4).then(response => { if ((this.supplierNameValue !== '' && this.supplierNameValue !== null) || this.dateRange !== '') {
this.tableData4 = response.data.rows searchArriveOrder(this.check, this.supplierNameValue, this.check2, this.PickingValue, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
this.total4 = response.data.total this.tableData4 = response.data
}) })
} else {
this.tableData4 = []
this.$message.warning('请填入查询条件')
}
}, },
Calculation() { Calculation() {
this.form10.金额 = this.form10.单价 * this.form10.数量 this.form10.金额 = this.form10.单价 * this.form10.数量
}, },
handleSizeChange4(val) { // 采购单列表分页
this.pageSize4 = val
this.pageCurrent4 = 1
this.searchTable4()
},
handleCurrentChange4(val) { // 采购单列表分页
this.pageCurrent4 = val
this.searchTable4()
},
// 创建采购单 // 创建采购单
addArrivalOrder() { addArrivalOrder() {
if (this.$refs['form'] !== undefined) { if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
} }
searchNewOrder().then(response => {
this.NewOrder = response.data[0].到货单号
})
this.title = '新增到货单' this.title = '新增到货单'
this.form.备注 = '' this.form.备注 = ''
this.form.supplierNameValue = '' this.form.supplierNameValue = ''
@@ -894,8 +904,6 @@ export default {
addPurchaseOrder(this.form.备注, this.form.supplierNameValue, this.form.日期).then(response => { addPurchaseOrder(this.form.备注, this.form.supplierNameValue, this.form.日期).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('新建到货单成功') this.$message.success('新建到货单成功')
this.pageCurrent4 = 1
this.pageSize4 = 10
this.searchTable4() this.searchTable4()
this.dialogVisible = false this.dialogVisible = false
} else { this.$message.error('新建到货单失败') } } else { this.$message.error('新建到货单失败') }
@@ -1168,12 +1176,16 @@ export default {
}) })
}, },
downloadExcel() { downloadExcel() {
var param = [] if (this.num1) {
param[0] = ['到货单流水号', this.num1] var param = []
param[1] = ['号', this.num2] param[0] = ['到货单流水号', this.num1]
param[2] = ['供应商', this.sup] param[1] = ['编号', this.num2]
var Data = this.CreateData('12', '报表_备料管理_到货单明细查询', param) param[2] = ['供应商', this.sup]
this.exportExcel_NPOI(Data) var Data = this.CreateData('2001', '报表_备料管理_到货单明细查询', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('请先选择到货单')
}
} }
} }
} }
@@ -1218,6 +1230,25 @@ export default {
right: 15px; right: 15px;
top: 5px; top: 5px;
} }
.el-form--label-left >>> .el-form-item__label {
text-align: right;
}
>>>.el-dialog--center .el-dialog__body {
text-align: initial;
padding: 20px 30px 20px
}
>>>.el-dialog__header {
padding: 20px 20px 0px;
}
>>>.el-dialog__footer {
padding: 0px 20px 20px;
/*text-align: right;*/
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
>>>.el-form-item {
margin-bottom: 13px;
}
</style> </style>
<style> <style>
.el-table__footer-wrapper tbody td, .el-table__header-wrapper tbody td { .el-table__footer-wrapper tbody td, .el-table__header-wrapper tbody td {

View File

@@ -1,204 +1,191 @@
<template> <template>
<div class="app-container"> <div>
<el-card style="width: 1137px"> <div style="width: 100%;overflow:auto">
<span>机床号</span> <div style="white-space: nowrap">
<el-select v-model="Machine" filterable clearable size="small" style="width: 150px;" placeholder="机床号" @change="getGroup"> <el-card style="margin-left: 0px;width:820px; display: inline-block;height: 745px">
<el-option <el-col>
v-for="item in Machines" <el-select v-model="Machine" filterable clearable size="small" style="width: 150px;margin-top: 3px" placeholder="机床图号" @change="getGroup">
:key="item.value" <el-option
:label="item.label" v-for="item in Machines"
:value="item.value"> :key="item.value"
<div style="float: left">{{ item.label }}</div> :label="item.label"
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div> :value="item.value">
</el-option> <div style="float: left">{{ item.label }}</div>
</el-select> <div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
<span>组号</span> </el-option>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 120px;" @change="getTableData"> </el-select>
<el-option <el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 120px;" @change="getTableData">
v-for="item in Groups" <el-option
:key="item.value" v-for="item in Groups"
:label="item.label" :key="item.value"
:value="item.value"/> :label="item.label"
</el-select> :value="item.value"/>
<span>零件号</span> </el-select>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 150px"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 150px"/>
<el-button type="primary" plain class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent10 = 1;pageSize10 = 10;getTableData()">查询</el-button> <el-button type="primary" plain class="el-icon-search" size="small" style="margin: 0px 10px;" @click="getTableData()">查询</el-button>
</el-card> <el-table v-loading="" :data="tableData10" stripe highlight-current-row border style="width: 100%;max-height: 315px;margin-top: 10px" height="690px" size="mini" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-card style="width: 1137px"> <el-table-column type="selection" align="center" width="55"/>
<el-table v-loading="" :data="tableData10" stripe highlight-current-row border style="width: 100%;max-height: 315px;margin-top: 10px" height="315px" size="mini" @sort-change="sortChange" @selection-change="handleSelectionChange"> <el-table-column label="机床图号" prop="机床图号" width="120" align="center">
<el-table-column type="selection" align="center" width="55"/> <template slot-scope="scope">
<el-table-column label="机床图号" prop="机床图号" min-width="180" align="center"> {{ scope.row.机床图号 }}
<template slot-scope="scope"> </template>
{{ scope.row.机床图号 }} </el-table-column>
</template> <el-table-column label="组号" prop="组号" width="80" sortable="custom" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column label="组号" prop="组号" width="120" sortable="custom" align="center"> {{ scope.row.组号 }}
<template slot-scope="scope"> </template>
{{ scope.row.组号 }} </el-table-column>
</template> <el-table-column label="零件图号" prop="零件图号" align="center" sortable="custom" width="180">
</el-table-column> <template slot-scope="scope">
<el-table-column label="零件图号" prop="零件图号" align="center" sortable="custom" width="220"> {{ scope.row.零件图号 }}
<template slot-scope="scope"> </template>
{{ scope.row.零件图号 }} </el-table-column>
</template> <el-table-column label="零件名称" align="center" width="140">
</el-table-column> <template slot-scope="scope">
<el-table-column label="零件名称" align="center" width="220"> {{ scope.row.零件名称 }}
<template slot-scope="scope"> </template>
{{ scope.row.零件名称 }} </el-table-column>
</template> <el-table-column label="数量" align="center" width="70">
</el-table-column> <template slot-scope="scope">
<el-table-column label="数量" align="center" width="100"> {{ scope.row.批次数量 }}
<template slot-scope="scope"> </template>
{{ scope.row.批次数量 }} </el-table-column>
</template> <el-table-column label="材料" prop="材料" align="center" sortable="custom" width="150">
</el-table-column> <template slot-scope="scope">
<el-table-column label="材料" prop="材料" align="center" sortable="custom" min-width="160"> {{ scope.row.材料 }}
<template slot-scope="scope"> </template>
{{ scope.row.材料 }} </el-table-column>
</template> </el-table>
</el-table-column> </el-col>
</el-table> </el-card>
<!--<div class="block">--> <el-card style="margin-left: 1px;width:1120px; display: inline-block;">
<!--<el-pagination--> <div> <!--slot="header"-->
<!--:current-page="pageCurrent10"--> <!--<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0;width: 155px" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()"/>-->
<!--:page-sizes="[10, 20, 30, 40]"--> <el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px;margin-top: 3px" clearable/>
<!--:page-size="pageSize10"--> <el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 200px" filterable clearable @change="searchTable">
<!--:total="total10"--> <el-option
<!--style="display:inline-block;width:50%"--> v-for="item in supplierNames"
<!--layout="total, sizes, prev, pager, next, jumper"--> :key="item.value"
<!--@size-change="handleSizeChange10"--> :label="item.label"
<!--@current-change="handleCurrentChange10"/>--> :value="item.value"/>
<!--</div>--> </el-select>
</el-card> <el-button type="primary" size="small" plain icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button>
<el-card style="width: 1137px"> <el-button type="distribution" size="small" plain icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">采购计划单</el-button>
<span>离线备料单号:</span> <!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">-->
<el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px" clearable/> <!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
<span style="margin-left: 10px">供应商:</span> <!--</el-tooltip>-->
<el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 150px" filterable clearable @change="searchTable"> <el-button type="primary" size="small" plain icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button>
<el-option </div>
v-for="item in supplierNames" <el-table v-loading="" :data="tableData" stripe highlight-current-row border style="width: 100%;max-height: 230px;margin-top: 10px" height="230px" size="mini" @row-click="searchMX">
:key="item.value" <el-table-column label="进程" prop="采购计划状态" align="center" width="70">
:label="item.label" <template slot-scope="scope">
:value="item.value"/> <span v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">未到货</span>
</el-select> <span v-if="Number(scope.row.采购计划状态)===3" type="success" size="mini">已到货</span>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button> <span v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</span>
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button> </template>
<!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">--> </el-table-column>
<!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>--> <el-table-column label="离线备料计划编号" align="center" width="140">
<!--</el-tooltip>--> <template slot-scope="scope">
<el-button type="primary" size="small" plain icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button> {{ scope.row.离线采购计划编号 }}
</el-card> </template>
<el-card style="width: 1137px"> </el-table-column>
<el-table v-loading="" :data="tableData" stripe highlight-current-row border style="width: 100%;max-height: 230px;margin-top: 10px" height="230px" size="mini" @row-click="searchMX"> <el-table-column label="离线备料名称" align="center" width="160">
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="90"> <template slot-scope="scope">
<template slot-scope="scope"> {{ scope.row.离线采购计划名称 }}
<span v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">未到货</span> </template>
<span v-if="Number(scope.row.采购计划状态)===3" type="success" size="mini">已到货</span> </el-table-column>
<span v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</span> <el-table-column label="供应商" align="center" width="200" show-overflow-tooltip>
</template> <template slot-scope="scope">
</el-table-column> {{ scope.row.供应商名称 }}
<el-table-column label="离线采购计划编号" align="center" width="200"> </template>
<template slot-scope="scope"> </el-table-column>
{{ scope.row.离线采购计划编号 }} <el-table-column label="下单日期" prop="下单日期" align="center" width="100">
</template> <template slot-scope="scope">
</el-table-column> {{ scope.row.下单日期.split(' ')[0] }}
<el-table-column label="离线采购计划名称" align="center" width="180"> </template>
<template slot-scope="scope"> </el-table-column>
{{ scope.row.离线采购计划名称 }} <el-table-column label="操作" align="center" width="240">
</template> <template slot-scope="scope">
</el-table-column> <el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top">
<el-table-column label="供应商" align="center" width="250" show-overflow-tooltip> <div style="display: inline-block">
<template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-printer" @click="exportExcel(scope.row)">打印单据</el-button>
{{ scope.row.供应商名称 }} </div>
</template> </el-tooltip>
</el-table-column> <el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<el-table-column label="下单日期" prop="下单日期" align="center" width="100"> <div style="display: inline-block">
<template slot-scope="scope"> <el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" style="margin-left: 10px" type="text" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/>
{{ scope.row.下单日期.split(' ')[0] }} </div>
</template> </el-tooltip>
</el-table-column> <el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<el-table-column label="操作" align="center" width="290"> <div style="display: inline-block">
<template slot-scope="scope"> <el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" style="margin-left: 10px" type="text" size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top"> </div>
<div style="display: inline-block"> </el-tooltip>
<el-button size="mini" type="text" icon="el-icon-printer" @click="exportExcel(scope.row)">打印单据</el-button> </template>
</div> </el-table-column>
</el-tooltip> </el-table>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top"> <!--<div class="block">-->
<div style="display: inline-block"> <!--<el-pagination-->
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" style="margin-left: 10px" type="text" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/> <!--:current-page="pageCurrent2"-->
</div> <!--:page-sizes="[10, 20, 30, 40]"-->
</el-tooltip> <!--:page-size="pageSize2"-->
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top"> <!--:total="total2"-->
<div style="display: inline-block"> <!--style="display:inline-block;width:40%;float: right;margin-right: 60px"-->
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" style="margin-left: 10px" type="text" size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/> <!--layout="total, sizes, prev, pager, next, jumper"-->
</div> <!--@size-change="handleSizeChange2"-->
</el-tooltip> <!--@current-change="handleCurrentChange2"/>-->
</template> <!--</div>-->
</el-table-column> <el-table v-loading="" :data="tableData3" highlight-current-row border style="width: 100%;margin-top: 10px" height="455px" size="mini">
</el-table> <el-table-column label="进程" align="center" width="70">
<!--<div class="block">--> <template slot-scope="scope">
<!--<el-pagination--> <span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</span>
<!--:current-page="pageCurrent2"--> <span v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</span>
<!--:page-sizes="[10, 20, 30, 40]"--> <span v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</span>
<!--:page-size="pageSize2"--> </template>
<!--:total="total2"--> </el-table-column>
<!--style="display:inline-block;width:50%"--> <el-table-column label="物料编码" prop="物料零件编码" align="center" width="140" show-overflow-tooltip>
<!--layout="total, sizes, prev, pager, next, jumper"--> <template slot-scope="scope">
<!--@size-change="handleSizeChange2"--> {{ scope.row.物料零件编码 }}
<!--@current-change="handleCurrentChange2"/>--> </template>
<!--</div>--> </el-table-column>
</el-card> <el-table-column label="零件名称" align="center" width="120">
<el-card style="width: 1137px"> <template slot-scope="scope">
<el-table v-loading="" :data="tableData3" highlight-current-row border style="width: 100%;margin-top: 10px" height="300px" size="mini"> {{ scope.row.零件名称 }}
<el-table-column label="采购状态" align="center" width="90"> </template>
<template slot-scope="scope"> </el-table-column>
<span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</span> <el-table-column label="材料" prop="材料" align="center" width="95">
<span v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</span> <template slot-scope="scope">
<span v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</span> {{ scope.row.材料 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="180"> <el-table-column label="数量" align="center" prop="数量" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料零件编码 }} <el-input v-positive="'int'" :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.数量" size="mini" type="int" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" align="center" width="160"> <el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} <el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料" prop="材料" align="center" width="100"> <el-table-column label="备注" align="center" prop="备注" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 }} <el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" prop="数量" width="100px"> <el-table-column label="操作" align="center" width="90px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.数量" size="mini" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/> <el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top">
</template> <div style="display: inline-block">
</el-table-column> <el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="text" size="mini" icon="el-icon-right" @click="deleteMX(scope.row)">移出</el-button>
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="160px"> </div>
<template slot-scope="scope"> </el-tooltip>
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/> </template>
</template> </el-table-column>
</el-table-column> </el-table>
<el-table-column label="备注" align="center" prop="备注" width="220px"> </el-card>
<template slot-scope="scope"> </div>
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/> </div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="text" size="mini" icon="el-icon-right" @click="deleteMX(scope.row)">移出</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 1137px"> <el-card style="width: 1137px">
<div id="WGBLD" style="width: 1037px;margin: 0 auto"> <div id="WGBLD" style="width: 1037px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%"> <table cellspacing="0px" align="center" border="1 solid black" width="100%">
@@ -443,7 +430,7 @@ export default {
getTableData() { getTableData() {
this.tableData10 = [] this.tableData10 = []
if (!this.Machine && !this.Group && !this.number) { if (!this.Machine && !this.Group && !this.number) {
this.$message.error('请输入筛选条件!') this.$message.warning('请输入筛选条件!')
return return
} }
if (this.Machine === '') { if (this.Machine === '') {
@@ -498,7 +485,7 @@ export default {
searchTable() { searchTable() {
this.tableData = [] this.tableData = []
if (!this.purchasingOrder && !this.supplierName) { if (!this.purchasingOrder && !this.supplierName) {
this.$message.error('请输入筛选条件!') this.$message.warning('请输入筛选条件!')
return return
} }
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0 this.purchasingOrder ? this.check3 = 1 : this.check3 = 0

View File

@@ -74,7 +74,7 @@
{{ scope.row.开票时间 | formatTime }} {{ scope.row.开票时间 | formatTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="开票金额(元)" width="100px"> <el-table-column align="center" label="开票金额(元)" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }} {{ scope.row.开票金额.toFixed(2) }}
</template> </template>
@@ -153,7 +153,7 @@
{{ scope.row.日期.split(' ')[0] }} {{ scope.row.日期.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额(元)" align="center" width="120" prop="到货金额"> <el-table-column label="金额(元)" align="center" width="100" prop="到货金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }} {{ scope.row.到货金额.toFixed(2) }}
</template> </template>
@@ -165,7 +165,7 @@
<el-button <el-button
type="text" type="text"
size="mini" size="mini"
icon="el-icon-delete" icon="el-icon-right"
@click="deleteTable10(scope.row)"/> @click="deleteTable10(scope.row)"/>
</div> </div>
</el-tooltip> </el-tooltip>
@@ -173,7 +173,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="800px"> <el-dialog v-el-drag-dialog :visible.sync="dialogVisible1" title="新增备料到票" center style="min-height: 300px" width="800px">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="110px"> <el-form ref="form1" :model="form1" :rules="rules1" label-width="110px">
<div style="width: 45%;float: left;margin-top: 5px"> <div style="width: 45%;float: left;margin-top: 5px">
<div style="background: white"> <div style="background: white">
@@ -186,14 +186,14 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发票号" prop="money"> <el-form-item label="发票号">
<el-input v-model="form1.Number" size="small" placeholder="发票号"/> <el-input v-model="form1.Number" size="small" placeholder="发票号"/>
</el-form-item> </el-form-item>
<el-form-item label="到票时间" prop="invoiceTime"> <el-form-item label="到票时间" prop="invoiceTime">
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/> <el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item> </el-form-item>
<el-form-item label="到票金额" prop="money"> <el-form-item label="到票金额(元)" prop="money">
<el-input v-model="form1.money" type="number" size="small" placeholder="开票金额"/> <el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="开票金额"/>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/> <el-input v-model="form1.remark" size="small"/>
@@ -213,7 +213,7 @@
{{ scope.row.日期.split(' ')[0] }} {{ scope.row.日期.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center"> <el-table-column label="金额(元)" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }} {{ scope.row.到货金额.toFixed(2) }}
</template> </template>
@@ -223,8 +223,37 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button> <el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-show="title1==='新增备料到票'" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button> <el-button size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
<el-button v-show="title1==='编辑备料到票'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button> </div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="编辑备料到票" center style="height: 600px" width="400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="110px">
<el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable @change="Name=form1.supplierNameValue;searchTable4()">
<el-option
v-for="item in supplierNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="发票号" prop="money">
<el-input v-model="form1.Number" size="small" placeholder="发票号"/>
</el-form-item>
<el-form-item label="到票时间" prop="invoiceTime">
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="开票金额"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -241,15 +270,14 @@
{{ scope.row.日期.split(' ')[0] }} {{ scope.row.日期.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center"> <el-table-column label="金额(元)" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }} {{ scope.row.到货金额.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <span>合计<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/></span>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">关联到货单</el-button> <el-button type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">关联到货单</el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@@ -300,6 +328,7 @@ export default {
invoiceNum: '', invoiceNum: '',
invoiceTime: '', invoiceTime: '',
Name: '', Name: '',
SUM: 0.00,
arrest: [], arrest: [],
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 30, pageSize1: 30,
@@ -319,6 +348,7 @@ export default {
supplierNames: [], supplierNames: [],
dialogVisible: false, dialogVisible: false,
dialogVisible1: false, dialogVisible1: false,
dialogVisible2: false,
title1: '', title1: '',
form1: { form1: {
supplierNameValue: '', supplierNameValue: '',
@@ -329,7 +359,8 @@ export default {
remark: '' remark: ''
}, },
rules1: { rules1: {
supplierNameValue: [{ required: true, message: '请选择供应商' }] supplierNameValue: [{ required: true, message: '请选择供应商' }],
money: [{ required: true, message: '请填写到票金额' }]
} }
} }
}, },
@@ -440,7 +471,6 @@ export default {
if (this.$refs['form1'] !== undefined) { if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields() this.$refs['form1'].resetFields()
} }
this.title1 = '新增备料到票'
this.tableData4 = [] this.tableData4 = []
this.dialogVisible1 = true this.dialogVisible1 = true
console.log(this.supplierNames) console.log(this.supplierNames)
@@ -480,14 +510,13 @@ export default {
if (this.$refs['form1'] !== undefined) { if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields() this.$refs['form1'].resetFields()
} }
this.title1 = '编辑备料到票' this.dialogVisible2 = true
this.dialogVisible1 = true
this.form1.invoiceNumValue = row.发票流水号 this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间 this.form1.invoiceTime = row.开票时间
this.form1.money = row.开票金额 this.form1.money = row.开票金额
this.form1.Number = row.发票号 this.form1.Number = row.发票号
this.form1.remark = row.备注 this.form1.remark = row.备注
this.form1.supplierNameValue = row.供应商 this.form1.supplierNameValue = parseInt(row.供应商)
if (row.开票时间 === '1900/1/1') { if (row.开票时间 === '1900/1/1') {
this.form1.invoiceTime = null this.form1.invoiceTime = null
} }
@@ -499,7 +528,7 @@ export default {
editInvoice(this.form1.invoiceNumValue, this.form1.invoiceTime, this.form1.money, this.form1.Number, this.form1.remark, this.form1.supplierNameValue).then(response => { editInvoice(this.form1.invoiceNumValue, this.form1.invoiceTime, this.form1.money, this.form1.Number, this.form1.remark, this.form1.supplierNameValue).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.dialogVisible1 = false this.dialogVisible2 = false
this.searchTable1() this.searchTable1()
} else { this.$message.error('编辑失败') } } else { this.$message.error('编辑失败') }
}) })
@@ -536,6 +565,10 @@ export default {
this.searchTable4() this.searchTable4()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.SUM = 0
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].到货金额).toFixed(2)
}
this.arrest = val this.arrest = val
}, },
// 选入 // 选入
@@ -584,7 +617,7 @@ export default {
var param = [] var param = []
param[0] = ['发票流水号', row.发票流水号] param[0] = ['发票流水号', row.发票流水号]
param[1] = ['供应商', row.供应商名称] param[1] = ['供应商', row.供应商名称]
var Data = this.CreateData('12', '报表_备料管理_发票明细_查询数据', param) var Data = this.CreateData('2001', '报表_备料管理_发票_查询数据', param)
this.exportExcel_NPOI(Data) this.exportExcel_NPOI(Data)
// const _ExcelDownLoad = ExcelDownLoad // const _ExcelDownLoad = ExcelDownLoad
// this.download(`${_ExcelDownLoad}?Fapiao=${row.发票流水号}&name=${row.供应商名称}`) // this.download(`${_ExcelDownLoad}?Fapiao=${row.发票流水号}&name=${row.供应商名称}`)

View File

@@ -10,7 +10,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 180px" clearable/> <el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 180px" clearable/>
<el-select v-model="MaterialsValue" placeholder="请选择备料状态" filterable size="small" style="width: 140px" clearable> <el-select v-model="MaterialsValue" placeholder="请选择备料状态" filterable size="small" style="width: 140px;margin-left: 10px" clearable>
<el-option <el-option
v-for="item in Materials" v-for="item in Materials"
:key="item.value" :key="item.value"
@@ -30,8 +30,8 @@
range-separator="" range-separator=""
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"/> end-placeholder="结束日期"/>
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button> <el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button> <el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>
</div> </div>
</el-card> </el-card>
<el-card style="width: 100%"> <el-card style="width: 100%">
@@ -43,7 +43,7 @@
stripe stripe
size="mini" size="mini"
style="width: 100%" style="width: 100%"
height="760" height="750"
@sort-change="sortChange"> @sort-change="sortChange">
<el-table-column <el-table-column
label="序号" label="序号"
@@ -51,8 +51,10 @@
type="index" type="index"
width="50"/> width="50"/>
<el-table-column <el-table-column
label="备料状态" label="进程"
align="center" align="center"
prop="进程"
sortable="custom"
width="80px"> width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到</span> <span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到</span>
@@ -73,7 +75,7 @@
<el-table-column <el-table-column
label="物料编码" label="物料编码"
align="center" align="center"
min-width="180px"> width="180px">
<template slot-scope="scope">{{ scope.row.物料编码 }}</template> <template slot-scope="scope">{{ scope.row.物料编码 }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -92,12 +94,12 @@
align="center"> align="center">
<template slot-scope="scope">{{ scope.row.材料 }}</template> <template slot-scope="scope">{{ scope.row.材料 }}</template>
</el-table-column> </el-table-column>
<el-table-column label="备料件数" align="center" width="70"> <el-table-column label="备料件数" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购数量 }} {{ scope.row.采购数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备料时间" align="center" prop="下单日期" sortable="custom" width="100"> <el-table-column label="备料时间" align="center" prop="下单日期" sortable="custom" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }} {{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
</template> </template>
@@ -105,7 +107,7 @@
<el-table-column <el-table-column
label="到货件数" label="到货件数"
align="center" align="center"
width="70"> width="100">
<template slot-scope="scope">{{ scope.row.到货数量 }}</template> <template slot-scope="scope">{{ scope.row.到货数量 }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -136,7 +138,7 @@
</template> </template>
<script> <script>
import { searchSupplier, searchTable, searchTablesheet } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch' import { searchSupplier, searchTable } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
export default { export default {
name: 'Index', name: 'Index',
data() { data() {
@@ -204,31 +206,38 @@ export default {
})) }))
}, },
exportExcel() { exportExcel() {
let check, check1, check2, check3 if (this.tableData.length !== 0) {
this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '') let check, check1, check2, check3
this.supplierNameValue ? check = 1 : check = 0 this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '')
this.partNumber ? check1 = 1 : check1 = 0 this.supplierNameValue ? check = 1 : check = 0
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) { this.partNumber ? check1 = 1 : check1 = 0
check2 = 1 if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
check2 = 1
} else {
check2 = 0
}
var param = []
param[0] = ['供应商流水号_check', check]
param[1] = ['供应商流水号', this.supplierNameValue]
param[2] = ['零件图号_check', check1]
param[3] = ['零件图号', this.partNumber]
param[4] = ['备料状态_check', check2]
param[5] = ['备料状态', this.MaterialsValue]
param[6] = ['下单时间_check', check3]
if (check3 === 0) {
param[7] = ['开始时间', '']
param[8] = ['结束时间', '']
} else {
param[7] = ['开始时间', this.dateRange[0]]
param[8] = ['结束时间', this.dateRange[1]]
}
param[9] = ['排序名称', this.ordername]
param[10] = ['排序方式', this.order]
var Data = this.CreateData('2001', '报表_备料管理_外购备料_综合查询数据', param)
this.exportExcel_NPOI(Data)
} else { } else {
check2 = 0 this.$message.warning('暂无数据')
} }
searchTablesheet(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue, check3, this.dateRange[0], this.dateRange[1], this.ordername, this.order).then(res => {
console.log(res.data, 11)
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['备料状态', '供应商', '物料编码', '物料名称', '材料', '备料件数', '备料时间', '到货件数', '到货时间', '结算时间']
const filterVal = ['备料状态', '供应商名称', '物料编码', '零件名称', '材料', '采购数量', '下单日期', '到货数量', '日期', '开票时间']
const list = res.data
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '外购备料',
autoWidth: true,
bookType: 'xlsx'
})
})
})
}, },
fetchData() { fetchData() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => { searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
@@ -251,6 +260,8 @@ export default {
this.ordername = 3 this.ordername = 3
} else if (column.prop === '下单日期') { } else if (column.prop === '下单日期') {
this.ordername = 4 this.ordername = 4
} else if (column.prop === '进程') {
this.ordername = 5
} else { } else {
this.ordername = '' this.ordername = ''
} }

View File

@@ -4,21 +4,19 @@
<div style="white-space: nowrap"> <div style="white-space: nowrap">
<el-card style="width: 1663px"> <el-card style="width: 1663px">
<el-col> <el-col>
<span>请款时间段:</span> <el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
:picker-options="pickerOptions" :picker-options="pickerOptions"
size="small" size="small"
type="daterange" type="daterange"
align="center" align="center"
style="width: 240px;margin: 3px 0" style="width: 240px;margin-left: 10px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
range-separator="" range-separator=""
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"/> end-placeholder="结束日期"/>
<span style="margin-left: 10px">供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
<el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top">
<el-button <el-button
type="primary" type="primary"
@@ -32,7 +30,7 @@
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button> <el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 130px" @click="exportExcel">导出</el-button> <el-button type="success" plain class="el-icon-download" size="small" style="margin: 10px 0 10px 130px" @click="exportExcel">导出</el-button>
</el-tooltip> </el-tooltip>
</el-col> </el-col>
</el-card> </el-card>
@@ -66,7 +64,7 @@
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款金额" align="center" min-width="90" width="90" prop="请款金额"> <el-table-column label="请款金额(元)" align="center" min-width="90" width="90" prop="请款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }} {{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template> </template>
@@ -75,10 +73,10 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</span> <span v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</span>
<span v-if="Number(scope.row.审批情况流水号)===1" type="success" size="mini">已通过</span> <span v-if="Number(scope.row.审批情况流水号)===1" type="success" size="mini">已通过</span>
<span v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">通过</span> <span v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">通过</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未通过审批原因" width="120" align="center"> <el-table-column label="未通过原因" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }} {{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template> </template>
@@ -86,8 +84,8 @@
<el-table-column label="付款情况" width="100" align="center"> <el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="mini">未操作</span> <span v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="mini">未操作</span>
<span v-if="Number(scope.row.付款情况流水号)===1" type="success" size="mini">已同意</span> <span v-if="Number(scope.row.付款情况流水号)===1" type="success" size="mini">已</span>
<span v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="mini">不同意</span> <span v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="mini">未付</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未付款原因" width="100" align="center"> <el-table-column label="未付款原因" width="100" align="center">
@@ -120,21 +118,26 @@
<el-card style="margin-left: 0px;width:524px; margin-left: 1px; display: inline-block;vertical-align: top"> <el-card style="margin-left: 0px;width:524px; margin-left: 1px; display: inline-block;vertical-align: top">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" border class="subTableHeader" size="mini" show-summary style=""> <el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" border class="subTableHeader" size="mini" show-summary style="">
<el-table-column width="50" align="center" type="index" label="序号"/> <el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="120" align="center" label="发票号"> <el-table-column width="120" align="center" label="发票号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.发票号 }} {{ scope.row.发票号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="170" align="center" label="供应商" show-overflow-tooltip> <el-table-column width="170" align="center" label="供应商" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="票金额" width="100px" prop="票金额"> <el-table-column align="center" label="票金额(元)" width="90px" prop="票金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }} {{ scope.row.开票金额.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到票时间" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.开票时间 | formatTime }}
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px"> <el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px">
@@ -158,12 +161,12 @@
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="票金额" align="center" min-width="70"> <el-table-column label="票金额(元)" align="center" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票金额 }} {{ scope.row.开票金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="票时间" align="center" min-width="70"> <el-table-column label="票时间" align="center" min-width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票时间 | formatTime }} {{ scope.row.开票时间 | formatTime }}
</template> </template>
@@ -280,7 +283,7 @@ export default {
param[2] = ['结束时间', this.dateRange[1]] param[2] = ['结束时间', this.dateRange[1]]
param[3] = ['供应商名称_check', this.check2] param[3] = ['供应商名称_check', this.check2]
param[4] = ['供应商名称', this.supplierName0] param[4] = ['供应商名称', this.supplierName0]
var Data = this.CreateData('03', '报表_备料管理_请款_查询数据', param) var Data = this.CreateData('2001', '报表_备料管理_请款_查询数据', param)
this.exportExcel_NPOI(Data) this.exportExcel_NPOI(Data)
}, },
// dateFormat(row, column) { // dateFormat(row, column) {