|
|
@@ -27,43 +27,32 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
- <div v-if="activeComp === 'main'">
|
|
|
- <!--采购表单表单-->
|
|
|
+ <div v-show="activeComp === 'main'">
|
|
|
+ <!--采购对账单信息-->
|
|
|
<purchase-form
|
|
|
:dataForm.sync="dataForm"
|
|
|
:datasource.sync="datasource"
|
|
|
dialogType="view"
|
|
|
></purchase-form>
|
|
|
- <headerTitle title="对账明细" style="margin-top: 30px">
|
|
|
- <template v-slot>
|
|
|
- <el-row style="font-weight: 700; color: red">
|
|
|
- <span>订单总金额:</span>
|
|
|
- <span>{{ dataForm.orderTotalAmount || 0 }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>已对账金额:</span>
|
|
|
- <span>{{ dataForm.amountCompletePrice || 0 }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>未对账金额:</span>
|
|
|
- <span>{{ dataForm.amountUnCompletePrice || 0 }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>本次对账总金额:</span>
|
|
|
- <span>{{ dataForm.amountTotalPrice || 0 }}</span>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </headerTitle>
|
|
|
- <!-- <recorpayTableList
|
|
|
- ref="recorpayListRef"
|
|
|
- :dataForm="dataForm"
|
|
|
- :recorpayList.sync="recorpayList"
|
|
|
- dialogType="view"
|
|
|
- ></recorpayTableList> -->
|
|
|
- <inventoryTable
|
|
|
- ref="inventoryTableref"
|
|
|
- :dataForm="dataForm"
|
|
|
+
|
|
|
+ <headerTitle title="应付信息" style="margin-top: 30px"></headerTitle>
|
|
|
+ <payables-info
|
|
|
+ :dataForm.sync="dataForm"
|
|
|
+ :payablesList="payablesList"
|
|
|
+ :dialogType="dialogType"
|
|
|
+ ref="payablesInfoRef"
|
|
|
+ ></payables-info>
|
|
|
+
|
|
|
+ <headerTitle title="对账明细" style="margin-top: 30px"></headerTitle>
|
|
|
+ <account-detail-table
|
|
|
+ ref="accountDetailTableRef"
|
|
|
:datasource.sync="datasource"
|
|
|
- dialogType="view"
|
|
|
- type="purchase"
|
|
|
- ></inventoryTable>
|
|
|
+ :dialogType="dialogType"
|
|
|
+ :queryDimension="dataForm.queryDimension"
|
|
|
+ @totalChange="handleTotalChange"
|
|
|
+ @countChange="handleCountChange"
|
|
|
+ @statementAmountChange="handleStatementAmountChange"
|
|
|
+ ></account-detail-table>
|
|
|
</div>
|
|
|
|
|
|
<bpmDetail
|
|
|
@@ -79,19 +68,18 @@
|
|
|
|
|
|
<script>
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
- // import InventoryTable from './inventoryTable.vue';
|
|
|
import { accountstatementInfoAPI } from '@/api/saleManage/accountstatement';
|
|
|
import purchaseForm from './purchaseForm.vue';
|
|
|
- import InventoryTable from '@/views/saleManage/saleOrder/accountstatement/components/inventoryTable.vue';
|
|
|
- // import recorpayTableList from '@/views/saleManage/saleOrder/accountstatement/components/recorpayTableList.vue';
|
|
|
+ import payablesInfo from './payablesInfo.vue';
|
|
|
+ import AccountDetailTable from '@/views/saleManage/saleOrder/accountstatement/components/accountDetailTable.vue';
|
|
|
|
|
|
export default {
|
|
|
props: ['detailDialogFlag'],
|
|
|
components: {
|
|
|
purchaseForm,
|
|
|
- InventoryTable,
|
|
|
- bpmDetail,
|
|
|
- // recorpayTableList
|
|
|
+ payablesInfo,
|
|
|
+ AccountDetailTable,
|
|
|
+ bpmDetail
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -104,7 +92,9 @@
|
|
|
form: {},
|
|
|
dataForm: {},
|
|
|
datasource: [],
|
|
|
- recorpayList:[],
|
|
|
+ payablesList: [],
|
|
|
+ statPayable: null,
|
|
|
+ dialogType: 'view',
|
|
|
title: '详情',
|
|
|
fullscreen: false
|
|
|
};
|
|
|
@@ -115,22 +105,24 @@
|
|
|
this.dialogType = dialogType;
|
|
|
this.dataForm.type = type;
|
|
|
let data = await accountstatementInfoAPI(row.id);
|
|
|
- data.orderTotalAmount = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.orderAmount * 100), 0) / 100;
|
|
|
- data.amountTotalPrice = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.statementAmount * 100), 0) / 100;
|
|
|
- data.amountCompletePrice = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.statementedAmount * 100), 0) / 100;
|
|
|
- data.amountUnCompletePrice = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.unStatementAmount * 100), 0) / 100;
|
|
|
- this.datasource = data.orderList||[];
|
|
|
- this.recorpayList = data.recorpayList || [];
|
|
|
- this.dataForm = data;
|
|
|
+ this.datasource = data.productList || [];
|
|
|
+ this.payablesList =
|
|
|
+ (data.statPayable && data.statPayable.statPayableDetailList) || [];
|
|
|
+ // 保存查询到的完整 statPayable 对象,提交时回填使用(详情页只读,但保留字段方便编辑场景扩展)
|
|
|
+ this.statPayable = data.statPayable || null;
|
|
|
+ this.dataForm = {
|
|
|
+ ...this.dataForm,
|
|
|
+ ...data
|
|
|
+ };
|
|
|
switch (this.dataForm.dateType) {
|
|
|
case 1:
|
|
|
this.dataForm.year = this.dataForm.dateValue;
|
|
|
break;
|
|
|
case 2:
|
|
|
//2023年-四季度
|
|
|
- let data = this.dataForm.dateValue.split('年-');
|
|
|
- this.dataForm.year = data[0];
|
|
|
- this.dataForm.quarter = data[1];
|
|
|
+ let dateArr = this.dataForm.dateValue.split('年-');
|
|
|
+ this.dataForm.year = dateArr[0];
|
|
|
+ this.dataForm.quarter = dateArr[1];
|
|
|
break;
|
|
|
case 3:
|
|
|
this.dataForm.month = this.dataForm.dateValue;
|
|
|
@@ -143,6 +135,18 @@
|
|
|
];
|
|
|
}
|
|
|
},
|
|
|
+ handleTotalChange(total) {
|
|
|
+ this.dataForm.amountTotalPrice = total;
|
|
|
+ },
|
|
|
+ handleCountChange(count) {
|
|
|
+ this.dataForm.totalStatementCount = count;
|
|
|
+ },
|
|
|
+ // 对账明细按采购单号汇总本次对账金额,同步到应付信息对应行
|
|
|
+ handleStatementAmountChange(summaryMap) {
|
|
|
+ if (this.$refs.payablesInfoRef) {
|
|
|
+ this.$refs.payablesInfoRef.syncStatementAmount(summaryMap);
|
|
|
+ }
|
|
|
+ },
|
|
|
cancel() {
|
|
|
this.$emit('update:detailDialogFlag', false);
|
|
|
}
|