给收入单和支出单增加收支项目下拉框的快捷录入框
This commit is contained in:
@@ -234,6 +234,7 @@
|
|||||||
<div slot="dropdownRender" slot-scope="menu">
|
<div slot="dropdownRender" slot-scope="menu">
|
||||||
<v-nodes :vnodes="menu" />
|
<v-nodes :vnodes="menu" />
|
||||||
<slot name="depotAdd" v-if="col.key === 'depotId'" :target="getVM()"/>
|
<slot name="depotAdd" v-if="col.key === 'depotId'" :target="getVM()"/>
|
||||||
|
<slot name="inOutItemAdd" v-if="col.key === 'inOutItemId'" :target="getVM()"/>
|
||||||
</div>
|
</div>
|
||||||
<!--<template v-for="(opt,optKey) in col.options">-->
|
<!--<template v-for="(opt,optKey) in col.options">-->
|
||||||
<!--<a-select-option :value="opt.value" :key="optKey">{{ opt.title }}</a-select-option>-->
|
<!--<a-select-option :value="opt.value" :key="optKey">{{ opt.title }}</a-select-option>-->
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ export const FinancialModalMixin = {
|
|||||||
billStatus: '0',
|
billStatus: '0',
|
||||||
isCanCheck: true,
|
isCanCheck: true,
|
||||||
quickBtn: {
|
quickBtn: {
|
||||||
person: false
|
vendor: false,
|
||||||
|
customer: false,
|
||||||
|
account: false,
|
||||||
|
person: false,
|
||||||
|
inOutItem: false
|
||||||
},
|
},
|
||||||
/* 原始审核是否开启 */
|
/* 原始审核是否开启 */
|
||||||
checkFlag: true,
|
checkFlag: true,
|
||||||
@@ -191,6 +195,11 @@ export const FinancialModalMixin = {
|
|||||||
this.$refs.personModalForm.title = "新增经手人";
|
this.$refs.personModalForm.title = "新增经手人";
|
||||||
this.$refs.personModalForm.disableSubmit = false;
|
this.$refs.personModalForm.disableSubmit = false;
|
||||||
},
|
},
|
||||||
|
addInOutItem(type) {
|
||||||
|
this.$refs.inOutItemModalForm.add(type);
|
||||||
|
this.$refs.inOutItemModalForm.title = "新增收支项目";
|
||||||
|
this.$refs.inOutItemModalForm.disableSubmit = false;
|
||||||
|
},
|
||||||
vendorModalFormOk() {
|
vendorModalFormOk() {
|
||||||
this.initSupplier()
|
this.initSupplier()
|
||||||
},
|
},
|
||||||
@@ -203,6 +212,9 @@ export const FinancialModalMixin = {
|
|||||||
personModalFormOk() {
|
personModalFormOk() {
|
||||||
this.initPerson()
|
this.initPerson()
|
||||||
},
|
},
|
||||||
|
inOutItemModalFormOk(type) {
|
||||||
|
this.initInOutItem(type)
|
||||||
|
},
|
||||||
workflowModalFormOk() {
|
workflowModalFormOk() {
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
@@ -337,6 +349,7 @@ export const FinancialModalMixin = {
|
|||||||
this.quickBtn.customer = btnStrList[i].url === '/system/customer'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.customer
|
this.quickBtn.customer = btnStrList[i].url === '/system/customer'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.customer
|
||||||
this.quickBtn.account = btnStrList[i].url === '/system/account'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.account
|
this.quickBtn.account = btnStrList[i].url === '/system/account'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.account
|
||||||
this.quickBtn.person = btnStrList[i].url === '/system/person'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.person
|
this.quickBtn.person = btnStrList[i].url === '/system/person'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.person
|
||||||
|
this.quickBtn.inOutItem = btnStrList[i].url === '/system/in_out_item'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.inOutItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,12 @@
|
|||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
@added="onAdded"
|
@added="onAdded"
|
||||||
@valueChange="onValueChange" />
|
@valueChange="onValueChange">
|
||||||
|
<template #inOutItemAdd>
|
||||||
|
<a-divider v-if="quickBtn.inOutItem" style="margin: 4px 0;" />
|
||||||
|
<div v-if="quickBtn.inOutItem" style="padding: 4px 8px; cursor: pointer;" @click="addInOutItem('in')"><a-icon type="plus" /> 新增收支项目</div>
|
||||||
|
</template>
|
||||||
|
</j-editable-table>
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
||||||
@@ -114,6 +119,7 @@
|
|||||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||||
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
|
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
|
||||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||||
|
<in-out-item-modal ref="inOutItemModalForm" @ok="inOutItemModalFormOk('in')"></in-out-item-modal>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -121,6 +127,7 @@
|
|||||||
import AccountModal from '../../system/modules/AccountModal'
|
import AccountModal from '../../system/modules/AccountModal'
|
||||||
import PersonModal from '../../system/modules/PersonModal'
|
import PersonModal from '../../system/modules/PersonModal'
|
||||||
import WorkflowIframe from '@/components/tools/WorkflowIframe'
|
import WorkflowIframe from '@/components/tools/WorkflowIframe'
|
||||||
|
import InOutItemModal from '../../system/modules/InOutItemModal'
|
||||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||||
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
||||||
@@ -133,6 +140,7 @@
|
|||||||
AccountModal,
|
AccountModal,
|
||||||
PersonModal,
|
PersonModal,
|
||||||
WorkflowIframe,
|
WorkflowIframe,
|
||||||
|
InOutItemModal,
|
||||||
JUpload,
|
JUpload,
|
||||||
JDate,
|
JDate,
|
||||||
VNodes: {
|
VNodes: {
|
||||||
|
|||||||
@@ -67,7 +67,12 @@
|
|||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
@added="onAdded"
|
@added="onAdded"
|
||||||
@valueChange="onValueChange" />
|
@valueChange="onValueChange">
|
||||||
|
<template #inOutItemAdd>
|
||||||
|
<a-divider v-if="quickBtn.inOutItem" style="margin: 4px 0;" />
|
||||||
|
<div v-if="quickBtn.inOutItem" style="padding: 4px 8px; cursor: pointer;" @click="addInOutItem('out')"><a-icon type="plus" /> 新增收支项目</div>
|
||||||
|
</template>
|
||||||
|
</j-editable-table>
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
||||||
@@ -114,6 +119,7 @@
|
|||||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||||
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
|
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
|
||||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||||
|
<in-out-item-modal ref="inOutItemModalForm" @ok="inOutItemModalFormOk('out')"></in-out-item-modal>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -121,6 +127,7 @@
|
|||||||
import AccountModal from '../../system/modules/AccountModal'
|
import AccountModal from '../../system/modules/AccountModal'
|
||||||
import PersonModal from '../../system/modules/PersonModal'
|
import PersonModal from '../../system/modules/PersonModal'
|
||||||
import WorkflowIframe from '@/components/tools/WorkflowIframe'
|
import WorkflowIframe from '@/components/tools/WorkflowIframe'
|
||||||
|
import InOutItemModal from '../../system/modules/InOutItemModal'
|
||||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||||
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
||||||
@@ -133,6 +140,7 @@
|
|||||||
AccountModal,
|
AccountModal,
|
||||||
PersonModal,
|
PersonModal,
|
||||||
WorkflowIframe,
|
WorkflowIframe,
|
||||||
|
InOutItemModal,
|
||||||
JUpload,
|
JUpload,
|
||||||
JDate,
|
JDate,
|
||||||
VNodes: {
|
VNodes: {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]" />
|
<a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="类型">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="类型">
|
||||||
<a-select placeholder="请选择类型" v-decorator="[ 'type', validatorRules.type]">
|
<a-select placeholder="请选择类型" v-decorator="[ 'type', validatorRules.type]" :disabled="typeDisabled">
|
||||||
<a-select-option value="收入">收入</a-select-option>
|
<a-select-option value="收入">收入</a-select-option>
|
||||||
<a-select-option value="支出">支出</a-select-option>
|
<a-select-option value="支出">支出</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -55,7 +55,9 @@
|
|||||||
title:"操作",
|
title:"操作",
|
||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
|
typeParam: '',
|
||||||
isReadOnly: false,
|
isReadOnly: false,
|
||||||
|
typeDisabled: false,
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 5 },
|
sm: { span: 5 },
|
||||||
@@ -84,12 +86,23 @@
|
|||||||
created () {
|
created () {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add () {
|
add (type) {
|
||||||
|
this.typeParam = type
|
||||||
this.edit({});
|
this.edit({});
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
this.form.resetFields();
|
this.form.resetFields();
|
||||||
this.model = Object.assign({}, record);
|
this.model = Object.assign({}, record);
|
||||||
|
if(this.typeParam) {
|
||||||
|
this.typeDisabled = true
|
||||||
|
if(this.typeParam === 'in') {
|
||||||
|
this.model.type = '收入'
|
||||||
|
} else if(this.typeParam === 'out') {
|
||||||
|
this.model.type = '支出'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.typeDisabled = false
|
||||||
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'name', 'type', 'sort', 'remark'))
|
this.form.setFieldsValue(pick(this.model,'name', 'type', 'sort', 'remark'))
|
||||||
|
|||||||
Reference in New Issue
Block a user