Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-purchase
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ac5f2c04
authored
Apr 24, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
4.20.0需求开发
1 parent
ebb594d5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
401 additions
and
335 deletions
package-lock.json
package.json
src/api/modules/product.js
src/api/modules/purchaseShopping.js
src/utils/constants.js
src/views/purchaseOrder/components/goodsDetailCom.vue
src/views/purchaseOrder/components/orderDetailDialog.vue
src/views/purchaseOrder/index.vue
src/views/purchaseOrder/into.vue
package-lock.json
View file @
ac5f2c0
...
@@ -2839,6 +2839,11 @@
...
@@ -2839,6 +2839,11 @@
"resolved"
:
"https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz"
,
"integrity"
:
"sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
"integrity"
:
"sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
},
},
"bignumber.js"
:
{
"version"
:
"9.1.1"
,
"resolved"
:
"https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz"
,
"integrity"
:
"sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig=="
},
"binary-extensions"
:
{
"binary-extensions"
:
{
"version"
:
"2.2.0"
,
"version"
:
"2.2.0"
,
"resolved"
:
"https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz"
,
...
...
package.json
View file @
ac5f2c0
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
},
},
"dependencies"
:
{
"dependencies"
:
{
"bignumber.js"
:
"^9.1.1"
,
"core-js"
:
"^3.4.4"
,
"core-js"
:
"^3.4.4"
,
"dayjs"
:
"^1.10.7"
,
"dayjs"
:
"^1.10.7"
,
"el-tree-transfer"
:
"^2.2.6"
,
"el-tree-transfer"
:
"^2.2.6"
,
...
...
src/api/modules/product.js
View file @
ac5f2c0
...
@@ -37,5 +37,27 @@ const getGoodsList = (params) => {
...
@@ -37,5 +37,27 @@ const getGoodsList = (params) => {
sign
:
true
sign
:
true
})
})
}
}
//查询服务商所有商品列表
const
getfwsGoodsList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.partner.goods.list`
return
http
({
url
:
'rop-scrm-partner/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getGoodsList
,
getProductInfo
,
getProductTypeBySceneId
}
// 添加自采订单
const
addSelfOrder
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseOrder.selfAddOrEdit`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
addSelfOrder
,
getGoodsList
,
getProductInfo
,
getProductTypeBySceneId
,
getfwsGoodsList
}
src/api/modules/purchaseShopping.js
View file @
ac5f2c0
...
@@ -26,6 +26,17 @@ const purchaseOrderCancelOrCheck = (params) => {
...
@@ -26,6 +26,17 @@ const purchaseOrderCancelOrCheck = (params) => {
returnAll
:
true
returnAll
:
true
})
})
}
}
const
purchaseOrderDelete
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseOrder.deleteByOrderCode`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 查看采购订单
// 查看采购订单
const
purchaseOrderDetail
=
(
params
)
=>
{
const
purchaseOrderDetail
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
...
@@ -189,7 +200,17 @@ export function getMerchantList(params) {
...
@@ -189,7 +200,17 @@ export function getMerchantList(params) {
})
})
}
}
//编辑
export
function
selectByOrderCode
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseOrder.selectByOrderCode`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 确认发货
// 确认发货
// export function purchaseOrderConfirmDelivery(data) {
// export function purchaseOrderConfirmDelivery(data) {
...
@@ -198,4 +219,4 @@ export function getMerchantList(params) {
...
@@ -198,4 +219,4 @@ export function getMerchantList(params) {
// return http(data)
// return http(data)
// }
// }
export
default
{
getMerchantList
,
purchaseOrderPutIn
,
exportExcel
,
shoppingCarUpdateNumber
,
purchaseOrderAdd
,
shoppingCarAdd
,
shoppingCarRemove
,
updateSelectedFlag
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
purchaseOrderDetail
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
\ No newline at end of file
export
default
{
selectByOrderCode
,
purchaseOrderDelete
,
getMerchantList
,
purchaseOrderPutIn
,
exportExcel
,
shoppingCarUpdateNumber
,
purchaseOrderAdd
,
shoppingCarAdd
,
shoppingCarRemove
,
updateSelectedFlag
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
purchaseOrderDetail
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
\ No newline at end of file
src/utils/constants.js
View file @
ac5f2c0
...
@@ -37,327 +37,17 @@ export const defaultStatusOptions = [
...
@@ -37,327 +37,17 @@ export const defaultStatusOptions = [
label
:
"已入库"
label
:
"已入库"
}
}
]
]
export
const
membraneTypeList
=
[
1
,
4
,
6
,
12
,
14
]
//采购类型
export
const
tableData
=
[
export
const
purchaseTypeList
=
[
{
"id"
:
87
,
"orderCode"
:
"CG202303246031"
,
"totalPrice"
:
2000
,
"orderTime"
:
1679628260000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
2
,
"putTime"
:
1679628300000
,
"putMerchantId"
:
44211025
,
"putMerchantName"
:
"流程测试园区门店"
,
"status"
:
2
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
2
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
"23213123321"
,
"deliveryCompany"
:
"顺丰"
,
"yqMerchantIds"
:
null
},
{
"id"
:
86
,
"orderCode"
:
"CG202303245909"
,
"totalPrice"
:
200
,
"orderTime"
:
1679627865000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
2
,
"putTime"
:
1679627971000
,
"putMerchantId"
:
44211025
,
"putMerchantName"
:
"流程测试园区门店"
,
"status"
:
2
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
2
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
"202303113333"
,
"deliveryCompany"
:
"顺丰"
,
"yqMerchantIds"
:
null
},
{
"id"
:
85
,
"orderCode"
:
"CG202303074278"
,
"totalPrice"
:
222
,
"orderTime"
:
1678175926000
,
"merchantId"
:
44211753
,
"merchantName"
:
"权限验证门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"test"
,
"contactPhone"
:
"13156464645"
,
"contactAddress"
:
"test"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
},
{
"id"
:
84
,
"orderCode"
:
"CG202303062215"
,
"totalPrice"
:
2
,
"orderTime"
:
1678094753000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
},
{
"id"
:
83
,
"orderCode"
:
"CG202303061686"
,
"totalPrice"
:
80
,
"orderTime"
:
1678094729000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
},
{
{
"id"
:
82
,
id
:
1
,
"orderCode"
:
"CG202303061255"
,
label
:
"商城采购"
"totalPrice"
:
100
,
"orderTime"
:
1678094705000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
},
{
"id"
:
81
,
"orderCode"
:
"CG202303068699"
,
"totalPrice"
:
200
,
"orderTime"
:
1678094690000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
},
{
"id"
:
80
,
"orderCode"
:
"CG202303061510"
,
"totalPrice"
:
88
,
"orderTime"
:
1678094683000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
},
},
{
{
"id"
:
79
,
id
:
2
,
"orderCode"
:
"CG202303068980"
,
label
:
"自采入库"
"totalPrice"
:
266
,
"orderTime"
:
1678094455000
,
"merchantId"
:
44211452
,
"merchantName"
:
"lsq园区店02"
,
"putStatus"
:
2
,
"putTime"
:
1678938194000
,
"putMerchantId"
:
44211452
,
"putMerchantName"
:
"lsq园区店02"
,
"status"
:
2
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
2
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"刘世权"
,
"contactPhone"
:
"15089782612"
,
"contactAddress"
:
"广东省深圳市龙岗区坂田街道"
,
"deliveryNumber"
:
"202303061722"
,
"deliveryCompany"
:
"wllw"
,
"yqMerchantIds"
:
null
},
},
{
]
"id"
:
78
,
export
const
membraneTypeList
=
[
1
,
4
,
6
,
12
,
14
]
"orderCode"
:
"CG202303068011"
,
"totalPrice"
:
66
,
"orderTime"
:
1678094339000
,
"merchantId"
:
44211025
,
"merchantName"
:
"流程测试园区门店"
,
"putStatus"
:
1
,
"putTime"
:
null
,
"putMerchantId"
:
null
,
"putMerchantName"
:
null
,
"status"
:
1
,
"createdBy"
:
null
,
"createdDate"
:
null
,
"updatedBy"
:
null
,
"updatedDate"
:
null
,
"deletedFlag"
:
null
,
"sortType"
:
0
,
"orderTimeStart"
:
null
,
"orderTimeEnd"
:
null
,
"orderTimeStr"
:
null
,
"deliveryStatus"
:
1
,
"putTimeStr"
:
null
,
"putTimeStart"
:
null
,
"putTimeEnd"
:
null
,
"contactName"
:
"宋司机"
,
"contactPhone"
:
"13750523252"
,
"contactAddress"
:
"111111111111111111111111111111111111111111111111"
,
"deliveryNumber"
:
null
,
"deliveryCompany"
:
null
,
"yqMerchantIds"
:
null
}
]
\ No newline at end of file
\ No newline at end of file
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
ac5f2c0
...
@@ -50,6 +50,11 @@
...
@@ -50,6 +50,11 @@
<
/div
>
<
/div
>
<!--
<
i
class
=
"carIcon"
><
/i> --
>
<!--
<
i
class
=
"carIcon"
><
/i> --
>
<
/div
>
<
/div
>
<
div
class
=
"table"
>
<
h3
>
适用门店
<
/h3
>
<
GLTable
:
hasNum
=
"false"
:
hasPage
=
"false"
:
tableParams
=
"tableParams"
:
table
-
data
=
"tableInfo"
>
<
/GLTable
>
<
/div
>
<
h3
style
=
"margin-top:20px;"
>
产品详情
<
/h3
>
<
h3
style
=
"margin-top:20px;"
>
产品详情
<
/h3
>
<
div
class
=
"goodsDescList"
>
<
div
class
=
"goodsDescList"
>
<
div
class
=
"goodsDescItem"
v
-
for
=
"(item, index) in goodsInfo.goodsDescList"
:
key
=
"index"
>
<
div
class
=
"goodsDescItem"
v
-
for
=
"(item, index) in goodsInfo.goodsDescList"
:
key
=
"index"
>
...
@@ -92,7 +97,23 @@ export default {
...
@@ -92,7 +97,23 @@ export default {
goodsNumber
:
1
,
goodsNumber
:
1
,
upgradeGoodsId
:
''
,
upgradeGoodsId
:
''
,
purchasePrice
:
0
purchasePrice
:
0
}
}
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableColumns
:
[{
label
:
'商户名称'
,
prop
:
'merchantNames'
}
,
{
label
:
'商户号'
,
prop
:
'merchantId'
}
,
{
label
:
'商品别名'
,
prop
:
'upgradeGoodsAlias'
}
]
}
,
tableInfo
:
[],
}
}
}
,
}
,
computed
:
{
computed
:
{
...
@@ -128,6 +149,7 @@ export default {
...
@@ -128,6 +149,7 @@ export default {
getGoodsDetail
()
{
getGoodsDetail
()
{
this
.
$apis
.
product
.
getProductInfo
({
id
:
this
.
goodsId
}
).
then
(
res
=>
{
this
.
$apis
.
product
.
getProductInfo
({
id
:
this
.
goodsId
}
).
then
(
res
=>
{
this
.
goodsInfo
=
res
this
.
goodsInfo
=
res
this
.
tableInfo
=
res
.
upgradeGoodsList
.
filter
(
item
=>
item
.
upgradeGoodsAlias
)
// 调试用
// 调试用
// for (let index = 0; index < 12; index++)
{
// for (let index = 0; index < 12; index++)
{
// this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0]
// this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0]
...
...
src/views/purchaseOrder/components/orderDetailDialog.vue
View file @
ac5f2c0
...
@@ -68,6 +68,10 @@ export default {
...
@@ -68,6 +68,10 @@ export default {
prop
:
'upgradeGoodsName'
prop
:
'upgradeGoodsName'
},
},
{
{
label
:
'商品编码'
,
prop
:
'productCode'
},
{
label
:
'系列'
,
label
:
'系列'
,
prop
:
'goodsName'
prop
:
'goodsName'
},
},
...
...
src/views/purchaseOrder/index.vue
View file @
ac5f2c0
...
@@ -4,9 +4,12 @@
...
@@ -4,9 +4,12 @@
<div
class=
"container"
>
<div
class=
"container"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"table-header"
>
<div
class=
"table-header"
>
<GLButton
type=
"primary"
class=
"glbtn"
size=
"small"
@
click=
"handleCreatePurchase"
fn=
"创建采购"
>
创建采购
</GLButton>
<h2>
采购订单列表
</h2>
<!--
<el-button
type=
"primary"
size=
"small"
@
click=
"handleCreatePurchase"
>
创建采购
</el-button>
-->
<div>
<el-button
type=
"primary"
class=
"btn"
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
<GLButton
type=
"primary"
size=
"small"
@
click=
"handleCreatePurchase"
fn=
"创建采购"
>
商城采购
</GLButton>
<el-button
size=
"small"
@
click=
"handlePutStprage"
>
自采入库
</el-button>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
</div>
</div>
</div>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
...
@@ -31,9 +34,10 @@
...
@@ -31,9 +34,10 @@
</
template
>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看
</el-button>
<GLButton
type=
"text"
size=
"small"
v-show=
"scope.scope.putStatus == 1 && scope.scope.purchaseType == 2"
@
click=
"handleDelete(scope.scope)"
fn=
"删除"
>
删除
</GLButton>
<GLButton
type=
"text"
size=
"small"
v-show=
"scope.scope.putStatus == 1"
@
click=
"handleEdit(scope.scope)"
fn=
"编辑"
>
编辑
</GLButton>
<GLButton
type=
"text"
size=
"small"
v-show=
"scope.scope.status == 1"
@
click=
"handleCancel(scope.scope)"
fn=
"取消"
>
取消
</GLButton>
<GLButton
type=
"text"
size=
"small"
v-show=
"scope.scope.status == 1"
@
click=
"handleCancel(scope.scope)"
fn=
"取消"
>
取消
</GLButton>
<GLButton
type=
"text"
size=
"small"
v-show=
"scope.scope.putStatus == 1 && scope.scope.deliveryStatus == 2"
@
click=
"handleWarehousing(scope.scope)"
fn=
"入库"
>
入库
</GLButton>
<GLButton
type=
"text"
size=
"small"
v-show=
"(scope.scope.putStatus == 1 && scope.scope.deliveryStatus == 2 && scope.scope.purchaseType == 1) || (scope.scope.putStatus == 1 && scope.scope.purchaseType == 2)"
@
click=
"handleWarehousing(scope.scope)"
fn=
"入库"
>
入库
</GLButton>
<!-- <el-button type="text" v-show="scope.scope.status == 1" @click="handleCancel(scope.scope)">取消</el-button> -->
</div>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -46,7 +50,7 @@
...
@@ -46,7 +50,7 @@
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
orderDeatilDialog
from
'./components/orderDetailDialog'
import
orderDeatilDialog
from
'./components/orderDetailDialog'
import
{
defaultStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
tableData
}
from
'@/utils/constants.js'
import
{
defaultStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
purchaseTypeList
}
from
'@/utils/constants.js'
export
default
{
export
default
{
name
:
'PurchaseOrder'
,
name
:
'PurchaseOrder'
,
components
:
{
components
:
{
...
@@ -61,6 +65,7 @@ export default {
...
@@ -61,6 +65,7 @@ export default {
deliveryStatus
:
''
,
deliveryStatus
:
''
,
putStatus
:
''
,
putStatus
:
''
,
merchantId
:
''
,
merchantId
:
''
,
purchaseType
:
''
,
putMerchantId
:
''
,
putMerchantId
:
''
,
sortType
:
1
,
sortType
:
1
,
orderTimeStr
:
[],
orderTimeStr
:
[],
...
@@ -72,7 +77,6 @@ export default {
...
@@ -72,7 +77,6 @@ export default {
paramsObj
:
{},
paramsObj
:
{},
// 查看门店
// 查看门店
detailVisible
:
false
,
detailVisible
:
false
,
tableData
:
tableData
,
showFormData
:
[
showFormData
:
[
{
{
label
:
'订单编号'
,
label
:
'订单编号'
,
...
@@ -107,6 +111,7 @@ export default {
...
@@ -107,6 +111,7 @@ export default {
optionLabel
:
'label'
,
optionLabel
:
'label'
,
optionsName
:
'defaultPutStatusOptions'
optionsName
:
'defaultPutStatusOptions'
},
},
{
{
label
:
'下单时间'
,
label
:
'下单时间'
,
name
:
'placeOrderTimeStr'
,
name
:
'placeOrderTimeStr'
,
...
@@ -138,6 +143,24 @@ export default {
...
@@ -138,6 +143,24 @@ export default {
optionId
:
'merchantNo'
,
optionId
:
'merchantNo'
,
optionLabel
:
'merchantName'
,
optionLabel
:
'merchantName'
,
optionsName
:
'merchantName'
optionsName
:
'merchantName'
},
{
label
:
'使用门店'
,
name
:
'storeUsage'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'merchantNo'
,
optionLabel
:
'merchantName'
,
optionsName
:
'storeUsageList'
},
{
label
:
'采购类型'
,
name
:
'purchaseType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'id'
,
optionLabel
:
'label'
,
optionsName
:
'purchaseTypeList'
}
}
],
],
// 表格
// 表格
...
@@ -219,6 +242,15 @@ export default {
...
@@ -219,6 +242,15 @@ export default {
}
}
},
},
{
{
label
:
'采购类型'
,
prop
:
'purchaseType'
,
line
:
1
,
width
:
150
,
formatter
:
cellValue
=>
{
return
(
cellValue
.
purchaseType
&&
(
cellValue
.
purchaseType
==
1
?
'商城采购'
:
'自采入库'
))
||
'--'
}
},
{
label
:
'订单状态'
,
label
:
'订单状态'
,
prop
:
'status'
,
prop
:
'status'
,
addHtml
:
'status'
,
addHtml
:
'status'
,
...
@@ -237,7 +269,9 @@ export default {
...
@@ -237,7 +269,9 @@ export default {
defaultStatusOptions
:
defaultStatusOptions
,
defaultStatusOptions
:
defaultStatusOptions
,
defaultDeliveryStatusOptions
:
defaultDeliveryStatusOptions
,
defaultDeliveryStatusOptions
:
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
:
defaultPutStatusOptions
,
defaultPutStatusOptions
:
defaultPutStatusOptions
,
merchantName
:
[]
merchantName
:
[],
storeUsageList
:[],
purchaseTypeList
:
purchaseTypeList
}
}
}
}
},
},
...
@@ -245,6 +279,7 @@ export default {
...
@@ -245,6 +279,7 @@ export default {
mounted
()
{
mounted
()
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({}).
then
(
res
=>
{
this
.
baseData
.
merchantName
=
res
this
.
baseData
.
merchantName
=
res
this
.
baseData
.
storeUsageList
=
res
this
.
getOptionsList
(
'showFormData'
)
this
.
getOptionsList
(
'showFormData'
)
})
})
},
},
...
@@ -252,7 +287,6 @@ export default {
...
@@ -252,7 +287,6 @@ export default {
methods
:
{
methods
:
{
getParams
()
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
console
.
log
(
this
.
searchForm
)
if
(
this
.
searchForm
.
placeOrderTimeStr
.
length
)
{
if
(
this
.
searchForm
.
placeOrderTimeStr
.
length
)
{
params
.
orderTimeStr
[
0
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
orderTimeStr
[
0
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
orderTimeStr
[
1
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
params
.
orderTimeStr
[
1
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
...
@@ -323,6 +357,19 @@ export default {
...
@@ -323,6 +357,19 @@ export default {
}
}
this
.
detailVisible
=
true
this
.
detailVisible
=
true
},
},
//自采入库-编辑
handleEdit
(
row
)
{
this
.
$router
.
push
({
path
:
'/purchaseOrder/into'
,
query
:
{
orderCode
:
row
.
orderCode
}
})
},
//删除
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'删除后不可恢复。是否确定删除?'
,
'purchaseShopping'
,
'purchaseOrderDelete'
,
{
orderCode
:
row
.
orderCode
})
},
//取消
//取消
handleCancel
(
row
)
{
handleCancel
(
row
)
{
this
.
secondConfirm
(
'取消'
,
'订单取消后即自动作废该订单,且无法撤回。是否确定取消?'
,
'purchaseShopping'
,
'purchaseOrderCancelOrCheck'
,
{
orderCode
:
row
.
orderCode
,
operateType
:
2
})
this
.
secondConfirm
(
'取消'
,
'订单取消后即自动作废该订单,且无法撤回。是否确定取消?'
,
'purchaseShopping'
,
'purchaseOrderCancelOrCheck'
,
{
orderCode
:
row
.
orderCode
,
operateType
:
2
})
...
@@ -361,6 +408,10 @@ export default {
...
@@ -361,6 +408,10 @@ export default {
handleCreatePurchase
()
{
handleCreatePurchase
()
{
this
.
$router
.
push
(
'/purchaseOrder/add'
)
this
.
$router
.
push
(
'/purchaseOrder/add'
)
},
},
// 自采入库
handlePutStprage
()
{
this
.
$router
.
push
(
'/purchaseOrder/into'
)
},
exportExcel
()
{
exportExcel
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
this
.
$apis
.
purchaseShopping
.
exportExcel
(
params
).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
exportExcel
(
params
).
then
(
res
=>
{
...
@@ -378,6 +429,7 @@ export default {
...
@@ -378,6 +429,7 @@ export default {
putStatus
:
''
,
putStatus
:
''
,
merchantId
:
''
,
merchantId
:
''
,
putMerchantId
:
''
,
putMerchantId
:
''
,
purchaseType
:
''
,
sortType
:
1
,
sortType
:
1
,
orderTimeStr
:
[],
orderTimeStr
:
[],
putTimeStr
:
[],
putTimeStr
:
[],
...
@@ -396,15 +448,16 @@ export default {
...
@@ -396,15 +448,16 @@ export default {
.table-header
{
.table-header
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
25px
;
margin-bottom
:
25px
;
margin-top
:
20px
;
margin-top
:
20px
;
h2
{
h2
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#333
;
color
:
#333
;
}
}
.glbtn
{
.glbtn
{
left
:
46px
;
left
:
46px
;
position
:
absolute
;
position
:
absolute
;
}
}
.btn
{
.btn
{
...
...
src/views/purchaseOrder/into.vue
0 → 100644
View file @
ac5f2c0
<
template
>
<div>
<div
class=
"container"
>
<div
class=
"table-header"
>
<h2
class=
"title"
>
采购明细
</h2>
<el-button
type=
"primary"
size=
"small"
@
click=
"addLine"
>
添加一行
</el-button>
</div>
<el-form
ref=
"addForm"
:model=
"formdata"
size=
"small"
:rules=
"rules"
>
<GLTable
ref=
"orderRef"
:tableData=
"formdata.tableData"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:hasPage=
"false"
>
<template
slot=
"upgradeGoodsId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.upgradeGoodsId'"
:rules=
"rules.upgradeGoodsId"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.upgradeGoodsId"
placeholder=
"请选择"
@
change=
"getGoodsName(scope.scope, scope.scope.upgradeGoodsId)"
>
<el-option
v-for=
"item in goodsList"
:key=
"item.upgradeGoodsId"
:label=
"item.goodsName"
:value=
"item.upgradeGoodsId"
></el-option>
</el-select>
</el-form-item>
</
template
>
<
template
slot=
"goodsNumber"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.goodsNumber'"
:rules=
"rules.goodsNumber"
>
<el-input
v-model=
"scope.scope.goodsNumber"
placeholder=
"请输入"
@
blur=
"handleCalculate(scope.scope, 'goodsNumber')"
></el-input>
</el-form-item>
</
template
>
<
template
slot=
"upgradePurchasePrice"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.upgradePurchasePrice'"
:rules=
"rules.upgradePurchasePrice"
>
<el-input
v-model=
"scope.scope.upgradePurchasePrice"
placeholder=
"请输入"
@
blur=
"handleCalculate(scope.scope, 'upgradePurchasePrice')"
></el-input>
</el-form-item>
</
template
>
<
template
slot=
"goodsTotalPrice"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.goodsTotalPrice'"
:rules=
"rules.goodsTotalPrice"
>
<el-input
v-model=
"scope.scope.goodsTotalPrice"
placeholder=
"请输入"
@
blur=
"handleCalculate(scope.scope, 'goodsTotalPrice')"
></el-input>
</el-form-item>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleDelete(scope.index)"
>
删除
</el-button>
</div>
</GLTable>
</el-form>
</div>
<GLFooter
style=
"margin-top: 16px"
>
<el-button
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"handleSave(1)"
type=
"primary"
plain
size=
"medium"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave(2)"
size=
"medium"
>
保存并入库
</el-button>
</GLFooter>
</div>
</template>
<
script
>
import
BigNumber
from
'bignumber.js'
export
default
{
data
()
{
var
checkPrice
=
(
rule
,
value
,
callback
)
=>
{
if
(
isNaN
(
+
value
))
{
callback
(
new
Error
(
'请输入数字值'
))
}
else
{
if
(
value
<=
0
||
value
>
999999
)
{
callback
(
new
Error
(
'仅支持输出0~999999纯数字'
))
}
else
{
callback
()
}
}
}
return
{
orderCode
:
this
.
$route
.
query
.
orderCode
||
''
,
rules
:
{
upgradeGoodsId
:
[{
required
:
true
,
message
:
'请选择商品名称'
,
trigger
:
'change'
}],
goodsTotalPrice
:
[
{
required
:
true
,
message
:
'请输入采购总额'
,
trigger
:
'blur'
},
{
validator
:
checkPrice
,
trigger
:
'blur'
}
],
goodsNumber
:
[
{
required
:
true
,
message
:
'请输入采购数量'
,
trigger
:
'blur'
},
{
validator
:
checkPrice
,
trigger
:
'blur'
}
],
upgradePurchasePrice
:
[
{
required
:
true
,
message
:
'请输入采购单价'
,
trigger
:
'blur'
},
{
validator
:
checkPrice
,
trigger
:
'blur'
}
]
},
formdata
:
{
tableData
:
[{
upgradeGoodsId
:
''
,
goodsCode
:
''
,
goodsName
:
''
,
goodsNumber
:
''
,
upgradePurchasePrice
:
''
,
goodsTotalPrice
:
''
}]
},
tableParams
:
{
tableOption
:
true
,
tableColumns
:
[
{
label
:
'商品名称'
,
prop
:
'upgradeGoodsId'
,
addHtml
:
'upgradeGoodsId'
},
{
label
:
'商品编码'
,
prop
:
'goodsCode'
},
{
label
:
'所属系列'
,
prop
:
'goodsName'
},
{
label
:
'采购数量'
,
prop
:
'goodsNumber'
,
addHtml
:
'goodsNumber'
},
{
label
:
'采购单价'
,
prop
:
'upgradePurchasePrice'
,
addHtml
:
'upgradePurchasePrice'
},
{
label
:
'采购总额/元'
,
prop
:
'goodsTotalPrice'
,
addHtml
:
'goodsTotalPrice'
}
]
},
goodsList
:
[]
}
},
created
()
{
this
.
getfwsGoodsList
()
if
(
this
.
orderCode
)
this
.
getData
()
},
methods
:
{
handleSave
(
saveOrWarehousing
)
{
this
.
$refs
[
'addForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
let
purchaseOrderGoodsList
=
[]
this
.
formdata
.
tableData
.
forEach
(
item
=>
{
purchaseOrderGoodsList
.
push
({
upgradeGoodsId
:
item
.
upgradeGoodsId
,
goodsName
:
item
.
goodsName
,
goodsNumber
:
item
.
goodsNumber
,
upgradePurchasePrice
:
item
.
upgradePurchasePrice
,
goodsTotalPrice
:
item
.
goodsTotalPrice
})
})
let
params
=
{
saveOrWarehousing
,
purchaseOrderGoodsList
}
if
(
this
.
orderCode
)
params
.
orderCode
=
this
.
orderCode
if
(
saveOrWarehousing
==
2
)
{
this
.
$confirm
(
'入库后自动更新对应的库存且不可撤回,可在入库管理中查看记录。是否确定入库?'
,
'入库提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$apis
.
product
.
addSelfOrder
(
params
).
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
title
:
'操作成功'
})
this
.
goBack
()
})
})
}
else
{
this
.
$apis
.
product
.
addSelfOrder
(
params
).
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
title
:
'操作成功'
})
this
.
goBack
()
})
}
}
})
},
getData
()
{
this
.
$apis
.
purchaseShopping
.
selectByOrderCode
({
orderCode
:
this
.
orderCode
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
formdata
.
tableData
=
res
})
},
handleDelete
(
index
)
{
if
(
this
.
formdata
.
tableData
.
length
==
1
)
return
this
.
formdata
.
tableData
.
splice
(
index
,
1
)
},
getfwsGoodsList
()
{
this
.
$apis
.
product
.
getfwsGoodsList
({}).
then
(
res
=>
{
this
.
goodsList
=
res
})
},
getGoodsName
(
data
,
id
)
{
this
.
goodsList
.
forEach
(
item
=>
{
if
(
item
.
upgradeGoodsId
==
id
)
{
data
.
goodsCode
=
item
.
type
data
.
goodsName
=
item
.
goodsCodeName
}
})
},
handleCalculate
(
data
,
key
)
{
if
(
key
==
'goodsNumber'
)
{
data
.
goodsTotalPrice
=
''
data
.
upgradePurchasePrice
=
''
return
}
if
(
!
data
.
goodsNumber
)
return
data
[
key
]
=
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
()
let
params
=
{
upgradePurchasePrice
:
data
=>
{
data
.
goodsTotalPrice
=
new
BigNumber
(
data
.
upgradePurchasePrice
)
.
times
(
data
.
goodsNumber
)
.
dp
(
2
)
.
toNumber
()
},
goodsTotalPrice
:
data
=>
{
data
.
upgradePurchasePrice
=
new
BigNumber
(
data
.
goodsTotalPrice
)
.
div
(
data
.
goodsNumber
)
.
dp
(
2
)
.
toNumber
()
}
}
params
[
key
](
data
)
},
addLine
()
{
this
.
formdata
.
tableData
.
push
({
upgradeGoodsId
:
''
,
goodsCode
:
''
,
goodsName
:
''
,
goodsNumber
:
''
,
upgradePurchasePrice
:
''
,
goodsTotalPrice
:
''
})
},
goBack
()
{
this
.
$router
.
go
(
-
1
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
background
:
#fff
;
padding
:
20px
;
.table-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
15px
;
}
.title
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#333333
;
margin-bottom
:
15px
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment