Commit 473191f4 by 张立顺

fix bug

1 parent e78e762b
......@@ -315,7 +315,13 @@ export default {
djCost: "",
thirdPartyCost: "",
businessLine: "",
settlementType: ""
settlementType: "",
createBusinessProduct: {
settlementType: ""
},
upgradeGoods: {
djCost: ""
}
},
formRules: {
upgradeGoodsId: [
......@@ -380,10 +386,10 @@ export default {
filters: {
filterComputedDataPro(val) {
// console.log(val, "filterComputedDataPro")
return [null, ""].includes(val) ? val + "%" : ""
return ![null, ""].includes(val) ? val + "%" : ""
},
filterComputedData(val) {
return [null, ""].includes(val) ? val + "元" : ""
return ![null, ""].includes(val) ? val + "元" : ""
}
},
components: {
......
......@@ -95,7 +95,7 @@
<el-col :span="12">
<el-form-item label="嘀加成本/件:" prop="djCost">
<el-input
v-model="packageForm.upgradeGoods.djCost"
v-model="packageForm.djCost"
placeholder="根据套餐商品第三方成本自动累加"
class="sortInput"
disabled
......@@ -343,7 +343,7 @@
<el-col :span="12">
<el-form-item label="嘀加成本/件:" prop="djCost">
<el-input
v-model="goodsForm.djCost"
v-model="goodsForm.upgradeGoods.djCost"
placeholder="自动带入产品对应的嘀加成本"
class="sortInput"
disabled
......@@ -525,10 +525,10 @@ export default {
},
filters: {
filterComputedDataPro(val) {
return [null, ""].includes(val) ? val + "%" : ""
return ![null, ""].includes(val) ? val + "%" : ""
},
filterComputedData(val) {
return [null, ""].includes(val) ? val + "元" : ""
return ![null, ""].includes(val) ? val + "元" : ""
}
},
......
......@@ -299,12 +299,12 @@ export default {
loading: false,
formData: {
upgradeGoodsId: "",
val2: "",
val3: "",
val4: "",
val5: "",
val6: "",
settlementType: ""
createBusinessProduct: {
settlementType: ""
},
upgradeGoods: {
djCost: ""
}
},
formRules: {
upgradeGoodsId: [
......@@ -353,10 +353,10 @@ export default {
filters: {
filterComputedDataPro(val) {
return [null, ""].includes(val) ? val + "%" : ""
return ![null, ""].includes(val) ? val + "%" : ""
},
filterComputedData(val) {
return [null, ""].includes(val) ? val + "元" : ""
return ![null, ""].includes(val) ? val + "元" : ""
},
filterData(val) {
if (val) {
......
......@@ -6,7 +6,6 @@
ref="packageFrom"
class="packageFrom d2-container-content"
:model="packageForm"
:rules="packageFormRules"
label-width="130px"
>
<el-row>
......@@ -57,9 +56,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="结算方式:" prop="settlementType">
<el-select
<!-- <el-select
v-model="packageForm.createBusinessProduct.settlementType"
disabled
v-model="packageForm.createBusinessProduct.settlementType"
placeholder="请选择"
class="sortInput"
>
......@@ -70,7 +69,7 @@
:value="item.confId"
>
</el-option>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
</el-row>
......@@ -103,10 +102,9 @@
<el-form-item label="嘀加成本/件:" prop="djCost">
<el-input
disabled
v-model="packageForm.upgradeGoods.djCost"
v-model="packageForm.djCost"
placeholder="根据套餐商品第三方成本自动累加"
class="sortInput"
disabled
/>元
</el-form-item>
</el-col>
......@@ -330,10 +328,9 @@
<el-form-item label="嘀加成本/件:" prop="djCost">
<el-input
disabled
v-model="goodsForm.djCost"
v-model="goodsForm.upgradeGoods.djCost"
placeholder="自动带入产品对应的参考售价"
class="sortInput"
disabled
/>元
</el-form-item>
</el-col>
......@@ -389,55 +386,12 @@ export default {
packageForm: {
timeId: new Date().getTime() + parseInt(Math.random() * 1000),
goodsId: null,
val1: "",
val2: "",
val3: "",
val4: "",
val5: "",
val6: ""
},
packageFormRules: {
val1: [
{
required: true,
message: "请输入套餐名称",
trigger: "blur"
}
],
val3: [
{
required: true,
message: "请输入售价",
trigger: "blur"
}
],
val4: [
{
required: true,
message: "请输入最低售价",
trigger: "blur"
}
],
val5: [
{
required: true,
message: "请输入嘀加成本",
trigger: "blur"
}
],
val6: [
{
required: true,
message: "请输入第三方成本",
trigger: "blur"
}
]
},
oldVal: {
val3: "",
val4: "",
val5: "",
val6: ""
createBusinessProduct: {
settlementType: ""
},
upgradeGoods: {
djCost: ""
}
},
goodsList: [],
businessLineOpt: deepClone(businessLineOpt),
......@@ -447,10 +401,10 @@ export default {
filters: {
filterComputedDataPro(val) {
return [null, ""].includes(val) ? val + "%" : ""
return ![null, ""].includes(val) ? val + "%" : ""
},
filterComputedData(val) {
return [null, ""].includes(val) ? val + "元" : ""
return ![null, ""].includes(val) ? val + "元" : ""
},
filterData(val) {
if (val) {
......@@ -465,10 +419,9 @@ export default {
async mounted() {
if (this.info) {
// console.log("info", this.info)
console.log("info", this.info)
this.packageForm = deepClone(this.info)
this.goodsList = deepClone(this.info.merchantGoodsInfoList)
this.handleData(this.goodsList)
}
},
......@@ -477,53 +430,6 @@ export default {
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
handleData(goodsList) {
goodsList = goodsList.map((item) => {
const _formData = item
const {
goodsTypeName,
secondaryGoodsTypeName,
thirdLevelGoodsTypeName
} = _formData?.goodsInfo || {}
const types = [
goodsTypeName,
secondaryGoodsTypeName,
thirdLevelGoodsTypeName
]
const result = types.filter((type) => type).join("-")
_formData.upgradeGoods_temporary = {
upgradeGoodsName: _formData.upgradeGoodsName,
goodsName: _formData.goodsInfo?.goodsName,
tempGoodsTypeName: result,
serviceItemNames: _formData.upgradeGoods?.upgradeGoodsServiceItemsList
?.map((item) => {
return `${item.serviceName}-${item.serviceGrade}/${
item.servicePeriod
}${
item.serviceItemId
? `/${convertYuanToWan(item.minPrice)}-${convertYuanToWan(
item.maxPrice
)}万`
: ""
}`
})
?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods),
djCost: _formData.upgradeGoods?.djCost,
carTypeConfigName: _formData.upgradeGoods?.carTypeConfigList
?.map((item) => item.seriesName)
.join("/"),
upgradeCommodityCode: _formData.upgradeGoods?.commodityCode,
purchasePrice: _formData.upgradeGoods?.purchasePrice,
upgradePrice: _formData.upgradeGoods?.upgradePrice,
type: _formData.upgradeGoods?.type,
thirdPartyCode: _formData.upgradeGoods?.thirdPartyCode
}
_formData.upgradeGoods = {}
_formData.upgradeGoods = deepClone(_formData.upgradeGoods_temporary)
return _formData
})
},
async getBaseData() {},
// 处理金额补零
priceFilter(num) {
......@@ -537,42 +443,10 @@ export default {
checkName(e) {
console.log("e.target.value", e.target.value)
if (e.target.value) {
// const obj = {
// name: e.target.value,
// timeId: this.timeId
// }
this.returnData()
}
},
addGoodsItem() {
this.goodsList.push({
val1: "",
val2: "",
val3: "",
val4: "",
val5: "",
val6: ""
})
},
val3_handleInput(newVal) {
this.form.val3 = limitPrice(newVal, this.oldVal.val3, 6, 2, 0, 999999)
this.oldVal.val3 = this.form.val3
},
val4_handleInput(newVal) {
this.form.val4 = limitPrice(newVal, this.oldVal.val4, 6, 2, 0, 999999)
this.oldVal.val4 = this.form.val4
},
val5_handleInput(newVal) {
this.form.val5 = limitPrice(newVal, this.oldVal.val5, 6, 2, 0, 999999)
this.oldVal.val5 = this.form.val5
},
val6_handleInput(newVal) {
this.form.val6 = limitPrice(newVal, this.oldVal.val6, 6, 2, 0, 999999)
this.oldVal.val6 = this.form.val6
},
returnData() {
this.$emit("packageEditInfo", {
info: this.packageForm,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!