Compare commits
2 Commits
9e73c3f38b
...
bf8cedec44
| Author | SHA1 | Date |
|---|---|---|
|
|
bf8cedec44 | |
|
|
b495fb319a |
|
|
@ -86,6 +86,8 @@
|
||||||
<input class="form-control" name="orderPartnerName" th:field="*{orderPartnerName}"
|
<input class="form-control" name="orderPartnerName" th:field="*{orderPartnerName}"
|
||||||
onclick="selectPartner()" required>
|
onclick="selectPartner()" required>
|
||||||
<span class="input-group-addon" onclick="selectPartner()"><i class="fa fa-search"></i></span>
|
<span class="input-group-addon" onclick="selectPartner()"><i class="fa fa-search"></i></span>
|
||||||
|
<span class="input-group-addon" id="customerSet" onclick="setCustomer()" title="同步" ><i
|
||||||
|
class="fa fa-refresh"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -276,10 +278,21 @@
|
||||||
}
|
}
|
||||||
$('[name="orderPartnerCode"]').val(rows[0].partnerCode);
|
$('[name="orderPartnerCode"]').val(rows[0].partnerCode);
|
||||||
$('[name="orderPartnerName"]').val(rows[0].partnerName);
|
$('[name="orderPartnerName"]').val(rows[0].partnerName);
|
||||||
|
$('#customerSet').attr('partnerName', rows[0].partnerName);
|
||||||
|
$('#customerSet').attr('contactPerson', rows[0].contactPerson);
|
||||||
|
$('#customerSet').attr('contactPhone', rows[0].contactPhone);
|
||||||
$.modal.close(index);
|
$.modal.close(index);
|
||||||
}
|
}
|
||||||
|
function initCustomerSet(){
|
||||||
|
$.operate.post( ctx + "system/partner/list",{isTable:0,partnerName:[[${orderInfo.orderPartnerName}]],pageSize:1,pageNum:0},function (res){
|
||||||
|
if(res.rows.length){
|
||||||
|
$('#customerSet').attr('partnerName', res.rows[0].partnerName);
|
||||||
|
$('#customerSet').attr('contactPerson', res.rows[0].contactPerson);
|
||||||
|
$('#customerSet').attr('contactPhone', res.rows[0].contactPhone);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function importList() {
|
function importList() {
|
||||||
$('#uploadInput').click()
|
$('#uploadInput').click()
|
||||||
|
|
@ -335,6 +348,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
changeOrderType()
|
changeOrderType()
|
||||||
|
initCustomerSet()
|
||||||
});
|
});
|
||||||
|
|
||||||
function downloadTem() {
|
function downloadTem() {
|
||||||
|
|
@ -494,6 +508,17 @@
|
||||||
$('form').find('textarea').css('pointer-events', 'none')
|
$('form').find('textarea').css('pointer-events', 'none')
|
||||||
window.localStorage.removeItem('isOrderDetail')
|
window.localStorage.removeItem('isOrderDetail')
|
||||||
}
|
}
|
||||||
|
function setCustomer() {
|
||||||
|
if (!$('#customerSet').attr('partnerName')) {
|
||||||
|
$.modal.alertWarning("请先选择代理商");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$('[name="customerCode"]').attr('readonly', false).attr('required', false).val('').parent().parent().find('label').removeClass('is-required')
|
||||||
|
$(' [name="customerEmail"]').val('');
|
||||||
|
$(' [name="customerName"]').val($('#customerSet').attr('partnerName'));
|
||||||
|
$(' [name="customerContact"]').val($('#customerSet').attr('contactPerson'));
|
||||||
|
$(' [name="customerPhone"]').val($('#customerSet').attr('contactPhone'));
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,10 @@
|
||||||
<form id="formId">
|
<form id="formId">
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>订单信息:</label>
|
||||||
|
<input type="text" name="projectId" placeholder="项目编号/项目名称/项目负责人" />
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>地市:</label>
|
<label>地市:</label>
|
||||||
<input type="text" name="city"/>
|
<input type="text" name="city"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue