更新
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div ref="height1" style="width:100%;height: 300px; overflow:auto;">
|
||||
<el-divider content-position="right">
|
||||
<el-button type="text" @click="searchUnInquiryPartNumber">刷新</el-button> | 待询价零件数
|
||||
</el-divider>
|
||||
<div ref="height1" style="width:100%;height: 180px; overflow:auto;">
|
||||
<!--<el-divider content-position="right">-->
|
||||
<!--<el-button type="text" @click="searchUnInquiryPartNumber">刷新</el-button> | 待询价零件数-->
|
||||
<!--</el-divider>-->
|
||||
<el-row>
|
||||
<el-col v-for="(machine,index) in machines1" :key="index" style="width: 200px">
|
||||
<el-card shadow="hover" class="sudoku_item" style="height:50px;width: 90%" @click.native="clickCard1(machine.项目流水号, machine.机床流水号)">
|
||||
@@ -128,28 +128,6 @@
|
||||
<!--<span v-if="purchased(scope.row)">已采购</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--供货商排序-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供应商" align="center" min-width="100" prop="供货商" sortable="custom" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--机床图号排序-->
|
||||
<el-table-column label="机床图号" align="center" width="120" prop="机床图号" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--物料名称排序-->
|
||||
<el-table-column label="名称" align="center" width="120" prop="物料名称" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
@@ -167,16 +145,28 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--供货商排序-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" sortable="custom" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--机床图号排序-->
|
||||
<el-table-column label="机床图号" align="center" width="120" prop="机床图号" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配数" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待询价数" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.货位存量 ? scope.row.货位存量 : 0) - scope.row.占用数量 }}
|
||||
@@ -190,6 +180,11 @@
|
||||
<el-input-number v-else v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 130px" @change="changeNumber(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待询价数" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已用滞货" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.使用滞货数量) }}
|
||||
@@ -213,6 +208,11 @@
|
||||
{{ Number(scope.row.滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配时间" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务分配时间.split(' ')[0] }}
|
||||
@@ -300,7 +300,7 @@
|
||||
<!--</el-select>-->
|
||||
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable12()">查询</el-button>
|
||||
<el-button type="search" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
|
||||
<el-button type="search" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportUninquirySheet1">导出未询价单</el-button>
|
||||
|
||||
<el-button type="primary" size="small" plain style="float: right; margin: 0px 20px 0px 0px" @click="visible2 = false;tiaozheng2()">调整采购任务</el-button>
|
||||
<el-select v-model="PersonValue" style="width:100px;float: right;" placeholder="人员" size="small" filterable clearable>
|
||||
@@ -352,21 +352,6 @@
|
||||
<!--<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供应商" align="center" min-width="100" prop="供货商" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" min-width="130" prop="零件图号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
@@ -377,11 +362,21 @@
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目名称" align="center" min-width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.项目名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="图号" align="center" min-width="130" prop="零件图号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="130" prop="机床图号" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
@@ -392,16 +387,21 @@
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目名称" align="center" min-width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.项目名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="分配时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务分配时间.split(' ')[0] }}
|
||||
@@ -1121,8 +1121,8 @@
|
||||
<script>
|
||||
import { tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
||||
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge, changeNum } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
import { json2excel } from '@/utils/setMethods.js'
|
||||
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, searchMerge, changeNum } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
// import { json2excel } from '@/utils/setMethods.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
import $ from 'jquery'
|
||||
@@ -1557,7 +1557,7 @@ export default {
|
||||
where 采购管理_采购合同_采购部.是否未通过 = 0
|
||||
) as 通过的合同 on 通过的合同.组件零件流水号 = MRP_计划订单_组件零件清单_标准件和外购件_视图.组件零件流水号
|
||||
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
|
||||
where 询价状态编号 = 1 and 采购状态编号 = 1
|
||||
where 询价状态编号 = 1 and 采购状态编号 = 1 and 是否查看 = 1
|
||||
and 人员编号 = ${this.id}
|
||||
group by 项目流水号,机床流水号,机床图号,人员编号
|
||||
union all
|
||||
@@ -1569,7 +1569,7 @@ export default {
|
||||
where 采购管理_采购合同_采购部.是否未通过 = 0
|
||||
) as 通过的合同 on 通过的合同.组件零件基本件流水号 = MRP_计划订单_组件零件清单_基本件_视图.组件零件基本件流水号
|
||||
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
|
||||
where 询价状态编号 = 1 and 采购状态编号 = 1
|
||||
where 询价状态编号 = 1 and 采购状态编号 = 1 and 是否查看 = 1
|
||||
and 人员编号 = ${this.id}
|
||||
group by 项目流水号,机床流水号,机床图号,人员编号
|
||||
) as table1
|
||||
@@ -1642,79 +1642,112 @@ export default {
|
||||
},
|
||||
// 导出未询价外购件和标准件/基本件清单
|
||||
exportUninquirySheet() {
|
||||
getExport1(this.id).then(res1 => { // 标准件和外购件
|
||||
getExport2(this.id).then(res2 => { // 基本件
|
||||
res1.data.map(v => {
|
||||
v.任务分配时间 = v.任务分配时间.split(' ')[0]
|
||||
v.供货商 = v.供货商 ? v.供货商 : ''
|
||||
v.备注 = v.备注 ? v.备注 : ''
|
||||
})
|
||||
res2.data.map(v => {
|
||||
v.任务分配时间 = v.任务分配时间.split(' ')[0]
|
||||
v.供货商 = v.供货商 ? v.供货商 : ''
|
||||
v.备注 = v.备注 ? v.备注 : ''
|
||||
})
|
||||
var excelDatas = []
|
||||
const dataGroup = []
|
||||
const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
dataGroup.push(data1)
|
||||
const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
dataGroup.push(data2)
|
||||
// const data3 = this.formatJson(filterVal1, data1)
|
||||
// dataGroup.push(data3)
|
||||
// const data4 = this.formatJson(filterVal1, data2)
|
||||
// dataGroup.push(data4)
|
||||
// console.log(dataGroup, 4444)
|
||||
const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
// const headerGroup = ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商']
|
||||
const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
console.log(dataGroup)
|
||||
excelDatas.push({
|
||||
tHeader: headerGroup[0],
|
||||
filterVal: filterVal1,
|
||||
tableDatas: res1.data,
|
||||
sheetName: sheetGroup[0]
|
||||
},
|
||||
{
|
||||
tHeader: headerGroup[1],
|
||||
filterVal: filterVal2,
|
||||
tableDatas: res2.data,
|
||||
sheetName: sheetGroup[1]
|
||||
})
|
||||
console.log(excelDatas)
|
||||
json2excel(excelDatas, '未询价采购件明细', true, 'xlsx')
|
||||
// import('./Export2Excel').then(excel => {
|
||||
// const dataGroup = []
|
||||
// const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
// const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
// const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
// dataGroup.push(data1)
|
||||
// const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
// dataGroup.push(data2)
|
||||
// // const data3 = this.formatJson(filterVal1, data1)
|
||||
// // dataGroup.push(data3)
|
||||
// // const data4 = this.formatJson(filterVal1, data2)
|
||||
// // dataGroup.push(data4)
|
||||
// // console.log(dataGroup, 4444)
|
||||
// const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
// // const headerGroup = ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商']
|
||||
//
|
||||
// const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
// console.log(headerGroup, dataGroup, sheetGroup)
|
||||
// excel.export_json_to_excel2({
|
||||
// header: headerGroup,
|
||||
// data: dataGroup,
|
||||
// sheetname: sheetGroup,
|
||||
// filename: '未询价采购件明细',
|
||||
// autoWidth: true,
|
||||
// bookType: 'xlsx'
|
||||
// })
|
||||
// })
|
||||
})
|
||||
})
|
||||
let check1, check2, check3, check4, check5, check6, check7, check8
|
||||
this.materialName ? check1 = 1 : check1 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
this.projectValue ? check4 = 0 : check4 = 0
|
||||
this.machineValue ? check5 = 1 : check5 = 0
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
|
||||
this.supplierName ? check8 = 1 : check8 = 0
|
||||
var param = []
|
||||
param[0] = ['物料状态编号', 3]
|
||||
param[1] = ['物料名称_check', check1]
|
||||
param[2] = ['物料名称', this.materialName]
|
||||
param[3] = ['物料规格_check', check2]
|
||||
param[4] = ['物料规格', this.materialSpec]
|
||||
param[5] = ['物料型号_check', check3]
|
||||
param[6] = ['物料型号', this.materialModel]
|
||||
param[7] = ['人员编号', this.id]
|
||||
param[8] = ['项目流水号_check', check4]
|
||||
param[9] = ['项目流水号', this.projectValue]
|
||||
param[10] = ['机床流水号_check', check5]
|
||||
param[11] = ['机床流水号', this.machineValue]
|
||||
param[12] = ['组件流水号_check', check6]
|
||||
param[13] = ['组件流水号', this.groupValue]
|
||||
param[14] = ['时间_check', check7]
|
||||
param[15] = ['开始时间', this.startTime[0]]
|
||||
param[16] = ['结束时间', this.startTime[1]]
|
||||
param[17] = ['供货商_check', check8]
|
||||
param[18] = ['供货商', this.supplierName]
|
||||
var Data = this.CreateData('2001', '报表_采购管理_采购部采购_查询物料_分配后_带库存_创建询价单_分页', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
// exportUninquirySheet() {
|
||||
// getExport1(this.id).then(res1 => { // 标准件和外购件
|
||||
// getExport2(this.id).then(res2 => { // 基本件
|
||||
// res1.data.map(v => {
|
||||
// v.任务分配时间 = v.任务分配时间.split(' ')[0]
|
||||
// v.供货商 = v.供货商 ? v.供货商 : ''
|
||||
// v.备注 = v.备注 ? v.备注 : ''
|
||||
// })
|
||||
// res2.data.map(v => {
|
||||
// v.任务分配时间 = v.任务分配时间.split(' ')[0]
|
||||
// v.供货商 = v.供货商 ? v.供货商 : ''
|
||||
// v.备注 = v.备注 ? v.备注 : ''
|
||||
// })
|
||||
// var excelDatas = []
|
||||
// const dataGroup = []
|
||||
// const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
// const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
// const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
// dataGroup.push(data1)
|
||||
// const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
// dataGroup.push(data2)
|
||||
// // const data3 = this.formatJson(filterVal1, data1)
|
||||
// // dataGroup.push(data3)
|
||||
// // const data4 = this.formatJson(filterVal1, data2)
|
||||
// // dataGroup.push(data4)
|
||||
// // console.log(dataGroup, 4444)
|
||||
// const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
// // const headerGroup = ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商']
|
||||
// const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
// console.log(dataGroup)
|
||||
// excelDatas.push({
|
||||
// tHeader: headerGroup[0],
|
||||
// filterVal: filterVal1,
|
||||
// tableDatas: res1.data,
|
||||
// sheetName: sheetGroup[0]
|
||||
// },
|
||||
// {
|
||||
// tHeader: headerGroup[1],
|
||||
// filterVal: filterVal2,
|
||||
// tableDatas: res2.data,
|
||||
// sheetName: sheetGroup[1]
|
||||
// })
|
||||
// console.log(excelDatas)
|
||||
// json2excel(excelDatas, '未询价采购件明细', true, 'xlsx')
|
||||
// // import('./Export2Excel').then(excel => {
|
||||
// // const dataGroup = []
|
||||
// // const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
// // const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
// // const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
// // dataGroup.push(data1)
|
||||
// // const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
// // dataGroup.push(data2)
|
||||
// // // const data3 = this.formatJson(filterVal1, data1)
|
||||
// // // dataGroup.push(data3)
|
||||
// // // const data4 = this.formatJson(filterVal1, data2)
|
||||
// // // dataGroup.push(data4)
|
||||
// // // console.log(dataGroup, 4444)
|
||||
// // const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
// // // const headerGroup = ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商']
|
||||
// //
|
||||
// // const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
// // console.log(headerGroup, dataGroup, sheetGroup)
|
||||
// // excel.export_json_to_excel2({
|
||||
// // header: headerGroup,
|
||||
// // data: dataGroup,
|
||||
// // sheetname: sheetGroup,
|
||||
// // filename: '未询价采购件明细',
|
||||
// // autoWidth: true,
|
||||
// // bookType: 'xlsx'
|
||||
// // })
|
||||
// // })
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
// 询价单基础信息维护
|
||||
inquirySheetBaseInfoMaintain() {
|
||||
this.baseInfoLoading = true
|
||||
@@ -1894,6 +1927,39 @@ export default {
|
||||
this.pageCurrent11 = val
|
||||
this.searchTable11()
|
||||
},
|
||||
exportUninquirySheet1() { // 基本件导出
|
||||
let check1, check2, check3, check4, check5, check6, check7, check8
|
||||
this.partNum ? check1 = 1 : check1 = 0
|
||||
this.partName ? check2 = 1 : check2 = 0
|
||||
this.partSpec ? check3 = 1 : check3 = 0
|
||||
this.projectValue ? check4 = 0 : check4 = 0
|
||||
this.machineValue ? check5 = 1 : check5 = 0
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
|
||||
this.supplierName ? check8 = 1 : check8 = 0
|
||||
var param = []
|
||||
param[0] = ['物料状态编号', 3]
|
||||
param[1] = ['零件图号_check', check1]
|
||||
param[2] = ['零件图号', this.partNum]
|
||||
param[3] = ['零件名称_check', check2]
|
||||
param[4] = ['零件名称', this.partName]
|
||||
param[5] = ['零件规格_check', check3]
|
||||
param[6] = ['零件规格', this.partSpec]
|
||||
param[7] = ['人员编号', this.id]
|
||||
param[8] = ['项目流水号_check', check4]
|
||||
param[9] = ['项目流水号', this.projectValue]
|
||||
param[10] = ['机床流水号_check', check5]
|
||||
param[11] = ['机床流水号', this.machineValue]
|
||||
param[12] = ['组件流水号_check', check6]
|
||||
param[13] = ['组件流水号', this.groupValue]
|
||||
param[14] = ['时间_check', check7]
|
||||
param[15] = ['开始时间', this.endTime[0]]
|
||||
param[16] = ['结束时间', this.endTime[1]]
|
||||
param[17] = ['供货商_check', check8]
|
||||
param[18] = ['供货商', this.supplierName]
|
||||
var Data = this.CreateData('2001', '报表_采购管理_采购部采购_查询物料_基本件_分配后_创建询价单', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
searchTable12() { // 查询基本件列表
|
||||
this.loading2 = true
|
||||
let check1, check2, check3, check4, check5, check6, check7, check8
|
||||
@@ -1990,7 +2056,7 @@ export default {
|
||||
}
|
||||
this.title2 = '创建询价单'
|
||||
getBillNum().then(response => { // 查询询价单号
|
||||
this.form2.inquirySheetNum = response.data[0].单号
|
||||
this.form2.inquirySheetNum = 'CG' + response.data[0].单号
|
||||
this.form2.supplierValue = ''
|
||||
this.form2.supplierNameValue = ''
|
||||
this.form2.supplierName = ''
|
||||
|
||||
Reference in New Issue
Block a user