给文本框增加回车跳转下一个的事件

This commit is contained in:
季圣华
2021-10-29 00:27:11 +08:00
parent deead4b32b
commit 8f30705c79
17 changed files with 216 additions and 159 deletions

View File

@@ -685,3 +685,28 @@ export function handleIntroJs(module, cur_version) {
Vue.ls.set('intro_cache_' + module, cur_version, 100 * 24 * 60 * 60 * 1000); Vue.ls.set('intro_cache_' + module, cur_version, 100 * 24 * 60 * 60 * 1000);
}).start() }).start()
} }
/**
* 回车后自动跳到下一个input
*/
export function autoJumpNextInput(domInfo) {
let domIndex = 0
let inputs = document.getElementById(domInfo).getElementsByTagName('input')
inputs[domIndex].focus()
document.getElementById(domInfo).addEventListener('keydown',function(e){
if(e.keyCode === 13){
domIndex++
if(domIndex === inputs.length) {
domIndex = 0
}
inputs[domIndex].focus()
}
})
for(let i=0; i<inputs.length; i++){
//这个index就是做个介质来获取当前的i是第几个
inputs[i].index = i;
inputs[i].onclick = function () {
domIndex = this.index
}
}
}

View File

@@ -51,7 +51,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<j-editable-table <j-editable-table id="purchaseInModal"
:ref="refKeys[0]" :ref="refKeys[0]"
:loading="materialTable.loading" :loading="materialTable.loading"
:columns="materialTable.columns" :columns="materialTable.columns"
@@ -178,7 +178,7 @@
import { FormTypes } from '@/utils/JEditableTableUtil' import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin' import { BillModalMixin } from '../mixins/BillModalMixin'
import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util" import { getMpListShort, changeListFmtMinus,handleIntroJs,autoJumpNextInput } from "@/utils/util"
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import JUpload from '@/components/jeecg/JUpload' import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
@@ -324,6 +324,9 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList; let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable); this.requestSubTableData(url, params, this.materialTable);
} }
this.$nextTick(() => {
autoJumpNextInput('purchaseInModal')
})
//复制新增单据-初始化单号和日期 //复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') { if(this.action === 'copyAdd') {
this.model.id = '' this.model.id = ''

View File

