This commit is contained in:
liushuai
2020-03-20 18:06:37 +08:00
parent 7389ead64d
commit 4d32454b1a
19 changed files with 387 additions and 165 deletions

View File

@@ -4,7 +4,7 @@
<div style="white-space: nowrap">
<el-card style="margin-left: 0px;width:740px; display: inline-block;">
<el-col>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0;width: 180px" @keyup.enter.native="searchTable1"/>
<el-input v-model="partDrawingNumber" placeholder="机床号或零件图号或零件名称" size="small" clearable style="margin: 3px 0;width: 200px" @keyup.enter.native="searchTable1"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
@@ -70,7 +70,11 @@
<el-card style="margin-left: 1px;width:1120px; display: inline-block;">
<div> <!--slot="header"-->
<!--<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0;width: 155px" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()"/>-->
<el-select v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" filterable clearable @change="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">外购备料</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button :disabled="Number(采购计划状态)===3 || Number(采购计划状态)===4" type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip>
<el-select v-model="supplierName0" placeholder="供应商" style="width: 220px;margin-left: 10px" size="small" filterable clearable @change="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">
<el-option
v-for="item in supplierName0s"
:key="item.value"
@@ -94,10 +98,6 @@
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>-->
<!--</el-tooltip>-->
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable2">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">外购备料</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button :disabled="Number(采购计划状态)===3 || Number(采购计划状态)===4" type="primary" plain 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 :disabled="Number(采购计划状态)===3 || Number(采购计划状态)===4" type="success" size="small" icon="el-icon-tickets" plain style="margin-top: 3px;margin-left: 90px" @click="saveMateriel">保存</el-button>
</el-tooltip>
@@ -108,12 +108,12 @@
:header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}"
border
stripe
style="max-height: 460px;width: 930px"
style="max-height: 460px;width: 1120px"
height="230px"
size="mini"
highlight-current-row
@row-click="searchTable3">
<el-table-column label="进程" prop="采购计划状态" align="center" width="60" fixed="left">
<el-table-column label="进程" prop="采购计划状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<span v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</span>
<span v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</span>
@@ -121,33 +121,33 @@
<span v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</span>
</template>
</el-table-column>
<el-table-column label="外购备料单号" prop="采购单号" align="center" width="130">
<el-table-column label="外购备料单号" prop="采购单号" align="center" width="180">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="外购备料单名称" prop="采购单名称" align="center" width="160">
<el-table-column label="外购备料单名称" prop="采购单名称" align="center" width="180">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<!--<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>-->
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="190" show-overflow-tooltip>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="250" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" prop="姓名" align="center" width="70" show-overflow-tooltip>
<el-table-column label="采购员" prop="姓名" align="center" width="110" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="计划完成" align="center" width="110">
<el-table-column label="计划完成" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="190px">
<el-table-column label="操作" align="center" width="170px">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="导出" placement="top">
<div style="display: inline-block">
@@ -203,7 +203,7 @@
<span v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</span>
</template>
</el-table-column>
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="140" show-overflow-tooltip>
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="160" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
@@ -213,17 +213,17 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" align="center" width="80">
<el-table-column label="材料" prop="材料" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="115">
<el-table-column label="数量" align="center" width="135">
<template slot-scope="scope">
<el-input-number :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.采购数量" :min="0" size="mini" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="180px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
</template>
@@ -233,7 +233,7 @@
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:100%" @change="saveMoney(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="备注" min-width="100px">
<el-table-column label="备注" align="center" prop="备注" width="130px">
<template slot-scope="scope">
<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>

View File

@@ -516,6 +516,7 @@ export default {
submitAddPurchaseOrder() { // 新建采购单
this.$refs['form2'].validate((valid) => {
if (valid) {
this.supplierName = this.form2.supplierNameValue
addPurchaseOrder(this.form2.计划名称, this.form2.supplierNameValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建离线外购备料成功')

View File

@@ -79,6 +79,11 @@
{{ scope.row.开票金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="到货金额(元)" width="110px">
<template slot-scope="scope">
{{ Number(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="190px" width="190px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
@@ -142,7 +147,7 @@
</el-card>
<el-card style="float: left;margin-left: 5px">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" class="subTableHeader" show-summary border size="mini" style="width: 100%">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column width="55" align="center" type="index" label="序号"/>
<el-table-column label="到货单编号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.到货单编号 }}
@@ -499,6 +504,15 @@ export default {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
this.gongyingshang = []
getGongyingshang().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.gongyingshang.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商
})
}
})
} else {
this.$message.error('增加失败')
}
@@ -553,6 +567,15 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable1()
this.gongyingshang = []
getGongyingshang().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.gongyingshang.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商
})
}
})
} else { this.$message.error('删除失败') }
})
}).catch(() => {
@@ -589,6 +612,7 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('关联成功')
this.dialogVisible = false
this.searchTable1()
searchInvoiceDetail(this.发票流水号).then(response => {
this.gridData = response.data
})
@@ -597,15 +621,15 @@ export default {
}
},
deleteTable10(row) {
this.$confirm('确认删除吗?', '提示', {
this.$confirm('确认取消关联吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInvoiceMX(row.发票明细流水号, row.到货单流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.searchTable1()
searchInvoiceDetail(this.发票流水号).then(response => {
this.gridData = response.data
})

View File

@@ -81,17 +81,17 @@
{{ scope.row.采购数量 }}
</template>
</el-table-column>
<el-table-column label="备料时间" align="center" prop="下单日期" sortable="custom" width="120">
<template slot-scope="scope">
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column
label="到货件数"
align="center"
width="100">
<template slot-scope="scope">{{ scope.row.到货数量 }}</template>
</el-table-column>
<el-table-column label="备料时间" align="center" prop="下单日期" sortable="custom" width="120">
<template slot-scope="scope">
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column
label="到货时间"
align="center"

View File

@@ -11,7 +11,7 @@
size="small"
type="daterange"
align="center"
style="width: 240px;margin: 3px 0"
style="width: 240px;margin-top: 5px;margin-bottom: 5px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
@@ -32,11 +32,11 @@
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 130px" @click="exportExcel">导出</el-button>
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 290px" @click="exportExcel">导出</el-button>
</el-tooltip>
</el-col>
</el-card>
<el-card style="margin-left: 0px;width: 1135px;margin-left: 0px;display: inline-block" >
<el-card style="margin-left: 0px;width: 1185px;margin-left: 0px;display: inline-block" >
<el-table
v-loading=""
:data="tableData1"
@@ -52,7 +52,7 @@
show-summary
highlight-current-row
@row-click="searchTable02">
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="180" width="350" show-overflow-tooltip>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="180" width="320" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -62,16 +62,21 @@
{{ scope.row.请款时间 | formatTime }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="80" width="100">
<el-table-column label="请款人" align="center" min-width="80" width="90">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="90" width="90" prop="请款金额">
<el-table-column label="请款金额(元)" align="center" min-width="90" width="105" prop="请款金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到票金额(元)" align="center" min-width="90" width="105" prop="到票金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到票金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="审批进程" width="80" align="center">
<template slot-scope="scope">
<span v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</span>
@@ -84,7 +89,7 @@
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<el-table-column label="付款情况" width="80" align="center">
<template slot-scope="scope">
<span v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="mini">未操作</span>
<span v-if="Number(scope.row.付款情况流水号)===1" type="success" size="mini">已同意</span>
@@ -96,7 +101,7 @@
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<el-table-column label="操作" align="center" width="70">
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消请款" placement="top">
<div style="display: inline-block">
@@ -118,24 +123,37 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card style="margin-left: 0px;width:524px; margin-left: 1px; display: inline-block;vertical-align: top">
<el-card style="margin-left: 0px;width:474px; margin-left: 1px; display: inline-block;vertical-align: top">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" border class="subTableHeader" size="mini" show-summary style="">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="120" align="center" label="发票号">
<el-table-column width="200" align="center" label="发票号">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column width="100" align="center" label="票日期" show-overflow-tooltip>
<el-table-column width="100" align="center" label="票日期" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" width="100px" prop="票金额">
<el-table-column align="center" label="开票金额" width="100px" prop="票金额">
<template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }}
</template>
</el-table-column>
<!--<el-table-column min-width="100" width="60" align="center" label="操作">-->
<!--<template slot-scope="scope">-->
<!--<el-tooltip effect="dark" content="取消关联" placement="top">-->
<!--<div style="display: inline-block">-->
<!--<el-button-->
<!--type="text"-->
<!--size="mini"-->
<!--icon="el-icon-right"-->
<!--@click="deleteTable10(scope.row)"/>-->
<!--</div>-->
<!--</el-tooltip>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px">
@@ -159,12 +177,12 @@
{{ 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">
{{ Number(scope.row.开票金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="票时间" align="center" min-width="70">
<el-table-column label="票时间" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.开票时间 | formatTime }}
</template>
@@ -177,7 +195,7 @@
</div>
</div>
</template>
<script>import { searchRequestFund, searchOfflineContract, searchOfflineContract1, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/RequestOutsourcingMaterials'
<script>import { searchRequestFund, searchOfflineContract, searchOfflineContract1, submitRequestFund, searchRequsetFundDetail, cancelRequestFund, deleteRequsetFundMX } from '@/api/WorkshopProcurement/RequestOutsourcingMaterials'
import { mapGetters } from 'vuex'
export default {
@@ -188,6 +206,7 @@ export default {
check2: 0,
dateRange: '',
expands: [],
requestNumber: '',
pickerOptions: {
shortcuts: [{
text: '上季度',
@@ -404,11 +423,35 @@ export default {
// this.b = row.采购计划请款流水号
// }
// }
this.requestNumber = row.采购计划请款流水号
searchRequsetFundDetail(row.采购计划请款流水号).then(response => {
this.gridData = response.data
console.log(response.data, 2222)
})
},
deleteTable10(row) {
this.$confirm('确认取消关联吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteRequsetFundMX(row.采购计划请款明细流水号, row.发票流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.searchTable1()
searchRequsetFundDetail(this.requestNumber).then(response => {
this.gridData = response.data
})
} else { this.$message.error('取消失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
getRowKeys(row) {
return row.采购计划请款流水号
},