1、零售出库添加会员卡号快捷方式
2、销售订单、销售出库添加客户快捷方式 3、仓库添加默认仓库 4、零售、销售、采购的商品明细仓库默认选中默认仓库
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
//初始化界面
|
//初始化界面
|
||||||
|
var defDepotId = null;
|
||||||
var kid = sessionStorage.getItem("userId");
|
var kid = sessionStorage.getItem("userId");
|
||||||
var pageType = getUrlParam('t'); //获取页面类型传值
|
var pageType = getUrlParam('t'); //获取页面类型传值
|
||||||
var depotList = null;
|
var depotList = null;
|
||||||
@@ -228,7 +229,10 @@
|
|||||||
{
|
{
|
||||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||||
{
|
{
|
||||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
if(depot.isdefault){
|
||||||
|
defDepotId = depot.id;
|
||||||
|
}
|
||||||
|
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||||
depotString = depotString + depot.id + ",";
|
depotString = depotString + depot.id + ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1583,6 +1587,13 @@
|
|||||||
$("#addOrgan").off("click").on("click",function(){
|
$("#addOrgan").off("click").on("click",function(){
|
||||||
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加供应商信息');
|
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加供应商信息');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#addMember").off("click").on("click",function(){
|
||||||
|
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加会员信息');
|
||||||
|
});
|
||||||
|
$("#addCustomer").off("click").on("click",function(){
|
||||||
|
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加客户信息');
|
||||||
|
});
|
||||||
url = '/depotHead/addDepotHeadAndDetail';
|
url = '/depotHead/addDepotHeadAndDetail';
|
||||||
|
|
||||||
//零售单据修改收款时,自动计算找零
|
//零售单据修改收款时,自动计算找零
|
||||||
@@ -2569,7 +2580,13 @@
|
|||||||
$("#otherMoneyTotalDlg").text($("#OtherMoney").val());
|
$("#otherMoneyTotalDlg").text($("#OtherMoney").val());
|
||||||
});
|
});
|
||||||
|
|
||||||
if(listTitle === "采购入库列表" || listTitle === "其它入库列表" || listTitle === "采购订单列表"){
|
if(listTitle === "采购入库列表" || listTitle === "其它入库列表" || listTitle === "采购订单列表"|| listTitle === "零售出库列表"|| listTitle === "销售出库列表"|| listTitle === "销售订单列表"){
|
||||||
|
var supplierType = "供应商";
|
||||||
|
if(listTitle === "零售出库列表"){
|
||||||
|
supplierType = "会员";
|
||||||
|
}else if(listTitle === "销售出库列表" || listTitle === "销售订单列表"){
|
||||||
|
supplierType = "客户";
|
||||||
|
}
|
||||||
//检查单位名称是否存在 ++ 重名无法提示问题需要跟进
|
//检查单位名称是否存在 ++ 重名无法提示问题需要跟进
|
||||||
function checkSupplierName() {
|
function checkSupplierName() {
|
||||||
var supplierName = $.trim($("#supplier").val());
|
var supplierName = $.trim($("#supplier").val());
|
||||||
@@ -2608,6 +2625,7 @@
|
|||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
//保存供应商信息
|
//保存供应商信息
|
||||||
$("#saveSupplier").off("click").on("click",function() {
|
$("#saveSupplier").off("click").on("click",function() {
|
||||||
if(checkSupplierName()){
|
if(checkSupplierName()){
|
||||||
@@ -2629,7 +2647,7 @@
|
|||||||
}
|
}
|
||||||
var url = '/supplier/add';
|
var url = '/supplier/add';
|
||||||
var supObj = $("#supplierFM").serializeObject();
|
var supObj = $("#supplierFM").serializeObject();
|
||||||
supObj.type = "供应商";
|
supObj.type = supplierType;
|
||||||
supObj.enabled = 1;
|
supObj.enabled = 1;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
@@ -2927,7 +2945,7 @@
|
|||||||
//新增
|
//新增
|
||||||
function append(){
|
function append(){
|
||||||
if (endEditing()) {
|
if (endEditing()) {
|
||||||
$('#materialData').datagrid('appendRow', {});
|
$('#materialData').datagrid('appendRow', {DepotId:defDepotId});
|
||||||
editIndex = $('#materialData').datagrid('getRows').length - 1;
|
editIndex = $('#materialData').datagrid('getRows').length - 1;
|
||||||
$('#materialData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
$('#materialData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||||
autoReckon();
|
autoReckon();
|
||||||
|
|||||||
@@ -182,7 +182,19 @@
|
|||||||
{title: '搬运费', field: 'truckage', width: 60},
|
{title: '搬运费', field: 'truckage', width: 60},
|
||||||
{title: '负责人', field: 'principalName', width: 60},
|
{title: '负责人', field: 'principalName', width: 60},
|
||||||
{title: '排序', field: 'sort', width: 60},
|
{title: '排序', field: 'sort', width: 60},
|
||||||
|
{
|
||||||
|
title: '是否默认', field: 'isdefault', width: 100, align: "center",
|
||||||
|
formatter: function (value, rec) {
|
||||||
|
if (rec.isdefault) {
|
||||||
|
return "<b style='color:green'>是</b>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "否";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{title: '描述', field: 'remark', width: 120}
|
{title: '描述', field: 'remark', width: 120}
|
||||||
|
|
||||||
]],
|
]],
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{
|
{
|
||||||
@@ -200,6 +212,14 @@
|
|||||||
handler: function () {
|
handler: function () {
|
||||||
batDeleteDepot();
|
batDeleteDepot();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'setDepotIsDefault',
|
||||||
|
text: '设为默认',
|
||||||
|
iconCls: 'icon-ok',
|
||||||
|
handler: function () {
|
||||||
|
setDepotIsDefault();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
onLoadError: function () {
|
onLoadError: function () {
|
||||||
@@ -286,7 +306,53 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//设为默认操作事件
|
||||||
|
function setDepotIsDefault() {
|
||||||
|
var allRow = $('#tableData').datagrid('getRows');
|
||||||
|
var row = $('#tableData').datagrid('getChecked');
|
||||||
|
if (row.length == 0) {
|
||||||
|
$.messager.alert('设置提示', '没有记录被选中!', 'info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (row.length > 0) {
|
||||||
|
function setDefault(depotID, isDefault) {
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/depot/updateDepotIsDefault",
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
data: ({
|
||||||
|
depotID: depotID,
|
||||||
|
isDefault: isDefault
|
||||||
|
}),
|
||||||
|
success: function (res) {
|
||||||
|
if (res == "true" && isDefault) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error: function () {
|
||||||
|
$.messager.alert('提示', '设为默认账户异常,请稍后再试!', 'error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row.length == 1) {
|
||||||
|
setDefault(row[0].id, true); //设置默认
|
||||||
|
for (var i = 0; i < allRow.length; i++) {
|
||||||
|
if (allRow[i].id != row[0].id) {
|
||||||
|
setDefault(allRow[i].id, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
$("#searchBtn").click();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
//批量删除仓库
|
//批量删除仓库
|
||||||
function batDeleteDepot() {
|
function batDeleteDepot() {
|
||||||
var row = $('#tableData').datagrid('getChecked');
|
var row = $('#tableData').datagrid('getChecked');
|
||||||
|
|||||||
@@ -63,7 +63,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="width:60px;height:50px;">会员卡号:</td>
|
<td style="width:60px;height:50px;">会员卡号:</td>
|
||||||
<td style="padding:5px;width:200px;">
|
<td style="padding:5px;width:200px;">
|
||||||
|
<div class="org-list">
|
||||||
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
||||||
|
</div>
|
||||||
|
<div class="add-org-btn">
|
||||||
|
<img id="addMember" src="/js/easyui-1.3.5/themes/icons/edit_add.png"
|
||||||
|
style="cursor: pointer;" alt="增加会员" title="增加会员"/>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:70px;">单据日期:</td>
|
<td style="width:70px;">单据日期:</td>
|
||||||
<td style="padding:5px">
|
<td style="padding:5px">
|
||||||
@@ -243,5 +249,107 @@
|
|||||||
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||||
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
|
||||||
|
closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true">
|
||||||
|
<form id="supplierFM">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 80px;height: 20px">名称</td>
|
||||||
|
<td style="width: 180px;padding:1px">
|
||||||
|
<input name="supplier" id="supplier" class="easyui-validatebox"
|
||||||
|
data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td style="width: 60px;height: 20px">联系人</td>
|
||||||
|
<td style="width:180px;padding:1px;">
|
||||||
|
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>联系电话</td>
|
||||||
|
<td style="padding:1px;">
|
||||||
|
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>手机</td>
|
||||||
|
<td style="padding:1px;">
|
||||||
|
<input name="telephone" id="telephone" class="easyui-validatebox"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>电子邮箱</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>传真</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>期初应收</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
|
||||||
|
</td>
|
||||||
|
<td>期初应付</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>累计应收</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
|
||||||
|
</td>
|
||||||
|
<td>累计应付</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>纳税人识别号</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>税率</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>开户行</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>账号</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>地址</td>
|
||||||
|
<td style="padding:1px" colspan="3">
|
||||||
|
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>备注</td>
|
||||||
|
<td style="padding:1px" colspan="3">
|
||||||
|
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="supplierDlgBtn">
|
||||||
|
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||||
|
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||||
|
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -63,7 +63,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="width:60px;">客户:</td>
|
<td style="width:60px;">客户:</td>
|
||||||
<td style="padding:5px">
|
<td style="padding:5px">
|
||||||
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
<div class="org-list">
|
||||||
|
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
||||||
|
</div>
|
||||||
|
<div class="add-org-btn">
|
||||||
|
<img id="addCustomer" src="/js/easyui-1.3.5/themes/icons/edit_add.png"
|
||||||
|
style="cursor: pointer;" alt="增加客戶" title="增加客戶"/>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:70px;">单据日期:</td>
|
<td style="width:70px;">单据日期:</td>
|
||||||
<td style="padding:5px">
|
<td style="padding:5px">
|
||||||
@@ -195,6 +201,107 @@
|
|||||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
|
||||||
|
closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true">
|
||||||
|
<form id="supplierFM">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 80px;height: 20px">名称</td>
|
||||||
|
<td style="width: 180px;padding:1px">
|
||||||
|
<input name="supplier" id="supplier" class="easyui-validatebox"
|
||||||
|
data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td style="width: 60px;height: 20px">联系人</td>
|
||||||
|
<td style="width:180px;padding:1px;">
|
||||||
|
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>联系电话</td>
|
||||||
|
<td style="padding:1px;">
|
||||||
|
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>手机</td>
|
||||||
|
<td style="padding:1px;">
|
||||||
|
<input name="telephone" id="telephone" class="easyui-validatebox"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>电子邮箱</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>传真</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>期初应收</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
|
||||||
|
</td>
|
||||||
|
<td>期初应付</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>累计应收</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
|
||||||
|
</td>
|
||||||
|
<td>累计应付</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>纳税人识别号</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>税率</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>开户行</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>账号</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>地址</td>
|
||||||
|
<td style="padding:1px" colspan="3">
|
||||||
|
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>备注</td>
|
||||||
|
<td style="padding:1px" colspan="3">
|
||||||
|
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="supplierDlgBtn">
|
||||||
|
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||||
|
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||||
|
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -63,7 +63,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="width:60px;">客户:</td>
|
<td style="width:60px;">客户:</td>
|
||||||
<td style="padding:5px">
|
<td style="padding:5px">
|
||||||
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
<div class="org-list">
|
||||||
|
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
||||||
|
</div>
|
||||||
|
<div class="add-org-btn">
|
||||||
|
<img id="addCustomer" src="/js/easyui-1.3.5/themes/icons/edit_add.png"
|
||||||
|
style="cursor: pointer;" alt="增加客戶" title="增加客戶"/>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:70px;">单据日期:</td>
|
<td style="width:70px;">单据日期:</td>
|
||||||
<td style="padding:5px">
|
<td style="padding:5px">
|
||||||
@@ -276,6 +282,107 @@
|
|||||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
|
||||||
|
closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true">
|
||||||
|
<form id="supplierFM">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 80px;height: 20px">名称</td>
|
||||||
|
<td style="width: 180px;padding:1px">
|
||||||
|
<input name="supplier" id="supplier" class="easyui-validatebox"
|
||||||
|
data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td style="width: 60px;height: 20px">联系人</td>
|
||||||
|
<td style="width:180px;padding:1px;">
|
||||||
|
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>联系电话</td>
|
||||||
|
<td style="padding:1px;">
|
||||||
|
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>手机</td>
|
||||||
|
<td style="padding:1px;">
|
||||||
|
<input name="telephone" id="telephone" class="easyui-validatebox"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>电子邮箱</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>传真</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>期初应收</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
|
||||||
|
</td>
|
||||||
|
<td>期初应付</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>累计应收</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
|
||||||
|
</td>
|
||||||
|
<td>累计应付</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox"
|
||||||
|
data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>纳税人识别号</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>税率</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>开户行</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
<td>账号</td>
|
||||||
|
<td style="padding:1px">
|
||||||
|
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||||
|
style="width: 160px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>地址</td>
|
||||||
|
<td style="padding:1px" colspan="3">
|
||||||
|
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>备注</td>
|
||||||
|
<td style="padding:1px" colspan="3">
|
||||||
|
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="supplierDlgBtn">
|
||||||
|
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||||
|
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||||
|
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -207,5 +207,16 @@ public class DepotController {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@PostMapping(value = "/updateDepotIsDefault")
|
||||||
|
public String updateDepotIsDefault(@RequestParam("isDefault") Boolean isDefault,
|
||||||
|
@RequestParam("depotID") Long depotID,
|
||||||
|
HttpServletRequest request) throws Exception{
|
||||||
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
|
int res = depotService.updateDepotIsDefault(isDefault, depotID);
|
||||||
|
if(res > 0) {
|
||||||
|
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||||
|
} else {
|
||||||
|
return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -448,7 +448,7 @@ public class DepotItemController {
|
|||||||
BigDecimal InPrice = sumPrice("入库", pid, diEx.getMId(), monthTime, false);
|
BigDecimal InPrice = sumPrice("入库", pid, diEx.getMId(), monthTime, false);
|
||||||
BigDecimal OutPrice = sumPrice("出库", pid, diEx.getMId(), monthTime, false);
|
BigDecimal OutPrice = sumPrice("出库", pid, diEx.getMId(), monthTime, false);
|
||||||
item.put("MaterialName", diEx.getMName());
|
item.put("MaterialName", diEx.getMName());
|
||||||
item.put("MaterialModel", diEx.getMColor());
|
item.put("MaterialModel", diEx.getMModel());
|
||||||
//扩展信息
|
//扩展信息
|
||||||
String materialOther = getOtherInfo(mpArr, diEx);
|
String materialOther = getOtherInfo(mpArr, diEx);
|
||||||
item.put("MaterialOther", materialOther);
|
item.put("MaterialOther", materialOther);
|
||||||
|
|||||||
@@ -90,6 +90,15 @@ public class Depot {
|
|||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
private String deleteFlag;
|
private String deleteFlag;
|
||||||
|
private Boolean isdefault;
|
||||||
|
|
||||||
|
public Boolean getIsdefault() {
|
||||||
|
return isdefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsdefault(Boolean isdefault) {
|
||||||
|
this.isdefault = isdefault;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method was generated by MyBatis Generator.
|
* This method was generated by MyBatis Generator.
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ public class DepotExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Criteria andIdIn(List<Long> values) {
|
public Criteria andIdIn(List<Long> values) {
|
||||||
addCriterion("id in", values, "id");
|
addCriterion("id in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
@@ -664,7 +665,65 @@ public class DepotExample {
|
|||||||
addCriterion("remark <>", value, "remark");
|
addCriterion("remark <>", value, "remark");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
public Criteria andIsdefaultIsNull() {
|
||||||
|
addCriterion("IsDefault is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultIsNotNull() {
|
||||||
|
addCriterion("IsDefault is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultEqualTo(Boolean value) {
|
||||||
|
addCriterion("IsDefault =", value, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultNotEqualTo(Boolean value) {
|
||||||
|
addCriterion("IsDefault <>", value, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultGreaterThan(Boolean value) {
|
||||||
|
addCriterion("IsDefault >", value, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultGreaterThanOrEqualTo(Boolean value) {
|
||||||
|
addCriterion("IsDefault >=", value, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultLessThan(Boolean value) {
|
||||||
|
addCriterion("IsDefault <", value, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultLessThanOrEqualTo(Boolean value) {
|
||||||
|
addCriterion("IsDefault <=", value, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultIn(List<Boolean> values) {
|
||||||
|
addCriterion("IsDefault in", values, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultNotIn(List<Boolean> values) {
|
||||||
|
addCriterion("IsDefault not in", values, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultBetween(Boolean value1, Boolean value2) {
|
||||||
|
addCriterion("IsDefault between", value1, value2, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsdefaultNotBetween(Boolean value1, Boolean value2) {
|
||||||
|
addCriterion("IsDefault not between", value1, value2, "isdefault");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
public Criteria andRemarkGreaterThan(String value) {
|
public Criteria andRemarkGreaterThan(String value) {
|
||||||
addCriterion("remark >", value, "remark");
|
addCriterion("remark >", value, "remark");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|||||||
@@ -316,4 +316,24 @@ public class DepotService {
|
|||||||
return deleteTotal;
|
return deleteTotal;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public int updateDepotIsDefault(Boolean isDefault, Long depotID) throws Exception{
|
||||||
|
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_DEPOT,BusinessConstants.LOG_OPERATION_TYPE_EDIT+depotID,
|
||||||
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||||
|
Depot depot = new Depot();
|
||||||
|
depot.setIsdefault(isDefault);
|
||||||
|
DepotExample example = new DepotExample();
|
||||||
|
example.createCriteria().andIdEqualTo(depotID);
|
||||||
|
int result=0;
|
||||||
|
try{
|
||||||
|
result = depotMapper.updateByExampleSelective(depot, example);
|
||||||
|
}catch(Exception e){
|
||||||
|
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||||
|
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
|
||||||
|
ExceptionConstants.DATA_WRITE_FAIL_MSG);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<result column="principal" jdbcType="BIGINT" property="principal" />
|
<result column="principal" jdbcType="BIGINT" property="principal" />
|
||||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||||
|
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<!--
|
<!--
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
-->
|
-->
|
||||||
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
|
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
|
||||||
delete_Flag
|
delete_Flag,IsDefault
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
|
||||||
<!--
|
<!--
|
||||||
@@ -279,6 +280,9 @@
|
|||||||
<if test="record.deleteFlag != null">
|
<if test="record.deleteFlag != null">
|
||||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.isdefault != null">
|
||||||
|
IsDefault = #{record.isdefault,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
|||||||
Reference in New Issue
Block a user