Merge remote-tracking branch 'origin/master'

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

@ -145,5 +145,33 @@ public class ZyGoods implements Serializable {
@Excel(name = "点击量", width = 15)
@ApiModelProperty(value = "点击量")
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