|
@@ -7,10 +7,14 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<el-button type="primary"
|
|
|
- class="el-button--small-yh add-customer-btn-three"
|
|
|
+ class="el-button--small-yh add-customer-btn-four"
|
|
|
:disabled="true"
|
|
|
@click.stop="">请核
|
|
|
</el-button>
|
|
|
+ <el-button type="warning"
|
|
|
+ class="el-button--small-yh add-customer-btn-three"
|
|
|
+ @click.stop="applyPayment()">申请货款
|
|
|
+ </el-button>
|
|
|
<el-button type="success"
|
|
|
class="el-button--small-yh add-customer-btn-two"
|
|
|
:disabled="true"
|
|
@@ -108,17 +112,17 @@
|
|
|
</el-select>
|
|
|
<span v-else>{{ row.itemType }}</span>
|
|
|
</template>
|
|
|
- <template slot="purchaseQuantity" slot-scope="{ row }">
|
|
|
+ <template slot="orderQuantity" slot-scope="{ row }">
|
|
|
<span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<el-input
|
|
|
v-if="row.$cellEdit"
|
|
|
- v-model="row.purchaseQuantity"
|
|
|
+ v-model="row.orderQuantity"
|
|
|
placeholder="请输入"
|
|
|
size="small"
|
|
|
style="width: 93%"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
></el-input>
|
|
|
- <span v-else>{{ row.purchaseQuantity }}</span>
|
|
|
+ <span v-else>{{ row.orderQuantity }}</span>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
<el-input
|
|
@@ -183,13 +187,6 @@
|
|
|
@click="beforePage(false)"
|
|
|
>生成收货单
|
|
|
</el-button>
|
|
|
- <el-button type="warning"
|
|
|
- icon="el-icon-s-check"
|
|
|
- size="small"
|
|
|
- :disabled="selectContact.length == 0"
|
|
|
- @click="beforePage(true)"
|
|
|
- >申请付款(开证)
|
|
|
- </el-button>
|
|
|
<el-button type="info"
|
|
|
size="small"
|
|
|
@click="applicationDialog = true,applicationData = contactsData"
|
|
@@ -201,6 +198,8 @@
|
|
|
<fee-info
|
|
|
ref="feeInfo"
|
|
|
:orderFeesList="orderFeesList"
|
|
|
+ :billData="billData"
|
|
|
+ :beforeBillData="beforeBillData"
|
|
|
feeUrl=""
|
|
|
/>
|
|
|
<upload-file
|
|
@@ -278,6 +277,23 @@
|
|
|
<el-button @click="applicationDialog = false ">关 闭</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ append-to-body
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="applyPaymentDialog"
|
|
|
+ width="60%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ v-dialog-drag
|
|
|
+ >
|
|
|
+ <apply-payment
|
|
|
+ :billType="billType"
|
|
|
+ :billData="billData"
|
|
|
+ :choceFun="!applyPaymentDialog"
|
|
|
+ >
|
|
|
+ </apply-payment>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -298,6 +314,7 @@ import { getList } from "@/api/basicData/commodityType"
|
|
|
import { contrastObj,contrastList } from "@/util/contrastData";
|
|
|
import {getSpecification} from "@/api/exportTrade/purchaseContract";
|
|
|
import option from "./config/mainList.json";
|
|
|
+import ApplyPayment from "../../../components/finance/applyPayment";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
props: {
|
|
@@ -312,12 +329,15 @@ export default {
|
|
|
customerContact: {},
|
|
|
contactsForm: {},
|
|
|
contactsData: [],
|
|
|
+ applyPaymentDialog:false,
|
|
|
dialogVisible:false,
|
|
|
commodityData: false,
|
|
|
tableData: [],
|
|
|
optionTwo: commodity,
|
|
|
loading: false,
|
|
|
data: [],
|
|
|
+ billType:"CG",
|
|
|
+ billData:{},
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
@@ -473,9 +493,10 @@ export default {
|
|
|
},{
|
|
|
label: '合同号',
|
|
|
prop: 'orderNo',
|
|
|
+ disabled:false,
|
|
|
rules: [
|
|
|
{
|
|
|
- required: true,
|
|
|
+ required: false,
|
|
|
message: ' ',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
@@ -676,7 +697,7 @@ export default {
|
|
|
async created() {
|
|
|
this.customerContact = await this.getColumnData(this.getColumnName(37), customerContact);
|
|
|
//币别
|
|
|
- this.getWorkDicts("currency").then(res =>{
|
|
|
+ this.getWorkDicts("entrance_currency").then(res =>{
|
|
|
this.currencyDic = res.data.data
|
|
|
})
|
|
|
this.getWorkDicts("contractType").then(res =>{
|
|
@@ -706,11 +727,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- this.$set(this.form,"currency","美元")
|
|
|
+ this.$set(this.form,"currency","USD")
|
|
|
this.$set(this.form,"exchangeRate",6.3843)
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
+ ApplyPayment,
|
|
|
feeInfo,
|
|
|
uploadFile
|
|
|
},
|
|
@@ -736,15 +758,15 @@ export default {
|
|
|
//带出人民币
|
|
|
currencyChange(){
|
|
|
if(this.form.orderAmount){
|
|
|
- if(this.form.currency === "人民币"){
|
|
|
+ if(this.form.currency === "CNY"){
|
|
|
this.form.exchangeRate = 1
|
|
|
- this.form.rmbAmount = this.form.orderAmount
|
|
|
+ this.$set(this.form,"rmbAmount",this.form.orderAmount)
|
|
|
}else{
|
|
|
this.form.exchangeRate = 6.3843
|
|
|
- this.form.rmbAmount = _.multiply(this.form.orderAmount, 6.3843)
|
|
|
+ this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, 6.3843).toFixed(2))
|
|
|
}
|
|
|
}else{
|
|
|
- this.form.rmbAmount = ""
|
|
|
+ this.$set(this.form,"rmbAmount","")
|
|
|
}
|
|
|
},
|
|
|
//合计
|
|
@@ -766,11 +788,11 @@ export default {
|
|
|
},
|
|
|
//件数
|
|
|
// quantityChange(row) {
|
|
|
- // if (!row.purchaseQuantity) {
|
|
|
- // row.purchaseQuantity = "";
|
|
|
+ // if (!row.orderQuantity) {
|
|
|
+ // row.orderQuantity = "";
|
|
|
// row.amount = 0
|
|
|
// } else {
|
|
|
- // row.amount =_.multiply(row.purchaseQuantity,row.price).toFixed(2);
|
|
|
+ // row.amount =_.multiply(row.orderQuantity,row.price).toFixed(2);
|
|
|
// }
|
|
|
// },
|
|
|
//修改提交触发
|
|
@@ -797,10 +819,10 @@ export default {
|
|
|
if (this.contactsData[j].priceCategory === "") {
|
|
|
return this.$message.error(`请输入采购明细第${j + 1}行的货物品种`);
|
|
|
}
|
|
|
- if (this.contactsData[j].purchaseQuantity === "") {
|
|
|
+ if (this.contactsData[j].orderQuantity === "") {
|
|
|
return this.$message.error(`请输入采购明细第${j + 1}行的件数`);
|
|
|
}
|
|
|
- if (this.contactsData[j].purchaseQuantity == 0) {
|
|
|
+ if (this.contactsData[j].orderQuantity == 0) {
|
|
|
return this.$message.error(`采购明细第${j + 1}行的件数不能为0`);
|
|
|
}
|
|
|
}
|
|
@@ -873,20 +895,20 @@ export default {
|
|
|
}else{
|
|
|
if(type){
|
|
|
//进入付款管理
|
|
|
- if(this.$store.getters.payStatus){
|
|
|
- this.$alert("付款页面已存在,请关闭付款页面再进行操作", "温馨提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- type: 'warning',
|
|
|
- callback: action => {
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
- this.$router.$avueRouter.closeTag('/financialManagement/payment');
|
|
|
- this.$router.push({
|
|
|
- path: "/financialManagement/payment",
|
|
|
- query: {params: params},
|
|
|
- });
|
|
|
- }
|
|
|
+ // if(this.$store.getters.payStatus){
|
|
|
+ // this.$alert("付款页面已存在,请关闭付款页面再进行操作", "温馨提示", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // type: 'warning',
|
|
|
+ // callback: action => {
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // this.$router.$avueRouter.closeTag('/financialManagement/payment');
|
|
|
+ // this.$router.push({
|
|
|
+ // path: "/financialManagement/payment",
|
|
|
+ // query: {params: params},
|
|
|
+ // });
|
|
|
+ // }
|
|
|
}else{
|
|
|
//进入收货单
|
|
|
if(this.$store.getters.takeStatus){
|
|
@@ -916,6 +938,36 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ beforeBillData(type){
|
|
|
+ this.billData = {
|
|
|
+ accSysNo:this.form.orderNo,
|
|
|
+ accDate:this.form.businesDate,
|
|
|
+ currency:this.form.currency,
|
|
|
+ exchangeRate:this.form.exchangeRate,
|
|
|
+ billType:"CG",
|
|
|
+ srcParentId:this.form.id,
|
|
|
+ }
|
|
|
+ if(type){ //申请货款
|
|
|
+ this.billData.srcId = -1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 付款
|
|
|
+ applyPayment(){
|
|
|
+ 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();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.beforeBillData(true);
|
|
|
+ this.applyPaymentDialog = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
//选择货物品种
|
|
|
choice(row){
|
|
|
this.dialogVisible = true;
|
|
@@ -1139,6 +1191,11 @@ export default {
|
|
|
right: 266px;
|
|
|
top: 115px;
|
|
|
}
|
|
|
+.add-customer-btn-four {
|
|
|
+ position: fixed;
|
|
|
+ right: 385px;
|
|
|
+ top: 115px;
|
|
|
+}
|
|
|
.add-customer-btn {
|
|
|
position: fixed;
|
|
|
right: 36px;
|