This commit is contained in:
liushuai
2020-05-07 18:18:07 +08:00
parent 29ea4df094
commit 6a042c61bc
11 changed files with 403 additions and 203 deletions

View File

@@ -30,7 +30,7 @@ export function searchGroup(num) {
}) })
} }
// 查询采购件入库记录 // 查询采购件入库记录
export function searchRecord1(check1, project, check2, machine, check3, group, check4, name, check5, spec, check6, model, check7, time1, time2, pageCurrent, pageSize) { export function searchRecord1(check1, project, check2, machine, check3, group, check4, name, check5, spec, check6, model, check7, time1, time2, check8, supplierValue, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -44,3 +44,17 @@ export function searchRecord1(check1, project, check2, machine, check3, group, c
} }
}) })
} }
// 查询供应商
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
}
})
}

View File

@@ -57,7 +57,7 @@ export function searchTable(machineNumberValue, check2, groupNumberValue, check3
} }
}) })
} }
export function searchPart(num) { export function searchPart(num, num1) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -66,7 +66,7 @@ export function searchPart(num) {
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '1', type: '1',
name: 'PDM_零件明细表_基本件_查询数据', name: 'PDM_零件明细表_基本件_查询数据',
param: '组件流水号=' + num param: '组件流水号=' + num + '&是否启用=' + num1
} }
}) })
} }
@@ -407,3 +407,16 @@ export function searchBillNumber(num) {
} }
}) })
} }
export function inPart(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '零件分配_解除禁用',
param: '基本件流水号=' + num
}
})
}

View File

