Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jwhx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
jwhx
Commits
030cd585
Commit
030cd585
authored
Jan 15, 2025
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~~
parent
c73eeda5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
resources/admin/src/pages/cashierhome/cashierhome.vue
resources/admin/src/pages/cashierhome/cashierhome.vue
+29
-4
resources/admin/src/pages/goods/lists/save.vue
resources/admin/src/pages/goods/lists/save.vue
+3
-0
No files found.
resources/admin/src/pages/cashierhome/cashierhome.vue
View file @
030cd585
...
...
@@ -74,6 +74,10 @@
<small>
数量:
</small>
{{
totalCount
}}
<small>
金额:
</small>
¥
{{
totalMoney
}}
<small>
所需积分:
</small>
{{
totaljifen
}}
</div>
<div
class=
"total"
>
<small>
需付:
</small>
¥
{{
Userprice
}}
</div>
<div
class=
"pos_btn"
>
...
...
@@ -96,6 +100,8 @@
</el-select>
<el-button-group
style=
"margin-left: 10px;"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"upsearch"
>
搜索
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-plus"
@
click=
"add"
>
添加产品
</el-button>
</el-button-group>
</div>
</el-header>
...
...
@@ -111,8 +117,9 @@
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
width=
"140"
>
<
template
#default
="
scope
"
>
<el-button-group>
<el-button
type=
"primary"
@
click=
"addOrderList(scope.row, scope.$index)"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"addOrderList(scope.row, scope.$index)"
>
加购
</el-button>
<el-button
type=
"primary"
@
click=
"table_edit(scope.row, scope.$index)"
>
编辑
</el-button>
</el-button-group>
</
template
>
</el-table-column>
...
...
@@ -177,6 +184,7 @@
</el-dialog>
<save
v-if=
"dialog.save"
ref=
"saveBox"
@
success=
"upsearch"
@
closed=
"dialog.save=false"
/>
</el-main>
</el-container>
</template>
...
...
@@ -185,10 +193,13 @@
import
{
ElLoading
,
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessageBox
}
from
'
element-plus
'
import
qrcode
from
"
@/components/qrcode/qrcode.vue
"
;
import
save
from
'
../goods/lists/save.vue
'
;
export
default
{
name
:
"
ucenter.cashierhome
"
,
components
:
{
qrcode
,
save
},
data
()
{
return
{
...
...
@@ -231,7 +242,7 @@ export default {
mirror
:
[],
total
:
0
,
totaljifen
:
0
,
//总共所需积分
Userprice
:
0
,
//不使用积分的价格
qrcodeurl
:
""
,
...
...
@@ -254,7 +265,7 @@ export default {
newValue
.
forEach
((
item
)
=>
{
item
.
content
.
forEach
((
cc
)
=>
{
total
+=
Number
(
cc
.
readyPrice
)
*
Number
(
cc
.
num
);
total
+=
parseFloat
(
cc
.
readyPrice
)
*
Number
(
cc
.
num
);
totalCount
=
totalCount
+
cc
.
num
;
totaljifen
+=
Number
(
cc
.
ready_integral
)
*
Number
(
cc
.
num
)
...
...
@@ -268,11 +279,25 @@ export default {
this
.
totalCount
=
totalCount
;
this
.
totaljifen
=
totaljifen
;
//积分
this
.
Userprice
=
parseFloat
(
parseFloat
(
total
)
+
parseInt
(
this
.
totaljifen
)).
toFixed
(
2
);
},
deep
:
true
,
}
},
methods
:
{
add
(){
this
.
dialog
.
save
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
saveBox
.
open
().
setData
({})
})
},
table_edit
(
row
){
this
.
dialog
.
save
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
saveBox
.
open
(
'
edit
'
).
setData
(
row
)
})
},
//---规格加入购物车-------------------------------------------------------------------------
popCloseHandle
()
{
this
.
$emit
(
"
close
"
);
...
...
resources/admin/src/pages/goods/lists/save.vue
View file @
030cd585
...
...
@@ -19,6 +19,9 @@
<el-form-item
label=
"标签"
prop=
"tags"
>
<sc-tag-input
v-model=
"form.tags"
placeholder=
"请输入标签"
/>
</el-form-item>
<el-form-item
label=
"产品编码"
prop=
"goods_sn"
>
<el-input
type=
"textarea"
v-model=
"form.goods_sn"
placeholder=
"请输入产品编码"
clearable
/>
</el-form-item>
<el-form-item
label=
"简述"
prop=
"description"
>
<el-input
type=
"textarea"
v-model=
"form.description"
placeholder=
"请输入简述"
clearable
/>
</el-form-item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment