|
@@ -184,17 +184,17 @@
|
|
|
:rules="formRules.required">
|
|
|
<el-radio
|
|
|
v-model="form.product_sale_at"
|
|
|
- label="0">预售
|
|
|
+ label="0">现货
|
|
|
</el-radio>
|
|
|
<el-radio
|
|
|
v-model="form.product_sale_at"
|
|
|
- label="1">现售
|
|
|
+ label="1">预售
|
|
|
</el-radio>
|
|
|
<el-date-picker
|
|
|
:disabled="form.product_sale_at === '0'"
|
|
|
v-model="product_sale_at"
|
|
|
- type="datetime"
|
|
|
- format="yyyy-MM-dd HH:mm"
|
|
|
+ type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
:picker-options="myPickerOptions"
|
|
|
placeholder="选择预售日期时间">
|
|
|
</el-date-picker>
|
|
@@ -230,7 +230,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { fen2Yuan, yuan2Fen } from '@/utils'
|
|
|
+import { fen2Yuan, yuan2Fen, getTs } from '@/utils'
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
@@ -363,7 +363,12 @@ export default {
|
|
|
product_category_name: productCategoryNameIndex > -1 ? this.arrCategoryList[productCategoryNameIndex].name : '',
|
|
|
product_brand_name: productBrandNamedIndex > -1 ? this.arrBrandList[productBrandNamedIndex].name : '',
|
|
|
product_all_price: yuan2Fen(formData.product_all_price),
|
|
|
- product_price: yuan2Fen(formData.product_price)
|
|
|
+ product_price: yuan2Fen(formData.product_price),
|
|
|
+ product_sale_at: formData.product_sale_at === '0' ? formData.product_sale_at : getTs(this.product_sale_at, 'YYYY-MM-DD', 's')
|
|
|
+ }
|
|
|
+ if (formData.product_sale_at === '1' && !this.product_sale_at) {
|
|
|
+ this.$message.warning('选择预售日期时间')
|
|
|
+ return
|
|
|
}
|
|
|
this.booLock = true
|
|
|
const data = await this.$fetch(url, postData)
|