@@ -112,22 +112,22 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="tableData01" border stripe highlight-current-row height="300" size="mini" style="margin-bottom: 10px" @row-click="selectMaterial"> <el-table :data="tableData01" border stripe highlight-current-row height="300" size="mini" style="margin-bottom: 10px" @row-click="selectMaterial">
<el-table-column label="名称" align="center" min-width="100"> <el-table-column label="名称" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100"> <el-table-column label="图号或型号" align="center" min-width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料型号 }} {{ scope.row.物料型号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" align="center" min-width="200"> <el-table-column label="规格" align="center" min-width="180" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料规格 }} {{ scope.row.物料规格 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供货商" align="center" min-width="100"> <el-table-column label="供货商" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供货商 }} {{ scope.row.供货商 }}
</template> </template>
@@ -144,7 +144,7 @@
@current-change="handleCurrentChange01"/> @current-change="handleCurrentChange01"/>
</div><hr> </div><hr>
<el-row> <el-row>
<el-col v-show="false" style="width: 210px"> <el-col v-show="false" style="width: 250px">
<span>仓库:</span> <span>仓库:</span>
<el-select v-model="inventoryNameValue" style="margin-bottom: 10px;" size="small" clearable @change="getLocate"> <el-select v-model="inventoryNameValue" style="margin-bottom: 10px;" size="small" clearable @change="getLocate">
<el-option <el-option
@@ -154,7 +154,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
</el-col> </el-col>
<el-col style="width: 210px"> <el-col style="width: 230px">
<span>货位:</span> <span>货位:</span>
<el-select v-model="locateNameValue" style="margin-bottom: 10px;" size="small" clearable> <el-select v-model="locateNameValue" style="margin-bottom: 10px;" size="small" clearable>
<el-option <el-option

View File

@@ -20,7 +20,8 @@
<el-button type="primary" size="small" style="margin-left: 10px" plain @click="searchContractDetail">查询明细</el-button> <el-button type="primary" size="small" style="margin-left: 10px" plain @click="searchContractDetail">查询明细</el-button>
</el-card> </el-card>
<el-card> <el-card>
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px"> <el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
<el-table-column label="合同编号" sortable prop="离线合同编号" width="120px" align="center" show-overflow-tooltip> <el-table-column label="合同编号" sortable prop="离线合同编号" width="120px" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.离线合同编号 }} {{ scope.row.离线合同编号 }}
@@ -52,6 +53,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div>
{{ totallength }}条信息,选择{{ length }}
</div>
<span v-show="false">仓库名称</span> <span v-show="false">仓库名称</span>
<el-select v-show="false" v-model="inventoryNumber" style="width: 200px" filterable size="small" placeholder="仓库名称" @change="getLocate"> <el-select v-show="false" v-model="inventoryNumber" style="width: 200px" filterable size="small" placeholder="仓库名称" @change="getLocate">
<el-option <el-option
@@ -99,7 +103,9 @@ export default {
inventoryNumber: '', // 仓库流水号 inventoryNumber: '', // 仓库流水号
inventoryName: [], // 仓库名称 inventoryName: [], // 仓库名称
locateNumber: '', locateNumber: '',
locateName: [] locateName: [],
totallength: 0,
length: 0
} }
}, },
mounted() { mounted() {
@@ -278,29 +284,32 @@ export default {
到货数量: v.到货数量, 到货数量: v.到货数量,
本次到货数量: v.本次到货数量 本次到货数量: v.本次到货数量
}) })
this.totallength = res.data.length
}) })
this.oldVal1 = '' this.oldVal1 = ''
}, },
// 多选 // 多选
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
console.log(val, 123) this.length = val.length
}, },
// 提交入库 // 提交入库
submitInStorage() { submitInStorage() {
if (!this.locateNumber) { if (this.multipleSelection.length === 0) {
this.$message.warning('请勾选入库物料')
} else if (!this.locateNumber) {
this.$message.warning('请选择货位或者扫码货位二维码') this.$message.warning('请选择货位或者扫码货位二维码')
} else { } else {
const materialGroup = [] const materialGroup = []
const BasicGroup = [] const BasicGroup = []
const numberGroup = [] const numberGroup = []
const partGroup = [] const partGroup = []
for (let i = 0; i < this.table1.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.table1[i].本次到货数量 !== 0) { if (this.multipleSelection[i].本次到货数量 !== 0) {
materialGroup.push(this.table1[i].物料流水号) materialGroup.push(this.multipleSelection[i].物料流水号)
BasicGroup.push(this.table1[i].组件零件基本件流水号) BasicGroup.push(this.multipleSelection[i].组件零件基本件流水号)
numberGroup.push(this.table1[i].本次到货数量) numberGroup.push(this.multipleSelection[i].本次到货数量)
partGroup.push(this.table1[i].离线合同明细流水号) partGroup.push(this.multipleSelection[i].离线合同明细流水号)
} }
} }
this.$confirm('确认入库?', '提示', { this.$confirm('确认入库?', '提示', {

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="width: 960px;margin: 0px 0px 5px 0px"> <el-card style="width: 1220px;margin: 0px 0px 5px 0px">
<el-row style="margin-bottom:10px;margin-top: 10px"> <el-row style="margin-bottom:10px;margin-top: 10px">
<el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 180px" @change="machineChange"> <el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 180px" @change="machineChange">
<el-option <el-option
@@ -19,7 +19,14 @@
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-input v-model="name" placeholder="名称图号规格入库人" style="width:165px;margin-left: 10px" clearable size="small" @keyup.enter.native="searchRecord()"/> <!--<el-select v-model="supplierValue" placeholder="选择供应商" filterable style="width: 220px" size="small" clearable>-->
<!--<el-option-->
<!--v-for="item in supplierValues"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<el-input v-model="name" placeholder="供货商/图号/规格型号" style="width:180px;margin-left: 10px" clearable size="small" @keyup.enter.native="searchRecord()"/>
<!--<el-input v-model="model" placeholder="图号或型号" style="width:150px;margin-left: 10px" clearable size="small" />--> <!--<el-input v-model="model" placeholder="图号或型号" style="width:150px;margin-left: 10px" clearable size="small" />-->
<!--<el-input v-model="spec" placeholder="规格" clearable size="small" style="width:150px;margin: 0px 10px" />--> <!--<el-input v-model="spec" placeholder="规格" clearable size="small" style="width:150px;margin: 0px 10px" />-->
<el-date-picker <el-date-picker
@@ -48,14 +55,29 @@
end-placeholder="结束时间"/> end-placeholder="结束时间"/>
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 960px"> <el-card style="width: 1220px">
<el-table :data="tableData1" border stripe size="mini" style="width: 100%;" height="700"> <el-table :data="tableData1" border stripe size="mini" style="width: 100%;" height="700">
<el-table-column label="名称" prop="名称" align="center" width="180" show-overflow-tooltip> <el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<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" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.名称 }} {{ scope.row.名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号或型号" prop="图号或型号" align="center" width="260" show-overflow-tooltip> <el-table-column label="图号或型号" prop="图号或型号" align="center" width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.图号或型号 }} {{ scope.row.图号或型号 }}
</template> </template>
@@ -97,7 +119,7 @@
</template> </template>
<script> <script>
import { initMachineProject, searchGroup, searchRecord1 } from '@/api/Inventory/PurchaseInRecord' import { initMachineProject, searchGroup, searchRecord1, searchSupplier } from '@/api/Inventory/PurchaseInRecord'
export default { export default {
name: 'PurchaseInRecord', name: 'PurchaseInRecord',
data() { data() {
@@ -114,7 +136,9 @@ export default {
tableData1: [], tableData1: [],
pageSize1: 40, pageSize1: 40,
pageCurrent1: 1, pageCurrent1: 1,
total1: 0 total1: 0,
supplierValues: [],
supplierValue: ''
} }
}, },
watch: { watch: {
@@ -124,11 +148,22 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
// this.searchSuppliers()
}, },
mounted() { mounted() {
this.searchRecord() this.searchRecord()
}, },
methods: { methods: {
searchSuppliers() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplierValues.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商名称
})
}
})
},
// EXCEL 导出 // EXCEL 导出
// 姜福壮 // 姜福壮
exportExcel() { exportExcel() {
@@ -191,7 +226,7 @@ export default {
this.searchRecord1() this.searchRecord1()
}, },
searchRecord1() { searchRecord1() {
let check1, check2, check3, check4, check5, check6, check7 let check1, check2, check3, check4, check5, check6, check7, check8
this.projectValue ? check1 = 1 : check1 = 0 this.projectValue ? check1 = 1 : check1 = 0
this.machineValue ? check2 = 1 : check2 = 0 this.machineValue ? check2 = 1 : check2 = 0
this.groupValue ? check3 = 1 : check3 = 0 this.groupValue ? check3 = 1 : check3 = 0
@@ -199,7 +234,8 @@ export default {
this.spec ? check5 = 1 : check5 = 0 this.spec ? check5 = 1 : check5 = 0
this.model ? check6 = 1 : check6 = 0 this.model ? check6 = 1 : check6 = 0
this.inTime ? check7 = 1 : (check7 = 0, this.inTime = '') this.inTime ? check7 = 1 : (check7 = 0, this.inTime = '')
searchRecord1(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.inTime[0], this.inTime[1], this.pageCurrent1, this.pageSize1).then(res => { this.supplierValue ? check8 = 1 : check8 = 0
searchRecord1(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.inTime[0], this.inTime[1], check8, this.supplierValue, this.pageCurrent1, this.pageSize1).then(res => {
this.tableData1 = res.data.rows this.tableData1 = res.data.rows
this.total1 = res.data.total this.total1 = res.data.total
}) })

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="width: 1000px;margin: 0px 0px 5px 0px"> <el-card style="width: 1410px;margin: 0px 0px 5px 0px">
<el-row style="margin-bottom:10px;margin-top: 10px"> <el-row style="margin-bottom:10px;margin-top: 10px">
<el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 180px" @change="machineChange"> <el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 180px" @change="machineChange">
<el-option <el-option
@@ -48,7 +48,7 @@
end-placeholder="结束时间"/> end-placeholder="结束时间"/>
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 1000px"> <el-card style="width: 1410px">
<el-table :data="tableData" border stripe size="mini" height="700"> <el-table :data="tableData" border stripe size="mini" height="700">
<el-table-column label="名称" align="center" width="180" show-overflow-tooltip> <el-table-column label="名称" align="center" width="180" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -85,6 +85,16 @@
{{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }} {{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<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="90">
<template slot-scope="scope">
{{ scope.row.退料时间 ? scope.row.退料时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;"> <div class="block" style="margin-top: 10px;">
<el-pagination <el-pagination

View File

@@ -56,6 +56,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div>{{ totallength }}条信息选择{{ length }}</div>
<span v-show="false">仓库名称</span> <span v-show="false">仓库名称</span>
<el-select v-show="false" v-model="inventoryNumber" style="width: 200px" filterable size="small" placeholder="仓库名称" @change="getLocate"> <el-select v-show="false" v-model="inventoryNumber" style="width: 200px" filterable size="small" placeholder="仓库名称" @change="getLocate">
<el-option <el-option
@@ -106,7 +107,9 @@ export default {
inventoryName: [], // 仓库名称 inventoryName: [], // 仓库名称
locateNumber: '', locateNumber: '',
locateName: [], locateName: [],
table1: [] table1: [],
length: 0,
totallength: 0
} }
}, },
created() { created() {
@@ -313,6 +316,7 @@ export default {
return v return v
}) })
this.table1 = res.data this.table1 = res.data
this.totallength = res.data.length
// res.data.map(v => { // res.data.map(v => {
// this.table1.push({ // this.table1.push({
// 合同编号: v.合同编号, // 合同编号: v.合同编号,
@@ -344,6 +348,7 @@ export default {
if (!res.data[i].物料型号) { res.data[i].物料型号 = '' } if (!res.data[i].物料型号) { res.data[i].物料型号 = '' }
} }
this.table1 = res.data this.table1 = res.data
this.totallength = res.data.length
} else if (this.TypeValue === 4) { } else if (this.TypeValue === 4) {
if (this.contractValue) { this.contractValue_check = 1 } else { this.contractValue_check = 0 } if (this.contractValue) { this.contractValue_check = 1 } else { this.contractValue_check = 0 }
const param = { const param = {
@@ -361,6 +366,7 @@ export default {
return v return v
}) })
this.table1 = res.data this.table1 = res.data
this.totallength = res.data.length
} }
}, },
// 合同类型变更 // 合同类型变更
@@ -375,6 +381,7 @@ export default {
// 多选 // 多选
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
this.length = val.length
}, },
// 明细可选 // 明细可选
selectable(row) { selectable(row) {

View File

@@ -19,14 +19,15 @@
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-checkbox v-model="checked" @change="searchTable">禁用件</el-checkbox>
<span style="margin-left: 20px;font-size: 14px;">任务下达时间:&nbsp;&nbsp;{{ DeliveryTime }}</span> <span style="margin-left: 20px;font-size: 14px;">任务下达时间:&nbsp;&nbsp;{{ DeliveryTime }}</span>
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>--> <!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>-->
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchPart()">查询1</el-button>--> <!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchPart()">查询1</el-button>-->
<el-badge :value="value1" :max="99" class="item"> <el-badge :value="value1" :max="99" class="item">
<el-button size="small" type="text" @click="PartCallbackInformation1">外购件和标准件打回信息</el-button> <el-button size="small" type="text" @click="PartCallbackInformation1;dialogFormVisible2 = true">外购件和标准件打回信息</el-button>
</el-badge> </el-badge>
<el-badge :value="value" :max="99" class="item"> <el-badge :value="value" :max="99" class="item">
<el-button size="small" type="text" @click="PartCallbackInformation">基本件打回信息</el-button> <el-button size="small" type="text" @click="PartCallbackInformation;dialogFormVisible1 = true">基本件打回信息</el-button>
</el-badge> </el-badge>
</el-row> </el-row>
</el-card> </el-card>
@@ -81,7 +82,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100px"> <el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-right" plain @click="OutParts(scope.row)">移出</el-button> <el-button v-if="checked" type="text" size="mini" icon="el-icon-right" plain @click="inParts(scope.row)">解除禁用</el-button>
<el-button v-else type="text" size="mini" icon="el-icon-right" plain @click="OutParts(scope.row)">移出</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -550,7 +552,7 @@
</template> </template>
<script> <script>
import { searchBillNumber, DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment' import { inPart, searchBillNumber, DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getNowShotTime } from '@/utils/tool' import { getNowShotTime } from '@/utils/tool'
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
@@ -649,7 +651,8 @@ export default {
dialogFormVisible1: false, dialogFormVisible1: false,
dialogFormVisible2: false, dialogFormVisible2: false,
dialogFormVisible3: false, dialogFormVisible3: false,
dialogFormVisible4: false dialogFormVisible4: false,
checked: false
} }
}, },
computed: { computed: {
@@ -678,6 +681,8 @@ export default {
created() { created() {
this.DeliveryTime = '' this.DeliveryTime = ''
this.fetchData() this.fetchData()
this.PartCallbackInformation()
this.PartCallbackInformation1()
}, },
methods: { methods: {
// EXCEL 导出 // EXCEL 导出
@@ -727,7 +732,6 @@ export default {
}, },
PartCallbackInformation() { PartCallbackInformation() {
let check, check1 let check, check1
this.dialogFormVisible1 = true
this.tableData9 = [] this.tableData9 = []
this.partNumber ? check = 1 : check = 0 this.partNumber ? check = 1 : check = 0
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '') this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
@@ -744,7 +748,6 @@ export default {
}) })
}, },
PartCallbackInformation1() { PartCallbackInformation1() {
this.dialogFormVisible2 = true
let check, check1 let check, check1
this.tableData10 = [] this.tableData10 = []
this.partNumber1 ? check = 1 : check = 0 this.partNumber1 ? check = 1 : check = 0
@@ -995,6 +998,7 @@ export default {
} }
}, },
searchPart() { searchPart() {
let num
this.tableData1 = [] this.tableData1 = []
this.tableData2 = [] this.tableData2 = []
this.tableData3 = [] this.tableData3 = []
@@ -1004,16 +1008,17 @@ export default {
// this.machineFloatValue = row.机床流水号 // this.machineFloatValue = row.机床流水号
// this.groupName = row.组号 // this.groupName = row.组号
// this.groupFloatValue = row.组件流水号 // this.groupFloatValue = row.组件流水号
this.checked ? num = 1 : num = 0
if (this.PartType === '基本件') { if (this.PartType === '基本件') {
searchPart(this.groupFloatValue).then(response => { searchPart(this.groupFloatValue, num).then(response => {
this.tableData1 = response.data this.tableData1 = response.data
}) })
} else if (this.PartType === '外购件') { } else if (this.PartType === '外购件') {
searchPart1(this.groupFloatValue, 2).then(response => { searchPart1(this.groupFloatValue, 2, num).then(response => {
this.tableData2 = response.data this.tableData2 = response.data
}) })
} else if (this.PartType === '标准件') { } else if (this.PartType === '标准件') {
searchPart1(this.groupFloatValue, 1).then(response => { searchPart1(this.groupFloatValue, 1, num).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
} }
@@ -1126,9 +1131,10 @@ export default {
OutPart(row.基本件流水号).then(response => { OutPart(row.基本件流水号).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('移出成功') this.$message.success('移出成功')
searchPart(this.groupFloatValue).then(response => { // searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data // this.tableData1 = response.data
}) // })
this.searchPart()
} else { this.$message.error('移出失败') } } else { this.$message.error('移出失败') }
}) })
}).catch(() => { }).catch(() => {
@@ -1138,6 +1144,28 @@ export default {
}) })
}) })
}, },
inParts(row) { // 解除禁用
this.$confirm('解除禁用后,该零件将参与考核', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
inPart(row.基本件流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('解禁成功')
// searchPart(this.groupFloatValue).then(response => {
// this.tableData1 = response.data
// })
this.searchPart()
} else { this.$message.error('解禁失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
cancel(formName) { cancel(formName) {
this.form = {} this.form = {}
this.dialogFormVisible = false this.dialogFormVisible = false

View File

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

View File

@@ -46,16 +46,6 @@
@selection-change="handleSelectionChange1" @selection-change="handleSelectionChange1"
@select="handleSelection"> @select="handleSelection">
<el-table-column :selectable="selectable" align="center" width="43" type="selection"/> <el-table-column :selectable="selectable" align="center" width="43" type="selection"/>
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="物料名称" width="100" show-overflow-tooltip> <el-table-column label="名称" align="center" prop="物料名称" width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
@@ -76,6 +66,16 @@
{{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }} {{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料类别" align="center" width="80" show-overflow-tooltip> <el-table-column label="物料类别" align="center" width="80" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料类别 }} {{ scope.row.物料类别 }}
@@ -144,6 +144,17 @@
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top"> <el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="primary" size="small" icon="el-icon-bottom" plain style="margin: 0px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button> <el-button type="primary" size="small" icon="el-icon-bottom" plain style="margin: 0px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
</el-tooltip> </el-tooltip>
<!--<div class="block" style="margin: 10px 0 0 0;display: inline-block">-->
<!--<el-pagination-->
<!--:current-page="pageCurrent11"-->
<!--:page-sizes="[10, 20, 30, 40, 100]"-->
<!--:page-size="pageSize11"-->
<!--:total="total11"-->
<!--style="display:inline-block;width:800px"-->
<!--layout="total, sizes, prev, pager, next, jumper"-->
<!--@size-change="handleSizeChange11"-->
<!--@current-change="handleCurrentChange11"/>-->
<!--</div>-->
<div class="block" style="display: inline-block;width:1150px;float: right;"> <div class="block" style="display: inline-block;width:1150px;float: right;">
<div style="display: inline-block;float: right;"> <div style="display: inline-block;float: right;">
<el-pagination <el-pagination
@@ -324,7 +335,7 @@
<el-card> <el-card>
<!--<h3>合同详细信息</h3>--> <!--<h3>合同详细信息</h3>-->
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border stripe style="max-height: 500px;" height="450px" size="mini" show-summary> <el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border stripe style="max-height: 500px;" height="450px" size="mini" show-summary>
<el-table-column label="物料名称" align="center" width="80" show-overflow-tooltip> <el-table-column label="物料名称" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }} {{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template> </template>
@@ -601,6 +612,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="离线合同备注" prop="离线合同备注">-->
<!-- <el-input v-model="form2.离线合同备注" size="small" type="textarea" style="width: 550px"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button <el-button
@@ -1144,7 +1162,7 @@ export default {
} }
this.title2 = '创建离线合同' this.title2 = '创建离线合同'
getBillNum().then(response => { // 查询询价单号 getBillNum().then(response => { // 查询询价单号
this.form2.离线合同编号 = response.data[0].单号 this.form2.离线合同编号 = 'LX' + response.data[0].单号
this.form2.离线合同名称 = '' this.form2.离线合同名称 = ''
this.form2.供应商流水号 = '' this.form2.供应商流水号 = ''
this.form2.供应商名称 = '' this.form2.供应商名称 = ''

View File

@@ -183,9 +183,9 @@
{{ scope.row.物料品种 }} {{ scope.row.物料品种 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip> <el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80" prop="姓名">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.接收日期 }} {{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="radio===2" align="center" prop="任务分配时间" label="分配日期" width="100px" show-overflow-tooltip> <el-table-column v-if="radio===2" align="center" prop="任务分配时间" label="分配日期" width="100px" show-overflow-tooltip>
@@ -218,9 +218,9 @@
<!--{{ scope.row.操作日期.split(' ')[0] }}--> <!--{{ scope.row.操作日期.split(' ')[0] }}-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80" prop="姓名"> <el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }} {{ scope.row.接收日期 }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column align="center" label="采购分配时间" min-width="100px">--> <!--<el-table-column align="center" label="采购分配时间" min-width="100px">-->
@@ -390,9 +390,9 @@
{{ scope.row.物料品种 }} {{ scope.row.物料品种 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip> <el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80px" prop="姓名">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.接收日期 }} {{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="radio1===2" align="center" prop="任务分配时间" label="分配日期" width="100px" show-overflow-tooltip> <el-table-column v-if="radio1===2" align="center" prop="任务分配时间" label="分配日期" width="100px" show-overflow-tooltip>
@@ -425,9 +425,9 @@
<!--{{ scope.row.操作日期.split(' ')[0] }}--> <!--{{ scope.row.操作日期.split(' ')[0] }}-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80px" prop="姓名"> <el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }} {{ scope.row.接收日期 }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column align="center" label="采购分配时间" min-width="100px">--> <!--<el-table-column align="center" label="采购分配时间" min-width="100px">-->
@@ -570,9 +570,9 @@
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip> <el-table-column v-if="radio2===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" width="80px" prop="buyer">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }} {{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="radio2===2" align="center" prop="任务分配时间" label="分配日期" width="120px" show-overflow-tooltip> <el-table-column v-if="radio2===2" align="center" prop="任务分配时间" label="分配日期" width="120px" show-overflow-tooltip>
@@ -590,7 +590,6 @@
{{ scope.row.供货商 }} {{ scope.row.供货商 }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column align="center" label="计划到货时间" min-width="100px">--> <!--<el-table-column align="center" label="计划到货时间" min-width="100px">-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--{{ scope.row.物料计划到货时间.split(' ')[0] }}--> <!--{{ scope.row.物料计划到货时间.split(' ')[0] }}-->
@@ -601,9 +600,9 @@
<!--{{ scope.row.操作日期.split(' ')[0] }}--> <!--{{ scope.row.操作日期.split(' ')[0] }}-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column v-if="radio2===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" width="80px" prop="buyer"> <el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }} {{ scope.row.操作日期.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column align="center" label="采购分配时间" min-width="100px">--> <!--<el-table-column align="center" label="采购分配时间" min-width="100px">-->