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 6ce32353
authored
May 10, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
136f36fc
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
173 additions
and
116 deletions
src/api/modules/product.js
src/api/modules/purchaseShopping.js
src/api/modules/sysBase.js
src/assets/css/public.scss
src/views/DeliverList/deliverAdd.vue
src/views/purchaseOrder/components/addressCom.vue
src/views/purchaseOrder/components/goodsDetailCom.vue
src/views/purchaseOrder/into.vue
src/api/modules/product.js
View file @
6ce3235
...
@@ -60,4 +60,7 @@ const addSelfOrder = (params) => {
...
@@ -60,4 +60,7 @@ const addSelfOrder = (params) => {
sign
:
true
sign
:
true
})
})
}
}
export
default
{
addSelfOrder
,
getGoodsList
,
getProductInfo
,
getProductTypeBySceneId
,
getfwsGoodsList
}
export
default
{
addSelfOrder
,
getGoodsList
,
getProductInfo
,
getProductTypeBySceneId
,
getfwsGoodsList
}
src/api/modules/purchaseShopping.js
View file @
6ce3235
...
@@ -199,7 +199,17 @@ export function getMerchantList(params) {
...
@@ -199,7 +199,17 @@ export function getMerchantList(params) {
sign
:
true
sign
:
true
})
})
}
}
//查询园区店关联的4s店列表 -入库门店
const
get4SRefByYqShopList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.scenemerchantref.query4SRefByYqShop`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//编辑
//编辑
export
function
selectByOrderCode
(
params
)
{
export
function
selectByOrderCode
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
...
@@ -219,4 +229,4 @@ export function selectByOrderCode(params) {
...
@@ -219,4 +229,4 @@ export function selectByOrderCode(params) {
// return http(data)
// return http(data)
// }
// }
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
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
src/api/modules/sysBase.js
View file @
6ce3235
...
@@ -42,13 +42,13 @@ const uploadImg = params => {
...
@@ -42,13 +42,13 @@ const uploadImg = params => {
}
}
// 获取省市区信息
// 获取省市区信息
const
getAreaInfoApi
=
function
(
params
)
{
const
getAreaInfoApi
=
function
(
params
)
{
params
.
method
=
`
${
path
}
yseMerchantOffline.getAreaInfo`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yseMerchantOffline.getAreaInfo`
return
http
({
return
http
({
url
:
'rop-scrm-
smartcarlife
/router'
,
url
:
'rop-scrm-
boutiquecoupon
/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
sign
:
true
sign
:
true
})
})
}
}
export
default
{
getAreaInfoApi
,
getGoodsCategoryConfiguration
,
uploadImg
,
uploadVideo
}
export
default
{
getAreaInfoApi
,
getGoodsCategoryConfiguration
,
uploadImg
,
uploadVideo
}
src/assets/css/public.scss
View file @
6ce3235
...
@@ -32,3 +32,10 @@ cursor: pointer;
...
@@ -32,3 +32,10 @@ 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
src/views/DeliverList/deliverAdd.vue
View file @
6ce3235
...
@@ -34,23 +34,25 @@
...
@@ -34,23 +34,25 @@
</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
ref=
"orderRef"
:tableData=
"item.goodsWareHousingList"
:noDataImg=
"url"
:tableParams=
"tableParams"
:hasPage=
"false"
>
<GLTable
:tableData=
"item.goodsWareHousingList"
: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=
"'goodsWareHousingList.' + scope.index + '.increaseStockNum'"
:rules=
"rules.increaseStockNum"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWareHousingList.' + 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=
"请输入"
@
input=
"handleCalculate(scope.scope, 'increaseStockNum')"
></el-input>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
slot=
"shopMerchantName"
slot-scope=
"scope"
>
<!-- 入库仓库 -->
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWareHousingList.' + scope.index + '.shopMerchantName'"
:rules=
"rules.shopMerchantName"
>
<
template
slot=
"yqMerchantId"
slot-scope=
"scope"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.shopMerchantName"
placeholder=
"请选择"
@
change=
"handleSelect(scope.scope, scope.scope.shopMerchantName)"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWareHousingList.' + scope.index + '.yqMerchantId'"
:rules=
"rules.shopMerchantName"
>
<el-option
v-for=
"item in goodsList"
:key=
"item.shopMerchantName"
:label=
"item.goodsName"
:value=
"item.shopMerchantName"
></el-option>
<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>
</el-select>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
slot=
"yqMerchantName"
slot-scope=
"scope"
>
<!-- 入库门店 -->
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWareHousingList.' + scope.index + '.yqMerchantName'"
:rules=
"rules.yqMerchantName"
>
<
template
slot=
"merchantId"
slot-scope=
"scope"
>
<el-select
style=
"width: 100%"
v-model=
"scope.scope.yqMerchantName"
placeholder=
"请选择"
@
change=
"handleSelect(scope.scope, scope.scope.yqMerchantName)"
>
<el-form-item
style=
"margin-bottom: 0px"
:prop=
"'goodsWareHousingList.' + scope.index + '.merchantId'"
:rules=
"rules.merchantId"
>
<el-option
v-for=
"item in goodsList"
:key=
"item.yqMerchantName"
:label=
"item.goodsName"
:value=
"item.yqMerchantName"
></el-option>
<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>
</el-select>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
...
@@ -98,6 +100,8 @@ export default {
...
@@ -98,6 +100,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
goodsList
:
[],
goodsList
:
[],
storeUsageList
:
[],
refByYqShopList
:
[],
tableParams
:
{
tableParams
:
{
tableOption
:
true
,
tableOption
:
true
,
tableColumns
:
[
tableColumns
:
[
...
@@ -108,19 +112,19 @@ export default {
...
@@ -108,19 +112,19 @@ export default {
},
},
{
{
label
:
'入库仓库'
,
label
:
'入库仓库'
,
prop
:
'
shopMerchantName
'
,
prop
:
'
yqMerchantId
'
,
addHtml
:
'
shopMerchantName
'
addHtml
:
'
yqMerchantId
'
},
},
{
{
label
:
'入库门店'
,
label
:
'入库门店'
,
prop
:
'
yqMerchantName
'
,
prop
:
'
merchantId
'
,
addHtml
:
'
yqMerchantName
'
addHtml
:
'
merchantId
'
}
}
]
]
},
},
rules
:
{
rules
:
{
shopMerchantName
:
[{
required
:
true
,
message
:
'请选择入库仓库'
,
trigger
:
'change'
}],
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择入库仓库'
,
trigger
:
'change'
}],
yqMerchantName
:
[{
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' }
...
@@ -130,82 +134,68 @@ export default {
...
@@ -130,82 +134,68 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
get
fwsGoods
List
()
this
.
get
Merchant
List
()
},
},
methods
:
{
methods
:
{
handle
Select
(
data
)
{},
handle
Calculate
()
{},
get
fwsGoods
List
()
{
get
Merchant
List
()
{
this
.
$apis
.
p
roduct
.
getfwsGoods
List
({}).
then
(
res
=>
{
this
.
$apis
.
p
urchaseShopping
.
getMerchant
List
({}).
then
(
res
=>
{
this
.
goods
List
=
res
this
.
storeUsage
List
=
res
})
})
},
},
handleDetailClose
()
{
getRefByYqShopList
(
value
)
{
this
.
dialogShow
=
false
this
.
$apis
.
purchaseShopping
.
get4SRefByYqShopList
({
scene
:
1
,
merchantId
:
value
}).
then
(
res
=>
{
},
this
.
refByYqShopList
=
res
getDetail
()
{
})
this
.
detailInfo
=
{
deliveryDate
:
'2023/04/21 14:00'
,
deliveryCompany
:
'顺丰速运'
,
deliveryNumber
:
4435323513
,
deliveryDetailList
:
[
{
stockNum
:
2
,
purchaseNumber
:
10
,
upgradeGoodsName
:
'商品名称'
,
goodsWareHousingList
:
[
{
increaseStockNum
:
''
,
yqMerchantName
:
''
,
yqMerchantId
:
''
,
shopMerchantName
:
''
,
shopMerchantId
:
''
},
},
{
handleSelect
(
data
,
id
)
{
increaseStockNum
:
''
,
this
.
storeUsageList
.
forEach
(
item
=>
{
yqMerchantName
:
''
,
if
(
item
.
merchantNo
==
id
)
{
yqMerchantId
:
''
,
data
.
yqMerchantName
=
item
.
merchantName
shopMerchantName
:
''
,
data
.
merchantId
=
''
shopMerchantId
:
''
}
}
]
})
this
.
getRefByYqShopList
(
id
)
},
},
{
handleStoreSelect
(
data
,
id
)
{
stockNum
:
2
,
this
.
refByYqShopList
.
forEach
(
item
=>
{
purchaseNumber
:
10
,
if
(
item
.
merchantId
==
id
)
{
upgradeGoodsName
:
'商品名称'
,
data
.
merchantName
=
item
.
merchantName
goodsWareHousingList
:
[
{
increaseStockNum
:
''
,
yqMerchantName
:
''
,
yqMerchantId
:
''
,
shopMerchantName
:
''
,
shopMerchantId
:
''
}
]
}
]
}
}
})
},
handleDetailClose
()
{
this
.
dialogShow
=
false
},
getDetail
()
{
this
.
$apis
.
delivery
.
getDeliveryDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
$apis
.
delivery
.
getDeliveryDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
// this.detailInfo = res
this
.
detailInfo
=
res
.
data
}
})
})
},
},
handleDelete
(
index
,
line
)
{
handleDelete
(
index
,
line
)
{
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
.
splice
(
line
,
1
)
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
.
splice
(
line
,
1
)
},
},
addLineTable
(
index
)
{
addLineTable
(
index
)
{
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
.
unshift
({
if
(
!
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
)
{
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
=
[]
}
this
.
detailInfo
.
deliveryDetailList
[
index
].
goodsWareHousingList
.
push
({
increaseStockNum
:
''
,
increaseStockNum
:
''
,
yqMerchantName
:
''
,
yqMerchantId
:
''
,
yqMerchantId
:
''
,
shopMerchantName
:
''
,
yqMerchantName
:
''
,
shopMerchantId
:
''
merchantId
:
''
,
merchantName
:
''
})
})
let
data
=
this
.
detailInfo
.
deliveryDetailList
this
.
$set
(
data
,
index
,
data
[
index
])
},
},
handleSave
()
{
handleSave
()
{
this
.
$refs
[
'addForm'
].
validate
(
valid
=>
{
console
.
log
(
this
.
$refs
[
'addForm'
])
this
.
$refs
[
'addForm'
].
forEachvalidate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
purchaseOrderGoodsList
=
[]
// this.formdata.tableData.forEach(item => {
// this.formdata.tableData.forEach(item => {
// purchaseOrderGoodsList.push({
// purchaseOrderGoodsList.push({
// upgradeGoodsId: item.upgradeGoodsId,
// upgradeGoodsId: item.upgradeGoodsId,
...
@@ -215,18 +205,18 @@ export default {
...
@@ -215,18 +205,18 @@ export default {
// goodsTotalPrice: item.goodsTotalPrice
// goodsTotalPrice: item.goodsTotalPrice
// })
// })
// })
// })
//
let params = {
let
params
=
{
// saveOrWarehousing
,
deliveryDetailList
:
this
.
detailInfo
.
deliveryDetailList
,
// purchaseOrderGoodsList
id
:
this
.
id
//
}
}
// if (this.id)
params.id = this.id
params
.
id
=
this
.
id
// this.$apis.product.addSelf
Order(params).then(res => {
this
.
$apis
.
delivery
.
addPurchase
Order
(
params
).
then
(
res
=>
{
//
this.$notify({
this
.
$notify
({
//
type: 'success',
type
:
'success'
,
//
title: '操作成功'
title
:
'操作成功'
//
})
})
//
this.goBack()
this
.
goBack
()
//
})
})
}
}
})
})
}
}
...
...
src/views/purchaseOrder/components/addressCom.vue
View file @
6ce3235
...
@@ -55,13 +55,10 @@ export default {
...
@@ -55,13 +55,10 @@ export default {
placeholder
:
'请输入电话号码'
placeholder
:
'请输入电话号码'
},
},
{
{
label
:
''
,
label
:
'
收货地址
'
,
name
:
'provincesAndCities'
,
name
:
'provincesAndCities'
,
type
:
'other'
,
type
:
'other'
,
addHtml
:
'provincesAndCities'
,
addHtml
:
'provincesAndCities'
style
:
{
'padding-left'
:
'104px'
}
},
},
{
{
label
:
''
,
label
:
''
,
...
@@ -109,16 +106,18 @@ export default {
...
@@ -109,16 +106,18 @@ export default {
watch
:
{
watch
:
{
visible
(
val
)
{
visible
(
val
)
{
if
(
val
)
{
if
(
val
)
{
console
.
log
(
this
.
addressInfo
)
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 = [this.addressInfo.provinceId, this.addressInfo.cityId, this.addressInfo.countyId]
}
else
{
}
else
{
this
.
editForm
=
{}
this
.
editForm
=
{}
}
}
}
}
}
}
},
},
created
(){
this
.
getAreaInfo
()
},
methods
:
{
methods
:
{
// 获取省市区信息
// 获取省市区信息
getAreaInfo
()
{
getAreaInfo
()
{
...
@@ -126,12 +125,6 @@ export default {
...
@@ -126,12 +125,6 @@ export default {
this
.
provincesAndCities_options
=
res
.
areaList
this
.
provincesAndCities_options
=
res
.
areaList
})
})
},
},
handleOkFn
()
{
// console.log('您点击了确定')
},
handleRestFn
()
{
console
.
log
(
'您点击了取消'
)
},
submit
()
{
submit
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -173,5 +166,7 @@ export default {
...
@@ -173,5 +166,7 @@ export default {
.footer-btn
{
.footer-btn
{
text-align
:
center
;
text-align
:
center
;
}
}
}
}
</
style
>
</
style
>
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
6ce3235
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +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=
"skuCon"
>
<div
class=
"skuCon"
>
<div
class=
"label"
>
规格:
</div>
<div
class=
"label"
>
规格:
</div>
<div
class=
"itemCon"
>
<div
class=
"itemCon"
>
...
@@ -329,4 +330,10 @@ export default {
...
@@ -329,4 +330,10 @@ export default {
margin
-
bottom
:
16
px
;
margin
-
bottom
:
16
px
;
}
}
}
}
.
productCode
{
font
-
weight
:
400
;
font
-
size
:
14
px
;
color
:
#
666666
;
margin
-
bottom
:
16
px
;
}
<
/style
>
<
/style
>
src/views/purchaseOrder/into.vue
View file @
6ce3235
...
@@ -29,7 +29,22 @@
...
@@ -29,7 +29,22 @@
<el-input
v-model=
"scope.scope.goodsTotalPrice"
placeholder=
"请输入"
@
blur=
"handleCalculate(scope.scope, 'goodsTotalPrice')"
></el-input>
<el-input
v-model=
"scope.scope.goodsTotalPrice"
placeholder=
"请输入"
@
blur=
"handleCalculate(scope.scope, 'goodsTotalPrice')"
></el-input>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<!-- 入库仓库 -->
<
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-option
v-for=
"item in storeUsageList"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
</el-select>
</el-form-item>
</
template
>
<!-- 入库门店 -->
<
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.upgradeGoodsId"
></el-option>
</el-select>
</el-form-item>
</
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=
"handleDelete(scope.index)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.index)"
>
删除
</el-button>
</div>
</div>
...
@@ -74,10 +89,12 @@ export default {
...
@@ -74,10 +89,12 @@ export default {
upgradePurchasePrice
:
[
upgradePurchasePrice
:
[
{
required
:
true
,
message
:
'请输入采购单价'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入采购单价'
,
trigger
:
'blur'
},
{
validator
:
checkPrice
,
trigger
:
'blur'
}
{
validator
:
checkPrice
,
trigger
:
'blur'
}
]
],
putYqMerchantId
:
[{
required
:
true
,
message
:
'请选择入库仓库'
,
trigger
:
'change'
}],
putMerchantId
:
[{
required
:
true
,
message
:
'请选择入库门店'
,
trigger
:
'change'
}]
},
},
formdata
:
{
formdata
:
{
tableData
:
[{
upgradeGoodsId
:
''
,
type
:
''
,
goodsName
:
''
,
goodsNumber
:
''
,
upgradePurchasePrice
:
''
,
goodsTotalPrice
:
''
}]
tableData
:
[{
upgradeGoodsId
:
''
,
type
:
''
,
goodsName
:
''
,
goodsNumber
:
''
,
upgradePurchasePrice
:
''
,
goodsTotalPrice
:
''
,
putYqMerchantId
:
''
,
putYqMerchantName
:
''
,
putMerchantId
:
''
,
putMerchantName
:
''
}]
},
},
tableParams
:
{
tableParams
:
{
tableOption
:
true
,
tableOption
:
true
,
...
@@ -109,17 +126,35 @@ export default {
...
@@ -109,17 +126,35 @@ export default {
label
:
'采购总额/元'
,
label
:
'采购总额/元'
,
prop
:
'goodsTotalPrice'
,
prop
:
'goodsTotalPrice'
,
addHtml
:
'goodsTotalPrice'
addHtml
:
'goodsTotalPrice'
},
{
label
:
'入库仓库'
,
prop
:
'putYqMerchantId'
,
addHtml
:
'putYqMerchantId'
},
{
label
:
'入库门店'
,
prop
:
'putMerchantId'
,
addHtml
:
'putMerchantId'
}
}
]
]
},
},
goodsList
:
[]
goodsList
:
[],
storeUsageList
:
[],
refByYqShopList
:
[]
}
}
},
},
created
()
{
created
()
{
this
.
getfwsGoodsList
()
this
.
getfwsGoodsList
()
this
.
getMerchantList
()
if
(
this
.
orderCode
)
this
.
getData
()
if
(
this
.
orderCode
)
this
.
getData
()
},
},
methods
:
{
methods
:
{
getMerchantList
()
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({}).
then
(
res
=>
{
this
.
storeUsageList
=
res
})
},
handleSave
(
saveOrWarehousing
)
{
handleSave
(
saveOrWarehousing
)
{
this
.
$refs
[
'addForm'
].
validate
(
valid
=>
{
this
.
$refs
[
'addForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -130,7 +165,11 @@ export default {
...
@@ -130,7 +165,11 @@ export default {
goodsName
:
item
.
goodsName
,
goodsName
:
item
.
goodsName
,
goodsNumber
:
item
.
goodsNumber
,
goodsNumber
:
item
.
goodsNumber
,
upgradePurchasePrice
:
item
.
upgradePurchasePrice
,
upgradePurchasePrice
:
item
.
upgradePurchasePrice
,
goodsTotalPrice
:
item
.
goodsTotalPrice
goodsTotalPrice
:
item
.
goodsTotalPrice
,
putYqMerchantId
:
item
.
putYqMerchantId
,
putYqMerchantName
:
item
.
putYqMerchantName
,
putMerchantId
:
item
.
putMerchantId
,
putMerchantName
:
item
.
putMerchantName
})
})
})
})
let
params
=
{
let
params
=
{
...
@@ -166,7 +205,6 @@ export default {
...
@@ -166,7 +205,6 @@ export default {
},
},
getData
()
{
getData
()
{
this
.
$apis
.
purchaseShopping
.
selectByOrderCode
({
orderCode
:
this
.
orderCode
}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
selectByOrderCode
({
orderCode
:
this
.
orderCode
}).
then
(
res
=>
{
this
.
formdata
.
tableData
=
res
this
.
formdata
.
tableData
=
res
})
})
},
},
...
@@ -187,31 +225,38 @@ export default {
...
@@ -187,31 +225,38 @@ export default {
}
}
})
})
},
},
getMerchantName
(
data
,
id
)
{},
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
()
:
''
data
.
goodsTotalPrice
=
data
.
upgradePurchasePrice
&&
data
.
goodsNumber
?
new
BigNumber
(
data
.
upgradePurchasePrice
)
data
.
goodsTotalPrice
=
data
.
upgradePurchasePrice
&&
data
.
goodsNumber
?
new
BigNumber
(
data
.
upgradePurchasePrice
)
.
times
(
data
.
goodsNumber
)
.
times
(
data
.
goodsNumber
)
.
dp
(
2
)
.
dp
(
2
)
.
toNumber
():
''
.
toNumber
()
:
''
return
return
}
}
if
(
!
data
.
goodsNumber
)
return
if
(
!
data
.
goodsNumber
)
return
data
[
key
]
=
data
[
key
]?
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
():
''
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
()
:
''
let
params
=
{
let
params
=
{
upgradePurchasePrice
:
data
=>
{
upgradePurchasePrice
:
data
=>
{
data
.
goodsTotalPrice
=
data
.
upgradePurchasePrice
?
new
BigNumber
(
data
.
upgradePurchasePrice
)
data
.
goodsTotalPrice
=
data
.
upgradePurchasePrice
?
new
BigNumber
(
data
.
upgradePurchasePrice
)
.
times
(
data
.
goodsNumber
)
.
times
(
data
.
goodsNumber
)
.
dp
(
2
)
.
dp
(
2
)
.
toNumber
():
''
.
toNumber
()
:
''
},
},
goodsTotalPrice
:
data
=>
{
goodsTotalPrice
:
data
=>
{
data
.
upgradePurchasePrice
=
data
.
goodsTotalPrice
?
new
BigNumber
(
data
.
goodsTotalPrice
)
data
.
upgradePurchasePrice
=
data
.
goodsTotalPrice
?
new
BigNumber
(
data
.
goodsTotalPrice
)
.
div
(
data
.
goodsNumber
)
.
div
(
data
.
goodsNumber
)
.
dp
(
2
)
.
dp
(
2
)
.
toNumber
():
''
.
toNumber
()
:
''
}
}
}
}
params
[
key
](
data
)
params
[
key
](
data
)
...
@@ -255,6 +300,6 @@ export default {
...
@@ -255,6 +300,6 @@ export default {
}
}
/
deep
/
td
.el-table__cell
{
/
deep
/
td
.el-table__cell
{
height
:
64px
;
height
:
64px
;
}
}
}
}
</
style
>
</
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