Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
5c56b5cc
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1173
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5c56b5cc
编写于
8月 14, 2022
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【ERP】仓库管理整改
上级
a5cecd1f
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
230 addition
and
532 deletion
+230
-532
erp/src/main/resources/template/js/salesoutlet/salesoutletadd.js
.../main/resources/template/js/salesoutlet/salesoutletadd.js
+74
-213
erp/src/main/resources/template/js/salesoutlet/salesoutletedit.js
...main/resources/template/js/salesoutlet/salesoutletedit.js
+114
-241
erp/src/main/resources/template/js/storeHouseApproval/storeHouseOtherList.js
...ces/template/js/storeHouseApproval/storeHouseOtherList.js
+1
-1
erp/src/main/resources/template/js/storeHouseApproval/storeHousePassOtherList.js
...template/js/storeHouseApproval/storeHousePassOtherList.js
+1
-1
erp/src/main/resources/template/js/storeHouseInventory/storeHouseInventoryList.js
...emplate/js/storeHouseInventory/storeHouseInventoryList.js
+1
-1
erp/src/main/resources/template/js/storehouse/storehouseadd.js
...rc/main/resources/template/js/storehouse/storehouseadd.js
+2
-2
erp/src/main/resources/template/js/storehouse/storehouseedit.js
...c/main/resources/template/js/storehouse/storehouseedit.js
+5
-5
erp/src/main/resources/template/js/storehouse/storehouseinfo.js
...c/main/resources/template/js/storehouse/storehouseinfo.js
+6
-4
erp/src/main/resources/template/js/storehouse/storehouselist.js
...c/main/resources/template/js/storehouse/storehouselist.js
+18
-39
erp/src/main/resources/template/tpl/salesoutlet/salesoutletadd.html
...in/resources/template/tpl/salesoutlet/salesoutletadd.html
+1
-1
erp/src/main/resources/template/tpl/salesoutlet/salesoutletedit.html
...n/resources/template/tpl/salesoutlet/salesoutletedit.html
+1
-1
erp/src/main/resources/template/tpl/storehouse/storehouseedit.html
...ain/resources/template/tpl/storehouse/storehouseedit.html
+1
-1
erp/src/main/resources/template/tpl/storehouse/storehouseinfo.html
...ain/resources/template/tpl/storehouse/storehouseinfo.html
+1
-1
erp/src/main/resources/template/tpl/storehouse/storehouselist.html
...ain/resources/template/tpl/storehouse/storehouselist.html
+3
-20
userauth/src/main/resources/template/js/syseveuserstaff/syseveuserstafflist.js
...ources/template/js/syseveuserstaff/syseveuserstafflist.js
+1
-1
未找到文件。
erp/src/main/resources/template/js/salesoutlet/salesoutletadd.js
浏览文件 @
5c56b5cc
//已经选择的客户信息
//
已经选择的客户信息
var
customerMation
=
{};
//根据那一列的值进行变化,默认根据数量
//
根据那一列的值进行变化,默认根据数量
var
showTdByEdit
=
'
rkNum
'
;
//表格的序号
var
rowNum
=
1
;
// 兼容动态表单
var
layedit
,
form
;
...
...
@@ -29,10 +27,8 @@ layui.config({
var
inoutitemHtml
=
""
;
//支出项目
var
salesManList
=
new
Array
();
//销售人员
var
usetableTemplate
=
$
(
"
#usetableTemplate
"
).
html
(),
otherTemplate
=
$
(
"
#otherTemplate
"
).
html
();
var
selOption
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
//已经选择的商品集合key:表格的行trId,value:商品信息
//
已经选择的商品集合key:表格的行trId,value:商品信息
var
allChooseProduct
=
{};
// 获取单据提交类型
...
...
@@ -59,36 +55,60 @@ layui.config({
erpOrderUtil
.
getDepotList
(
function
(
json
){
// 加载仓库数据
$
(
"
#depotId
"
).
html
(
getDataUseHandlebars
(
selOption
,
json
));
// 初始化一行数据
addRow
();
});
// 商品
initTableChooseUtil
.
initTable
({
id
:
"
productList
"
,
cols
:
[
{
id
:
'
materialId
'
,
title
:
'
商品(型号)
'
,
formType
:
'
chooseInput
'
,
width
:
'
150
'
,
iconClassName
:
'
chooseProductBtn
'
,
verify
:
'
required
'
},
{
id
:
'
mUnitId
'
,
title
:
'
单位
'
,
formType
:
'
select
'
,
width
:
'
50
'
,
verify
:
'
required
'
,
layFilter
:
'
selectUnitProperty
'
},
{
id
:
'
currentTock
'
,
title
:
'
库存
'
,
formType
:
'
detail
'
,
width
:
'
80
'
},
{
id
:
'
rkNum
'
,
title
:
'
数量
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input rkNum
'
,
verify
:
'
required|number
'
,
value
:
'
1
'
},
{
id
:
'
unitPrice
'
,
title
:
'
单价
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input unitPrice
'
,
verify
:
'
required|money
'
},
{
id
:
'
amountOfMoney
'
,
title
:
'
金额
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input amountOfMoney
'
,
verify
:
'
required|money
'
},
{
id
:
'
taxRate
'
,
title
:
'
税率(%)
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxRate
'
,
verify
:
'
required|double
'
,
value
:
'
0.00
'
},
{
id
:
'
taxMoney
'
,
title
:
'
税额
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxMoney
'
,
verify
:
'
required|money
'
},
{
id
:
'
taxUnitPrice
'
,
title
:
'
含税单价
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxUnitPrice
'
,
verify
:
'
required|money
'
},
{
id
:
'
taxLastMoney
'
,
title
:
'
合计价税
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxLastMoney
'
,
verify
:
'
required|money
'
},
{
id
:
'
remark
'
,
title
:
'
备注
'
,
formType
:
'
input
'
,
width
:
'
100
'
}
],
deleteRowCallback
:
function
(
trcusid
)
{
delete
allChooseProduct
[
trcusid
];
// 计算价格
calculatedTotalPrice
();
},
addRowCallback
:
function
(
trcusid
)
{
// 设置根据某列变化的颜色
$
(
"
.
"
+
showTdByEdit
).
parent
().
css
({
'
background-color
'
:
'
#e6e6e6
'
});
},
form
:
form
,
minData
:
1
});
// 其他费用
initTableChooseUtil
.
initTable
({
id
:
"
otherPriceTableList
"
,
cols
:
[
{
id
:
'
inoutitemId
'
,
title
:
'
支出项目
'
,
formType
:
'
select
'
,
width
:
'
120
'
,
verify
:
'
required
'
,
modelHtml
:
inoutitemHtml
},
{
id
:
'
otherPrice
'
,
title
:
'
费用合计:0.00
'
,
formType
:
'
input
'
,
width
:
'
120
'
,
className
:
'
otherPrice
'
,
verify
:
'
required|money
'
,
colHeaderId
:
'
otherPriceTotal
'
}
],
deleteRowCallback
:
function
(
trcusid
)
{
calculationPrice
();
},
addRowCallback
:
function
(
trcusid
)
{
calculationPrice
();
},
form
:
form
});
// 加载动态表单
dsFormUtil
.
loadPageByCode
(
"
dsFormShow
"
,
sysDsFormWithCodeType
[
"
outIsSalesOutlet
"
][
"
code
"
],
null
);
matchingLanguage
();
//商品规格加载变化事件
form
.
on
(
'
select(selectUnitProperty)
'
,
function
(
data
)
{
var
thisRowValue
=
data
.
value
;
var
thisRowNum
=
data
.
elem
.
id
.
replace
(
"
unitId
"
,
""
);
//获取当前行
//当前当前行选中的商品信息
if
(
!
isNull
(
thisRowValue
)
&&
thisRowValue
!=
'
请选择
'
)
{
var
product
=
allChooseProduct
[
"
tr
"
+
thisRowNum
.
toString
()];
$
.
each
(
product
.
unitList
,
function
(
j
,
bean
)
{
if
(
thisRowValue
==
bean
.
id
){
//获取规格
$
(
"
#unitPrice
"
+
thisRowNum
).
val
(
bean
.
salePrice
.
toFixed
(
2
));
//单价
return
false
;
}
});
}
else
{
$
(
"
#unitPrice
"
+
thisRowNum
).
val
(
"
0.00
"
);
//重置单价为空
}
//加载库存
loadTockByDepotAndMUnit
(
thisRowNum
,
$
(
"
#depotId
"
).
val
());
//计算价格
calculatedTotalPrice
();
});
// 商品规格加载变化事件
mUnitChangeEvent
(
form
,
allChooseProduct
,
"
salePrice
"
);
// 仓库变化事件
form
.
on
(
'
select(depotId)
'
,
function
(
data
)
{
...
...
@@ -122,68 +142,42 @@ layui.config({
});
function
saveData
(
subType
,
approvalId
)
{
if
(
isNull
(
customerMation
.
id
)){
winui
.
window
.
msg
(
'
请选择客户.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
//获取已选商品数据
var
rowTr
=
$
(
"
#useTable tr
"
);
if
(
rowTr
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择商品.
'
,
{
icon
:
2
,
time
:
2000
});
var
result
=
initTableChooseUtil
.
getDataList
(
'
productList
'
);
if
(
!
result
.
checkResult
)
{
return
false
;
}
var
tableData
=
new
Array
()
;
var
noError
=
false
;
//循环遍历表格数据时,是否有其他错误信息
$
.
each
(
r
owTr
,
function
(
i
,
item
)
{
var
noError
=
false
;
var
tableData
=
[];
$
.
each
(
r
esult
.
dataList
,
function
(
i
,
item
)
{
//获取行编号
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
//表格数量对象
var
rkNum
=
$
(
"
#rkNum
"
+
rowNum
);
if
(
parseInt
(
rkNum
.
val
())
==
0
)
{
rkNum
.
addClass
(
"
layui-form-danger
"
);
rkNum
.
focus
();
var
thisRowKey
=
item
[
"
trcusid
"
].
replace
(
"
tr
"
,
""
);
if
(
parseInt
(
item
.
rkNum
)
==
0
)
{
$
(
"
#rkNum
"
+
thisRowKey
).
addClass
(
"
layui-form-danger
"
);
$
(
"
#rkNum
"
+
thisRowKey
).
focus
();
winui
.
window
.
msg
(
'
数量不能为0
'
,
{
icon
:
2
,
time
:
2000
});
noError
=
true
;
return
false
;
}
//商品对象
var
product
=
allChooseProduct
[
"
tr
"
+
rowNum
.
toString
()
];
if
(
inTableDataArrayByAssetarId
(
product
.
productId
,
$
(
"
#unitId
"
+
rowNum
).
val
()
,
tableData
))
{
var
product
=
allChooseProduct
[
"
tr
"
+
thisRowKey
];
if
(
inTableDataArrayByAssetarId
(
product
.
productId
,
item
.
mUnitId
,
tableData
))
{
winui
.
window
.
msg
(
'
一张单中不允许出现相同单位的商品信息.
'
,
{
icon
:
2
,
time
:
2000
});
noError
=
true
;
return
false
;
}
var
row
=
{
depotId
:
$
(
"
#depotId
"
).
val
(),
materialId
:
$
(
"
#materialId
"
+
rowNum
).
val
(),
mUnitId
:
$
(
"
#unitId
"
+
rowNum
).
val
(),
rkNum
:
rkNum
.
val
(),
unitPrice
:
$
(
"
#unitPrice
"
+
rowNum
).
val
(),
taxRate
:
$
(
"
#taxRate
"
+
rowNum
).
val
(),
taxMoney
:
$
(
"
#taxMoney
"
+
rowNum
).
val
(),
taxUnitPrice
:
$
(
"
#taxUnitPrice
"
+
rowNum
).
val
(),
taxLastMoney
:
$
(
"
#taxLastMoney
"
+
rowNum
).
val
(),
remark
:
$
(
"
#remark
"
+
rowNum
).
val
()
};
tableData
.
push
(
row
);
item
[
"
materialId
"
]
=
product
.
productId
;
item
[
"
depotId
"
]
=
$
(
"
#depotId
"
).
val
();
tableData
.
push
(
item
);
});
if
(
noError
)
{
if
(
noError
)
{
return
false
;
}
//获取其他费用
var
rowPriceTr
=
$
(
"
#otherPriceTable tr
"
);
var
tablePriceData
=
new
Array
();
// 其他费用
var
otherPriceResult
=
initTableChooseUtil
.
getDataList
(
'
otherPriceTableList
'
);
var
otherMoney
=
0
;
$
.
each
(
rowPriceTr
,
function
(
i
,
item
)
{
//获取行编号
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
var
row
=
{
inoutitemId
:
$
(
"
#inoutitemId
"
+
rowNum
).
val
(),
otherPrice
:
$
(
"
#otherPrice
"
+
rowNum
).
val
()
};
otherMoney
+=
parseFloat
(
isNull
(
$
(
"
#otherPrice
"
+
rowNum
).
val
())
?
0
:
$
(
"
#otherPrice
"
+
rowNum
).
val
());
tablePriceData
.
push
(
row
);
$
.
each
(
otherPriceResult
.
dataList
,
function
(
i
,
item
)
{
otherMoney
+=
parseFloat
(
isNull
(
item
.
otherPrice
)
?
0
:
item
.
otherPrice
);
});
var
salesMan
=
""
;
...
...
@@ -202,7 +196,7 @@ layui.config({
changeAmount
:
isNull
(
$
(
"
#changeAmount
"
).
val
())
?
"
0.00
"
:
$
(
"
#changeAmount
"
).
val
(),
depotheadStr
:
JSON
.
stringify
(
tableData
),
otherMoney
:
otherMoney
.
toFixed
(
2
),
otherMoneyList
:
JSON
.
stringify
(
tablePriceData
),
otherMoneyList
:
JSON
.
stringify
(
otherPriceResult
.
dataList
),
salesMan
:
salesMan
,
submitType
:
submitType
,
subType
:
subType
,
...
...
@@ -235,58 +229,6 @@ layui.config({
salesManList
=
[].
concat
(
systemCommonUtil
.
tagEditorResetData
(
'
salesMan
'
,
userReturnList
));
});
});
/*********************** 商品表格操作 start ****************************/
//新增行
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
//删除行
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
//计算价格
calculatedTotalPrice
();
});
//新增行
function
addRow
()
{
var
par
=
{
id
:
"
row
"
+
rowNum
.
toString
(),
//checkbox的id
trId
:
"
tr
"
+
rowNum
.
toString
(),
//行的id
materialId
:
"
materialId
"
+
rowNum
.
toString
(),
//商品id
unitId
:
"
unitId
"
+
rowNum
.
toString
(),
//规格id
currentTock
:
"
currentTock
"
+
rowNum
.
toString
(),
//库存id
rkNum
:
"
rkNum
"
+
rowNum
.
toString
(),
//数量id
unitPrice
:
"
unitPrice
"
+
rowNum
.
toString
(),
//单价id
amountOfMoney
:
"
amountOfMoney
"
+
rowNum
.
toString
(),
//金额id
taxRate
:
"
taxRate
"
+
rowNum
.
toString
(),
//税率id
taxMoney
:
"
taxMoney
"
+
rowNum
.
toString
(),
//税额id
taxUnitPrice
:
"
taxUnitPrice
"
+
rowNum
.
toString
(),
//含税单价id
taxLastMoney
:
"
taxLastMoney
"
+
rowNum
.
toString
(),
//含税合计id
remark
:
"
remark
"
+
rowNum
.
toString
()
//备注id
};
$
(
"
#useTable
"
).
append
(
getDataUseHandlebars
(
usetableTemplate
,
par
));
form
.
render
();
rowNum
++
;
//设置根据某列变化的颜色
$
(
"
.
"
+
showTdByEdit
).
parent
().
css
({
'
background-color
'
:
'
#e6e6e6
'
});
}
//删除行
function
deleteRow
()
{
var
checkRow
=
$
(
"
#useTable input[type='checkbox'][name='tableCheckRow']:checked
"
);
if
(
checkRow
.
length
>
0
)
{
$
.
each
(
checkRow
,
function
(
i
,
item
)
{
//删除allChooseProduct已选择的商品信息
var
trId
=
$
(
item
).
parent
().
parent
().
attr
(
"
trcusid
"
);
allChooseProduct
[
trId
]
=
undefined
;
//移除界面上的信息
$
(
item
).
parent
().
parent
().
remove
();
});
}
else
{
winui
.
window
.
msg
(
'
请选择要删除的行
'
,
{
icon
:
2
,
time
:
2000
});
}
}
//客户选择
$
(
"
body
"
).
on
(
"
click
"
,
"
#customMationSel
"
,
function
(
e
)
{
...
...
@@ -300,93 +242,12 @@ layui.config({
}});
});
//商品选择
$
(
"
body
"
).
on
(
"
click
"
,
"
.chooseProductBtn
"
,
function
(
e
)
{
var
trId
=
$
(
this
).
parent
().
parent
().
attr
(
"
trcusid
"
);
erpOrderUtil
.
openMaterialChooseChoosePage
(
function
(
chooseProductMation
)
{
//获取表格行号
var
thisRowNum
=
trId
.
replace
(
"
tr
"
,
""
);
//商品赋值
allChooseProduct
[
trId
]
=
chooseProductMation
;
//表格商品名称赋值
$
(
"
#materialId
"
+
thisRowNum
.
toString
()).
val
(
allChooseProduct
[
trId
].
productName
+
"
(
"
+
allChooseProduct
[
trId
].
productModel
+
"
)
"
);
//表格单位赋值
$
(
"
#unitId
"
+
thisRowNum
.
toString
()).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
allChooseProduct
[
trId
].
unitList
}));
form
.
render
(
'
select
'
);
//计算价格
calculatedTotalPrice
();
});
});
/*********************** 商品表格操作 end ****************************/
/*********************** 其他费用表格操作 start ****************************/
//其他费用变化
$
(
"
body
"
).
on
(
"
input
"
,
"
.otherPrice
"
,
function
()
{
//计算价格
calculationPrice
();
});
$
(
"
body
"
).
on
(
"
change
"
,
"
.otherPrice
"
,
function
()
{
//计算价格
calculationPrice
();
});
//计算其他费用总价格
function
calculationPrice
(){
var
rowTr
=
$
(
"
#otherPriceTable tr
"
);
var
allPrice
=
0
;
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
//获取行坐标
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
//获取
var
otherPrice
=
parseFloat
(
isNull
(
$
(
"
#otherPrice
"
+
rowNum
).
val
())
?
0
:
$
(
"
#otherPrice
"
+
rowNum
).
val
());
allPrice
+=
otherPrice
;
});
$
(
"
#otherPriceTotal
"
).
html
(
"
费用合计:
"
+
allPrice
.
toFixed
(
2
));
}
var
priceNum
=
1
;
//新增行
$
(
"
body
"
).
on
(
"
click
"
,
"
#addPriceRow
"
,
function
()
{
addPriceRow
();
// 加载商品选择事件
initChooseProductBtnEnent
(
form
,
function
(
trId
,
chooseProductMation
)
{
// 商品赋值
allChooseProduct
[
trId
]
=
chooseProductMation
;
});
//删除行
$
(
"
body
"
).
on
(
"
click
"
,
"
#deletePriceRow
"
,
function
()
{
deletePriceRow
();
});
//新增行
function
addPriceRow
()
{
var
par
=
{
id
:
"
row
"
+
priceNum
.
toString
(),
//checkbox的id
trId
:
"
tr
"
+
priceNum
.
toString
(),
//行的id
inoutitemId
:
"
inoutitemId
"
+
priceNum
.
toString
(),
//支出项目id
otherPrice
:
"
otherPrice
"
+
priceNum
.
toString
()
//金额id
};
$
(
"
#otherPriceTable
"
).
append
(
getDataUseHandlebars
(
otherTemplate
,
par
));
//赋值给支出项目
$
(
"
#
"
+
"
inoutitemId
"
+
priceNum
.
toString
()).
html
(
inoutitemHtml
);
form
.
render
(
'
select
'
);
form
.
render
(
'
checkbox
'
);
priceNum
++
;
}
//删除行
function
deletePriceRow
()
{
var
checkRow
=
$
(
"
#otherPriceTable input[type='checkbox'][name='tableCheckRow']:checked
"
);
if
(
checkRow
.
length
>
0
)
{
$
.
each
(
checkRow
,
function
(
i
,
item
)
{
$
(
item
).
parent
().
parent
().
remove
();
});
}
else
{
winui
.
window
.
msg
(
'
请选择要删除的行
'
,
{
icon
:
2
,
time
:
2000
});
}
//计算价格
calculationPrice
();
}
/*********************** 其他费用表格操作 end ****************************/
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
...
...
erp/src/main/resources/template/js/salesoutlet/salesoutletedit.js
浏览文件 @
5c56b5cc
//已经选择的客户信息
//
已经选择的客户信息
var
customerMation
=
{};
//根据那一列的值进行变化,默认根据数量
//
根据那一列的值进行变化,默认根据数量
var
showTdByEdit
=
'
rkNum
'
;
//表格的序号
var
rowNum
=
1
;
// 兼容动态表单
var
layedit
,
form
;
...
...
@@ -28,12 +26,9 @@ layui.config({
var
inoutitemHtml
=
""
;
//支出项目
var
salesManList
=
new
Array
();
//销售人员
var
priceNum
=
1
;
var
usetableTemplate
=
$
(
"
#usetableTemplate
"
).
html
(),
otherTemplate
=
$
(
"
#otherTemplate
"
).
html
();
var
selOption
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
//已经选择的商品集合key:表格的行trId,value:商品信息
//
已经选择的商品集合key:表格的行trId,value:商品信息
var
allChooseProduct
=
{};
// 获取单据提交类型
...
...
@@ -85,35 +80,45 @@ layui.config({
$
(
"
#arrears
"
).
html
(
json
.
bean
.
arrears
.
toFixed
(
2
));
$
(
"
#otherPriceTotal
"
).
html
(
"
费用合计:
"
+
json
.
bean
.
otherMoney
.
toFixed
(
2
));
//加载列表项
$
.
each
(
json
.
bean
.
norms
,
function
(
i
,
item
){
addRow
();
if
(
i
==
0
){
initTable
();
// 回显商品列表
initTableChooseUtil
.
deleteAllRow
(
'
productList
'
);
$
.
each
(
json
.
bean
.
norms
,
function
(
i
,
item
)
{
if
(
i
==
0
)
{
$
(
"
#depotId
"
).
val
(
item
.
depotId
);
}
//将规格所属的商品信息加入到对象中存储
allChooseProduct
[
"
tr
"
+
(
rowNum
-
1
)]
=
item
.
product
;
//单位回显
$
(
"
#unitId
"
+
(
rowNum
-
1
)).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
item
.
product
.
unitList
}));
$
(
"
#unitId
"
+
(
rowNum
-
1
)).
val
(
item
.
mUnitId
);
//商品回显
$
(
"
#materialId
"
+
(
rowNum
-
1
)).
val
(
item
.
product
.
productName
+
"
(
"
+
item
.
product
.
productModel
+
"
)
"
);
$
(
"
#currentTock
"
+
(
rowNum
-
1
)).
html
(
item
.
currentTock
);
//库存回显
$
(
"
#rkNum
"
+
(
rowNum
-
1
)).
val
(
item
.
operNum
);
$
(
"
#unitPrice
"
+
(
rowNum
-
1
)).
val
(
item
.
unitPrice
.
toFixed
(
2
));
$
(
"
#amountOfMoney
"
+
(
rowNum
-
1
)).
val
(
item
.
allPrice
.
toFixed
(
2
));
$
(
"
#taxRate
"
+
(
rowNum
-
1
)).
val
(
item
.
taxRate
.
toFixed
(
2
));
$
(
"
#taxMoney
"
+
(
rowNum
-
1
)).
val
(
item
.
taxMoney
.
toFixed
(
2
));
$
(
"
#taxUnitPrice
"
+
(
rowNum
-
1
)).
val
(
item
.
taxUnitPrice
.
toFixed
(
2
));
$
(
"
#taxLastMoney
"
+
(
rowNum
-
1
)).
val
(
item
.
taxLastMoney
.
toFixed
(
2
));
$
(
"
#remark
"
+
(
rowNum
-
1
)).
val
(
item
.
remark
);
var
params
=
{
"
materialId
"
:
item
.
product
.
productName
+
"
(
"
+
item
.
product
.
productModel
+
"
)
"
,
"
mUnitId
"
:
{
"
html
"
:
getDataUseHandlebars
(
selOption
,
{
rows
:
item
.
product
.
unitList
}),
"
value
"
:
item
.
mUnitId
},
"
currentTock
"
:
item
.
currentTock
,
"
rkNum
"
:
item
.
operNum
,
"
unitPrice
"
:
item
.
unitPrice
.
toFixed
(
2
),
"
amountOfMoney
"
:
item
.
allPrice
.
toFixed
(
2
),
"
taxRate
"
:
item
.
taxRate
.
toFixed
(
2
),
"
taxMoney
"
:
item
.
taxMoney
.
toFixed
(
2
),
"
taxUnitPrice
"
:
item
.
taxUnitPrice
.
toFixed
(
2
),
"
taxLastMoney
"
:
item
.
taxLastMoney
.
toFixed
(
2
),
"
remark
"
:
item
.
remark
};
var
trcusid
=
initTableChooseUtil
.
resetData
(
'
productList
'
,
params
);
// 将规格所属的商品信息加入到对象中存储
allChooseProduct
[
trcusid
]
=
item
.
product
;
});
//加载其他费用
$
.
each
(
json
.
bean
.
otherMoneyList
,
function
(
i
,
item
){
addPriceRow
();
$
(
"
#inoutitemId
"
+
(
priceNum
-
1
)).
val
(
item
.
inoutitemId
);
$
(
"
#otherPrice
"
+
(
priceNum
-
1
)).
val
(
parseFloat
(
item
.
otherPrice
).
toFixed
(
2
));
// 回显其他费用
initTableChooseUtil
.
deleteAllRow
(
'
otherPriceTableList
'
);
$
.
each
(
json
.
bean
.
otherMoneyList
,
function
(
i
,
item
)
{
var
params
=
{
"
inoutitemId
"
:
{
"
value
"
:
item
.
inoutitemId
},
"
otherPrice
"
:
parseFloat
(
item
.
otherPrice
).
toFixed
(
2
)
};
initTableChooseUtil
.
resetData
(
'
otherPriceTableList
'
,
params
);
});
var
userNames
=
""
;
...
...
@@ -121,7 +126,7 @@ layui.config({
$
.
each
(
salesManList
,
function
(
i
,
item
)
{
userNames
+=
item
.
name
+
'
,
'
;
});
//人员选择
//
人员选择
$
(
'
#salesMan
'
).
tagEditor
({
initialTags
:
userNames
.
split
(
'
,
'
),
placeholder
:
'
请选择销售人员
'
,
...
...
@@ -142,30 +147,56 @@ layui.config({
}});
}
//商品规格加载变化事件
form
.
on
(
'
select(selectUnitProperty)
'
,
function
(
data
)
{
var
thisRowValue
=
data
.
value
;
var
thisRowNum
=
data
.
elem
.
id
.
replace
(
"
unitId
"
,
""
);
//获取当前行
//当前当前行选中的商品信息
if
(
!
isNull
(
thisRowValue
)
&&
thisRowValue
!=
'
请选择
'
)
{
var
product
=
allChooseProduct
[
"
tr
"
+
thisRowNum
.
toString
()];
$
.
each
(
product
.
unitList
,
function
(
j
,
bean
)
{
if
(
thisRowValue
==
bean
.
id
){
//获取规格
//获取当前行数量
var
rkNum
=
parseInt
(
$
(
"
#rkNum
"
+
thisRowNum
).
val
());
$
(
"
#unitPrice
"
+
thisRowNum
).
val
(
bean
.
salePrice
.
toFixed
(
2
));
//单价
return
false
;
}
});
}
else
{
$
(
"
#unitPrice
"
+
thisRowNum
).
val
(
"
0.00
"
);
//重置单价为空
}
function
initTable
()
{
// 商品
initTableChooseUtil
.
initTable
({
id
:
"
productList
"
,
cols
:
[
{
id
:
'
materialId
'
,
title
:
'
商品(型号)
'
,
formType
:
'
chooseInput
'
,
width
:
'
150
'
,
iconClassName
:
'
chooseProductBtn
'
,
verify
:
'
required
'
},
{
id
:
'
mUnitId
'
,
title
:
'
单位
'
,
formType
:
'
select
'
,
width
:
'
50
'
,
verify
:
'
required
'
,
layFilter
:
'
selectUnitProperty
'
},
{
id
:
'
currentTock
'
,
title
:
'
库存
'
,
formType
:
'
detail
'
,
width
:
'
80
'
},
{
id
:
'
rkNum
'
,
title
:
'
数量
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input rkNum
'
,
verify
:
'
required|number
'
,
value
:
'
1
'
},
{
id
:
'
unitPrice
'
,
title
:
'
单价
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input unitPrice
'
,
verify
:
'
required|money
'
},
{
id
:
'
amountOfMoney
'
,
title
:
'
金额
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input amountOfMoney
'
,
verify
:
'
required|money
'
},
{
id
:
'
taxRate
'
,
title
:
'
税率(%)
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxRate
'
,
verify
:
'
required|double
'
,
value
:
'
0.00
'
},
{
id
:
'
taxMoney
'
,
title
:
'
税额
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxMoney
'
,
verify
:
'
required|money
'
},
{
id
:
'
taxUnitPrice
'
,
title
:
'
含税单价
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxUnitPrice
'
,
verify
:
'
required|money
'
},
{
id
:
'
taxLastMoney
'
,
title
:
'
合计价税
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input taxLastMoney
'
,
verify
:
'
required|money
'
},
{
id
:
'
remark
'
,
title
:
'
备注
'
,
formType
:
'
input
'
,
width
:
'
100
'
}
],
deleteRowCallback
:
function
(
trcusid
)
{
delete
allChooseProduct
[
trcusid
];
// 计算价格
calculatedTotalPrice
();
},
addRowCallback
:
function
(
trcusid
)
{
// 设置根据某列变化的颜色
$
(
"
.
"
+
showTdByEdit
).
parent
().
css
({
'
background-color
'
:
'
#e6e6e6
'
});
calculatedTotalPrice
();
},
form
:
form
,
minData
:
1
});
//加载库存
loadTockByDepotAndMUnit
(
thisRowNum
,
$
(
"
#depotId
"
).
val
());
//计算价格
calculatedTotalPrice
();
});
// 其他费用
initTableChooseUtil
.
initTable
({
id
:
"
otherPriceTableList
"
,
cols
:
[
{
id
:
'
inoutitemId
'
,
title
:
'
支出项目
'
,
formType
:
'
select
'
,
width
:
'
120
'
,
verify
:
'
required
'
,
modelHtml
:
inoutitemHtml
},
{
id
:
'
otherPrice
'
,
title
:
'
费用合计:0.00
'
,
formType
:
'
input
'
,
width
:
'
120
'
,
className
:
'
otherPrice
'
,
verify
:
'
required|money
'
,
colHeaderId
:
'
otherPriceTotal
'
}
],
deleteRowCallback
:
function
(
trcusid
)
{
calculationPrice
();
},
addRowCallback
:
function
(
trcusid
)
{
calculationPrice
();
},
form
:
form
});
}
// 商品规格加载变化事件
mUnitChangeEvent
(
form
,
allChooseProduct
,
"
salePrice
"
);
// 仓库变化事件
form
.
on
(
'
select(depotId)
'
,
function
(
data
)
{
...
...
@@ -207,67 +238,42 @@ layui.config({
});
function
saveData
(
subType
,
approvalId
)
{
if
(
isNull
(
customerMation
.
id
)){
winui
.
window
.
msg
(
'
请选择客户.
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
//获取已选商品数据
var
rowTr
=
$
(
"
#useTable tr
"
);
if
(
rowTr
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请选择商品.
'
,
{
icon
:
2
,
time
:
2000
});
var
result
=
initTableChooseUtil
.
getDataList
(
'
productList
'
);
if
(
!
result
.
checkResult
)
{
return
false
;
}
var
tableData
=
new
Array
()
;
var
noError
=
false
;
//循环遍历表格数据时,是否有其他错误信息
$
.
each
(
r
owTr
,
function
(
i
,
item
)
{
var
noError
=
false
;
var
tableData
=
[];
$
.
each
(
r
esult
.
dataList
,
function
(
i
,
item
)
{
//获取行编号
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
//表格数量对象
var
rkNum
=
$
(
"
#rkNum
"
+
rowNum
);
if
(
parseInt
(
rkNum
.
val
())
==
0
)
{
rkNum
.
addClass
(
"
layui-form-danger
"
);
rkNum
.
focus
();
var
thisRowKey
=
item
[
"
trcusid
"
].
replace
(
"
tr
"
,
""
);
if
(
parseInt
(
item
.
rkNum
)
==
0
)
{
$
(
"
#rkNum
"
+
thisRowKey
).
addClass
(
"
layui-form-danger
"
);
$
(
"
#rkNum
"
+
thisRowKey
).
focus
();
winui
.
window
.
msg
(
'
数量不能为0
'
,
{
icon
:
2
,
time
:
2000
});
noError
=
true
;
return
false
;
}
//商品对象
var
product
=
allChooseProduct
[
"
tr
"
+
rowNum
.
toString
()
];
if
(
inTableDataArrayByAssetarId
(
product
.
productId
,
$
(
"
#unitId
"
+
rowNum
).
val
()
,
tableData
))
{
var
product
=
allChooseProduct
[
"
tr
"
+
thisRowKey
];
if
(
inTableDataArrayByAssetarId
(
product
.
productId
,
item
.
mUnitId
,
tableData
))
{
winui
.
window
.
msg
(
'
一张单中不允许出现相同单位的商品信息.
'
,
{
icon
:
2
,
time
:
2000
});
noError
=
true
;
return
false
;
}
var
row
=
{
depotId
:
$
(
"
#depotId
"
).
val
(),
materialId
:
$
(
"
#materialId
"
+
rowNum
).
val
(),
mUnitId
:
$
(
"
#unitId
"
+
rowNum
).
val
(),
rkNum
:
rkNum
.
val
(),
unitPrice
:
$
(
"
#unitPrice
"
+
rowNum
).
val
(),
taxRate
:
$
(
"
#taxRate
"
+
rowNum
).
val
(),
taxMoney
:
$
(
"
#taxMoney
"
+
rowNum
).
val
(),
taxUnitPrice
:
$
(
"
#taxUnitPrice
"
+
rowNum
).
val
(),
taxLastMoney
:
$
(
"
#taxLastMoney
"
+
rowNum
).
val
(),
remark
:
$
(
"
#remark
"
+
rowNum
).
val
()
};
tableData
.
push
(
row
);
item
[
"
materialId
"
]
=
product
.
productId
;
item
[
"
depotId
"
]
=
$
(
"
#depotId
"
).
val
();
tableData
.
push
(
item
);
});
if
(
noError
)
{
if
(
noError
)
{
return
false
;
}
//获取其他费用
var
rowPriceTr
=
$
(
"
#otherPriceTable tr
"
);
var
tablePriceData
=
new
Array
(
);
// 其他费用
var
otherPriceResult
=
initTableChooseUtil
.
getDataList
(
'
otherPriceTableList
'
);
var
otherMoney
=
0
;
$
.
each
(
rowPriceTr
,
function
(
i
,
item
)
{
//获取行编号
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
var
row
=
{
inoutitemId
:
$
(
"
#inoutitemId
"
+
rowNum
).
val
(),
otherPrice
:
$
(
"
#otherPrice
"
+
rowNum
).
val
()
};
otherMoney
+=
parseFloat
(
isNull
(
$
(
"
#otherPrice
"
+
rowNum
).
val
())
?
0
:
$
(
"
#otherPrice
"
+
rowNum
).
val
());
tablePriceData
.
push
(
row
);
$
.
each
(
otherPriceResult
.
dataList
,
function
(
i
,
item
)
{
otherMoney
+=
parseFloat
(
isNull
(
item
.
otherPrice
)
?
0
:
item
.
otherPrice
);
});
//销售人员
...
...
@@ -287,7 +293,7 @@ layui.config({
changeAmount
:
isNull
(
$
(
"
#changeAmount
"
).
val
())
?
"
0.00
"
:
$
(
"
#changeAmount
"
).
val
(),
depotheadStr
:
JSON
.
stringify
(
tableData
),
otherMoney
:
otherMoney
.
toFixed
(
2
),
otherMoneyList
:
JSON
.
stringify
(
tablePriceData
),
otherMoneyList
:
JSON
.
stringify
(
otherPriceResult
.
dataList
),
salesMan
:
salesMan
,
subType
:
subType
,
submitType
:
submitType
,
...
...
@@ -313,60 +319,7 @@ layui.config({
});
});
/*********************** 商品表格操作 start ****************************/
//新增行
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
//删除行
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
//计算价格
calculatedTotalPrice
();
});
//新增行
function
addRow
()
{
var
par
=
{
id
:
"
row
"
+
rowNum
.
toString
(),
//checkbox的id
trId
:
"
tr
"
+
rowNum
.
toString
(),
//行的id
materialId
:
"
materialId
"
+
rowNum
.
toString
(),
//商品id
unitId
:
"
unitId
"
+
rowNum
.
toString
(),
//规格id
currentTock
:
"
currentTock
"
+
rowNum
.
toString
(),
//库存id
rkNum
:
"
rkNum
"
+
rowNum
.
toString
(),
//数量id
unitPrice
:
"
unitPrice
"
+
rowNum
.
toString
(),
//单价id
amountOfMoney
:
"
amountOfMoney
"
+
rowNum
.
toString
(),
//金额id
taxRate
:
"
taxRate
"
+
rowNum
.
toString
(),
//税率id
taxMoney
:
"
taxMoney
"
+
rowNum
.
toString
(),
//税额id
taxUnitPrice
:
"
taxUnitPrice
"
+
rowNum
.
toString
(),
//含税单价id
taxLastMoney
:
"
taxLastMoney
"
+
rowNum
.
toString
(),
//含税合计id
remark
:
"
remark
"
+
rowNum
.
toString
()
//备注id
};
$
(
"
#useTable
"
).
append
(
getDataUseHandlebars
(
usetableTemplate
,
par
));
form
.
render
();
rowNum
++
;
//设置根据某列变化的颜色
$
(
"
.
"
+
showTdByEdit
).
parent
().
css
({
'
background-color
'
:
'
#e6e6e6
'
});
}
//删除行
function
deleteRow
()
{
var
checkRow
=
$
(
"
#useTable input[type='checkbox'][name='tableCheckRow']:checked
"
);
if
(
checkRow
.
length
>
0
)
{
$
.
each
(
checkRow
,
function
(
i
,
item
)
{
//删除allChooseProduct已选择的商品信息
var
trId
=
$
(
item
).
parent
().
parent
().
attr
(
"
trcusid
"
);
allChooseProduct
[
trId
]
=
undefined
;
//移除界面上的信息
$
(
item
).
parent
().
parent
().
remove
();
});
}
else
{
winui
.
window
.
msg
(
'
请选择要删除的行
'
,
{
icon
:
2
,
time
:
2000
});
}
}
//客户选择
// 客户选择
$
(
"
body
"
).
on
(
"
click
"
,
"
#customMationSel
"
,
function
(
e
)
{
_openNewWindows
({
url
:
"
../../tpl/customermanage/customerChoose.html
"
,
...
...
@@ -378,91 +331,11 @@ layui.config({
}});
});
//商品选择
$
(
"
body
"
).
on
(
"
click
"
,
"
.chooseProductBtn
"
,
function
(
e
)
{
var
trId
=
$
(
this
).
parent
().
parent
().
attr
(
"
trcusid
"
);
erpOrderUtil
.
openMaterialChooseChoosePage
(
function
(
chooseProductMation
)
{
//获取表格行号
var
thisRowNum
=
trId
.
replace
(
"
tr
"
,
""
);
//商品赋值
allChooseProduct
[
trId
]
=
chooseProductMation
;
//表格商品名称赋值
$
(
"
#materialId
"
+
thisRowNum
.
toString
()).
val
(
allChooseProduct
[
trId
].
productName
+
"
(
"
+
allChooseProduct
[
trId
].
productModel
+
"
)
"
);
//表格单位赋值
$
(
"
#unitId
"
+
thisRowNum
.
toString
()).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
allChooseProduct
[
trId
].
unitList
}));
form
.
render
(
'
select
'
);
//计算价格
calculatedTotalPrice
();
});
});
/*********************** 商品表格操作 end ****************************/
/*********************** 其他费用表格操作 start ****************************/
//其他费用变化
$
(
"
body
"
).
on
(
"
input
"
,
"
.otherPrice
"
,
function
()
{
//计算价格
calculationPrice
();
// 加载商品选择事件
initChooseProductBtnEnent
(
form
,
function
(
trId
,
chooseProductMation
)
{
// 商品赋值
allChooseProduct
[
trId
]
=
chooseProductMation
;
});
$
(
"
body
"
).
on
(
"
change
"
,
"
.otherPrice
"
,
function
()
{
//计算价格
calculationPrice
();
});
//计算其他费用总价格
function
calculationPrice
(){
var
rowTr
=
$
(
"
#otherPriceTable tr
"
);
var
allPrice
=
0
;
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
//获取行坐标
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
//获取
var
otherPrice
=
parseFloat
(
isNull
(
$
(
"
#otherPrice
"
+
rowNum
).
val
())
?
0
:
$
(
"
#otherPrice
"
+
rowNum
).
val
());
allPrice
+=
otherPrice
;
});
$
(
"
#otherPriceTotal
"
).
html
(
"
费用合计:
"
+
allPrice
.
toFixed
(
2
));
}
//新增行
$
(
"
body
"
).
on
(
"
click
"
,
"
#addPriceRow
"
,
function
()
{
addPriceRow
();
});
//删除行
$
(
"
body
"
).
on
(
"
click
"
,
"
#deletePriceRow
"
,
function
()
{
deletePriceRow
();
});
//新增行
function
addPriceRow
()
{
var
par
=
{
id
:
"
row
"
+
priceNum
.
toString
(),
//checkbox的id
trId
:
"
tr
"
+
priceNum
.
toString
(),
//行的id
inoutitemId
:
"
inoutitemId
"
+
priceNum
.
toString
(),
//支出项目id
otherPrice
:
"
otherPrice
"
+
priceNum
.
toString
()
//金额id
};
$
(
"
#otherPriceTable
"
).
append
(
getDataUseHandlebars
(
otherTemplate
,
par
));
//赋值给支出项目
$
(
"
#
"
+
"
inoutitemId
"
+
priceNum
.
toString
()).
html
(
inoutitemHtml
);
form
.
render
(
'
select
'
);
form
.
render
(
'
checkbox
'
);
priceNum
++
;
}
//删除行
function
deletePriceRow
()
{
var
checkRow
=
$
(
"
#otherPriceTable input[type='checkbox'][name='tableCheckRow']:checked
"
);
if
(
checkRow
.
length
>
0
)
{
$
.
each
(
checkRow
,
function
(
i
,
item
)
{
$
(
item
).
parent
().
parent
().
remove
();
});
}
else
{
winui
.
window
.
msg
(
'
请选择要删除的行
'
,
{
icon
:
2
,
time
:
2000
});
}
//计算价格
calculationPrice
();
}
/*********************** 其他费用表格操作 end ****************************/
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
...
...
erp/src/main/resources/template/js/storeHouseApproval/storeHouseOtherList.js
浏览文件 @
5c56b5cc
...
...
@@ -28,7 +28,7 @@ layui.config({
initDepotHtml
();
//初始化仓库
function
initDepotHtml
()
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse009
"
,
params
:
{},
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse009
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
//加载仓库数据
$
(
"
#depotId
"
).
html
(
getDataUseHandlebars
(
selOption
,
json
));
form
.
render
();
...
...
erp/src/main/resources/template/js/storeHouseApproval/storeHousePassOtherList.js
浏览文件 @
5c56b5cc
...
...
@@ -25,7 +25,7 @@ layui.config({
initDepotHtml
();
//初始化仓库
function
initDepotHtml
()
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse009
"
,
params
:
{},
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse009
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
//加载仓库数据
$
(
"
#depotId
"
).
html
(
getDataUseHandlebars
(
selOption
,
json
));
form
.
render
();
...
...
erp/src/main/resources/template/js/storeHouseInventory/storeHouseInventoryList.js
浏览文件 @
5c56b5cc
...
...
@@ -23,7 +23,7 @@ layui.config({
initDepotHtml
();
//初始化仓库
function
initDepotHtml
()
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse009
"
,
params
:
{},
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse009
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
//加载仓库数据
$
(
"
#depotId
"
).
html
(
getDataUseHandlebars
(
selOption
,
json
));
form
.
render
();
...
...
erp/src/main/resources/template/js/storehouse/storehouseadd.js
浏览文件 @
5c56b5cc
...
...
@@ -20,7 +20,7 @@ layui.config({
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
houseN
ame
:
$
(
"
#houseName
"
).
val
(),
n
ame
:
$
(
"
#houseName
"
).
val
(),
address
:
$
(
"
#address
"
).
val
(),
warehousing
:
$
(
"
#warehousing
"
).
val
(),
truckage
:
$
(
"
#truckage
"
).
val
(),
...
...
@@ -29,7 +29,7 @@ layui.config({
principal
:
systemCommonUtil
.
tagEditorGetAllData
(
'
principal
'
,
chooseUser
)
// 仓库负责人
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse002
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
writeDepotMation
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
...
...
erp/src/main/resources/template/js/storehouse/storehouseedit.js
浏览文件 @
5c56b5cc
...
...
@@ -15,8 +15,8 @@ layui.config({
showGrid
({
id
:
"
showForm
"
,
url
:
flowableBasePath
+
"
storehouse003
"
,
params
:
{
rowI
d
:
parent
.
rowId
},
url
:
flowableBasePath
+
"
queryStoreHouseById
"
,
params
:
{
i
d
:
parent
.
rowId
},
pagination
:
false
,
method
:
'
GET
'
,
template
:
$
(
"
#beanTemplate
"
).
html
(),
...
...
@@ -50,8 +50,8 @@ layui.config({
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
rowI
d
:
parent
.
rowId
,
houseN
ame
:
$
(
"
#houseName
"
).
val
(),
i
d
:
parent
.
rowId
,
n
ame
:
$
(
"
#houseName
"
).
val
(),
address
:
$
(
"
#address
"
).
val
(),
warehousing
:
$
(
"
#warehousing
"
).
val
(),
truckage
:
$
(
"
#truckage
"
).
val
(),
...
...
@@ -60,7 +60,7 @@ layui.config({
principal
:
systemCommonUtil
.
tagEditorGetAllData
(
'
principal
'
,
chooseUser
)
// 仓库负责人
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse005
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
writeDepotMation
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
...
...
erp/src/main/resources/template/js/storehouse/storehouseinfo.js
浏览文件 @
5c56b5cc
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
...
...
@@ -8,13 +9,14 @@ layui.config({
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
;
var
simpleTemplate
=
$
(
"
#simpleTemplate
"
).
html
();
showGrid
({
id
:
"
showForm
"
,
url
:
flowableBasePath
+
"
storehouse007
"
,
params
:
{
rowI
d
:
parent
.
rowId
},
url
:
flowableBasePath
+
"
queryStoreHouseById
"
,
params
:
{
i
d
:
parent
.
rowId
},
pagination
:
false
,
template
:
simpleTemplate
,
method
:
"
GET
"
,
template
:
$
(
"
#simpleTemplate
"
).
html
(),
ajaxSendAfter
:
function
(
json
)
{
$
(
"
#isDefault
"
).
html
(
json
.
bean
.
isDefault
==
"
1
"
?
"
<span class='state-up'>是</span>
"
:
"
<span class='state-down'>否</span>
"
);
matchingLanguage
();
...
...
erp/src/main/resources/template/js/storehouse/storehouselist.js
浏览文件 @
5c56b5cc
...
...
@@ -23,13 +23,13 @@ layui.config({
limits
:
getLimits
(),
limit
:
getLimit
(),
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
houseName
'
,
title
:
'
仓库名称
'
,
align
:
'
left
'
,
width
:
200
,
templet
:
function
(
d
)
{
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
houseName
'
,
title
:
'
仓库名称
'
,
align
:
'
left
'
,
width
:
200
,
templet
:
function
(
d
)
{
return
'
<a lay-event="select" class="notice-title-click">
'
+
d
.
houseName
+
'
</a>
'
;
}},
{
field
:
'
address
'
,
title
:
'
仓库地址
'
,
align
:
'
left
'
,
width
:
300
},
{
field
:
'
warehousing
'
,
title
:
'
仓储费
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
truckage
'
,
title
:
'
搬运费
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
address
'
,
title
:
'
仓库地址
'
,
align
:
'
left
'
,
width
:
300
},
{
field
:
'
warehousing
'
,
title
:
'
仓储费
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
truckage
'
,
title
:
'
搬运费
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
isDefault
'
,
title
:
'
默认仓库
'
,
align
:
'
center
'
,
width
:
80
,
templet
:
function
(
d
)
{
if
(
d
.
isDefault
==
'
1
'
)
{
return
"
<span class='state-up'>是</span>
"
;
...
...
@@ -45,27 +45,28 @@ layui.config({
{
field
:
'
lastUpdateTime
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
200
,
toolbar
:
'
#tableBar
'
}
]],
done
:
function
(
)
{
done
:
function
(
json
)
{
matchingLanguage
();
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
"
请输入仓库名称
"
,
function
()
{
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
});
}
});
table
.
on
(
'
tool(messageTable)
'
,
function
(
obj
)
{
var
data
=
obj
.
data
;
var
layEvent
=
obj
.
event
;
if
(
layEvent
===
'
edit
'
)
{
//编辑
if
(
layEvent
===
'
edit
'
)
{
//
编辑
edit
(
data
);
}
else
if
(
layEvent
===
'
delete
'
)
{
//
删除
}
else
if
(
layEvent
===
'
delete
'
)
{
//
删除
deleteHouse
(
data
);
}
else
if
(
layEvent
===
'
default
'
)
{
//设置默认
defaultHouse
(
data
);
}
else
if
(
layEvent
===
'
select
'
)
{
}
else
if
(
layEvent
===
'
select
'
)
{
selectHouse
(
data
);
}
});
// 编辑
function
edit
(
data
){
function
edit
(
data
)
{
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/storehouse/storehouseedit.html
"
,
...
...
@@ -79,33 +80,20 @@ layui.config({
}
// 删除仓库
function
deleteHouse
(
data
){
function
deleteHouse
(
data
)
{
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.deleteOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.deleteOperation
"
][
languageType
]},
function
(
index
)
{
layer
.
close
(
index
);
var
params
=
{
rowI
d
:
data
.
id
i
d
:
data
.
id
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse004
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse004
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
DELETE
"
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.deleteOperationSuccessMsg
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
}
// 设置是否默认
function
defaultHouse
(
data
){
layer
.
confirm
(
'
确认要设置该仓库为默认状态吗?
'
,
{
icon
:
3
,
title
:
'
设置仓库状态
'
},
function
(
index
)
{
var
params
=
{
rowId
:
data
.
id
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
storehouse006
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
"
设置成功。
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
}
function
selectHouse
(
data
){
function
selectHouse
(
data
)
{
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/storehouse/storehouseinfo.html
"
,
...
...
@@ -132,26 +120,17 @@ layui.config({
});
form
.
render
();
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()})
}
return
false
;
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
});
// 刷新
function
loadTable
(){
table
.
reloadData
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
function
getTableParams
(){
return
{
houseName
:
$
(
"
#houseName
"
).
val
()
};
return
$
.
extend
(
true
,
{},
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
}
exports
(
'
storehouselist
'
,
{});
...
...
erp/src/main/resources/template/tpl/salesoutlet/salesoutletadd.html
浏览文件 @
5c56b5cc
...
...
@@ -15,7 +15,7 @@
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
客户
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"customName"
name=
"customName"
placeholder=
"请选择客户"
class=
"layui-input"
readonly=
"readonly"
/>
<input
type=
"text"
id=
"customName"
name=
"customName"
win-verify=
"required"
placeholder=
"请选择客户"
class=
"layui-input"
readonly=
"readonly"
/>
<i
class=
"fa fa-plus-circle input-icon"
id=
"customMationSel"
></i>
</div>
</div>
...
...
erp/src/main/resources/template/tpl/salesoutlet/salesoutletedit.html
浏览文件 @
5c56b5cc
...
...
@@ -15,7 +15,7 @@
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
客户
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"customName"
name=
"customName"
placeholder=
"请选择客户"
class=
"layui-input"
readonly=
"readonly"
/>
<input
type=
"text"
id=
"customName"
name=
"customName"
win-verify=
"required"
placeholder=
"请选择客户"
class=
"layui-input"
readonly=
"readonly"
/>
<i
class=
"fa fa-plus-circle input-icon"
id=
"customMationSel"
></i>
</div>
</div>
...
...
erp/src/main/resources/template/tpl/storehouse/storehouseedit.html
浏览文件 @
5c56b5cc
...
...
@@ -18,7 +18,7 @@
<
div
class
=
"
layui-form-item layui-col-xs6
"
>
<
label
class
=
"
layui-form-label
"
>
仓库名称
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
input
type
=
"
text
"
id
=
"
houseName
"
name
=
"
houseName
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入仓库名称
"
class
=
"
layui-input
"
maxlength
=
"
25
"
value
=
"
{{
houseN
ame}}
"
/>
<
input
type
=
"
text
"
id
=
"
houseName
"
name
=
"
houseName
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入仓库名称
"
class
=
"
layui-input
"
maxlength
=
"
25
"
value
=
"
{{
n
ame}}
"
/>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
...
...
erp/src/main/resources/template/tpl/storehouse/storehouseinfo.html
浏览文件 @
5c56b5cc
...
...
@@ -16,7 +16,7 @@
<
div
class
=
"
layui-form-item layui-col-xs6
"
>
<
label
class
=
"
layui-form-label
"
>
仓库名称
:
<
/label
>
<
div
class
=
"
layui-input-block ver-center
"
>
{{
houseN
ame
}}
{{
n
ame
}}
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs6
"
>
...
...
erp/src/main/resources/template/tpl/storehouse/storehouselist.html
浏览文件 @
5c56b5cc
...
...
@@ -7,39 +7,22 @@
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
class=
"txtcenter"
style=
"margin:0 auto;padding-top:10px;"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
仓库名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"houseName"
name=
"houseName"
placeholder=
"请输入仓库名称"
class=
"layui-input"
/>
</div>
<button
type=
"reset"
class=
"layui-btn layui-btn-primary list-form-search"
><language
showName=
"com.skyeye.reset"
></language></button>
<button
class=
"layui-btn list-form-search"
lay-submit
lay-filter=
"formSearch"
><language
showName=
"com.skyeye.search2"
></language></button>
</div>
</div>
</form>
</div>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn"
auth=
"1568523956068"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
<button
id=
"reloadTable"
class=
"winui-toolbtn
search-table-btn-right
"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn
search-table-btn-right
"
auth=
"1568523956068"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
auth
(
'
156852
4015623
'
)){
}}
{{
#
if
(
auth
(
'
156852
3956068
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1568523987812
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-danger layui-btn-xs
"
lay
-
event
=
"
delete
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
d
.
isDefault
==
2
&&
auth
(
'
1568526024398
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
default
"
>
设置默认
<
/a
>
{{
#
}
}}
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
...
...
userauth/src/main/resources/template/js/syseveuserstaff/syseveuserstafflist.js
浏览文件 @
5c56b5cc
...
...
@@ -112,7 +112,7 @@ layui.config({
{
field
:
'
jobName
'
,
title
:
'
职位
'
,
align
:
'
left
'
,
width
:
120
}
]
],
done
:
function
(
json
){
done
:
function
(
json
)
{
soulTable
.
render
(
this
);
matchingLanguage
();
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
"
请输入员工姓名、员工工号
"
,
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录