|
@@ -5,7 +5,7 @@
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
- <div v-if="!checkDisabled" class="upper_right_button">
|
|
|
+ <div class="upper_right_button">
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
|
v-if="viewDisabled"
|
|
@@ -13,33 +13,63 @@
|
|
|
:loading="buttonLoading"
|
|
|
@click.stop="openDisabled()">编辑
|
|
|
</el-button>
|
|
|
- <el-button type="warning"
|
|
|
- size="small"
|
|
|
- class="el-button--small-yh "
|
|
|
- :loading="buttonLoading"
|
|
|
- :disabled="!form.id || viewDisabled"
|
|
|
- @click.stop="applyPayment('申请')">申请货款
|
|
|
- </el-button>
|
|
|
- <el-button type="info"
|
|
|
- size="small"
|
|
|
- :loading="buttonLoading"
|
|
|
- :disabled="!form.id || viewDisabled"
|
|
|
- @click="openApplicationDialog"
|
|
|
- >查看申请记录
|
|
|
- </el-button>
|
|
|
- <el-button type="warning"
|
|
|
- size="small"
|
|
|
- class="el-button--small-yh "
|
|
|
- :loading="buttonLoading"
|
|
|
- :disabled="!form.id || viewDisabled"
|
|
|
- @click.stop="applyPayment('收费')">退款
|
|
|
- </el-button>
|
|
|
+
|
|
|
+ <el-dropdown style="padding: 0 8px;line-height: 0">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 账单处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ @click.native="applyPayment('申请')">申请货款
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ @click.native="applyPayment('收费')">退款
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ :loading="buttonLoading"
|
|
|
+ :disabled="!form.id || viewDisabled"
|
|
|
+ @click.native="openApplicationDialog">查看付款记录
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
+
|
|
|
+<!-- <el-button type="warning"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- class="el-button--small-yh "-->
|
|
|
+<!-- :loading="buttonLoading"-->
|
|
|
+<!-- :disabled="!form.id || viewDisabled"-->
|
|
|
+<!-- @click.stop="applyPayment('申请')">申请货款-->
|
|
|
+<!-- </el-button>-->
|
|
|
+<!-- <el-button type="info"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- :loading="buttonLoading"-->
|
|
|
+<!-- :disabled="!form.id || viewDisabled"-->
|
|
|
+<!-- @click="openApplicationDialog"-->
|
|
|
+<!-- >查看付款记录-->
|
|
|
+<!-- </el-button>-->
|
|
|
+<!-- <el-button type="warning"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- class="el-button--small-yh "-->
|
|
|
+<!-- :loading="buttonLoading"-->
|
|
|
+<!-- :disabled="!form.id || viewDisabled"-->
|
|
|
+<!-- @click.stop="applyPayment('收费')">退款-->
|
|
|
+<!-- </el-button>-->
|
|
|
<el-button type="success"
|
|
|
size="small"
|
|
|
:loading="buttonLoading"
|
|
|
class="el-button--small-yh "
|
|
|
:disabled="true"
|
|
|
- @click.stop="">复制新单
|
|
|
+ @click.stop="">复制单据
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
class="el-button--small-yh "
|
|
@@ -48,25 +78,9 @@
|
|
|
:disabled="disabled || viewDisabled"
|
|
|
@click="editCustomer"
|
|
|
:loading="buttonLoading"
|
|
|
- >{{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">
|
|
@@ -152,10 +166,10 @@
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item,index) in row.specificationList"
|
|
|
+ v-for="(item,index) in itemTypeList"
|
|
|
:key="index"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value"
|
|
|
+ :label="item"
|
|
|
+ :value="item"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -171,7 +185,7 @@
|
|
|
size="small"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
></el-input>
|
|
|
- <span v-else>{{ row.orderQuantity }}</span>
|
|
|
+ <span v-else>{{ row.orderQuantity | roundNumbers}}</span>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
<span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
@@ -234,20 +248,23 @@
|
|
|
>
|
|
|
<i slot="suffix" style="margin-top:3px;margin-right: 10px;display:inline-block">%</i>
|
|
|
</el-input>
|
|
|
- <span v-else>{{ row.taxRate }}</span>
|
|
|
+ <span v-else>{{ row.taxRate | isPercentage }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="actualQuantity" slot-scope="{ row }">
|
|
|
+ <span>{{ row.actualQuantity | roundNumbers}}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- :disabled="row.actualQuantity !=0 || checkDisabled || viewDisabled"
|
|
|
+ :disabled="row.actualQuantity !=0 || viewDisabled"
|
|
|
@click="rowCell(row,index)"
|
|
|
>{{ row.$cellEdit ? '修改完成' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- :disabled="row.actualQuantity !=0 || checkDisabled || viewDisabled"
|
|
|
+ :disabled="row.actualQuantity !=0 || viewDisabled"
|
|
|
@click="rowDel(row,index)"
|
|
|
>删除
|
|
|
</el-button>
|
|
@@ -256,14 +273,14 @@
|
|
|
<el-button type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
- :disabled=" checkDisabled || viewDisabled"
|
|
|
+ :disabled=" viewDisabled"
|
|
|
@click="commoditySelection"
|
|
|
>录入明细
|
|
|
</el-button>
|
|
|
<el-button type="warning"
|
|
|
size="small"
|
|
|
|
|
|
- :disabled="selectContact.length == 0 || checkDisabled || viewDisabled"
|
|
|
+ :disabled="selectContact.length == 0 || viewDisabled"
|
|
|
@click="beforePage(false)"
|
|
|
>生成收货单
|
|
|
</el-button>
|
|
@@ -273,22 +290,21 @@
|
|
|
<fee-info
|
|
|
ref="feeInfo"
|
|
|
:orderFeesList="orderFeesList"
|
|
|
- :disabled="checkDisabled || viewDisabled"
|
|
|
+ :disabled="viewDisabled"
|
|
|
@beforeFinance="beforeFinance"
|
|
|
feeUrl=""
|
|
|
/>
|
|
|
<upload-file
|
|
|
ref="uploadFile"
|
|
|
title="合同附件"
|
|
|
- :disabled="checkDisabled || viewDisabled"
|
|
|
+ :disabled="viewDisabled"
|
|
|
:orderFilesList="orderFilesList"
|
|
|
delUrl=""
|
|
|
/>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
-
|
|
|
<el-dialog
|
|
|
- title="申请记录"
|
|
|
+ title="付款记录"
|
|
|
append-to-body
|
|
|
class="el-dialogDeep"
|
|
|
:visible.sync="applicationDialog"
|
|
@@ -336,12 +352,12 @@ import {detailListData, submitData} from "@/api/importTrade/purchase";
|
|
|
import feeInfo from "@/components/fee-info/main";
|
|
|
import uploadFile from "@/components/upload-file/main";
|
|
|
import _ from "lodash";
|
|
|
+import { isPercentage,roundNumbers } from "@/util/validate";
|
|
|
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",
|
|
@@ -350,6 +366,14 @@ export default {
|
|
|
type: Object
|
|
|
}
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ isPercentage(val) {
|
|
|
+ return isPercentage(val);
|
|
|
+ },
|
|
|
+ roundNumbers(val){
|
|
|
+ return roundNumbers(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
ApplyPayment,
|
|
|
feeInfo,
|
|
@@ -363,15 +387,15 @@ export default {
|
|
|
customerContact: {},
|
|
|
contactsForm: {},
|
|
|
contactsData: [],
|
|
|
+ itemTypeList:[],
|
|
|
buttonLoading:false,
|
|
|
applyPaymentDialog:false,
|
|
|
applicationDialog:false,
|
|
|
commodityData: false,
|
|
|
takeDisabled:false, //收货状态
|
|
|
- checkDisabled:false,
|
|
|
viewDisabled:false,
|
|
|
tableData: [],
|
|
|
- billUrl:"/purchase/contract/index",
|
|
|
+ billUrl:"/financialManagement/paymentRequest/paymentRequest",
|
|
|
billType:"",
|
|
|
billData:{},
|
|
|
contractTypeDic:[],
|
|
@@ -554,7 +578,8 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '合同重量(吨)',
|
|
|
prop: 'contractWeight',
|
|
|
rules: [
|
|
@@ -787,25 +812,16 @@ export default {
|
|
|
}).finally(()=>{
|
|
|
this.buttonLoading = false;
|
|
|
})
|
|
|
- } 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{
|
|
|
+ } else{
|
|
|
this.$set(this.form,"currency","USD")
|
|
|
this.$set(this.form,"exchangeRate",6.3686)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
valueName(value,row){
|
|
|
- this.$set(row,"priceCategory",value)
|
|
|
- this.$set(row,"itemId",value) //将id 赋值给itemId 提单号查询合同号时使用
|
|
|
+ this.itemTypeList = value.list
|
|
|
+ this.$set(row,"priceCategory",value.id)
|
|
|
+ this.$set(row,"itemId",value.id) //将id 赋值给itemId 提单号查询合同号时使用
|
|
|
},
|
|
|
//单价
|
|
|
priceChange(row) {
|
|
@@ -1101,17 +1117,6 @@ 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)
|
|
@@ -1214,6 +1219,7 @@ export default {
|
|
|
position: fixed;
|
|
|
right: 12px;
|
|
|
top: 47px;
|
|
|
+ align-items: flex-start;
|
|
|
}
|
|
|
.required_fields{
|
|
|
color: #F56C6C;
|