|
@@ -3573,9 +3573,12 @@ function setFileOptions(projID){
|
|
|
return false;
|
|
|
}
|
|
|
let unitFileHtml = '';
|
|
|
- for(let tmp of response.data) {
|
|
|
+ response.data.forEach((uf, index) => {
|
|
|
+ unitFileHtml += `<option value=${uf.id} ${index === 0 ? 'selected' : ''}>${uf.name}</option>`
|
|
|
+ });
|
|
|
+ /* for(let tmp of response.data) {
|
|
|
unitFileHtml += '<option value="'+ tmp.id +'">'+ tmp.name +'</option>';
|
|
|
- }
|
|
|
+ } */
|
|
|
$("#unit-price").children("option").first().after(unitFileHtml);
|
|
|
});
|
|
|
// 获取费率文件数据
|
|
@@ -3586,10 +3589,15 @@ function setFileOptions(projID){
|
|
|
if (response.data.length <= 0) {
|
|
|
return false;
|
|
|
}
|
|
|
- for(let tmp of response.data) {
|
|
|
+ /* for(let tmp of response.data) {
|
|
|
let option = $("<option>").val(tmp.ID).text(tmp.name);
|
|
|
$("#tender-fee-rate").append(option);
|
|
|
- }
|
|
|
+ } */
|
|
|
+ let feeRateFileHtml = '';
|
|
|
+ response.data.forEach((ff, index) => {
|
|
|
+ feeRateFileHtml += `<option value=${ff.ID} ${index === 0 ? 'selected' : ''}>${ff.name}</option>`
|
|
|
+ });
|
|
|
+ $("#tender-fee-rate").children("option").first().after(feeRateFileHtml);
|
|
|
});
|
|
|
}
|
|
|
}
|