|
|
@@ -68,31 +68,31 @@
|
|
|
<div class="oper">
|
|
|
<div class="oper-wrapper">
|
|
|
<div class="oper-item">
|
|
|
- <a-button>
|
|
|
+ <a-button @click="handleClick(1)">
|
|
|
<a-icon type="file" />
|
|
|
商品消费
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<div class="oper-item">
|
|
|
- <a-button>
|
|
|
+ <a-button @click="handleClick(2)">
|
|
|
<a-icon type="file" />
|
|
|
入账
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<div class="oper-item">
|
|
|
- <a-button>
|
|
|
+ <a-button @click="handleClick(3)">
|
|
|
<a-icon type="file" />
|
|
|
转账
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<div class="oper-item">
|
|
|
- <a-button>
|
|
|
+ <a-button @click="handleClick(4)">
|
|
|
<a-icon type="file" />
|
|
|
结算
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<div class="oper-item">
|
|
|
- <a-button>
|
|
|
+ <a-button @click="handleClick(5)">
|
|
|
<a-icon type="file" />
|
|
|
冲账
|
|
|
</a-button>
|
|
|
@@ -129,13 +129,25 @@
|
|
|
<div class="cotent">
|
|
|
|
|
|
</div>
|
|
|
+
|
|
|
+ <goods-consume-modal ref="goodsConsumeForm" @ok="modalFormOk" :agreementModel="agreementUnitInfo"></goods-consume-modal>
|
|
|
+ <account-enter-modal ref="accountEnterForm" @ok="modalFormOk"></account-enter-modal>
|
|
|
+ <account-reverse-entry-modal :maxMoney="parseFloat(accountModel.consume)" ref="accountReverseEnterForm" @ok="modalFormOk"></account-reverse-entry-modal>
|
|
|
+ <account-transfer-modal :maxMoney="parseFloat(accountModel.consume)" ref="accountTransferForm" @ok="modalFormOk"></account-transfer-modal>
|
|
|
+ <settlement-modal :maxMoney="parseFloat(accountModel.consume)" ref="settlementForm" @ok="modalFormOk"></settlement-modal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import moment from 'moment';
|
|
|
+import GoodsConsumeModal from './account/goodsConsumeModal'
|
|
|
+import AccountEnterModal from './account/accountEnterModal'
|
|
|
+import AccountReverseEntryModal from './account/accountReverseEntryModal'
|
|
|
+import AccountTransferModal from './account/accountTransferModal'
|
|
|
+import SettlementModal from './account/settlementModal'
|
|
|
export default {
|
|
|
name: 'agreementAccount',
|
|
|
+ components: { SettlementModal, AccountTransferModal, AccountReverseEntryModal, AccountEnterModal, GoodsConsumeModal },
|
|
|
data() {
|
|
|
var my_date = new Date();
|
|
|
var first_date = new Date(my_date.getFullYear(), my_date.getMonth(), 1);
|
|
|
@@ -165,7 +177,7 @@ export default {
|
|
|
this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
|
|
|
|
|
|
var temp = {
|
|
|
- consume: '0',
|
|
|
+ consume: '20',
|
|
|
payment: '0',
|
|
|
used: '0',
|
|
|
surplus: '0'
|
|
|
@@ -180,7 +192,37 @@ export default {
|
|
|
},
|
|
|
onTypeChange(e) {
|
|
|
console.log(e);
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleClick(type){
|
|
|
+ console.log('当前类型: '+type);
|
|
|
+ if (type == 1){
|
|
|
+ this.$refs.goodsConsumeForm.edit();
|
|
|
+ this.$refs.goodsConsumeForm.title="商品消费";
|
|
|
+ this.$refs.goodsConsumeForm.disableSubmit = true;
|
|
|
+ }
|
|
|
+ else if(type == 2){
|
|
|
+ this.$refs.accountEnterForm.edit();
|
|
|
+ this.$refs.accountEnterForm.title="入账";
|
|
|
+ this.$refs.accountEnterForm.disableSubmit = true;
|
|
|
+ }
|
|
|
+ else if(type == 3){
|
|
|
+ this.$refs.accountTransferForm.edit();
|
|
|
+ this.$refs.accountTransferForm.title="转账";
|
|
|
+ this.$refs.accountTransferForm.disableSubmit = true;
|
|
|
+ }
|
|
|
+ else if(type == 4){
|
|
|
+ this.$refs.settlementForm.edit();
|
|
|
+ this.$refs.settlementForm.title="结算";
|
|
|
+ this.$refs.settlementForm.disableSubmit = true;
|
|
|
+ }
|
|
|
+ else if(type == 5){
|
|
|
+ this.$refs.accountReverseEnterForm.edit();
|
|
|
+ this.$refs.accountReverseEnterForm.title="冲账";
|
|
|
+ this.$refs.accountReverseEnterForm.disableSubmit = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ modalFormOk() {
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|