|
@@ -102,7 +102,7 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发单备注">
|
|
|
- <el-input type="text" size="small" v-model="form.takeRemark" maxlength="20" placeholder="请添加备注信息,最多输入20个字!" clearable show-word-limit>
|
|
|
+ <el-input type="text" size="small" v-model="form.takeRemark" maxlength="80" placeholder="请添加备注信息,最多输入20个字!" clearable show-word-limit>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -131,11 +131,14 @@
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<div class="shop-list">
|
|
|
- <div @dblclick="chooseShop" @click="curIdx = index" :class=" curIdx === index ? 'shop-item active' : 'shop-item'" v-for="(shop,index) in addressList" :key="index">
|
|
|
- <div class="name">{{shop.name}}</div>
|
|
|
- <div class="phone">{{shop.contact + ' ' + shop.phone}}</div>
|
|
|
- <div class="address">{{shop.districtName + shop.address}}</div>
|
|
|
- </div>
|
|
|
+ <template v-if="addressList.length">
|
|
|
+ <div @dblclick="chooseShop" @click="curIdx = index" :class=" curIdx === index ? 'shop-item active' : 'shop-item'" v-for="(shop,index) in addressList" :key="index">
|
|
|
+ <div class="name">{{shop.name}}</div>
|
|
|
+ <div class="phone">{{shop.contact + ' ' + shop.phone}}</div>
|
|
|
+ <div class="address">{{shop.districtName + shop.address}}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-empty v-else :description="`暂无可用${addressType === 1 ? '门店' : '地址'}`"></el-empty>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="small" @click="showChooseShop = false">取 消</el-button>
|
|
@@ -291,7 +294,7 @@ export default {
|
|
|
methods: {
|
|
|
getOrderDetail() {
|
|
|
getOrderDetail({ orderId: this.orderId }).then((res) => {
|
|
|
- // console.log("再来一单订单详情:", res);
|
|
|
+ console.log("再来一单订单详情:", res);
|
|
|
if (res.code === 200) {
|
|
|
let data = res.data;
|
|
|
let nowTime = new Date().getTime();
|
|
@@ -312,9 +315,19 @@ export default {
|
|
|
showCancelButton: false,
|
|
|
center: true,
|
|
|
}
|
|
|
- )
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
+ );
|
|
|
+ }
|
|
|
+ let receiptPhone = data.receiptPhone;
|
|
|
+ let receiptExtension = data.receiptExtension;
|
|
|
+ let sendPhone = data.sendPhone;
|
|
|
+ let sendExtension = data.sendExtension;
|
|
|
+ if (data.receiptPhone.length > 11) {
|
|
|
+ receiptPhone = data.receiptPhone.slice(0, 11);
|
|
|
+ receiptExtension = data.receiptPhone.slice(12);
|
|
|
+ }
|
|
|
+ if (data.sendPhone.length > 11) {
|
|
|
+ sendPhone = data.sendPhone.slice(0, 11);
|
|
|
+ sendExtension = data.sendPhone.slice(12);
|
|
|
}
|
|
|
this.form = {
|
|
|
createType: "",
|
|
@@ -334,8 +347,8 @@ export default {
|
|
|
isDefault: "",
|
|
|
lat: data.receiptLat,
|
|
|
lng: data.receiptLng,
|
|
|
- phone: data.receiptPhone,
|
|
|
- extension: data.receiptExtension ?? "",
|
|
|
+ phone: receiptPhone,
|
|
|
+ extension: receiptExtension ?? "",
|
|
|
provinceName: data.receiptProvinceName || data.sendProvinceName,
|
|
|
street: data.receiptStreet,
|
|
|
type: "",
|
|
@@ -350,8 +363,8 @@ export default {
|
|
|
id: data.sendAddressId,
|
|
|
lat: data.sendLat,
|
|
|
lng: data.sendLng,
|
|
|
- phone: data.sendPhone,
|
|
|
- extension: data.sendExtension ?? "",
|
|
|
+ phone: sendPhone,
|
|
|
+ extension: sendExtension ?? "",
|
|
|
provinceName: data.sendProvinceName,
|
|
|
street: data.sendStreet,
|
|
|
},
|
|
@@ -376,7 +389,6 @@ export default {
|
|
|
},
|
|
|
getResource() {
|
|
|
getResource().then((res) => {
|
|
|
- // console.log("物品来源:", res);
|
|
|
if (res.code === 200) {
|
|
|
this.goodsSource = res.data;
|
|
|
this.form.platformType = this.goodsSource[0].type;
|
|
@@ -452,7 +464,6 @@ export default {
|
|
|
this.curIdx = this.addressList.findIndex((v) => {
|
|
|
return v.id === shopId;
|
|
|
});
|
|
|
- console.log("sendAddress1", sendAddress);
|
|
|
Object.keys(this.form.sendAddress).map((v) => {
|
|
|
this.form.sendAddress[v] = sendAddress ? sendAddress[v] : "";
|
|
|
});
|
|
@@ -475,7 +486,6 @@ export default {
|
|
|
return v.isDefault;
|
|
|
});
|
|
|
}
|
|
|
- console.log("sendAddress2", sendAddress);
|
|
|
Object.keys(this.form.sendAddress).map((v) => {
|
|
|
this.form.sendAddress[v] = sendAddress ? sendAddress[v] : "";
|
|
|
});
|
|
@@ -488,7 +498,6 @@ export default {
|
|
|
this.curIdx = this.addressList.findIndex((v) => {
|
|
|
return v.id === this.personalReceiptAddressId;
|
|
|
});
|
|
|
- console.log("receiptAddress", receiptAddress);
|
|
|
Object.keys(this.form.receiptAddress).map((v) => {
|
|
|
this.form.receiptAddress[v] = receiptAddress
|
|
|
? receiptAddress[v]
|
|
@@ -586,14 +595,12 @@ export default {
|
|
|
message: "请填写平台流水号!",
|
|
|
});
|
|
|
}
|
|
|
- console.log("重量1:", this.form.weight);
|
|
|
|
|
|
let reg = new RegExp(/^[1-9]\d*$/g);
|
|
|
if (
|
|
|
!reg.test(Number(this.form.weight)) ||
|
|
|
Number(this.form.weight) > 50
|
|
|
) {
|
|
|
- console.log("重量:", this.form.weight);
|
|
|
this.$refs.weight.focus();
|
|
|
return this.$message({
|
|
|
type: "error",
|
|
@@ -654,7 +661,6 @@ export default {
|
|
|
});
|
|
|
})
|
|
|
.catch((action) => {
|
|
|
- console.log("action:", action);
|
|
|
if (action === "close") {
|
|
|
return;
|
|
|
} else {
|
|
@@ -948,7 +954,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.shop-list {
|
|
|
- height: 60vh;
|
|
|
+ height: 55vh;
|
|
|
overflow: scroll;
|
|
|
.shop-item {
|
|
|
border: 1px solid #999;
|