fix: 预售商品改造
This commit is contained in:
parent
8ee49aab47
commit
653ee3355e
|
@ -202,6 +202,7 @@ export default {
|
|||
specType: 0,
|
||||
minCostPrice: "",
|
||||
status: "UP",
|
||||
isAdvanceSell: '0',
|
||||
};
|
||||
this.modalData.merchantId = JSON.parse(
|
||||
sessionStorage.getItem("userInfo")
|
||||
|
@ -519,37 +520,37 @@ export default {
|
|||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "是否为预售产品",
|
||||
prop: "isAdvanceSell",
|
||||
required: true,
|
||||
rules: {
|
||||
required: true,
|
||||
message: "是否为预售产品",
|
||||
trigger: "blur",
|
||||
},
|
||||
type: "jsx",
|
||||
render: () => {
|
||||
return (
|
||||
<el-select
|
||||
v-model={this.modalData.isAdvanceSell}
|
||||
placeholder="请选择销售单位"
|
||||
>
|
||||
{[
|
||||
{ label: "是", value: "1" },
|
||||
{ label: "否", value: "0" },
|
||||
].map((item) => {
|
||||
return (
|
||||
<el-option
|
||||
label={item.label}
|
||||
value={item.value}
|
||||
></el-option>
|
||||
);
|
||||
})}
|
||||
</el-select>
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// label: "是否为预售产品",
|
||||
// prop: "isAdvanceSell",
|
||||
// required: true,
|
||||
// rules: {
|
||||
// required: true,
|
||||
// message: "是否为预售产品",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// type: "jsx",
|
||||
// render: () => {
|
||||
// return (
|
||||
// <el-select
|
||||
// v-model={this.modalData.isAdvanceSell}
|
||||
// placeholder="请选择销售单位"
|
||||
// >
|
||||
// {[
|
||||
// { label: "是", value: "1" },
|
||||
// { label: "否", value: "0" },
|
||||
// ].map((item) => {
|
||||
// return (
|
||||
// <el-option
|
||||
// label={item.label}
|
||||
// value={item.value}
|
||||
// ></el-option>
|
||||
// );
|
||||
// })}
|
||||
// </el-select>
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
];
|
||||
break;
|
||||
case "销售信息":
|
||||
|
@ -941,4 +942,4 @@ export default {
|
|||
padding: 0 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:editable="false"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker> </el-form-item
|
||||
></el-col>
|
||||
|
@ -47,7 +48,7 @@
|
|||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
:picker-options="pickerOptions2"
|
||||
>
|
||||
</el-date-picker> </el-form-item
|
||||
></el-col>
|
||||
|
@ -152,7 +153,14 @@
|
|||
v-if="scope.row.isAdvanceSell"
|
||||
@change="
|
||||
scope.row.balancePayment =
|
||||
scope.row.presalePrice - scope.row.earnestMoney
|
||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
||||
? parseFloat(
|
||||
String(
|
||||
scope.row.presalePrice -
|
||||
scope.row.earnestMoney
|
||||
)
|
||||
).toFixed(2)
|
||||
: 0
|
||||
"
|
||||
v-model="scope.row.presalePrice"
|
||||
:min="0"
|
||||
|
@ -169,7 +177,14 @@
|
|||
<el-input-number
|
||||
@change="
|
||||
scope.row.balancePayment =
|
||||
scope.row.presalePrice - scope.row.earnestMoney
|
||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
||||
? parseFloat(
|
||||
String(
|
||||
scope.row.presalePrice -
|
||||
scope.row.earnestMoney
|
||||
)
|
||||
).toFixed(2)
|
||||
: 0
|
||||
"
|
||||
v-if="scope.row.isAdvanceSell"
|
||||
v-model="scope.row.earnestMoney"
|
||||
|
@ -182,8 +197,12 @@
|
|||
<el-table-column align="center" label="尾款" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isAdvanceSell">{{
|
||||
scope.row.presalePrice
|
||||
? scope.row.presalePrice - scope.row.earnestMoney
|
||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
||||
? parseFloat(
|
||||
String(
|
||||
scope.row.presalePrice - scope.row.earnestMoney
|
||||
)
|
||||
).toFixed(2)
|
||||
: ''
|
||||
}}</span>
|
||||
</template>
|
||||
|
@ -270,7 +289,14 @@
|
|||
v-if="scope.row.isAdvanceSell"
|
||||
@change="
|
||||
scope.row.balancePayment =
|
||||
scope.row.presalePrice - scope.row.earnestMoney
|
||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
||||
? parseFloat(
|
||||
String(
|
||||
scope.row.presalePrice -
|
||||
scope.row.earnestMoney
|
||||
)
|
||||
).toFixed(2)
|
||||
: 0
|
||||
"
|
||||
v-model="scope.row.presalePrice"
|
||||
:min="0"
|
||||
|
@ -287,7 +313,14 @@
|
|||
<el-input-number
|
||||
@change="
|
||||
scope.row.balancePayment =
|
||||
scope.row.presalePrice - scope.row.earnestMoney
|
||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
||||
? parseFloat(
|
||||
String(
|
||||
scope.row.presalePrice -
|
||||
scope.row.earnestMoney
|
||||
)
|
||||
).toFixed(2)
|
||||
: 0
|
||||
"
|
||||
v-if="scope.row.isAdvanceSell"
|
||||
v-model="scope.row.earnestMoney"
|
||||
|
@ -300,9 +333,15 @@
|
|||
<el-table-column align="center" label="尾款" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isAdvanceSell">{{
|
||||
scope.row.presalePrice
|
||||
? scope.row.presalePrice - scope.row.earnestMoney
|
||||
: ''
|
||||
scope.row.presalePrice &&
|
||||
scope.row.earnestMoney &&
|
||||
scope.row.presalePrice > scope.row.earnestMoney
|
||||
? parseFloat(
|
||||
String(
|
||||
scope.row.presalePrice - scope.row.earnestMoney
|
||||
)
|
||||
).toFixed(2)
|
||||
: 0
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -352,6 +391,7 @@ export default {
|
|||
}
|
||||
},
|
||||
data() {
|
||||
var that = this
|
||||
return {
|
||||
isAdd: true,
|
||||
//表格属性
|
||||
|
@ -373,6 +413,16 @@ export default {
|
|||
},
|
||||
orderTime: [], //订单支付时间
|
||||
arrears: [], //尾款时间
|
||||
pickerOptions2: {
|
||||
disabledDate(time) {
|
||||
let date = Date.now()
|
||||
if (that.ruleForm && that.ruleForm.startTime) {
|
||||
console.log(that.ruleForm.startTime)
|
||||
date = new Date(that.ruleForm.startTime).getTime()
|
||||
}
|
||||
return time.getTime() < date
|
||||
}
|
||||
},
|
||||
delivery: [], //发货时间
|
||||
tableData: [],
|
||||
rules: {
|
||||
|
@ -594,7 +644,11 @@ export default {
|
|||
product.productSpecificationList &&
|
||||
product.productSpecificationList.length
|
||||
) {
|
||||
count = count + product.productSpecificationList.filter((spec) => spec.isAdvanceSell).length
|
||||
count =
|
||||
count +
|
||||
product.productSpecificationList.filter(
|
||||
spec => spec.isAdvanceSell
|
||||
).length
|
||||
product.productSpecificationList.forEach(spec => {
|
||||
if (spec.isAdvanceSell) {
|
||||
if (!spec.presalePrice) {
|
||||
|
@ -638,7 +692,9 @@ export default {
|
|||
return
|
||||
}
|
||||
let pass = true
|
||||
let count = this.ruleForm.productSpecificationList.filter((spec) => spec.isAdvanceSell).length
|
||||
let count = this.ruleForm.productSpecificationList.filter(
|
||||
spec => spec.isAdvanceSell
|
||||
).length
|
||||
this.ruleForm.productSpecificationList.forEach(spec => {
|
||||
if (spec.isAdvanceSell) {
|
||||
if (!spec.presalePrice) {
|
||||
|
|
Loading…
Reference in New Issue