Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pmk-channel-vue
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
黄麒宇
pmk-channel-vue
Commits
8d428e7a
Commit
8d428e7a
authored
Dec 23, 2022
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
cf5dedb3
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
155 行增加
和
13 行删除
+155
-13
InTask.vue
src/views/InTask.vue
+74
-5
OutTask.vue
src/views/OutTask.vue
+73
-4
Query.vue
src/views/Query.vue
+1
-1
Setting.vue
src/views/Setting.vue
+7
-3
没有找到文件。
src/views/InTask.vue
View file @
8d428e7a
...
...
@@ -25,7 +25,7 @@
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-button
type=
"success"
size=
"small"
@
click=
"activateBill(scope.row)"
>
激活
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"reportBill(scope.row)"
>
上报
</el-button>
<el-button
type=
"primary"
size=
"small"
:disabled=
"scope.row.activeState !== 2"
@
click=
"reportBill(scope.row)"
>
上报
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -71,7 +71,18 @@
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
/>
<el-table-column
prop=
"planAmount"
label=
"计划数量"
align=
"center"
/>
<el-table-column
prop=
"realAmount"
label=
"实际数量"
align=
"center"
/>
<el-table-column
prop=
"writeAmount"
label=
"手动修改数量"
align=
"center"
/>
<el-table-column
prop=
"writeAmount"
label=
"手动修改数量"
align=
"center"
>
<
template
#
default=
"scope"
>
<div
class=
"editable-cell"
>
<div
v-if=
"editable"
class=
"editable-cell-input-wrapper"
>
<el-input-number
ref=
'inputs'
size=
"small"
style=
"height: 30px"
:value=
"writeAmount"
@
change=
"handleChange"
@
blur=
"check"
:max=
"scope.row.planAmount - scope.row.realAmount"
/>
</div>
<div
v-else
class=
"editable-cell-text-wrapper"
@
dblclick=
"edit(scope.row)"
>
<span>
{{
scope
.
row
.
writeAmount
}}
</span>
</div>
</div>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"left: 36%;margin-top: 6px;"
...
...
@@ -91,7 +102,7 @@
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
getCurrentInstance
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
postAction
}
from
'@/api/manage'
import
{
postAction
,
getAction
}
from
'@/api/manage'
export
default
defineComponent
({
setup
()
{
const
billList
=
ref
([])
...
...
@@ -99,6 +110,9 @@ export default defineComponent({
const
modelList
=
ref
([])
const
selectBill
=
ref
({})
const
selectGoods
=
ref
({})
const
editable
=
ref
(
false
)
const
writeAmount
=
ref
()
const
itemForm
=
ref
({})
const
{
proxy
}
=
getCurrentInstance
()
const
searchData
=
ref
({
pageNo
:
1
,
...
...
@@ -119,7 +133,9 @@ export default defineComponent({
url
:
{
getBillPage
:
'/bill/getBillPage'
,
getGoodsPage
:
'/bill/getGoodsPage'
,
getModelPage
:
'/bill/getModelPage'
getModelPage
:
'/bill/getModelPage'
,
updateItem
:
'/bill/updateItem'
,
reportBill
:
'/platform/reportInBill'
},
storeInfo
:
{},
storeCode
:
''
...
...
@@ -193,6 +209,40 @@ export default defineComponent({
loadModel
()
}
function
edit
(
row
)
{
proxy
.
editable
=
true
;
itemForm
.
value
=
row
proxy
.
$nextTick
((
x
)
=>
{
if
(
proxy
.
$refs
.
inputs
)
{
proxy
.
$refs
.
inputs
.
focus
();
}
})
}
function
handleChange
(
e
)
{
writeAmount
.
value
=
e
itemForm
.
value
.
writeAmount
=
e
}
function
check
()
{
proxy
.
editable
=
false
;
itemForm
.
value
.
bizBillNo
=
selectBill
.
value
.
bizBillNo
itemForm
.
value
.
storeCode
=
searchData
.
value
.
storeCode
postAction
(
state
.
url
.
updateItem
,
itemForm
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
()
})
}
function
reportBill
(
row
)
{
getAction
(
state
.
url
.
reportBill
,
{
storeCode
:
searchData
.
value
.
storeCode
,
billNo
:
row
.
billNo
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
()
})
}
loadData
()
return
{
...
toRefs
(
state
),
...
...
@@ -207,12 +257,30 @@ export default defineComponent({
total
,
total1
,
total2
,
editable
,
writeAmount
,
itemForm
,
handleCurrentChange
,
handleCurrentChange1
,
handleCurrentChange2
,
billClick
,
goodsClick
goodsClick
,
handleChange
,
edit
,
check
,
reportBill
}
},
})
</
script
>
<
style
scoped
>
.editable-cell
{
position
:
relative
;
}
.editable-cell-text-wrapper
{
padding
:
4px
5px
5px
5px
;
cursor
:
pointer
;
}
</
style
>
\ No newline at end of file
src/views/OutTask.vue
View file @
8d428e7a
...
...
@@ -25,7 +25,7 @@
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-button
type=
"success"
size=
"small"
@
click=
"activateBill(scope.row)"
>
激活
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"reportBill(scope.row)"
>
上报
</el-button>
<el-button
type=
"primary"
size=
"small"
:disabled=
"scope.row.activeState !== 2"
@
click=
"reportBill(scope.row)"
>
上报
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -71,7 +71,18 @@
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
/>
<el-table-column
prop=
"planAmount"
label=
"计划数量"
align=
"center"
/>
<el-table-column
prop=
"realAmount"
label=
"实际数量"
align=
"center"
/>
<el-table-column
prop=
"writeAmount"
label=
"手动修改数量"
align=
"center"
/>
<el-table-column
prop=
"writeAmount"
label=
"手动修改数量"
align=
"center"
>
<
template
#
default=
"scope"
>
<div
class=
"editable-cell"
>
<div
v-if=
"editable"
class=
"editable-cell-input-wrapper"
>
<el-input-number
ref=
'inputs'
size=
"small"
style=
"height: 30px"
:value=
"writeAmount"
@
change=
"handleChange"
@
blur=
"check"
:max=
"scope.row.planAmount - scope.row.realAmount"
/>
</div>
<div
v-else
class=
"editable-cell-text-wrapper"
@
dblclick=
"edit(scope.row)"
>
<span>
{{
scope
.
row
.
writeAmount
}}
</span>
</div>
</div>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"left: 36%;margin-top: 6px;"
...
...
@@ -99,6 +110,9 @@ export default defineComponent({
const
modelList
=
ref
([])
const
selectBill
=
ref
({})
const
selectGoods
=
ref
({})
const
editable
=
ref
(
false
)
const
writeAmount
=
ref
()
const
itemForm
=
ref
({})
const
{
proxy
}
=
getCurrentInstance
()
const
searchData
=
ref
({
pageNo
:
1
,
...
...
@@ -119,7 +133,9 @@ export default defineComponent({
url
:
{
getBillPage
:
'/bill/getBillPage'
,
getGoodsPage
:
'/bill/getGoodsPage'
,
getModelPage
:
'/bill/getModelPage'
getModelPage
:
'/bill/getModelPage'
,
updateItem
:
'/bill/updateItem'
,
reportBill
:
'/platform/reportOutBill'
},
storeInfo
:
{},
storeCode
:
''
...
...
@@ -193,6 +209,40 @@ export default defineComponent({
loadModel
()
}
function
edit
(
row
)
{
proxy
.
editable
=
true
;
itemForm
.
value
=
row
proxy
.
$nextTick
((
x
)
=>
{
if
(
proxy
.
$refs
.
inputs
)
{
proxy
.
$refs
.
inputs
.
focus
();
}
})
}
function
handleChange
(
e
)
{
writeAmount
.
value
=
e
itemForm
.
value
.
writeAmount
=
e
}
function
check
()
{
proxy
.
editable
=
false
;
itemForm
.
value
.
bizBillNo
=
selectBill
.
value
.
bizBillNo
itemForm
.
value
.
storeCode
=
searchData
.
value
.
storeCode
postAction
(
state
.
url
.
updateItem
,
itemForm
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
()
})
}
function
reportBill
(
row
)
{
getAction
(
state
.
url
.
reportBill
,
{
storeCode
:
searchData
.
value
.
storeCode
,
billNo
:
row
.
billNo
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
()
})
}
loadData
()
return
{
...
toRefs
(
state
),
...
...
@@ -207,12 +257,30 @@ export default defineComponent({
total
,
total1
,
total2
,
editable
,
writeAmount
,
itemForm
,
handleCurrentChange
,
handleCurrentChange1
,
handleCurrentChange2
,
billClick
,
goodsClick
goodsClick
,
handleChange
,
edit
,
check
,
reportBill
}
},
})
</
script
>
<
style
scoped
>
.editable-cell
{
position
:
relative
;
}
.editable-cell-text-wrapper
{
padding
:
4px
5px
5px
5px
;
cursor
:
pointer
;
}
</
style
>
\ No newline at end of file
src/views/Query.vue
View file @
8d428e7a
...
...
@@ -68,6 +68,7 @@ export default defineComponent({
const
searchData
=
ref
({
pageNo
:
1
,
pageSize
:
10
,
state
:
'IN'
,
startTime
:
parseTime
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))),
endTime
:
parseTime
(
new
Date
())
})
...
...
@@ -112,7 +113,6 @@ export default defineComponent({
const
loadData
=
()
=>
{
if
(
sessionStorage
.
getItem
(
'storeInfo'
))
{
let
config
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
))
searchData
.
value
.
state
=
'IN'
searchData
.
value
.
storeCode
=
config
.
storeCode
postAction
(
'http://'
+
config
.
serverIp
+
':'
+
config
.
serverPort
+
state
.
url
.
getGoodsRecord
,
searchData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
...
...
src/views/Setting.vue
View file @
8d428e7a
...
...
@@ -91,17 +91,21 @@ export default defineComponent({
}
const
loadData
=
()
=>
{
const
loadData
=
(
e
)
=>
{
if
(
sessionStorage
.
getItem
(
'storeInfo'
))
{
searchData
.
value
.
storeCode
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
postAction
(
state
.
url
.
getBindPage
,
searchData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
bindList
.
value
=
res
.
data
.
records
total
.
value
=
res
.
data
.
totalRows
-
0
if
(
e
)
{
}
else
{
if
(
res
.
data
.
records
.
length
>
0
)
{
formData
.
value
.
stationId
=
res
.
data
.
records
[
0
].
stationId
formData
.
value
.
id
=
res
.
data
.
records
[
0
].
id
}
}
})
}
}
...
...
@@ -155,7 +159,7 @@ export default defineComponent({
postAction
(
state
.
url
.
updateBind
,
formData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
()
loadData
(
1
)
})
}
...
...
@@ -173,7 +177,7 @@ export default defineComponent({
postAction
(
state
.
url
.
updateBind
,
formData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
()
loadData
(
1
)
})
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论