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