ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
js ![](https://img.kancloud.cn/ed/e6/ede6b71e1c18df2c02543a280c0b73a6_1047x293.png) ~~~ //$('#c-specification') 为第二个select的id //product_id 为条件字段名 //$("#c-product_id") 为第一个select的id $("#c-specification_id").data("params", function () { return {custom: {product_id: $("#c-product_id").val()}}; }); ~~~ ![](https://img.kancloud.cn/04/4b/044b98db46ebcc1af041182835278515_1002x586.png) add ~~~ <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('产品')}:</label> <div class="col-xs-12 col-sm-8"> <input id="c-product_id" data-rule="required" data-source="product/search" class="form-control selectpage" name="row[product_id]" type="text" value=""> </div> </div> <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('规格分类')}:</label> <div class="col-xs-12 col-sm-8"> <input id="c-specification_id" data-rule="required" data-source="specification_classification/search" class="form-control selectpage" name="row[specification_id]" type="text" value=""> </div> </div> ~~~ edit ~~~ <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('产品')}:</label> <div class="col-xs-12 col-sm-8"> <input id="c-product_id" data-rule="required" data-source="product/search" class="form-control selectpage" name="row[product_id]" type="text" value="{$row.product_id|htmlentities}"> </div> </div> <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('规格分类')}:</label> <div class="col-xs-12 col-sm-8"> <input id="c-specification_id" data-rule="required" data-source="specification_classification/search" class="form-control selectpage" name="row[specification_id]" type="text" value="{$row.specification_id|htmlentities}"> </div> </div> ~~~