Commit 25acea8a by zhangxw

联调修改

1 parent 34904a8e
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
width: 100 width: 100
}, },
{ {
label: '门店采购价', label: '门店采购价/元',
prop: 'shopPurchasePrice', prop: 'shopPurchasePrice',
formatter: cellValue => { formatter: cellValue => {
return cellValue.shopPurchasePrice ? '¥' + cellValue.shopPurchasePrice : '-' return cellValue.shopPurchasePrice ? '¥' + cellValue.shopPurchasePrice : '-'
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
width: 150 width: 150
}, },
{ {
label: '嘀加采购价', label: '嘀加采购价/元',
prop: 'upgradePurchasePrice', prop: 'upgradePurchasePrice',
formatter: cellValue => { formatter: cellValue => {
return cellValue.upgradePurchasePrice ? '¥' + cellValue.upgradePurchasePrice : '-' return cellValue.upgradePurchasePrice ? '¥' + cellValue.upgradePurchasePrice : '-'
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
width: 150 width: 150
}, },
{ {
label: '采购总价', label: '采购总价/元',
prop: 'totalPrice', prop: 'totalPrice',
formatter: cellValue => { formatter: cellValue => {
return cellValue.totalPrice ? '¥' + cellValue.totalPrice : '-' return cellValue.totalPrice ? '¥' + cellValue.totalPrice : '-'
......
...@@ -204,7 +204,8 @@ export default { ...@@ -204,7 +204,8 @@ export default {
], ],
membraneTypeList, // 膜类code集合 membraneTypeList, // 膜类code集合
goodsList: [], // 上架商品下拉框数据 goodsList: [], // 上架商品下拉框数据
currentPage: 1 currentPage: 1,
requestFlag: true
} }
}, },
...@@ -306,9 +307,6 @@ export default { ...@@ -306,9 +307,6 @@ export default {
this.getSelectingList(this.editForm?.goodsSource) // 请求接口 this.getSelectingList(this.editForm?.goodsSource) // 请求接口
}, },
visibleChange(data) { visibleChange(data) {
if ((this.editForm?.goodsSource ?? '') === '' && data) {
return this.$message.error('请选择商品来源')
}
// 获取焦点重新渲染下拉框数据 // 获取焦点重新渲染下拉框数据
if (data) { if (data) {
if (this.goodsNameKeyword) { if (this.goodsNameKeyword) {
...@@ -319,6 +317,10 @@ export default { ...@@ -319,6 +317,10 @@ export default {
} }
} }
}, },
handleGoodsFocus() {
if ((this.editForm?.goodsSource ?? '') === '')return this.$message.error('请选择商品来源')
if (!this.goodsList?.length && this.requestFlag) return this.$message.error('暂无商品')
},
// 获取更多上架商品 // 获取更多上架商品
interestsLoadmore() { interestsLoadmore() {
setTimeout(() => { setTimeout(() => {
...@@ -368,16 +370,19 @@ export default { ...@@ -368,16 +370,19 @@ export default {
upgradeGoodsNameOrType: this.goodsNameKeyword, upgradeGoodsNameOrType: this.goodsNameKeyword,
currentPage: this.currentPage, currentPage: this.currentPage,
pageSize: 10, pageSize: 10,
partnerMerchantId: this.$globalState?.session?.merchantId, // 服务商商户号 partnerMerchantId: goodsSource == 1 ? this.$globalState?.session?.merchantId : undefined, // 自营服务商商户号
partnerMerchantId2: goodsSource == 0 ? this.$globalState?.session?.merchantId : undefined, // 嘀加服务商商户号
shoppingMallFlag: goodsSource == 0 ? 1 : undefined, // 是否上架到采购商城 自营商品不需传 shoppingMallFlag: goodsSource == 0 ? 1 : undefined, // 是否上架到采购商城 自营商品不需传
status: 1, status: 1,
goodsSource, goodsSource,
partnerSceneType: 1 partnerSceneType: 1
} }
this.requestFlag = false
this.$apis.grounding['getGroundingGoodsList'](params).then(res => { this.$apis.grounding['getGroundingGoodsList'](params).then(res => {
this.allPages = res?.pages this.allPages = res?.pages
if (defaultSelect?.length && res?.list) res.list = res?.list.concat(defaultSelect) if (defaultSelect?.length && res?.list) res.list = res?.list.concat(defaultSelect)
this.goodsList = this.unique(this.goodsList.concat(res?.list || [])) || [] this.goodsList = this.unique(this.goodsList.concat(res?.list || [])) || []
this.requestFlag = true
}) })
}, },
// 去重(回显concat数据后) // 去重(回显concat数据后)
......
...@@ -237,14 +237,14 @@ export default { ...@@ -237,14 +237,14 @@ export default {
} }
}, },
{ {
label: '门店采购价', label: '门店采购价/元',
prop: 'shopPurchasePrice', prop: 'shopPurchasePrice',
formatter: cellValue => { formatter: cellValue => {
return cellValue.shopPurchasePrice ? '¥' + cellValue.shopPurchasePrice : '-' return cellValue.shopPurchasePrice ? '¥' + cellValue.shopPurchasePrice : '-'
} }
}, },
{ {
label: '嘀加采购价', label: '嘀加采购价/元',
prop: 'purchasePrice', prop: 'purchasePrice',
formatter: cellValue => { formatter: cellValue => {
return cellValue?.upgradeGoods?.purchasePrice ? '¥' + cellValue?.upgradeGoods?.purchasePrice : '-' return cellValue?.upgradeGoods?.purchasePrice ? '¥' + cellValue?.upgradeGoods?.purchasePrice : '-'
...@@ -260,14 +260,14 @@ export default { ...@@ -260,14 +260,14 @@ export default {
prop: '', prop: '',
addHtml: 'status' addHtml: 'status'
}, },
{ // {
label: '创建时间', // label: '创建时间',
prop: 'createdDate', // prop: 'createdDate',
formatter: cellValue => { // formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') // return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}, // },
width: 180 // width: 180
}, // },
{ {
label: '操作', label: '操作',
width: '180px', width: '180px',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!