Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electricVehicle-backend
Project
Project
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
张宗旭
electricVehicle-backend
Commits
67470005
Commit
67470005
authored
Aug 26, 2025
by
张宗旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
3f76ebf7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
872 additions
and
191 deletions
+872
-191
constant.js
src/libs/common/constant.js
+91
-12
routes.js
src/router/routes.js
+29
-4
index.vue
src/views/customer/details/index.vue
+202
-0
index.vue
src/views/customer/list/index.vue
+67
-79
index.vue
src/views/product/add/index.vue
+3
-0
index.vue
src/views/product/list/index.vue
+2
-2
index.vue
src/views/purchaseOrder/add/index.vue
+111
-37
index.vue
src/views/purchaseOrder/details/index.vue
+231
-0
index.vue
src/views/purchaseOrder/purchaseOrderList/index.vue
+136
-57
No files found.
src/libs/common/constant.js
View file @
67470005
...
...
@@ -14,15 +14,31 @@ export const uploadImg = {
url
:
'/api/upload/one/path'
}
// 客户
// 客户列表
// 客户列表 搜索
export
const
getCustomerList
=
{
url
:
''
url
:
'
/api/customer/find/all/page
'
}
// 新增客户
export
const
addCustomer
=
{
url
:
'/api/customer/insert'
}
// 获取 一条 客户
export
const
getOneCustomer
=
{
url
:
'/api/customer/get/one/openId/'
}
// 停用 客户
export
const
disablesCustomer
=
{
url
:
'/api/customer/disables/'
}
// 启用 客户
export
const
enableCustomer
=
{
url
:
'/api/customer/enable/'
}
// 获取 所有 客户 名称
export
const
getCustomerName
=
{
url
:
'/api/customer/get/all/name'
}
// 产品
// 产品 列表
export
const
getProduct
=
{
...
...
@@ -42,10 +58,70 @@ export const editProduct = {
}
// 采购单
// 搜索 采购单
export
const
getAllOrder
=
{
export
const
purchaseOrderFind
=
{
url
:
'/api/purchase/order/find/page'
}
// 新增 采购单
export
const
addPurchaseOrder
=
{
url
:
'/api/purchase/order/insert'
}
// 采购单 详情
export
const
getOneOrderNum
=
{
url
:
'/api/purchase/order/get/one/orderNum/'
}
// 禁用 采购单下所有车辆
export
const
purchaseOrderDisableCar
=
{
url
:
'/api/purchase/order/disable/car/'
}
// 启用 采购单下所有车辆
export
const
purchaseOrderEnableCar
=
{
url
:
'/api/purchase/order/enable/car/'
}
// 作废 采购单
export
const
purchaseOrderDelete
=
{
url
:
'/api/purchase/order/delete/'
}
// 供应商
// 新增供应商
export
const
addBusiness
=
{
url
:
'/api/company/insert/supplier'
}
// 修改 供应商
export
const
modiyBusiness
=
{
url
:
'/api/company/update/supplier'
}
// 获取 供应商 列表
export
const
getBusinessList
=
{
url
:
'/api/company/get/supplier/all/page'
}
// 获取 供应商 详情
export
const
getBusiness
=
{
url
:
'/api/company/get/supplier/openId/'
}
// 获取 供应商 商家介绍
export
const
getBusinessInit
=
{
url
:
'/api/company/get/supplier/introduce/'
}
// 获取 供应商 宣传图片
export
const
getBusinessImg
=
{
url
:
'/api/company/get/supplier/brochure/image/'
}
// 获取 供应商 套餐订餐截止时间
export
const
getBusinessSupplierDeadline
=
{
url
:
'/api/company/get/supplier/deadline/'
}
// 修改 供应商 密码
export
const
modifyPws
=
{
url
:
'/api/company/update/supplier/password'
}
// 禁用 供应商
export
const
disableBusiness
=
{
url
:
'/api/company/disable/supplier'
}
// 启用 供应商
export
const
enableBusiness
=
{
url
:
'/api/company/enable/supplier'
}
// 常量
// 客户 性质
export
const
getCustomerNature
=
{
...
...
@@ -59,15 +135,19 @@ export const getCustomerType = {
export
const
getProductType
=
{
url
:
'/constant/get/product/type'
}
//
通过 产品类型 获取 产品型号
export
const
get
AllModel
=
{
url
:
'/
api/product/get/all/model/
'
//
客户 账户 状态
export
const
get
CustomerState
=
{
url
:
'/
constant/get/customer/state
'
}
// 付费 模式
export
const
getPaymentModel
=
{
export
const
getP
urchaseOrderP
aymentModel
=
{
url
:
'/constant/get/purchaseOrder/paymentModel'
}
// 生产 状态
export
const
get
p
roductionState
=
{
export
const
get
PurchaseOrderP
roductionState
=
{
url
:
'/constant/get/purchaseOrder/productionState'
}
\ No newline at end of file
}
// 根据产品类型 获取 产品型号
export
const
getAllModel
=
{
url
:
'/api/product/get/all/model/'
}
src/router/routes.js
View file @
67470005
...
...
@@ -44,6 +44,17 @@ const frameIn = [
},
component
:
_import
(
'customer/add/index'
)
},
// 客户 详情
{
path
:
'customerDetails/:id'
,
name
:
'customerDetails/:id'
,
meta
:
{
title
:
'客户详情'
,
auth
:
true
},
component
:
_import
(
'customer/details/index'
)
},
// 产品
// 添加 产品
{
...
...
@@ -88,12 +99,12 @@ const frameIn = [
auth
:
true
},
component
:
_import
(
'purchaseOrder/
l
ist/index'
)
component
:
_import
(
'purchaseOrder/
purchaseOrderL
ist/index'
)
},
// 添加
采购单
// 添加采购单
{
path
:
'add
P
urchaseOrder'
,
name
:
'add
P
urchaseOrder'
,
path
:
'add
p
urchaseOrder'
,
name
:
'add
p
urchaseOrder'
,
meta
:
{
title
:
'添加采购单'
,
auth
:
true
...
...
@@ -101,6 +112,19 @@ const frameIn = [
},
component
:
_import
(
'purchaseOrder/add/index'
)
},
// 采购单 详情
{
path
:
'purchaseOrderDetails/:id'
,
name
:
'purchaseOrderDetails/:id'
,
meta
:
{
title
:
'采购单详情'
,
auth
:
true
},
component
:
_import
(
'purchaseOrder/details/index'
)
},
// 商家 列表
{
path
:
'businessList'
,
...
...
@@ -132,6 +156,7 @@ const frameIn = [
},
component
:
_import
(
'business/add/index'
)
},
//
// 详情
{
path
:
'detailsBusiness/:id'
,
...
...
src/views/customer/details/index.vue
0 → 100644
View file @
67470005
<
template
>
<d2-container
v-loading=
"isLoading"
>
<div>
<div
class=
"providerOrderList-container"
>
<div
class=
"d-f-j"
style=
"background: #f2f3f5"
>
<div>
<div
class=
"name"
>
基本信息
</div>
</div>
<!--
<div
class=
"name modify"
@
click=
"basicModiy()"
>
修改
</div>
-->
</div>
</div>
<div
class=
"df"
style=
"margin-top: 20px"
>
<div
class=
"df left"
>
<div>
客户名称:
</div>
<div>
{{
datas
.
name
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
机构编码:
</div>
<div>
{{
datas
.
coding
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
商家类型:
</div>
<div>
{{
datas
.
typeValue
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
商家性质:
</div>
<div>
{{
datas
.
natureValue
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
联系人:
</div>
<div>
{{
datas
.
contact
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
联系电话:
</div>
<div>
{{
datas
.
contactPhone
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
所在城市:
</div>
<div>
{{
datas
.
provinceName
}}{{
datas
.
cityName
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
联系邮箱:
</div>
<div>
{{
datas
.
email
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
状态:
</div>
<div>
{{
datas
.
stateValue
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
创建时间:
</div>
<div>
{{
datas
.
createTime
}}
</div>
</div>
</div>
</div>
</d2-container>
</
template
>
<
script
>
import
{
getOneCustomer
,
modifyPws
}
from
"@/libs/common/constant"
;
export
default
{
data
()
{
return
{
isLoading
:
false
,
datas
:
{},
isShow
:
true
,
lunchTime
:
""
,
dinnerTime
:
""
,
imge
:
""
,
openId
:
this
.
$route
.
params
.
id
,
isShowImage
:
false
,
img
:
""
,
isModifyPassword
:
false
,
};
},
async
created
()
{
await
this
.
getData
();
},
methods
:
{
async
getData
()
{
this
.
isLoading
=
true
;
await
this
.
getOneCustomer
(
this
.
openId
);
},
async
getOneCustomer
(
openId
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getOneCustomer
.
url
}${
openId
}
`
);
this
.
datas
=
res
this
.
isLoading
=
false
;
console
.
log
(
res
,
"11"
);
},
lookImage
(
type
)
{
console
.
log
(
type
);
if
(
type
==
"logo"
)
{
this
.
img
=
this
.
datas
.
logImage
;
// 这是logo
}
else
if
(
type
==
"license"
)
{
// 这是营业执照
this
.
img
=
this
.
datas
.
businessImage
;
}
this
.
isShowImage
=
true
;
},
noShowImg
()
{
this
.
isShowImage
=
false
;
},
async
modifyPsw
(
data
)
{
const
pages
=
{
loginName
:
this
.
datas
.
loginName
,
supplierOpenId
:
this
.
openId
,
loginPwd
:
data
.
password
,
};
const
res
=
await
this
.
$api
.
POST
(
`
${
modifyPws
.
url
}
`
,
pages
);
console
.
log
(
res
,
"修改结果"
);
this
.
isModifyPassword
=
false
;
},
async
noModify
()
{
this
.
isModifyPassword
=
false
;
},
// 设置基本信息
basicModiy
()
{
this
.
$router
.
push
({
path
:
`/basicModiy/
${
this
.
openId
}
`
,
});
},
// 联系信息设置
contactModiy
()
{
this
.
$router
.
push
({
path
:
`/contactModiy/
${
this
.
openId
}
`
,
});
},
// 收款信息 设置
chargeModiy
()
{
this
.
$router
.
push
({
path
:
`/chargeModiy/
${
this
.
openId
}
`
,
});
},
// 商家介绍
lookIntroduce
()
{
this
.
$router
.
push
({
path
:
`/businessIntroduce/
${
this
.
openId
}
`
,
});
},
// 重置密码
resetting
()
{
this
.
isModifyPassword
=
true
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.d-f-j
{
display
:
flex
;
justify-content
:
space-between
;
}
.df
{
display
:
flex
;
}
.name
{
height
:
50px
;
line-height
:
50px
;
margin-left
:
10px
;
}
.modify
{
margin-right
:
20px
;
color
:
blue
;
cursor
:
pointer
;
}
.button
{
margin-top
:
20px
;
margin-right
:
10px
;
}
.left
{
width
:
400px
;
line-height
:
40px
;
margin-left
:
30px
;
}
.right
{
line-height
:
40px
;
margin-right
:
30px
;
}
</
style
>
src/views/customer/list/index.vue
View file @
67470005
...
...
@@ -4,14 +4,14 @@
<div
class=
"filter-box"
>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
客户名称:
</div>
<el-input
v-model=
"conditionCollection.
companyNameLik
e"
<el-input
v-model=
"conditionCollection.
nam
e"
placeholder=
"请输入"
></el-input>
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
客户性质:
</div>
<el-select
v-model=
"conditionCollection.nature"
placeholder=
"全部"
>
<el-option
v-for=
"item in
n
atureList"
<el-option
v-for=
"item in
customerN
atureList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
...
...
@@ -20,9 +20,9 @@
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
客户类型:
</div>
<el-select
v-model=
"conditionCollection.
businessT
ype"
<el-select
v-model=
"conditionCollection.
t
ype"
placeholder=
"全部"
>
<el-option
v-for=
"item in
business
TypeList"
<el-option
v-for=
"item in
customer
TypeList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
...
...
@@ -31,7 +31,7 @@
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
账户状态:
</div>
<el-select
v-model=
"conditionCollection.stat
us
"
<el-select
v-model=
"conditionCollection.stat
e
"
placeholder=
"全部"
>
<el-option
v-for=
"item in statusList"
:key=
"item.value"
...
...
@@ -77,12 +77,12 @@
</el-form>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
负责人:
</div>
<el-input
v-model=
"conditionCollection.contact
NameLike
"
<el-input
v-model=
"conditionCollection.contact"
placeholder=
"请输入"
></el-input>
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
联系电话:
</div>
<el-input
v-model=
"conditionCollection.contactPhone
Like
"
<el-input
v-model=
"conditionCollection.contactPhone"
placeholder=
"请输入"
></el-input>
</div>
<div
class=
"filter-btn"
>
...
...
@@ -106,21 +106,21 @@
<!--
<el-table-column
prop=
"userCode"
label=
"序号"
>
</el-table-column>
-->
<el-table-column
prop=
"id"
label=
"客户编号"
>
</el-table-column>
<el-table-column
prop=
"
companyN
ame"
<el-table-column
prop=
"
n
ame"
label=
"客户名称"
></el-table-column>
<el-table-column
prop=
"natureValue"
label=
"客户性质"
>
</el-table-column>
<el-table-column
prop=
"
businessT
ypeValue"
<el-table-column
prop=
"
t
ypeValue"
label=
"客户类型"
>
</el-table-column>
<el-table-column
prop=
"contact
Name
"
<el-table-column
prop=
"contact"
label=
"联系人"
></el-table-column>
<el-table-column
prop=
"contactPhone"
label=
"联系电话"
>
</el-table-column>
<el-table-column
prop=
"c
ompanyAddrTwo
"
<el-table-column
prop=
"c
ityOfResidence
"
label=
"所在城市"
>
</el-table-column>
<el-table-column
prop=
"
loginNa
me"
<el-table-column
prop=
"
createTi
me"
label=
"创建时间"
>
</el-table-column>
<el-table-column
prop=
"stat
us
Value"
<el-table-column
prop=
"stat
e
Value"
label=
"状态"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
...
...
@@ -135,11 +135,11 @@
style=
"font-size: 14px; width: 90px; margin-left: 0"
@
click=
"edit(scope.row.openId)"
>
收款设置
</el-button>
-->
<el-button
type=
"text"
v-if=
"scope.row.stat
us
== 1"
v-if=
"scope.row.stat
e
== 1"
style=
"font-size: 14px; margin-left: 10px"
@
click=
"enable(scope.row.openId)"
>
启用
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.stat
us
== 0"
v-if=
"scope.row.stat
e
== 0"
style=
"font-size: 14px; margin-left: 10px;color:red"
@
click=
"disable(scope.row.openId)"
>
停用
</el-button>
...
...
@@ -161,25 +161,26 @@
<
script
>
import
{
jdAddressCascader
,
getNature
,
getBusinessType
,
getBusinessList
,
enableBusiness
,
disableBusiness
,
enableCustomer
,
disablesCustomer
,
getCustomerList
,
getCustomerNature
,
getCustomerType
,
getCustomerState
,
}
from
"@/libs/common/constant"
;
import
{
selectListALL
}
from
"@/utils/json"
;
import
{
selectListALL
,
selectList
}
from
"@/utils/json"
;
export
default
{
data
()
{
return
{
conditionCollection
:
{
companyNameLik
e
:
""
,
nam
e
:
""
,
nature
:
""
,
businessT
ype
:
""
,
stat
us
:
""
,
t
ype
:
""
,
stat
e
:
""
,
provinceId
:
""
,
cityId
:
""
,
contact
NameLike
:
""
,
contactPhone
Like
:
""
,
contact
:
""
,
contactPhone
:
""
,
},
dataList
:
[],
searchCriteria
:
{
...
...
@@ -190,25 +191,12 @@ export default {
tablekey
:
""
,
loadings
:
true
,
isLoadProvinceId
:
true
,
//
商家
性质
n
atureList
:
[],
//
商家
类型
business
TypeList
:
[],
//
客户
性质
customerN
atureList
:
[],
//
客户
类型
customer
TypeList
:
[],
// 账户 状态
statusList
:
[
{
label
:
"全部"
,
value
:
""
,
},
{
label
:
"启用"
,
value
:
0
,
},
{
label
:
"停用"
,
value
:
1
,
},
],
statusList
:
[],
// 一级地址
provinceIdList
:
[],
// 二级地址
...
...
@@ -241,26 +229,21 @@ export default {
// 获取 列表 参数
async
getListData
(
data
)
{
this
.
loadings
=
true
;
const
dataList
=
await
this
.
get
Business
List
(
data
);
const
dataList
=
await
this
.
get
Customer
List
(
data
);
console
.
log
(
dataList
);
// cityOfResidence
this
.
total
=
dataList
.
total
;
for
(
var
i
=
0
;
i
<
dataList
.
list
.
length
;
i
++
)
{
dataList
.
list
[
i
].
natureValue
=
dataList
.
list
[
i
].
supplierInfoBo
.
natureValue
;
dataList
.
list
[
i
].
businessTypeValue
=
dataList
.
list
[
i
].
supplierInfoBo
.
businessTypeValue
;
dataList
.
list
[
i
].
loginName
=
dataList
.
list
[
i
].
userList
[
0
].
loginName
;
dataList
.
list
[
i
].
companyAddrTwo
=
dataList
.
list
[
i
].
companyAddr
.
split
(
" "
)[
0
]
+
" "
+
dataList
.
list
[
i
].
companyAddr
.
split
(
" "
)[
1
];
}
this
.
dataList
=
dataList
.
list
;
for
(
var
i
=
0
;
i
<
this
.
dataList
.
length
;
i
++
)
{
this
.
dataList
[
i
].
cityOfResidence
=
this
.
dataList
[
i
].
provinceName
+
" "
+
this
.
dataList
[
i
].
cityName
;
}
this
.
loadings
=
false
;
},
async
get
Business
List
(
data
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
get
Business
List
.
url
}
`
,
data
);
async
get
Customer
List
(
data
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
get
Customer
List
.
url
}
`
,
data
);
return
res
;
},
async
pagingEvent
()
{
...
...
@@ -286,17 +269,21 @@ export default {
// 查看详情
detils
(
openId
)
{
this
.
$router
.
push
({
path
:
`/
detailsBusines
s/
${
openId
}
`
,
path
:
`/
customerDetail
s/
${
openId
}
`
,
});
},
selectListALL
(
myJson
)
{
return
selectListALL
(
myJson
);
},
selectList
(
myJson
,
a
)
{
return
selectList
(
myJson
,
a
);
},
// 获取 常量
async
getConstant
()
{
await
this
.
getProvinceIdList
();
await
this
.
getNatureList
();
await
this
.
getBusinessTypeList
();
await
this
.
getCustomerTypeList
();
await
this
.
getCustomerState
();
},
// 获取 一级地址
async
getProvinceIdList
()
{
...
...
@@ -304,15 +291,20 @@ export default {
this
.
provinceIdList
=
res
;
this
.
isLoadProvinceId
=
false
;
},
// 获取
商家
性质
// 获取
客户
性质
async
getNatureList
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getNature
.
url
}
`
);
this
.
natureList
=
this
.
selectListALL
(
res
);
const
res
=
await
this
.
$api
.
GET
(
`
${
getCustomerNature
.
url
}
`
);
this
.
customerNatureList
=
this
.
selectList
(
res
,
true
);
},
// 获取 客户类型
async
getCustomerTypeList
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getCustomerType
.
url
}
`
);
this
.
customerTypeList
=
this
.
selectList
(
res
);
},
// 获取
商家类型
async
get
BusinessTypeList
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
get
BusinessTyp
e
.
url
}
`
);
this
.
businessTypeList
=
this
.
selectListALL
(
res
);
// 获取
客户 账户 状态
async
get
CustomerState
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
get
CustomerStat
e
.
url
}
`
);
this
.
statusList
=
this
.
selectList
(
res
);
},
// 获取 二级地址
async
provinceIdChange
()
{
...
...
@@ -321,14 +313,14 @@ export default {
);
},
async
enable
(
openId
)
{
this
.
$confirm
(
"确
定启用此供应商
吗?"
,
"提示"
,
{
this
.
$confirm
(
"确
认启用此客户
吗?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
// type: 'warning',
customClass
:
"custom-confirm"
,
})
.
then
(()
=>
{
this
.
enable
Business
(
openId
);
this
.
enable
Customer
(
openId
);
})
.
catch
(()
=>
{
this
.
$message
({
...
...
@@ -337,10 +329,8 @@ export default {
});
});
},
async
enableBusiness
(
openId
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
enableBusiness
.
url
}
`
,
{
companyOpenId
:
openId
,
});
async
enableCustomer
(
openId
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
enableCustomer
.
url
}${
openId
}
`
);
console
.
log
(
res
);
await
this
.
queryData
();
this
.
$message
({
...
...
@@ -349,14 +339,14 @@ export default {
});
},
disable
(
openId
)
{
this
.
$confirm
(
"确
定停用此供应商
吗?"
,
"提示"
,
{
this
.
$confirm
(
"确
认停用此客户
吗?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
// type: 'warning',
customClass
:
"custom-confirm"
,
})
.
then
(()
=>
{
this
.
disable
Business
(
openId
);
this
.
disable
sCustomer
(
openId
);
})
.
catch
(()
=>
{
this
.
$message
({
...
...
@@ -365,10 +355,8 @@ export default {
});
});
},
async
disableBusiness
(
openId
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
disableBusiness
.
url
}
`
,
{
companyOpenId
:
openId
,
});
async
disablesCustomer
(
openId
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
disablesCustomer
.
url
}${
openId
}
`
);
console
.
log
(
res
);
await
this
.
queryData
();
this
.
$message
({
...
...
src/views/product/add/index.vue
View file @
67470005
...
...
@@ -150,6 +150,9 @@ export default {
this
.
$refs
[
detail
].
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
try
{
// 提交前 处理 数据
// 拼接 营业时间 转换 时间
// var data = await this.arrangeData();
// 判断 参数 确定是修改还是 添加
if
(
this
.
editId
)
{
console
.
log
(
this
.
form
,
"编辑提交的参数"
);
...
...
src/views/product/list/index.vue
View file @
67470005
...
...
@@ -62,9 +62,9 @@
width=
"120"
>
<template
slot-scope=
"scope"
>
<!-- 编辑 -->
<el-button
type=
"text"
<
!--
<
el-button
type=
"text"
style=
"font-size: 14px; margin-left: 0px"
@
click=
"detils(scope.row.openId)"
>
查看详情
</el-button>
@
click=
"detils(scope.row.openId)"
>
查看详情
</el-button>
-->
<el-button
type=
"text"
style=
"font-size: 14px; margin-left: 10px"
...
...
src/views/purchaseOrder/add/index.vue
View file @
67470005
...
...
@@ -6,19 +6,23 @@
ref=
"form"
:rules=
"rules"
>
<el-form-item
label=
"客户名称:"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请填写"
autocomplete=
"off"
maxlength=
"50"
:show-word-limit=
"true"
class=
"filter-item-same-width"
/>
prop=
"customerName"
>
<el-select
v-model=
"form.customerName"
placeholder=
"请选择"
class=
"filter-item-same-width"
>
<el-option
v-for=
"item in customerNameList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"产品类型:"
prop=
"
t
ype"
>
<el-select
v-model=
"form.
t
ype"
prop=
"
productT
ype"
>
<el-select
v-model=
"form.
productT
ype"
placeholder=
"请选择"
@
change=
"getAllModel"
class=
"filter-item-same-width"
>
<el-option
v-for=
"item in typeList"
:key=
"item.value"
...
...
@@ -29,24 +33,50 @@
</el-form-item>
<el-form-item
label=
"产品型号:"
prop=
"model"
>
<el-input
v-model=
"form.model"
placeholder=
"请填写"
autocomplete=
"off"
maxlength=
"30"
:show-word-limit=
"true"
class=
"filter-item-same-width"
/>
prop=
"productModel"
>
<el-select
v-model=
"form.productModel"
placeholder=
"请选择"
class=
"filter-item-same-width"
>
<el-option
v-for=
"item in allModelList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"搜索前缀:"
prop=
""
>
<el-input
v-model=
"form.searchPrefix"
<el-form-item
label=
"付费模式:"
prop=
"paymentModel"
>
<el-select
v-model=
"form.paymentModel"
placeholder=
"请选择"
class=
"filter-item-same-width"
>
<el-option
v-for=
"item in paymentModelList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"计划采购数量:"
prop=
"projectedNumber"
>
<el-input
v-model=
"form.projectedNumber"
placeholder=
"请填写"
autocomplete=
"off"
maxlength=
"
3
0"
maxlength=
"
5
0"
:show-word-limit=
"true"
class=
"filter-item-same-width"
/>
</el-form-item>
<el-form-item
label=
"预计交货时间:"
prop=
"estimatedDeliveryTime"
>
<el-date-picker
v-model=
"form.estimatedDeliveryTime"
type=
"date"
value-format=
"yyyy-MM-dd hh:mm:ss"
:picker-options=
"pickerOptions"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"备注:"
prop=
""
>
<el-input
v-model=
"form.remark"
...
...
@@ -73,11 +103,13 @@
<
script
>
import
{
mapState
,
mapActions
}
from
"vuex"
;
import
{
addProduct
,
addPurchaseOrder
,
getProductType
,
getOneProduct
,
editProduct
editProduct
,
getCustomerName
,
getAllModel
,
getPurchaseOrderPaymentModel
,
}
from
"@/libs/common/constant"
;
import
{
selectList
,
generateTiemList
,
weekList
}
from
"@/utils/json"
;
import
dayjs
from
"dayjs"
;
...
...
@@ -86,20 +118,43 @@ export default {
return
{
isLoading
:
false
,
form
:
{
name
:
""
,
type
:
""
,
model
:
""
,
searchPrefix
:
""
,
remark
:
""
,
customerName
:
""
,
productType
:
""
,
productModel
:
""
,
paymentModel
:
""
,
projectedNumber
:
""
,
estimatedDeliveryTime
:
""
,
},
ifSubmit
:
false
,
typeList
:
[],
customerNameList
:
[],
allModelList
:
[],
paymentModelList
:
[],
// 禁用今天之前的日期
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
();
},
},
// 编辑
editId
:
this
.
$route
.
params
.
id
,
rules
:
{
name
:
[{
required
:
true
,
message
:
"请填写"
,
trigger
:
"blur"
}],
model
:
[{
required
:
true
,
message
:
"请填写"
,
trigger
:
"blur"
}],
type
:
[{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
}],
customerName
:
[{
required
:
true
,
message
:
"请填写"
,
trigger
:
"blur"
}],
projectedNumber
:
[
{
required
:
true
,
message
:
"请填写"
,
trigger
:
"blur"
},
],
estimatedDeliveryTime
:
[
{
required
:
true
,
message
:
"请填写"
,
trigger
:
"blur"
},
],
productType
:
[{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
}],
productModel
:
[
{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
},
],
paymentModel
:
[
{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
},
],
productType
:
[{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
}],
productType
:
[{
required
:
true
,
message
:
"请选择"
,
trigger
:
"change"
}],
},
};
},
...
...
@@ -121,6 +176,8 @@ export default {
// 获取 字典数据
async
getConstant
()
{
await
this
.
getProductType
();
await
this
.
getCustomerName
();
await
this
.
getPurchaseOrderPaymentModel
();
},
selectList
(
myJson
,
a
)
{
return
selectList
(
myJson
,
a
);
...
...
@@ -136,13 +193,30 @@ export default {
const
res
=
await
this
.
$api
.
GET
(
`
${
getProductType
.
url
}
`
);
this
.
typeList
=
this
.
selectList
(
res
);
},
// 获取 客户 名称
async
getCustomerName
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getCustomerName
.
url
}
`
);
this
.
customerNameList
=
this
.
selectList
(
res
);
console
.
log
(
this
.
customerNameList
);
},
// 获取 产品 型号
async
getAllModel
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getAllModel
.
url
}${
this
.
form
.
productType
}
`
);
this
.
allModelList
=
this
.
selectList
(
res
);
},
// 获取 付费模式
async
getPurchaseOrderPaymentModel
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getPurchaseOrderPaymentModel
.
url
}
`
);
this
.
paymentModelList
=
this
.
selectList
(
res
);
},
async
cancel
()
{
var
tagName
=
this
.
current
;
await
this
.
close
({
tagName
});
this
.
$router
.
push
(
"/p
roduct
List"
);
this
.
$router
.
push
(
"/p
urchaseOrder
List"
);
},
submit
(
detail
)
{
if
(
this
.
ifSubmit
)
{
return
;
}
...
...
@@ -162,7 +236,7 @@ export default {
}
else
{
console
.
log
(
this
.
form
,
"添加提交的参数"
);
// 提交 接口
await
this
.
addP
roduct
(
this
.
form
);
await
this
.
addP
urchaseOrder
(
this
.
form
);
}
await
this
.
cancel
();
this
.
$message
({
...
...
@@ -178,8 +252,8 @@ export default {
});
},
// 添加 产品
async
addP
roduct
(
data
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
addP
roduct
.
url
}
`
,
data
);
async
addP
urchaseOrder
(
data
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
addP
urchaseOrder
.
url
}
`
,
data
);
console
.
log
(
res
,
"添加产品接口成功的返回"
);
},
// 编辑
...
...
@@ -187,7 +261,7 @@ export default {
async
getOneProduct
(
openId
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getOneProduct
.
url
}${
openId
}
`
);
console
.
log
(
res
);
this
.
form
=
res
this
.
form
=
res
;
this
.
isLoading
=
false
;
},
},
...
...
src/views/purchaseOrder/details/index.vue
0 → 100644
View file @
67470005
<
template
>
<d2-container
v-loading=
"isLoading"
>
<div>
<div
class=
"providerOrderList-container"
>
<div
class=
"d-f-j"
style=
"background: #f2f3f5"
>
<div>
<div
class=
"name"
>
订单信息
</div>
</div>
<!--
<div
class=
"name modify"
@
click=
"basicModiy()"
>
修改
</div>
-->
</div>
</div>
<div
class=
"df"
style=
"margin-top: 20px"
>
<div
class=
"df left"
>
<div>
采购单号:
</div>
<div>
{{
datas
.
orderNum
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
客户名称:
</div>
<div>
{{
datas
.
customerId
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
计划采购:
</div>
<div>
{{
datas
.
plannedPurchase
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
入库数量:
</div>
<div>
{{
datas
.
bindNum
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
付费模式:
</div>
<div>
{{
datas
.
paymentModelValue
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
生产状态:
</div>
<div>
{{
datas
.
productionStateValue
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
预计交货:
</div>
<div>
{{
datas
.
estimatedDeliveryTime
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
下单时间:
</div>
<div>
{{
datas
.
createTime
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
订单备注:
</div>
<div>
{{
datas
.
remark
}}
</div>
</div>
</div>
<div
class=
"providerOrderList-container"
>
<div
class=
"d-f-j"
style=
"background: #f2f3f5"
>
<div>
<div
class=
"name"
>
基本信息
</div>
</div>
<!--
<div
class=
"name modify"
@
click=
"basicModiy()"
>
修改
</div>
-->
</div>
</div>
<div
class=
"df"
style=
"margin-top: 20px"
>
<div
class=
"df left"
>
<div>
产品名称:
</div>
<div>
{{
datas
.
productName
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
设备状态:
</div>
<div>
{{
datas
.
deviceStateValue
}}
</div>
</div>
</div>
<div
class=
"df"
>
<div
class=
"df left"
>
<div>
产品类型:
</div>
<div>
{{
datas
.
productTypeValue
}}
</div>
</div>
<div
class=
"df right"
style=
"margin-left: 170px"
>
<div>
产品型号:
</div>
<div>
{{
datas
.
productModel
}}
</div>
</div>
</div>
</div>
</d2-container>
</
template
>
<
script
>
import
{
getOneOrderNum
,
modifyPws
}
from
"@/libs/common/constant"
;
export
default
{
data
()
{
return
{
isLoading
:
false
,
datas
:
{},
isShow
:
true
,
lunchTime
:
""
,
dinnerTime
:
""
,
imge
:
""
,
openId
:
this
.
$route
.
params
.
id
,
isShowImage
:
false
,
img
:
""
,
isModifyPassword
:
false
,
};
},
async
created
()
{
await
this
.
getData
();
},
methods
:
{
async
getData
()
{
this
.
isLoading
=
true
;
await
this
.
getOneOrderNum
(
this
.
openId
);
},
async
getOneOrderNum
(
openId
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getOneOrderNum
.
url
}${
openId
}
`
);
this
.
datas
=
res
;
this
.
isLoading
=
false
;
console
.
log
(
res
,
"11"
);
},
lookImage
(
type
)
{
console
.
log
(
type
);
if
(
type
==
"logo"
)
{
this
.
img
=
this
.
datas
.
logImage
;
// 这是logo
}
else
if
(
type
==
"license"
)
{
// 这是营业执照
this
.
img
=
this
.
datas
.
businessImage
;
}
this
.
isShowImage
=
true
;
},
noShowImg
()
{
this
.
isShowImage
=
false
;
},
async
modifyPsw
(
data
)
{
const
pages
=
{
loginName
:
this
.
datas
.
loginName
,
supplierOpenId
:
this
.
openId
,
loginPwd
:
data
.
password
,
};
const
res
=
await
this
.
$api
.
POST
(
`
${
modifyPws
.
url
}
`
,
pages
);
console
.
log
(
res
,
"修改结果"
);
this
.
isModifyPassword
=
false
;
},
async
noModify
()
{
this
.
isModifyPassword
=
false
;
},
// 设置基本信息
basicModiy
()
{
this
.
$router
.
push
({
path
:
`/basicModiy/
${
this
.
openId
}
`
,
});
},
// 联系信息设置
contactModiy
()
{
this
.
$router
.
push
({
path
:
`/contactModiy/
${
this
.
openId
}
`
,
});
},
// 收款信息 设置
chargeModiy
()
{
this
.
$router
.
push
({
path
:
`/chargeModiy/
${
this
.
openId
}
`
,
});
},
// 商家介绍
lookIntroduce
()
{
this
.
$router
.
push
({
path
:
`/businessIntroduce/
${
this
.
openId
}
`
,
});
},
// 重置密码
resetting
()
{
this
.
isModifyPassword
=
true
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.d-f-j
{
display
:
flex
;
justify-content
:
space-between
;
}
.df
{
display
:
flex
;
}
.name
{
height
:
50px
;
line-height
:
50px
;
margin-left
:
10px
;
}
.modify
{
margin-right
:
20px
;
color
:
blue
;
cursor
:
pointer
;
}
.button
{
margin-top
:
20px
;
margin-right
:
10px
;
}
.left
{
width
:
400px
;
line-height
:
40px
;
margin-left
:
30px
;
}
.right
{
line-height
:
40px
;
margin-right
:
30px
;
}
</
style
>
src/views/purchaseOrder/
l
ist/index.vue
→
src/views/purchaseOrder/
purchaseOrderL
ist/index.vue
View file @
67470005
...
...
@@ -15,7 +15,6 @@
<div
class=
"filter-item"
>
<div
class=
"spana"
>
产品类型:
</div>
<el-select
v-model=
"conditionCollection.productType"
@
change=
"getAllModel"
placeholder=
"全部"
>
<el-option
v-for=
"item in typeList"
:key=
"item.value"
...
...
@@ -26,14 +25,8 @@
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
产品型号:
</div>
<el-select
v-model=
"conditionCollection.productModel"
placeholder=
"全部"
>
<el-option
v-for=
"item in allModelList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
v-model=
"conditionCollection.productModel"
placeholder=
"请输入"
></el-input>
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
付费模式:
</div>
...
...
@@ -48,7 +41,7 @@
</div>
<div
class=
"filter-item"
>
<div
class=
"spana"
>
生产状态:
</div>
<el-select
v-model=
"conditionCollection.productionStat
us
"
<el-select
v-model=
"conditionCollection.productionStat
e
"
placeholder=
"全部"
>
<el-option
v-for=
"item in productionStateList"
:key=
"item.value"
...
...
@@ -67,7 +60,7 @@
@
click=
"reset()"
>
重置
</el-button>
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"add
PurchaseOrder
()"
>
新建采购单
</el-button>
@
click=
"add
Business
()"
>
新建采购单
</el-button>
</div>
</div>
<div>
...
...
@@ -81,7 +74,7 @@
label=
"序号"
>
</el-table-column>
<el-table-column
prop=
"orderNum"
label=
"采购单号"
></el-table-column>
<el-table-column
prop=
"customer
OpenId
"
<el-table-column
prop=
"customer"
label=
"客户名称"
>
</el-table-column>
<el-table-column
prop=
"productName"
label=
"产品名称"
>
</el-table-column>
...
...
@@ -99,20 +92,33 @@
label=
"生产状态"
>
</el-table-column>
<el-table-column
prop=
"deviceStateValue"
label=
"设备状态"
>
</el-table-column>
<el-table-column
prop=
"
upd
ateTime"
<el-table-column
prop=
"
cre
ateTime"
label=
"下单时间"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"120"
>
<template
slot-scope=
"scope"
>
<!-- 编辑 -->
<el-button
type=
"text"
style=
"font-size: 14px; margin-left: 0px"
@
click=
"detils(scope.row.openId)"
>
查看详情
</el-button>
@
click=
"detils(scope.row.orderNum)"
>
查看详情
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.deviceState == 1"
style=
"font-size: 14px; margin-left: 10px"
@
click=
"enable(scope.row.openId)"
>
编辑
</el-button>
@
click=
"enable(scope.row.orderNum)"
>
启用
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.deviceState == 0"
style=
"font-size: 14px; margin-left: 10px;color:red"
@
click=
"disable(scope.row.orderNum)"
>
停用
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.bindNum == 0"
style=
"font-size: 14px; margin-left: 10px;color:red"
@
click=
"deleteOrder(scope.row.orderNum)"
>
作废
</el-button>
<!--
<el-button
type=
"text"
style=
"font-size: 14px; margin-left: 10px"
@
click=
"enable(scope.row.openId)"
>
编辑
</el-button>
-->
</
template
>
</el-table-column>
...
...
@@ -133,10 +139,12 @@
import
{
getProduct
,
getProductType
,
getAllModel
,
getAllOrder
,
getPaymentModel
,
getproductionState
,
purchaseOrderFind
,
getPurchaseOrderPaymentModel
,
getPurchaseOrderProductionState
,
purchaseOrderEnableCar
,
purchaseOrderDisableCar
,
purchaseOrderDelete
,
}
from
"@/libs/common/constant"
;
import
{
selectListALL
}
from
"@/utils/json"
;
export
default
{
...
...
@@ -148,9 +156,8 @@ export default {
productType
:
""
,
productModel
:
""
,
paymentModel
:
""
,
productionStat
us
:
""
,
productionStat
e
:
""
,
},
dataList
:
[],
searchCriteria
:
{
pageNow
:
1
,
...
...
@@ -162,11 +169,7 @@ export default {
isLoadProvinceId
:
true
,
// 产品 类型
typeList
:
[],
// 产品 型号
allModelList
:
[],
// 付费 模式
paymentModelList
:
[],
// 生产 状态
productionStateList
:
[],
determineQueryData
:
{},
};
...
...
@@ -178,12 +181,6 @@ export default {
await
this
.
queryData
();
},
methods
:
{
async
getAllModel
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getAllModel
.
url
}${
this
.
conditionCollection
.
productType
}
`
);
this
.
allModelList
=
this
.
selectListALL
(
res
);
},
// 查询
async
queryData
()
{
this
.
determineQueryData
=
this
.
conditionCollection
;
...
...
@@ -201,19 +198,19 @@ export default {
},
// 获取 列表 参数
async
getListData
(
data
)
{
console
.
log
(
data
,
'搜索条件'
)
this
.
loadings
=
true
;
const
dataList
=
await
this
.
getAllOrder
(
data
);
const
dataList
=
await
this
.
purchaseOrderFind
(
data
);
console
.
log
(
dataList
);
this
.
total
=
dataList
.
total
;
this
.
dataList
=
dataList
.
list
;
this
.
loadings
=
false
;
},
async
getAllOrder
(
data
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getAllOrder
.
url
}
`
,
data
);
async
purchaseOrderFind
(
data
)
{
const
res
=
await
this
.
$api
.
GET
(
`
${
purchaseOrderFind
.
url
}
`
,
data
);
return
res
;
},
async
pagingEvent
()
{
// await this.queryData();
var
data
=
this
.
determineQueryData
;
...
...
@@ -222,15 +219,27 @@ export default {
await
this
.
getListData
(
data
);
},
// 添加 产品
addBusiness
()
{
this
.
$router
.
push
({
path
:
"/addpurchaseOrder"
,
});
},
// 查看详情
detils
(
openId
)
{
this
.
$router
.
push
({
path
:
`/purchaseOrderDetails/
${
openId
}
`
,
});
},
selectListALL
(
myJson
)
{
return
selectListALL
(
myJson
);
},
// 获取 常量
async
getConstant
()
{
await
this
.
getProductType
();
await
this
.
getPaymentModel
();
await
this
.
get
p
roductionState
();
await
this
.
getP
urchaseOrderP
aymentModel
();
await
this
.
get
PurchaseOrderP
roductionState
();
},
// 获取 产品类型
...
...
@@ -238,35 +247,105 @@ export default {
const
res
=
await
this
.
$api
.
GET
(
`
${
getProductType
.
url
}
`
);
this
.
typeList
=
this
.
selectListALL
(
res
);
},
// 获取 付费模式
async
getPaymentModel
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getPaymentModel
.
url
}
`
);
async
getPurchaseOrderPaymentModel
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getPurchaseOrderPaymentModel
.
url
}
`
);
this
.
paymentModelList
=
this
.
selectListALL
(
res
);
},
// 获取 生产 状态
async
getproductionState
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getproductionState
.
url
}
`
);
async
getPurchaseOrderProductionState
()
{
const
res
=
await
this
.
$api
.
GET
(
`
${
getPurchaseOrderProductionState
.
url
}
`
);
this
.
productionStateList
=
this
.
selectListALL
(
res
);
console
.
log
(
this
.
productionStateList
);
},
// 添加 产品
addPurchaseOrder
()
{
this
.
$router
.
push
({
path
:
"/addPurchaseOrder"
,
async
disable
(
orderNum
)
{
this
.
$confirm
(
"确认禁用此采购单所有设备吗?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
// type: 'warning',
customClass
:
"custom-confirm"
,
})
.
then
(()
=>
{
this
.
purchaseOrderDisableCar
(
orderNum
);
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消禁用!"
,
});
});
},
// 禁用 采购单下所有车辆
async
purchaseOrderDisableCar
(
orderNum
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
purchaseOrderDisableCar
.
url
}${
orderNum
}
`
);
console
.
log
(
res
);
await
this
.
queryData
();
this
.
$message
({
type
:
"success"
,
message
:
"禁用成功!"
,
});
},
// 编辑产品
async
enable
(
openId
)
{
this
.
$router
.
push
({
path
:
`/editProduct/
${
openId
}
`
,
enable
(
orderNum
)
{
this
.
$confirm
(
"确认启用此采购单所有设备吗?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
// type: 'warning',
customClass
:
"custom-confirm"
,
})
.
then
(()
=>
{
this
.
purchaseOrderEnableCar
(
orderNum
);
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已停止启用!"
,
});
});
},
// 启用 采购单下所有车辆
async
purchaseOrderEnableCar
(
orderNum
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
purchaseOrderEnableCar
.
url
}${
orderNum
}
`
);
console
.
log
(
res
);
await
this
.
queryData
();
this
.
$message
({
type
:
"success"
,
message
:
"启用成功!"
,
});
},
// 查看详情
detils
(
openId
)
{
this
.
$router
.
push
({
path
:
`/detailsBusiness/
${
openId
}
`
,
deleteOrder
(
orderNum
)
{
this
.
$confirm
(
"确认作废此采购单吗?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
// type: 'warning',
customClass
:
"custom-confirm"
,
})
.
then
(()
=>
{
this
.
purchaseOrderDelete
(
orderNum
);
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已停止作废!"
,
});
});
},
// 作废 采购单 purchaseOrderDelete
async
purchaseOrderDelete
(
orderNum
)
{
const
res
=
await
this
.
$api
.
POST
(
`
${
purchaseOrderDelete
.
url
}${
orderNum
}
`
);
console
.
log
(
res
);
await
this
.
queryData
();
this
.
$message
({
type
:
"success"
,
message
:
"作废成功!"
,
});
},
// 编辑产品
// async enable(openId) {
// this.$router.push({
// path: `/editProduct/${openId}`,
// });
// },
},
};
</
script
>
...
...
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