Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
occloud-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangjiarong
occloud-server
Commits
41a815df
Commit
41a815df
authored
Jul 26, 2022
by
liuliufashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8784a8e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
39 deletions
+46
-39
package.json
web-vue-admin/package.json
+0
-1
index.vue
...e-admin/src/views/pay-list/components/createpay/index.vue
+46
-38
No files found.
web-vue-admin/package.json
View file @
41a815df
...
...
@@ -7,7 +7,6 @@
"build"
:
"vue-cli-service build --mode prod"
,
"lint"
:
"vue-cli-service lint"
,
"dev"
:
"vue-cli-service serve --mode dev --open"
,
"prod"
:
"vue-cli-service serve --mode prod --open"
,
"local"
:
"vue-cli-service serve --mode local --open"
},
"dependencies"
:
{
...
...
web-vue-admin/src/views/pay-list/components/createpay/index.vue
View file @
41a815df
...
...
@@ -56,12 +56,12 @@
<a-switch
v-model:checked=
"formState.fullphone"
/>
</div>
</a-form-item>
<a-form-item
label=
"开始时间"
name=
"price"
:label-col=
"
{ span: 2 }"
<
!--
<
a-form-item
label=
"开始时间"
name=
"price"
:label-col=
"
{ span: 2 }"
labelAlign="left">
<div
style=
"display:flex"
>
<a-date-picker
v-model:value=
"formState.starttime"
:locale=
"locale"
:format=
"dateFormat"
:disabledDate=
"disabledDate"
/>
<a-time-picker
style=
"margin-left:10px;"
v-model:value=
"startvalue"
format=
"HH:mm"
/>
</div>
</a-form-item>
</a-form-item>
-->
<a-form-item
label=
"结束时间"
name=
"price"
:label-col=
"
{ span: 2 }"
labelAlign="left">
<div
style=
"display:flex"
>
...
...
@@ -87,9 +87,9 @@
@
cancel=
"onCancel"
>
<a-radio-group
v-model:value=
"modalvalue"
>
<div
v-for=
"item in list"
:itemkey=
"item"
>
<a-radio
v-if=
"item.paytype == 1"
:value=
"item.
name
"
:lable=
"item.id"
@
change=
"onChangeRadioName(item)"
>
{{
item
.
name
}}
</a-radio>
<a-radio
v-else-if=
"item.paytype == 2"
:value=
"item.payname
"
:lable=
"item.id"
@
change=
"onChangeRadioName(item)"
>
{{
item
.
payname
}}
</a-radio>
<div
v-for=
"item in list"
:itemkey=
"item
.id
"
>
<a-radio
v-if=
"item.paytype == 1"
:value=
"item.
id
"
:lable=
"item.id"
@
change=
"onChangeRadioName(item)"
>
{{
item
.
name
}}
</a-radio>
<a-radio
v-else-if=
"item.paytype == 2"
:value=
"item.id
"
:lable=
"item.id"
@
change=
"onChangeRadioName(item)"
>
{{
item
.
payname
}}
</a-radio>
</div>
</a-radio-group>
</a-modal>
...
...
@@ -119,10 +119,9 @@ interface FormState {
const
visible
=
ref
<
boolean
>
(
false
);
const
list
=
ref
<
any
>
([])
const
optionss
=
ref
<
any
>
([])
let
goodspayditch
=
ref
([
{}
])
let
goodspayditch
=
ref
([])
const
props
=
defineProps
();
const
dateFormat
=
'YYYY/MM/DD'
;
const
startvalue
=
ref
<
Dayjs
>
(
dayjs
(
'08:00'
,
'HH:mm'
));
const
endvalue
=
ref
<
Dayjs
>
(
dayjs
(
'10:00'
,
'HH:mm'
));
const
optionsWithDisabled
=
[
{
value
:
'微信'
,
label
:
'1'
},
...
...
@@ -148,7 +147,7 @@ const formState = reactive<FormState>({
});
let
price
=
ref
(
0
)
let
priceSet
=
ref
(
0
)
const
modalvalue
=
ref
<
any
>
(
0
)
const
modalvalue
=
ref
<
any
>
(
'0'
)
let
radioValue
=
reactive
<
any
>
({
})
let
listValue
=
ref
<
any
>
([])
...
...
@@ -175,27 +174,28 @@ const onSubmit = () => {
validate
()
.
then
(
async
(
res
)
=>
{
const
uid
=
getUid
()
const
starttime
=
(
moment
(
toRaw
(
formState
).
starttime
.
$d
).
format
(
'YYYY-MM-DD'
))
+
(
moment
(
startvalue
.
value
.
$d
).
format
(
'THH:mm:[00][Z]'
))
const
expireendtime
=
(
moment
(
toRaw
(
formState
).
expireendtime
.
$d
).
format
(
'YYYY-MM-DD'
))
+
(
moment
(
endvalue
.
value
.
$d
).
format
(
'THH:mm:[00][Z]'
))
goodspayditch
.
value
.
map
((
item
:
any
)
=>
{
return
item
.
goodsid
=
toRaw
(
formState
).
subject
.
value
})
const
prarms
=
{
subject
:
toRaw
(
formState
).
subject
.
label
,
shortname
:
toRaw
(
formState
).
shortname
,
paymentmodel
:
toRaw
(
formState
).
paymentmodel
,
fullphone
:
toRaw
(
formState
).
paymentmodel
?
0
:
1
,
expireendtime
:
expireendtime
,
starttime
:
starttime
,
goodsid
:
toRaw
(
formState
).
subject
.
value
,
goodspayditch
:
goodspayditch
.
value
,
payment
:
formState
.
paymentmodel
==
'1'
?
price
.
value
*
100
:
priceSet
.
value
*
100
,
uid
,
remark
:
toRaw
(
formState
).
remark
}
const
data
:
any
=
await
onCreateGoodsPay
(
prarms
)
if
(
data
.
state
===
1
){
message
.
success
(
data
.
message
)
emit
(
'onBack'
)
}
// goodspayditch.value.map((item:any)=>{return item.goodsid = toRaw(formState).subject.value})
// console.log(toRaw(formState),'toRaw(formState)',goodspayditch.value);
// const prarms = {
// subject:toRaw(formState).subject.label,
// shortname:toRaw(formState).shortname,
// paymentmodel:toRaw(formState).paymentmodel,
// fullphone:toRaw(formState).paymentmodel?0:1,
// expireendtime:expireendtime,
// starttime: moment(new Date()).format('YYYY-MM-DDTHH:mm:[00][Z]'),
// goodsid: toRaw(formState).subject.value,
// goodspayditch:goodspayditch.value,
// payment:formState.paymentmodel == '1'?price.value*100:priceSet.value*100,
// uid,
// remark:toRaw(formState).remark
// }
// const data:any = await onCreateGoodsPay(prarms)
// if(data.state === 1){
// message.success(data.message)
// emit('onBack')
// }
})
.
catch
(
err
=>
{
...
...
@@ -211,7 +211,7 @@ const onCancel = ()=>{
visible
.
value
=
false
;
}
const
onChangeRadioName
=
(
e
:
any
)
=>
{
radioValue
=
e
radioValue
=
e
}
const
onSet
=
async
(
index
:
string
)
=>
{
const
uid
=
getUid
()
...
...
@@ -219,17 +219,26 @@ const onSet = async(index:string)=>{
if
(
index
==
'1'
)
{
data
=
await
onfindWX
(
uid
);
}
else
if
(
index
==
'2'
)
{
data
=
await
onfindAli
(
uid
);
data
=
await
onfindAli
(
uid
);
}
list
.
value
=
data
.
data
;
list
.
value
=
data
.
data
;
showModal
()
}
const
onSelectCheckboxValue
=
(
e
:
any
,
index
:
any
)
=>
{
if
(
checkboxValue
.
value
.
includes
(
e
)){
checkboxValue
.
value
.
splice
(
index
,
1
)
}
else
{
checkboxValue
.
value
.
push
(
e
)
}
const
onSelectCheckboxValue
=
async
(
e
:
any
,
index
:
any
)
=>
{
index
=
index
+
1
const
uid
=
getUid
()
let
data
:
any
=
{}
if
(
index
==
'1'
)
{
data
=
await
onfindWX
(
uid
);
}
else
if
(
index
==
'2'
)
{
data
=
await
onfindAli
(
uid
);
}
let
params
:
any
=
data
.
data
;
if
(
goodspayditch
.
value
[
index
-
1
]){
goodspayditch
.
value
.
splice
(
index
-
1
,
1
)
}
else
{
goodspayditch
.
value
[
index
-
1
]
=
params
[
0
]
}
}
const
showModal
=
()
=>
{
visible
.
value
=
true
;
...
...
@@ -268,7 +277,6 @@ defineExpose({
priceSet
,
dateFormat
,
disabledDate
,
startvalue
,
endvalue
,
...
toRefs
(
checkboxValue
),
onChangeRadioName
,
...
...
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