diff --git a/src/views/modules/operation-management/commodity/popup/add-or-update.vue b/src/views/modules/operation-management/commodity/popup/add-or-update.vue
index daffc77..ff2d49b 100644
--- a/src/views/modules/operation-management/commodity/popup/add-or-update.vue
+++ b/src/views/modules/operation-management/commodity/popup/add-or-update.vue
@@ -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 (
-
- {[
- { label: "是", value: "1" },
- { label: "否", value: "0" },
- ].map((item) => {
- return (
-
- );
- })}
-
- );
- },
- },
+ // {
+ // label: "是否为预售产品",
+ // prop: "isAdvanceSell",
+ // required: true,
+ // rules: {
+ // required: true,
+ // message: "是否为预售产品",
+ // trigger: "blur",
+ // },
+ // type: "jsx",
+ // render: () => {
+ // return (
+ //
+ // {[
+ // { label: "是", value: "1" },
+ // { label: "否", value: "0" },
+ // ].map((item) => {
+ // return (
+ //
+ // );
+ // })}
+ //
+ // );
+ // },
+ // },
];
break;
case "销售信息":
@@ -941,4 +942,4 @@ export default {
padding: 0 30px;
}
}
-
\ No newline at end of file
+
diff --git a/src/views/modules/presale/products/popup/add-or-update.vue b/src/views/modules/presale/products/popup/add-or-update.vue
index f577248..c3da96f 100644
--- a/src/views/modules/presale/products/popup/add-or-update.vue
+++ b/src/views/modules/presale/products/popup/add-or-update.vue
@@ -29,6 +29,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:editable="false"
+ :picker-options="pickerOptions"
>
@@ -47,7 +48,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
- :picker-options="pickerOptions"
+ :picker-options="pickerOptions2"
>
@@ -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 @@
{{
- 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)
: ''
}}
@@ -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 @@
{{
- 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
}}
@@ -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) {