当前位置: 首页 > news >正文

Easyui DataGrid combobox联动下拉框内容

发票信息下拉框联动,更具不同的发票类型,显示不同的税率

专票

普票

下拉框选择事件

function onSelectType(rec){
        //选中值
		if (rec=='2'){
            //普通发票对应税率
			pmsPlanList.pmsInvoiceTaxRate=pmsPlanList.pmsInvoiceTaxRateT
		}else {
            //专用发票对应税率
			pmsPlanList.pmsInvoiceTaxRate=pmsPlanList.pmsInvoiceTaxRateP
		}
		var row =$("#dgPmsPlanList").datagrid('getSelected');
		//获取行号
		var rowIndex = $("#dgPmsPlanList").datagrid('getRowIndex',row);
		var target = $('#dgPmsPlanList').datagrid('getEditor', {'index':rowIndex,'field':'taxRate'}).target;
		//清除原来的数据
		target.combobox('clear');
        //加载新下拉数据
		target.combobox('loadData',pmsPlanList.pmsInvoiceTaxRate);
	}
<table id="dgPmsPlanList"
		           data-options="
						fit: true,
						border: false,
						rownumbers: true,
						animate: true,
						collapsible: false,
						fitColumns: true,
						autoRowHeight: false,
						toolbar:'#toolbarPmsPlanList',
						idField :'id',
						singleSelect: true,
						checkOnSelect: true,
						selectOnCheck: false,
						pagination:false,
						onDblClickRow:onDbClickRowEvent,
						pageSize:dataOptions.pageSize,
						pageList:dataOptions.pageList,
						showFooter:true,
						striped:true">
		        <thead>
<tr>
<th  data-options="field:'pmsInvoiceType', halign:'center'" width="70" editor="{type:'combobox',options:{required:true,panelHeight:'auto',onSelect: onSelectType}}">
							<span style="color: red;">*</span>发票类型
						</th>
<th  data-options="field:'taxRate', halign:'center'" width="70" editor="{type:'combobox',options:{panelHeight:'auto',editable:false}}">
							<span style="color: red;">*</span>税率
						</th>
</tr>

http://www.dtcms.com/a/4070.html

相关文章:

  • 修改浏览器滚动条样式--ios同款
  • 移动端APP版本治理
  • 设计模式——原型模式(Prototype Pattern)
  • 合肥中科深谷嵌入式项目实战——基于ARM语音识别的智能家居系统(二)
  • Leetcode刷题详解—— 图像渲染
  • Vatee万腾的数字化掌舵:Vatee科技引领未来的新高度
  • 【python】Django——templates模板、静态文件、django模板语法、请求和响应
  • python实现炒股自动化,个人账户无门槛量化交易的开始
  • Elasticsearch 外部词库文件更新
  • 依赖倒转原则接口隔离原则迪米特法则合成复用原则
  • MongoDB索引覆盖查询
  • AUTOSAR汽车电子嵌入式编程精讲300篇-面向车载CAN网络的路由和ECU刷写方法
  • openGauss学习笔记-123 openGauss 数据库管理-设置账本数据库-账本数据库概述
  • QT QSplashScreen
  • 4、创建第一个鸿蒙应用
  • [文件读取]lanproxy 文件读取 (CVE-2021-3019)
  • 33.算术运算符
  • K8S知识点(十)
  • arcgis--NoData数据处理
  • 迅为iTOPRK3588开发板系统定制(无法联网)
  • IDEA 使用Reset Current Branch to Here 进行git 版本控制,图文操作
  • uniapp发行web页面在老版本浏览器打开一片空白
  • Interactive Analysis of CNN Robustness
  • 通过顶顶通呼叫中心中间件玩转FreeSWITCH媒体流
  • 人工智能与充电技术:携手共创智能充电新时代
  • junit写搜索树测试
  • 赛宁网安入选国家工业信息安全漏洞库(CICSVD)2023年度技术组成员单
  • OpenCV+计算摄影
  • 深度探究深度学习常见数据类型INT8 FP32 FP16的区别即优缺点
  • 数据分析实战 | 多元回归——广告收入数据分析