This commit is contained in:
liushuai
2020-03-26 18:31:59 +08:00
parent 6480d06063
commit 7317c3d73e
11 changed files with 326 additions and 191 deletions

View File

@@ -4,6 +4,19 @@
<div slot="header">
<!--<span>供应商:</span>-->
<el-input v-model="supperiler" placeholder="供应商或到票号" size="small" clearable @change="searchTable1()"/>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 240px;margin: 3px 0"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="searchTable1()"/>
<!--<span>发票号:</span>-->
<!--<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>-->
<!-- <el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=100000;searchTable1()">查询</el-button>-->
@@ -59,6 +72,11 @@
{{ scope.row.发票金额 }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="创建时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.创建时间 ? scope.row.创建时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="申请人" prop="申请人姓名" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
@@ -66,7 +84,7 @@
</el-table-column>
<el-table-column label="申请时间" prop="申请时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间.substr(0,10) : '—' }}
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" min-width="60">
@@ -76,7 +94,7 @@
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间.substr(0,10) : '—' }}
{{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="审批" align="center" min-width="60">
@@ -86,7 +104,7 @@
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间.substr(0,10) : '—' }}
{{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="财务" align="center" min-width="60">
@@ -96,7 +114,7 @@
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间.substr(0,10) : '—' }}
{{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
@@ -367,6 +385,34 @@ export default {
name: '', // 发票结算申请
data() {
return {
dateRange: '',
pickerOptions: {
shortcuts: [{
text: '上季度',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
picker.$emit('pick', [start, end])
}
}, {
text: '过去半年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
picker.$emit('pick', [start, end])
}
}, {
text: '过去一年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
picker.$emit('pick', [start, end])
}
}]
},
showtable02: true,
showtable03: false,
supperiler: '',
@@ -461,10 +507,11 @@ export default {
},
searchTable1() {
this.tableData2 = []
let check1, check2
let check1, check2, check3
this.invoiceNum ? check1 = 1 : check1 = 0
this.supperiler ? check2 = 1 : check2 = 0
searchTable1(check1, this.invoiceNum, check2, this.supperiler, this.pageCurrent1, this.pageSize1).then(response => {
this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '')
searchTable1(check1, this.invoiceNum, check2, this.supperiler, check3, this.dateRange[0], this.dateRange[1], this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')

View File

@@ -142,7 +142,7 @@
</el-table-column>
</el-table>
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="warning" 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>
<div class="block" style="margin: 10px 0 0 0;display: inline-block">
<el-pagination
@@ -159,7 +159,7 @@
</el-tab-pane>
<el-tab-pane label="仓库" name="仓库">
<el-row>
<el-input v-model="materialName" style="width: 150px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent22=1;pageSize22=20;total22=0;searchTable22()"/>
<el-input v-model="materialName" style="width: 180px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent22=1;pageSize22=20;total22=0;searchTable22()"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable22()">查询</el-button>
</el-row>
<el-table
@@ -167,35 +167,35 @@
:data="tableData22"
border
stripe
style="width: 594px;max-height: 500px;"
style="width: 680px;max-height: 500px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange1"
@select="handleSelection1">
<el-table-column align="center" width="43" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" width="153" show-overflow-tooltip>
<el-table-column label="名称" align="center" prop="物料名称" width="170" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="物料型号" align="center" width="128" show-overflow-tooltip>
<el-table-column label="图号或型号" prop="物料型号" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" width="119" show-overflow-tooltip>
<el-table-column label="规格" align="center" prop="物料规格" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="132">
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
</el-table>
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="warning" 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: 5px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
</el-tooltip>
<div class="block" style="display: inline-block">
<el-pagination
@@ -222,7 +222,7 @@
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
<el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-right:30px;margin-left:100px;" @click="addOfflineContract">离线合同</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="生成合同" placement="top">
<el-button :disabled="disabledbutton" type="success" size="small" plain style="margin-left:10px;margin-right: 10px" @click="doneOfflineContact">生成离线合同</el-button>
<el-button type="success" size="small" plain style="margin-left:10px;margin-right: 10px" @click="doneOfflineContact">生成离线合同</el-button>
</el-tooltip>
<!--<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>-->
@@ -818,7 +818,6 @@ export default {
paramRow: '', // 参数row
disable: true, // 其他的禁用
tabName: '标准件',
disabledbutton: false,
total22: 0,
pageCurrent22: 1,
pageSize22: 20
@@ -1048,6 +1047,7 @@ export default {
})
},
tabClick(tab) {
console.log(tab.name, 1111)
if (tab.name === '外购件') {
this.tabName = '外购件'
this.searchTable11()
@@ -1285,11 +1285,6 @@ export default {
})
this.loading4 = false
console.log(response.data.length, 1231231233)
if (response.data.length === 0) {
this.disabledbutton = true
} else {
this.disabledbutton = false
}
})
this.arrival(row) || this.purchasing(row) ? this.disable = true : this.disable = false // 是否为编辑模式
},
@@ -1370,6 +1365,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(row.离线合同明细流水号, 1111)
deleteMateriel(row.离线合同明细流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
@@ -1399,6 +1395,7 @@ export default {
})
},
saveContract() {
console.log(11111)
this.totalPrice = 0
this.partGroup = []
this.numGroup = []
@@ -1442,55 +1439,59 @@ export default {
// })
},
doneOfflineContact() { // 生成离线合同
let judge = true
this.tableData3.map(v => {
judge = judge && v.数量
})
if (judge) {
this.$confirm('确定生成合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.totalPrice = 0
this.partGroup = []
this.numGroup = []
this.priceGroup = []
const dateGroup = []
const remarkGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
this.numGroup.push(this.tableData3[i].数量)
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
dateGroup.push(this.tableData3[i].交货期要求)
remarkGroup.push(this.tableData3[i].备注)
}
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同生成成功')
this.searchTable2()
this.tableData3 = []
// searchMateriel(this.offlineContractNum).then(response => {
// this.tableData3 = response.data
// this.tableData3.map(v => {
// this.$set(v, '未税总额', 0)
// this.$set(v, '含税总额', 0)
// !v.单价 ? v.单价 = v.参考价格 : v.单价
// this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
// })
// this.disable = true // 是否为编辑模式
// })
} else { this.$message.error('离线合同生成失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
if (this.tableData3.length === 0) {
this.$message.error('无法生成空合同,请先选入物料!')
} else {
this.$message.error('数量不正确')
let judge = true
this.tableData3.map(v => {
judge = judge && v.数量
})
if (judge) {
this.$confirm('确定生成合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.totalPrice = 0
this.partGroup = []
this.numGroup = []
this.priceGroup = []
const dateGroup = []
const remarkGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
this.numGroup.push(this.tableData3[i].数量)
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
dateGroup.push(this.tableData3[i].交货期要求)
remarkGroup.push(this.tableData3[i].备注)
}
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同生成成功')
this.searchTable2()
this.tableData3 = []
// searchMateriel(this.offlineContractNum).then(response => {
// this.tableData3 = response.data
// this.tableData3.map(v => {
// this.$set(v, '未税总额', 0)
// this.$set(v, '含税总额', 0)
// !v.单价 ? v.单价 = v.参考价格 : v.单价
// this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
// })
// this.disable = true // 是否为编辑模式
// })
} else { this.$message.error('离线合同生成失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
} else {
this.$message.error('数量不正确')
}
}
},
exportExcel(row) {

View File

@@ -93,7 +93,12 @@
{{ (Number(scope.row.合同总额) - Number(scope.row.已付金额)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" min-width="90">
<el-table-column label="采购员" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" prop="创建日期" min-width="110" sortable="custom">
<template slot-scope="scope">
{{ scope.row.创建日期.split(' ')[0] }}
</template>
@@ -210,7 +215,11 @@ export default {
console.log(column + '-' + column.prop + '-' + column.order, 11111)
if (column.prop === '供应商名称') {
this.partName = 1
} else if (column.prop === '离线合同编号') { this.partName = 2 } else {
} else if (column.prop === '离线合同编号') {
this.partName = 2
} else if (column.prop === '创建日期') {
this.partName = 3
} else {
this.partName = ''
}
console.log(this.ordername, 9990999)

View File

@@ -23,6 +23,7 @@
end-placeholder="结束日期"/>
<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-button type="warning" size="small" icon="el-icon-goods" plain style="" @click="requestFund">请款</el-button>
<el-checkbox v-model="searchAll" style="margin-left: 50px">查询全部</el-checkbox>
<el-button type="success" size="small" icon="el-icon-download" plain style="float: right; margin-right: 20px;" @click="exportExcel">导出</el-button>
</div>
<!--<h3>请款表</h3>-->
@@ -258,6 +259,7 @@ import { getNowTime, timeToStamp } from '@/utils/tool'
export default {
data() {
return {
searchAll: false,
selectContents: [],
getDate: null,
tableData0: [],
@@ -464,10 +466,11 @@ export default {
this.searchTable1()
},
searchTable1() { // 查请款信息
let check1, check2
let check1, check2, check3
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
this.supplierValue ? check2 = 1 : check2 = 0
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
this.searchAll === false ? check3 = 1 : check3 = 0
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue, check3).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})

View File

@@ -92,7 +92,7 @@
<!--<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">已分配</el-radio>-->
<!--<div style="float:right;">-->
<!--<span style="margin-left: 0">采购员:</span>-->
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 260px">
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 210px">
<el-option
v-for="item in person"
:key="item.value"
@@ -112,7 +112,7 @@
type="repulse"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
style="margin-left: 50px"
@click="executeReturn1">打回</el-button>
</el-tooltip>
<!--</div>-->
@@ -313,7 +313,7 @@
<el-checkbox v-model="checked2" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">已分配</el-checkbox>
<!--<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">未分配</el-radio>-->
<!--<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">已分配</el-radio>-->
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 260px">
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 210px">
<el-option
v-for="item in person"
:key="item.value"
@@ -333,7 +333,7 @@
type="repulse"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
style="margin-left: 50px"
@click="executeReturn1">打回</el-button>
</el-tooltip>
<!--<el-button type="primary" size="small" icon="el-icon-menu" style="margin-left: 10px" @click="allocateTask1">分配</el-button>-->
@@ -493,7 +493,7 @@
<el-checkbox v-model="checked3" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">已分配</el-checkbox>
<!--<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">未分配</el-radio>-->
<!--<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">已分配</el-radio>-->
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 520px">
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 480px">
<el-option
v-for="item in person"
:key="item.value"
@@ -506,15 +506,15 @@
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask2">分配</el-button>
@click="executeReturn2">分配</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="打回制造部重新分配" placement="top">
<el-button
type="repulse"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn2">打回</el-button>
style="margin-left: 50px"
@click="allocateTask2">打回</el-button>
</el-tooltip>
<!--<el-button type="primary" size="small" icon="el-icon-menu" style="margin-left: 10px" @click="allocateTask2">分配</el-button>-->
<!--<el-button type="danger" size="small" icon="el-icon-back" style="margin-left: 10px" @click="executeReturn2">打回</el-button>-->