|
@@ -9,7 +9,6 @@
|
|
|
<ws-button type="primary" @click="reject">驳回</ws-button>
|
|
|
<ws-button type="primary" @click="adopt">通过</ws-button>
|
|
|
<ws-button type="primary" @click="payment">付款</ws-button>
|
|
|
- <ws-button type="primary" @click="examine">审核</ws-button>
|
|
|
</template>
|
|
|
<template slot="right">
|
|
|
<el-select v-model="warehouseNameKey" placeholder="请选择" @change="warehouseChange">
|
|
@@ -142,10 +141,10 @@
|
|
|
width="350"
|
|
|
>
|
|
|
<template scope="scope">
|
|
|
- <el-button type="danger" v-if='!scope.row.approveStatus' @click="del(scope.row)">删除</el-button>
|
|
|
- <el-button v-if='!scope.row.approveStatus' @click="settlement(1,scope.row)">结算</el-button>
|
|
|
- <el-button v-if='scope.row.approveStatus' @click="settlement(2,scope.row)">查看</el-button>
|
|
|
- <el-button v-if='scope.row.approveStatus' @click='print(scope.row)'>打印</el-button>
|
|
|
+ <el-button type="danger" v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="del(scope.row)">删除</el-button>
|
|
|
+ <el-button v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="settlement(1,scope.row)">结算</el-button>
|
|
|
+ <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click="settlement(2,scope.row)">查看</el-button>
|
|
|
+ <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click='print(scope.row)'>打印</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -189,13 +188,100 @@
|
|
|
:total="deptBudgetTotal"
|
|
|
>
|
|
|
</el-pagination>
|
|
|
+ <el-dialog
|
|
|
+ width="70%"
|
|
|
+ class="table-content"
|
|
|
+ center
|
|
|
+ :visible.sync="isShowPrint"
|
|
|
+ title="粮食质检单"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
|
|
|
+ <table class="table">
|
|
|
+ <tr class="row">
|
|
|
+ <td rowspan="4" class="col col-bgc">买方</td>
|
|
|
+ <td class="col col-bgc">收货单位</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
|
|
|
+ <td rowspan="4" class="col col-bgc">买方</td>
|
|
|
+ <td class="col col-bgc">收货单位</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">收货单位</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
|
|
|
+ <td class="col col-bgc">联系人</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.contacts }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">收货单位</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
|
|
|
+ <td class="col col-bgc">联系人</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.contacts }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">收货单位</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
|
|
|
+ <td class="col col-bgc">联系人</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.contacts }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">货名</td>
|
|
|
+ <td class="col">{{ printData.goodsName }}</td>
|
|
|
+ <td class="col col-bgc">类型</td>
|
|
|
+ <td class="col">{{ printData.customerName }}</td>
|
|
|
+ <td class="col col-bgc">容量(克/升)</td>
|
|
|
+ <td class="col">{{ printData.bulkDensity }}</td>
|
|
|
+ <td class="col col-bgc">不完整粒(%)</td>
|
|
|
+ <td class="col">{{ printData.imperfectGrain }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">等级</td>
|
|
|
+ <td class="col">{{ printData.grade }}</td>
|
|
|
+ <td class="col col-bgc">水分(%)</td>
|
|
|
+ <td class="col">{{ printData.waterContent }}</td>
|
|
|
+ <td class="col col-bgc">热损伤(%)</td>
|
|
|
+ <td class="col">{{ printData.jiaorenli }}</td>
|
|
|
+ <td class="col col-bgc">单价(元/公斤)</td>
|
|
|
+ <td class="col">{{ printData.tidalGrainPrice }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">杂质(%)</td>
|
|
|
+ <td class="col">{{ printData.impurity }}</td>
|
|
|
+ <td class="col col-bgc">霉变粒(%)</td>
|
|
|
+ <td class="col">{{ printData.mildewGrain }}</td>
|
|
|
+ <td class="col col-bgc" colspan="2">购粮性质</td>
|
|
|
+ <td class="col" colspan="2">{{ printData.customerName }}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bottom">
|
|
|
+ <div class="bottom-row1">
|
|
|
+ <div>质检:{{ printData.qualityInspector }}</div>
|
|
|
+ <div>{{ printData.qualityDate }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-row2">
|
|
|
+ <div class="left">
|
|
|
+ <img src="../../../public/img/add.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="config">收货单位签名或盖章</div>
|
|
|
+ <div class="">客户签名</div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-row3">扫一扫</div>
|
|
|
+ <div class="bottom-row4">
|
|
|
+ <el-button type="primary">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="printSmall">打印小票</el-button>
|
|
|
+ <el-button type="primary" @click="printBig">打印单据</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {getpayment,selectWarehouseSelf,delpayment} from '@/model/houseSelfCollect/index'
|
|
|
+import {getpayment,selectWarehouseSelf,delpayment,auditpayment,getpaymentexamine} from '@/model/houseSelfCollect/index'
|
|
|
import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
|
|
|
-
|
|
|
+import { posthandle } from '@/model/purchasingManagement/index'
|
|
|
export default {
|
|
|
components: {
|
|
|
houseSelfCollectPrint,
|
|
@@ -217,6 +303,8 @@ export default {
|
|
|
warehouseList:[],
|
|
|
warehouseNameKey:'',
|
|
|
warehouseName:'',
|
|
|
+ isShowPrint: false,
|
|
|
+ printData:{},
|
|
|
warehouse:[],
|
|
|
value1: '', //付款日期
|
|
|
modification: [],
|
|
@@ -234,8 +322,9 @@ export default {
|
|
|
this.warehouseList = response
|
|
|
this.warehouseNameKey = this.warehouseList[0].id
|
|
|
this.warehouseName = this.warehouseList[0].warehouseName
|
|
|
+ this.getList()
|
|
|
})
|
|
|
- this.getList()
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
getList(){
|
|
@@ -307,23 +396,61 @@ export default {
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要驳回的条目')
|
|
|
} else {
|
|
|
- this.$confirm('驳回后任务将退回到统计,是否确定驳回?', '提示', {
|
|
|
+ this.$confirm('是否确定驳回?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
- .then(() => {})
|
|
|
+ .then(() => {
|
|
|
+ this.audit(this.modification[0], 0,false,'','')
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
return false
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ audit(item, index, status, status2, reason) {
|
|
|
+ if (index < this.modification.length) {
|
|
|
+ if(status==true&&item.status=='已驳回'){
|
|
|
+ console.log(11111)
|
|
|
+ auditpayment({compId:sessionStorage.getItem('ws-pf_compId'),id:item.id}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ console.log(22222)
|
|
|
+ this.audit(this.modification[index + 1], index + 1, status,status2,reason)
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ posthandle({
|
|
|
+ taskId: item.taskId,
|
|
|
+ approved: status,
|
|
|
+ auditMind: reason != undefined ? '已驳回' : '34',
|
|
|
+ needReapply: status2 != undefined ? true : false,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.audit(this.modification[index + 1], index + 1, status,status2,reason)
|
|
|
+ })
|
|
|
+ .catch((req) => {
|
|
|
+ this.$message.warning(req.message)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (status==true) {
|
|
|
+ this.$message.success('通过成功')
|
|
|
+ this.getList()
|
|
|
+ } else if (status==false) {
|
|
|
+ this.$message.success('驳回成功')
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
adopt() {
|
|
|
+ var that =this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要通过的条目')
|
|
|
} else {
|
|
|
this.$confirm(
|
|
|
- '审核通过后,任务将发送给决策人,是否确定通过?',
|
|
|
+ '是否确定通过?',
|
|
|
'提示',
|
|
|
{
|
|
|
confirmButtonText: '确定',
|
|
@@ -331,15 +458,22 @@ export default {
|
|
|
type: 'warning',
|
|
|
}
|
|
|
)
|
|
|
- .then(() => {})
|
|
|
+ .then(() => {
|
|
|
+ this.audit(this.modification[0], 0, true)
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
return false
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- print(index,row) {debugger
|
|
|
+ print(row) {
|
|
|
+ getpaymentexamine({id:row.id}).toPromise().then((response) => {
|
|
|
+ this.isShowPrint = true
|
|
|
+ this.printData =response
|
|
|
+ })
|
|
|
+
|
|
|
// 打印价格对照表
|
|
|
- window.location.href="../../../static/payprint.html?data="+JSON.stringify(row)
|
|
|
+ // window.location.href="../../../static/payprint.html?data="+JSON.stringify(row)
|
|
|
},
|
|
|
examine() {
|
|
|
if (this.modification.length == 0) {
|
|
@@ -368,16 +502,18 @@ export default {
|
|
|
// },
|
|
|
selectInit(row) {
|
|
|
//在这里一定要记得类型匹配的上。
|
|
|
- if (row.approveStatus == null) {
|
|
|
- return true
|
|
|
- } else if (row.approveStatus != null) {
|
|
|
+ if(row.status!='已驳回'){
|
|
|
if (row.taskId == null) {
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
|
}
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
+
|
|
|
handleSelectionChange(val) {
|
|
|
this.modification = val
|
|
|
},
|
|
@@ -436,6 +572,21 @@ export default {
|
|
|
font-size: 16px;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
+table,
|
|
|
+table tr th,
|
|
|
+table tr td {
|
|
|
+ border: 2px solid #333333;
|
|
|
+ padding: 5px 0;
|
|
|
+}
|
|
|
+
|
|
|
+table {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 25px;
|
|
|
+ line-height: 25px;
|
|
|
+ text-align: center;
|
|
|
+ border-collapse: collapse;
|
|
|
+ border: 3px solid #333333;
|
|
|
+}
|
|
|
.formItem {
|
|
|
width: 70% !important;
|
|
|
}
|
|
@@ -446,5 +597,9 @@ export default {
|
|
|
/deep/.el-table--enable-row-transition .el-table__body td {
|
|
|
text-align: center;
|
|
|
}
|
|
|
+.title{
|
|
|
+ padding:10px;
|
|
|
+ text-align:center;
|
|
|
+}
|
|
|
</style>
|
|
|
|