20200204创建外购计划,备料分配,外购备料请款界面修改
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询零件
|
||||
export function searchtable(num1, num2, num3, num4, pageCurrent, pageSize) {
|
||||
export function searchtable(num1, num2, num3, num4, pageCurrent, pageSize, ordername, order) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料零件查询',
|
||||
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料打印_check=' + num3 + '&备料打印=' + num4 + '&备料到货=0',
|
||||
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料打印_check=' + num3 + '&备料打印=' + num4 + '&备料到货=0' + '&排序名称=' + ordername + '&排序方式=' + order,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
@@ -49,3 +49,15 @@ export function edit2(num1) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getExport(num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料零件查询',
|
||||
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料打印_check=' + num3 + '&备料打印=' + num4 + '&备料到货=0'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -64,15 +64,15 @@ export function searchPurchasedMaterials(check1, name) {
|
||||
})
|
||||
}
|
||||
// 查询采购单
|
||||
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name, check3, name2) {
|
||||
export function searchPurchaseOrder(check1, num, check2, name, check3, name2, checktime, starttime, endtime) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_采购计划_查询数据',
|
||||
param: `采购单号_check=${check1}&采购单号=${num}&供应商名称_check=${check2}&供应商名称=${name}&供应商流水号_check=${check3}&供应商流水号=${name2}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
param: `采购单号_check=${check1}&采购单号=${num}&供应商名称_check=${check2}&供应商名称=${name}&供应商流水号_check=${check3}&供应商流水号=${name2}&时间_check=${checktime}&开始时间=${starttime}&结束时间=${endtime}`
|
||||
// Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -25,3 +25,15 @@ export function searchTable(check, supplierNameValue, check1, partNumber, check2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 导出
|
||||
export function searchTablesheet(check, supplierNameValue, check1, partNumber, check2, MaterialsValue, pageSize, pageCurrent) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_外购备料_综合查询数据',
|
||||
param: '供应商流水号_check=' + check + '&供应商流水号=' + supplierNameValue + '&零件图号_check=' + check1 + '&零件图号=' + partNumber + '&备料状态_check=' + check2 + '&备料状态=' + MaterialsValue
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,8 +17,9 @@ export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoic
|
||||
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
|
||||
export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx`
|
||||
export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx`
|
||||
export const url = `http://192.168.0.100:8074/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
|
||||
export const ExcelDownLoad = 'http://192.168.0.100:8074/submit/downloadFile.ashx' // 导出excel
|
||||
export const url = `http://192.168.1.188:8045/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
|
||||
export const ExcelDownLoad = 'http://192.168.1.188:8045/submit/downloadFile.ashx' // 导出excel
|
||||
export const ExcelWaiGou = 'http://192.168.1.167:8045/submit/excel.ashx' // 导出excel
|
||||
// 技术中心程序发布时要更改下面所有的IP到0段
|
||||
export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
|
||||
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||
@@ -26,12 +27,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
|
||||
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||
const service = axios.create({
|
||||
<<<<<<< HEAD
|
||||
|
||||
baseURL: `http://192.168.0.100:8074/submit/MESCommonBase.ashx`,
|
||||
=======
|
||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
>>>>>>> 4fb54f4d3ea13e7c327b17bde7ac4ffc21b9b821
|
||||
baseURL: `http://localhost:8045/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
export default service
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin: 3px 0;width: 130px" clearable @change="machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">组号:</span>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" style="width: 130px" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!--<span>机床编号:</span>-->
|
||||
<!--<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin: 3px 0;width: 130px" clearable @change="machineChange()">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in machineNumber"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--<div style="float: left">{{ item.label }}</div>-->
|
||||
<!--<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<!--<span style="margin-left: 10px">组号:</span>-->
|
||||
<!--<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" style="width: 130px" clearable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in groupNumber"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<span style="margin-left: 10px">零件图号:</span>
|
||||
<el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 130px" size="small" clearable/>
|
||||
<el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 150px" size="small" clearable/>
|
||||
<span class="demonstration" style="margin-left: 10px">时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
@@ -45,30 +45,30 @@
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 3px" height="550px">
|
||||
<el-table-column label="项目名称" prop="项目名称" align="center">
|
||||
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 840px;margin-top: 3px" height="550px">
|
||||
<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">
|
||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="225" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center">
|
||||
<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">
|
||||
<el-table-column label="出库时间" prop="出库时间" align="center" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
{{ scope.row.出库时间 | formatTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="项目名称" @change="typeChange()">
|
||||
<el-select v-model="projectValue" filterable clearable size="small" style="margin-right:10px;width: 180px" placeholder="项目名称" @change="typeChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
@@ -10,13 +10,27 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床名称</span>
|
||||
<el-select v-model="machineValue" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="机床名称">
|
||||
<el-select v-model="machineValue" clearable filterable size="small" style="margin-right:10px;width: 150px" placeholder="机床名称">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>分组</span>
|
||||
<el-select v-model="partValue" clearable filterable size="small" style="margin-right:10px;width: 80px" placeholder="分组">
|
||||
<el-option
|
||||
v-for="item in part"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>规格及型号</span>
|
||||
<el-input v-model="specificationValue" clearable size="small" style="margin-right:10px;width: 150px" placeholder="规格型号"/>
|
||||
<span>加工总工时(小时):</span>
|
||||
<el-input v-model="totalProcessingHours" clearable size="small" style="margin-right:10px;width: 100px"/>
|
||||
<span>计划总工时(小时):</span>
|
||||
<el-input v-model="totalPlannedHours" clearable size="small" style="margin-right:10px;width: 100px"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -29,7 +43,12 @@ export default {
|
||||
project: [],
|
||||
projectValue: '', // 项目名称
|
||||
machineValue: '', // 机床名称
|
||||
machine: []
|
||||
machine: [],
|
||||
part: [], // 分組
|
||||
partValue: '',
|
||||
specificationValue: '', // 规格型号
|
||||
totalProcessingHours: '', // 加工总工时
|
||||
totalPlannedHours: '' // 计划总工时
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -18,47 +18,63 @@
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打印备料单" placement="top">
|
||||
<el-button type="primary" size="small" icon="el-icon-printer" style="margin-left:10px" @click="exportTable('BL')">打印自家备料单</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="导出备料分配单" placement="top">
|
||||
<el-button type="warning" class="el-icon-download" size="small" style="margin: 10px 0 0 140px" @click="exportExcel">导出</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="760" style="width: 100%;margin: 3px 0" size="mini" border stripe highlight-current-row element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
height="760"
|
||||
style="width: 1126px; margin: 3px 0"
|
||||
size="mini"
|
||||
border
|
||||
stripe
|
||||
sortable
|
||||
highlight-current-row
|
||||
element-loading-text="拼命加载中"
|
||||
@sort-change="sortChange"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
width="50"
|
||||
align="center"/>
|
||||
<el-table-column label="打印状态" prop="备料打印" align="center">
|
||||
<el-table-column label="备料分配" prop="备料分配" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="mini">已导出</el-tag>
|
||||
<el-tag v-else type="warning" size="mini">未导出</el-tag>
|
||||
<el-tag v-if="scope.row.备料打印 ==='1' && scope.row.是否外购备料==='0'" type="success" size="mini">自家</el-tag>
|
||||
<el-tag v-if="scope.row.备料打印 ==='0' && scope.row.是否外购备料==='1'" type="success" size="mini">外购</el-tag>
|
||||
<el-tag v-if="scope.row.备料打印 ==='0' && scope.row.是否外购备料==='0'" type="warning" size="mini">未分配</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" >
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="280" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" >
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="180" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" >
|
||||
<el-table-column label="数量" align="center" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" >
|
||||
<el-table-column label="材料" align="center" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" align="center" >
|
||||
<el-table-column label="重量" align="center" width="60" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备料" align="center">
|
||||
<el-table-column label="工艺要求" align="center" width="300" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
@@ -114,7 +130,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, edit, edit2 } from '@/api/ManufacturingCenter/CreatePreparationBill'
|
||||
import { searchtable, searchtable2, edit, edit2, getExport } from '@/api/ManufacturingCenter/CreatePreparationBill'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
@@ -129,13 +145,31 @@ export default {
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 30, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
pageCurrent: 1, // 后台获取页
|
||||
ordername: '',
|
||||
order: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
sortChange(column, prop, order) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
this.ordername = column.prop
|
||||
if (column.ordername === '零件名称') {
|
||||
this.ordername = 1
|
||||
} else if (column.ordername === '零件图号') { this.ordername = 2 } else {
|
||||
this.ordername = ''
|
||||
}
|
||||
|
||||
if (column.order === 'ascending') {
|
||||
this.order = 1
|
||||
} else if (column.order === 'descending') { this.order = 2 } else {
|
||||
this.order = ''
|
||||
}
|
||||
this.searchTable()
|
||||
},
|
||||
exportTable() {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('暂无数据')
|
||||
@@ -160,7 +194,8 @@ export default {
|
||||
} else {
|
||||
this.partNamecheck = false
|
||||
}
|
||||
searchtable(this.partNamecheck, this.partName, !this.all, 0, this.pageCurrent, this.pageSize).then(response => {
|
||||
searchtable(this.partNamecheck, this.partName, !this.all, 0, this.pageCurrent, this.pageSize, this.ordername, this.order).then(response => {
|
||||
console.log(response)
|
||||
if (response.data.total === 0) {
|
||||
this.loading = false
|
||||
} else {
|
||||
@@ -178,6 +213,7 @@ export default {
|
||||
零件名称: this.Data[i].零件名称,
|
||||
零件图号: this.Data[i].零件图号,
|
||||
备料打印: this.Data[i].备料打印,
|
||||
是否外购备料: this.Data[i].是否外购备料,
|
||||
工艺要求: response.data[0].工艺要求,
|
||||
材料: this.Data[i].材料,
|
||||
重量: this.Data[i].重量,
|
||||
@@ -242,9 +278,37 @@ export default {
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.partName !== '' && this.partName !== null) {
|
||||
this.partNamecheck = true
|
||||
} else {
|
||||
this.partNamecheck = false
|
||||
}
|
||||
getExport(this.partNamecheck, this.partName, !this.all, 0).then(res => {
|
||||
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'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-select>
|
||||
<el-input v-model="Partpaint" placeholder="零件号" clearable size="small" style="width: 180px;margin:0px 10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 50;getTableData()">查询</el-button>
|
||||
<el-button :disabled="Name===1" type="success" class="el-icon-search" size="small" style="margin-left: 220px;" @click="submit">完成</el-button>
|
||||
<el-button :disabled="Name===1" type="success" class="el-icon-finished" size="small" style="margin-left: 220px;background-color: green" @click="submit">完成</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-card style="width: 50%; float: left">
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="日期" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 }}
|
||||
{{ scope.row.操作时间.substr(0,10) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划准结工时" width="100px">
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<div style="margin-top: 15px;">
|
||||
<el-table :data="tableData4" border stripe style="width: 200px; text-align: center;display: inline-block;vertical-align: top;" size="mini" highlight-current-row @row-click="handleChange1">
|
||||
<el-table :data="tableData4" border style="width: 200px; text-align: center;display: inline-block;vertical-align: top;" size="mini" highlight-current-row @row-click="handleChange1">
|
||||
<el-table-column label="部门" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部门名称 }}
|
||||
@@ -517,40 +517,40 @@
|
||||
</el-dialog>
|
||||
|
||||
<!--客户选择-->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="800px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="400px">
|
||||
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize1 = 30;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" stripe border show-overflow-tooltip style="height: 330px; margin-top: 10px" size="mini" @row-click="handleCustomerChange">
|
||||
<el-table-column label="省份" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.省份 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" stripe border show-overflow-tooltip style="height: 350px; margin-top: 10px" size="mini" @row-click="handleCustomerChange">
|
||||
<!-- <el-table-column label="省份" align="center" width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.省份 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="客户名称" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="联系人" align="center" width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.联系人 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="联系电话" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.电话 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSize1"
|
||||
:total="total1"
|
||||
style="margin-top: 10px"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="PageCurrent1"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40]"-->
|
||||
<!-- :page-size="PageSize1"-->
|
||||
<!-- :total="total1"-->
|
||||
<!-- style="margin-top: 10px"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange1"-->
|
||||
<!-- @current-change="handleCurrentChange1"/>-->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="offCustomerChange">取消</el-button>
|
||||
<el-button type="primary" @click="getCustomerCode">确 定</el-button>
|
||||
@@ -659,7 +659,7 @@ export default {
|
||||
PageSize: 30,
|
||||
total: null,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 30,
|
||||
PageSize1: 100000,
|
||||
total1: null,
|
||||
infoDisable: true,
|
||||
hetongID: '',
|
||||
|
||||
@@ -16,27 +16,27 @@
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" prop="组号" width="65" align="center">
|
||||
<el-table-column label="组号" prop="组号" width="55" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" min-width="120" align="center">
|
||||
<el-table-column label="零件图号" prop="零件图号" min-width="120" width="155" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" width="100" align="center">
|
||||
<el-table-column label="零件名称" prop="零件名称" width="110" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" width="50" align="center">
|
||||
<el-table-column label="数量" width="45" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" prop="材料" width="85" align="center">
|
||||
<el-table-column label="材料" prop="材料" width="85" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<el-card style="margin-left: 10px;width: 62.3%;float: left">
|
||||
<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="margin: 3px 0;width: 155px" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()"/>-->
|
||||
<el-select v-model="supplierName0" placeholder="供应商" size="small" filterable clearable @change="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">
|
||||
<el-option
|
||||
v-for="item in supplierName0s"
|
||||
@@ -65,20 +65,34 @@
|
||||
: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: 300px;margin: 3px 0"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>-->
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">-->
|
||||
<!--<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="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable2">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
|
||||
</el-tooltip>
|
||||
<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-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 50px" @click="saveMateriel">保存</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="200px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="75" fixed="left">
|
||||
<el-table-column label="备料状态" prop="采购计划状态" align="center" width="75" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</el-tag>
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</el-tag>
|
||||
@@ -86,22 +100,22 @@
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购计划单号" prop="采购单号" align="center" width="140">
|
||||
<el-table-column label="外购备料单号" prop="采购单号" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购计划单名称" prop="采购单名称" align="center" width="130">
|
||||
<el-table-column label="采购计划单名称" prop="采购单名称" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" show-overflow-tooltip>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" prop="姓名" align="center" width="70">
|
||||
<el-table-column label="采购员" prop="姓名" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
@@ -111,8 +125,13 @@
|
||||
{{ scope.row.计划完成日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="330" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="导出" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button size="mini" type="success" plain icon="el-icon-download" @click="exportExcel2(scope.row)">导出</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打印" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印</el-button>
|
||||
@@ -131,26 +150,26 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="display:inline-block;width:40%;float: right"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
<!--<div class="block">-->
|
||||
<!--<el-pagination-->
|
||||
<!--:current-page="pageCurrent2"-->
|
||||
<!--:page-sizes="[10, 20, 30, 40]"-->
|
||||
<!--:page-size="pageSize2"-->
|
||||
<!--:total="total2"-->
|
||||
<!--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-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" height="455px" size="mini">
|
||||
<el-table-column label="采购状态" align="center" width="80">
|
||||
<el-table-column label="备料状态" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="140">
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
@@ -185,11 +204,11 @@
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:100%" @change="saveRemarks(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="110px" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="90px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="物料移出" placement="top">
|
||||
<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="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">移出</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -312,6 +331,35 @@ export default {
|
||||
name: '', // 采购计划
|
||||
data() {
|
||||
return {
|
||||
dateRange: '',
|
||||
checktime: '',
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '上季度',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '过去半年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '过去一年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}]
|
||||
},
|
||||
RawMaterialGroup: [],
|
||||
RawMaterialName: '',
|
||||
tableData: [],
|
||||
@@ -392,6 +440,7 @@ export default {
|
||||
Remarks: [], // 备注组
|
||||
tableData4: [], // 合同模板
|
||||
采购计划状态: '',
|
||||
采购计划状态2: '',
|
||||
paramRow: '' // 参数row
|
||||
}
|
||||
},
|
||||
@@ -406,7 +455,7 @@ export default {
|
||||
created() {
|
||||
this.searchRawMaterial()
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
// this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
// 获取原材料
|
||||
@@ -525,9 +574,10 @@ export default {
|
||||
searchTable2() { // 查询采购单列表
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, 0, 0, this.check4, this.supplierName0).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
this.dateRange ? this.checktime = 1 : (this.checktime = 0, this.dateRange = '')
|
||||
searchPurchaseOrder(this.check3, this.purchasingOrder, 0, 0, this.check4, this.supplierName0, this.checktime, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.tableData2 = response.data
|
||||
// this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) { // 采购单列表分页
|
||||
@@ -614,6 +664,34 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
exportExcel2(row) {
|
||||
this.searchTable3(row).then(val => {
|
||||
console.log(val)
|
||||
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: '详情',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('没有导出内容')
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable3(row) { // 查询采购计划明细
|
||||
this.purchasingOrderNumber = row.采购计划流水号
|
||||
this.采购单名称 = row.采购单名称
|
||||
@@ -627,8 +705,8 @@ export default {
|
||||
})
|
||||
searchMateriel1(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
console.log(response.data)
|
||||
})
|
||||
return Promise.resolve(/* 这里是需要返回的数据*/)
|
||||
},
|
||||
addMateriel() { // 将材料选入请购单
|
||||
if (!this.purchasingOrderNumber) {
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</el-card>
|
||||
<el-card style="width: 54%;float: left;margin-left: 10px">
|
||||
<span>到货单明细</span>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData5"
|
||||
@@ -96,7 +97,7 @@
|
||||
size="mini"
|
||||
@row-click="searchTable6">
|
||||
<el-table-column width="60" align="center" type="index" label="序号"/>
|
||||
<el-table-column label="材料" prop="材料" align="center" width="200">
|
||||
<el-table-column label="材料" prop="材料" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
@@ -495,15 +496,15 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5,
|
||||
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import { ExcelWaiGou } from '@/utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
excle_row: [],
|
||||
supplierNameValue: '',
|
||||
supplierName: [], // 供应商
|
||||
partNumber: '',
|
||||
@@ -908,6 +909,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable5(row) {
|
||||
this.excle_row = row
|
||||
console.log(this.userId, this.id)
|
||||
this.disable = row.是否关联
|
||||
console.log(this.disable)
|
||||
@@ -1121,9 +1123,57 @@ export default {
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
downloadExcel() {
|
||||
const _ExcelWaiGou = ExcelWaiGou
|
||||
this.download(`${_ExcelWaiGou}?type=Excel_NewArrivalList&folename=外购单&rec1=${this.excle_row.到货单流水号}&rec2=${this.excle_row.到货单流水号}&rec3=${this.excle_row.到货单流水号}&rec4=${this.excle_row.到货单流水号}`)
|
||||
},
|
||||
/**
|
||||
* 下载
|
||||
* @param {String} url 目标文件地址
|
||||
* @param {String} filename 想要保存的文件名称
|
||||
*/
|
||||
download(url) {
|
||||
this.getBlob(url, function(blob, filename) {
|
||||
saveAs(blob, filename)
|
||||
})
|
||||
},
|
||||
getBlob(url, cb) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open('GET', url, true)
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = function() {
|
||||
if (xhr.status === 200) {
|
||||
console.log(xhr, 1111)
|
||||
const name = xhr.getResponseHeader('content-disposition').split('=')[1]
|
||||
cb(xhr.response, name)
|
||||
}
|
||||
}
|
||||
xhr.send()
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 保存
|
||||
* @param {Blob} blob
|
||||
* @param {String} filename 想要保存的文件名称
|
||||
*/
|
||||
function saveAs(blob, filename = '下载文件.xls') {
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
navigator.msSaveBlob(blob, filename)
|
||||
} else {
|
||||
var link = document.createElement('a')
|
||||
var body = document.querySelector('body')
|
||||
link.href = window.URL.createObjectURL(blob)
|
||||
link.download = filename
|
||||
// fix Firefox
|
||||
link.style.display = 'none'
|
||||
body.appendChild(link)
|
||||
link.click()
|
||||
body.removeChild(link)
|
||||
window.URL.revokeObjectURL(link.href)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -13,7 +13,19 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span v-show="false" class="demonstration">时间段:</span>
|
||||
<span v-show="true" class="demonstration">时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 300px;margin: 3px 0"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-date-picker
|
||||
v-show="false"
|
||||
v-model="startTime"
|
||||
@@ -34,7 +46,7 @@
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()">查询</el-button>
|
||||
</el-tooltip>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">新增发票</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">新增到票</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="width: 58%;float: left">
|
||||
@@ -252,6 +264,34 @@ export default {
|
||||
name: '', // 发票交接单
|
||||
data() {
|
||||
return {
|
||||
dateRange: '',
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '上季度',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '过去半年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '过去一年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}]
|
||||
},
|
||||
gongyingshangValue: '',
|
||||
gongyingshang: [],
|
||||
startTime: '',
|
||||
@@ -332,8 +372,9 @@ export default {
|
||||
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName0 ? this.check2 = 1 : this.check2 = 0
|
||||
this.gongyingshangValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.startTime && this.endTime ? this.check4 = 1 : this.check4 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.supplierName0, this.check3, this.gongyingshangValue, this.check4, this.startTime, this.endTime).then(response => {
|
||||
this.dateRange ? this.check4 = 1 : (this.check4 = 0, this.dateRange = '')
|
||||
// this.startTime && this.endTime ? this.check4 = 1 : this.check4 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.supplierName0, this.check3, this.gongyingshangValue, this.check4, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].开票金额 = parseInt(response.data.rows[j].开票金额 * 100) / 100
|
||||
if (response.data.rows[j].开票时间 !== null) {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<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>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 72%">
|
||||
@@ -116,7 +117,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchTable } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
|
||||
import { searchSupplier, searchTable, searchTablesheet } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
@@ -147,6 +148,37 @@ export default {
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
exportExcel() {
|
||||
let check, check1, check2
|
||||
this.supplierNameValue ? check = 1 : check = 0
|
||||
this.partNumber ? check1 = 1 : check1 = 0
|
||||
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
|
||||
check2 = 1
|
||||
} else {
|
||||
check2 = 0
|
||||
}
|
||||
searchTablesheet(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue).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() {
|
||||
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
|
||||
@@ -1,35 +1,34 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>请款时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 300px;margin: 3px 0"
|
||||
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="供应商" size="small" clearable/>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top">
|
||||
<el-button
|
||||
type="success"
|
||||
<el-card style="margin-left: 0px;width: 68%;float: left">
|
||||
<el-col>
|
||||
<span>请款时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
|
||||
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||
</el-tooltip>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 300px;margin: 3px 0"
|
||||
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="供应商" size="small" clearable/>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
|
||||
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData1"
|
||||
@@ -37,81 +36,80 @@
|
||||
:expand-row-keys="expands"
|
||||
border
|
||||
stripe
|
||||
highlight-current-row
|
||||
style="margin-top: 3px;"
|
||||
height="600px"
|
||||
size="mini"
|
||||
show-summary
|
||||
@expand-change="searchTable02">
|
||||
<el-table-column type="expand" label="详情">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="gridData" class="subTableHeader" stripe size="mini" show-summary style="width: 40%">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="发票号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="150" align="center" label="供应商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="150" align="center" label="开票金额" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="250" show-overflow-tooltip>
|
||||
highlight-current-row
|
||||
@row-click="searchTable02">
|
||||
<!--@expand-change="searchTable02"-->
|
||||
<!--<el-table-column type="expand" label="详情">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-table :data="gridData" class="subTableHeader" stripe size="mini" show-summary style="width: 40%">-->
|
||||
<!--<el-table-column width="50" align="center" type="index" label="序号"/>-->
|
||||
<!--<el-table-column min-width="150" align="center" label="发票号">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.发票号 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column min-width="150" align="center" label="供应商">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.供应商名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column min-width="150" align="center" label="开票金额" prop="开票金额">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.开票金额 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="180" width="350" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<el-table-column label="请款时间" align="center" min-width="90" width="90" prop="date">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间 | formatTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="80">
|
||||
<el-table-column label="请款人" align="center" min-width="80" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="90" width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" align="center">
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="mini">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="mini">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="mini">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="mini">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="mini">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="mini">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="mini">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="mini">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip effect="dark" content="取消请款" placement="top">
|
||||
<div style="display: inline-block">
|
||||
@@ -133,8 +131,29 @@
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="采购计划请款" center style="min-height: 300px" width="800px">
|
||||
<el-card style="margin-left: 0px;width: 31%;float: left">
|
||||
<el-table-column type="expand" label="详情">
|
||||
<el-table :data="gridData" class="subTableHeader" stripe size="mini" show-summary style="width: 100%">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="发票号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="150" align="center" label="供应商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="150" align="center" label="开票金额" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-table-column>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="pageCurrent1=1;pageSize1=10;total1=0;searchTable01()">
|
||||
<el-option
|
||||
@@ -150,7 +169,7 @@
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="250">
|
||||
<el-table-column label="供应商" align="center" min-width="250" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -160,6 +179,11 @@
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开票时间" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 | formatTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">提交请款审批</el-button>
|
||||
@@ -237,6 +261,14 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
// dateFormat(row, column) {
|
||||
// var date = row[column.property]
|
||||
// console.log(date)
|
||||
// if (date === undefined) {
|
||||
// return ''
|
||||
// }
|
||||
// return util.formatDate.format(new Date(date), 'yyyy-MM-dd')
|
||||
// },
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchOfflineContract().then(response => {
|
||||
@@ -304,23 +336,25 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
if (this.a === 1) {
|
||||
this.expands.push(row.采购计划请款流水号)
|
||||
this.b = row.采购计划请款流水号
|
||||
this.a = 0
|
||||
} else {
|
||||
if (this.b === row.采购计划请款流水号) {
|
||||
this.expands = []
|
||||
this.a = 1
|
||||
} else {
|
||||
this.expands = []
|
||||
this.expands.push(row.采购计划请款流水号)
|
||||
this.a = 0
|
||||
this.b = row.采购计划请款流水号
|
||||
}
|
||||
}
|
||||
console.log(row, 1111)
|
||||
// if (this.a === 1) {
|
||||
// this.expands.push(row.采购计划请款流水号)
|
||||
// this.b = row.采购计划请款流水号
|
||||
// this.a = 0
|
||||
// } else {
|
||||
// if (this.b === row.采购计划请款流水号) {
|
||||
// this.expands = []
|
||||
// this.a = 1
|
||||
// } else {
|
||||
// this.expands = []
|
||||
// this.expands.push(row.采购计划请款流水号)
|
||||
// this.a = 0
|
||||
// this.b = row.采购计划请款流水号
|
||||
// }
|
||||
// }
|
||||
searchRequsetFundDetail(row.采购计划请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
console.log(response.data, 2222)
|
||||
})
|
||||
},
|
||||
getRowKeys(row) {
|
||||
|
||||
Reference in New Issue
Block a user