Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 216c66cd
authored
Jun 10, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
产品管理新增编辑产品。修改服务项目字段位置,修改采购成本自动赋值逻辑
1 parent
587ccbbc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
38 deletions
src/views/goods/productManage/components/productManage/multipleSpecificationForm.vue
src/views/goods/productManage/components/productManage/singleSpecificationForm.vue
src/views/goods/productManage/components/productManage/multipleSpecificationForm.vue
View file @
216c66c
...
...
@@ -70,6 +70,13 @@
<span>
质保时间/年
</span>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<!-- 仅权益升级类目且供应方位广联直营展示 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
style=
"position: relative"
>
<span
class=
"color-red"
>
*
</span>
<span>
服务项目
</span>
<img
v-if=
"$$(goodsInfoData.goodsSpecificationList, 'length') && goodsInfoData.goodsSpecificationList.filter(item => item.checked).length > 0"
src=
"@/assets/icon-edit.png"
style=
"cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle"
@
click=
"serviceSelectFocus()"
/>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<td
style=
"position: relative"
>
<span
class=
"color-red"
>
*
</span>
<span>
采购成本/元
</span>
...
...
@@ -90,13 +97,6 @@
<span>
适用区域
</span>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<!-- 仅权益升级类目且供应方位广联直营展示 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
style=
"position: relative"
>
<span
class=
"color-red"
>
*
</span>
<span>
服务项目
</span>
<img
v-if=
"$$(goodsInfoData.goodsSpecificationList, 'length') && goodsInfoData.goodsSpecificationList.filter(item => item.checked).length > 0"
src=
"@/assets/icon-edit.png"
style=
"cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle"
@
click=
"serviceSelectFocus()"
/>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<td
style=
"position: relative"
>
<span>
{{ membraneTypeList.includes(goodsInfoData.goodsType) ? '参考售价(元)/车' : '参考售价(元)/件' }}
</span>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
...
...
@@ -184,6 +184,10 @@
<td>
<el-input
v-model=
"row.item.warrantyPeriod"
class=
"w-150-per"
:class=
"{ 'border-red': (!isEquityOrExtendType && filterEmpty(row.item.warrantyPeriod) && row.item.warrantyPeriodEmpty) || row.item.warrantyPeriodRangeError }"
placeholder=
"0-100"
size=
"small"
@
blur=
"handleWarrantyPeriodBlur($event, row.originalIndex)"
@
input=
"handleWarrantyPeriodInput($event, row.originalIndex)"
></el-input>
</td>
<!-- 权益服务项目 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
>
<el-select
:ref=
"`serviceSelect${row.originalIndex}`"
v-model=
"row.item.serviceItemArr"
class=
"w-150-per"
:class=
"{ 'border-red': filterEmpty(row.item.serviceItemArr) && row.item.serviceItemArrEmpty }"
collapse-tags
multiple
placeholder=
"服务项目"
:popper-append-to-body=
"false"
popper-class=
"service_select_class"
size=
"small"
style=
"width: 150px"
@
focus=
"serviceSelectFocus($event, row.originalIndex)"
></el-select>
</td>
<td>
<el-input
v-model=
"row.item.purchaseCost"
class=
"w-150-per"
:class=
"{ 'border-red': (filterEmpty(row.item.purchaseCost) && row.item.purchaseCostEmpty) || row.item.purchaseCostRangeError }"
placeholder=
"0-1000000"
size=
"small"
@
blur=
"handlePurchaseCostBlur($event, row.originalIndex)"
@
input=
"handlePurchaseCostInput($event, row.originalIndex)"
></el-input>
</td>
...
...
@@ -203,10 +207,6 @@
@change="val => onApplicableAreaChange(val, row.originalIndex)" /> -->
<ApplicableAreaQuerySelect
v-model=
"row.item.upgradeGoodsAreaList"
:options=
"applicableAreaList"
width=
"calc(100% - 40px)"
:custom-class=
"!row.item.upgradeGoodsAreaList.length && row.item.applicableAreaEmpty ? 'border-red' : ''"
@
visible-change=
"visible => onApplicableAreaVisibleChange(visible, row.originalIndex)"
@
before-change=
"payload => onApplicableAreaBeforeChange(payload, row.originalIndex)"
@
change=
"val => onApplicableAreaChange(val, row.originalIndex)"
/>
</td>
<!-- 权益服务项目 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
>
<el-select
:ref=
"`serviceSelect${row.originalIndex}`"
v-model=
"row.item.serviceItemArr"
class=
"w-150-per"
:class=
"{ 'border-red': filterEmpty(row.item.serviceItemArr) && row.item.serviceItemArrEmpty }"
collapse-tags
multiple
placeholder=
"服务项目"
:popper-append-to-body=
"false"
popper-class=
"service_select_class"
size=
"small"
style=
"width: 150px"
@
focus=
"serviceSelectFocus($event, row.originalIndex)"
></el-select>
</td>
<td>
<div
style=
"transform: translateX(6px)"
>
<el-input
v-model=
"row.item.upgradePrice"
class=
"w-150-per"
placeholder=
"请输入"
size=
"small"
@
input=
"handlePrice($event, row.originalIndex, 'upgradePrice')"
></el-input>
...
...
@@ -891,7 +891,10 @@ export default {
djCost = this.highPrecisionAdd(data?.map(i => i.djCost))
if (!data?.length) djCost = ''
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'serviceItemArr', data)
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'djCost', djCost)
this.$set(this.goodsInfoData.goodsSpecificationList[index], 'djCost', djCost)
this.$set(this.goodsInfoData.goodsSpecificationList[index], "purchaseCost", djCost);
// 采购成本变更后重新计算运营成本
this.updateOperationCostFromInputs(index);
this.$nextTick(() => this.filterServiceForIndices([index]))
this.serviceSelectIndex = null
this.serviceSelected = []
...
...
src/views/goods/productManage/components/productManage/singleSpecificationForm.vue
View file @
216c66c
...
...
@@ -45,6 +45,16 @@
<span>
质保时间/年
</span>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<!-- 仅权益升级类目且供应方位广联直营展示 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`$
{goodsInfoData.supplierCode}`)" style="position: relative">
<span
class=
"color-red"
>
*
</span>
<span>
服务项目
</span>
<img
v-if=
"$$(goodsInfoData.goodsSpecificationSingleList, 'length') && goodsInfoData.goodsSpecificationSingleList.filter(item => item.checked).length > 0"
src=
"@/assets/icon-edit.png"
style=
"cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle"
@
click=
"serviceSelectFocus()"
/>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<td
style=
"position: relative"
>
<span
class=
"color-red"
>
*
</span>
<span>
采购成本/元
</span>
...
...
@@ -65,16 +75,6 @@
<span>
适用区域
</span>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<!-- 仅权益升级类目且供应方位广联直营展示 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`$
{goodsInfoData.supplierCode}`)" style="position: relative">
<span
class=
"color-red"
>
*
</span>
<span>
服务项目
</span>
<img
v-if=
"$$(goodsInfoData.goodsSpecificationSingleList, 'length') && goodsInfoData.goodsSpecificationSingleList.filter(item => item.checked).length > 0"
src=
"@/assets/icon-edit.png"
style=
"cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle"
@
click=
"serviceSelectFocus()"
/>
<div
class=
"resize-handle"
@
mousedown=
"onResizeStart"
></div>
</td>
<td
style=
"position: relative"
>
<!-- 膜类单位是车 其余为件 -->
<span>
{{
membraneTypeList
.
includes
(
goodsInfoData
.
goodsType
)
?
'参考售价(元)/车'
:
'参考售价(元)/件'
}}
</span>
...
...
@@ -229,6 +229,22 @@
@input="handleWarrantyPeriodInput($event, row.originalIndex)">
</el-input>
</td>
<!-- 权益服务项目 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`$
{goodsInfoData.supplierCode}`)">
<el-select
:ref=
"`serviceSelect$
{row.originalIndex}`"
v-model="row.item.serviceItemArr"
class="w-150-per"
:class="{ 'border-red': filterEmpty(row.item.serviceItemArr)
&&
row.item.serviceItemArrEmpty }"
collapse-tags
multiple
placeholder="服务项目"
:popper-append-to-body="false"
popper-class="service_select_class"
size="small"
style="width: 150px; transform: translateX(0)"
@focus="serviceSelectFocus($event, row.originalIndex)">
</el-select>
</td>
<td>
<el-input
v-model=
"row.item.purchaseCost"
class=
"w-150-per"
...
...
@@ -274,22 +290,6 @@
@
before-change=
"payload => onApplicableAreaBeforeChange(payload, row.originalIndex)"
@
change=
"val => onApplicableAreaChange(val, row.originalIndex)"
/>
</td>
<!-- 权益服务项目 -->
<td
v-if=
"equitySceneType.includes(goodsInfoData.goodsType) && !baseConfig.supplierCode.includes(`$
{goodsInfoData.supplierCode}`)">
<el-select
:ref=
"`serviceSelect$
{row.originalIndex}`"
v-model="row.item.serviceItemArr"
class="w-150-per"
:class="{ 'border-red': filterEmpty(row.item.serviceItemArr)
&&
row.item.serviceItemArrEmpty }"
collapse-tags
multiple
placeholder="服务项目"
:popper-append-to-body="false"
popper-class="service_select_class"
size="small"
style="width: 150px; transform: translateX(0)"
@focus="serviceSelectFocus($event, row.originalIndex)">
</el-select>
</td>
<td>
<el-input
v-model=
"row.item.upgradePrice"
class=
"w-150-per"
...
...
@@ -989,6 +989,9 @@ export default {
djCost = "";
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], "serviceItemArr", data);
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], "djCost", djCost);
this.$set(this.goodsInfoData.goodsSpecificationSingleList[index], "purchaseCost", djCost);
// 采购成本变更后重新计算运营成本
this.updateOperationCostFromInputs(index);
this.$nextTick(() => this.filterServiceForIndices([index]));
this.serviceSelectIndex = null;
this.serviceSelected = [];
...
...
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