@@ -18,7 +18,7 @@
<a-form :form="form"> <a-form :form="form">
<a-tabs default-active-key="1"> <a-tabs default-active-key="1">
<a-tab-pane key="1" tab="基本信息" forceRender> <a-tab-pane key="1" tab="基本信息" forceRender>
<a-row class="form-row" :gutter="24"> <a-row class="form-row" :gutter="24" id="materialHeadModal">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称" data-step="1" data-title="名称" data-intro="名称必填可以重复"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称" data-step="1" data-title="名称" data-intro="名称必填可以重复">
<a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]"/> <a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]"/>
@@ -167,7 +167,7 @@
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
<div style="margin-top:8px;"> <div style="margin-top:8px;" id="materialDetailModal">
<j-editable-table <j-editable-table
ref="editableMeTable" ref="editableMeTable"
:loading="meTable.loading" :loading="meTable.loading"
@@ -262,7 +262,7 @@
import JEditableTable from '@/components/jeecg/JEditableTable' import JEditableTable from '@/components/jeecg/JEditableTable'
import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormAndTables } from '@/utils/JEditableTableUtil' import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormAndTables } from '@/utils/JEditableTableUtil'
import {queryMaterialCategoryTreeList,checkMaterial,checkMaterialBarCode,getAllMaterialAttribute,getMaxBarCode} from '@/api/api' import {queryMaterialCategoryTreeList,checkMaterial,checkMaterialBarCode,getAllMaterialAttribute,getMaxBarCode} from '@/api/api'
import { handleIntroJs } from "@/utils/util" import { handleIntroJs,autoJumpNextInput } from "@/utils/util"
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import JImageUpload from '@/components/jeecg/JImageUpload' import JImageUpload from '@/components/jeecg/JImageUpload'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
@@ -433,6 +433,8 @@
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'name', 'standard', 'unit', 'unitId', 'model', 'color', this.form.setFieldsValue(pick(this.model, 'name', 'standard', 'unit', 'unitId', 'model', 'color',
'categoryId','enableSerialNumber','enableBatchNumber','expiryNum','safetyStock','remark','mfrs','otherField1','otherField2','otherField3')) 'categoryId','enableSerialNumber','enableBatchNumber','expiryNum','safetyStock','remark','mfrs','otherField1','otherField2','otherField3'))
autoJumpNextInput('materialHeadModal')
autoJumpNextInput('materialDetailModal')
}); });
this.initMaterialAttribute() this.initMaterialAttribute()
// 加载子表数据 // 加载子表数据

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="accountModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
<a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]" /> <a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]" />
</a-form-item> </a-form-item>
@@ -38,6 +38,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addAccount,editAccount,checkAccount } from '@/api/api' import {addAccount,editAccount,checkAccount } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "AccountModal", name: "AccountModal",
data () { data () {
@@ -84,6 +85,7 @@
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'name', 'serialNo', 'initialAmount', 'currentAmount', 'remark')) this.form.setFieldsValue(pick(this.model,'name', 'serialNo', 'initialAmount', 'currentAmount', 'remark'))
autoJumpNextInput('accountModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="customerModal">
<a-col :span="24/2"> <a-col :span="24/2">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
<a-input placeholder="请输入名称" v-decorator.trim="[ 'supplier', validatorRules.supplier]" /> <a-input placeholder="请输入名称" v-decorator.trim="[ 'supplier', validatorRules.supplier]" />
@@ -93,6 +93,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addSupplier,editSupplier,checkSupplier } from '@/api/api' import {addSupplier,editSupplier,checkSupplier } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "CustomerModal", name: "CustomerModal",
data () { data () {
@@ -136,6 +137,7 @@
this.form.setFieldsValue(pick(this.model,'supplier', 'contacts', 'telephone', 'email', 'telephone', this.form.setFieldsValue(pick(this.model,'supplier', 'contacts', 'telephone', 'email', 'telephone',
'phoneNum', 'fax', 'beginNeedGet', 'beginNeedPay', 'allNeedGet', 'allNeedPay', 'taxNum', 'taxRate', 'phoneNum', 'fax', 'beginNeedGet', 'beginNeedPay', 'allNeedGet', 'allNeedPay', 'taxNum', 'taxRate',
'bankName', 'accountNumber', 'address', 'description')) 'bankName', 'accountNumber', 'address', 'description'))
autoJumpNextInput('customerModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="depotModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓库名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓库名称">
<a-input placeholder="请输入仓库名称" v-decorator.trim="[ 'name', validatorRules.name]" /> <a-input placeholder="请输入仓库名称" v-decorator.trim="[ 'name', validatorRules.name]" />
</a-form-item> </a-form-item>
@@ -48,6 +48,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addDepot,editDepot,checkDepot,getUserList } from '@/api/api' import {addDepot,editDepot,checkDepot,getUserList } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "DepotModal", name: "DepotModal",
data () { data () {
@@ -91,6 +92,7 @@
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, this.form.setFieldsValue(pick(this.model,
'name', 'address', 'warehousing', 'truckage', 'principal', 'sort', 'remark')) 'name', 'address', 'warehousing', 'truckage', 'principal', 'sort', 'remark'))
autoJumpNextInput('depotModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="functionModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="编号"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="编号">
<a-input placeholder="请输入编号" v-decorator.trim="[ 'number', validatorRules.number]" /> <a-input placeholder="请输入编号" v-decorator.trim="[ 'number', validatorRules.number]" />
</a-form-item> </a-form-item>
@@ -50,6 +50,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addFunction,editFunction,checkFunction } from '@/api/api' import {addFunction,editFunction,checkFunction } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
import JSelectMultiple from '@/components/jeecg/JSelectMultiple' import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
export default { export default {
name: "FunctionModal", name: "FunctionModal",
@@ -123,6 +124,7 @@
} }
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'number', 'name', 'parentNumber', 'url', 'component', 'sort', 'pushBtn', 'icon', 'enabled')) this.form.setFieldsValue(pick(this.model,'number', 'name', 'parentNumber', 'url', 'component', 'sort', 'pushBtn', 'icon', 'enabled'))
autoJumpNextInput('functionModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="inOutItemModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
<a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]" /> <a-input placeholder="请输入名称" v-decorator.trim="[ 'name', validatorRules.name]" />
</a-form-item> </a-form-item>
@@ -35,6 +35,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addInOutItem,editInOutItem,checkInOutItem } from '@/api/api' import {addInOutItem,editInOutItem,checkInOutItem } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "InOutItemModal", name: "InOutItemModal",
data () { data () {
@@ -80,6 +81,7 @@
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'name', 'type', 'remark')) this.form.setFieldsValue(pick(this.model,'name', 'type', 'remark'))
autoJumpNextInput('inOutItemModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="memberModal">
<a-col :span="24/2"> <a-col :span="24/2">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
<a-input placeholder="请输入名称" v-decorator.trim="[ 'supplier', validatorRules.supplier]" /> <a-input placeholder="请输入名称" v-decorator.trim="[ 'supplier', validatorRules.supplier]" />
@@ -53,6 +53,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addSupplier,editSupplier,checkSupplier } from '@/api/api' import {addSupplier,editSupplier,checkSupplier } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "MemberModal", name: "MemberModal",
data () { data () {
@@ -95,6 +96,7 @@
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'supplier', 'contacts', 'telephone', 'email', 'telephone', this.form.setFieldsValue(pick(this.model,'supplier', 'contacts', 'telephone', 'email', 'telephone',
'phoneNum', 'description')) 'phoneNum', 'description'))
autoJumpNextInput('memberModal')
}); });
}, },
close () { close () {

View File

@@ -11,7 +11,7 @@
cancelText="关闭"> cancelText="关闭">
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="organizationModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
<a-input placeholder="请输入名称" v-decorator="['orgAbr', validatorRules.orgAbr ]"/> <a-input placeholder="请输入名称" v-decorator="['orgAbr', validatorRules.orgAbr ]"/>
</a-form-item> </a-form-item>
@@ -38,6 +38,7 @@
<script> <script>
import { httpAction } from '@/api/manage' import { httpAction } from '@/api/manage'
import { queryOrganizationTreeList, checkOrganization } from '@/api/api' import { queryOrganizationTreeList, checkOrganization } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
import pick from 'lodash.pick' import pick from 'lodash.pick'
import ATextarea from 'ant-design-vue/es/input/TextArea' import ATextarea from 'ant-design-vue/es/input/TextArea'
export default { export default {
@@ -107,6 +108,7 @@
this.loadTreeData(); this.loadTreeData();
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(record, 'orgAbr', 'orgNo', 'parentId', 'sort', 'remark')) this.form.setFieldsValue(pick(record, 'orgAbr', 'orgNo', 'parentId', 'sort', 'remark'))
autoJumpNextInput('organizationModal')
}); });
}, },
close () { close () {

View File

@@ -10,7 +10,7 @@
style="top:20px;" style="top:20px;"
> >
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="passwordModal">
<a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入用户账号" v-decorator="[ 'username', {}]" :readOnly="true"/> <a-input placeholder="请输入用户账号" v-decorator="[ 'username', {}]" :readOnly="true"/>
@@ -31,7 +31,7 @@
<script> <script>
import {changePassword} from '@/api/api' import {changePassword} from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "PasswordModal", name: "PasswordModal",
data () { data () {
@@ -82,6 +82,7 @@
this.model.username = username; this.model.username = username;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue({username:username}); this.form.setFieldsValue({username:username});
autoJumpNextInput('passwordModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="personModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="姓名"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="姓名">
<a-input placeholder="请输入姓名" v-decorator.trim="[ 'name', validatorRules.name]" /> <a-input placeholder="请输入姓名" v-decorator.trim="[ 'name', validatorRules.name]" />
</a-form-item> </a-form-item>
@@ -33,6 +33,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addPerson,editPerson,checkPerson } from '@/api/api' import {addPerson,editPerson,checkPerson } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "PersonModal", name: "PersonModal",
data () { data () {
@@ -78,6 +79,7 @@
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'name', 'type', 'description')) this.form.setFieldsValue(pick(this.model,'name', 'type', 'description'))
autoJumpNextInput('personModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="roleModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="角色名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="角色名称">
<a-input placeholder="请输入角色名称" v-decorator.trim="[ 'name', validatorRules.name]" /> <a-input placeholder="请输入角色名称" v-decorator.trim="[ 'name', validatorRules.name]" />
</a-form-item> </a-form-item>
@@ -36,6 +36,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addRole,editRole,checkRole } from '@/api/api' import {addRole,editRole,checkRole } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "RoleModal", name: "RoleModal",
data () { data () {
@@ -87,6 +88,7 @@
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'name', 'type', 'description')) this.form.setFieldsValue(pick(this.model,'name', 'type', 'description'))
autoJumpNextInput('roleModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="systemConfigModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="公司名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="公司名称">
<a-input placeholder="请输入公司名称" v-decorator.trim="[ 'companyName', validatorRules.companyName]" /> <a-input placeholder="请输入公司名称" v-decorator.trim="[ 'companyName', validatorRules.companyName]" />
</a-form-item> </a-form-item>
@@ -53,6 +53,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addSystemConfig,editSystemConfig,checkSystemConfig } from '@/api/api' import {addSystemConfig,editSystemConfig,checkSystemConfig } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "SystemConfigModal", name: "SystemConfigModal",
data () { data () {
@@ -110,6 +111,7 @@
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'companyName', 'companyContacts', 'companyAddress', this.form.setFieldsValue(pick(this.model,'companyName', 'companyContacts', 'companyAddress',
'companyTel', 'companyFax', 'companyPostCode', 'depotFlag', 'customerFlag', 'minusStockFlag')) 'companyTel', 'companyFax', 'companyPostCode', 'depotFlag', 'customerFlag', 'minusStockFlag'))
autoJumpNextInput('systemConfigModal')
}); });
if(record.id) { if(record.id) {
if (record.depotFlag != null) { if (record.depotFlag != null) {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="unitModal">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="基本单位"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="基本单位">
<a-input placeholder="请输入基本单位(小单位)" v-decorator.trim="[ 'basicUnit', validatorRules.basicUnit]" /> <a-input placeholder="请输入基本单位(小单位)" v-decorator.trim="[ 'basicUnit', validatorRules.basicUnit]" />
</a-form-item> </a-form-item>
@@ -36,6 +36,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addUnit,editUnit,checkUnit } from '@/api/api' import {addUnit,editUnit,checkUnit } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "UnitModal", name: "UnitModal",
data () { data () {
@@ -85,6 +86,7 @@
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'basicUnit','otherUnit','ratio')) this.form.setFieldsValue(pick(this.model,'basicUnit','otherUnit','ratio'))
autoJumpNextInput('unitModal')
}); });
}, },
close () { close () {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="userModal">
<a-form-item label="登录名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="登录名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入登录名称" v-decorator.trim="[ 'loginName', validatorRules.loginName]" :readOnly="!!model.id" <a-input placeholder="请输入登录名称" v-decorator.trim="[ 'loginName', validatorRules.loginName]" :readOnly="!!model.id"
suffix="初始密码123456" /> suffix="初始密码123456" />
@@ -64,6 +64,7 @@
import {addUser,editUser,queryOrganizationTreeList,roleAllList} from '@/api/api' import {addUser,editUser,queryOrganizationTreeList,roleAllList} from '@/api/api'
import { disabledAuthFilter } from "@/utils/authFilter" import { disabledAuthFilter } from "@/utils/authFilter"
import {duplicateCheck } from '@/api/api' import {duplicateCheck } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
import JImageUpload from '../../../components/jeecg/JImageUpload' import JImageUpload from '../../../components/jeecg/JImageUpload'
export default { export default {
name: "UserModal", name: "UserModal",
@@ -133,6 +134,7 @@
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'loginName','username','roleId','orgaId','position', this.form.setFieldsValue(pick(this.model,'loginName','username','roleId','orgaId','position',
'phonenum','email','userBlngOrgaDsplSeq','description')) 'phonenum','email','userBlngOrgaDsplSeq','description'))
autoJumpNextInput('userModal')
}); });
}, },
close() { close() {

View File

@@ -15,7 +15,7 @@
</a-button> </a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form" id="vendorModal">
<a-col :span="24/2"> <a-col :span="24/2">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
<a-input placeholder="请输入名称" v-decorator.trim="[ 'supplier', validatorRules.supplier]" /> <a-input placeholder="请输入名称" v-decorator.trim="[ 'supplier', validatorRules.supplier]" />
@@ -93,6 +93,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addSupplier,editSupplier,checkSupplier } from '@/api/api' import {addSupplier,editSupplier,checkSupplier } from '@/api/api'
import {autoJumpNextInput} from "@/utils/util"
export default { export default {
name: "VendorModal", name: "VendorModal",
data () { data () {
@@ -136,6 +137,7 @@
this.form.setFieldsValue(pick(this.model,'supplier', 'contacts', 'telephone', 'email', 'telephone', this.form.setFieldsValue(pick(this.model,'supplier', 'contacts', 'telephone', 'email', 'telephone',
'phoneNum', 'fax', 'beginNeedGet', 'beginNeedPay', 'allNeedGet', 'allNeedPay', 'taxNum', 'taxRate', 'phoneNum', 'fax', 'beginNeedGet', 'beginNeedPay', 'allNeedGet', 'allNeedPay', 'taxNum', 'taxRate',
'bankName', 'accountNumber', 'address', 'description')) 'bankName', 'accountNumber', 'address', 'description'))
autoJumpNextInput('vendorModal')
}); });
}, },
close () { close () {