|
|
@@ -3,8 +3,8 @@
|
|
|
<!-- 配送公共组件 -->
|
|
|
<!-- 收花人 -->
|
|
|
<div class="module-com">
|
|
|
- <AppBindInfo></AppBindInfo>
|
|
|
- <!-- <tui-list-cell class="line-cell" :hover="false">
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">收花人姓名</div>
|
|
|
<input
|
|
|
v-model="form.receiveUserName"
|
|
|
@@ -12,53 +12,45 @@
|
|
|
placeholder-style="color:#ccc"
|
|
|
class="tui-input"
|
|
|
name="receiveUserName"
|
|
|
- placeholder="请输入姓名"
|
|
|
+ placeholder="请填写姓名"
|
|
|
/>
|
|
|
- </tui-list-cell> -->
|
|
|
- <!-- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">收花人电话</div>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title">收花人手机号</div>
|
|
|
<input
|
|
|
v-model="form.receiveMobile"
|
|
|
placeholder-class="phcolor"
|
|
|
placeholder-style="color:#ccc"
|
|
|
class="tui-input"
|
|
|
- name="receiveMobile"
|
|
|
- placeholder="请输入电话"
|
|
|
type="number"
|
|
|
+ name="receiveMobile"
|
|
|
+ placeholder="请填写手机号"
|
|
|
/>
|
|
|
- </tui-list-cell> -->
|
|
|
- <tui-list-cell class="line-cell code-wrap" :hover="false">
|
|
|
- <div class="tui-title">取货方式</div>
|
|
|
- <div>
|
|
|
- <button class="admin-button-com blue mini-btn">
|
|
|
- 自取
|
|
|
- </button>
|
|
|
- <button style="margin-left:10px;" class="admin-button-com default mini-btn">
|
|
|
- 配送
|
|
|
- </button>
|
|
|
- </div>
|
|
|
</tui-list-cell>
|
|
|
+
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
|
|
|
- <div class="tui-title">配送城市</div>
|
|
|
+ <div class="tui-title">所在城市</div>
|
|
|
<div
|
|
|
class="tui-input"
|
|
|
- v-if="form.receiveProvince || form.receiveCity"
|
|
|
- >{{ form.receiveProvince + '-' + form.receiveCity }}</div>
|
|
|
+ v-if="form.province || form.city"
|
|
|
+ >{{ form.province + '-' + form.city }}</div>
|
|
|
<div class="tui-placeholder" v-else>请选择</div>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
|
|
|
<div class="tui-title">详细地址</div>
|
|
|
- <div class="tui-input" v-if="form.receiveAddress">{{ form.receiveAddress }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择地址</div>
|
|
|
+ <div class="tui-input" v-if="form.address">{{ form.address }}</div>
|
|
|
+ <div class="tui-placeholder" v-else>请填写地址</div>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">门牌号</div>
|
|
|
<input
|
|
|
- v-model="form.receiveFloor"
|
|
|
+ v-model="form.floor"
|
|
|
placeholder-class="phcolor"
|
|
|
placeholder-style="color:#ccc"
|
|
|
class="tui-input"
|
|
|
- name="receiveFloor"
|
|
|
+ name="floor"
|
|
|
placeholder="楼号门牌号(选填)"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
@@ -86,73 +78,56 @@
|
|
|
@click="timeTodaySelFn(2)"
|
|
|
>晚上</button>
|
|
|
</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">运费</div>
|
|
|
+ <div class="tui-title">订花人姓名</div>
|
|
|
<input
|
|
|
- v-model="form.receiveFloor"
|
|
|
+ v-model="form.bookName"
|
|
|
placeholder-class="phcolor"
|
|
|
placeholder-style="color:#ccc"
|
|
|
class="tui-input"
|
|
|
- name="receiveFloor"
|
|
|
- placeholder="运费(元)"
|
|
|
+ name="bookName"
|
|
|
+ placeholder="请填写姓名(选填)"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
- </div>
|
|
|
- <!-- 订花人 -->
|
|
|
- <!-- <div class="module-com"> -->
|
|
|
- <!-- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">订花人电话</div>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title">订花人手机号</div>
|
|
|
<input
|
|
|
v-model="form.bookMobile"
|
|
|
placeholder-class="phcolor"
|
|
|
- placeholder-style="color:#ccc"
|
|
|
+ placeholder-style="color:#ccc"
|
|
|
class="tui-input"
|
|
|
- name="bookMobile"
|
|
|
- placeholder="花送到了通知您(选填)"
|
|
|
type="number"
|
|
|
+ name="bookMobile"
|
|
|
+ placeholder="请填写手机号(选填)"
|
|
|
/>
|
|
|
- </tui-list-cell> -->
|
|
|
-
|
|
|
- <!-- 具体时间 -->
|
|
|
-
|
|
|
- <!-- </div> -->
|
|
|
- <!-- 贺卡 -->
|
|
|
- <!-- <div class="module-com gift-wrap input-line-wrap">
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="gift-content">
|
|
|
- <div class="flex-center">
|
|
|
- <checkbox
|
|
|
- class="ljd-checkbox"
|
|
|
- id="needGift"
|
|
|
- :checked="form.needCard == 1 ? true : false"
|
|
|
- @change="needCardChange"
|
|
|
- ></checkbox>
|
|
|
- <label for="needGift" class="need-gift">需要贺卡</label>
|
|
|
- </div>
|
|
|
- <div class="gitf-textarea">
|
|
|
- <textarea
|
|
|
- v-model="form.cardInfo"
|
|
|
- class="tui-textarea"
|
|
|
- placeholder-class="phcolor"
|
|
|
- placeholder-style="color:#ccc"
|
|
|
- name="cardInfo"
|
|
|
- placeholder="请填写贺卡内容,留空将寄出空白贺卡"
|
|
|
- auto-height
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <div class="none-name-delivery flex-center" style="padding-left:0rpx;">
|
|
|
+ <div class="tui-title">派送方式</div>
|
|
|
+ <checkbox-group @change="anonymityChange" style="padding-left:70rpx;">
|
|
|
+ <checkbox class="ljd-checkbox" value="1" id="noneNameText" ></checkbox>
|
|
|
+ <label for="noneNameText" class="none-name-text">匿名派送</label>
|
|
|
+ </checkbox-group>
|
|
|
</div>
|
|
|
</tui-list-cell>
|
|
|
- </div> -->
|
|
|
+
|
|
|
+ </div>
|
|
|
<!-- 备注 -->
|
|
|
<div class="module-com remark-wrap">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">其它备注</div>
|
|
|
+ <div class="tui-title">备注</div>
|
|
|
<input
|
|
|
v-model="form.remark"
|
|
|
placeholder-class="phcolor"
|
|
|
class="tui-input"
|
|
|
+ placeholder-style="color:#ccc"
|
|
|
name="remark"
|
|
|
- placeholder="(选填)"
|
|
|
+ placeholder="选填"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
</div>
|
|
|
@@ -164,7 +139,7 @@
|
|
|
@onConfirm="onCityConfirm"
|
|
|
></simple-address>
|
|
|
<!-- 选择地区 -->
|
|
|
- <app-area-sel :show.sync="showRegion" :city="form.receiveCity" @change="changeAreaFn" />
|
|
|
+ <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -172,7 +147,6 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
|
-// import AppTextarea from '@/components/app-textarea'
|
|
|
import SimpleAddress from "@/components/plugin/simple-address";
|
|
|
import AppAreaSel from "@/components/app-area-sel";
|
|
|
import AppBindInfo from "@/components/app-bind-info";
|
|
|
@@ -182,16 +156,10 @@ export default {
|
|
|
AppAreaSel,
|
|
|
TuiListCell,
|
|
|
AppDatePicker,
|
|
|
- // AppTextarea,
|
|
|
SimpleAddress,
|
|
|
AppBindInfo
|
|
|
},
|
|
|
- props: {
|
|
|
- // anonymous: {
|
|
|
- // type: Boolean,
|
|
|
- // default: true
|
|
|
- // }
|
|
|
- },
|
|
|
+ props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
region: [],
|
|
|
@@ -199,18 +167,19 @@ export default {
|
|
|
form: {
|
|
|
receiveUserName: "", // 收花人姓名;到店自提的姓名
|
|
|
receiveMobile: "", // 收花人手机;到店自提的电话;
|
|
|
- receiveProvince: "", // 收花人省份
|
|
|
- receiveCity: "", // 收花人城市
|
|
|
- receiveAddress: "", // 收花人城市
|
|
|
- receiveFloor: "", // 收花人门楼号和牌号
|
|
|
- receiveFullAddress: "", // 收花人完整地址,从腾讯地图接口获取
|
|
|
- // bookName: '', // 订花人姓名
|
|
|
+ province: "", // 收花人省份
|
|
|
+ city: "", // 收花人城市
|
|
|
+ address: "", // 收花人城市
|
|
|
+ floor: "", // 收花人门楼号和牌号
|
|
|
+ fullAddress: "", // 收花人完整地址,从腾讯地图接口获取
|
|
|
+ bookName: '', // 订花人姓名
|
|
|
bookMobile: "", // 订花人手机号
|
|
|
reachTime: 0, // 配送时间
|
|
|
reachPeriod: "0", // 配送时段,0上午1下午2晚上
|
|
|
needCard: "1", // 是否要贺卡 0不要 1要
|
|
|
cardInfo: "", // 贺卡信息
|
|
|
- remark: "" // 备注
|
|
|
+ remark: "",// 备注
|
|
|
+ anonymity:0
|
|
|
},
|
|
|
region: {
|
|
|
latitude: 0,
|
|
|
@@ -218,7 +187,6 @@ export default {
|
|
|
},
|
|
|
// 省市联动
|
|
|
cityPickerValueDefault: [0, 0]
|
|
|
- // pickerText: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -227,22 +195,19 @@ export default {
|
|
|
watch: {
|
|
|
orderShop(val) {
|
|
|
console.log("val", val);
|
|
|
- this.form.receiveProvince = val.shop.province ? val.shop.province : "";
|
|
|
- this.form.receiveCity = val.shop.city ? val.shop.city : "";
|
|
|
+ this.form.province = val.shop.province ? val.shop.province : "";
|
|
|
+ this.form.city = val.shop.city ? val.shop.city : "";
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
if (!this.$util.isEmpty(this.orderShop)) {
|
|
|
- this.form.receiveProvince = this.orderShop.shop.province
|
|
|
+ this.form.province = this.orderShop.shop.province
|
|
|
? this.orderShop.shop.province
|
|
|
: "";
|
|
|
- this.form.receiveCity = this.orderShop.shop.city
|
|
|
+ this.form.city = this.orderShop.shop.city
|
|
|
? this.orderShop.shop.city
|
|
|
: "";
|
|
|
}
|
|
|
- // if (this.anonymous) {
|
|
|
- // this.form.anonymous = "0";
|
|
|
- // }
|
|
|
},
|
|
|
methods: {
|
|
|
selTimeFn(e) {
|
|
|
@@ -250,47 +215,37 @@ export default {
|
|
|
},
|
|
|
// 选择地址
|
|
|
selRegionFn() {
|
|
|
- if (!this.form.receiveCity) {
|
|
|
- this.$msg("请先选择城市!");
|
|
|
+ if (!this.form.city) {
|
|
|
+ this.$msg("请选择城市");
|
|
|
return false;
|
|
|
}
|
|
|
this.showRegion = true;
|
|
|
- // let that = this
|
|
|
- // uni.chooseLocation({
|
|
|
- // success: res => {
|
|
|
- // this.form.receiveFullAddress = res.address
|
|
|
- // this.region.latitude = res.latitude
|
|
|
- // this.region.longitude = res.longitude
|
|
|
- // }
|
|
|
- // })
|
|
|
},
|
|
|
changeAreaFn(e) {
|
|
|
console.log("changeAreaFn", e);
|
|
|
- this.form.receiveAddress = e.title;
|
|
|
- this.form.receiveFullAddress = e.address;
|
|
|
+ this.form.address = e.title;
|
|
|
+ this.form.fullAddress = e.address;
|
|
|
this.region.latitude = e.location.lat;
|
|
|
this.region.longitude = e.location.lng;
|
|
|
this.$emit("changeAddress", e);
|
|
|
},
|
|
|
- // -----
|
|
|
timeTodaySelFn(index) {
|
|
|
this.form.reachPeriod = index;
|
|
|
},
|
|
|
needCardChange() {
|
|
|
this.form.needCard = this.form.needCard == 1 ? 0 : 1;
|
|
|
},
|
|
|
- // anonymityChange() {
|
|
|
- // this.form.anonymous = this.form.anonymous == 1 ? 0 : 1;
|
|
|
- // },
|
|
|
+ anonymityChange() {
|
|
|
+ this.form.anonymity = this.form.anonymity == 1 ? 0 : 1;
|
|
|
+ },
|
|
|
// 省市联动
|
|
|
openAddres() {
|
|
|
this.$refs.simpleAddress.open();
|
|
|
},
|
|
|
onCityConfirm(e) {
|
|
|
- this.form.receiveAddress = e.label;
|
|
|
- this.form.receiveProvince = e.provinceName;
|
|
|
- this.form.receiveCity = e.cityName;
|
|
|
- // this.pickerText = JSON.stringify(e)
|
|
|
+ this.form.address = e.label;
|
|
|
+ this.form.province = e.provinceName;
|
|
|
+ this.form.city = e.cityName;
|
|
|
}
|
|
|
}
|
|
|
};
|