更新
This commit is contained in:
@@ -62,7 +62,7 @@ export function initPartDrawing(check1, name) {
|
||||
})
|
||||
}
|
||||
// 查询外购备料
|
||||
export function searchPurchasedMaterials(check1, name) {
|
||||
export function searchPurchasedMaterials(check1, name, order, partName) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -71,7 +71,7 @@ export function searchPurchasedMaterials(check1, name) {
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '备料管理_外购备料_查询数据',
|
||||
param: `零件图号_check=${check1}&零件图号=${name}`
|
||||
param: `零件图号_check=${check1}&零件图号=${name}&排序名称=${partName}&排序方式=${order}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
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({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -83,8 +96,7 @@ export function searchArriveOrder(num8, num9, num6, num7, datecheck, starttime,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '备料管理_到货单查询_新',
|
||||
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&是否关联_check=${num6}&是否关联=${num7}&日期check=${datecheck}&开始时间=${starttime}&结束时间=${endtime}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&是否关联_check=${num6}&是否关联=${num7}&日期check=${datecheck}&开始时间=${starttime}&结束时间=${endtime}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -21,16 +21,14 @@
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<span style="margin-left: 10px">零件图号:</span>
|
||||
<el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 180px" size="small" clearable/>
|
||||
<span class="demonstration" style="margin-left: 10px">时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin: 3px 0"
|
||||
style="width: 240px;margin-left: 10px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
@@ -52,18 +50,18 @@
|
||||
<!--type="date"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<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-row>
|
||||
</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>-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.项目名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</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">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </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="warning" size="small" style="margin: 15px 0 0 10px" plain @click="wareHousing">出库</el-button>
|
||||
</el-row>
|
||||
@@ -59,7 +59,7 @@
|
||||
{{ scope.row.出库数量1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已出库数量" width="90px">
|
||||
<el-table-column align="center" label="已出库数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已出库数量 }}
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
@@ -11,7 +11,7 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</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
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</template>
|
||||
|
||||
<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 $ from 'jquery'
|
||||
export default {
|
||||
@@ -226,27 +226,8 @@ export default {
|
||||
// this.tableData.push({
|
||||
// 重量: response.data.rows[0].重量
|
||||
// })
|
||||
this.Data = response.data.rows
|
||||
this.tableData = response.data.rows
|
||||
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
|
||||
}
|
||||
})
|
||||
|
||||
@@ -250,6 +250,7 @@ export default {
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.tableData.length !== 0) {
|
||||
if (this.machineNameValue !== '' && this.machineNameValue !== null) {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
@@ -270,6 +271,9 @@ export default {
|
||||
}
|
||||
var Data = this.CreateData('2001', '报表_报废零件查询', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
this.$message.warning('暂无数据')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
|
||||
@@ -46,16 +46,16 @@
|
||||
{{ scope.row.终端编号 }}
|
||||
</template>
|
||||
</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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始加工时间 ? scope.row.开始加工时间.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</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">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
||||
@@ -11,9 +11,20 @@
|
||||
<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-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 label="机床图号" prop="机床图号" width="120" align="center">
|
||||
<el-table-column label="机床图号" prop="机床图号" width="120" sortable="custom" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
@@ -28,7 +39,7 @@
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -38,7 +49,7 @@
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.材料 }}
|
||||
</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-tooltip>-->
|
||||
<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-button type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
|
||||
</el-tooltip>
|
||||
@@ -395,6 +406,8 @@ export default {
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
partName: '',
|
||||
order: '',
|
||||
partDrawingNumber: '',
|
||||
Buyer: '',
|
||||
loading1: false,
|
||||
@@ -482,10 +495,42 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.searchRawMaterial()
|
||||
this.getCurrentTime()
|
||||
this.searchTable2()
|
||||
// this.searchTable1()
|
||||
// this.searchTable2()
|
||||
},
|
||||
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() {
|
||||
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
|
||||
@@ -562,6 +607,23 @@ export default {
|
||||
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() {
|
||||
initPartDrawing(0, this.partDrawingNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -576,7 +638,7 @@ export default {
|
||||
this.loading1 = true
|
||||
this.partDrawingNumber ? this.check1 = 1 : this.check1 = 0
|
||||
// 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.total1 = response.data.total
|
||||
this.loading1 = false
|
||||
@@ -706,27 +768,15 @@ export default {
|
||||
}))
|
||||
},
|
||||
exportExcel2(row) {
|
||||
this.searchTable3(row).then(val => {
|
||||
console.log(row, 11111)
|
||||
console.log(this.tableData4)
|
||||
if (this.tableData4.length !== 0) {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['备料状态', '物料编码', '零件名称', '材料', '数量', '成品尺寸', '单位', '备注']
|
||||
const filterVal = ['备料状态', '物料零件编码', '零件名称', '材料', '总数量', '成品尺寸', '单位', '备注1']
|
||||
const list = this.tableData4
|
||||
const data = this.formatJson(filterVal, list)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: row.采购单名称 + '-' + row.计划完成日期,
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
var param = []
|
||||
param[0] = ['采购计划流水号', row.采购计划流水号]
|
||||
param[1] = ['供应商', row.供应商名称]
|
||||
var Data = this.CreateData('2001', '报表_备料管理_采购计划明细_查询数据', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
this.$message.warning('没有导出内容')
|
||||
this.$message.warning('暂无数据')
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable3(row) { // 查询采购计划明细
|
||||
this.purchasingOrderNumber = row.采购计划流水号
|
||||
|
||||
@@ -4,35 +4,33 @@
|
||||
<div style="white-space: nowrap">
|
||||
<el-card style="width: 1329px;">
|
||||
<div>
|
||||
<span style="margin-left: 10px">供应商:</span>
|
||||
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="width: 220px" filterable clearable @change="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">
|
||||
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="width: 220px" filterable clearable @change="searchTable4()">
|
||||
<el-option
|
||||
v-for="item in supplierName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>请款时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin: 3px 0"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-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 type="success" plain size="small" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 660px;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: 7000px" height="240px" size="mini" highlight-current-row @row-click="searchTable5">
|
||||
<el-table-column label="关联情况" align="center" width="80">
|
||||
<el-card style="width: 650px;margin-left: 0px;display: inline-block">
|
||||
<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-column label="进程" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</span>
|
||||
<span v-else type="primary" size="mini">未结算</span>
|
||||
@@ -73,21 +71,8 @@
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</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 style="width: 660px;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-card style="width: 670px;margin-left: 3px;display: inline-block;vertical-align: top">
|
||||
<!--<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>-->
|
||||
<el-table
|
||||
v-loading=""
|
||||
@@ -117,12 +102,12 @@
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="right" width="80">
|
||||
<el-table-column label="单价(元)" align="right" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="right" width="80">
|
||||
<el-table-column label="金额(元)" align="right" width="95">
|
||||
<template slot-scope="scope">
|
||||
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
|
||||
</template>
|
||||
@@ -144,7 +129,6 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card style="width: 1329px">
|
||||
<span>关联备料材料</span>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData6"
|
||||
@@ -152,7 +136,7 @@
|
||||
border
|
||||
show-summary
|
||||
highlight-current-row
|
||||
style="margin: 3px 0; width: 1280px"
|
||||
style="margin: 3px 0; width: 1310px"
|
||||
height="500px"
|
||||
size="mini">
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="150">
|
||||
@@ -175,22 +159,22 @@
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="240">
|
||||
<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" >
|
||||
<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="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">
|
||||
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
|
||||
</template>
|
||||
@@ -212,11 +196,13 @@
|
||||
</el-table>
|
||||
</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-row>
|
||||
<el-form-item label="到货单号">
|
||||
<el-input v-model="NewOrder" style="width: 180px" size="small" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-show="title==='新增到货单'" v-model="form.supplierNameValue" placeholder="供应商" size="small" filterable @change="searchTable20()">
|
||||
<el-select v-show="title==='新增到货单'" v-model="form.supplierNameValue" placeholder="供应商" style="width: 180px" size="small" filterable @change="searchTable20()">
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
:key="item.value"
|
||||
@@ -224,12 +210,9 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<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-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
@@ -321,37 +304,37 @@
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="90px">
|
||||
<el-table-column label="零件名称" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" width="70px">
|
||||
<el-table-column label="材料" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备料件数" align="center" width="70px">
|
||||
<el-table-column label="备料数" align="center" width="65px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到件数" align="center" width="70px">
|
||||
<el-table-column label="已到数" align="center" width="65px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="110px">
|
||||
<el-table-column label="到货数" align="center" width="120px">
|
||||
<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>
|
||||
</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">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="170px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.成品尺寸 }}
|
||||
</template>
|
||||
@@ -458,24 +441,24 @@
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备料件数" align="center" width="70px">
|
||||
<el-table-column label="备料数" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到件数" align="center" width="70px">
|
||||
<el-table-column label="已到数" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="110px">
|
||||
<el-table-column label="到货数" align="center" width="120px">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货重量" align="center" width="110px">
|
||||
<el-table-column label="到货重量" align="center" width="120px">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
@@ -504,7 +487,7 @@
|
||||
</template>
|
||||
<script>
|
||||
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'
|
||||
export default {
|
||||
data() {
|
||||
@@ -592,6 +575,7 @@ export default {
|
||||
pageCurrent4: 1,
|
||||
pageSize4: 10,
|
||||
tableData5: [],
|
||||
NewOrder: '',
|
||||
到货单流水号: '',
|
||||
中间变量: '',
|
||||
form: {
|
||||
@@ -666,9 +650,40 @@ export default {
|
||||
created() {
|
||||
this.fetchdata()
|
||||
this.searchTable2()
|
||||
this.getCurrentTime()
|
||||
// this.searchTable4()
|
||||
},
|
||||
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) {
|
||||
var a = 0
|
||||
this.tableData30.map(v => {
|
||||
@@ -748,8 +763,8 @@ export default {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) {
|
||||
sums[index] = '总重量:'
|
||||
if (index === 0) {
|
||||
sums[index] = '小计'
|
||||
return
|
||||
} else if (index === 2) {
|
||||
const values = data.map(item => Number(item['数量']))
|
||||
@@ -769,9 +784,6 @@ export default {
|
||||
} else if (index === 3) {
|
||||
sums[index] = 'KG'
|
||||
return
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总金额:'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
const values = data.map(item => Number(item['金额']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
@@ -799,7 +811,7 @@ export default {
|
||||
sums[index] = '未绑定重量:'
|
||||
return
|
||||
} else if (index === 4) {
|
||||
sums[index] = this.未绑定数量
|
||||
sums[index] = this.未绑定数量 + ' KG'
|
||||
} if (index === 5) {
|
||||
sums[index] = '绑定重量:'
|
||||
return
|
||||
@@ -814,7 +826,7 @@ export default {
|
||||
return parseInt(Number(prev) * 100) / 100
|
||||
}
|
||||
}, 0)
|
||||
sums[index]
|
||||
sums[index] += ' KG'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
@@ -851,28 +863,26 @@ export default {
|
||||
} else {
|
||||
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 => {
|
||||
this.tableData4 = response.data.rows
|
||||
this.total4 = response.data.total
|
||||
if ((this.supplierNameValue !== '' && this.supplierNameValue !== null) || this.dateRange !== '') {
|
||||
searchArriveOrder(this.check, this.supplierNameValue, this.check2, this.PickingValue, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
} else {
|
||||
this.tableData4 = []
|
||||
this.$message.warning('请填入查询条件')
|
||||
}
|
||||
},
|
||||
Calculation() {
|
||||
this.form10.金额 = this.form10.单价 * this.form10.数量
|
||||
},
|
||||
handleSizeChange4(val) { // 采购单列表分页
|
||||
this.pageSize4 = val
|
||||
this.pageCurrent4 = 1
|
||||
this.searchTable4()
|
||||
},
|
||||
handleCurrentChange4(val) { // 采购单列表分页
|
||||
this.pageCurrent4 = val
|
||||
this.searchTable4()
|
||||
},
|
||||
// 创建采购单
|
||||
addArrivalOrder() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
searchNewOrder().then(response => {
|
||||
this.NewOrder = response.data[0].到货单号
|
||||
})
|
||||
this.title = '新增到货单'
|
||||
this.form.备注 = ''
|
||||
this.form.supplierNameValue = ''
|
||||
@@ -894,8 +904,6 @@ export default {
|
||||
addPurchaseOrder(this.form.备注, this.form.supplierNameValue, this.form.日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建到货单成功')
|
||||
this.pageCurrent4 = 1
|
||||
this.pageSize4 = 10
|
||||
this.searchTable4()
|
||||
this.dialogVisible = false
|
||||
} else { this.$message.error('新建到货单失败') }
|
||||
@@ -1168,12 +1176,16 @@ export default {
|
||||
})
|
||||
},
|
||||
downloadExcel() {
|
||||
if (this.num1) {
|
||||
var param = []
|
||||
param[0] = ['到货单流水号', this.num1]
|
||||
param[1] = ['编号', this.num2]
|
||||
param[2] = ['供应商', this.sup]
|
||||
var Data = this.CreateData('12', '报表_备料管理_到货单明细查询', param)
|
||||
var Data = this.CreateData('2001', '报表_备料管理_到货单明细查询', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
this.$message.warning('请先选择到货单')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1218,6 +1230,25 @@ export default {
|
||||
right: 15px;
|
||||
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>
|
||||
.el-table__footer-wrapper tbody td, .el-table__header-wrapper tbody td {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 1137px">
|
||||
<span>机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="width: 150px;" placeholder="机床号" @change="getGroup">
|
||||
<div>
|
||||
<div style="width: 100%;overflow:auto">
|
||||
<div style="white-space: nowrap">
|
||||
<el-card style="margin-left: 0px;width:820px; display: inline-block;height: 745px">
|
||||
<el-col>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="width: 150px;margin-top: 3px" placeholder="机床图号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
@@ -12,7 +14,6 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 120px;" @change="getTableData">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
@@ -20,94 +21,80 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<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-card>
|
||||
<el-card style="width: 1137px">
|
||||
<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-button type="primary" plain class="el-icon-search" size="small" style="margin: 0px 10px;" @click="getTableData()">查询</el-button>
|
||||
<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-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="机床图号" prop="机床图号" min-width="180" align="center">
|
||||
<el-table-column label="机床图号" prop="机床图号" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" prop="组号" width="120" sortable="custom" align="center">
|
||||
<el-table-column label="组号" prop="组号" width="80" sortable="custom" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" sortable="custom" width="220">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" sortable="custom" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="220">
|
||||
<el-table-column label="零件名称" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<el-table-column label="数量" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" prop="材料" align="center" sortable="custom" min-width="160">
|
||||
<el-table-column label="材料" prop="材料" align="center" sortable="custom" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--<div class="block">-->
|
||||
<!--<el-pagination-->
|
||||
<!--:current-page="pageCurrent10"-->
|
||||
<!--:page-sizes="[10, 20, 30, 40]"-->
|
||||
<!--:page-size="pageSize10"-->
|
||||
<!--:total="total10"-->
|
||||
<!--style="display:inline-block;width:50%"-->
|
||||
<!--layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!--@size-change="handleSizeChange10"-->
|
||||
<!--@current-change="handleCurrentChange10"/>-->
|
||||
<!--</div>-->
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<span>离线备料单号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px" clearable/>
|
||||
<span style="margin-left: 10px">供应商:</span>
|
||||
<el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 150px" filterable clearable @change="searchTable">
|
||||
<el-card style="margin-left: 1px;width:1120px; display: inline-block;">
|
||||
<div> <!--slot="header"-->
|
||||
<!--<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()"/>-->
|
||||
<el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px;margin-top: 3px" clearable/>
|
||||
<el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 200px" filterable clearable @change="searchTable">
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button>
|
||||
<el-button type="primary" size="small" plain icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button>
|
||||
<el-button type="distribution" size="small" plain 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-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
|
||||
<!--</el-tooltip>-->
|
||||
<el-button type="primary" size="small" plain icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
</div>
|
||||
<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="采购状态" prop="采购计划状态" align="center" width="90">
|
||||
<el-table-column label="进程" prop="采购计划状态" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">未到货</span>
|
||||
<span v-if="Number(scope.row.采购计划状态)===3" type="success" size="mini">已到货</span>
|
||||
<span v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线采购计划编号" align="center" width="200">
|
||||
<el-table-column label="离线备料计划编号" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线采购计划编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线采购计划名称" align="center" width="180">
|
||||
<el-table-column label="离线备料名称" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线采购计划名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" width="250" show-overflow-tooltip>
|
||||
<el-table-column label="供应商" align="center" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -117,7 +104,7 @@
|
||||
{{ scope.row.下单日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="290">
|
||||
<el-table-column label="操作" align="center" width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top">
|
||||
<div style="display: inline-block">
|
||||
@@ -143,52 +130,50 @@
|
||||
<!--:page-sizes="[10, 20, 30, 40]"-->
|
||||
<!--:page-size="pageSize2"-->
|
||||
<!--:total="total2"-->
|
||||
<!--style="display:inline-block;width:50%"-->
|
||||
<!--style="display:inline-block;width:40%;float: right;margin-right: 60px"-->
|
||||
<!--layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!--@size-change="handleSizeChange2"-->
|
||||
<!--@current-change="handleCurrentChange2"/>-->
|
||||
<!--</div>-->
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<el-table v-loading="" :data="tableData3" highlight-current-row border style="width: 100%;margin-top: 10px" height="300px" size="mini">
|
||||
<el-table-column label="采购状态" align="center" width="90">
|
||||
<el-table v-loading="" :data="tableData3" highlight-current-row border style="width: 100%;margin-top: 10px" height="455px" size="mini">
|
||||
<el-table-column label="进程" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</span>
|
||||
<span v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</span>
|
||||
<span v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="180">
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="140" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="160">
|
||||
<el-table-column label="零件名称" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" prop="材料" align="center" width="100">
|
||||
<el-table-column label="材料" prop="材料" align="center" width="95">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="数量" width="100px">
|
||||
<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-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>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="160px">
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
|
||||
<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)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="备注" width="220px">
|
||||
<el-table-column label="备注" align="center" prop="备注" min-width="100px">
|
||||
<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)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
<el-table-column label="操作" align="center" width="90px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top">
|
||||
<div style="display: inline-block">
|
||||
@@ -199,6 +184,8 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
<el-card style="width: 1137px">
|
||||
<div id="WGBLD" style="width: 1037px;margin: 0 auto">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
@@ -443,7 +430,7 @@ export default {
|
||||
getTableData() {
|
||||
this.tableData10 = []
|
||||
if (!this.Machine && !this.Group && !this.number) {
|
||||
this.$message.error('请输入筛选条件!')
|
||||
this.$message.warning('请输入筛选条件!')
|
||||
return
|
||||
}
|
||||
if (this.Machine === '') {
|
||||
@@ -498,7 +485,7 @@ export default {
|
||||
searchTable() {
|
||||
this.tableData = []
|
||||
if (!this.purchasingOrder && !this.supplierName) {
|
||||
this.$message.error('请输入筛选条件!')
|
||||
this.$message.warning('请输入筛选条件!')
|
||||
return
|
||||
}
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
{{ scope.row.开票时间 | formatTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额(元)" width="100px">
|
||||
<el-table-column align="center" label="开票金额(元)" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额.toFixed(2) }}
|
||||
</template>
|
||||
@@ -153,7 +153,7 @@
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.到货金额.toFixed(2) }}
|
||||
</template>
|
||||
@@ -165,7 +165,7 @@
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
icon="el-icon-right"
|
||||
@click="deleteTable10(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@@ -173,7 +173,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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">
|
||||
<div style="width: 45%;float: left;margin-top: 5px">
|
||||
<div style="background: white">
|
||||
@@ -186,14 +186,14 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号" prop="money">
|
||||
<el-form-item label="发票号">
|
||||
<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-model="form1.money" type="number" size="small" placeholder="开票金额"/>
|
||||
<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"/>
|
||||
@@ -213,7 +213,7 @@
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center">
|
||||
<el-table-column label="金额(元)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货金额.toFixed(2) }}
|
||||
</template>
|
||||
@@ -223,8 +223,37 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<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 v-show="title1==='编辑备料到票'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
|
||||
<el-button size="small" type="primary" @click="submitAdd1('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>
|
||||
</el-dialog>
|
||||
|
||||
@@ -241,15 +270,14 @@
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center">
|
||||
<el-table-column label="金额(元)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货金额.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">关联到货单</el-button>
|
||||
</div>
|
||||
<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="float:right;margin: 10px 10px 0 10px" @click="addMateriel">关联到货单</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -300,6 +328,7 @@ export default {
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
Name: '',
|
||||
SUM: 0.00,
|
||||
arrest: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 30,
|
||||
@@ -319,6 +348,7 @@ export default {
|
||||
supplierNames: [],
|
||||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
dialogVisible2: false,
|
||||
title1: '',
|
||||
form1: {
|
||||
supplierNameValue: '',
|
||||
@@ -329,7 +359,8 @@ export default {
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
supplierNameValue: [{ required: true, message: '请选择供应商' }]
|
||||
supplierNameValue: [{ required: true, message: '请选择供应商' }],
|
||||
money: [{ required: true, message: '请填写到票金额' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -440,7 +471,6 @@ export default {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '新增备料到票'
|
||||
this.tableData4 = []
|
||||
this.dialogVisible1 = true
|
||||
console.log(this.supplierNames)
|
||||
@@ -480,14 +510,13 @@ export default {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '编辑备料到票'
|
||||
this.dialogVisible1 = true
|
||||
this.dialogVisible2 = true
|
||||
this.form1.invoiceNumValue = row.发票流水号
|
||||
this.form1.invoiceTime = row.开票时间
|
||||
this.form1.money = row.开票金额
|
||||
this.form1.Number = row.发票号
|
||||
this.form1.remark = row.备注
|
||||
this.form1.supplierNameValue = row.供应商
|
||||
this.form1.supplierNameValue = parseInt(row.供应商)
|
||||
if (row.开票时间 === '1900/1/1') {
|
||||
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 => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
@@ -536,6 +565,10 @@ export default {
|
||||
this.searchTable4()
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.SUM += parseFloat(val[i].到货金额).toFixed(2)
|
||||
}
|
||||
this.arrest = val
|
||||
},
|
||||
// 选入
|
||||
@@ -584,7 +617,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['发票流水号', row.发票流水号]
|
||||
param[1] = ['供应商', row.供应商名称]
|
||||
var Data = this.CreateData('12', '报表_备料管理_发票明细_查询数据', param)
|
||||
var Data = this.CreateData('2001', '报表_备料管理_发票_查询数据', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
// const _ExcelDownLoad = ExcelDownLoad
|
||||
// this.download(`${_ExcelDownLoad}?Fapiao=${row.发票流水号}&name=${row.供应商名称}`)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<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
|
||||
v-for="item in Materials"
|
||||
:key="item.value"
|
||||
@@ -30,8 +30,8 @@
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" size="small" @click="exportExcel()">导出</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="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 100%">
|
||||
@@ -43,7 +43,7 @@
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 100%"
|
||||
height="760"
|
||||
height="750"
|
||||
@sort-change="sortChange">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
@@ -51,8 +51,10 @@
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
label="备料状态"
|
||||
label="进程"
|
||||
align="center"
|
||||
prop="进程"
|
||||
sortable="custom"
|
||||
width="80px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到</span>
|
||||
@@ -73,7 +75,7 @@
|
||||
<el-table-column
|
||||
label="物料编码"
|
||||
align="center"
|
||||
min-width="180px">
|
||||
width="180px">
|
||||
<template slot-scope="scope">{{ scope.row.物料编码 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -92,12 +94,12 @@
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.材料 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备料件数" align="center" width="70">
|
||||
<el-table-column label="备料件数" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数量 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
|
||||
</template>
|
||||
@@ -105,7 +107,7 @@
|
||||
<el-table-column
|
||||
label="到货件数"
|
||||
align="center"
|
||||
width="70">
|
||||
width="100">
|
||||
<template slot-scope="scope">{{ scope.row.到货数量 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -136,7 +138,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchTable, searchTablesheet } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
|
||||
import { searchSupplier, searchTable } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
@@ -204,6 +206,7 @@ export default {
|
||||
}))
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.tableData.length !== 0) {
|
||||
let check, check1, check2, check3
|
||||
this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '')
|
||||
this.supplierNameValue ? check = 1 : check = 0
|
||||
@@ -213,22 +216,28 @@ export default {
|
||||
} else {
|
||||
check2 = 0
|
||||
}
|
||||
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'
|
||||
})
|
||||
})
|
||||
})
|
||||
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 {
|
||||
this.$message.warning('暂无数据')
|
||||
}
|
||||
},
|
||||
fetchData() {
|
||||
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
|
||||
@@ -251,6 +260,8 @@ export default {
|
||||
this.ordername = 3
|
||||
} else if (column.prop === '下单日期') {
|
||||
this.ordername = 4
|
||||
} else if (column.prop === '进程') {
|
||||
this.ordername = 5
|
||||
} else {
|
||||
this.ordername = ''
|
||||
}
|
||||
|
||||
@@ -4,21 +4,19 @@
|
||||
<div style="white-space: nowrap">
|
||||
<el-card style="width: 1663px">
|
||||
<el-col>
|
||||
<span>请款时间段:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin: 3px 0"
|
||||
style="width: 240px;margin-left: 10px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-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-button
|
||||
type="primary"
|
||||
@@ -32,7 +30,7 @@
|
||||
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||
</el-tooltip>
|
||||
<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-col>
|
||||
</el-card>
|
||||
@@ -66,7 +64,7 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
@@ -75,10 +73,10 @@
|
||||
<template slot-scope="scope">
|
||||
<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.审批情况流水号)===2" type="danger" size="mini">不通过</span>
|
||||
<span v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">未通过</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="120" align="center">
|
||||
<el-table-column label="未通过原因" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
@@ -86,8 +84,8 @@
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<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.付款情况流水号)===2" type="danger" 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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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-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 min-width="120" align="center" label="发票号">
|
||||
<el-table-column width="120" align="center" label="发票号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.开票金额.toFixed(2) }}
|
||||
</template>
|
||||
</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-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px">
|
||||
@@ -158,12 +161,12 @@
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</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">
|
||||
{{ scope.row.开票时间 | formatTime }}
|
||||
</template>
|
||||
@@ -280,7 +283,7 @@ export default {
|
||||
param[2] = ['结束时间', this.dateRange[1]]
|
||||
param[3] = ['供应商名称_check', this.check2]
|
||||
param[4] = ['供应商名称', this.supplierName0]
|
||||
var Data = this.CreateData('03', '报表_备料管理_请款_查询数据', param)
|
||||
var Data = this.CreateData('2001', '报表_备料管理_请款_查询数据', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
// dateFormat(row, column) {
|
||||
|
||||
Reference in New Issue
Block a user