当前位置: 首页 > 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>

相关文章:

  • 修改浏览器滚动条样式--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开发板系统定制(无法联网)
  • 没有握手,采用翻译:俄乌三年来首次直接会谈成效如何?
  • 侵害孩子者,必严惩不贷!3名性侵害未成年人罪犯今日执行死刑
  • 龚正市长调研闵行区,更加奋发有为地稳增长促转型,久久为功增强发展后劲
  • 六连板成飞集成:航空零部件业务收入占比为1.74%,市场环境没有重大调整
  • 国台办:民进党当局刻意刁难大陆配偶,这是不折不扣的政治迫害
  • 沙县小吃中东首店在沙特首都利雅得开业,首天营业额5万元