This commit is contained in:
liushuai
2019-09-18 09:06:49 +08:00
parent 53a9f57fe1
commit 4a39ba8190
11 changed files with 260 additions and 137 deletions

View File

@@ -514,7 +514,7 @@
</el-table-column>
<el-table-column align="center" label="组件名称">
<template slot-scope="scope">
{{ scope.row.组件名称 ? scope.row.组件名称 : '--' }}
{{ scope.row.任务名称 ? scope.row.任务名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="计划工时">
@@ -582,7 +582,7 @@
</el-table-column>
<el-table-column align="center" label="组件名称">
<template slot-scope="scope">
{{ scope.row.组件名称 ? scope.row.组件名称 : '--' }}
{{ scope.row.任务名称 ? scope.row.任务名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="计划工时">
@@ -650,7 +650,7 @@
</el-table-column>
<el-table-column align="center" label="组件名称">
<template slot-scope="scope">
{{ scope.row.组件名称 ? scope.row.组件名称 : '--' }}
{{ scope.row.任务名称 ? scope.row.任务名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="计划工时">
@@ -718,7 +718,7 @@
</el-table-column>
<el-table-column align="center" label="组件名称">
<template slot-scope="scope">
{{ scope.row.组件名称 ? scope.row.组件名称 : '--' }}
{{ scope.row.任务名称 ? scope.row.任务名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="计划工时">
@@ -2650,13 +2650,7 @@ export default {
method: 'post',
data: {
type: '3',
name: `
select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 1 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
name: ` select * from 车间管理_工作计划 where 机床流水号 = ${this.machineValue} and 计划类型 = 1 `
}
}).then(res => {
this.tableDataDiv5 = res.data
@@ -2771,12 +2765,7 @@ export default {
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 2 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
name: ` select * from 车间管理_工作计划 where 机床流水号 = ${this.machineValue} and 计划类型 = 2 `
}
}).then(res => {
this.tableDataDiv6 = res.data
@@ -2890,12 +2879,7 @@ export default {
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 3 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
name: ` select * from 车间管理_工作计划 where 机床流水号 = ${this.machineValue} and 计划类型 = 3 `
}
}).then(res => {
this.tableDataDiv7 = res.data
@@ -3009,12 +2993,7 @@ export default {
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 4 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
name: ` select * from 车间管理_工作计划 where 机床流水号 = ${this.machineValue} and 计划类型 = 4 `
}
}).then(res => {
this.tableDataDiv8 = res.data

View File

@@ -32,10 +32,19 @@
<span>提前</span>
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
<span>天预警</span>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable1()">查询</el-button>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable1();searchAll()">查询</el-button>
</el-row>
</div>
<h1 class="word" style="margin: 0">总计划:</h1>
<div style="border: 1px solid #ebeef5;">
<span>合同总数:</span>{{ 合同总数 ? 合同总数 : '-' }}&nbsp;()
<span>合同总金额:</span>{{ 合同总金额 ? 合同总金额 : '-' }}&nbsp;(万元)
<span>已支付:</span>{{ 已支付 ? 已支付 : '-' }}&nbsp;(万元)
<span>理论加工时间:</span>{{ 理论加工时间 ? 理论加工时间 : '-' }}&nbsp;()<br>
<span>实际加工时间:</span>{{ 实际加工时间 ? 实际加工时间 : '-' }}&nbsp;()
<span>外协工时总数:</span>{{ 外协工时总数 ? 外协工时总数 : '-' }}&nbsp;()
<span>采购总额:</span>{{ 零件金额 ? 零件金额 : '-' }}&nbsp;()
</div>
<el-table v-loading="loading" :data="tableData10" height="550" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable">
<el-table-column label="项目编号" align="center" width="140px" fixed="left">
<template slot-scope="scope">
@@ -506,12 +515,19 @@
</template>
<script>
import { initProject, initMachine, searchtable, searchtable2, searchtable5 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
import { searchAll, initProject, initMachine, searchtable, searchtable2, searchtable5 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
import Sticky from '@/components/Sticky'
export default {
components: { Sticky },
data() {
return {
合同总数: '',
合同总金额: '',
已支付: '',
理论加工时间: '',
实际加工时间: '',
外协工时总数: '',
零件金额: '',
projectValue: '',
projectValue1: '',
project: [],
@@ -553,7 +569,22 @@ export default {
this.fetchData()
this.searchTable1()
},
mounted() {
this.searchAll()
},
methods: {
searchAll() {
this.projectValue ? this.projectValue_check = 1 : this.projectValue_check = 0
searchAll(this.projectValue_check, this.projectValue).then(response => {
this.合同总数 = response.data[0].合同总数
this.合同总金额 = response.data[0].合同总金额
this.已支付 = response.data[0].已支付
this.理论加工时间 = response.data[0].理论加工时间段
this.实际加工时间 = response.data[0].实际加工时间段
this.外协工时总数 = response.data[0].外协工时总数
this.零件金额 = response.data[0].零件金额
})
},
colorJudge(time1, time2) {
if (time2 === null) {
if ((new Date(time1) - this.now) > 0 && (new Date(time1) - this.now) < (86400000 * this.warningValue)) {
@@ -605,56 +636,90 @@ export default {
this.loading = false
} else {
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].合同签订日期 !== '' && response.data.rows[i].合同签订日期 !== null) {
if (response.data.rows[i].合同签订日期 !== '' && response.data.rows[i].合同签订日期 !== null && response.data.rows[i].合同签订日期 !== '1900/1/1 0:00:00') {
response.data.rows[i].合同签订日期 = response.data.rows[i].合同签订日期.split(' ')[0]
} else {
response.data.rows[i].合同签订日期 = ''
}
if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null) {
if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null && response.data.rows[i].发货节点 !== '1900/1/1 0:00:00') {
response.data.rows[i].发货节点 = response.data.rows[i].发货节点.split(' ')[0]
} else {
response.data.rows[i].发货节点 = ''
}
if (response.data.rows[i].设备预验收节点 !== '' && response.data.rows[i].设备预验收节点 !== null) {
if (response.data.rows[i].设备预验收节点 !== '' && response.data.rows[i].设备预验收节点 !== null && response.data.rows[i].设备预验收节点 !== '1900/1/1 0:00:00') {
response.data.rows[i].设备预验收节点 = response.data.rows[i].设备预验收节点.split(' ')[0]
} else {
response.data.rows[i].设备预验收节点 = ''
}
if (response.data.rows[i].安装调试节点 !== '' && response.data.rows[i].安装调试节点 !== null) {
if (response.data.rows[i].安装调试节点 !== '' && response.data.rows[i].安装调试节点 !== null && response.data.rows[i].安装调试节点 !== '1900/1/1 0:00:00') {
response.data.rows[i].安装调试节点 = response.data.rows[i].安装调试节点.split(' ')[0]
} else {
response.data.rows[i].安装调试节点 = ''
}
if (response.data.rows[i].机床设计完成时间 !== '' && response.data.rows[i].机床设计完成时间 !== null) {
if (response.data.rows[i].机床设计完成时间 !== '' && response.data.rows[i].机床设计完成时间 !== null && response.data.rows[i].机床设计完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].机床设计完成时间 = response.data.rows[i].机床设计完成时间.split(' ')[0]
} else {
response.data.rows[i].机床设计完成时间 = ''
}
if (response.data.rows[i].采购完成时间 !== '' && response.data.rows[i].采购完成时间 !== null) {
if (response.data.rows[i].采购完成时间 !== '' && response.data.rows[i].采购完成时间 !== null && response.data.rows[i].采购完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].采购完成时间 = response.data.rows[i].采购完成时间.split(' ')[0]
} else {
response.data.rows[i].采购完成时间 = ''
}
if (response.data.rows[i].备料完成时间 !== '' && response.data.rows[i].备料完成时间 !== null) {
if (response.data.rows[i].备料完成时间 !== '' && response.data.rows[i].备料完成时间 !== null && response.data.rows[i].备料完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].备料完成时间 = response.data.rows[i].备料完成时间.split(' ')[0]
} else {
response.data.rows[i].备料完成时间 = ''
}
if (response.data.rows[i].机床生产完成时间 !== '' && response.data.rows[i].机床生产完成时间 !== null) {
if (response.data.rows[i].机床生产完成时间 !== '' && response.data.rows[i].机床生产完成时间 !== null && response.data.rows[i].机床生产完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].机床生产完成时间 = response.data.rows[i].机床生产完成时间.split(' ')[0]
} else {
response.data.rows[i].机床生产完成时间 = ''
}
if (response.data.rows[i].机床装配完成时间 !== '' && response.data.rows[i].机床装配完成时间 !== null) {
if (response.data.rows[i].机床装配完成时间 !== '' && response.data.rows[i].机床装配完成时间 !== null && response.data.rows[i].机床装配完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].机床装配完成时间 = response.data.rows[i].机床装配完成时间.split(' ')[0]
} else {
response.data.rows[i].机床装配完成时间 = ''
}
if (response.data.rows[i].机床设计实际完成时间 !== '' && response.data.rows[i].机床设计实际完成时间 !== null) {
if (response.data.rows[i].机床设计实际完成时间 !== '' && response.data.rows[i].机床设计实际完成时间 !== null && response.data.rows[i].机床设计实际完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].机床设计实际完成时间 = response.data.rows[i].机床设计实际完成时间.split(' ')[0]
} else {
response.data.rows[i].机床设计实际完成时间 = ''
}
if (response.data.rows[i].采购实际完成时间 !== '' && response.data.rows[i].采购实际完成时间 !== null) {
if (response.data.rows[i].采购实际完成时间 !== '' && response.data.rows[i].采购实际完成时间 !== null && response.data.rows[i].采购实际完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].采购实际完成时间 = response.data.rows[i].采购实际完成时间.split(' ')[0]
} else {
response.data.rows[i].采购实际完成时间 = ''
}
if (response.data.rows[i].备料实际完成时间 !== '' && response.data.rows[i].备料实际完成时间 !== null) {
if (response.data.rows[i].备料实际完成时间 !== '' && response.data.rows[i].备料实际完成时间 !== null && response.data.rows[i].备料实际完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].备料实际完成时间 = response.data.rows[i].备料实际完成时间.split(' ')[0]
} else {
response.data.rows[i].备料实际完成时间 = ''
}
if (response.data.rows[i].机床生产实际完成时间 !== '' && response.data.rows[i].机床生产实际完成时间 !== null) {
if (response.data.rows[i].机床生产实际完成时间 !== '' && response.data.rows[i].机床生产实际完成时间 !== null && response.data.rows[i].机床生产实际完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].机床生产实际完成时间 = response.data.rows[i].机床生产实际完成时间.split(' ')[0]
} else {
response.data.rows[i].机床生产实际完成时间 = ''
}
if (response.data.rows[i].机床装配实际完成时间 !== '' && response.data.rows[i].机床装配实际完成时间 !== null) {
if (response.data.rows[i].机床装配实际完成时间 !== '' && response.data.rows[i].机床装配实际完成时间 !== null && response.data.rows[i].机床装配实际完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].机床装配实际完成时间 = response.data.rows[i].机床装配实际完成时间.split(' ')[0]
} else {
response.data.rows[i].机床装配实际完成时间 = ''
}
if (response.data.rows[i].审图计划开始时间 !== '' && response.data.rows[i].审图计划开始时间 !== null) {
if (response.data.rows[i].审图计划开始时间 !== '' && response.data.rows[i].审图计划开始时间 !== null && response.data.rows[i].审图计划开始时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].审图计划开始时间 = response.data.rows[i].审图计划开始时间.split(' ')[0]
} else {
response.data.rows[i].审图计划开始时间 = ''
}
if (response.data.rows[i].审图计划完成时间 !== '' && response.data.rows[i].审图计划完成时间 !== null) {
if (response.data.rows[i].审图计划完成时间 !== '' && response.data.rows[i].审图计划完成时间 !== null && response.data.rows[i].审图计划完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].审图计划完成时间 = response.data.rows[i].审图计划完成时间.split(' ')[0]
} else {
response.data.rows[i].审图计划完成时间 = ''
}
if (response.data.rows[i].审图实际完成时间 !== '' && response.data.rows[i].审图实际完成时间 !== null) {
if (response.data.rows[i].审图实际完成时间 !== '' && response.data.rows[i].审图实际完成时间 !== null && response.data.rows[i].审图实际完成时间 !== '1900/1/1 0:00:00') {
response.data.rows[i].审图实际完成时间 = response.data.rows[i].审图实际完成时间.split(' ')[0]
} else {
response.data.rows[i].审图实际完成时间 = ''
}
this.tableData10.push({
项目编号: response.data.rows[i].项目编号,
@@ -715,7 +780,6 @@ export default {
if (response.data[i].发货节点 !== '' && response.data[i].发货节点 !== null) {
response.data[i].发货节点 = response.data[i].发货节点.split(' ')[0]
}
console.log(response.data[i].设备预验收节点, 11111)
// if (response.data[i].设备预验收节点 !== '' && response.data[i].设备预验收节点 !== null) {
// response.data[i].设备预验收节点 = response.data[i].设备预验收节点.split(' ')[0]
// }
@@ -763,7 +827,6 @@ export default {
}
}
this.loading = false
console.log(response.data, 222222)
this.tableData = response.data
}).then(() => {
searchtable2(this.machineValue1, 1).then(response => {
@@ -787,7 +850,6 @@ export default {
}
}
this.loading1 = false
console.log(response.data, 2)
this.tableData1 = response.data
})
searchtable2(this.machineValue1, 2).then(response => {
@@ -814,9 +876,7 @@ export default {
}
}
this.loading1 = false
console.log(response.data, 3)
this.tableData2 = response.data
console.log(response.data, 2222)
})
searchtable2(this.machineValue1, 3).then(response => {
for (let i = 0; i < response.data.length; i++) {
@@ -842,7 +902,6 @@ export default {
}
}
this.loading1 = false
console.log(response.data, 4)
this.tableData3 = response.data
})
searchtable2(this.machineValue1, 4).then(response => {
@@ -869,11 +928,9 @@ export default {
}
}
this.loading1 = false
console.log(response.data, 5)
this.tableData4 = response.data
})
searchtable2(this.machineValue1, 5).then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
// this.arrival4.push(new Date(response.data[i].计划完成时间))
// if ((this.arrival4[i] - this.now) > 0 && (this.arrival4[i] - this.now) < (86400000 * this.warningValue)) {
@@ -897,7 +954,6 @@ export default {
}
}
this.loading1 = false
console.log(response.data, 6)
this.tableData5 = response.data
})
})

View File

@@ -135,13 +135,13 @@
</el-table-column>
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%" @keyup.native="scope.row.未税单价 = scope.row.未税单价.replace(/[^\.\d]/g,'')" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-show="hasTax!=='未税'"></b>
</template>
</el-table-column>
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%" @keyup.native="scope.row.含税单价 = scope.row.含税单价.replace(/[^\.\d]/g,'')" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-show="hasTax!=='含税'"></b>
</template>
</el-table-column>
@@ -693,7 +693,7 @@ export default {
}
const merge = []
this.tableData1.map(v => {
if ((this.hasTax === '含税' && Number(v.含税单价)) || (this.hasTax === '未税' && Number(v.未税单价))) { // 筛掉未询到价格的物料
if ((this.hasTax === '含税' && v.含税单价.trim() !== '') || (this.hasTax === '未税' && v.未税单价.trim() !== '')) { // 筛掉未询到价格的物料
merge.push({
机床图号: v.机床图号,
组号: v.组号,

View File

@@ -221,21 +221,21 @@
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
</el-form-item>
</el-col>
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
<el-upload
id="invoiceScan"
ref="upload"
:auto-upload="false"
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
</el-form-item>
<!--<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>-->
<!--<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">-->
<!--<el-upload-->
<!--id="invoiceScan"-->
<!--ref="upload"-->
<!--:auto-upload="false"-->
<!--:on-success="uploadSuccess"-->
<!--:before-upload="beforeUpload"-->
<!--:on-exceed="warningExceed"-->
<!--:limit="limit"-->
<!--:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"-->
<!--list-type="picture-card">-->
<!--<i class="el-icon-plus"/>-->
<!--</el-upload>-->
<!--</el-form-item>-->
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -316,11 +316,10 @@
</template>
<script>
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan, readFile } from '@/utils/request'
import request from '@/utils/request'
import { uploadInvoiceScan } from '@/utils/request'
export default {
name: '', // 发票结算申请
data() {
@@ -428,9 +427,16 @@ export default {
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
} else {
this.$message.error('增加失败')
}
})
} else {
console.log('error submit!!')
return false
}
})
@@ -448,7 +454,6 @@ export default {
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
@@ -490,16 +495,7 @@ export default {
})
})
},
async searchPic(row, i) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
}
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
searchPic(row, i) {
},
warningExceed() {
this.$message.error('仅可上传一张发票')

View File

@@ -157,6 +157,13 @@
{{ scope.row.审批时间 ? scope.row.审核时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="处理" align="center" min-width="130">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否未通过)===1&&Number(scope.row.不通过处理)===1" type="success" size="small">处理完成</el-tag>
<el-button v-else-if="Number(scope.row.是否未通过)===1&&Number(scope.row.不通过处理)===0" type="primary" size="mini" @click="done(scope.row)">点击处理完成</el-button>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
@@ -195,7 +202,7 @@
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract } from '@/api/PurchasingCenter/PurchaseContractSearch'
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract, handleDone } from '@/api/PurchasingCenter/PurchaseContractSearch'
import QRCode from 'qrcode'
import $ from 'jquery'
// import { exportExcelMethod } from './exportExcel'
@@ -270,6 +277,26 @@ export default {
this.searchTable1()
},
methods: {
// 处理完成
done(row) {
this.$confirm('确定处理完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handleDone(row.采购合同流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
deleteContract(row) { // 删除合同
this.$confirm('此操作将永久删除合同所有内容,确定删除?', '提示', {
confirmButtonText: '确定',

View File

@@ -222,21 +222,21 @@
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
</el-form-item>
</el-col>
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
<el-upload
id="invoiceScan"
ref="upload"
:auto-upload="false"
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
</el-form-item>
<!--<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>-->
<!--<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">-->
<!--<el-upload-->
<!--id="invoiceScan"-->
<!--ref="upload"-->
<!--:auto-upload="false"-->
<!--:on-success="uploadSuccess"-->
<!--:before-upload="beforeUpload"-->
<!--:on-exceed="warningExceed"-->
<!--:limit="limit"-->
<!--:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"-->
<!--list-type="picture-card">-->
<!--<i class="el-icon-plus"/>-->
<!--</el-upload>-->
<!--</el-form-item>-->
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -317,11 +317,11 @@
</template>
<script>
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/WorkshopProcurement/InvoiceSettlementApplication1'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan1, readFile } from '@/utils/request'
import request from '@/utils/request'
import { uploadInvoiceScan1 } from '@/utils/request'
export default {
name: '', // 发票结算申请
data() {
@@ -429,9 +429,16 @@ export default {
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
} else {
this.$message.error('增加失败')
}
})
} else {
console.log('error submit!!')
return false
}
})
@@ -449,7 +456,6 @@ export default {
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
@@ -492,16 +498,6 @@ export default {
})
},
async searchPic(row, i) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
}
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
console.log(this.tableData1[i].scanSrc)
},
warningExceed() {
this.$message.error('仅可上传一张发票')
@@ -567,7 +563,6 @@ export default {
this.supplierValue = row.供应商流水号
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
searchTable2(row.发票结算申请单流水号).then(response => {
console.log(response.data)
this.tableData2 = response.data
})
},