Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mocp-uniapp
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
pangchong
mocp-uniapp
Commits
9e518af4
Commit
9e518af4
authored
Jan 24, 2025
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 三方收费单修改
parent
7a5a5d30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
732 additions
and
181 deletions
+732
-181
src/mocp/api/electronicBill.js
+36
-0
src/mocp/components/global-button/global-button.scss
+60
-0
src/mocp/components/global-button/global-button.vue
+7
-0
src/mocp/components/global-picker/global-picker.vue
+24
-2
src/mocp/hooks/use-dict/dict-data/electronicBill.js
+4
-0
src/mocp/hooks/use-sign/useSign.js
+33
-3
src/mocp/utils/http.js
+2
-2
src/mocp/utils/tool.js
+23
-0
src/pages/modules/mocp/login/constants/index.compositions.js
+2
-2
src/pages/modules/mocp/login/index.vue
+7
-7
src/pages/modules/mocp/panel/aog/construction-details.vue
+2
-2
src/pages/modules/mocp/panel/electronicBill/deicing/add.vue
+25
-6
src/pages/modules/mocp/panel/electronicBill/deicing/constants/add.compositions.js
+3
-3
src/pages/modules/mocp/panel/electronicBill/deicing/constants/sign.functionals.js
+37
-8
src/pages/modules/mocp/panel/electronicBill/deicing/list.vue
+16
-1
src/pages/modules/mocp/panel/electronicBill/deicing/sign.vue
+12
-1
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/add.vue
+0
-0
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/constants/add.compositions.js
+47
-2
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/constants/add.functionals.js
+9
-0
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/constants/sign.functionals.js
+130
-45
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/list.vue
+18
-1
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/sign.vue
+13
-7
src/pages/modules/mocp/panel/electronicBill/routineWork/add.vue
+64
-26
src/pages/modules/mocp/panel/electronicBill/routineWork/constants/add.compositions.js
+27
-10
src/pages/modules/mocp/panel/electronicBill/routineWork/constants/sign.compositions.js
+1
-0
src/pages/modules/mocp/panel/electronicBill/routineWork/constants/sign.functionals.js
+80
-35
src/pages/modules/mocp/panel/electronicBill/routineWork/list.vue
+18
-2
src/pages/modules/mocp/panel/electronicBill/routineWork/sign.vue
+26
-10
src/pages/modules/mocp/panel/unplanApply/add.vue
+1
-1
src/pages/modules/mocp/panel/unplanApply/constants/add.compositions.js
+1
-1
src/pages/modules/mocp/panel/unplanApply/details.vue
+1
-1
src/pages/modules/mocp/panel/unplanWarning/add.vue
+1
-1
src/pages/modules/mocp/panel/unplanWarning/constants/add.compositions.js
+1
-1
src/pages/modules/mocp/panel/unplanWarning/details.vue
+1
-1
No files found.
src/mocp/api/electronicBill.js
View file @
9e518af4
...
@@ -45,6 +45,24 @@ export const addRoutineWorkApi = (data, config) => {
...
@@ -45,6 +45,24 @@ export const addRoutineWorkApi = (data, config) => {
config
config
})
})
}
}
//编辑例行维护工作单
export
const
updateRoutineWorkApi
=
(
data
,
config
)
=>
{
return
post
({
method
:
'POST'
,
url
:
'/workbench/electronicBill/updateRoutineWork'
,
data
,
config
})
}
//校验:日期、机号相同,且有【过夜维护 AF+PF】数据;返回值大于0表示存在相同的
export
const
routineWorkCheckRepeatApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/workbench/electronicBill/routineWorkCheckRepeat'
,
data
,
config
})
}
//例行维护工作单列表
//例行维护工作单列表
export
const
routineWorkListApi
=
(
data
,
config
)
=>
{
export
const
routineWorkListApi
=
(
data
,
config
)
=>
{
return
http
({
return
http
({
...
@@ -63,6 +81,15 @@ export const addNonRoutineWorkApi = (data, config) => {
...
@@ -63,6 +81,15 @@ export const addNonRoutineWorkApi = (data, config) => {
config
config
})
})
}
}
//修改非例行维护工作单
export
const
updateNonRoutineWorkApi
=
(
data
,
config
)
=>
{
return
post
({
method
:
'POST'
,
url
:
'/workbench/electronicBill/updateNonRoutineWork'
,
data
,
config
})
}
//非例行维护工作单列表
//非例行维护工作单列表
export
const
noRoutineWorkListApi
=
(
data
,
config
)
=>
{
export
const
noRoutineWorkListApi
=
(
data
,
config
)
=>
{
return
http
({
return
http
({
...
@@ -81,6 +108,15 @@ export const addDeicingApi = (data, config) => {
...
@@ -81,6 +108,15 @@ export const addDeicingApi = (data, config) => {
config
config
})
})
}
}
//修改除防冰工作单
export
const
updateDeicingApi
=
(
data
,
config
)
=>
{
return
post
({
method
:
'POST'
,
url
:
'/workbench/electronicBill/updateDeicing'
,
data
,
config
})
}
//除防冰工作单列表
//除防冰工作单列表
export
const
deicingListApi
=
(
data
,
config
)
=>
{
export
const
deicingListApi
=
(
data
,
config
)
=>
{
return
http
({
return
http
({
...
...
src/mocp/components/global-button/global-button.scss
View file @
9e518af4
...
@@ -16,6 +16,12 @@
...
@@ -16,6 +16,12 @@
background-color
:
darken
(
$mocp-primary-1
,
5%
);
background-color
:
darken
(
$mocp-primary-1
,
5%
);
border-color
:
darken
(
$mocp-primary-1
,
5%
);
border-color
:
darken
(
$mocp-primary-1
,
5%
);
}
}
@mixin
global-button-primary-text
{
color
:
$mocp-primary-6
;
}
@mixin
global-button-primary-text-active
{
color
:
darken
(
$mocp-primary-6
,
10%
);
}
@mixin
global-button-primary
{
@mixin
global-button-primary
{
color
:
#fff
;
color
:
#fff
;
background-color
:
$mocp-primary-6
;
background-color
:
$mocp-primary-6
;
...
@@ -43,6 +49,12 @@
...
@@ -43,6 +49,12 @@
background-color
:
darken
(
$mocp-success-1
,
5%
);
background-color
:
darken
(
$mocp-success-1
,
5%
);
border-color
:
darken
(
$mocp-success-1
,
5%
);
border-color
:
darken
(
$mocp-success-1
,
5%
);
}
}
@mixin
global-button-success-text
{
color
:
$mocp-success-6
;
}
@mixin
global-button-success-text-active
{
color
:
darken
(
$mocp-success-6
,
10%
);
}
@mixin
global-button-success
{
@mixin
global-button-success
{
color
:
#fff
;
color
:
#fff
;
background-color
:
$mocp-success-6
;
background-color
:
$mocp-success-6
;
...
@@ -70,6 +82,12 @@
...
@@ -70,6 +82,12 @@
background-color
:
darken
(
$mocp-warning-1
,
5%
);
background-color
:
darken
(
$mocp-warning-1
,
5%
);
border-color
:
darken
(
$mocp-warning-1
,
5%
);
border-color
:
darken
(
$mocp-warning-1
,
5%
);
}
}
@mixin
global-button-warning-text
{
color
:
$mocp-warning-6
;
}
@mixin
global-button-warning-text-active
{
color
:
darken
(
$mocp-warning-6
,
10%
);
}
@mixin
global-button-warning
{
@mixin
global-button-warning
{
color
:
#fff
;
color
:
#fff
;
background-color
:
$mocp-warning-6
;
background-color
:
$mocp-warning-6
;
...
@@ -97,6 +115,12 @@
...
@@ -97,6 +115,12 @@
background-color
:
darken
(
$mocp-danger-1
,
5%
);
background-color
:
darken
(
$mocp-danger-1
,
5%
);
border-color
:
darken
(
$mocp-danger-1
,
5%
);
border-color
:
darken
(
$mocp-danger-1
,
5%
);
}
}
@mixin
global-button-danger-text
{
color
:
$mocp-danger-6
;
}
@mixin
global-button-danger-text-active
{
color
:
darken
(
$mocp-danger-6
,
10%
);
}
@mixin
global-button-danger
{
@mixin
global-button-danger
{
color
:
#fff
;
color
:
#fff
;
background-color
:
$mocp-danger-6
;
background-color
:
$mocp-danger-6
;
...
@@ -128,6 +152,15 @@
...
@@ -128,6 +152,15 @@
border
:
none
;
border
:
none
;
}
}
}
}
&
.primary-text
{
@include
global-button-primary-text
;
&
:active
{
@include
global-button-primary-text-active
;
}
&
:
:
after
{
border
:
none
;
}
}
&
.primary
{
&
.primary
{
@include
global-button-primary
;
@include
global-button-primary
;
&
:active
{
&
:active
{
...
@@ -152,6 +185,15 @@
...
@@ -152,6 +185,15 @@
border
:
none
;
border
:
none
;
}
}
}
}
&
.success-text
{
@include
global-button-success-text
;
&
:active
{
@include
global-button-success-text-active
;
}
&
:
:
after
{
border
:
none
;
}
}
&
.success
{
&
.success
{
@include
global-button-success
;
@include
global-button-success
;
&
:active
{
&
:active
{
...
@@ -176,6 +218,15 @@
...
@@ -176,6 +218,15 @@
border
:
none
;
border
:
none
;
}
}
}
}
&
.warning-text
{
@include
global-button-warning-text
;
&
:active
{
@include
global-button-warning-text-active
;
}
&
:
:
after
{
border
:
none
;
}
}
&
.warning
{
&
.warning
{
@include
global-button-warning
;
@include
global-button-warning
;
&
:active
{
&
:active
{
...
@@ -200,6 +251,15 @@
...
@@ -200,6 +251,15 @@
border
:
none
;
border
:
none
;
}
}
}
}
&
.danger-text
{
@include
global-button-danger-text
;
&
:active
{
@include
global-button-danger-text-active
;
}
&
:
:
after
{
border
:
none
;
}
}
&
.danger
{
&
.danger
{
@include
global-button-danger
;
@include
global-button-danger
;
&
:active
{
&
:active
{
...
...
src/mocp/components/global-button/global-button.vue
View file @
9e518af4
...
@@ -38,6 +38,11 @@ const ps = defineProps({
...
@@ -38,6 +38,11 @@ const ps = defineProps({
type
:
String
,
type
:
String
,
default
:
'default'
default
:
'default'
},
},
//文字
text
:
{
type
:
Boolean
,
default
:
false
},
//是否镂空
//是否镂空
plain
:
{
plain
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -66,6 +71,8 @@ const getClass = computed(() => {
...
@@ -66,6 +71,8 @@ const getClass = computed(() => {
_class
.
push
(
ps
.
type
+
'-plain'
)
_class
.
push
(
ps
.
type
+
'-plain'
)
}
else
if
(
ps
.
border
)
{
}
else
if
(
ps
.
border
)
{
_class
.
push
(
ps
.
type
+
'-border'
)
_class
.
push
(
ps
.
type
+
'-border'
)
}
else
if
(
ps
.
text
)
{
_class
.
push
(
ps
.
type
+
'-text'
)
}
else
{
}
else
{
_class
.
push
(
ps
.
type
)
_class
.
push
(
ps
.
type
)
}
}
...
...
src/mocp/components/global-picker/global-picker.vue
View file @
9e518af4
...
@@ -23,10 +23,14 @@
...
@@ -23,10 +23,14 @@
<view
style=
"width: 100%; height: 100%"
v-else
>
<view
style=
"width: 100%; height: 100%"
v-else
>
<global-empty></global-empty>
<global-empty></global-empty>
</view>
</view>
<
template
#
bottom
v-if=
"multiple"
>
<
template
#
bottom
>
<view
style=
"margin-top: 20rpx"
>
<view
style=
"margin-top: 20rpx"
v-if=
"multiple"
>
<global-button
type=
"primary"
:radius=
"5"
@
tap=
"confirmMultiple"
>
确定
</global-button>
<global-button
type=
"primary"
:radius=
"5"
@
tap=
"confirmMultiple"
>
确定
</global-button>
</view>
</view>
<view
class=
"customize"
style=
"margin-top: 20rpx"
v-if=
"customize && !getFilterColumns.length"
>
<text>
没有找到筛选内容
</text>
<global-button
type=
"text"
:radius=
"5"
@
tap=
"confirmCustomize"
>
添加已输入内容
</global-button>
</view>
</
template
>
</
template
>
</global-popup>
</global-popup>
<up-picker
<up-picker
...
@@ -79,6 +83,11 @@ const ps = defineProps({
...
@@ -79,6 +83,11 @@ const ps = defineProps({
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
//是否筛选不到的时候可以自定义内容(只对filter有效)
customize
:
{
type
:
Boolean
,
default
:
false
},
style
:
{
style
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
default
:
()
=>
{
...
@@ -291,6 +300,12 @@ const confirmMultiple = () => {
...
@@ -291,6 +300,12 @@ const confirmMultiple = () => {
es
(
'update:modelValue'
,
multipleValue
.
value
.
join
(
ps
.
valueSplit
))
es
(
'update:modelValue'
,
multipleValue
.
value
.
join
(
ps
.
valueSplit
))
es
(
'change'
,
multipleValue
.
value
.
join
(
ps
.
valueSplit
))
es
(
'change'
,
multipleValue
.
value
.
join
(
ps
.
valueSplit
))
}
}
//确定自定义内容
const
confirmCustomize
=
()
=>
{
show
.
value
=
false
es
(
'update:modelValue'
,
searchKey
.
value
)
es
(
'change'
,
searchKey
.
value
)
}
//点击清空按钮
//点击清空按钮
const
clear
=
()
=>
{
const
clear
=
()
=>
{
labelValue
.
value
=
''
labelValue
.
value
=
''
...
@@ -376,5 +391,12 @@ watch(
...
@@ -376,5 +391,12 @@ watch(
}
}
}
}
}
}
.customize
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
background
:
$
mocp-fill-1
;
padding
:
10
rpx
20
rpx
;
}
}
}
</
style
>
</
style
>
src/mocp/hooks/use-dict/dict-data/electronicBill.js
View file @
9e518af4
...
@@ -46,3 +46,7 @@ export const eb_modelType = [
...
@@ -46,3 +46,7 @@ export const eb_modelType = [
{
label
:
'宽体机'
,
value
:
'1'
},
{
label
:
'宽体机'
,
value
:
'1'
},
{
label
:
'窄体机'
,
value
:
'2'
}
{
label
:
'窄体机'
,
value
:
'2'
}
]
]
export
const
eb_zk
=
[
{
label
:
'窄体'
,
value
:
'0'
},
{
label
:
'宽体'
,
value
:
'1'
}
]
src/mocp/hooks/use-sign/useSign.js
View file @
9e518af4
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
onLoad
,
onReady
}
from
'@dcloudio/uni-app'
export
const
useDrawSignature
=
(
canvasId
)
=>
{
export
const
useDrawSignature
=
(
canvasId
,
config
=
{}
)
=>
{
let
ctx
=
null
let
ctx
=
null
let
isButtonDown
=
false
let
isButtonDown
=
false
let
points
=
[]
let
points
=
[]
...
@@ -15,6 +15,37 @@ export const useDrawSignature = (canvasId) => {
...
@@ -15,6 +15,37 @@ export const useDrawSignature = (canvasId) => {
ctx
.
lineJoin
=
'round'
ctx
.
lineJoin
=
'round'
})
})
onReady
(()
=>
{
if
(
config
.
path
)
{
const
query
=
uni
.
createSelectorQuery
()
query
.
select
(
'#'
+
canvasId
)
.
fields
({
size
:
true
},
(
data
)
=>
{
if
(
data
)
{
uni
.
getImageInfo
({
src
:
config
.
path
,
success
:
(
res
)
=>
{
const
{
width
,
height
}
=
res
// 计算缩放比例
const
scale
=
Math
.
min
(
data
.
width
/
width
,
data
.
height
/
height
)
// 计算绘制的宽高
const
drawWidth
=
width
*
scale
const
drawHeight
=
height
*
scale
// 绘制图片
ctx
.
drawImage
(
res
.
path
,
0
,
0
,
drawWidth
,
drawHeight
)
ctx
.
draw
(
true
)
isSigned
.
value
=
true
},
fail
:
(
err
)
=>
{
console
.
log
(
err
)
}
})
}
})
.
exec
()
}
})
// 触摸开始,获取到起点
// 触摸开始,获取到起点
const
touchStart
=
(
e
)
=>
{
const
touchStart
=
(
e
)
=>
{
let
startPoint
=
{
X
:
e
.
changedTouches
[
0
].
x
,
Y
:
e
.
changedTouches
[
0
].
y
}
let
startPoint
=
{
X
:
e
.
changedTouches
[
0
].
x
,
Y
:
e
.
changedTouches
[
0
].
y
}
...
@@ -79,7 +110,6 @@ export const useDrawSignature = (canvasId) => {
...
@@ -79,7 +110,6 @@ export const useDrawSignature = (canvasId) => {
})
})
})
})
}
}
return
{
return
{
isSigned
,
isSigned
,
touchStart
,
touchStart
,
...
...
src/mocp/utils/http.js
View file @
9e518af4
import
useUserStore
from
'mocp/store/user'
import
useUserStore
from
'mocp/store/user'
//
const baseURL = 'https://hna-platform.anyremote.cn' //测试
const
baseURL
=
'https://hna-platform.anyremote.cn'
//测试
// const baseURL = 'https://moc.hnatechnic.com/api' //生产
// const baseURL = 'https://moc.hnatechnic.com/api' //生产
// const baseURL = 'http://10.123.48.67/api' //Amms内网
// const baseURL = 'http://10.123.48.67/api' //Amms内网
const
baseURL
=
'https://hnaelbtest.hnatechnic.com/mocptest/api'
//内网
//
const baseURL = 'https://hnaelbtest.hnatechnic.com/mocptest/api' //内网
class
ServiceLoading
{
class
ServiceLoading
{
open
(
loading
)
{
open
(
loading
)
{
...
...
src/mocp/utils/tool.js
View file @
9e518af4
...
@@ -135,3 +135,26 @@ export const validateParameters = (...params) => {
...
@@ -135,3 +135,26 @@ export const validateParameters = (...params) => {
// 如果没有任何参数被填写,那么也是有效的
// 如果没有任何参数被填写,那么也是有效的
return
true
return
true
}
}
/**
* 判断是否是base64图片
* @param {*} url
*/
export
const
isBase64Image
=
(
url
)
=>
{
// 正则表达式匹配 Base64 图片的格式
const
base64ImageRegex
=
/^data:image
\/(
png|jpg|jpeg|gif|bmp|webp|svg+xml|tiff
)
;base64,
([
A-Za-z0-9+
/]{4})
*
([
A-Za-z0-9+
/]{3}
=|
[
A-Za-z0-9+
/]{2}
==
)?
$/
// 检查是否符合 Base64 图片的格式
if
(
!
base64ImageRegex
.
test
(
url
))
{
return
false
}
// 提取 Base64 部分并尝试解码验证
const
base64Data
=
url
.
split
(
','
)[
1
]
try
{
atob
(
base64Data
)
// 尝试解码
return
true
}
catch
(
e
)
{
return
false
}
}
src/pages/modules/mocp/login/constants/index.compositions.js
View file @
9e518af4
...
@@ -2,8 +2,8 @@ import { ref, reactive } from 'vue'
...
@@ -2,8 +2,8 @@ import { ref, reactive } from 'vue'
export
const
loginFormRef
=
ref
()
export
const
loginFormRef
=
ref
()
//表单数据
//表单数据
export
const
loginForm
=
reactive
({
export
const
loginForm
=
reactive
({
username
:
''
,
//devzj3
username
:
'
devzj3
'
,
//devzj3
password
:
''
,
//Ifar_9527008 / Ifar2016_0525
password
:
'
Ifar2016_0525
'
,
//Ifar_9527008 / Ifar2016_0525
verifyCode
:
''
verifyCode
:
''
})
})
export
const
showLoad
=
ref
(
false
)
export
const
showLoad
=
ref
(
false
)
...
...
src/pages/modules/mocp/login/index.vue
View file @
9e518af4
...
@@ -76,13 +76,13 @@ const handleLogin = async () => {
...
@@ -76,13 +76,13 @@ const handleLogin = async () => {
loading
.
value
=
true
loading
.
value
=
true
await
login
()
await
login
()
if
(
userStore
.
token
)
{
if
(
userStore
.
token
)
{
//加入席位权限
//
//
加入席位权限
await
getUserSeatList
()
//
await getUserSeatList()
if
(
userStore
.
seatId
)
{
//
if (userStore.seatId) {
await
Promise
.
all
([
getSeatPermission
(),
getConfigData
()])
//
await Promise.all([getSeatPermission(), getConfigData()])
}
else
{
//
} else {
userStore
.
setState
(
'seatPermission'
,
[])
//
userStore.setState('seatPermission', [])
}
//
}
//跳转工作台
//跳转工作台
uni
.
$mocpJump
.
redirectTo
(
'/tab/index'
)
uni
.
$mocpJump
.
redirectTo
(
'/tab/index'
)
}
}
...
...
src/pages/modules/mocp/panel/aog/construction-details.vue
View file @
9e518af4
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
showCancelButton
showCancelButton
closeOnClickOverlay
closeOnClickOverlay
@
confirm=
"updateAogConstruction"
@
confirm=
"updateAogConstruction"
@
cancel=
"show = false"
@
cancel=
"show
Confirm
= false"
@
close=
"show = false"
@
close=
"show
Confirm
= false"
></up-modal>
></up-modal>
</global-page>
</global-page>
</template>
</template>
...
...
src/pages/modules/mocp/panel/electronicBill/deicing/add.vue
View file @
9e518af4
<
template
>
<
template
>
<global-page
<global-page
title=
"新建除防冰收费单
"
:title=
"formData.id > 0 ? '编辑除防冰收费单' : '新建除防冰收费单'
"
:showNavRight=
"true"
:showNavRight=
"
formData.id > 0 ? false :
true"
navRightText=
"今天签单"
navRightText=
"今天签单"
@
handleRightClick=
"navigateTo('/panel/electronicBill/deicing/list')"
@
handleRightClick=
"navigateTo('/panel/electronicBill/deicing/list')"
showFooterBtn
showFooterBtn
...
@@ -18,10 +18,25 @@
...
@@ -18,10 +18,25 @@
<global-date
pickAlign=
"right"
clearable
v-model=
"formData.date"
defaultToday
></global-date>
<global-date
pickAlign=
"right"
clearable
v-model=
"formData.date"
defaultToday
></global-date>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机号"
prop=
"acreg"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机号"
prop=
"acreg"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.acreg"
:options=
"allAc"
clearable
filter
@
change=
"changeAcreg"
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.acreg"
:options=
"allAc"
clearable
filter
customize
@
change=
"changeAcreg"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"飞机所属单位"
prop=
"aircaraftoperator"
:borderBottom=
"true"
required
>
<up-form-item
label=
"飞机所属单位"
prop=
"aircaraftoperator"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.aircaraftoperator"
:options=
"allAirline"
clearable
filter
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.aircaraftoperator"
:options=
"allAirline"
clearable
filter
customize
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"保障单位"
prop=
"guaranteeUnit"
:borderBottom=
"true"
required
>
<up-form-item
label=
"保障单位"
prop=
"guaranteeUnit"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.guaranteeUnit"
dictkey=
"eb_guaranteeUnit"
clearable
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.guaranteeUnit"
dictkey=
"eb_guaranteeUnit"
clearable
></global-picker>
...
@@ -30,7 +45,7 @@
...
@@ -30,7 +45,7 @@
<global-picker
pickAlign=
"right"
v-model=
"formData.weatherToday"
dictkey=
"eb_weatherToday"
clearable
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.weatherToday"
dictkey=
"eb_weatherToday"
clearable
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机型"
prop=
"model"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机型"
prop=
"model"
:borderBottom=
"true"
required
>
<global-picker
v-model=
"formData.model"
pickAlign=
"right"
:options=
"allAcType"
clearable
filter
></global-picker>
<global-picker
v-model=
"formData.model"
pickAlign=
"right"
:options=
"allAcType"
clearable
filter
customize
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机型类别"
prop=
"modelType"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机型类别"
prop=
"modelType"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.modelType"
dictkey=
"eb_modelType"
clearable
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.modelType"
dictkey=
"eb_modelType"
clearable
></global-picker>
...
@@ -470,8 +485,9 @@ import {
...
@@ -470,8 +485,9 @@ import {
getDeicingFile
,
getDeicingFile
,
getAntiicingFile
getAntiicingFile
}
from
'./constants/add.functionals'
}
from
'./constants/add.functionals'
import
{
watch
,
watchEffect
}
from
'vue'
import
{
onUnmounted
,
watch
,
watchEffect
}
from
'vue'
import
{
getTerminalSelect
}
from
'mocp/utils/permission'
import
{
getTerminalSelect
}
from
'mocp/utils/permission'
import
{
resetData
}
from
'./constants/sign.functionals'
const
electronicBillStore
=
useElectronicBillStore
()
const
electronicBillStore
=
useElectronicBillStore
()
const
{
const
{
...
@@ -541,6 +557,9 @@ watchEffect(() => {
...
@@ -541,6 +557,9 @@ watchEffect(() => {
}
}
}
}
})
})
onUnmounted
(()
=>
{
resetData
()
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
:deep
(
.u-fade-zoom-enter-active
)
{
:deep
(
.u-fade-zoom-enter-active
)
{
...
...
src/pages/modules/mocp/panel/electronicBill/deicing/constants/add.compositions.js
View file @
9e518af4
...
@@ -52,15 +52,15 @@ export const formData = reactive({
...
@@ -52,15 +52,15 @@ export const formData = reactive({
deicingUnit2
:
''
,
deicingUnit2
:
''
,
deicingUnit3
:
''
,
deicingUnit3
:
''
,
deicingUnit4
:
''
,
deicingUnit4
:
''
,
expectDeicing
:
0
,
expectDeicing
:
'0'
,
fixedPointDeicing
:
0
,
fixedPointDeicing
:
'0'
,
flightNoIn
:
''
,
flightNoIn
:
''
,
flightNoOut
:
''
,
flightNoOut
:
''
,
id
:
undefined
,
id
:
undefined
,
legs
:
''
,
legs
:
''
,
model
:
''
,
model
:
''
,
nickname
:
''
,
nickname
:
''
,
originalAircraftPositionDeicing
:
0
,
originalAircraftPositionDeicing
:
'0'
,
station
:
''
,
station
:
''
,
username
:
''
,
username
:
''
,
guaranteeUnit
:
''
,
guaranteeUnit
:
''
,
...
...
src/pages/modules/mocp/panel/electronicBill/deicing/constants/sign.functionals.js
View file @
9e518af4
import
{
upload
}
from
'mocp/utils/http'
import
{
upload
}
from
'mocp/utils/http'
import
{
canvasImage
}
from
'./sign.compositions'
import
{
canvasImage
}
from
'./sign.compositions'
import
{
antiicingFile
,
antiicingFlag
,
deicingFile
,
deicingFlag
,
formData
,
showAntiicing
,
showDeicing
}
from
'./add.compositions'
import
{
antiicingFile
,
antiicingFlag
,
deicingFile
,
deicingFlag
,
formData
,
showAntiicing
,
showDeicing
}
from
'./add.compositions'
import
{
addDeicingApi
}
from
'mocp/api/electronicBill'
import
{
addDeicingApi
,
updateDeicingApi
}
from
'mocp/api/electronicBill'
import
Day
from
'mocp/utils/dayjs'
import
{
isBase64Image
}
from
'mocp/utils/tool'
export
const
handleSubmit
=
async
()
=>
{
export
const
handleSubmit
=
async
()
=>
{
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -9,8 +11,14 @@ export const handleSubmit = async () => {
...
@@ -9,8 +11,14 @@ export const handleSubmit = async () => {
mask
:
true
mask
:
true
})
})
try
{
try
{
await
uploadFile
()
if
(
isBase64Image
(
canvasImage
.
value
))
{
await
addDeicing
()
await
uploadFile
()
}
if
(
formData
.
id
>
0
)
{
await
updateDeicing
()
}
else
{
await
addDeicing
()
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
console
.
error
(
error
)
}
finally
{
}
finally
{
...
@@ -37,7 +45,28 @@ export const addDeicing = async () => {
...
@@ -37,7 +45,28 @@ export const addDeicing = async () => {
}
}
const
res
=
await
addDeicingApi
(
formData
,
{
loading
:
true
})
const
res
=
await
addDeicingApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$emit
(
'deicingReload'
)
uni
.
$mocpJump
.
navigateBack
(
2
)
resetData
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
export
const
updateDeicing
=
async
()
=>
{
const
params
=
{
...
formData
}
if
(
formData
.
deicingMix
==
'Other'
)
{
params
.
deicingMix
=
formData
.
deicingMix1
+
':'
+
formData
.
deicingMix2
}
if
(
formData
.
antiicingMix
==
'Other'
)
{
params
.
antiicingMix
=
formData
.
antiicingMix1
+
':'
+
formData
.
antiicingMix2
}
const
res
=
await
updateDeicingApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$emit
(
'deicingReload'
)
uni
.
$mocpJump
.
navigateBack
(
2
)
resetData
()
resetData
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
uni
.
$mocpMessage
.
success
(
res
.
message
)
}
else
{
}
else
{
...
@@ -73,7 +102,7 @@ export const resetData = () => {
...
@@ -73,7 +102,7 @@ export const resetData = () => {
antiicingUnit3
:
''
,
antiicingUnit3
:
''
,
antiicingUnit4
:
''
,
antiicingUnit4
:
''
,
customerSignImg
:
''
,
customerSignImg
:
''
,
date
:
''
,
date
:
Day
().
valueOf
()
,
deicingCartNo1
:
''
,
deicingCartNo1
:
''
,
deicingCartNo2
:
''
,
deicingCartNo2
:
''
,
deicingCartNo3
:
''
,
deicingCartNo3
:
''
,
...
@@ -97,15 +126,15 @@ export const resetData = () => {
...
@@ -97,15 +126,15 @@ export const resetData = () => {
deicingUnit2
:
''
,
deicingUnit2
:
''
,
deicingUnit3
:
''
,
deicingUnit3
:
''
,
deicingUnit4
:
''
,
deicingUnit4
:
''
,
expectDeicing
:
0
,
expectDeicing
:
'0'
,
fixedPointDeicing
:
0
,
fixedPointDeicing
:
'0'
,
flightNoIn
:
''
,
flightNoIn
:
''
,
flightNoOut
:
''
,
flightNoOut
:
''
,
id
:
undefined
,
id
:
undefined
,
legs
:
''
,
legs
:
''
,
model
:
''
,
model
:
''
,
nickname
:
''
,
nickname
:
''
,
originalAircraftPositionDeicing
:
0
,
originalAircraftPositionDeicing
:
'0'
,
station
:
''
,
station
:
''
,
username
:
''
,
username
:
''
,
guaranteeUnit
:
''
,
guaranteeUnit
:
''
,
...
...
src/pages/modules/mocp/panel/electronicBill/deicing/list.vue
View file @
9e518af4
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
}"
}"
>
>
<template
#
default=
"
{ item }">
<template
#
default=
"
{ item }">
<view
class=
"item"
>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<view
class=
"left"
>
<text
class=
"txt"
>
{{
item
.
acreg
}}
</text>
<text
class=
"txt"
>
{{
item
.
acreg
}}
</text>
...
@@ -45,9 +45,24 @@ import { deicingListApi } from 'mocp/api/electronicBill'
...
@@ -45,9 +45,24 @@ import { deicingListApi } from 'mocp/api/electronicBill'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
useBaseStore
from
'mocp/store/base'
import
useBaseStore
from
'mocp/store/base'
import
useUserStore
from
'mocp/store/user'
import
useUserStore
from
'mocp/store/user'
import
{
ref
}
from
'vue'
import
{
onUnload
}
from
'@dcloudio/uni-app'
import
{
formData
}
from
'./constants/add.compositions'
const
baseStore
=
useBaseStore
()
const
baseStore
=
useBaseStore
()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
goDetails
=
(
data
)
=>
{
Object
.
assign
(
formData
,
data
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/electronicBill/deicing/add'
)
}
//刷新
const
paging
=
ref
()
uni
.
$on
(
'deicingReload'
,
()
=>
{
paging
.
value
?.
reload
()
}
)
onUnload
(()
=>
{
uni
.
$off
(
'deicingReload'
)
}
)
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
@
import
'mocpStatic/css/list.scss'
;
@
import
'mocpStatic/css/list.scss'
;
...
...
src/pages/modules/mocp/panel/electronicBill/deicing/sign.vue
View file @
9e518af4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
@
touchstart=
"touchStart"
@
touchstart=
"touchStart"
@
touchmove=
"touchMove"
@
touchmove=
"touchMove"
@
touchend=
"touchEnd"
@
touchend=
"touchEnd"
id=
"canvas"
/>
/>
</view>
</view>
<view
class=
"footer-btns"
>
<view
class=
"footer-btns"
>
...
@@ -34,8 +35,14 @@ import { canvasImage } from './constants/sign.compositions'
...
@@ -34,8 +35,14 @@ import { canvasImage } from './constants/sign.compositions'
import
{
handleSubmit
}
from
'./constants/sign.functionals'
import
{
handleSubmit
}
from
'./constants/sign.functionals'
import
{
formData
}
from
'./constants/add.compositions'
import
{
formData
}
from
'./constants/add.compositions'
import
{
onBeforeUnmount
}
from
'vue'
import
{
onBeforeUnmount
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
const
{
isSigned
,
touchStart
,
touchMove
,
touchEnd
,
clear
,
getPath
}
=
useDrawSignature
(
'canvas'
)
const
{
isSigned
,
touchStart
,
touchMove
,
touchEnd
,
clear
,
getPath
}
=
useDrawSignature
(
'canvas'
,
{
path
:
formData
.
customerSignImg
})
onLoad
(()
=>
{
canvasImage
.
value
=
formData
.
customerSignImg
})
//保存签名
//保存签名
const
handleSave
=
()
=>
{
const
handleSave
=
()
=>
{
if
(
isSigned
.
value
)
{
if
(
isSigned
.
value
)
{
...
@@ -67,6 +74,10 @@ onBeforeUnmount(() => {
...
@@ -67,6 +74,10 @@ onBeforeUnmount(() => {
.mocp-preview
{
.mocp-preview
{
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
uni-image
{
width
:
100%
;
height
:
100%
;
}
}
}
.mocp-title
{
.mocp-title
{
padding
:
24
rpx
0
;
padding
:
24
rpx
0
;
...
...
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/add.vue
View file @
9e518af4
This diff is collapsed.
Click to expand it.
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/constants/add.compositions.js
View file @
9e518af4
import
{
reactive
,
ref
}
from
'vue'
import
{
reactive
}
from
'vue'
export
const
formData
=
reactive
({
export
const
formData
=
reactive
({
acreg
:
''
,
acreg
:
''
,
acu
:
undefined
,
acu
:
undefined
,
aircaraftoperator
:
''
,
aircaraftoperator
:
''
,
asu
:
undefined
,
asu
:
undefined
,
bjjkzyxs
:
undefined
,
bjjkzyzk
:
undefined
,
bjscpxs
:
undefined
,
bjscpzk
:
undefined
,
cdydq
:
undefined
,
cgydq
:
undefined
,
charger
:
undefined
,
charger
:
undefined
,
cherryPicker
:
undefined
,
cherryPicker
:
undefined
,
cy
:
undefined
,
createTime
:
''
,
createUser
:
undefined
,
customerSignImg
:
''
,
customerSignImg
:
''
,
customerSignTime
:
''
,
cyfdlgjcs
:
''
,
cyfdlgjjh
:
''
,
cydlgjcs
:
''
,
cydlgjjh
:
''
,
date
:
''
,
date
:
''
,
fbjjkzyxs
:
undefined
,
fbjjkzyzk
:
undefined
,
fbjscpxs
:
undefined
,
fbjscpzk
:
undefined
,
flightNo
:
''
,
flightNo
:
''
,
flightNoIn
:
''
,
flightNoOut
:
''
,
gjcl
:
undefined
,
gpu
:
undefined
,
gpu
:
undefined
,
hanger
:
undefined
,
hanger
:
undefined
,
hlgj
:
undefined
,
hy
:
undefined
,
id
:
0
,
id
:
0
,
isDel
:
''
,
jackscrew
:
undefined
,
jackscrew
:
undefined
,
jgrygs
:
undefined
,
jsjd
:
undefined
,
jsqjd
:
undefined
,
ladder
:
undefined
,
ladder
:
undefined
,
legs
:
''
,
legs
:
''
,
gkgzt
:
undefined
,
lzqjd
:
undefined
,
material1
:
''
,
material1
:
''
,
material2
:
''
,
material2
:
''
,
material3
:
''
,
material3
:
''
,
model
:
''
,
model
:
''
,
ndtktsbjh
:
''
,
ndtktsbts
:
undefined
,
ndtrygs
:
undefined
,
nickname
:
''
,
nickname
:
''
,
number1
:
undefined
,
number1
:
undefined
,
number2
:
undefined
,
number2
:
undefined
,
number3
:
undefined
,
number3
:
undefined
,
oxygenCharging
:
undefined
,
oxygenCharging
:
undefined
,
powerTool
:
undefined
,
powerTool
:
undefined
,
ptgzt
:
undefined
,
qtgj
:
[],
qtxhp
:
undefined
,
shockStrutCharging
:
undefined
,
shockStrutCharging
:
undefined
,
sjcptcc
:
undefined
,
sjcptcr
:
undefined
,
station
:
''
,
station
:
''
,
tails
:
undefined
,
tails
:
undefined
,
tireCharging
:
undefined
,
tireCharging
:
undefined
,
tjpxs
:
undefined
,
tjpzk
:
undefined
,
tools
:
undefined
,
tools
:
undefined
,
tractor
:
undefined
,
tractor
:
undefined
,
ttfj
:
undefined
,
updateTime
:
''
,
updateUser
:
undefined
,
username
:
''
,
username
:
''
,
work1
:
''
,
work1
:
''
,
work2
:
''
,
work2
:
''
,
work3
:
''
,
work3
:
''
,
workingHours1
:
undefined
,
workingHours1
:
undefined
,
workingHours2
:
undefined
,
workingHours2
:
undefined
,
workingHours3
:
undefined
workingHours3
:
undefined
,
xbgkcc
:
undefined
,
xbgkcr
:
undefined
,
yyy
:
undefined
})
})
export
const
rules
=
reactive
({
export
const
rules
=
reactive
({
...
...
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/constants/add.functionals.js
View file @
9e518af4
...
@@ -18,3 +18,12 @@ export const changeAcreg = async (acreg) => {
...
@@ -18,3 +18,12 @@ export const changeAcreg = async (acreg) => {
uni
.
$mocpMessage
.
error
(
res
.
message
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
}
}
export
const
addQtgj
=
()
=>
{
formData
.
qtgj
.
push
({
jh
:
''
,
ts
:
undefined
})
}
export
const
delQtgj
=
(
index
)
=>
{
formData
.
qtgj
.
splice
(
index
,
1
)
}
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/constants/sign.functionals.js
View file @
9e518af4
import
{
upload
}
from
'mocp/utils/http'
import
{
upload
}
from
'mocp/utils/http'
import
{
canvasImage
}
from
'./sign.compositions'
import
{
canvasImage
}
from
'./sign.compositions'
import
{
formData
}
from
'./add.compositions'
import
{
formData
}
from
'./add.compositions'
import
{
addNonRoutineWorkApi
}
from
'mocp/api/electronicBill'
import
{
addNonRoutineWorkApi
,
updateNonRoutineWorkApi
}
from
'mocp/api/electronicBill'
import
Day
from
'mocp/utils/dayjs'
import
{
isBase64Image
}
from
'mocp/utils/tool'
export
const
handleSubmit
=
async
()
=>
{
export
const
handleSubmit
=
async
()
=>
{
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -9,8 +11,14 @@ export const handleSubmit = async () => {
...
@@ -9,8 +11,14 @@ export const handleSubmit = async () => {
mask
:
true
mask
:
true
})
})
try
{
try
{
await
uploadFile
()
if
(
isBase64Image
(
canvasImage
.
value
))
{
await
addNonRoutineWork
()
await
uploadFile
()
}
if
(
formData
.
id
>
0
)
{
await
updateNonRoutineWork
()
}
else
{
await
addNonRoutineWork
()
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
console
.
error
(
error
)
}
finally
{
}
finally
{
...
@@ -25,52 +33,129 @@ export const uploadFile = async () => {
...
@@ -25,52 +33,129 @@ export const uploadFile = async () => {
uni
.
$mocpMessage
.
error
(
res
.
message
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
}
}
//获取其他工具
export
const
getQtgj
=
(
qtgj
)
=>
{
//[{jh:abc,ts:1},{jh:abc,ts:2},{jh:abc,ts:3] => abc-1,abc-2,abc-3
//判断是否数组
if
(
Array
.
isArray
(
qtgj
))
{
return
qtgj
.
map
((
item
)
=>
`
${
item
.
jh
}
-
${
item
.
ts
}
`
).
join
(
','
)
}
if
(
typeof
qtgj
==
'string'
)
{
if
(
!
qtgj
)
return
[]
//abc-1,abc-2,abc-3 => [{jh:abc,ts:1},{jh:abc,ts:2},{jh:abc,ts:3]
return
qtgj
.
split
(
','
).
map
((
item
)
=>
{
const
[
jh
,
ts
]
=
item
.
split
(
'-'
)
return
{
jh
,
ts
}
})
}
return
qtgj
}
export
const
addNonRoutineWork
=
async
()
=>
{
export
const
addNonRoutineWork
=
async
()
=>
{
const
res
=
await
addNonRoutineWorkApi
(
formData
,
{
loading
:
true
})
const
res
=
await
addNonRoutineWorkApi
(
{
...
formData
,
qtgj
:
getQtgj
(
formData
.
qtgj
)
}
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$emit
(
'nonRoutineWorkReload'
)
Object
.
assign
(
formData
,
{
uni
.
$mocpJump
.
navigateBack
(
2
)
acreg
:
''
,
resetData
()
acu
:
undefined
,
aircaraftoperator
:
''
,
asu
:
undefined
,
charger
:
undefined
,
cherryPicker
:
undefined
,
customerSignImg
:
''
,
date
:
''
,
flightNo
:
''
,
gpu
:
undefined
,
hanger
:
undefined
,
id
:
0
,
jackscrew
:
undefined
,
ladder
:
undefined
,
legs
:
''
,
material1
:
''
,
material2
:
''
,
material3
:
''
,
model
:
''
,
nickname
:
''
,
number1
:
undefined
,
number2
:
undefined
,
number3
:
undefined
,
oxygenCharging
:
undefined
,
powerTool
:
undefined
,
shockStrutCharging
:
undefined
,
station
:
''
,
tails
:
undefined
,
tireCharging
:
undefined
,
tools
:
undefined
,
tractor
:
undefined
,
username
:
''
,
work1
:
''
,
work2
:
''
,
work3
:
''
,
workingHours1
:
undefined
,
workingHours2
:
undefined
,
workingHours3
:
undefined
})
uni
.
$mocpMessage
.
success
(
res
.
message
)
uni
.
$mocpMessage
.
success
(
res
.
message
)
}
else
{
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
}
}
export
const
updateNonRoutineWork
=
async
()
=>
{
const
res
=
await
updateNonRoutineWorkApi
({
...
formData
,
qtgj
:
getQtgj
(
formData
.
qtgj
)
},
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$emit
(
'nonRoutineWorkReload'
)
uni
.
$mocpJump
.
navigateBack
(
2
)
resetData
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
export
const
resetData
=
()
=>
{
Object
.
assign
(
formData
,
{
acreg
:
''
,
acu
:
undefined
,
aircaraftoperator
:
''
,
asu
:
undefined
,
bjjkzyxs
:
undefined
,
bjjkzyzk
:
undefined
,
bjscpxs
:
undefined
,
bjscpzk
:
undefined
,
cdydq
:
undefined
,
cgydq
:
undefined
,
charger
:
undefined
,
cherryPicker
:
undefined
,
cy
:
undefined
,
createTime
:
''
,
createUser
:
undefined
,
customerSignImg
:
''
,
customerSignTime
:
''
,
cyfdlgjcs
:
''
,
cyfdlgjjh
:
''
,
cydlgjcs
:
''
,
cydlgjjh
:
''
,
date
:
Day
().
valueOf
(),
fbjjkzyxs
:
undefined
,
fbjjkzyzk
:
undefined
,
fbjscpxs
:
undefined
,
fbjscpzk
:
undefined
,
flightNo
:
''
,
flightNoIn
:
''
,
flightNoOut
:
''
,
gjcl
:
undefined
,
gpu
:
undefined
,
hanger
:
undefined
,
hlgj
:
undefined
,
hy
:
undefined
,
id
:
0
,
isDel
:
''
,
jackscrew
:
undefined
,
jgrygs
:
undefined
,
jsjd
:
undefined
,
jsqjd
:
undefined
,
ladder
:
undefined
,
legs
:
''
,
gkgzt
:
undefined
,
lzqjd
:
undefined
,
material1
:
''
,
material2
:
''
,
material3
:
''
,
model
:
''
,
ndtktsbjh
:
''
,
ndtktsbts
:
undefined
,
ndtrygs
:
undefined
,
nickname
:
''
,
number1
:
undefined
,
number2
:
undefined
,
number3
:
undefined
,
oxygenCharging
:
undefined
,
powerTool
:
undefined
,
ptgzt
:
undefined
,
qtgj
:
[],
qtxhp
:
undefined
,
shockStrutCharging
:
undefined
,
sjcptcc
:
undefined
,
sjcptcr
:
undefined
,
station
:
''
,
tails
:
undefined
,
tireCharging
:
undefined
,
tjpxs
:
undefined
,
tjpzk
:
undefined
,
tools
:
undefined
,
tractor
:
undefined
,
ttfj
:
undefined
,
updateTime
:
''
,
updateUser
:
undefined
,
username
:
''
,
work1
:
''
,
work2
:
''
,
work3
:
''
,
workingHours1
:
undefined
,
workingHours2
:
undefined
,
workingHours3
:
undefined
,
xbgkcc
:
undefined
,
xbgkcr
:
undefined
,
yyy
:
undefined
})
}
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/list.vue
View file @
9e518af4
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
}"
}"
>
>
<template
#
default=
"
{ item }">
<template
#
default=
"
{ item }">
<view
class=
"item"
>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<view
class=
"left"
>
<text
class=
"txt"
>
{{
item
.
acreg
}}
</text>
<text
class=
"txt"
>
{{
item
.
acreg
}}
</text>
...
@@ -45,9 +45,26 @@ import { noRoutineWorkListApi } from 'mocp/api/electronicBill'
...
@@ -45,9 +45,26 @@ import { noRoutineWorkListApi } from 'mocp/api/electronicBill'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
useBaseStore
from
'mocp/store/base'
import
useBaseStore
from
'mocp/store/base'
import
useUserStore
from
'mocp/store/user'
import
useUserStore
from
'mocp/store/user'
import
{
formData
}
from
'./constants/add.compositions'
import
{
onUnload
}
from
'@dcloudio/uni-app'
import
{
ref
}
from
'vue'
import
{
getQtgj
}
from
'./constants/sign.functionals'
const
baseStore
=
useBaseStore
()
const
baseStore
=
useBaseStore
()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
goDetails
=
(
data
)
=>
{
Object
.
assign
(
formData
,
data
)
formData
.
qtgj
=
getQtgj
(
formData
.
qtgj
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/electronicBill/nonRoutineWork/add'
)
}
//刷新
const
paging
=
ref
()
uni
.
$on
(
'nonRoutineWorkReload'
,
()
=>
{
paging
.
value
?.
reload
()
}
)
onUnload
(()
=>
{
uni
.
$off
(
'nonRoutineWorkReload'
)
}
)
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
@
import
'mocpStatic/css/list.scss'
;
@
import
'mocpStatic/css/list.scss'
;
...
...
src/pages/modules/mocp/panel/electronicBill/nonRoutineWork/sign.vue
View file @
9e518af4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
@
touchstart=
"touchStart"
@
touchstart=
"touchStart"
@
touchmove=
"touchMove"
@
touchmove=
"touchMove"
@
touchend=
"touchEnd"
@
touchend=
"touchEnd"
id=
"canvas"
/>
/>
</view>
</view>
<view
class=
"footer-btns"
>
<view
class=
"footer-btns"
>
...
@@ -24,7 +25,7 @@
...
@@ -24,7 +25,7 @@
</view>
</view>
<view
class=
"mocp-title"
>
用户签名预览
</view>
<view
class=
"mocp-title"
>
用户签名预览
</view>
<view
class=
"mocp-preview"
>
<view
class=
"mocp-preview"
>
<image
:src=
"canvasImage"
mode=
"widthFix"
:show-loading=
"true"
width=
"100%"
height=
"100%"
v-if=
"canvasImage"
></image>
<image
:src=
"canvasImage"
mode=
"widthFix"
:show-loading=
"true"
v-if=
"canvasImage"
></image>
</view>
</view>
</global-page>
</global-page>
</
template
>
</
template
>
...
@@ -33,9 +34,14 @@ import { useDrawSignature } from 'mocp/hooks/use-sign/useSign'
...
@@ -33,9 +34,14 @@ import { useDrawSignature } from 'mocp/hooks/use-sign/useSign'
import
{
canvasImage
}
from
'./constants/sign.compositions'
import
{
canvasImage
}
from
'./constants/sign.compositions'
import
{
handleSubmit
}
from
'./constants/sign.functionals'
import
{
handleSubmit
}
from
'./constants/sign.functionals'
import
{
formData
}
from
'./constants/add.compositions'
import
{
formData
}
from
'./constants/add.compositions'
import
{
on
BeforeUnmount
}
from
'vue
'
import
{
on
Load
}
from
'@dcloudio/uni-app
'
const
{
isSigned
,
touchStart
,
touchMove
,
touchEnd
,
clear
,
getPath
}
=
useDrawSignature
(
'canvas'
)
const
{
isSigned
,
touchStart
,
touchMove
,
touchEnd
,
clear
,
getPath
}
=
useDrawSignature
(
'canvas'
,
{
path
:
formData
.
customerSignImg
})
onLoad
(()
=>
{
canvasImage
.
value
=
formData
.
customerSignImg
})
//保存签名
//保存签名
const
handleSave
=
()
=>
{
const
handleSave
=
()
=>
{
if
(
isSigned
.
value
)
{
if
(
isSigned
.
value
)
{
...
@@ -52,10 +58,6 @@ const handleClear = () => {
...
@@ -52,10 +58,6 @@ const handleClear = () => {
canvasImage
.
value
=
''
canvasImage
.
value
=
''
clear
()
clear
()
}
}
onBeforeUnmount
(()
=>
{
handleClear
()
formData
.
customerSignImg
=
''
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.mocp-sign
,
.mocp-sign
,
...
@@ -67,6 +69,10 @@ onBeforeUnmount(() => {
...
@@ -67,6 +69,10 @@ onBeforeUnmount(() => {
.mocp-preview
{
.mocp-preview
{
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
uni-image
{
width
:
100%
;
height
:
100%
;
}
}
}
.mocp-title
{
.mocp-title
{
padding
:
24
rpx
0
;
padding
:
24
rpx
0
;
...
...
src/pages/modules/mocp/panel/electronicBill/routineWork/add.vue
View file @
9e518af4
<
template
>
<
template
>
<global-page
<global-page
title=
"新建例行维护工作单
"
:title=
"formData.id > 0 ? '编辑例行维护工作单' : '新建例行维护工作单'
"
:showNavRight=
"true"
:showNavRight=
"
formData.id > 0 ? false :
true"
navRightText=
"今天签单"
navRightText=
"今天签单"
@
handleRightClick=
"navigateTo('/panel/electronicBill/routineWork/list')"
@
handleRightClick=
"navigateTo('/panel/electronicBill/routineWork/list')"
showFooterBtn
showFooterBtn
...
@@ -18,49 +18,70 @@
...
@@ -18,49 +18,70 @@
<global-date
pickAlign=
"right"
clearable
v-model=
"formData.date"
defaultToday
></global-date>
<global-date
pickAlign=
"right"
clearable
v-model=
"formData.date"
defaultToday
></global-date>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机号"
prop=
"acreg"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机号"
prop=
"acreg"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.acreg"
:options=
"allAc"
clearable
filter
@
change=
"changeAcreg"
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.acreg"
:options=
"allAc"
clearable
filter
customize
@
change=
"changeAcreg"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"飞机所属单位"
prop=
"aircaraftoperator"
:borderBottom=
"true"
required
>
<up-form-item
label=
"飞机所属单位"
prop=
"aircaraftoperator"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.aircaraftoperator"
:options=
"allAirline"
clearable
filter
></global-picker>
<global-picker
pickAlign=
"right"
v-model=
"formData.aircaraftoperator"
:options=
"allAirline"
clearable
filter
customize
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机型"
prop=
"model"
:borderBottom=
"true"
required
>
<up-form-item
label=
"机型"
prop=
"model"
:borderBottom=
"true"
required
>
<global-picker
v-model=
"formData.model"
pickAlign=
"right"
:options=
"allAcType"
clearable
filter
></global-picker>
<global-picker
v-model=
"formData.model"
pickAlign=
"right"
:options=
"allAcType"
clearable
filter
customize
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"进港航班号"
prop=
"flightNoIn"
:borderBottom=
"true"
required
>
<up-form-item
label=
"进港航班号"
prop=
"flightNoIn"
:borderBottom=
"true"
required
>
<up-input
v-model=
"formData.flightNoIn"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
<up-input
v-model=
"formData.flightNoIn"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
</up-form-item>
</up-form-item>
<up-form-item
label=
"出港航班号"
prop=
"flightNoOut"
:borderBottom=
"true"
>
<up-form-item
label=
"出港航班号"
prop=
"flightNoOut"
:borderBottom=
"true"
required
>
<up-input
v-model=
"formData.flightNoOut"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
<up-input
v-model=
"formData.flightNoOut"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
</up-form-item>
</up-form-item>
<up-form-item
label=
"航段"
prop=
"legs"
:borderBottom=
"true"
>
<up-form-item
label=
"航段"
prop=
"legs"
:borderBottom=
"true"
required
>
<up-input
v-model=
"formData.legs"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
<up-input
v-model=
"formData.legs"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
></up-input>
</up-form-item>
</up-form-item>
</view>
</view>
<view
class=
"mocp-title"
>
过站维护TR
</view>
<view
class=
"mocp-title"
>
过站维护TR
</view>
<view
class=
"mocp-form"
>
<view
class=
"mocp-form"
>
<up-form-item
label=
"过站TR"
prop=
"tr"
:borderBottom=
"true"
>
<up-form-item
label=
"过站
维护
TR"
prop=
"tr"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.tr"
switchAlign=
"right"
></global-switch>
<global-switch
v-model=
"formData.tr"
switchAlign=
"right"
:disabled=
"formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
</up-form-item>
<up-form-item
label=
"一般勤务"
prop=
"serviceTr"
:borderBottom=
"true"
>
<up-form-item
label=
"一般勤务"
prop=
"serviceTr"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.serviceTr"
switchAlign=
"right"
></global-switch>
<global-switch
v-model=
"formData.serviceTr"
switchAlign=
"right"
:disabled=
"formData.tr == '1' || formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
<up-form-item
label=
"例行检查"
prop=
"routineInspection"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.routineInspection"
switchAlign=
"right"
:disabled=
"formData.tr == '1' || formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
<up-form-item
label=
"飞机放行"
prop=
"fly"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.fly"
switchAlign=
"right"
:disabled=
"formData.tr == '1' || formData.overnightAfPf == '1'"
></global-switch>
</up-form-item>
</up-form-item>
</view>
</view>
<view
class=
"mocp-title"
>
航前维护
PF
</view>
<view
class=
"mocp-title"
>
过夜维护AF+
PF
</view>
<view
class=
"mocp-form"
>
<view
class=
"mocp-form"
>
<up-form-item
label=
"航前PR"
prop=
"pf"
:borderBottom=
"true"
>
<up-form-item
label=
"过夜维护AF+PF"
prop=
"overnightAfPf"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.pf"
switchAlign=
"right"
></global-switch>
<global-switch
v-model=
"formData.overnightAfPf"
switchAlign=
"right"
></global-switch>
</up-form-item>
<up-form-item
label=
"一般勤务"
prop=
"servicePf"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.servicePf"
switchAlign=
"right"
></global-switch>
</up-form-item>
</view>
<view
class=
"mocp-title"
>
航后维护AF
</view>
<view
class=
"mocp-form"
>
<up-form-item
label=
"航后AF"
prop=
"af"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.af"
switchAlign=
"right"
></global-switch>
</up-form-item>
<up-form-item
label=
"一般勤务"
prop=
"serviceAf"
:borderBottom=
"true"
>
<global-switch
v-model=
"formData.serviceAf"
switchAlign=
"right"
></global-switch>
</up-form-item>
</up-form-item>
</view>
</view>
<view
class=
"mocp-title"
>
设备使用记录
</view>
<view
class=
"mocp-title"
>
设备使用记录
</view>
...
@@ -107,9 +128,10 @@
...
@@ -107,9 +128,10 @@
import
useElectronicBillStore
from
'mocp/store/electronicBill'
import
useElectronicBillStore
from
'mocp/store/electronicBill'
import
{
formData
,
rules
}
from
'./constants/add.compositions'
import
{
formData
,
rules
}
from
'./constants/add.compositions'
import
{
navigateTo
}
from
'mocp/utils/jump'
import
{
navigateTo
}
from
'mocp/utils/jump'
import
{
ref
}
from
'vue'
import
{
onUnmounted
,
ref
,
watchEffect
}
from
'vue'
import
{
changeAcreg
}
from
'./constants/add.functionals'
import
{
changeAcreg
}
from
'./constants/add.functionals'
import
{
getTerminalSelect
}
from
'mocp/utils/permission'
import
{
getTerminalSelect
}
from
'mocp/utils/permission'
import
{
resetData
}
from
'./constants/sign.functionals'
const
electronicBillStore
=
useElectronicBillStore
()
const
electronicBillStore
=
useElectronicBillStore
()
const
{
const
{
...
@@ -121,6 +143,22 @@ const handleFooterClick = async () => {
...
@@ -121,6 +143,22 @@ const handleFooterClick = async () => {
await
formRef
.
value
?.
validate
()
await
formRef
.
value
?.
validate
()
navigateTo
(
'/panel/electronicBill/routineWork/sign'
)
navigateTo
(
'/panel/electronicBill/routineWork/sign'
)
}
}
watchEffect
(()
=>
{
if
(
formData
.
tr
==
'1'
)
{
formData
.
serviceTr
=
'0'
formData
.
routineInspection
=
'0'
formData
.
fly
=
'0'
}
if
(
formData
.
overnightAfPf
==
'1'
)
{
formData
.
tr
=
'0'
formData
.
serviceTr
=
'0'
formData
.
routineInspection
=
'0'
formData
.
fly
=
'0'
}
})
onUnmounted
(()
=>
{
resetData
()
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.mocp-form
{
.mocp-form
{
...
...
src/pages/modules/mocp/panel/electronicBill/routineWork/constants/add.compositions.js
View file @
9e518af4
...
@@ -2,13 +2,13 @@ import { reactive } from 'vue'
...
@@ -2,13 +2,13 @@ import { reactive } from 'vue'
export
const
formData
=
reactive
({
export
const
formData
=
reactive
({
acreg
:
''
,
acreg
:
''
,
af
:
0
,
af
:
'0'
,
airConditioning
:
undefined
,
airConditioning
:
undefined
,
airStarter
:
undefined
,
airStarter
:
undefined
,
aircaraftoperator
:
''
,
aircaraftoperator
:
''
,
customerSignImg
:
''
,
customerSignImg
:
''
,
date
:
''
,
date
:
''
,
diversion
:
0
,
diversion
:
'0'
,
flightNoIn
:
''
,
flightNoIn
:
''
,
flightNoOut
:
''
,
flightNoOut
:
''
,
groundPower
:
undefined
,
groundPower
:
undefined
,
...
@@ -16,19 +16,22 @@ export const formData = reactive({
...
@@ -16,19 +16,22 @@ export const formData = reactive({
legs
:
''
,
legs
:
''
,
model
:
''
,
model
:
''
,
nickname
:
''
,
nickname
:
''
,
onCall
:
0
,
onCall
:
'0'
,
others1
:
''
,
others1
:
''
,
others2
:
''
,
others2
:
''
,
pf
:
0
,
pf
:
'0'
,
remark
:
''
,
remark
:
''
,
returnFlight
:
0
,
returnFlight
:
'0'
,
serviceAf
:
0
,
serviceAf
:
'0'
,
servicePf
:
0
,
servicePf
:
'0'
,
serviceTr
:
0
,
serviceTr
:
'0'
,
station
:
''
,
station
:
''
,
towPus
:
undefined
,
towPus
:
undefined
,
tr
:
1
,
tr
:
'0'
,
username
:
''
username
:
''
,
routineInspection
:
'0'
,
fly
:
'0'
,
overnightAfPf
:
'0'
})
})
export
const
rules
=
reactive
({
export
const
rules
=
reactive
({
...
@@ -74,5 +77,19 @@ export const rules = reactive({
...
@@ -74,5 +77,19 @@ export const rules = reactive({
message
:
'请选择进港航班号'
,
message
:
'请选择进港航班号'
,
trigger
:
[
'blur'
,
'change'
]
trigger
:
[
'blur'
,
'change'
]
}
}
],
flightNoOut
:
[
{
required
:
true
,
message
:
'请输入出港航班号'
,
trigger
:
[
'blur'
,
'change'
]
}
],
legs
:
[
{
required
:
true
,
message
:
'请输入航段'
,
trigger
:
[
'blur'
,
'change'
]
}
]
]
})
})
src/pages/modules/mocp/panel/electronicBill/routineWork/constants/sign.compositions.js
View file @
9e518af4
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
export
const
canvasImage
=
ref
(
''
)
export
const
canvasImage
=
ref
(
''
)
export
const
showConfirm
=
ref
(
false
)
src/pages/modules/mocp/panel/electronicBill/routineWork/constants/sign.functionals.js
View file @
9e518af4
import
{
upload
}
from
'mocp/utils/http'
import
{
upload
}
from
'mocp/utils/http'
import
{
canvasImage
}
from
'./sign.compositions'
import
{
canvasImage
,
showConfirm
}
from
'./sign.compositions'
import
{
formData
}
from
'./add.compositions'
import
{
formData
}
from
'./add.compositions'
import
{
addRoutineWorkApi
}
from
'mocp/api/electronicBill'
import
{
addRoutineWorkApi
,
routineWorkCheckRepeatApi
,
updateRoutineWorkApi
}
from
'mocp/api/electronicBill'
import
{
isBase64Image
,
timeStampFormat
}
from
'mocp/utils/tool'
import
Day
from
'mocp/utils/dayjs'
export
const
handleSubmit
=
async
()
=>
{
export
const
handleSubmit
=
async
()
=>
{
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -9,14 +11,38 @@ export const handleSubmit = async () => {
...
@@ -9,14 +11,38 @@ export const handleSubmit = async () => {
mask
:
true
mask
:
true
})
})
try
{
try
{
await
uploadFile
()
if
(
isBase64Image
(
formData
.
customerSignImg
))
{
await
addRoutineWork
()
await
uploadFile
()
}
if
(
formData
.
id
>
0
)
{
await
updateRoutineWork
()
}
else
{
await
addRoutineWork
()
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
console
.
error
(
error
)
}
finally
{
}
finally
{
uni
.
hideLoading
()
uni
.
hideLoading
()
}
}
}
}
export
const
routineWorkCheckRepeat
=
async
()
=>
{
0
const
params
=
{
acreg
:
formData
.
acreg
,
date
:
timeStampFormat
(
formData
.
date
,
{
format
:
'YYYY-MM-DD'
}),
id
:
formData
.
id
}
const
res
=
await
routineWorkCheckRepeatApi
(
params
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
if
(
res
.
data
>
0
)
{
showConfirm
.
value
=
true
}
else
{
handleSubmit
()
}
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
export
const
uploadFile
=
async
()
=>
{
export
const
uploadFile
=
async
()
=>
{
const
res
=
await
upload
({
url
:
'/resource/uploadFile'
,
filePath
:
canvasImage
.
value
,
name
:
'file'
})
const
res
=
await
upload
({
url
:
'/resource/uploadFile'
,
filePath
:
canvasImage
.
value
,
name
:
'file'
})
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
...
@@ -28,39 +54,58 @@ export const uploadFile = async () => {
...
@@ -28,39 +54,58 @@ export const uploadFile = async () => {
export
const
addRoutineWork
=
async
()
=>
{
export
const
addRoutineWork
=
async
()
=>
{
const
res
=
await
addRoutineWorkApi
(
formData
,
{
loading
:
true
})
const
res
=
await
addRoutineWorkApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$emit
(
'routineWorkReload'
)
Object
.
assign
(
formData
,
{
uni
.
$mocpJump
.
navigateBack
(
2
)
acreg
:
''
,
resetData
()
af
:
0
,
uni
.
$mocpMessage
.
success
(
res
.
message
)
airConditioning
:
undefined
,
}
else
{
airStarter
:
undefined
,
uni
.
$mocpMessage
.
error
(
res
.
message
)
aircaraftoperator
:
''
,
}
customerSignImg
:
''
,
}
date
:
''
,
export
const
updateRoutineWork
=
async
()
=>
{
diversion
:
0
,
const
res
=
await
updateRoutineWorkApi
(
formData
,
{
loading
:
true
})
flightNoIn
:
''
,
if
(
res
.
code
==
200
)
{
flightNoOut
:
''
,
uni
.
$emit
(
'routineWorkReload'
)
groundPower
:
undefined
,
uni
.
$mocpJump
.
navigateBack
(
2
)
id
:
0
,
resetData
()
legs
:
''
,
model
:
''
,
nickname
:
''
,
onCall
:
0
,
others1
:
''
,
others2
:
''
,
pf
:
0
,
remark
:
''
,
returnFlight
:
0
,
serviceAf
:
0
,
servicePf
:
0
,
serviceTr
:
0
,
station
:
''
,
towPus
:
undefined
,
tr
:
1
,
username
:
''
})
uni
.
$mocpMessage
.
success
(
res
.
message
)
uni
.
$mocpMessage
.
success
(
res
.
message
)
}
else
{
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
}
}
export
const
resetData
=
()
=>
{
showConfirm
.
value
=
false
Object
.
assign
(
formData
,
{
acreg
:
''
,
af
:
'0'
,
airConditioning
:
undefined
,
airStarter
:
undefined
,
aircaraftoperator
:
''
,
customerSignImg
:
''
,
date
:
Day
().
valueOf
(),
diversion
:
'0'
,
flightNoIn
:
''
,
flightNoOut
:
''
,
groundPower
:
undefined
,
id
:
0
,
legs
:
''
,
model
:
''
,
nickname
:
''
,
onCall
:
'0'
,
others1
:
''
,
others2
:
''
,
pf
:
'0'
,
remark
:
''
,
returnFlight
:
'0'
,
serviceAf
:
'0'
,
servicePf
:
'0'
,
serviceTr
:
'0'
,
station
:
''
,
towPus
:
undefined
,
tr
:
'0'
,
username
:
''
,
routineInspection
:
'0'
,
fly
:
'0'
,
overnightAfPf
:
'0'
})
}
src/pages/modules/mocp/panel/electronicBill/routineWork/list.vue
View file @
9e518af4
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
}"
}"
>
>
<template
#
default=
"
{ item }">
<template
#
default=
"
{ item }">
<view
class=
"item"
>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<view
class=
"left"
>
<text
class=
"txt"
>
{{
item
.
acreg
}}
</text>
<text
class=
"txt"
>
{{
item
.
acreg
}}
</text>
...
@@ -23,9 +23,10 @@
...
@@ -23,9 +23,10 @@
<text
class=
"txt"
>
{{
baseStore
.
getTerminalObject
[
item
.
station
]
}}
</text>
<text
class=
"txt"
>
{{
baseStore
.
getTerminalObject
[
item
.
station
]
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"item-content
u-line-3
"
>
<view
class=
"item-content"
>
<text
class=
"txt"
>
{{
item
.
aircaraftoperator
}}
</text>
<text
class=
"txt"
>
{{
item
.
aircaraftoperator
}}
</text>
<text
class=
"txt"
>
{{
item
.
model
}}
</text>
<text
class=
"txt"
>
{{
item
.
model
}}
</text>
<text
class=
"txt"
>
{{
item
.
overnightAfPf
==
'1'
?
'过夜维护AF+PF'
:
''
}}
</text>
</view>
</view>
<view
class=
"item-footer"
>
<view
class=
"item-footer"
>
<view
class=
"label"
>
<view
class=
"label"
>
...
@@ -45,9 +46,24 @@ import { routineWorkListApi } from 'mocp/api/electronicBill'
...
@@ -45,9 +46,24 @@ import { routineWorkListApi } from 'mocp/api/electronicBill'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
useBaseStore
from
'mocp/store/base'
import
useBaseStore
from
'mocp/store/base'
import
useUserStore
from
'mocp/store/user'
import
useUserStore
from
'mocp/store/user'
import
{
formData
}
from
'./constants/add.compositions'
import
{
ref
}
from
'vue'
import
{
onUnload
}
from
'@dcloudio/uni-app'
const
baseStore
=
useBaseStore
()
const
baseStore
=
useBaseStore
()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
goDetails
=
(
data
)
=>
{
Object
.
assign
(
formData
,
data
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/electronicBill/routineWork/add'
)
}
//刷新
const
paging
=
ref
()
uni
.
$on
(
'routineWorkReload'
,
()
=>
{
paging
.
value
?.
reload
()
}
)
onUnload
(()
=>
{
uni
.
$off
(
'routineWorkReload'
)
}
)
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
@
import
'mocpStatic/css/list.scss'
;
@
import
'mocpStatic/css/list.scss'
;
...
...
src/pages/modules/mocp/panel/electronicBill/routineWork/sign.vue
View file @
9e518af4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
@
touchstart=
"touchStart"
@
touchstart=
"touchStart"
@
touchmove=
"touchMove"
@
touchmove=
"touchMove"
@
touchend=
"touchEnd"
@
touchend=
"touchEnd"
id=
"canvas"
/>
/>
</view>
</view>
<view
class=
"footer-btns"
>
<view
class=
"footer-btns"
>
...
@@ -16,7 +17,7 @@
...
@@ -16,7 +17,7 @@
<global-button
type=
"primary"
size=
"large"
:radius=
"5"
@
tap=
"handleSave"
>
保存签名
</global-button>
<global-button
type=
"primary"
size=
"large"
:radius=
"5"
@
tap=
"handleSave"
>
保存签名
</global-button>
</view>
</view>
<view
class=
"footer-btn"
>
<view
class=
"footer-btn"
>
<global-button
type=
"primary"
size=
"large"
:radius=
"5"
@
tap=
"
handleSubmi
t"
:disabled=
"!canvasImage"
>
保存单据
</global-button>
<global-button
type=
"primary"
size=
"large"
:radius=
"5"
@
tap=
"
routineWorkCheckRepea
t"
:disabled=
"!canvasImage"
>
保存单据
</global-button>
</view>
</view>
<view
class=
"footer-btn"
>
<view
class=
"footer-btn"
>
<global-button
type=
"primary"
plain
size=
"large"
:radius=
"5"
@
tap=
"handleClear"
>
重新签名
</global-button>
<global-button
type=
"primary"
plain
size=
"large"
:radius=
"5"
@
tap=
"handleClear"
>
重新签名
</global-button>
...
@@ -24,18 +25,33 @@
...
@@ -24,18 +25,33 @@
</view>
</view>
<view
class=
"mocp-title"
>
用户签名预览
</view>
<view
class=
"mocp-title"
>
用户签名预览
</view>
<view
class=
"mocp-preview"
>
<view
class=
"mocp-preview"
>
<image
:src=
"canvasImage"
mode=
"widthFix"
:show-loading=
"true"
width=
"100%"
height=
"100%"
v-if=
"canvasImage"
></image>
<image
:src=
"canvasImage"
mode=
"widthFix"
:show-loading=
"true"
v-if=
"canvasImage"
></image>
</view>
</view>
<up-modal
title=
"单据重复"
content=
"系统检测到今日已有过夜数据,是否继续提交?"
:show=
"showConfirm"
showCancelButton
closeOnClickOverlay
@
confirm=
"handleSubmit"
@
cancel=
"showConfirm = false"
@
close=
"showConfirm = false"
></up-modal>
</global-page>
</global-page>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
useDrawSignature
}
from
'mocp/hooks/use-sign/useSign'
import
{
useDrawSignature
}
from
'mocp/hooks/use-sign/useSign'
import
{
canvasImage
}
from
'./constants/sign.compositions'
import
{
canvasImage
,
showConfirm
}
from
'./constants/sign.compositions'
import
{
handleSubmit
}
from
'./constants/sign.functionals'
import
{
handleSubmit
,
routineWorkCheckRepeat
}
from
'./constants/sign.functionals'
import
{
formData
}
from
'./constants/add.compositions'
import
{
formData
}
from
'./constants/add.compositions'
import
{
on
BeforeUnmount
}
from
'vue
'
import
{
on
Load
}
from
'@dcloudio/uni-app
'
const
{
isSigned
,
touchStart
,
touchMove
,
touchEnd
,
clear
,
getPath
}
=
useDrawSignature
(
'canvas'
)
const
{
isSigned
,
touchStart
,
touchMove
,
touchEnd
,
clear
,
getPath
}
=
useDrawSignature
(
'canvas'
,
{
path
:
formData
.
customerSignImg
})
onLoad
(()
=>
{
canvasImage
.
value
=
formData
.
customerSignImg
})
//保存签名
//保存签名
const
handleSave
=
()
=>
{
const
handleSave
=
()
=>
{
if
(
isSigned
.
value
)
{
if
(
isSigned
.
value
)
{
...
@@ -52,10 +68,6 @@ const handleClear = () => {
...
@@ -52,10 +68,6 @@ const handleClear = () => {
canvasImage
.
value
=
''
canvasImage
.
value
=
''
clear
()
clear
()
}
}
onBeforeUnmount
(()
=>
{
handleClear
()
formData
.
customerSignImg
=
''
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.mocp-sign
,
.mocp-sign
,
...
@@ -67,6 +79,10 @@ onBeforeUnmount(() => {
...
@@ -67,6 +79,10 @@ onBeforeUnmount(() => {
.mocp-preview
{
.mocp-preview
{
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
uni-image
{
width
:
100%
;
height
:
100%
;
}
}
}
.mocp-title
{
.mocp-title
{
padding
:
24
rpx
0
;
padding
:
24
rpx
0
;
...
...
src/pages/modules/mocp/panel/unplanApply/add.vue
View file @
9e518af4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<global-page
title=
"新增非计划申请"
showFooterBtn
footerBtnText=
"提交"
@
handleFooterClick=
"handleFooterClick"
>
<global-page
title=
"新增非计划申请"
showFooterBtn
footerBtnText=
"提交"
@
handleFooterClick=
"handleFooterClick"
>
<view
class=
"mocp-form"
>
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
:model=
"formData"
:rules=
"rules"
ref=
"formRef"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
:model=
"formData"
:rules=
"rules"
ref=
"formRef"
>
<up-form-item
label=
"工作包号"
prop=
"packageNo"
:borderBottom=
"true"
required
>
<up-form-item
label=
"工作包
编
号"
prop=
"packageNo"
:borderBottom=
"true"
required
>
<up-input
<up-input
v-model=
"formData.packageNo"
v-model=
"formData.packageNo"
border=
"none"
border=
"none"
...
...
src/pages/modules/mocp/panel/unplanApply/constants/add.compositions.js
View file @
9e518af4
...
@@ -6,7 +6,7 @@ export const rules = reactive({
...
@@ -6,7 +6,7 @@ export const rules = reactive({
packageNo
:
[
packageNo
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请输入工作包号'
,
message
:
'请输入工作包
编
号'
,
trigger
:
[
'blur'
,
'change'
]
trigger
:
[
'blur'
,
'change'
]
}
}
],
],
...
...
src/pages/modules/mocp/panel/unplanApply/details.vue
View file @
9e518af4
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</
template
>
</
template
>
</up-cell>
</up-cell>
<up-cell
title=
"数据来源"
:value=
"useGetDictByValue('np_sourceType', details.sourceType)"
></up-cell>
<up-cell
title=
"数据来源"
:value=
"useGetDictByValue('np_sourceType', details.sourceType)"
></up-cell>
<up-cell
title=
"工作包号"
:value=
"details.packageNo || '-'"
></up-cell>
<up-cell
title=
"工作包
编
号"
:value=
"details.packageNo || '-'"
></up-cell>
<up-cell
title=
"工作包名称"
:value=
"details.packageName || '-'"
></up-cell>
<up-cell
title=
"工作包名称"
:value=
"details.packageName || '-'"
></up-cell>
<up-cell
title=
"计划开始时间"
:value=
"timeStampFormat(details.startTime) || '-'"
></up-cell>
<up-cell
title=
"计划开始时间"
:value=
"timeStampFormat(details.startTime) || '-'"
></up-cell>
<up-cell
title=
"计划结束时间"
:value=
"timeStampFormat(details.endTime) || '-'"
></up-cell>
<up-cell
title=
"计划结束时间"
:value=
"timeStampFormat(details.endTime) || '-'"
></up-cell>
...
...
src/pages/modules/mocp/panel/unplanWarning/add.vue
View file @
9e518af4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<global-page
title=
"新增非计划预警"
showFooterBtn
footerBtnText=
"提交"
@
handleFooterClick=
"handleFooterClick"
>
<global-page
title=
"新增非计划预警"
showFooterBtn
footerBtnText=
"提交"
@
handleFooterClick=
"handleFooterClick"
>
<view
class=
"mocp-form"
>
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
:model=
"formData"
:rules=
"rules"
ref=
"formRef"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
:model=
"formData"
:rules=
"rules"
ref=
"formRef"
>
<up-form-item
label=
"工作包号"
prop=
"packageNo"
:borderBottom=
"true"
required
>
<up-form-item
label=
"工作包
编
号"
prop=
"packageNo"
:borderBottom=
"true"
required
>
<up-input
<up-input
v-model=
"formData.packageNo"
v-model=
"formData.packageNo"
border=
"none"
border=
"none"
...
...
src/pages/modules/mocp/panel/unplanWarning/constants/add.compositions.js
View file @
9e518af4
...
@@ -6,7 +6,7 @@ export const rules = reactive({
...
@@ -6,7 +6,7 @@ export const rules = reactive({
packageNo
:
[
packageNo
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请输入工作包号'
,
message
:
'请输入工作包
编
号'
,
trigger
:
[
'blur'
,
'change'
]
trigger
:
[
'blur'
,
'change'
]
}
}
],
],
...
...
src/pages/modules/mocp/panel/unplanWarning/details.vue
View file @
9e518af4
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</
template
>
</
template
>
</up-cell>
</up-cell>
<up-cell
title=
"数据来源"
:value=
"useGetDictByValue('np_sourceType', details.sourceType)"
></up-cell>
<up-cell
title=
"数据来源"
:value=
"useGetDictByValue('np_sourceType', details.sourceType)"
></up-cell>
<up-cell
title=
"工作包号"
:value=
"details.packageNo || '-'"
></up-cell>
<up-cell
title=
"工作包
编
号"
:value=
"details.packageNo || '-'"
></up-cell>
<up-cell
title=
"工作包名称"
:value=
"details.packageName || '-'"
></up-cell>
<up-cell
title=
"工作包名称"
:value=
"details.packageName || '-'"
></up-cell>
<up-cell
title=
"计划开始时间"
:value=
"timeStampFormat(details.startTime) || '-'"
></up-cell>
<up-cell
title=
"计划开始时间"
:value=
"timeStampFormat(details.startTime) || '-'"
></up-cell>
<up-cell
title=
"计划结束时间"
:value=
"timeStampFormat(details.endTime) || '-'"
></up-cell>
<up-cell
title=
"计划结束时间"
:value=
"timeStampFormat(details.endTime) || '-'"
></up-cell>
...
...
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