Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit b79448c00d
  1. 415
      ant-design-vue-jeecg/src/views/shopping/components/Order/placeOrder.vue
  2. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/entity/ZyGoods.java

@ -13,9 +13,78 @@
<span class="icon">1</span> <span class="icon">1</span>
<span class="text f_18">配送地址</span></div> <span class="text f_18">配送地址</span></div>
<div class="form"> <div class="form">
<a-form layout="vertical"> <!-- <a-form layout="vertical">-->
<a-form-item label="请选择您的配送方式"> <!-- <a-form-item label="请选择您的配送方式">-->
<a-radio-group> <!-- <a-radio-group>-->
<!-- <a-radio value="0">-->
<!-- 送货上门-->
<!-- </a-radio>-->
<!-- <a-radio value="1">-->
<!-- 门店自提-->
<!-- </a-radio>-->
<!-- </a-radio-group>-->
<!-- </a-form-item>-->
<!-- <a-form-item-->
<!-- label="称呼"-->
<!-- v-if="addr.length == 0"-->
<!-- >-->
<!-- <a-select placeholder="请选择称呼" :value="userSex1" style="width: 120px;margin-right:10px" @change="handleChange1">-->
<!-- <a-select-option value="1">-->
<!-- 先生-->
<!-- </a-select-option>-->
<!-- <a-select-option value="0">-->
<!-- 女士-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <a-input style="width:300px" placeholder="请输入姓名" :value="userName1" prop="userName"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item-->
<!-- label="选择地址"-->
<!-- v-if="addr.length == 0"-->
<!-- >-->
<!-- <j-area-linkage type="cascader" v-model="addr1" placeholder="请选择省市区"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item-->
<!-- label="详细地址"-->
<!-- v-if="addr.length == 0"-->
<!-- >-->
<!-- <a-textarea v-model="detailed1" placeholder="请输入街道、门牌号码等详细地址" auto-size />-->
<!-- </a-form-item>-->
<!-- <a-form-item-->
<!-- label="手机号码"-->
<!-- v-if="addr.length == 0"-->
<!-- >-->
<!-- <a-input style="width:150px;margin-right:10px" placeholder="+86 中国大陆地区" disabled/>-->
<!-- <a-input style="width:300px" placeholder="请输入手机号码" :value="phone1"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item v-if="addr.length == 0">-->
<!-- <a-checkbox @change="onChange1" :checked="save1">-->
<!-- 保存该地址至地址簿-->
<!-- </a-checkbox>-->
<!-- </a-form-item>-->
<!-- <a-form-item v-if="addr.length != 0">-->
<!-- <p class="d-flex addrTitle">-->
<!-- <span class="f_14 c_1B">地址</span>-->
<!-- <span class="f_12 c_1B" @click="showModal"><a-icon type="plus" />添加新地址</span>-->
<!-- </p>-->
<!-- <div class="d-flex cardDiv">-->
<!-- <div style="width: 370px" v-for="(item,index) in addr" :key="index" @click="handleCard" class="cardItem">-->
<!-- <p class="d-flex f_12 c_1B" style="font-weight: 600;justify-content: space-between;"><span>{{item.name}}</span><span class="f_14" @click="showModal(item)">编辑</span></p>-->
<!-- <p class="f_12 c_31" style="font-weight: 300">+86 {{item.phone}}</p>-->
<!-- <p class="f_12 c_31">{{item.province}}{{item.city}}{{item.area}}{{item.detailed}}</p>-->
<!-- <p class="f_12 c_1B" v-if="item.flag">默认地址</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-form-item>-->
<!-- </a-form>-->
<template>
<a-form-model
ref="ruleForm1"
:model="form1"
:rules="rules"
>
<a-form-model-item label="请选择您的配送方式" prop="visit">
<a-radio-group v-model="form1.visit">
<a-radio value="0"> <a-radio value="0">
送货上门 送货上门
</a-radio> </a-radio>
@ -23,60 +92,70 @@
门店自提 门店自提
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-model-item>
<a-form-item <a-form-model-item label="称呼" v-if="addr.length == 0">
label="称呼" <a-select v-model="form1.sex" placeholder="请选择称呼" style="width:120px">
v-if="addr.length == 0"
>
<a-select placeholder="请选择称呼" :value="userSex1" style="width: 120px;margin-right:10px" @change="handleChange1">
<a-select-option value="1"> <a-select-option value="1">
先生 先生
</a-select-option> </a-select-option>
<a-select-option value="0"> <a-select-option value="2">
女士 女士
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-input style="width:300px" placeholder="请输入姓名" :value="userName"/> </a-form-model-item>
</a-form-item> <a-form-model-item
<a-form-item label="姓名"
label="选择地址" prop="name"
v-if="addr.length == 0" v-if="addr.length == 0"
> >
<j-area-linkage type="cascader" v-model="addr1" placeholder="请选择省市区"/> <a-input placeholder="请输入姓名" v-model="form1.name" />
</a-form-item> </a-form-model-item>
<a-form-item <a-form-model-item
label="详细地址" label="选择地址"
prop="addr"
v-if="addr.length == 0" v-if="addr.length == 0"
> >
<a-textarea v-model="detailed1" placeholder="请输入街道、门牌号码等详细地址" auto-size /> <j-area-linkage type="cascader" v-model="form1.addr" placeholder="请选择省市区"/>
</a-form-item> </a-form-model-item>
<a-form-item <a-form-model-item label="详细地址" prop="addr" v-if="addr.length == 0">
<a-input v-model="form1.detailed" type="textarea" />
</a-form-model-item>
<a-form-model-item
label="手机号码" label="手机号码"
prop="phone"
v-if="addr.length == 0" v-if="addr.length == 0"
> >
<a-input style="width:150px;margin-right:10px" placeholder="+86 中国大陆地区" disabled/> <a-input style="width:400px" placeholder="请输入手机号码" v-model="form1.phone">
<a-input style="width:300px" placeholder="请输入手机号码" :value="phone1"/> <template slot="addonBefore">
</a-form-item> <span>+86 中国大陆地区</span>
<a-form-item v-if="addr.length == 0"> </template>
<a-checkbox @change="onChange1"> </a-input>
</a-form-model-item>
<a-form-model-item v-if="addr.length == 0">
<a-checkbox @change="onChange1" v-model="form1.save">
保存该地址至地址簿 保存该地址至地址簿
</a-checkbox> </a-checkbox>
</a-form-item> </a-form-model-item>
<a-form-item v-if="addr.length != 0"> <a-form-model-item v-if="addr.length != 0">
<p class="d-flex addrTitle"> <p class="d-flex addrTitle">
<span class="f_14 c_1B">地址</span> <span class="f_14 c_1B">地址</span>
<span class="f_12 c_1B" @click="showModal"><a-icon type="plus" />添加新地址</span> <span class="f_12 c_1B" @click="showModal"><a-icon type="plus" />添加新地址</span>
</p> </p>
<div class="d-flex cardDiv"> <div class="d-flex cardDiv">
<div style="width: 370px" v-for="(item,index) in addr" :key="index" @click="handleCard" class="cardItem"> <div style="width: 370px" v-for="(item,index) in addr" :key="index" @click="handleCard" class="cardItem">
<p class="d-flex f_12 c_1B" style="font-weight: 600;justify-content: space-between;"><span>{{item.name}}</span><span class="f_14" @click="showModal">编辑</span></p> <p class="d-flex f_12 c_1B" style="font-weight: 600;justify-content: space-between;">
<span>{{item.name}}</span>
<span class="f_14" @click="handleEdit(item)">编辑</span>
</p>
<p class="f_12 c_31" style="font-weight: 300">+86 {{item.phone}}</p> <p class="f_12 c_31" style="font-weight: 300">+86 {{item.phone}}</p>
<p class="f_12 c_31">{{item.province}}{{item.city}}{{item.area}}{{item.detailed}}</p> <p class="f_12 c_31" style="font-weight: 300"><j-area-linkage type="cascader" :value="item.addr" disabled/></p>
<p class="f_12 c_31">{{item.detailed}}</p>
<p class="f_12 c_1B" v-if="item.flag">默认地址</p> <p class="f_12 c_1B" v-if="item.flag">默认地址</p>
</div> </div>
</div> </div>
</a-form-item> </a-form-model-item>
</a-form> </a-form-model>
</template>
</div> </div>
</div> </div>
<div class="addr"> <div class="addr">
@ -142,7 +221,7 @@
<span class="f_20 c_31">35,500</span> <span class="f_20 c_31">35,500</span>
</p> </p>
<div class="btnDiv"> <div class="btnDiv">
<div type="primary" class="dialogButton primary f_14">立即购买</div> <div type="primary" class="dialogButton primary f_14" @click="toBuy">立即购买</div>
</div> </div>
<p class="explain f_12 c_999">说明</p> <p class="explain f_12 c_999">说明</p>
<p class="f_12 c_999">在线支付订单提交之后15分钟内未付款订单将被系统自动取消请您尽快完成支付以确保商品能及时送达避免取消订单带来不必要的麻烦</p> <p class="f_12 c_999">在线支付订单提交之后15分钟内未付款订单将被系统自动取消请您尽快完成支付以确保商品能及时送达避免取消订单带来不必要的麻烦</p>
@ -160,46 +239,62 @@
<a-modal <a-modal
title="添加新地址" title="添加新地址"
:visible="visible" :visible="visible"
:confirm-loading="confirmLoading"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
> >
<a-form layout="vertical"> <template>
<a-form-item <a-form-model
label="称呼" ref="ruleForm"
:model="form"
:rules="rules"
> >
<a-select placeholder="请选择称呼" :value="userSex2" style="width: 120px;margin-right:10px" @change="handleChange2"> <a-form-model-item label="称呼" >
<a-select v-model="form.sex" placeholder="请选择称呼" style="width:120px">
<a-select-option value="1"> <a-select-option value="1">
先生 先生
</a-select-option> </a-select-option>
<a-select-option value="0"> <a-select-option value="2">
女士 女士
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-input style="width:300px" placeholder="请输入姓名" :value="userName"/> </a-form-model-item>
</a-form-item> <a-form-model-item
<a-form-item label="姓名"
label="选择地址" prop="name"
> >
<j-area-linkage type="cascader" v-model="addr2" placeholder="请选择省市区"/> <a-input placeholder="请输入姓名" v-model="form.name" />
</a-form-item> </a-form-model-item>
<a-form-item <a-form-model-item
label="详细地址" label="选择地址"
prop="addr"
> >
<a-textarea v-model="detailed2" placeholder="请输入街道、门牌号码等详细地址" auto-size /> <j-area-linkage type="cascader" v-model="form.addr" placeholder="请选择省市区"/>
</a-form-item> </a-form-model-item>
<a-form-item <a-form-model-item label="详细地址" prop="detailed">
<a-input v-model="form.detailed" type="textarea" />
</a-form-model-item>
<a-form-model-item
label="手机号码" label="手机号码"
prop="phone"
> >
<a-input style="width:150px;margin-right:10px" placeholder="+86 中国大陆地区" disabled/> <a-input style="width:400px" placeholder="请输入手机号码" v-model="form.phone">
<a-input style="width:300px" placeholder="请输入手机号码" :value="phone2"/> <template slot="addonBefore">
</a-form-item> <span>+86 中国大陆地区</span>
<a-form-item> </template>
<a-checkbox @change="onChange4"> </a-input>
</a-form-model-item>
<a-form-model-item>
<a-checkbox @change="onChange4" v-model="form.save">
保存该地址至地址簿 保存该地址至地址簿
</a-checkbox> </a-checkbox>
</a-form-item> </a-form-model-item>
</a-form> <a-form-model-item>
<a-checkbox @change="onChange5" v-model="form.flag">
设置为默认地址
</a-checkbox>
</a-form-model-item>
</a-form-model>
</template>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -207,62 +302,89 @@
export default { export default {
data() { data() {
return { return {
ModalText: 'Content of the modal',
visible: false, visible: false,
confirmLoading: false,
formLayout: 'horizontal', formLayout: 'horizontal',
delivery:'17719145652',// delivery:'17719145652',//
visit:'0',// visit:'0',//
phone:'17719145652',// phone:'17719145652',//
userSex1:'',//1
userSex2:'',//2
userName:'',//
phone1:'',//1
phone2:'',//2
addr:[ addr:[
// { {
// id:1, id:1,
// name:'', name:'吴一',
// phone:'17777777777', sex:'1',
// province:'', phone:'17777777777',
// city:'', addr:'210521',
// area:'驿', detailed:'黄淮学院北区',
// detailed:'', flag:true,//
// flag:true,// },//
// },// {
// { id:2,
// id:2, name:'吴二',
// name:'', sex:'2',
// phone:'17777777777', phone:'17777777777',
// province:'', addr:'210521',
// city:'', detailed:'黄淮学院北区',
// area:'驿', flag:false,//
// detailed:'', },//
// flag:false,// {
// },// id:3,
// { name:'吴三',
// id:3, sex:'1',
// name:'', phone:'17777777777',
// phone:'17777777777', addr:'210521',
// province:'', detailed:'黄淮学院北区',
// city:'', flag:false,//
// area:'驿', },//
// detailed:'',
// flag:false,//
// },//
],// ],//
addr1:'',//1
addr2:'',//2
detailed1:'',//1
detailed2:'',//2
save1:false,//簿1
save2:false,//簿2
value: 1, value: 1,
paymentMode:'',// paymentMode:'',//
bill:'',// bill:'',//
chinaArea:[],
num:1,// num:1,//
}; form2:{
userSex2:'',//2()
userName2:'',//2()
phone2:'',//2()
addr2:'',//2()
detailed2:'',//2()
save2:true,//簿2()
},
//
form: {
id:'',
sex: undefined,
name: '',
addr: '',
detailed: '',
phone: '',
save: true,
flag:false//
},
//
form1: {
visit:'',
sex: undefined,
name: '',
addr: '',
detailed: '',
phone: '',
save: true,
flag:false
},
rules: {
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' },
],
visit: [
{ required: true, message: '请选择您的配送方式', trigger: 'change' },
],
addr: [{ required: true, message: '请选择地址', trigger: 'blur' }],
detailed: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
phone: [{ required: true, message: '请输入手机号码', trigger: 'blur' },
],
},
addrList:[
]
}
}, },
computed: { computed: {
formItemLayout() { formItemLayout() {
@ -303,7 +425,7 @@
}, },
onChange1(e) { onChange1(e) {
console.log(`checked = ${e.target.checked}`); console.log(`checked = ${e.target.checked}`);
this.save1 = !this.save1 this.form1.save = !this.form1.save
}, },
onChange2(e) { onChange2(e) {
console.log('radio checked', e.target.value); console.log('radio checked', e.target.value);
@ -314,28 +436,90 @@
this.bill = e.target.checked this.bill = e.target.checked
}, },
onChange4(e) { onChange4(e) {
console.log('radio checked', e.target.value); console.log(`checked = ${e.target.checked}`);
this.save2 = !this.save2 this.form.save = !this.form.save
}, },
onChange5(e) {
console.log(`checked = ${e.target.checked}`);
},
//
showModal() { showModal() {
this.visible = true; this.visible = true;
}, },
//
handleEdit(item){
this.visible = true;
console.log(item)
// this.form.id = ''
this.form.sex = item.sex
this.form.name = item.name
this.form.addr = item.addr
this.form.phone = item.phone
this.form.detailed = item.detailed
this.form.flag = item.flag
},
handleOk(e) { handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds'; //
this.confirmLoading = true; let that = this
setTimeout(() => { let newFlag = this.addr.some(function(item){
return item.id == that.form.id
})
this.$refs.ruleForm.validate(valid => {
if (valid) {
if(newFlag){//
// this.addr.
}else{//
this.addr.push(this.form)
console.log('this.addr')
console.log(this.addr)
}
this.visible = false; this.visible = false;
this.confirmLoading = false; } else {
}, 2000); }
});
}, },
handleCancel(e) { handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false; this.visible = false;
this.$refs.ruleForm.resetFields();
this.form.name = ''
this.form.sex = ''
this.form.name = ''
this.form.addr = ''
this.form.phone = ''
this.form.detailed = ''
this.form.flag = false
}, },
toBuy(){
this.$refs.ruleForm1.validate(valid => {
if (valid) {
this.addrList.push(this.form1)
console.log(this.addrList)
} else {
}
});
}
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ant-form /deep/ .ant-form-item{
margin-bottom: 12px;
}
.cardDiv .j-area-linkage /deep/ .area-select{
background-color: #fff;
border: none;
span{
padding-left: 0;
font-size: 12px;
color:#313131;
cursor:auto;
font-weight: 500;
}
i{
display: none;
}
}
.btnDiv{ .btnDiv{
border-bottom: 1px solid #E7E7E7; border-bottom: 1px solid #E7E7E7;
padding-bottom: 30px; padding-bottom: 30px;
@ -421,6 +605,9 @@
.f_12{ .f_12{
border: 1px solid #C8C6C5; border: 1px solid #C8C6C5;
padding: 3px 8px; padding: 3px 8px;
height: 26px;
box-sizing: border-box;
line-height: 18px;
} }
i{ i{
margin-right: 3px; margin-right: 3px;
@ -430,7 +617,11 @@
.cardDiv{ .cardDiv{
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
.f_12{
height: 26px;
box-sizing: border-box;
line-height: 18px;
}
.cardItem{ .cardItem{
padding: 15px 16px; padding: 15px 16px;
margin-bottom: 20px; margin-bottom: 20px;

@ -145,5 +145,33 @@ public class ZyGoods implements Serializable {
@Excel(name = "点击量", width = 15) @Excel(name = "点击量", width = 15)
@ApiModelProperty(value = "点击量") @ApiModelProperty(value = "点击量")
private java.lang.String click; private java.lang.String click;
/**规格*/
@Excel(name = "规格", width = 15)
@ApiModelProperty(value = "规格")
private java.lang.String specification;
/**产品概述*/
@Excel(name = "产品概述", width = 15)
@ApiModelProperty(value = "产品概述")
private java.lang.String productOverview;
/**结构*/
@Excel(name = "结构", width = 15)
@ApiModelProperty(value = "结构")
private java.lang.String structure;
/**特征*/
@Excel(name = "特征", width = 15)
@ApiModelProperty(value = "特征")
private java.lang.String characteristic;
/**折叠搭配及包装*/
@Excel(name = "折叠搭配及包装", width = 15)
@ApiModelProperty(value = "折叠搭配及包装")
private java.lang.String foldingPackaging;
/**配件及标志*/
@Excel(name = "配件及标志", width = 15)
@ApiModelProperty(value = "配件及标志")
private java.lang.String accLogos;
/**缝纫形式*/
@Excel(name = "缝纫形式", width = 15)
@ApiModelProperty(value = "缝纫形式")
private java.lang.String sewingForm;
} }

Loading…
Cancel
Save