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 499e251b
authored
May 10, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
6ce32353
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
405 additions
and
106 deletions
src/api/modules/purchaseShopping.js
src/assets/css/public.scss
src/utils/constants.js
src/views/DeliverList/deliverAdd.vue
src/views/DeliverList/deliverDetail.vue
src/views/DeliverList/index.vue
src/views/purchaseOrder/add.vue
src/views/purchaseOrder/components/addressCom.vue
src/views/purchaseOrder/components/goodsDetailCom.vue
src/views/purchaseOrder/components/orderDetailDialog.vue
src/views/purchaseOrder/components/shoppingCartCom.vue
src/views/purchaseOrder/index.vue
src/views/purchaseOrder/into.vue
src/api/modules/purchaseShopping.js
View file @
499e251
...
...
@@ -222,6 +222,18 @@ export function selectByOrderCode(params) {
})
}
// 是否有发货主体
export
function
checkShipper
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseOrder.checkShipper`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 确认发货
// export function purchaseOrderConfirmDelivery(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...
...
@@ -229,4 +241,4 @@ export function selectByOrderCode(params) {
// return http(data)
// }
export
default
{
get4SRefByYqShopList
,
selectByOrderCode
,
purchaseOrderDelete
,
getMerchantList
,
purchaseOrderPutIn
,
exportExcel
,
shoppingCarUpdateNumber
,
purchaseOrderAdd
,
shoppingCarAdd
,
shoppingCarRemove
,
updateSelectedFlag
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
purchaseOrderDetail
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
export
default
{
checkShipper
,
get4SRefByYqShopList
,
selectByOrderCode
,
purchaseOrderDelete
,
getMerchantList
,
purchaseOrderPutIn
,
exportExcel
,
shoppingCarUpdateNumber
,
purchaseOrderAdd
,
shoppingCarAdd
,
shoppingCarRemove
,
updateSelectedFlag
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
purchaseOrderDetail
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
src/assets/css/public.scss
View file @
499e251
...
...
@@ -32,10 +32,6 @@ cursor: pointer;
background-size
:
100%
100%
;
margin-right
:
4px
;
}
// .el-popper{
// height:250px;
// top: 220px !important;;
// }
// .el-cascader-panel{
// height:250px;
//
}
\ No newline at end of file
.el-cascader-menu__wrap
{
height
:
204px
!
important
;
}
\ No newline at end of file
src/utils/constants.js
View file @
499e251
...
...
@@ -11,6 +11,10 @@ export const defaultStatusOptions = [
{
id
:
3
,
label
:
"已取消"
},
{
id
:
4
,
label
:
"已驳回"
}
]
...
...
src/views/DeliverList/deliverAdd.vue
View file @
499e251
...
...
@@ -11,7 +11,7 @@
</div>
<div>
发货时间:
<span>
{{
d
etailInfo
.
deliveryDate
}}
</span>
<span>
{{
d
ayjs
(
detailInfo
.
deliveryDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}}
</span>
</div>
</div>
<template
v-for=
"(item, index) in detailInfo.deliveryDetailList"
>
...
...
@@ -34,15 +34,15 @@
</div>
</div>
<el-form
ref=
"addForm"
:model=
"item"
size=
"small"
:rules=
"rules"
>
<GLTable
:tableData=
"item.goodsWare
H
ousingList"
:noDataImg=
"url"
:tableParams=
"tableParams"
:hasPage=
"false"
>
<GLTable
:tableData=
"item.goodsWare
h
ousingList"
:noDataImg=
"url"
:tableParams=
"tableParams"
:hasPage=
"false"
>
<template
slot=
"increaseStockNum"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
H
ousingList.' + scope.index + '.increaseStockNum'"
:rules=
"rules.increaseStockNum"
>
<el-input
v-model=
"scope.scope.increaseStockNum"
placeholder=
"请输入"
@
input
=
"handleCalculate(scope.scope, 'increaseStockNum')"
></el-input>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
h
ousingList.' + scope.index + '.increaseStockNum'"
:rules=
"rules.increaseStockNum"
>
<el-input
v-model=
"scope.scope.increaseStockNum"
placeholder=
"请输入"
@
blur
=
"handleCalculate(scope.scope, 'increaseStockNum')"
></el-input>
</el-form-item>
</
template
>
<!-- 入库仓库 -->
<
template
slot=
"yqMerchantId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
H
ousingList.' + scope.index + '.yqMerchantId'"
:rules=
"rules.shopMerchantName"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
h
ousingList.' + scope.index + '.yqMerchantId'"
:rules=
"rules.shopMerchantName"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.yqMerchantId"
placeholder=
"请选择"
@
change=
"handleSelect(scope.scope, scope.scope.yqMerchantId)"
>
<el-option
v-for=
"item in storeUsageList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
</el-select>
...
...
@@ -50,7 +50,7 @@
</
template
>
<!-- 入库门店 -->
<
template
slot=
"merchantId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
H
ousingList.' + scope.index + '.merchantId'"
:rules=
"rules.merchantId"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
h
ousingList.' + scope.index + '.merchantId'"
:rules=
"rules.merchantId"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.merchantId"
placeholder=
"请选择"
@
change=
"handleStoreSelect(scope.scope, scope.scope.merchantId)"
>
<el-option
v-for=
"item in refByYqShopList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
></el-option>
</el-select>
...
...
@@ -72,12 +72,18 @@
</template>
<
script
>
import
BigNumber
from
'bignumber.js'
import
*
as
dayjs
from
'dayjs'
export
default
{
name
:
'DeliverAdd'
,
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
id
:
{
type
:
String
,
default
:
''
}
},
computed
:
{
...
...
@@ -85,20 +91,29 @@ export default {
get
()
{
if
(
this
.
visible
)
{
this
.
getDetail
()
this
.
getMerchantList
()
}
return
this
.
visible
},
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
}
},
id
:
{
type
:
String
,
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
{
dayjs
:
dayjs
,
goodsList
:
[],
storeUsageList
:
[],
refByYqShopList
:
[],
...
...
@@ -126,21 +141,32 @@ export default {
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择入库仓库'
,
trigger
:
'change'
}],
merchantId
:
[{
required
:
true
,
message
:
'请选择入库门店'
,
trigger
:
'change'
}],
increaseStockNum
:
[
{
required
:
true
,
message
:
'请输入入库数量'
,
trigger
:
'blur'
}
//
{ validator: checkPrice, trigger: 'blur' }
{
required
:
true
,
message
:
'请输入入库数量'
,
trigger
:
'blur'
}
,
{
validator
:
checkPrice
,
trigger
:
'blur'
}
]
},
detailInfo
:
{}
}
},
created
()
{
this
.
getMerchantList
()
},
created
()
{},
methods
:
{
handleCalculate
(){},
handleCalculate
(
data
,
key
)
{
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
()
:
''
},
getMerchantList
()
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({}).
then
(
res
=>
{
this
.
storeUsageList
=
res
if
(
this
.
storeUsageList
.
length
==
1
)
this
.
defaultSelect
()
})
},
defaultSelect
()
{
let
{
detailInfo
:
{
deliveryDetailList
},
storeUsageList
}
=
this
deliveryDetailList
.
forEach
(
item
=>
{
item
.
goodsWarehousingList
[
0
].
yqMerchantName
=
storeUsageList
[
0
].
merchantName
item
.
goodsWarehousingList
[
0
].
yqMerchantId
=
storeUsageList
[
0
].
merchantNo
})
},
getRefByYqShopList
(
value
)
{
...
...
@@ -170,53 +196,79 @@ export default {
getDetail
()
{
this
.
$apis
.
delivery
.
getDeliveryDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
res
.
data
.
deliveryDetailList
.
forEach
(
item
=>
{
item
.
goodsWarehousingList
=
!
item
.
goodsWarehousingList
?
[
{
increaseStockNum
:
''
,
yqMerchantId
:
''
,
yqMerchantName
:
''
,
merchantId
:
''
,
merchantName
:
''
}
]
:
item
.
goodsWarehousingList
})
this
.
detailInfo
=
res
.
data
}
})
},
handleDelete
(
index
,
line
)
{
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWare
H
ousingList
.
splice
(
line
,
1
)
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWare
h
ousingList
.
splice
(
line
,
1
)
},
addLineTable
(
index
)
{
if
(
!
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
)
{
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
=
[]
}
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWare
H
ousingList
.
push
({
let
{
storeUsageList
}
=
this
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWare
h
ousingList
.
push
({
increaseStockNum
:
''
,
yqMerchantId
:
''
,
yqMerchantName
:
''
,
yqMerchantId
:
storeUsageList
.
length
==
1
?
storeUsageList
[
0
].
merchantNo
:
''
,
yqMerchantName
:
storeUsageList
.
length
==
1
?
storeUsageList
[
0
].
merchantName
:
''
,
merchantId
:
''
,
merchantName
:
''
})
let
data
=
this
.
detailInfo
.
deliveryDetailList
this
.
$set
(
data
,
index
,
data
[
index
])
},
validateForm
(
form
)
{
return
new
Promise
(
resolve
=>
{
form
.
validate
(
valid
=>
{
if
(
valid
)
{
resolve
()
}
})
})
},
handleSave
()
{
console
.
log
(
this
.
$refs
[
'addForm'
])
this
.
$refs
[
'addForm'
].
forEachvalidate
(
valid
=>
{
if
(
valid
)
{
// this.formdata.tableData.forEach(item => {
// purchaseOrderGoodsList.push({
// upgradeGoodsId: item.upgradeGoodsId,
// goodsName: item.goodsName,
// goodsNumber: item.goodsNumber,
// upgradePurchasePrice: item.upgradePurchasePrice,
// goodsTotalPrice: item.goodsTotalPrice
// })
// })
let
params
=
{
deliveryDetailList
:
this
.
detailInfo
.
deliveryDetailList
,
id
:
this
.
id
}
params
.
id
=
this
.
id
this
.
$apis
.
delivery
.
addPurchaseOrder
(
params
).
then
(
res
=>
{
this
.
$notify
({
let
num
=
0
this
.
$refs
[
'addForm'
].
forEach
(
async
item
=>
{
try
{
await
this
.
validateForm
(
item
)
num
++
}
catch
(
err
)
{
console
.
log
(
err
)
}
if
(
num
==
this
.
$refs
[
'addForm'
].
length
)
{
let
params
=
{
deliveryDetailList
:
this
.
detailInfo
.
deliveryDetailList
}
params
.
id
=
this
.
id
this
.
$apis
.
delivery
.
addPurchaseOrder
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'success'
,
title
:
'操作成功'
message
:
'操作成功!'
})
this
.
dialogShow
=
false
this
.
$emit
(
'handleSuccess'
)
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
})
this
.
goBack
()
})
}
})
}
})
}
...
...
src/views/DeliverList/deliverDetail.vue
0 → 100644
View file @
499e251
<
template
>
<GLDialog
v-if=
"dialogShow"
bigTitle=
"详细信息"
mode=
"big"
:visible
.
sync=
"dialogShow"
:close-on-click-modal=
"false"
>
<div
class=
"detail-info"
>
<div>
发货单号:
<span>
{{
detailInfo
.
deliveryNumber
}}
</span>
</div>
<div>
承运公司:
<span>
{{
detailInfo
.
deliveryCompany
}}
</span>
</div>
<div>
发货时间:
<span>
{{
dayjs
(
detailInfo
.
deliveryDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}}
</span>
</div>
</div>
<template
v-for=
"(item, index) in detailInfo.deliveryDetailList"
>
<div
class=
"table-wrap"
:key=
"index"
>
<div
class=
"detail-info"
>
<div>
商品名称:
<span>
{{
item
.
upgradeGoodsName
}}
</span>
</div>
<div>
发货数量:
<span>
{{
item
.
purchaseNumber
}}
卷
</span>
</div>
<div>
可用库存数量:
<span>
{{
item
.
stockNum
}}
</span>
</div>
</div>
<el-form
ref=
"addForm"
:model=
"item"
size=
"small"
>
<GLTable
:tableData=
"item.goodsWarehousingList"
:noDataImg=
"url"
:tableParams=
"tableParams"
:hasPage=
"false"
>
</GLTable>
</el-form>
</div>
</
template
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"dialogShow = false"
>
关闭
</el-button>
</span>
</GLDialog>
</template>
<
script
>
import
*
as
dayjs
from
'dayjs'
export
default
{
name
:
'DeliverAdd'
,
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
id
:
{
type
:
String
,
default
:
''
}
},
computed
:
{
dialogShow
:
{
get
()
{
if
(
this
.
visible
)
{
this
.
getDetail
()
}
return
this
.
visible
},
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
}
}
},
data
()
{
return
{
dayjs
:
dayjs
,
goodsList
:
[],
storeUsageList
:
[],
refByYqShopList
:
[],
tableParams
:
{
tableOption
:
false
,
tableColumns
:
[
{
label
:
'入库数量/米'
,
prop
:
'increaseStockNum'
,
},
{
label
:
'入库仓库'
,
prop
:
'yqMerchantName'
,
},
{
label
:
'入库门店'
,
prop
:
'merchantName'
}
]
},
detailInfo
:
{}
}
},
created
()
{},
methods
:
{
handleDetailClose
()
{
this
.
dialogShow
=
false
},
getDetail
()
{
this
.
$apis
.
delivery
.
getDeliveryDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
detailInfo
=
res
.
data
}
})
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.detail-info
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
color
:
#666666
ff
;
font-size
:
14px
;
margin-bottom
:
16px
;
span
{
color
:
#333333
ff
;
}
.add-btn
{
font-size
:
14px
;
color
:
#5850ff
;
cursor
:
pointer
;
}
}
.table-wrap
{
border
:
1px
solid
#e5e5e5
;
padding
:
16px
;
box-sizing
:
border-box
;
margin-top
:
16px
;
/deep/
.el-form-item__error
{
padding-top
:
2px
;
z-index
:
9999999
;
position
:
static
;
}
}
</
style
>
src/views/DeliverList/index.vue
View file @
499e251
...
...
@@ -3,7 +3,7 @@
<div
class=
"purchase"
>
<div
class=
"container"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"table-header"
>
<div
class=
"table-header"
>
<h2>
发货单列表
</h2>
<div>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
...
...
@@ -24,7 +24,8 @@
</GLTable>
<!-- 表格区域 end -->
</div>
<deliver-add
:visible
.
sync=
"addVisible"
:id=
"id"
></deliver-add>
<deliver-add
:visible
.
sync=
"addVisible"
:id=
"id"
@
handleSuccess=
"handleSearch"
></deliver-add>
<deliver-detail
:visible
.
sync=
"detailVisible"
:id=
"id"
></deliver-detail>
</div>
</template>
...
...
@@ -32,11 +33,13 @@
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
DeliverAdd
from
'./deliverAdd'
import
DeliverDetail
from
'./deliverDetail'
import
{
defaultStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
purchaseTypeList
}
from
'@/utils/constants.js'
export
default
{
name
:
'PurchaseOrder'
,
components
:
{
DeliverAdd
DeliverAdd
,
DeliverDetail
},
data
()
{
return
{
...
...
@@ -46,14 +49,15 @@ export default {
deliveryNumber
:
''
,
deliveryCompany
:
''
,
putStatus
:
''
,
orderCode
:
''
,
merchantName
:
''
,
orderCode
:
''
,
merchantName
:
''
,
placeOrderTimeStr
:
[]
},
tableSearchForm
:
{},
id
:
''
,
// 查看门店
addVisible
:
false
,
detailVisible
:
false
,
showFormData
:
[
{
label
:
'承运单号'
,
...
...
@@ -114,6 +118,9 @@ export default {
type
:
'text'
,
fn
:
'入库'
},
condition
:
row
=>
{
return
row
.
putStatus
==
1
},
listeners
:
{
click
:
this
.
handleWarehousing
}
...
...
@@ -196,7 +203,7 @@ export default {
params
.
deliveryDateStart
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
deliveryDateEnd
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
delete
params
.
placeOrderTimeStr
return
params
},
...
...
@@ -208,12 +215,15 @@ export default {
})
},
// 入库
handleWarehousing
(
row
)
{
this
.
id
=
row
.
id
this
.
addVisible
=
true
},
handleDetail
(
row
)
{
this
.
id
=
row
.
id
this
.
detailVisible
=
true
},
//自采入库-编辑
handleEdit
(
row
)
{
this
.
$router
.
push
({
...
...
@@ -284,8 +294,8 @@ export default {
deliveryNumber
:
''
,
deliveryCompany
:
''
,
putStatus
:
''
,
orderCode
:
''
,
merchantName
:
''
,
orderCode
:
''
,
merchantName
:
''
,
placeOrderTimeStr
:
[]
}
this
.
handleSearch
()
...
...
src/views/purchaseOrder/add.vue
View file @
499e251
...
...
@@ -22,7 +22,7 @@
</span>
<span
class=
"address"
>
收货地址:
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'contactAddress'
)
}}
</span>
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'
provinceName'
)
}}{{
$$
(
addressInfo
,
'cityName'
)
}}{{
$$
(
addressInfo
,
'areaName'
)
}}{{
$$
(
addressInfo
,
'
contactAddress'
)
}}
</span>
</span>
</div>
</div>
...
...
@@ -179,6 +179,7 @@ export default {
.
then
(
result
=>
{
if
(
result
)
{
this
.
addressInfo
=
result
console
.
log
(
this
.
addressInfo
)
}
if
(
this
.
showOrderCom
)
{
...
...
src/views/purchaseOrder/components/addressCom.vue
View file @
499e251
...
...
@@ -106,29 +106,45 @@ export default {
watch
:
{
visible
(
val
)
{
if
(
val
)
{
this
.
getAreaInfo
()
if
(
this
.
addressInfo
)
{
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
this
.
addressInfo
)
// this.editForm.provincesAndCities = [this.addressInfo.provinceId, this.addressInfo.cityId, this.addressInfo.countyId
]
this
.
editForm
.
provincesAndCities
=
[
String
(
this
.
editForm
.
provinceId
),
String
(
this
.
editForm
.
cityId
),
String
(
this
.
editForm
.
areaId
)
]
}
else
{
this
.
editForm
=
{}
}
}
}
},
created
(){
this
.
getAreaInfo
()
},
created
()
{},
methods
:
{
// 获取省市区信息
getAreaInfo
()
{
this
.
$apis
.
sysBase
.
getAreaInfoApi
({
areaType
:
'2'
}).
then
(
res
=>
{
this
.
provincesAndCities_options
=
res
.
areaList
})
},
getProvincesAndCities
()
{
const
nodesInfo
=
this
.
$refs
.
cascader
.
getCheckedNodes
()
if
(
nodesInfo
.
length
==
0
||
Object
.
prototype
.
toString
.
call
(
nodesInfo
[
0
])
!=
'[object Object]'
)
{
return
}
this
.
editForm
.
provinceId
=
nodesInfo
[
0
].
pathNodes
[
0
].
value
this
.
editForm
.
provinceName
=
nodesInfo
[
0
].
pathNodes
[
0
].
label
this
.
editForm
.
cityId
=
nodesInfo
[
0
].
pathNodes
[
1
].
value
this
.
editForm
.
cityName
=
nodesInfo
[
0
].
pathNodes
[
1
].
label
this
.
editForm
.
areaId
=
nodesInfo
[
0
].
pathNodes
[
2
].
value
this
.
editForm
.
areaName
=
nodesInfo
[
0
].
pathNodes
[
2
].
label
},
submit
()
{
console
.
log
(
this
.
editForm
.
provincesAndCities
)
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
getProvincesAndCities
()
const
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
delete
params
.
provincesAndCities
this
.
$apis
.
purchaseShopping
.
addressSave
(
params
)
.
then
(
result
=>
{
...
...
@@ -166,7 +182,5 @@ export default {
.footer-btn
{
text-align
:
center
;
}
}
</
style
>
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
499e251
...
...
@@ -20,7 +20,7 @@
<span
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
||
0
}}
笔
</span>
</span>
</div>
<div
class=
"productCode"
>
商品编码:
465365684631436
</div>
<div
class=
"productCode"
>
商品编码:
{{
goodsInfo
.
type
}}
</div>
<div
class=
"skuCon"
>
<div
class=
"label"
>
规格:
</div>
<div
class=
"itemCon"
>
...
...
@@ -151,8 +151,7 @@ export default {
getGoodsDetail
()
{
this
.
$apis
.
product
.
getProductInfo
({
id
:
this
.
goodsId
}
).
then
(
res
=>
{
this
.
goodsInfo
=
res
this
.
tableInfo
=
res
.
upgradeGoodsList
.
filter
(
item
=>
item
.
upgradeGoodsAlias
)
// 调试用
this
.
tableInfo
=
res
.
upgradeGoodsList
.
merchantGoodsInfoList
// for (let index = 0; index < 12; index++)
{
// this.goodsInfo.upgradeGoodsList[index] = this.goodsInfo.upgradeGoodsList[0]
//
}
...
...
@@ -335,5 +334,6 @@ export default {
font
-
size
:
14
px
;
color
:
#
666666
;
margin
-
bottom
:
16
px
;
padding
-
left
:
18
px
;
}
<
/style
>
src/views/purchaseOrder/components/orderDetailDialog.vue
View file @
499e251
...
...
@@ -5,7 +5,7 @@
<img
src=
"@/images/addressIcon.webp"
alt=
""
class=
"icon"
/>
<span
class=
"title"
>
{{
paramsObj
.
merchantName
}}
</span>
</div>
<div
class=
"address-info"
v-if=
"paramsObj.purchaseType
==
1"
>
<div
class=
"address-info"
v-if=
"paramsObj.purchaseType
==
1"
>
<span
class=
"name"
>
收货人:
<span
class=
"label"
>
{{
detailInfo
.
contactName
}}
</span>
...
...
@@ -16,7 +16,11 @@
</span>
<span
class=
"address"
>
收货地址:
<span
class=
"label"
>
{{
detailInfo
.
contactAddress
}}
</span>
<span
class=
"label"
>
{{
detailInfo
.
provinceName
}}{{
detailInfo
.
cityName
}}{{
detailInfo
.
areaName
}}{{
detailInfo
.
contactAddress
}}
</span>
</span>
<span
class=
"address"
>
驳回原因:
<span
class=
"label"
>
{{
detailInfo
.
rejectCause
}}
</span>
</span>
</div>
<div
class=
"table-class"
>
...
...
@@ -83,9 +87,18 @@ export default {
label
:
'采购数量'
,
prop
:
'goodsNumber'
,
formatter
:
cellValue
=>
{
let
condition
=
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
`
${
cellValue
.
goodsNumber
}
卷/
${
cellValue
.
conversionValue
?
cellValue
.
goodsNumber
*
cellValue
.
conversionValue
:
'-'
}
米
`
:
`
${
cellValue
.
goodsNumber
}
件`
let
condition
=
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
`
${
cellValue
.
goodsNumber
}
卷
`
:
`
${
cellValue
.
goodsNumber
}
件`
return
this
.
paramsObj
.
purchaseType
==
1
?
condition
:
`
${
cellValue
.
goodsNumber
}
件`
return
this
.
paramsObj
.
purchaseType
==
1
?
condition
:
`
${
cellValue
.
goodsNumber
}
件`
}
},
{
label
:
'库存总量'
,
prop
:
'goodsTypeName'
,
formatter
:
cellValue
=>
{
let
condition
=
membraneTypeList
.
includes
(
cellValue
.
goodsType
)
?
`
${
cellValue
.
conversionValue
?
cellValue
.
goodsNumber
*
cellValue
.
conversionValue
:
'-'
}
米`
:
`
${
cellValue
.
goodsNumber
}
件`
return
this
.
paramsObj
.
purchaseType
==
1
?
condition
:
`
${
cellValue
.
goodsNumber
}
件`
}
},
{
...
...
@@ -93,7 +106,16 @@ export default {
prop
:
'goodsTotalPrice'
,
formatter
:
cellValue
=>
{
return
'¥'
+
cellValue
.
goodsTotalPrice
}
},
width
:
200
},
{
label
:
'入库仓库'
,
prop
:
'putYqMerchantName'
},
{
label
:
'入库门店'
,
prop
:
'putMerchantName'
}
]
},
...
...
@@ -155,7 +177,9 @@ export default {
margin-right
:
20px
;
margin-bottom
:
10px
;
}
span
+
span
{
margin-left
:
168px
;
}
.label
{
color
:
#333333
;
}
...
...
src/views/purchaseOrder/components/shoppingCartCom.vue
View file @
499e251
...
...
@@ -71,7 +71,8 @@
<
ul
class
=
"orderInfoCom"
>
<
li
class
=
"item"
v
-
for
=
"(item, index) in addressInfoList"
:
key
=
"index"
>
<
span
class
=
"label"
>
{{
item
.
label
}}
<
/span
>
<
span
class
=
"conten"
>
{{
$$
(
addressInfo
,
[
item
.
name
])
}}
<
/span
>
<
span
class
=
"conten"
v
-
if
=
"item.name == 'contactAddress'"
>
{{
$$
(
addressInfo
,
'provinceName'
)
}}
{{
$$
(
addressInfo
,
'cityName'
)
}}
{{
$$
(
addressInfo
,
'areaName'
)
}}
{{
$$
(
addressInfo
,
'contactAddress'
)
}}
<
/span
>
<
span
class
=
"conten"
v
-
else
>
{{
$$
(
addressInfo
,
[
item
.
name
])
}}
<
/span
>
<
/li
>
<
/ul
>
<
/div
>
...
...
@@ -188,13 +189,17 @@ export default {
if
(
this
.
throttleSubmit
)
return
console
.
log
(
this
.
throttleSubmit
)
console
.
log
(
'submit'
)
const
{
contactAddress
,
contactName
,
contactPhone
}
=
this
.
addressInfo
const
{
contactAddress
,
contactName
,
contactPhone
,
provinceId
,
provinceName
,
cityId
,
cityName
,
areaId
,
areaName
}
=
this
.
addressInfo
const
params
=
{
orderDelivery
:
{
contactAddress
,
contactName
,
contactPhone
}
,
contactAddress
,
contactName
,
contactPhone
,
provinceId
,
provinceName
,
cityId
,
cityName
,
areaId
,
areaName
,
shoppingCarList
:
this
.
selectList
}
this
.
throttleSubmit
=
true
...
...
@@ -214,7 +219,6 @@ export default {
//
}
}
,
handleDelete
(
upgradeGoodsId
)
{
// console.log(upgradeGoodsId)
this
.
$apis
.
purchaseShopping
.
shoppingCarRemove
({
id
:
upgradeGoodsId
}
).
then
(
result
=>
{
this
.
getGoodsList
()
}
)
...
...
@@ -426,7 +430,7 @@ li {
.
car
-
txt
{
font
-
size
:
14
px
;
color
:
#
ffffff
;
writing
-
mode
:
vertical
-
rl
;
writing
-
mode
:
vertical
-
rl
;
}
&
::
after
{
// content: "123";
...
...
@@ -582,14 +586,14 @@ li {
text
-
align
:
center
;
font
-
size
:
20
px
;
color
:
#
f8ba37
;
margin
:
20
px
0
40
px
0
;
margin
:
20
px
0
40
px
0
;
}
.
tips
{
display
:
flex
;
justify
-
content
:
space
-
between
;
span
{
margin
-
bottom
:
20
px
;
span
{
margin
-
bottom
:
20
px
;
}
}
...
...
src/views/purchaseOrder/index.vue
View file @
499e251
...
...
@@ -7,7 +7,7 @@
<h2>
采购订单列表
</h2>
<div>
<GLButton
type=
"primary"
size=
"small"
@
click=
"handleCreatePurchase"
fn=
"创建采购"
>
商城采购
</GLButton>
<GLButton
type=
"primary"
plain
size=
"small"
@
click=
"handlePutStprage"
fn=
"自采入库"
>
自采入库
</GLButton>
<GLButton
type=
"primary"
plain
size=
"small"
@
click=
"handlePutStprage"
fn=
"自采入库"
>
自采入库
</GLButton>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
</div>
</div>
...
...
@@ -183,7 +183,7 @@ export default {
fn
:
'删除'
},
condition
:
row
=>
{
return
(
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
)
return
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
},
listeners
:
{
click
:
this
.
handleDelete
...
...
@@ -197,7 +197,7 @@ export default {
fn
:
'编辑'
},
condition
:
row
=>
{
return
(
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
)
return
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
},
listeners
:
{
click
:
this
.
handleEdit
...
...
@@ -423,8 +423,7 @@ export default {
this
.
paramsObj
=
{
orderCode
:
row
.
orderCode
,
merchantName
:
row
.
merchantName
,
purchaseType
:
row
.
purchaseType
purchaseType
:
row
.
purchaseType
}
this
.
detailVisible
=
true
},
...
...
@@ -476,8 +475,26 @@ export default {
this
.
$refs
.
orderRef
.
data
.
length
?
(
this
.
$refs
.
orderRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
orderRef
.
setTableHeightFun
()
},
// 创建采购
handleCreatePurchase
()
{
this
.
$router
.
push
(
'/purchaseOrder/add'
)
async
handleCreatePurchase
()
{
let
result
=
await
this
.
checkShipper
()
console
.
log
(
result
)
if
(
result
)
this
.
$router
.
push
(
'/purchaseOrder/add'
)
},
checkShipper
()
{
return
new
Promise
(
resolve
=>
{
this
.
$apis
.
purchaseShopping
.
checkShipper
({}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
-
1
)
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
})
resolve
(
false
)
}
else
{
resolve
(
true
)
}
})
})
},
// 自采入库
handlePutStprage
()
{
...
...
src/views/purchaseOrder/into.vue
View file @
499e251
...
...
@@ -32,7 +32,7 @@
<!-- 入库仓库 -->
<
template
slot=
"putYqMerchantId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.putYqMerchantId'"
:rules=
"rules.putYqMerchantId"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.putYqMerchantId"
placeholder=
"请选择"
@
change=
"
getMerchantName
(scope.scope, scope.scope.putYqMerchantId)"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.putYqMerchantId"
placeholder=
"请选择"
@
change=
"
handleSelect
(scope.scope, scope.scope.putYqMerchantId)"
>
<el-option
v-for=
"item in storeUsageList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -40,8 +40,8 @@
<!-- 入库门店 -->
<
template
slot=
"putMerchantId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.putMerchantId'"
:rules=
"rules.putMerchantId"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.putMerchantId"
placeholder=
"请选择"
@
change=
"
getMerchantName
(scope.scope, scope.scope.putMerchantId)"
>
<el-option
v-for=
"item in refByYqShopList"
:key=
"item.
upgradeGoodsId"
:label=
"item.merchantName"
:value=
"item.upgradeGoods
Id"
></el-option>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.putMerchantId"
placeholder=
"请选择"
@
change=
"
handleStoreSelect
(scope.scope, scope.scope.putMerchantId)"
>
<el-option
v-for=
"item in refByYqShopList"
:key=
"item.
merchantId"
:label=
"item.merchantName"
:value=
"item.merchant
Id"
></el-option>
</el-select>
</el-form-item>
</
template
>
...
...
@@ -166,10 +166,10 @@ export default {
goodsNumber
:
item
.
goodsNumber
,
upgradePurchasePrice
:
item
.
upgradePurchasePrice
,
goodsTotalPrice
:
item
.
goodsTotalPrice
,
putYqMerchantId
:
item
.
putYqMerchantId
,
putYqMerchantName
:
item
.
putYqMerchantName
,
putMerchantId
:
item
.
putMerchantId
,
putMerchantName
:
item
.
putMerchantName
putYqMerchantId
:
item
.
putYqMerchantId
,
putYqMerchantName
:
item
.
putYqMerchantName
,
putMerchantId
:
item
.
putMerchantId
,
putMerchantName
:
item
.
putMerchantName
})
})
let
params
=
{
...
...
@@ -225,7 +225,27 @@ export default {
}
})
},
getMerchantName
(
data
,
id
)
{},
getRefByYqShopList
(
value
)
{
this
.
$apis
.
purchaseShopping
.
get4SRefByYqShopList
({
scene
:
1
,
merchantId
:
value
}).
then
(
res
=>
{
this
.
refByYqShopList
=
res
})
},
handleSelect
(
data
,
id
)
{
this
.
storeUsageList
.
forEach
(
item
=>
{
if
(
item
.
merchantNo
==
id
)
{
data
.
putYqMerchantName
=
item
.
merchantName
data
.
putMerchantId
=
''
}
})
this
.
getRefByYqShopList
(
id
)
},
handleStoreSelect
(
data
,
id
)
{
this
.
refByYqShopList
.
forEach
(
item
=>
{
if
(
item
.
merchantId
==
id
)
{
data
.
putMerchantName
=
item
.
merchantName
}
})
},
handleCalculate
(
data
,
key
)
{
if
(
key
==
'goodsNumber'
)
{
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
0
).
toNumber
()
:
''
...
...
@@ -261,6 +281,7 @@ export default {
}
params
[
key
](
data
)
},
addLine
()
{
this
.
formdata
.
tableData
.
unshift
({
upgradeGoodsId
:
''
,
...
...
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