Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
9039cd81
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1435
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
9039cd81
编写于
10月 30, 2022
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ERP商品计量单位功能调整
上级
0d8f4833
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
109 addition
and
246 deletion
+109
-246
erp/src/main/resources/template/js/materialUnit/materialUnitAdd.js
...ain/resources/template/js/materialUnit/materialUnitAdd.js
+25
-62
erp/src/main/resources/template/js/materialUnit/materialUnitEdit.js
...in/resources/template/js/materialUnit/materialUnitEdit.js
+38
-90
erp/src/main/resources/template/js/materialUnit/materialUnitList.js
...in/resources/template/js/materialUnit/materialUnitList.js
+7
-3
erp/src/main/resources/template/js/purchaseOrder/purchaseOrderAdd.js
...n/resources/template/js/purchaseOrder/purchaseOrderAdd.js
+0
-1
erp/src/main/resources/template/js/purchaseOrder/purchaseOrderEdit.js
.../resources/template/js/purchaseOrder/purchaseOrderEdit.js
+0
-2
erp/src/main/resources/template/tpl/materialUnit/materialUnitAdd.html
.../resources/template/tpl/materialUnit/materialUnitAdd.html
+6
-22
erp/src/main/resources/template/tpl/materialUnit/materialUnitEdit.html
...resources/template/tpl/materialUnit/materialUnitEdit.html
+30
-16
erp/src/main/resources/template/tpl/materialUnit/materialUnitEditTemplate.tpl
...es/template/tpl/materialUnit/materialUnitEditTemplate.tpl
+0
-47
erp/src/main/resources/template/tpl/materialUnit/materialUnitList.html
...resources/template/tpl/materialUnit/materialUnitList.html
+1
-1
web/src/main/resources/template/assets/lib/layui/lay/modules/skuTable/skuTable.js
...emplate/assets/lib/layui/lay/modules/skuTable/skuTable.js
+2
-2
未找到文件。
erp/src/main/resources/template/js/materialUnit/materialUnitAdd.js
浏览文件 @
9039cd81
...
...
@@ -10,35 +10,39 @@ layui.config({
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
;
//副单位数量计数器
var
unitIndex
=
1
;
//副单位模板
var
beanTemplate
=
$
(
"
#beanTemplate
"
).
html
();
//初始化副单位
addRow
();
initTableChooseUtil
.
initTable
({
id
:
"
unitList
"
,
cols
:
[
{
id
:
'
name
'
,
title
:
'
单位名称
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input
'
,
verify
:
'
required
'
},
{
id
:
'
number
'
,
title
:
'
数量
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input
'
,
verify
:
'
required|number
'
}
],
deleteRowCallback
:
function
(
trcusid
)
{},
addRowCallback
:
function
(
trcusid
)
{},
form
:
form
});
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
//获取填写副单位
var
rowTr
=
$
(
"
#useTable tr
"
);
var
tableData
=
new
Array
();
var
noError
=
false
;
//循环遍历表格数据时,是否有其他错误信息
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
var
row
=
{
unitName
:
$
(
"
#unitName
"
+
rowNum
).
val
(),
unitNum
:
$
(
"
#unitNum
"
+
rowNum
).
val
()
};
tableData
.
push
(
row
);
var
result
=
initTableChooseUtil
.
getDataList
(
'
unitList
'
);
if
(
!
result
.
checkResult
)
{
return
false
;
}
var
dataList
=
result
.
dataList
;
$
.
each
(
result
.
dataList
,
function
(
i
,
item
)
{
item
[
"
baseUnit
"
]
=
2
;
});
dataList
.
push
({
name
:
$
(
"
#unitName
"
).
val
(),
number
:
1
,
baseUnit
:
1
});
var
params
=
{
groupName
:
$
(
"
#groupName
"
).
val
(),
unitName
:
$
(
"
#unitName
"
).
val
(),
unitNameStr
:
JSON
.
stringify
(
tableData
)
name
:
$
(
"
#name
"
).
val
(),
unitList
:
JSON
.
stringify
(
dataList
)
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit002
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
writeMaterialUnitMation
"
,
params
:
params
,
type
:
'
json
'
,
method
:
'
POST
'
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
...
...
@@ -46,47 +50,6 @@ layui.config({
return
false
;
});
//基本单位变化事件
$
(
"
body
"
).
on
(
"
keyup
"
,
"
#unitName
"
,
function
()
{
$
(
"
.baseNameShow
"
).
html
(
$
(
this
).
val
());
});
//新增行
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
//删除行
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
});
//添加副单位模板
function
addRow
(){
var
j
=
{
trId
:
"
tr
"
+
unitIndex
.
toString
(),
//行的id
id
:
"
row
"
+
unitIndex
.
toString
(),
//checkbox的id
unitName
:
"
unitName
"
+
unitIndex
.
toString
(),
//单位名称
unitNum
:
"
unitNum
"
+
unitIndex
.
toString
(),
//数量
baseName
:
$
(
"
#unitName
"
).
val
()
//基础单位名称
};
$
(
"
#useTable
"
).
append
(
getDataUseHandlebars
(
beanTemplate
,
j
));
form
.
render
(
'
checkbox
'
);
unitIndex
++
;
}
//删除行
function
deleteRow
()
{
var
checkRow
=
$
(
"
#useTable 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
});
}
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
...
...
erp/src/main/resources/template/js/materialUnit/materialUnitEdit.js
浏览文件 @
9039cd81
...
...
@@ -10,52 +10,58 @@ layui.config({
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
;
//副单位数量计数器
var
unitIndex
=
1
;
//副单位模板
var
beanTemplate
=
$
(
"
#beanTemplate
"
).
html
();
var
beanDataTemplate
=
$
(
"
#beanDataTemplate
"
).
html
();
showGrid
({
id
:
"
showForm
"
,
url
:
flowableBasePath
+
"
materialunit004
"
,
params
:
{
rowI
d
:
parent
.
rowId
},
params
:
{
i
d
:
parent
.
rowId
},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/materialUnit/materialUnitEditTemplate.tpl
'
),
method
:
'
GET
'
,
template
:
$
(
"
#beanTemplate
"
).
html
(),
ajaxSendAfter
:
function
(
json
)
{
$
.
each
(
json
.
bean
.
unitList
,
function
(
i
,
item
)
{
if
(
item
.
baseUnit
.
toString
()
===
"
1
"
){
//基础数据
$
(
"
#unitName
"
).
val
(
item
.
unitNameValue
);
}
else
{
addDataRow
(
item
);
}
});
initTableChooseUtil
.
initTable
({
id
:
"
unitList
"
,
cols
:
[
{
id
:
'
name
'
,
title
:
'
单位名称
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input
'
,
verify
:
'
required
'
},
{
id
:
'
number
'
,
title
:
'
数量
'
,
formType
:
'
input
'
,
width
:
'
80
'
,
className
:
'
change-input
'
,
verify
:
'
required|number
'
}
],
deleteRowCallback
:
function
(
trcusid
)
{},
addRowCallback
:
function
(
trcusid
)
{},
form
:
form
});
initTableChooseUtil
.
deleteAllRow
(
'
unitList
'
);
$
.
each
(
json
.
bean
.
unitList
,
function
(
i
,
item
)
{
if
(
item
.
baseUnit
==
1
)
{
$
(
"
#unitName
"
).
val
(
item
.
name
);
}
if
(
item
.
baseUnit
==
2
)
{
initTableChooseUtil
.
resetData
(
'
unitList
'
,
item
);
}
});
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
//获取填写副单位
var
rowTr
=
$
(
"
#useTable tr
"
);
var
tableData
=
new
Array
()
;
var
noError
=
false
;
//循环遍历表格数据时,是否有其他错误信息
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
var
row
=
{
unitName
:
$
(
"
#unitName
"
+
rowNum
).
val
(),
unitNum
:
$
(
"
#unitNum
"
+
rowNum
).
val
(),
unitId
:
$
(
"
#unitName
"
+
rowNum
).
parent
().
parent
().
attr
(
"
id
"
)
};
tableData
.
push
(
row
);
var
result
=
initTableChooseUtil
.
getDataList
(
'
unitList
'
);
if
(
!
result
.
checkResult
)
{
return
false
;
}
var
dataList
=
result
.
dataList
;
$
.
each
(
result
.
dataList
,
function
(
i
,
item
)
{
item
[
"
baseUnit
"
]
=
2
;
});
dataList
.
push
({
name
:
$
(
"
#unitName
"
).
val
(),
number
:
1
,
baseUnit
:
1
});
var
params
=
{
groupName
:
$
(
"
#groupName
"
).
val
(),
unitName
:
$
(
"
#unitName
"
).
val
(),
unitNameStr
:
JSON
.
stringify
(
tableData
),
rowId
:
parent
.
rowId
name
:
$
(
"
#name
"
).
val
(),
unitList
:
JSON
.
stringify
(
dataList
),
id
:
parent
.
rowId
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit005
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
writeMaterialUnitMation
"
,
params
:
params
,
type
:
'
json
'
,
method
:
'
POST
'
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
...
...
@@ -65,64 +71,6 @@ layui.config({
}
});
//基本单位变化事件
$
(
"
body
"
).
on
(
"
keyup
"
,
"
#unitName
"
,
function
()
{
$
(
"
.baseNameShow
"
).
html
(
$
(
this
).
val
());
});
//新增行
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRow
"
,
function
()
{
addRow
();
});
//删除行
$
(
"
body
"
).
on
(
"
click
"
,
"
#deleteRow
"
,
function
()
{
deleteRow
();
});
//添加副单位模板
function
addRow
(){
var
j
=
{
trId
:
"
tr
"
+
unitIndex
.
toString
(),
//行的id
id
:
"
row
"
+
unitIndex
.
toString
(),
//checkbox的id
unitName
:
"
unitName
"
+
unitIndex
.
toString
(),
//单位名称
unitNum
:
"
unitNum
"
+
unitIndex
.
toString
(),
//数量
baseName
:
$
(
"
#unitName
"
).
val
()
//基础单位名称
};
$
(
"
#useTable
"
).
append
(
getDataUseHandlebars
(
beanTemplate
,
j
));
form
.
render
(
'
checkbox
'
);
unitIndex
++
;
}
//添加副单位数据回显
function
addDataRow
(
item
)
{
var
j
=
{
trId
:
"
tr
"
+
unitIndex
.
toString
(),
//行的id
id
:
"
row
"
+
unitIndex
.
toString
(),
//checkbox的id
unitName
:
"
unitName
"
+
unitIndex
.
toString
(),
//单位名称
unitNum
:
"
unitNum
"
+
unitIndex
.
toString
(),
//数量
baseName
:
$
(
"
#unitName
"
).
val
(),
//基础单位名称
unitIdValue
:
item
.
unitIdValue
,
//数据
unitNameValue
:
item
.
unitNameValue
,
//数据
unitNumValue
:
item
.
unitNumValue
//数据
};
$
(
"
#useTable
"
).
append
(
getDataUseHandlebars
(
beanDataTemplate
,
j
));
form
.
render
(
'
checkbox
'
);
unitIndex
++
;
}
//删除行
function
deleteRow
()
{
var
checkRow
=
$
(
"
#useTable 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
});
}
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
...
...
erp/src/main/resources/template/js/materialUnit/materialUnitList.js
浏览文件 @
9039cd81
...
...
@@ -26,9 +26,13 @@ layui.config({
limit
:
getLimit
(),
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
groupN
ame
'
,
title
:
'
组名
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
n
ame
'
,
title
:
'
组名
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
unitName
'
,
title
:
'
计量单位
'
,
align
:
'
left
'
,
width
:
300
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
257
,
toolbar
:
'
#tableBar
'
}
{
field
:
'
createName
'
,
title
:
systemLanguage
[
"
com.skyeye.createName
"
][
languageType
],
width
:
120
},
{
field
:
'
createTime
'
,
title
:
systemLanguage
[
"
com.skyeye.createTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
field
:
'
lastUpdateName
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateName
"
][
languageType
],
align
:
'
left
'
,
width
:
120
},
{
field
:
'
lastUpdateTime
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
150
,
toolbar
:
'
#tableBar
'
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
...
...
@@ -65,7 +69,7 @@ layui.config({
function
delet
(
data
)
{
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.deleteOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.deleteOperation
"
][
languageType
]},
function
(
index
)
{
layer
.
close
(
index
);
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit003
"
,
params
:
{
rowId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit003
"
,
params
:
{
id
:
data
.
id
},
type
:
'
json
'
,
method
:
'
DELETE
'
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.deleteOperationSuccessMsg
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
...
...
erp/src/main/resources/template/js/purchaseOrder/purchaseOrderAdd.js
浏览文件 @
9039cd81
...
...
@@ -41,7 +41,6 @@ layui.config({
// 初始化账户
systemCommonUtil
.
getSysAccountListByType
(
function
(
json
)
{
// 加载账户数据
$
(
"
#accountId
"
).
html
(
getDataUseHandlebars
(
selOption
,
json
));
});
...
...
erp/src/main/resources/template/js/purchaseOrder/purchaseOrderEdit.js
浏览文件 @
9039cd81
...
...
@@ -39,9 +39,7 @@ layui.config({
// 初始化账户
systemCommonUtil
.
getSysAccountListByType
(
function
(
json
)
{
// 加载账户数据
$
(
"
#accountId
"
).
html
(
getDataUseHandlebars
(
selOption
,
json
));
// 渲染数据
initDataToShow
();
});
...
...
erp/src/main/resources/template/tpl/materialUnit/materialUnitAdd.html
浏览文件 @
9039cd81
...
...
@@ -12,7 +12,7 @@
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
组名
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"
groupName"
name=
"groupN
ame"
win-verify=
"required"
placeholder=
"请输入组名"
class=
"layui-input"
/>
<input
type=
"text"
id=
"
name"
name=
"n
ame"
win-verify=
"required"
placeholder=
"请输入组名"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
...
...
@@ -24,27 +24,11 @@
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
副单位
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
style=
"text-align: left;"
>
<button
id=
"addRow"
class=
"winui-toolbtn"
type=
"button"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
新增行
</button>
<button
id=
"deleteRow"
class=
"winui-toolbtn"
type=
"button"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
删除行
</button>
</div>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
副单位与基础单位的转换例如:一箱=12瓶;如果没有副单位,可将下面表格行全部删掉即可。
</div>
<table
class=
"layui-table"
>
<thead>
<tr>
<th></th>
<th>
单位名称
</th>
<th>
数量
</th>
<th>
基础单位
</th>
</tr>
</thead>
<tbody
id=
"useTable"
class=
"insurance-table"
>
</tbody>
</table>
</div>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
>
与基础单位之间的转换,例如:一箱=12瓶。
</div>
<div
class=
"layui-col-xs12"
id=
"unitList"
>
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<div
class=
"layui-input-block"
>
...
...
erp/src/main/resources/template/tpl/materialUnit/materialUnitEdit.html
浏览文件 @
9039cd81
...
...
@@ -12,23 +12,37 @@
</form>
</div>
<script
type=
"text/x-handlebars-template"
id=
"beanTemplate"
>
<
tr
trcusid
=
"
{{trId}}
"
>
<
td
><
input
type
=
"
checkbox
"
rowId
=
"
{{id}}
"
lay
-
filter
=
"
checkboxProperty
"
name
=
"
tableCheckRow
"
/><
/td
>
<
td
><
input
type
=
"
text
"
class
=
"
layui-input
"
id
=
"
{{unitName}}
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入副单位
"
/><
/td
>
<
td
><
input
type
=
"
text
"
class
=
"
layui-input
"
id
=
"
{{unitNum}}
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入数量
"
/><
/td
>
<
td
><
span
class
=
"
baseNameShow
"
>
{{
baseName
}}
<
/span></
td
>
<
/tr
>
</script>
<script
type=
"text/x-handlebars-template"
id=
"beanDataTemplate"
>
<
tr
trcusid
=
"
{{trId}}
"
id
=
"
{{unitIdValue}}
"
>
<
td
><
input
type
=
"
checkbox
"
rowId
=
"
{{id}}
"
lay
-
filter
=
"
checkboxProperty
"
name
=
"
tableCheckRow
"
/><
/td
>
<
td
><
input
type
=
"
text
"
class
=
"
layui-input
"
id
=
"
{{unitName}}
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入副单位
"
value
=
"
{{unitNameValue}}
"
/><
/td
>
<
td
><
input
type
=
"
text
"
class
=
"
layui-input
"
id
=
"
{{unitNum}}
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入数量
"
value
=
"
{{unitNumValue}}
"
/><
/td
>
<
td
><
span
class
=
"
baseNameShow
"
>
{{
baseName
}}
<
/span></
td
>
<
/tr
>
{{
#
bean
}}
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
组名
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
input
type
=
"
text
"
id
=
"
name
"
name
=
"
name
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入组名
"
class
=
"
layui-input
"
value
=
"
{{name}}
"
/>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
基本单位
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
input
type
=
"
text
"
id
=
"
unitName
"
name
=
"
unitName
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入基本单位
"
class
=
"
layui-input
"
/>
<
div
class
=
"
layui-form-mid layui-word-aux
"
>
基本单位应为最小度量单位
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
副单位
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
div
class
=
"
layui-form-mid layui-word-aux
"
>
与基础单位之间的转换
,
例如
:
一箱
=
12
瓶
。
<
/div
>
<
div
class
=
"
layui-col-xs12
"
id
=
"
unitList
"
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
div
class
=
"
layui-input-block
"
>
<
button
class
=
"
winui-btn
"
id
=
"
cancle
"
><
language
showName
=
"
com.skyeye.cancel
"
><
/language></
button
>
<
button
class
=
"
winui-btn
"
lay
-
submit
lay
-
filter
=
"
formEditBean
"
><
language
showName
=
"
com.skyeye.save
"
><
/language></
button
>
<
/div
>
<
/div
>
{{
/
bean
}}
</script>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
...
...
erp/src/main/resources/template/tpl/materialUnit/materialUnitEditTemplate.tpl
已删除
100644 → 0
浏览文件 @
0d8f4833
{{
#
bean
}}
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
组名
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"groupName"
name=
"groupName"
win-verify=
"required"
placeholder=
"请输入组名"
class=
"layui-input"
value=
"{
{
groupName
}
}"
/>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
基本单位
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"unitName"
name=
"unitName"
win-verify=
"required"
placeholder=
"请输入基本单位"
class=
"layui-input"
/>
<div
class=
"layui-form-mid layui-word-aux"
>
基本单位应为最小度量单位
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
副单位
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
style=
"text-align: left;"
>
<button
id=
"addRow"
class=
"winui-toolbtn"
type=
"button"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
新增行
</button>
<button
id=
"deleteRow"
class=
"winui-toolbtn"
type=
"button"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
删除行
</button>
</div>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
副单位与基础单位的转换例如:一箱=12瓶;如果没有副单位,可将下面表格行全部删掉即可。
</div>
<table
class=
"layui-table"
>
<thead>
<tr>
<th></th>
<th>
单位名称
</th>
<th>
数量
</th>
<th>
基础单位
</th>
</tr>
</thead>
<tbody
id=
"useTable"
class=
"insurance-table"
>
</tbody>
</table>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
><language
showName=
"com.skyeye.cancel"
></language></button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formEditBean"
><language
showName=
"com.skyeye.save"
></language></button>
</div>
</div>
</form>
{
{/
bean
}
}
\ No newline at end of file
erp/src/main/resources/template/tpl/materialUnit/materialUnitList.html
浏览文件 @
9039cd81
...
...
@@ -16,7 +16,7 @@
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
auth
(
'
15691603
6988
9
'
)){
}}
{{
#
if
(
auth
(
'
15691603
5107
9
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-normal
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1569160358971
'
)){
}}
...
...
web/src/main/resources/template/assets/lib/layui/lay/modules/skuTable/skuTable.js
浏览文件 @
9039cd81
...
...
@@ -534,7 +534,7 @@ layui.define(['jquery', 'form', 'upload', 'layer', 'sortable'], function (export
</div>`
;
$
(
`#
${
this
.
options
.
otherMationElemId
}
`
).
html
(
str
);
var
that
=
this
;
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit006
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
POS
T
"
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit006
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
GE
T
"
,
callback
:
function
(
json
)
{
$
(
`#unitGroupId`
).
html
(
getDataUseHandlebars
(
that
.
selTemplate
,
json
));
that
.
unitGroupList
=
json
.
rows
;
},
async
:
false
});
...
...
@@ -876,7 +876,7 @@ layui.define(['jquery', 'form', 'upload', 'layer', 'sortable'], function (export
var
prependThead
=
[],
prependTbody
=
[];
// 加载计量单位作为其中的一个规格
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit006
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
POS
T
"
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
materialunit006
"
,
params
:
{},
type
:
'
json
'
,
method
:
"
GE
T
"
,
callback
:
function
(
json
)
{
var
prependTbodyItem
=
[];
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
id
==
that
.
data
.
otherMationData
.
unitGroupId
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录