Commit ba8631d9 by 陈婉清

Merge branch 'feature/584/cwq' into 'SAAS+V5.8.4'

Feature/584/cwq

See merge request !894
2 parents f1285c86 15a1a797
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<el-cascader v-model="searchForm.accDetailTagPath" <el-cascader v-model="searchForm.accDetailTagPath"
class="tag-search-cascader" class="tag-search-cascader"
placeholder="请选择" placeholder="请选择"
popper-class="tag-search-cascader-popper"
separator=" / " separator=" / "
clearable clearable
filterable filterable
...@@ -1150,6 +1151,13 @@ export default { ...@@ -1150,6 +1151,13 @@ export default {
}; };
</script> </script>
<style lang="scss">
.tag-search-cascader-popper .el-cascader-panel .el-radio__inner {
width: 18px !important;
height: 18px !important;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.count-txt { .count-txt {
font-weight: 700; font-weight: 700;
......
...@@ -245,6 +245,10 @@ export default { ...@@ -245,6 +245,10 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
isDetail: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -277,15 +281,14 @@ export default { ...@@ -277,15 +281,14 @@ export default {
if (this.useEdit) { if (this.useEdit) {
await this.getCalculateData(); await this.getCalculateData();
} }
if (this.isDetail) {
await this.refreshTableData();
return;
}
await this.withLoading(async () => { await this.withLoading(async () => {
const { profitRateCalFinish } = await getShelfProductUpdateStep({ businessCode: this.businessCode }); const { profitRateCalFinish } = await getShelfProductUpdateStep({ businessCode: this.businessCode });
if (profitRateCalFinish === "Y") { if (profitRateCalFinish === "Y") {
await this.getTableData(); await this.refreshTableData();
await this.$nextTick();
await this.setTableHeight();
if (this.$refs.tableRef) {
this.$refs.tableRef.doLayout();
}
return; return;
} }
if (this.useEdit) { if (this.useEdit) {
...@@ -342,6 +345,14 @@ export default { ...@@ -342,6 +345,14 @@ export default {
this.table.query.pages = pages; this.table.query.pages = pages;
this.table.query.total = total; this.table.query.total = total;
}, },
async refreshTableData() {
await this.getTableData();
await this.$nextTick();
await this.setTableHeight();
if (this.$refs.tableRef) {
this.$refs.tableRef.doLayout();
}
},
async setTableHeight() { async setTableHeight() {
const tableWrapperRef = this.$refs.tableWrapperRef; const tableWrapperRef = this.$refs.tableWrapperRef;
......
...@@ -221,9 +221,9 @@ ...@@ -221,9 +221,9 @@
</el-col> </el-col>
<el-col v-if="showUpgradeProductCostStyle" :span="12"> <el-col v-if="showUpgradeProductCostStyle" :span="12">
<el-form-item label="商品成本带入方式:" <el-form-item label="产品成本获取方式:"
prop="detailList[0].upgradeProductCostStyle" prop="detailList[0].upgradeProductCostStyle"
:rules="[{ required: true, message: '请选择商品成本带入方式', trigger: 'change' }]"> :rules="[{ required: true, message: '请选择产品成本获取方式', trigger: 'change' }]">
<el-radio-group v-model="product.detailList[0].upgradeProductCostStyle" <el-radio-group v-model="product.detailList[0].upgradeProductCostStyle"
@change="handleUpgradeProductCostStyleChange"> @change="handleUpgradeProductCostStyleChange">
<template v-for="item in options.productCostStyleOpt"> <template v-for="item in options.productCostStyleOpt">
...@@ -469,7 +469,7 @@ export default { ...@@ -469,7 +469,7 @@ export default {
this.dialog.selectGoods.show = false; this.dialog.selectGoods.show = false;
}, },
// 商品成本带入方式变动 更新成本 // 产品成本获取方式变动 更新成本
async updateCost() { async updateCost() {
// 如果是自定义成本带入方式 则 不更新成本 // 如果是自定义成本带入方式 则 不更新成本
if (isUpgradeProductCostStyleCustom(this.product?.detailList?.[0]?.upgradeProductCostStyle)) { if (isUpgradeProductCostStyleCustom(this.product?.detailList?.[0]?.upgradeProductCostStyle)) {
...@@ -502,7 +502,7 @@ export default { ...@@ -502,7 +502,7 @@ export default {
} }
}, },
/** /**
* 商品成本带入方式 变更 * 产品成本获取方式 变更
*/ */
async handleUpgradeProductCostStyleChange(e) { async handleUpgradeProductCostStyleChange(e) {
await this.$nextTick(); await this.$nextTick();
...@@ -530,8 +530,8 @@ export default { ...@@ -530,8 +530,8 @@ export default {
upgradeGoods.positionList = upgradeGoods.position.split(",").map(Number); upgradeGoods.positionList = upgradeGoods.position.split(",").map(Number);
} }
this.$emit("update:upgradeGoods", upgradeGoods); this.$emit("update:upgradeGoods", upgradeGoods);
await this.$nextTick(); // await this.$nextTick();
await this.updateCost(); // await this.updateCost();
this.handleSelectGoodsClose(); this.handleSelectGoodsClose();
}, },
async validate() { async validate() {
......
...@@ -256,7 +256,7 @@ export async function getProductDetailDescriptionSchema(shelfType) { ...@@ -256,7 +256,7 @@ export async function getProductDetailDescriptionSchema(shelfType) {
{ {
name: "detailList.0.upgradeProductCostStyle", name: "detailList.0.upgradeProductCostStyle",
label: "产品、升级成本/件", label: "产品成本获取方式",
col: 12, col: 12,
render(h, { data, schemaItem }) { render(h, { data, schemaItem }) {
const value = get(data, schemaItem.name); const value = get(data, schemaItem.name);
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
style="height:100%;margin-top:20px"> style="height:100%;margin-top:20px">
<ProfitMarginTable style="height:680px;overflow:hidden" <ProfitMarginTable style="height:680px;overflow:hidden"
:business-code="businessCode" :business-code="businessCode"
:is-detail="true"
:use-edit="false" /> :use-edit="false" />
</FormStep> </FormStep>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
style="height:100%;margin-top:20px"> style="height:100%;margin-top:20px">
<ProfitMarginTable style="height:680px;overflow:hidden" <ProfitMarginTable style="height:680px;overflow:hidden"
:business-code="businessCode" :business-code="businessCode"
:is-detail="true"
:use-edit="false" /> :use-edit="false" />
</FormStep> </FormStep>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!