Merge branch 'master' of http://123.56.95.229:10010/r/高精
This commit is contained in:
@@ -306,24 +306,24 @@
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="750px" @close="closedialog()">
|
||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="600px" @close="closedialog()">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="外购备料单名称" prop="采购计划单名称">
|
||||
<el-input v-model="form2.采购单名称" size="small"/>
|
||||
<el-input v-model="form2.采购单名称" size="small" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购员" prop="采购员">
|
||||
<el-input v-model="name" readonly size="small"/>
|
||||
<el-input v-model="name" readonly size="small" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-model="form2.supplierNameValue" placeholder="供应商" size="small" filterable>
|
||||
<el-select v-model="form2.supplierNameValue" placeholder="供应商" size="small" filterable style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
:key="item.value"
|
||||
@@ -338,6 +338,7 @@
|
||||
v-model="form2.计划完成日期"
|
||||
size="small"
|
||||
type="date"
|
||||
style="width: 150px;"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
@@ -822,12 +823,16 @@ export default {
|
||||
}
|
||||
},
|
||||
back() {
|
||||
edit2(this.materielGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('打回成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('打回失败') }
|
||||
})
|
||||
if (this.materielGroup.length === 0) {
|
||||
this.$message.warning('请勾选物料')
|
||||
} else {
|
||||
edit2(this.materielGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('打回成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('打回失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
saveMateriel() { // 保存数据
|
||||
this.partGroup = []
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="right" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
{{ Number(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table v-show="scope.row.类别==='采购'" :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table v-show="scope.row.类别==='采购'" :data="gridData2" :summary-method="getSummaries" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -40,7 +40,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
{{ Number(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -242,6 +242,33 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
// 合计
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
} else if (index === 2) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
fetchData() {
|
||||
this.searchTable()
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="right" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
{{ Number(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table v-show="scope.row.类别==='采购'" :data="gridData1" stripe size="mini" show-summary>
|
||||
<el-table v-show="scope.row.类别==='采购'" :data="gridData1" :summary-method="getSummaries" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -40,7 +40,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
{{ Number(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -252,6 +252,33 @@ export default {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 合计
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
} else if (index === 2) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
fetchData() {
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
|
||||
@@ -59,9 +59,15 @@
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 1px;width:1120px; display: inline-block;">
|
||||
<div> <!--slot="header"-->
|
||||
<div>
|
||||
<el-button type="distribution" size="small" plain icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">计划单</el-button>
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">-->
|
||||
<!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
|
||||
<!--</el-tooltip>-->
|
||||
<el-button type="primary" size="small" plain icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button>
|
||||
<!--slot="header"-->
|
||||
<!--<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0;width: 155px" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()"/>-->
|
||||
<el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px;margin-top: 3px" clearable/>
|
||||
<el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px;margin-top: 3px;margin-left: 20px" clearable/>
|
||||
<el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 200px" filterable clearable @change="searchTable">
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
@@ -70,11 +76,6 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" plain icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button>
|
||||
<el-button type="distribution" size="small" plain icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">计划单</el-button>
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">-->
|
||||
<!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
|
||||
<!--</el-tooltip>-->
|
||||
<el-button type="primary" size="small" plain icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData" stripe highlight-current-row border style="width: 100%;max-height: 230px;margin-top: 10px" height="230px" size="mini" @row-click="searchMX">
|
||||
<el-table-column label="进程" prop="采购计划状态" align="center" width="70">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%;max-height: 300px;" height="150px" highlight-current-row @row-click="searchTable2">
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%;max-height: 300px;" height="230px" highlight-current-row @row-click="searchTable2">
|
||||
<el-table-column label="采购合同号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
@@ -330,7 +330,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" title="采购合同审批" center style="min-height: 300px;" width="30%">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" title="采购合同审批" center style="min-height: 300px;" width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="审批是否通过" prop="审批是否通过" center>
|
||||
<el-select v-model="form2.审批是否通过" size="small" @change="selectChange">
|
||||
@@ -479,7 +479,9 @@ export default {
|
||||
})
|
||||
},
|
||||
Open(row) {
|
||||
console.log(row)
|
||||
this.form2.审批是否通过 = 1
|
||||
this.form2.未通过原因 = ''
|
||||
this.disabled = true
|
||||
this.dialogVisible3 = true
|
||||
this.ProcurementContractNum = row.采购合同流水号
|
||||
this.QGNUM = row.请购单流水号
|
||||
|
||||
@@ -522,9 +522,10 @@ export default {
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (row.审批情况流水号 === '1') {
|
||||
return 'adopt'
|
||||
} else if (row.审批情况流水号 === '2') {
|
||||
// if (row.审批情况流水号 === '1') {
|
||||
// return 'adopt'
|
||||
// } else
|
||||
if (row.审批情况流水号 === '2') {
|
||||
return 'NotThrough'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -172,11 +172,6 @@
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="250" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.开票金额).toFixed(2) }}
|
||||
|
||||
Reference in New Issue
Block a user