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 0ba49430
authored
May 15, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复采购管理第一轮测试bug
1 parent
e6ef6ed6
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
165 additions
and
117 deletions
src/filter/index.js
src/utils/constants.js
src/views/DeliverList/deliverAdd.vue
src/views/DeliverList/deliverDetail.vue
src/views/DeliverList/index.vue
src/views/purchaseOrder/components/orderDetailDialog.vue
src/views/purchaseOrder/index.vue
src/views/purchaseOrder/into.vue
src/filter/index.js
View file @
0ba4943
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
defaultStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
tableData
}
from
'@/utils/constants.js'
import
{
defaultStatusOptions
,
putStatusOptions
,
defaultDeliveryStatusOptions
,
defaultPutStatusOptions
,
tableData
}
from
'@/utils/constants.js'
// 发货状态
// 发货状态
Vue
.
filter
(
'deliveryStatus'
,
(
id
,
formatString
)
=>
{
Vue
.
filter
(
'deliveryStatus'
,
(
id
,
formatString
)
=>
{
const
text
=
'--'
const
text
=
'--'
...
@@ -11,7 +11,7 @@ Vue.filter('deliveryStatus', (id, formatString) => {
...
@@ -11,7 +11,7 @@ Vue.filter('deliveryStatus', (id, formatString) => {
return
text
return
text
})
})
// 入库状态
// 入库状态
Vue
.
filter
(
'pu
t
Status'
,
(
id
,
formatString
)
=>
{
Vue
.
filter
(
'puStatus'
,
(
id
,
formatString
)
=>
{
const
text
=
'--'
const
text
=
'--'
for
(
let
i
=
0
;
i
<
defaultPutStatusOptions
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
defaultPutStatusOptions
.
length
;
i
++
)
{
if
(
defaultPutStatusOptions
[
i
].
id
===
id
)
{
if
(
defaultPutStatusOptions
[
i
].
id
===
id
)
{
...
@@ -20,6 +20,16 @@ Vue.filter('deliveryStatus', (id, formatString) => {
...
@@ -20,6 +20,16 @@ Vue.filter('deliveryStatus', (id, formatString) => {
}
}
return
text
return
text
})
})
// 入库状态
Vue
.
filter
(
'putOrderStatus'
,
(
id
,
formatString
)
=>
{
const
text
=
'--'
for
(
let
i
=
0
;
i
<
putStatusOptions
.
length
;
i
++
)
{
if
(
putStatusOptions
[
i
].
id
===
id
)
{
return
putStatusOptions
[
i
].
label
}
}
return
text
})
// 订单状态状态
// 订单状态状态
Vue
.
filter
(
'orderStatus'
,
(
id
,
formatString
)
=>
{
Vue
.
filter
(
'orderStatus'
,
(
id
,
formatString
)
=>
{
...
...
src/utils/constants.js
View file @
0ba4943
...
@@ -16,9 +16,9 @@ export const defaultStatusOptions = [
...
@@ -16,9 +16,9 @@ export const defaultStatusOptions = [
id
:
4
,
id
:
4
,
label
:
"已驳回"
label
:
"已驳回"
}
}
]
]
// 发货状态
// 发货状态
export
const
defaultDeliveryStatusOptions
=
[
export
const
defaultDeliveryStatusOptions
=
[
{
{
id
:
1
,
id
:
1
,
label
:
"未发货"
label
:
"未发货"
...
@@ -31,9 +31,9 @@ export const defaultStatusOptions = [
...
@@ -31,9 +31,9 @@ export const defaultStatusOptions = [
id
:
2
,
id
:
2
,
label
:
"全部发货"
label
:
"全部发货"
}
}
]
]
export
const
putStatusOptions
=
[
export
const
putStatusOptions
=
[
{
{
id
:
1
,
id
:
1
,
label
:
"未入库"
label
:
"未入库"
...
@@ -45,9 +45,9 @@ export const defaultStatusOptions = [
...
@@ -45,9 +45,9 @@ export const defaultStatusOptions = [
id
:
2
,
id
:
2
,
label
:
"全部入库"
label
:
"全部入库"
}
}
]
]
// 入库状态
// 入库状态
export
const
defaultPutStatusOptions
=
[
export
const
defaultPutStatusOptions
=
[
{
{
id
:
1
,
id
:
1
,
label
:
"未入库"
label
:
"未入库"
...
@@ -56,9 +56,9 @@ export const defaultStatusOptions = [
...
@@ -56,9 +56,9 @@ export const defaultStatusOptions = [
id
:
2
,
id
:
2
,
label
:
"已入库"
label
:
"已入库"
}
}
]
]
//采购类型
//采购类型
export
const
purchaseTypeList
=
[
export
const
purchaseTypeList
=
[
{
{
id
:
1
,
id
:
1
,
label
:
"商城采购"
label
:
"商城采购"
...
@@ -67,7 +67,6 @@ export const defaultStatusOptions = [
...
@@ -67,7 +67,6 @@ export const defaultStatusOptions = [
id
:
2
,
id
:
2
,
label
:
"自采入库"
label
:
"自采入库"
},
},
]
]
export
const
membraneTypeList
=
[
1
,
4
,
6
,
12
,
14
]
export
const
membraneTypeList
=
[
1
,
4
,
6
,
12
,
14
]
src/views/DeliverList/deliverAdd.vue
View file @
0ba4943
...
@@ -159,7 +159,7 @@ export default {
...
@@ -159,7 +159,7 @@ export default {
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
()
:
''
data
[
key
]
=
data
[
key
]
?
new
BigNumber
(
data
[
key
]).
dp
(
2
).
toNumber
()
:
''
},
},
getMerchantList
()
{
getMerchantList
()
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({
mainPartnerMerchant
:
true
}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({
mainPartnerMerchant
:
true
}).
then
(
res
=>
{
this
.
storeUsageList
=
res
this
.
storeUsageList
=
res
if
(
this
.
storeUsageList
.
length
==
1
)
this
.
defaultSelect
()
if
(
this
.
storeUsageList
.
length
==
1
)
this
.
defaultSelect
()
})
})
...
@@ -173,15 +173,17 @@ export default {
...
@@ -173,15 +173,17 @@ export default {
item
.
goodsWarehousingList
[
0
].
yqMerchantName
=
storeUsageList
[
0
].
merchantName
item
.
goodsWarehousingList
[
0
].
yqMerchantName
=
storeUsageList
[
0
].
merchantName
item
.
goodsWarehousingList
[
0
].
yqMerchantId
=
storeUsageList
[
0
].
merchantNo
item
.
goodsWarehousingList
[
0
].
yqMerchantId
=
storeUsageList
[
0
].
merchantNo
})
})
this
.
getRefByYqShopList
(
deliveryDetailList
[
0
].
goodsWarehousingList
[
0
],
storeUsageList
[
0
].
merchantNo
)
this
.
getRefByYqShopList
(
deliveryDetailList
[
0
].
goodsWarehousingList
[
0
],
storeUsageList
[
0
].
merchantNo
)
},
},
getRefByYqShopList
(
data
,
value
)
{
getRefByYqShopList
(
data
,
value
)
{
this
.
$apis
.
purchaseShopping
.
get4SRefByYqShopList
({
scene
:
1
,
merchantId
:
value
}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
get4SRefByYqShopList
({
scene
:
1
,
merchantId
:
value
}).
then
(
res
=>
{
this
.
refByYqShopList
=
res
this
.
refByYqShopList
=
res
if
(
data
)
{
this
.
refByYqShopList
.
unshift
({
this
.
refByYqShopList
.
unshift
({
merchantName
:
data
.
yqMerchantName
,
merchantName
:
data
.
yqMerchantName
,
merchantId
:
data
.
yqMerchantId
merchantId
:
data
.
yqMerchantId
})
})
}
})
})
},
},
handleSelect
(
data
,
id
)
{
handleSelect
(
data
,
id
)
{
...
@@ -191,7 +193,7 @@ export default {
...
@@ -191,7 +193,7 @@ export default {
data
.
merchantId
=
''
data
.
merchantId
=
''
}
}
})
})
this
.
getRefByYqShopList
(
data
,
id
)
this
.
getRefByYqShopList
(
''
,
id
)
},
},
handleStoreSelect
(
data
,
id
)
{
handleStoreSelect
(
data
,
id
)
{
this
.
refByYqShopList
.
forEach
(
item
=>
{
this
.
refByYqShopList
.
forEach
(
item
=>
{
...
...
src/views/DeliverList/deliverDetail.vue
View file @
0ba4943
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</div>
</div>
<div>
<div>
发货数量:
发货数量:
<span>
{{
item
.
purchaseNumber
}}
卷
</span>
<span>
{{
item
.
purchaseType
==
2
?
`${item.purchaseNumber
}
件`
:
membraneTypeList
.
includes
(
item
.
goodsType
)
?
`${item.purchaseNumber
}
卷`
:
`${item.purchaseNumber
}
件`
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
div
>
可用库存数量:
可用库存数量:
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
<
script
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
import
{
membraneTypeList
}
from
'@/utils/constants.js'
export
default
{
export
default
{
name
:
'DeliverAdd'
,
name
:
'DeliverAdd'
,
props
:
{
props
:
{
...
@@ -73,6 +74,7 @@ export default {
...
@@ -73,6 +74,7 @@ export default {
}
,
}
,
data
()
{
data
()
{
return
{
return
{
membraneTypeList
:
membraneTypeList
,
dayjs
:
dayjs
,
dayjs
:
dayjs
,
goodsList
:
[],
goodsList
:
[],
storeUsageList
:
[],
storeUsageList
:
[],
...
...
src/views/DeliverList/index.vue
View file @
0ba4943
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<template
slot=
"putStatus"
slot-scope=
"scope"
>
<template
slot=
"putStatus"
slot-scope=
"scope"
>
<div>
<div>
<span
:class=
"[scope.scope.putStatus == 1 ? 'yellowSpot' : 'greenSpot']"
></span>
<span
:class=
"[scope.scope.putStatus == 1 ? 'yellowSpot' : 'greenSpot']"
></span>
<span>
{{
scope
.
scope
.
putStatus
|
pu
t
Status
}}
</span>
<span>
{{
scope
.
scope
.
putStatus
|
puStatus
}}
</span>
</div>
</div>
</
template
>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
deliveryNumber
:
''
,
deliveryNumber
:
''
,
deliveryCompany
:
''
,
deliveryCompany
:
''
,
putStatus
:
''
,
putStatus
:
''
,
orderCode
:
''
,
orderCode
:
this
.
$route
.
query
.
orderCode
?
this
.
$route
.
query
.
orderCode
:
''
,
merchantName
:
''
,
merchantName
:
''
,
placeOrderTimeStr
:
[]
placeOrderTimeStr
:
[]
},
},
...
@@ -216,6 +216,7 @@ export default {
...
@@ -216,6 +216,7 @@ export default {
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
this
.
tableSearchForm
=
this
.
getParams
()
console
.
log
(
this
.
tableSearchForm
)
delete
this
.
tableSearchForm
.
placeOrderTimeStr
delete
this
.
tableSearchForm
.
placeOrderTimeStr
resolve
()
resolve
()
})
})
...
...
src/views/purchaseOrder/components/orderDetailDialog.vue
View file @
0ba4943
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
收货地址:
收货地址:
<span
class=
"label"
>
{{
detailInfo
.
provinceName
}}{{
detailInfo
.
cityName
}}{{
detailInfo
.
areaName
}}{{
detailInfo
.
contactAddress
}}
</span>
<span
class=
"label"
>
{{
detailInfo
.
provinceName
}}{{
detailInfo
.
cityName
}}{{
detailInfo
.
areaName
}}{{
detailInfo
.
contactAddress
}}
</span>
</span>
</span>
<span
class=
"address"
>
<span
class=
"address"
v-if=
"detailInfo.rejectCause"
>
驳回原因:
驳回原因:
<span
class=
"label"
>
{{
detailInfo
.
rejectCause
}}
</span>
<span
class=
"label"
>
{{
detailInfo
.
rejectCause
}}
</span>
</span>
</span>
...
@@ -51,6 +51,7 @@ export default {
...
@@ -51,6 +51,7 @@ export default {
dialogShow
:
{
dialogShow
:
{
get
()
{
get
()
{
if
(
this
.
visible
)
{
if
(
this
.
visible
)
{
this
.
getDetail
({
currentPage
:
1
,
pageSize
:
20
})
this
.
getDetail
({
currentPage
:
1
,
pageSize
:
20
})
}
}
return
this
.
visible
return
this
.
visible
...
@@ -168,6 +169,7 @@ export default {
...
@@ -168,6 +169,7 @@ export default {
getDetail
(
pageObj
)
{
getDetail
(
pageObj
)
{
this
.
$apis
.
purchaseShopping
.
purchaseOrderDetail
({
orderCode
:
this
.
paramsObj
.
orderCode
,
pageSize
:
pageObj
.
pageSize
,
currentPage
:
pageObj
.
currentPage
}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
purchaseOrderDetail
({
orderCode
:
this
.
paramsObj
.
orderCode
,
pageSize
:
pageObj
.
pageSize
,
currentPage
:
pageObj
.
currentPage
}).
then
(
res
=>
{
this
.
detailInfo
=
res
this
.
detailInfo
=
res
console
.
log
(
this
.
detailInfo
)
this
.
detailInfo
.
tableData
=
res
.
pagination
.
list
this
.
detailInfo
.
tableData
=
res
.
pagination
.
list
this
.
detailInfo
.
tableTotal
=
res
.
pagination
.
total
this
.
detailInfo
.
tableTotal
=
res
.
pagination
.
total
})
})
...
...
src/views/purchaseOrder/index.vue
View file @
0ba4943
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<
template
slot=
"putStatus"
slot-scope=
"scope"
>
<
template
slot=
"putStatus"
slot-scope=
"scope"
>
<div>
<div>
<span
v-if=
"scope.scope.putStatus"
:class=
"[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"
></span>
<span
v-if=
"scope.scope.putStatus"
:class=
"[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"
></span>
<span>
{{
scope
.
scope
.
putStatus
|
putStatus
}}
</span>
<span>
{{
scope
.
scope
.
putStatus
|
put
Order
Status
}}
</span>
</div>
</div>
</
template
>
</
template
>
<
template
slot=
"status"
slot-scope=
"scope"
>
<
template
slot=
"status"
slot-scope=
"scope"
>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
</div>
</div>
<orderDeatilDialog
:visible
.
sync=
"detailVisible"
:paramsObj=
"paramsObj"
></orderDeatilDialog>
<orderDeatilDialog
:visible
.
sync=
"detailVisible"
v-if=
"detailVisible"
:paramsObj=
"paramsObj"
></orderDeatilDialog>
</div>
</div>
</template>
</template>
...
@@ -87,6 +87,20 @@ export default {
...
@@ -87,6 +87,20 @@ export default {
maxlength
:
20
maxlength
:
20
},
},
{
{
label
:
'下单时间'
,
name
:
'placeOrderTimeStr'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'beforeRangePickerOptions'
},
{
label
:
'下单商户'
,
name
:
'merchantName'
,
type
:
'input'
,
isClear
:
true
,
maxlength
:
50
},
{
label
:
'订单状态'
,
label
:
'订单状态'
,
name
:
'status'
,
name
:
'status'
,
type
:
'select'
,
type
:
'select'
,
...
@@ -114,56 +128,50 @@ export default {
...
@@ -114,56 +128,50 @@ export default {
optionsName
:
'putStatusOptions'
optionsName
:
'putStatusOptions'
},
},
{
label
:
'下单时间'
,
// {
name
:
'placeOrderTimeStr'
,
// label: '入库时间',
type
:
'datePicker'
,
// name: 'warehousingTimeStr',
isClear
:
true
,
// type: 'datePicker',
pickerOptions
:
'beforeRangePickerOptions'
// isClear: true,
},
// pickerOptions: 'beforeRangePickerOptions'
{
// },
label
:
'入库时间'
,
// {
name
:
'warehousingTimeStr'
,
// label: '下单门店',
type
:
'datePicker'
,
// name: 'merchantId',
isClear
:
true
,
// type: 'select',
pickerOptions
:
'beforeRangePickerOptions'
// optionList: [],
},
// optionId: 'merchantNo',
{
// optionLabel: 'merchantName',
label
:
'下单门店'
,
// optionsName: 'merchantName'
name
:
'merchantId'
,
// },
type
:
'select'
,
// {
optionList
:
[],
// label: '入库门店',
optionId
:
'merchantNo'
,
// name: 'putMerchantId',
optionLabel
:
'merchantName'
,
// type: 'select',
optionsName
:
'merchantName'
// optionList: [],
},
// optionId: 'merchantNo',
{
// optionLabel: 'merchantName',
label
:
'入库门店'
,
// optionsName: 'merchantName'
name
:
'putMerchantId'
,
// },
type
:
'select'
,
// {
optionList
:
[],
// label: '使用门店',
optionId
:
'merchantNo'
,
// name: 'storeUsage',
optionLabel
:
'merchantName'
,
// type: 'select',
optionsName
:
'merchantName'
// optionList: [],
},
// optionId: 'merchantNo',
{
// optionLabel: 'merchantName',
label
:
'使用门店'
,
// optionsName: 'storeUsageList'
name
:
'storeUsage'
,
// },
type
:
'select'
,
// {
optionList
:
[],
// label: '采购类型',
optionId
:
'merchantNo'
,
// name: 'purchaseType',
optionLabel
:
'merchantName'
,
// type: 'select',
optionsName
:
'storeUsageList'
// optionList: [],
},
// optionId: 'id',
{
// optionLabel: 'label',
label
:
'采购类型'
,
// optionsName: 'purchaseTypeList'
name
:
'purchaseType'
,
// }
type
:
'select'
,
optionList
:
[],
optionId
:
'id'
,
optionLabel
:
'label'
,
optionsName
:
'purchaseTypeList'
}
],
],
tableButtonList
:
[
tableButtonList
:
[
{
{
...
@@ -218,20 +226,20 @@ export default {
...
@@ -218,20 +226,20 @@ export default {
click
:
this
.
handleCancel
click
:
this
.
handleCancel
}
}
},
},
{
//
{
type
:
'GLButton'
,
//
type: 'GLButton',
name
:
'入库'
,
//
name: '入库',
attrs
:
{
//
attrs: {
type
:
'text'
,
//
type: 'text',
fn
:
'入库'
//
fn: '入库'
},
//
},
condition
:
row
=>
{
//
condition: row => {
return
(
row
.
putStatus
==
1
&&
row
.
deliveryStatus
==
2
&&
row
.
purchaseType
==
1
)
||
(
row
.
putStatus
==
1
&&
row
.
purchaseType
==
2
)
//
return (row.putStatus == 1 && row.deliveryStatus == 2 && row.purchaseType == 1) || (row.putStatus == 1 && row.purchaseType == 2)
},
//
},
listeners
:
{
//
listeners: {
click
:
this
.
handleWarehousing
//
click: this.handleWarehousing
}
//
}
},
//
},
{
{
type
:
'el-button'
,
type
:
'el-button'
,
name
:
'发货单'
,
name
:
'发货单'
,
...
@@ -307,23 +315,23 @@ export default {
...
@@ -307,23 +315,23 @@ export default {
addHtml
:
'putStatus'
,
addHtml
:
'putStatus'
,
width
:
120
width
:
120
},
},
{
//
{
label
:
'入库时间'
,
//
label: '入库时间',
prop
:
'putTime'
,
//
prop: 'putTime',
formatter
:
cellValue
=>
{
//
formatter: cellValue => {
return
cellValue
.
putTime
?
dayjs
(
cellValue
.
putTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
//
return cellValue.putTime ? dayjs(cellValue.putTime).format('YYYY-MM-DD HH:mm:ss') : '--'
},
//
},
width
:
180
//
width: 180
},
//
},
{
//
{
label
:
'入库门店'
,
//
label: '入库门店',
prop
:
'putMerchantName'
,
//
prop: 'putMerchantName',
line
:
1
,
//
line: 1,
width
:
150
,
//
width: 150,
formatter
:
cellValue
=>
{
//
formatter: cellValue => {
return
cellValue
.
putMerchantName
||
'--'
//
return cellValue.putMerchantName || '--'
}
//
}
},
//
},
{
{
label
:
'采购类型'
,
label
:
'采购类型'
,
prop
:
'purchaseType'
,
prop
:
'purchaseType'
,
...
@@ -411,8 +419,8 @@ export default {
...
@@ -411,8 +419,8 @@ export default {
.
catch
(()
=>
{})
.
catch
(()
=>
{})
})
})
},
},
handleDispatch
()
{
handleDispatch
(
data
)
{
this
.
$router
.
push
(
'/DeliverList/index'
)
this
.
$router
.
push
(
`/DeliverList/index?orderCode=
${
data
.
orderCode
}
`
)
},
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
this
.
$confirm
(
txt
,
title
,
{
...
...
src/views/purchaseOrder/into.vue
View file @
0ba4943
...
@@ -151,8 +151,31 @@ export default {
...
@@ -151,8 +151,31 @@ export default {
},
},
methods
:
{
methods
:
{
getMerchantList
()
{
getMerchantList
()
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({
mainPartnerMerchant
:
true
}).
then
(
res
=>
{
this
.
$apis
.
purchaseShopping
.
getMerchantList
({
mainPartnerMerchant
:
true
}).
then
(
res
=>
{
this
.
storeUsageList
=
res
this
.
storeUsageList
=
res
if
(
this
.
storeUsageList
.
length
==
1
)
this
.
defaultSelect
()
})
},
defaultSelect
()
{
let
{
formdata
:
{
tableData
},
storeUsageList
}
=
this
tableData
.
forEach
(
item
=>
{
item
.
putYqMerchantName
=
storeUsageList
[
0
].
merchantName
item
.
putYqMerchantId
=
storeUsageList
[
0
].
merchantNo
})
this
.
getRefByYqShopList
(
tableData
[
0
],
storeUsageList
[
0
].
merchantNo
)
},
getRefByYqShopList
(
data
,
value
)
{
this
.
$apis
.
purchaseShopping
.
get4SRefByYqShopList
({
scene
:
1
,
merchantId
:
value
}).
then
(
res
=>
{
this
.
refByYqShopList
=
res
if
(
data
)
{
this
.
refByYqShopList
.
unshift
({
merchantName
:
data
.
putYqMerchantName
,
merchantId
:
data
.
putYqMerchantId
})
}
})
})
},
},
handleSave
(
saveOrWarehousing
)
{
handleSave
(
saveOrWarehousing
)
{
...
@@ -225,11 +248,7 @@ export default {
...
@@ -225,11 +248,7 @@ export default {
}
}
})
})
},
},
getRefByYqShopList
(
value
)
{
this
.
$apis
.
purchaseShopping
.
get4SRefByYqShopList
({
scene
:
1
,
merchantId
:
value
}).
then
(
res
=>
{
this
.
refByYqShopList
=
res
})
},
handleSelect
(
data
,
id
)
{
handleSelect
(
data
,
id
)
{
this
.
storeUsageList
.
forEach
(
item
=>
{
this
.
storeUsageList
.
forEach
(
item
=>
{
if
(
item
.
merchantNo
==
id
)
{
if
(
item
.
merchantNo
==
id
)
{
...
@@ -237,7 +256,7 @@ export default {
...
@@ -237,7 +256,7 @@ export default {
data
.
putMerchantId
=
''
data
.
putMerchantId
=
''
}
}
})
})
this
.
getRefByYqShopList
(
id
)
this
.
getRefByYqShopList
(
''
,
id
)
},
},
handleStoreSelect
(
data
,
id
)
{
handleStoreSelect
(
data
,
id
)
{
this
.
refByYqShopList
.
forEach
(
item
=>
{
this
.
refByYqShopList
.
forEach
(
item
=>
{
...
@@ -283,13 +302,18 @@ export default {
...
@@ -283,13 +302,18 @@ export default {
},
},
addLine
()
{
addLine
()
{
let
{
storeUsageList
}
=
this
this
.
formdata
.
tableData
.
unshift
({
this
.
formdata
.
tableData
.
unshift
({
upgradeGoodsId
:
''
,
upgradeGoodsId
:
''
,
type
:
''
,
type
:
''
,
goodsName
:
''
,
goodsName
:
''
,
goodsNumber
:
''
,
goodsNumber
:
''
,
upgradePurchasePrice
:
''
,
upgradePurchasePrice
:
''
,
goodsTotalPrice
:
''
goodsTotalPrice
:
''
,
putYqMerchantId
:
storeUsageList
.
length
==
1
?
storeUsageList
[
0
].
merchantNo
:
''
,
putYqMerchantName
:
storeUsageList
.
length
==
1
?
storeUsageList
[
0
].
merchantName
:
''
,
putMerchantId
:
''
,
putMerchantName
:
''
})
})
},
},
goBack
()
{
goBack
()
{
...
...
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