|
@@ -488,33 +488,23 @@ export default {
|
|
|
watch: {
|
|
|
'formData.websitId'(newVal) {
|
|
|
this.biyaowebsitId(newVal)
|
|
|
+ this.biyaooutwarehouseList()
|
|
|
+ },
|
|
|
+ 'formData.type'(newVal) {
|
|
|
+ this.biyaooutwarehouseList()
|
|
|
},
|
|
|
'formData.outStorageId'(newValue) {
|
|
|
this.biyaooutStorageId()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- biyaooutStorageId() {
|
|
|
- if (this.formData.outStorageId && this.formData.websitId) {
|
|
|
- getGoods({
|
|
|
- websitId: this.formData.websitId,
|
|
|
- type: 'P',
|
|
|
- saleType: '零售',
|
|
|
- storageId: this.formData.outStorageId
|
|
|
- }).then(res => {
|
|
|
- this.peijianList = res.data
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.peijianList = []
|
|
|
- }
|
|
|
- },
|
|
|
- biyaowebsitId(newVal) {
|
|
|
- if (newVal) {
|
|
|
+ biyaooutwarehouseList() {
|
|
|
+ if (this.formData.type && this.formData.websitId) {
|
|
|
storageListPageV2({
|
|
|
pageNum: 1,
|
|
|
pageSize: -1,
|
|
|
params: [
|
|
|
- { param: 'a.websit_id', compare: '=', value: newVal },
|
|
|
+ { param: 'a.websit_id', compare: '=', value: this.formData.websitId },
|
|
|
{ param: 'a.status', compare: '=', value: 'true' },
|
|
|
{
|
|
|
param: 'a.type',
|
|
@@ -532,6 +522,26 @@ export default {
|
|
|
}).then(res => {
|
|
|
this.warehouseList = res.data.records
|
|
|
})
|
|
|
+ } else {
|
|
|
+ this.warehouseList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ biyaooutStorageId() {
|
|
|
+ if (this.formData.outStorageId && this.formData.websitId) {
|
|
|
+ getGoods({
|
|
|
+ websitId: this.formData.websitId,
|
|
|
+ type: 'P',
|
|
|
+ saleType: '零售',
|
|
|
+ storageId: this.formData.outStorageId
|
|
|
+ }).then(res => {
|
|
|
+ this.peijianList = res.data
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.peijianList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ biyaowebsitId(newVal) {
|
|
|
+ if (newVal) {
|
|
|
getCategory({ websitId: newVal }).then(res => {
|
|
|
this.mainList = res.data
|
|
|
})
|