修改出厂检验报告合格LOGO移位
This commit is contained in:
@@ -25,7 +25,11 @@ odoo.define('sf_demand.print_demand', function (require) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$('.denmand_set').length) {
|
if(!$('.denmand_set').length) {
|
||||||
|
|
||||||
|
const checked = self.getParent().radioCheck || 'all'
|
||||||
|
|
||||||
self.$el.prepend(`
|
self.$el.prepend(`
|
||||||
<form class="denmand_set">
|
<form class="denmand_set">
|
||||||
<span>更多设置:</span>
|
<span>更多设置:</span>
|
||||||
@@ -33,10 +37,14 @@ odoo.define('sf_demand.print_demand', function (require) {
|
|||||||
<label for="male">图纸</label>
|
<label for="male">图纸</label>
|
||||||
<input type="radio" id="female" name="set" value="程序单">
|
<input type="radio" id="female" name="set" value="程序单">
|
||||||
<label for="female">程序单</label>
|
<label for="female">程序单</label>
|
||||||
<input type="radio" id="other" name="set" value="" checked>
|
<input type="radio" id="other" name="set" value="all" >
|
||||||
<label for="other">图纸/程序单</label>
|
<label for="other">图纸/程序单</label>
|
||||||
</form>
|
</form>
|
||||||
`)
|
`)
|
||||||
|
setTimeout(() => {
|
||||||
|
$(`input[name=set][value=${checked}]`).prop('checked', true)
|
||||||
|
$('.denmand_set').trigger('click')
|
||||||
|
}, 100);
|
||||||
self.$el.prepend(`
|
self.$el.prepend(`
|
||||||
<div class="print-button-container" style="margin-bottom:10px;">
|
<div class="print-button-container" style="margin-bottom:10px;">
|
||||||
<button class="btn btn-primary o_print_custom">
|
<button class="btn btn-primary o_print_custom">
|
||||||
@@ -106,7 +114,7 @@ odoo.define('sf_demand.print_demand', function (require) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSelectedIds: function() {
|
getSelectedIds: function() {
|
||||||
return this.state.data.map(_ => {
|
return this.state.data.filter(_ => !_.hide).map(_ => {
|
||||||
return _.data.id
|
return _.data.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -129,16 +137,24 @@ odoo.define('sf_demand.print_demand', function (require) {
|
|||||||
// self.do_warn("打印失败", error.data.message || "未知错误");
|
// self.do_warn("打印失败", error.data.message || "未知错误");
|
||||||
}).finally(e => {
|
}).finally(e => {
|
||||||
this.getParent().reload()
|
this.getParent().reload()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
_onDenmandChange(e) {
|
_onDenmandChange(e) {
|
||||||
const isChecked = $(e.currentTarget).find('input:checked').val()
|
const isChecked = $(e.currentTarget).find('input:checked').val()
|
||||||
|
this.getParent().radioCheck = isChecked
|
||||||
this.$el.find('tbody').find('.o_data_row').show()
|
this.$el.find('tbody').find('.o_data_row').show()
|
||||||
if(!isChecked) return
|
|
||||||
this.$el.find('tbody').children().each(function() {
|
this.state.data.forEach(_ => {
|
||||||
|
_.hide = false
|
||||||
|
})
|
||||||
|
const self = this
|
||||||
|
if(!isChecked || isChecked == 'all') return
|
||||||
|
this.$el.find('tbody').children('.o_data_row').each(function() {
|
||||||
if($(this).find('td[name=type]').text() != isChecked) {
|
if($(this).find('td[name=type]').text() != isChecked) {
|
||||||
|
const i = $(this).index()
|
||||||
|
|
||||||
|
self.state.data[i].hide = true
|
||||||
$(this).hide()
|
$(this).hide()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -275,7 +275,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<img src="/sf_quality/static/img/pass.png" style="width: 200px; height: 200px;position: absolute; bottom: 20px; right: 20%;"/>
|
<img src="/sf_quality/static/img/pass.png" style="width: 100px; height: 100px; position: absolute; bottom: -100px; left: 140px;"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both; margin-top: 30px; padding-top: 10px;">
|
<div style="clear: both; margin-top: 30px; padding-top: 10px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user