给单据添加供应商和客户的快捷添加入口
This commit is contained in:
@@ -210,6 +210,22 @@ export const BillModalMixin = {
|
||||
this.form.setFieldsValue({'changeAmount':allPrice, 'debt':debt})
|
||||
});
|
||||
},
|
||||
addSupplier() {
|
||||
this.$refs.vendorModalForm.add();
|
||||
this.$refs.vendorModalForm.title = "新增供应商";
|
||||
this.$refs.vendorModalForm.disableSubmit = false;
|
||||
},
|
||||
addCustomer() {
|
||||
this.$refs.customerModalForm.add();
|
||||
this.$refs.customerModalForm.title = "新增客户(提醒:如果找不到新添加的客户,请到用户管理检查是否分配了该客户权限)";
|
||||
this.$refs.customerModalForm.disableSubmit = false;
|
||||
},
|
||||
vendorModalFormOk() {
|
||||
this.initSupplier()
|
||||
},
|
||||
customerModalFormOk() {
|
||||
this.initCustomer()
|
||||
},
|
||||
onAdded(event) {
|
||||
const { row, target } = event
|
||||
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
||||
<a-select placeholder="选择供应商" v-decorator="[ 'organId' ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addSupplier"><a-icon type="plus" /> 新增供应商</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -79,10 +85,12 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import VendorModal from '../../system/modules/VendorModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -94,8 +102,13 @@
|
||||
name: "OtherInModal",
|
||||
mixins: [JEditableTableMixin, BillModalMixin],
|
||||
components: {
|
||||
VendorModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
||||
<a-select placeholder="选择客户" v-decorator="[ 'organId' ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addCustomer"><a-icon type="plus" /> 新增客户</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -79,10 +85,12 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import CustomerModal from '../../system/modules/CustomerModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -94,8 +102,13 @@
|
||||
name: "OtherOutModal",
|
||||
mixins: [JEditableTableMixin, BillModalMixin],
|
||||
components: {
|
||||
CustomerModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
||||
<a-select placeholder="选择供应商" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addSupplier"><a-icon type="plus" /> 新增供应商</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -134,12 +140,14 @@
|
||||
</a-spin>
|
||||
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
||||
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
|
||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import ManyAccountModal from '../dialog/ManyAccountModal'
|
||||
import LinkBillList from '../dialog/LinkBillList'
|
||||
import VendorModal from '../../system/modules/VendorModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -154,8 +162,13 @@
|
||||
components: {
|
||||
ManyAccountModal,
|
||||
LinkBillList,
|
||||
VendorModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
||||
<a-select placeholder="选择供应商" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addSupplier"><a-icon type="plus" /> 新增供应商</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -134,6 +140,7 @@
|
||||
</a-spin>
|
||||
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
||||
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
|
||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -141,6 +148,7 @@
|
||||
import pick from 'lodash.pick'
|
||||
import ManyAccountModal from '../dialog/ManyAccountModal'
|
||||
import LinkBillList from '../dialog/LinkBillList'
|
||||
import VendorModal from '../../system/modules/VendorModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -155,8 +163,13 @@
|
||||
components: {
|
||||
ManyAccountModal,
|
||||
LinkBillList,
|
||||
VendorModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
||||
<a-select placeholder="选择供应商" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addSupplier"><a-icon type="plus" /> 新增供应商</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -78,10 +84,12 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import VendorModal from '../../system/modules/VendorModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -93,8 +101,13 @@
|
||||
name: "PurchaseOrderModal",
|
||||
mixins: [JEditableTableMixin,BillModalMixin],
|
||||
components: {
|
||||
VendorModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
||||
<a-select placeholder="选择客户" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addCustomer"><a-icon type="plus" /> 新增客户</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -137,12 +143,14 @@
|
||||
</a-spin>
|
||||
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
||||
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import ManyAccountModal from '../dialog/ManyAccountModal'
|
||||
import LinkBillList from '../dialog/LinkBillList'
|
||||
import CustomerModal from '../../system/modules/CustomerModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -158,9 +166,14 @@
|
||||
components: {
|
||||
ManyAccountModal,
|
||||
LinkBillList,
|
||||
CustomerModal,
|
||||
JUpload,
|
||||
JDate,
|
||||
JSelectMultiple
|
||||
JSelectMultiple,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
||||
<a-select placeholder="选择客户" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addCustomer"><a-icon type="plus" /> 新增客户</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -82,10 +88,12 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import CustomerModal from '../../system/modules/CustomerModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -98,9 +106,14 @@
|
||||
name: "SaleOrderModal",
|
||||
mixins: [JEditableTableMixin, BillModalMixin],
|
||||
components: {
|
||||
CustomerModal,
|
||||
JUpload,
|
||||
JDate,
|
||||
JSelectMultiple
|
||||
JSelectMultiple,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
||||
<a-select placeholder="选择客户" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addCustomer"><a-icon type="plus" /> 新增客户</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -137,12 +143,14 @@
|
||||
</a-spin>
|
||||
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
||||
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import ManyAccountModal from '../dialog/ManyAccountModal'
|
||||
import LinkBillList from '../dialog/LinkBillList'
|
||||
import CustomerModal from '../../system/modules/CustomerModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
@@ -158,9 +166,14 @@
|
||||
components: {
|
||||
ManyAccountModal,
|
||||
LinkBillList,
|
||||
CustomerModal,
|
||||
JUpload,
|
||||
JDate,
|
||||
JSelectMultiple
|
||||
JSelectMultiple,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -138,6 +138,22 @@ export const FinancialModalMixin = {
|
||||
}
|
||||
})
|
||||
},
|
||||
addSupplier() {
|
||||
this.$refs.vendorModalForm.add();
|
||||
this.$refs.vendorModalForm.title = "新增";
|
||||
this.$refs.vendorModalForm.disableSubmit = false;
|
||||
},
|
||||
addCustomer() {
|
||||
this.$refs.customerModalForm.add();
|
||||
this.$refs.customerModalForm.title = "新增客户(提醒:如果找不到新添加的客户,请到用户管理检查是否分配了该客户权限)";
|
||||
this.$refs.customerModalForm.disableSubmit = false;
|
||||
},
|
||||
vendorModalFormOk() {
|
||||
this.initSupplier()
|
||||
},
|
||||
customerModalFormOk() {
|
||||
this.initCustomer()
|
||||
},
|
||||
//单元值改变一个字符就触发一次
|
||||
onValueChange(event) {
|
||||
let that = this
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
|
||||
<a-select placeholder="选择客户" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addCustomer"><a-icon type="plus" /> 新增客户</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -114,11 +120,13 @@
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<debt-bill-list ref="debtBillList" @ok="debtBillListOk"></debt-bill-list>
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import DebtBillList from '../dialog/DebtBillList'
|
||||
import CustomerModal from '../../system/modules/CustomerModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
||||
@@ -129,8 +137,13 @@
|
||||
mixins: [JEditableTableMixin, FinancialModalMixin],
|
||||
components: {
|
||||
DebtBillList,
|
||||
CustomerModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
|
||||
<a-select placeholder="选择供应商" v-decorator="[ 'organId', validatorRules.organId ]"
|
||||
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div style="padding: 4px 8px; cursor: pointer;"
|
||||
@mousedown="e => e.preventDefault()" @click="addSupplier"><a-icon type="plus" /> 新增供应商</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -114,11 +120,13 @@
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<debt-bill-list ref="debtBillList" @ok="debtBillListOk"></debt-bill-list>
|
||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import DebtBillList from '../dialog/DebtBillList'
|
||||
import VendorModal from '../../system/modules/VendorModal'
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
|
||||
@@ -129,8 +137,13 @@
|
||||
mixins: [JEditableTableMixin, FinancialModalMixin],
|
||||
components: {
|
||||
DebtBillList,
|
||||
VendorModal,
|
||||
JUpload,
|
||||
JDate
|
||||
JDate,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user