|
@@ -5,14 +5,7 @@
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
- <div class="upper_right_button">
|
|
|
- <el-button type="primary"
|
|
|
- class="el-button--small-yh"
|
|
|
- size="small"
|
|
|
- :loading="buttonLoading"
|
|
|
- :disabled="true"
|
|
|
- @click.stop="">请核
|
|
|
- </el-button>
|
|
|
+ <div v-if="!checkDisabled" class="upper_right_button">
|
|
|
<el-button type="warning"
|
|
|
size="small"
|
|
|
class="el-button--small-yh "
|
|
@@ -20,12 +13,6 @@
|
|
|
:disabled="!form.id"
|
|
|
@click.stop="applyPayment('申请')">申请货款
|
|
|
</el-button>
|
|
|
-<!-- <el-button type="warning"
|
|
|
- size="small"
|
|
|
- class="el-button--small-yh "
|
|
|
- :loading="buttonLoading"
|
|
|
- @click.stop="applyPayment()">取消货款
|
|
|
- </el-button>-->
|
|
|
<el-button type="info"
|
|
|
size="small"
|
|
|
:loading="buttonLoading"
|
|
@@ -57,6 +44,22 @@
|
|
|
>{{form.id?'确认修改':'确认新增'}}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
+ <div v-if="checkDisabled" class="upper_right_button">
|
|
|
+ <el-button type="success"
|
|
|
+ size="small"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ :loading="buttonLoading"
|
|
|
+ @click.stop="approveOperation(1)">
|
|
|
+ 审核通过
|
|
|
+ </el-button>
|
|
|
+ <el-button type="warning"
|
|
|
+ size="small"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ :loading="buttonLoading"
|
|
|
+ @click.stop="approveOperation(2)">
|
|
|
+ 审核驳回
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="customer-main">
|
|
@@ -230,14 +233,14 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- :disabled="row.actualQuantity !=0"
|
|
|
+ :disabled="row.actualQuantity !=0 || checkDisabled"
|
|
|
@click="rowCell(row,index)"
|
|
|
>{{ row.$cellEdit ? '修改完成' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- :disabled="row.actualQuantity !=0"
|
|
|
+ :disabled="row.actualQuantity !=0 || checkDisabled"
|
|
|
@click="rowDel(row,index)"
|
|
|
>删除
|
|
|
</el-button>
|
|
@@ -246,12 +249,14 @@
|
|
|
<el-button type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
+ :disabled=" checkDisabled"
|
|
|
@click="commoditySelection"
|
|
|
>录入明细
|
|
|
</el-button>
|
|
|
<el-button type="warning"
|
|
|
size="small"
|
|
|
- :disabled="selectContact.length == 0"
|
|
|
+
|
|
|
+ :disabled="selectContact.length == 0 || checkDisabled"
|
|
|
@click="beforePage(false)"
|
|
|
>生成收货单
|
|
|
</el-button>
|
|
@@ -261,12 +266,14 @@
|
|
|
<fee-info
|
|
|
ref="feeInfo"
|
|
|
:orderFeesList="orderFeesList"
|
|
|
+ :disabled="checkDisabled"
|
|
|
@beforeFinance="beforeFinance"
|
|
|
feeUrl=""
|
|
|
/>
|
|
|
<upload-file
|
|
|
ref="uploadFile"
|
|
|
title="合同附件"
|
|
|
+ :disabled="checkDisabled"
|
|
|
:orderFilesList="orderFilesList"
|
|
|
delUrl=""
|
|
|
/>
|
|
@@ -302,6 +309,7 @@
|
|
|
v-dialog-drag
|
|
|
>
|
|
|
<apply-payment
|
|
|
+ :billUrl="billUrl"
|
|
|
:billType="billType"
|
|
|
:billData="billData"
|
|
|
@choceFun="choceFun"
|
|
@@ -326,6 +334,8 @@ import billApplication from "@/components/bill/billApplication";
|
|
|
import { corpsattn } from "@/api/basicData/configuration"
|
|
|
import { contrastObj,contrastList } from "@/util/contrastData";
|
|
|
import ApplyPayment from "../../../components/finance/applyPayment";
|
|
|
+import { approvePass } from "@/api/approveData/main"
|
|
|
+
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
props: {
|
|
@@ -351,7 +361,9 @@ export default {
|
|
|
applicationDialog:false,
|
|
|
commodityData: false,
|
|
|
takeDisabled:false, //收货状态
|
|
|
+ checkDisabled:false,
|
|
|
tableData: [],
|
|
|
+ billUrl:"/purchase/contract/index",
|
|
|
billType:"",
|
|
|
billData:{},
|
|
|
contractTypeDic:[],
|
|
@@ -682,7 +694,7 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '已付金额',
|
|
|
+ label: '已付人民币金额',
|
|
|
prop: 'settlmentAmount',
|
|
|
disabled: true,
|
|
|
rules: [
|
|
@@ -694,6 +706,18 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
+ label: '已付外币金额',
|
|
|
+ prop: 'foreignSettlmentAmount',
|
|
|
+ disabled: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '发票重量',
|
|
|
prop: 'invoiceWeight',
|
|
|
disabled: true,
|
|
@@ -750,7 +774,17 @@ export default {
|
|
|
}).finally(()=>{
|
|
|
this.buttonLoading = false;
|
|
|
})
|
|
|
- }else{
|
|
|
+ } if(this.detailData.check){
|
|
|
+ this.checkDisabled = true
|
|
|
+ this.buttonLoading = true;
|
|
|
+ detailListData(this.detailData.check.billId).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.afterEcho(res.data.data)
|
|
|
+ }).finally(()=>{
|
|
|
+ this.buttonLoading = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else{
|
|
|
this.$set(this.form,"currency","USD")
|
|
|
this.$set(this.form,"exchangeRate",6.3686)
|
|
|
}
|
|
@@ -816,25 +850,31 @@ export default {
|
|
|
beforeFinance(feesData,callback){
|
|
|
this.orderFeesList = feesData;
|
|
|
let params = {}
|
|
|
- if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
|
|
|
- || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
|
|
|
- ){
|
|
|
- this.$confirm("数据发生变化,请先提交保存?", {
|
|
|
- confirmButtonText: "保存",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.editCustomer();
|
|
|
- }).finally(()=>{
|
|
|
- params.valid = false
|
|
|
- callback(params)
|
|
|
- })
|
|
|
- }else{
|
|
|
- params.valid = true
|
|
|
- params.parentId = this.form.id
|
|
|
- params.srcOrderno = this.form.orderNo
|
|
|
- callback(params)
|
|
|
- }
|
|
|
+ params.valid = true
|
|
|
+ params.parentId = this.form.id
|
|
|
+ params.srcOrderno = this.form.orderNo
|
|
|
+ callback(params)
|
|
|
+
|
|
|
+ //传过来的数据 会根据应收应付的顺序放到 orderFeesList 这个时候与旧值对比 会对比失败 后端查费用明细时 按照应收应付顺序 进行排序
|
|
|
+ // if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
|
|
|
+ // || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
|
|
|
+ // ){
|
|
|
+ // this.$confirm("数据发生变化,请先提交保存?", {
|
|
|
+ // confirmButtonText: "保存",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning"
|
|
|
+ // }).then(() => {
|
|
|
+ // this.editCustomer();
|
|
|
+ // }).finally(()=>{
|
|
|
+ // params.valid = false
|
|
|
+ // callback(params)
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // params.valid = true
|
|
|
+ // params.parentId = this.form.id
|
|
|
+ // params.srcOrderno = this.form.orderNo
|
|
|
+ // callback(params)
|
|
|
+ // }
|
|
|
},
|
|
|
//修改提交触发
|
|
|
editCustomer(status) {
|
|
@@ -1045,6 +1085,17 @@ export default {
|
|
|
this.applyPaymentDialog = true;
|
|
|
}
|
|
|
},
|
|
|
+ approveOperation(operate){
|
|
|
+ this.detailData.check.operate = operate
|
|
|
+ this.buttonLoading = true;
|
|
|
+ approvePass(this.detailData.check).then(res=>{
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+
|
|
|
+ //操作成功之后需要 禁用通过驳回吗》‘
|
|
|
+ }).finally(()=>{
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
//新增商品明细保存触发
|
|
|
rowSave(row, done, loading) {
|
|
|
// this.contactsData.push(row)
|