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) {
...
@@ -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) {
// export function purchaseOrderConfirmDelivery(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...
@@ -229,4 +241,4 @@ export function selectByOrderCode(params) {
...
@@ -229,4 +241,4 @@ export function selectByOrderCode(params) {
// return http(data)
// 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
\ 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
\ No newline at end of file
src/assets/css/public.scss
View file @
499e251
...
@@ -32,10 +32,6 @@ cursor: pointer;
...
@@ -32,10 +32,6 @@ cursor: pointer;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
margin-right
:
4px
;
margin-right
:
4px
;
}
}
// .el-popper{
// height:250px;
// top: 220px !important;;
// }
// .el-cascader-panel{
// height:250px;
//
}
\ No newline at end of file
\ No newline at end of file
.el-cascader-menu__wrap
{
height
:
204px
!
important
;
}
\ No newline at end of file
\ No newline at end of file
src/utils/constants.js
View file @
499e251
...
@@ -11,6 +11,10 @@ export const defaultStatusOptions = [
...
@@ -11,6 +11,10 @@ export const defaultStatusOptions = [
{
{
id
:
3
,
id
:
3
,
label
:
"已取消"
label
:
"已取消"
},
{
id
:
4
,
label
:
"已驳回"
}
}
]
]
...
...
src/views/DeliverList/deliverAdd.vue
View file @
499e251
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</div>
</div>
<div>
<div>
发货时间:
发货时间:
<span>
{{
d
etailInfo
.
deliveryDate
}}
</span>
<span>
{{
d
ayjs
(
detailInfo
.
deliveryDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}}
</span>
</div>
</div>
</div>
</div>
<template
v-for=
"(item, index) in detailInfo.deliveryDetailList"
>
<template
v-for=
"(item, index) in detailInfo.deliveryDetailList"
>
...
@@ -34,15 +34,15 @@
...
@@ -34,15 +34,15 @@
</div>
</div>
</div>
</div>
<el-form
ref=
"addForm"
:model=
"item"
size=
"small"
:rules=
"rules"
>
<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"
>
<template
slot=
"increaseStockNum"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWare
H
ousingList.' + scope.index + '.increaseStockNum'"
:rules=
"rules.increaseStockNum"
>
<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-input
v-model=
"scope.scope.increaseStockNum"
placeholder=
"请输入"
@
blur
=
"handleCalculate(scope.scope, 'increaseStockNum')"
></el-input>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<!-- 入库仓库 -->
<!-- 入库仓库 -->
<
template
slot=
"yqMerchantId"
slot-scope=
"scope"
>
<
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-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-option
v-for=
"item in storeUsageList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
</el-select>
</el-select>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</
template
>
</
template
>
<!-- 入库门店 -->
<!-- 入库门店 -->
<
template
slot=
"merchantId"
slot-scope=
"scope"
>
<
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-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-option
v-for=
"item in refByYqShopList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
></el-option>
</el-select>
</el-select>
...
@@ -72,12 +72,18 @@
...
@@ -72,12 +72,18 @@
</template>
</template>
<
script
>
<
script
>
import
BigNumber
from
'bignumber.js'
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
name
:
'DeliverAdd'
,
name
:
'DeliverAdd'
,
props
:
{
props
:
{
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
id
:
{
type
:
String
,
default
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -85,20 +91,29 @@ export default {
...
@@ -85,20 +91,29 @@ export default {
get
()
{
get
()
{
if
(
this
.
visible
)
{
if
(
this
.
visible
)
{
this
.
getDetail
()
this
.
getDetail
()
this
.
getMerchantList
()
}
}
return
this
.
visible
return
this
.
visible
},
},
set
(
val
)
{
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
this
.
$emit
(
'update:visible'
,
val
)
}
}
},
id
:
{
type
:
String
,
default
:
''
}
}
},
},
data
()
{
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
{
return
{
dayjs
:
dayjs
,
goodsList
:
[],
goodsList
:
[],
storeUsageList
:
[],
storeUsageList
:
[],
refByYqShopList
:
[],
refByYqShopList
:
[],
...
@@ -126,21 +141,32 @@ export default {
...
@@ -126,21 +141,32 @@ export default {
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择入库仓库'
,
trigger
:
'change'
}],
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择入库仓库'
,
trigger
:
'change'
}],
merchantId
:
[{
required
:
true
,
message
:
'请选择入库门店'
,
trigger
:
'change'
}],
merchantId
:
[{
required
:
true
,
message
:
'请选择入库门店'
,
trigger
:
'change'
}],
increaseStockNum
:
[
increaseStockNum
:
[
{
required
:
true
,
message
:
'请输入入库数量'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入入库数量'
,
trigger
:
'blur'
}
,
//
{ validator: checkPrice, trigger: 'blur' }
{
validator
:
checkPrice
,
trigger
:
'blur'
}
]
]
},
},
detailInfo
:
{}
detailInfo
:
{}
}
}
},
},
created
()
{
created
()
{},
this
.
getMerchantList
()
},
methods
:
{
methods
:
{
handleCalculate
(){},
handleCalculate
(
data
,
key
)
{
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
()
:
''
},
getMerchantList
()
{
getMerchantList
()
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({}).
then
(
res
=>
{
this
.
storeUsageList
=
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
)
{
getRefByYqShopList
(
value
)
{
...
@@ -170,53 +196,79 @@ export default {
...
@@ -170,53 +196,79 @@ export default {
getDetail
()
{
getDetail
()
{
this
.
$apis
.
delivery
.
getDeliveryDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
$apis
.
delivery
.
getDeliveryDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
res
.
data
.
deliveryDetailList
.
forEach
(
item
=>
{
item
.
goodsWarehousingList
=
!
item
.
goodsWarehousingList
?
[
{
increaseStockNum
:
''
,
yqMerchantId
:
''
,
yqMerchantName
:
''
,
merchantId
:
''
,
merchantName
:
''
}
]
:
item
.
goodsWarehousingList
})
this
.
detailInfo
=
res
.
data
this
.
detailInfo
=
res
.
data
}
}
})
})
},
},
handleDelete
(
index
,
line
)
{
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
)
{
addLineTable
(
index
)
{
if
(
!
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
)
{
let
{
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
=
[]
storeUsageList
}
}
=
this
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWare
H
ousingList
.
push
({
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWare
h
ousingList
.
push
({
increaseStockNum
:
''
,
increaseStockNum
:
''
,
yqMerchantId
:
''
,
yqMerchantId
:
storeUsageList
.
length
==
1
?
storeUsageList
[
0
].
merchantNo
:
''
,
yqMerchantName
:
''
,
yqMerchantName
:
storeUsageList
.
length
==
1
?
storeUsageList
[
0
].
merchantName
:
''
,
merchantId
:
''
,
merchantId
:
''
,
merchantName
:
''
merchantName
:
''
})
})
let
data
=
this
.
detailInfo
.
deliveryDetailList
let
data
=
this
.
detailInfo
.
deliveryDetailList
this
.
$set
(
data
,
index
,
data
[
index
])
this
.
$set
(
data
,
index
,
data
[
index
])
},
},
validateForm
(
form
)
{
return
new
Promise
(
resolve
=>
{
form
.
validate
(
valid
=>
{
if
(
valid
)
{
resolve
()
}
})
})
},
handleSave
()
{
handleSave
()
{
console
.
log
(
this
.
$refs
[
'addForm'
])
let
num
=
0
this
.
$refs
[
'addForm'
].
forEachvalidate
(
valid
=>
{
this
.
$refs
[
'addForm'
].
forEach
(
async
item
=>
{
if
(
valid
)
{
try
{
await
this
.
validateForm
(
item
)
// this.formdata.tableData.forEach(item => {
num
++
// purchaseOrderGoodsList.push({
}
catch
(
err
)
{
// upgradeGoodsId: item.upgradeGoodsId,
console
.
log
(
err
)
// goodsName: item.goodsName,
}
// goodsNumber: item.goodsNumber,
if
(
num
==
this
.
$refs
[
'addForm'
].
length
)
{
// upgradePurchasePrice: item.upgradePurchasePrice,
let
params
=
{
// goodsTotalPrice: item.goodsTotalPrice
deliveryDetailList
:
this
.
detailInfo
.
deliveryDetailList
// })
}
// })
params
.
id
=
this
.
id
let
params
=
{
this
.
$apis
.
delivery
.
addPurchaseOrder
(
params
).
then
(
res
=>
{
deliveryDetailList
:
this
.
detailInfo
.
deliveryDetailList
,
console
.
log
(
res
)
id
:
this
.
id
if
(
res
.
code
==
0
)
{
}
this
.
$message
({
params
.
id
=
this
.
id
this
.
$apis
.
delivery
.
addPurchaseOrder
(
params
).
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
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 @@
...
@@ -3,7 +3,7 @@
<div
class=
"purchase"
>
<div
class=
"purchase"
>
<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"
>
<h2>
发货单列表
</h2>
<h2>
发货单列表
</h2>
<div>
<div>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
</div>
</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>
</div>
</template>
</template>
...
@@ -32,11 +33,13 @@
...
@@ -32,11 +33,13 @@
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
DeliverAdd
from
'./deliverAdd'
import
DeliverAdd
from
'./deliverAdd'
import
DeliverDetail
from
'./deliverDetail'
import
{
defaultStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
purchaseTypeList
}
from
'@/utils/constants.js'
import
{
defaultStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
purchaseTypeList
}
from
'@/utils/constants.js'
export
default
{
export
default
{
name
:
'PurchaseOrder'
,
name
:
'PurchaseOrder'
,
components
:
{
components
:
{
DeliverAdd
DeliverAdd
,
DeliverDetail
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -46,14 +49,15 @@ export default {
...
@@ -46,14 +49,15 @@ export default {
deliveryNumber
:
''
,
deliveryNumber
:
''
,
deliveryCompany
:
''
,
deliveryCompany
:
''
,
putStatus
:
''
,
putStatus
:
''
,
orderCode
:
''
,
orderCode
:
''
,
merchantName
:
''
,
merchantName
:
''
,
placeOrderTimeStr
:
[]
placeOrderTimeStr
:
[]
},
},
tableSearchForm
:
{},
tableSearchForm
:
{},
id
:
''
,
id
:
''
,
// 查看门店
// 查看门店
addVisible
:
false
,
addVisible
:
false
,
detailVisible
:
false
,
showFormData
:
[
showFormData
:
[
{
{
label
:
'承运单号'
,
label
:
'承运单号'
,
...
@@ -114,6 +118,9 @@ export default {
...
@@ -114,6 +118,9 @@ export default {
type
:
'text'
,
type
:
'text'
,
fn
:
'入库'
fn
:
'入库'
},
},
condition
:
row
=>
{
return
row
.
putStatus
==
1
},
listeners
:
{
listeners
:
{
click
:
this
.
handleWarehousing
click
:
this
.
handleWarehousing
}
}
...
@@ -196,7 +203,7 @@ export default {
...
@@ -196,7 +203,7 @@ export default {
params
.
deliveryDateStart
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
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'
params
.
deliveryDateEnd
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
}
delete
params
.
placeOrderTimeStr
delete
params
.
placeOrderTimeStr
return
params
return
params
},
},
...
@@ -208,12 +215,15 @@ export default {
...
@@ -208,12 +215,15 @@ export default {
})
})
},
},
// 入库
// 入库
handleWarehousing
(
row
)
{
handleWarehousing
(
row
)
{
this
.
id
=
row
.
id
this
.
id
=
row
.
id
this
.
addVisible
=
true
this
.
addVisible
=
true
},
},
handleDetail
(
row
)
{
this
.
id
=
row
.
id
this
.
detailVisible
=
true
},
//自采入库-编辑
//自采入库-编辑
handleEdit
(
row
)
{
handleEdit
(
row
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -284,8 +294,8 @@ export default {
...
@@ -284,8 +294,8 @@ export default {
deliveryNumber
:
''
,
deliveryNumber
:
''
,
deliveryCompany
:
''
,
deliveryCompany
:
''
,
putStatus
:
''
,
putStatus
:
''
,
orderCode
:
''
,
orderCode
:
''
,
merchantName
:
''
,
merchantName
:
''
,
placeOrderTimeStr
:
[]
placeOrderTimeStr
:
[]
}
}
this
.
handleSearch
()
this
.
handleSearch
()
...
...
src/views/purchaseOrder/add.vue
View file @
499e251
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</span>
</span>
<span
class=
"address"
>
<span
class=
"address"
>
收货地址:
收货地址:
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'contactAddress'
)
}}
</span>
<span
class=
"label"
>
{{
$$
(
addressInfo
,
'
provinceName'
)
}}{{
$$
(
addressInfo
,
'cityName'
)
}}{{
$$
(
addressInfo
,
'areaName'
)
}}{{
$$
(
addressInfo
,
'
contactAddress'
)
}}
</span>
</span>
</span>
</div>
</div>
</div>
</div>
...
@@ -179,6 +179,7 @@ export default {
...
@@ -179,6 +179,7 @@ export default {
.
then
(
result
=>
{
.
then
(
result
=>
{
if
(
result
)
{
if
(
result
)
{
this
.
addressInfo
=
result
this
.
addressInfo
=
result
console
.
log
(
this
.
addressInfo
)
}
}
if
(
this
.
showOrderCom
)
{
if
(
this
.
showOrderCom
)
{
...
...
src/views/purchaseOrder/components/addressCom.vue
View file @
499e251
...
@@ -106,29 +106,45 @@ export default {
...
@@ -106,29 +106,45 @@ export default {
watch
:
{
watch
:
{
visible
(
val
)
{
visible
(
val
)
{
if
(
val
)
{
if
(
val
)
{
this
.
getAreaInfo
()
if
(
this
.
addressInfo
)
{
if
(
this
.
addressInfo
)
{
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
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
{
}
else
{
this
.
editForm
=
{}
this
.
editForm
=
{}
}
}
}
}
}
}
},
},
created
(){
created
()
{},
this
.
getAreaInfo
()
},
methods
:
{
methods
:
{
// 获取省市区信息
// 获取省市区信息
getAreaInfo
()
{
getAreaInfo
()
{
this
.
$apis
.
sysBase
.
getAreaInfoApi
({
areaType
:
'2'
}).
then
(
res
=>
{
this
.
$apis
.
sysBase
.
getAreaInfoApi
({
areaType
:
'2'
}).
then
(
res
=>
{
this
.
provincesAndCities_options
=
res
.
areaList
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
()
{
submit
()
{
console
.
log
(
this
.
editForm
.
provincesAndCities
)
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
getProvincesAndCities
()
const
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
const
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
delete
params
.
provincesAndCities
this
.
$apis
.
purchaseShopping
this
.
$apis
.
purchaseShopping
.
addressSave
(
params
)
.
addressSave
(
params
)
.
then
(
result
=>
{
.
then
(
result
=>
{
...
@@ -166,7 +182,5 @@ export default {
...
@@ -166,7 +182,5 @@ export default {
.footer-btn
{
.footer-btn
{
text-align
:
center
;
text-align
:
center
;
}
}
}
}
</
style
>
</
style
>
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
499e251
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<span
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
||
0
}}
笔
</span>
<span
class=
"num"
>
{{
goodsInfo
.
purchaseOrderCount
||
0
}}
笔
</span>
</span>
</span>
</div>
</div>
<div
class=
"productCode"
>
商品编码:
465365684631436
</div>
<div
class=
"productCode"
>
商品编码:
{{
goodsInfo
.
type
}}
</div>
<div
class=
"skuCon"
>
<div
class=
"skuCon"
>
<div
class=
"label"
>
规格:
</div>
<div
class=
"label"
>
规格:
</div>
<div
class=
"itemCon"
>
<div
class=
"itemCon"
>
...
@@ -151,8 +151,7 @@ export default {
...
@@ -151,8 +151,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
)
this
.
tableInfo
=
res
.
upgradeGoodsList
.
merchantGoodsInfoList
// 调试用
// 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]
//
}
//
}
...
@@ -335,5 +334,6 @@ export default {
...
@@ -335,5 +334,6 @@ export default {
font
-
size
:
14
px
;
font
-
size
:
14
px
;
color
:
#
666666
;
color
:
#
666666
;
margin
-
bottom
:
16
px
;
margin
-
bottom
:
16
px
;
padding
-
left
:
18
px
;
}
}
<
/style
>
<
/style
>
src/views/purchaseOrder/components/orderDetailDialog.vue
View file @
499e251
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<img
src=
"@/images/addressIcon.webp"
alt=
""
class=
"icon"
/>
<img
src=
"@/images/addressIcon.webp"
alt=
""
class=
"icon"
/>
<span
class=
"title"
>
{{
paramsObj
.
merchantName
}}
</span>
<span
class=
"title"
>
{{
paramsObj
.
merchantName
}}
</span>
</div>
</div>
<div
class=
"address-info"
v-if=
"paramsObj.purchaseType
==
1"
>
<div
class=
"address-info"
v-if=
"paramsObj.purchaseType
==
1"
>
<span
class=
"name"
>
<span
class=
"name"
>
收货人:
收货人:
<span
class=
"label"
>
{{
detailInfo
.
contactName
}}
</span>
<span
class=
"label"
>
{{
detailInfo
.
contactName
}}
</span>
...
@@ -16,7 +16,11 @@
...
@@ -16,7 +16,11 @@
</span>
</span>
<span
class=
"address"
>
<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>
</span>
</div>
</div>
<div
class=
"table-class"
>
<div
class=
"table-class"
>
...
@@ -83,9 +87,18 @@ export default {
...
@@ -83,9 +87,18 @@ export default {
label
:
'采购数量'
,
label
:
'采购数量'
,
prop
:
'goodsNumber'
,
prop
:
'goodsNumber'
,
formatter
:
cellValue
=>
{
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 {
...
@@ -93,7 +106,16 @@ export default {
prop
:
'goodsTotalPrice'
,
prop
:
'goodsTotalPrice'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
'¥'
+
cellValue
.
goodsTotalPrice
return
'¥'
+
cellValue
.
goodsTotalPrice
}
},
width
:
200
},
{
label
:
'入库仓库'
,
prop
:
'putYqMerchantName'
},
{
label
:
'入库门店'
,
prop
:
'putMerchantName'
}
}
]
]
},
},
...
@@ -155,7 +177,9 @@ export default {
...
@@ -155,7 +177,9 @@ export default {
margin-right
:
20px
;
margin-right
:
20px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
span
+
span
{
margin-left
:
168px
;
}
.label
{
.label
{
color
:
#333333
;
color
:
#333333
;
}
}
...
...
src/views/purchaseOrder/components/shoppingCartCom.vue
View file @
499e251
...
@@ -71,7 +71,8 @@
...
@@ -71,7 +71,8 @@
<
ul
class
=
"orderInfoCom"
>
<
ul
class
=
"orderInfoCom"
>
<
li
class
=
"item"
v
-
for
=
"(item, index) in addressInfoList"
:
key
=
"index"
>
<
li
class
=
"item"
v
-
for
=
"(item, index) in addressInfoList"
:
key
=
"index"
>
<
span
class
=
"label"
>
{{
item
.
label
}}
<
/span
>
<
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
>
<
/li
>
<
/ul
>
<
/ul
>
<
/div
>
<
/div
>
...
@@ -188,13 +189,17 @@ export default {
...
@@ -188,13 +189,17 @@ export default {
if
(
this
.
throttleSubmit
)
return
if
(
this
.
throttleSubmit
)
return
console
.
log
(
this
.
throttleSubmit
)
console
.
log
(
this
.
throttleSubmit
)
console
.
log
(
'submit'
)
console
.
log
(
'submit'
)
const
{
contactAddress
,
contactName
,
contactPhone
}
=
this
.
addressInfo
const
{
contactAddress
,
contactName
,
contactPhone
,
provinceId
,
provinceName
,
cityId
,
cityName
,
areaId
,
areaName
}
=
this
.
addressInfo
const
params
=
{
const
params
=
{
orderDelivery
:
{
contactAddress
,
contactAddress
,
contactName
,
contactName
,
contactPhone
,
contactPhone
provinceId
,
}
,
provinceName
,
cityId
,
cityName
,
areaId
,
areaName
,
shoppingCarList
:
this
.
selectList
shoppingCarList
:
this
.
selectList
}
}
this
.
throttleSubmit
=
true
this
.
throttleSubmit
=
true
...
@@ -214,7 +219,6 @@ export default {
...
@@ -214,7 +219,6 @@ export default {
//
}
//
}
}
,
}
,
handleDelete
(
upgradeGoodsId
)
{
handleDelete
(
upgradeGoodsId
)
{
// console.log(upgradeGoodsId)
this
.
$apis
.
purchaseShopping
.
shoppingCarRemove
({
id
:
upgradeGoodsId
}
).
then
(
result
=>
{
this
.
$apis
.
purchaseShopping
.
shoppingCarRemove
({
id
:
upgradeGoodsId
}
).
then
(
result
=>
{
this
.
getGoodsList
()
this
.
getGoodsList
()
}
)
}
)
...
@@ -426,7 +430,7 @@ li {
...
@@ -426,7 +430,7 @@ li {
.
car
-
txt
{
.
car
-
txt
{
font
-
size
:
14
px
;
font
-
size
:
14
px
;
color
:
#
ffffff
;
color
:
#
ffffff
;
writing
-
mode
:
vertical
-
rl
;
writing
-
mode
:
vertical
-
rl
;
}
}
&
::
after
{
&
::
after
{
// content: "123";
// content: "123";
...
@@ -582,14 +586,14 @@ li {
...
@@ -582,14 +586,14 @@ li {
text
-
align
:
center
;
text
-
align
:
center
;
font
-
size
:
20
px
;
font
-
size
:
20
px
;
color
:
#
f8ba37
;
color
:
#
f8ba37
;
margin
:
20
px
0
40
px
0
;
margin
:
20
px
0
40
px
0
;
}
}
.
tips
{
.
tips
{
display
:
flex
;
display
:
flex
;
justify
-
content
:
space
-
between
;
justify
-
content
:
space
-
between
;
span
{
span
{
margin
-
bottom
:
20
px
;
margin
-
bottom
:
20
px
;
}
}
}
}
...
...
src/views/purchaseOrder/index.vue
View file @
499e251
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<h2>
采购订单列表
</h2>
<h2>
采购订单列表
</h2>
<div>
<div>
<GLButton
type=
"primary"
size=
"small"
@
click=
"handleCreatePurchase"
fn=
"创建采购"
>
商城采购
</GLButton>
<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>
<el-button
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
</div>
</div>
</div>
</div>
...
@@ -183,7 +183,7 @@ export default {
...
@@ -183,7 +183,7 @@ export default {
fn
:
'删除'
fn
:
'删除'
},
},
condition
:
row
=>
{
condition
:
row
=>
{
return
(
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
)
return
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
},
},
listeners
:
{
listeners
:
{
click
:
this
.
handleDelete
click
:
this
.
handleDelete
...
@@ -197,7 +197,7 @@ export default {
...
@@ -197,7 +197,7 @@ export default {
fn
:
'编辑'
fn
:
'编辑'
},
},
condition
:
row
=>
{
condition
:
row
=>
{
return
(
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
)
return
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
},
},
listeners
:
{
listeners
:
{
click
:
this
.
handleEdit
click
:
this
.
handleEdit
...
@@ -423,8 +423,7 @@ export default {
...
@@ -423,8 +423,7 @@ export default {
this
.
paramsObj
=
{
this
.
paramsObj
=
{
orderCode
:
row
.
orderCode
,
orderCode
:
row
.
orderCode
,
merchantName
:
row
.
merchantName
,
merchantName
:
row
.
merchantName
,
purchaseType
:
row
.
purchaseType
purchaseType
:
row
.
purchaseType
}
}
this
.
detailVisible
=
true
this
.
detailVisible
=
true
},
},
...
@@ -476,8 +475,26 @@ export default {
...
@@ -476,8 +475,26 @@ export default {
this
.
$refs
.
orderRef
.
data
.
length
?
(
this
.
$refs
.
orderRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
orderRef
.
setTableHeightFun
()
this
.
$refs
.
orderRef
.
data
.
length
?
(
this
.
$refs
.
orderRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
orderRef
.
setTableHeightFun
()
},
},
// 创建采购
// 创建采购
handleCreatePurchase
()
{
async
handleCreatePurchase
()
{
this
.
$router
.
push
(
'/purchaseOrder/add'
)
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
()
{
handlePutStprage
()
{
...
...
src/views/purchaseOrder/into.vue
View file @
499e251
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<!-- 入库仓库 -->
<!-- 入库仓库 -->
<
template
slot=
"putYqMerchantId"
slot-scope=
"scope"
>
<
template
slot=
"putYqMerchantId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.putYqMerchantId'"
:rules=
"rules.putYqMerchantId"
>
<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-option
v-for=
"item in storeUsageList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -40,8 +40,8 @@
...
@@ -40,8 +40,8 @@
<!-- 入库门店 -->
<!-- 入库门店 -->
<
template
slot=
"putMerchantId"
slot-scope=
"scope"
>
<
template
slot=
"putMerchantId"
slot-scope=
"scope"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'tableData.' + scope.index + '.putMerchantId'"
:rules=
"rules.putMerchantId"
>
<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-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.
upgradeGoodsId"
:label=
"item.merchantName"
:value=
"item.upgradeGoods
Id"
></el-option>
<el-option
v-for=
"item in refByYqShopList"
:key=
"item.
merchantId"
:label=
"item.merchantName"
:value=
"item.merchant
Id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
...
@@ -166,10 +166,10 @@ export default {
...
@@ -166,10 +166,10 @@ export default {
goodsNumber
:
item
.
goodsNumber
,
goodsNumber
:
item
.
goodsNumber
,
upgradePurchasePrice
:
item
.
upgradePurchasePrice
,
upgradePurchasePrice
:
item
.
upgradePurchasePrice
,
goodsTotalPrice
:
item
.
goodsTotalPrice
,
goodsTotalPrice
:
item
.
goodsTotalPrice
,
putYqMerchantId
:
item
.
putYqMerchantId
,
putYqMerchantId
:
item
.
putYqMerchantId
,
putYqMerchantName
:
item
.
putYqMerchantName
,
putYqMerchantName
:
item
.
putYqMerchantName
,
putMerchantId
:
item
.
putMerchantId
,
putMerchantId
:
item
.
putMerchantId
,
putMerchantName
:
item
.
putMerchantName
putMerchantName
:
item
.
putMerchantName
})
})
})
})
let
params
=
{
let
params
=
{
...
@@ -225,7 +225,27 @@ export default {
...
@@ -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
)
{
handleCalculate
(
data
,
key
)
{
if
(
key
==
'goodsNumber'
)
{
if
(
key
==
'goodsNumber'
)
{
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
0
).
toNumber
()
:
''
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
0
).
toNumber
()
:
''
...
@@ -261,6 +281,7 @@ export default {
...
@@ -261,6 +281,7 @@ export default {
}
}
params
[
key
](
data
)
params
[
key
](
data
)
},
},
addLine
()
{
addLine
()
{
this
.
formdata
.
tableData
.
unshift
({
this
.
formdata
.
tableData
.
unshift
({
upgradeGoodsId
:
''
,
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