Commit a2d040dc authored by Smile's avatar Smile

Merge remote-tracking branch 'origin/release' into jd_dev

# Conflicts:
#	src/pages/orderInfo/orderInfo.vue
#	src/static/lang/en/create.js
#	src/static/lang/en/order.js
#	src/static/lang/en/orderInfo.js
parents ee8e4c8d fbcd9094
......@@ -2,8 +2,8 @@
"name" : "E&C logistics",
"appid" : "__UNI__B690450",
"description" : "",
"versionName" : "225",
"versionCode" : 225,
"versionName" : "226",
"versionCode" : 226,
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
......
......@@ -371,7 +371,7 @@
<view class="corder-v5">
<view class="corder-v5-v">
<view class="corder-v5-label"><span class="redcolor">*</span>{{$lang.lang.create.marks}}</view>
<input type="text" v-model="params.marks" maxlength="255" :placeholder="$lang.lang.notices.marks" />
<input type="text" v-model="params.marks" maxlength="255" :placeholder="$lang.lang.notices.marks" @blur="trimMarks" />
</view>
<view class="corder-v5-v" >
<view class="corder-v5-label" @click="cnoticeType2=!cnoticeType2">
......@@ -465,7 +465,7 @@
<view class="corder-v5-v corder-picker" >
<view class="corder-v5-label"><span class="redcolor">*</span>{{$lang.lang.create.date}}</view>
<picker mode="date" class="date-picker" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
<view class="uni-input">{{params.deliveryDate ? params.deliveryDate.split(" ")[0] : '请选择'}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
......@@ -931,9 +931,9 @@
</template>
<script>
import cuihaiCombox from '../../components/cuihai-combox/cuihai-combox.vue'
import Drawee from "@/pages/create_order/components/drawee.vue";
export default {
import Drawee from "@/pages/create_order/components/drawee.vue";
export default {
components: {Drawee},
data() {
const currentDate = this.getDate({
......@@ -1112,7 +1112,7 @@
channelId:0,//渠道ID
orderItemVOList:[],
costVO:{},
deliveryDate:currentDate+' 00:00:00',
deliveryDate: null,
drawee:2,
number:'',
isCargoControl:false,
......@@ -1154,12 +1154,13 @@
dialCode:'',
id:0
},
date:currentDate,
date: '',
time:'00:00',
isClick:false,
link:'',
conIndex:-1,
orderId:0,
copy:false,
unitType:[],
currencyType:[],
lineMethod: false,
......@@ -1210,9 +1211,17 @@
this.getClientaData()
if(op.id){
await this.$nextTick()
this.getOrderData(op.id)
this.orderId = op.id
}
this.orderId = op.id
if (op.copy && op.copy == 1){
this.copy = true
this.getOrderData(op.id, true)
}else {
this.getOrderData(op.id, false)
}
}else{
this.setDefaultDrawee()
}
if(op.transportId){
/*this.params.transportId = op.transportId
setTimeout(()=>{
......@@ -1295,6 +1304,9 @@
this.params.isCargoControl = true
}
},
"params.isCargoControl"() {
this.setDefaultDrawee()
},
"params.drawee"(drawee) {
// 240224 微信反馈
// 不好意思,这写错了,付款人=发货人----提单价格默认否;付款人=收货人,提交价格默认是
......@@ -1307,12 +1319,23 @@
}
},
methods: {
setDefaultDrawee(){
// 优先级为:发货人默认付款,发货人付款>收货人默认付款,收货人付款>订单控货,收货人付款
if(this.$store.state.userInfo.defaultPay){
this.$set(this.params, 'drawee', 1)
return
}
if(this.params.isCargoControl){
this.$set(this.params, 'drawee', 2)
}
},
changeHasConsignee(e){
this.hasConsignee = e.detail.value === "1"
// 无收货人默认发货人付款
if(!this.hasConsignee){
this.$set(this.params, 'drawee', 1)
}
// if(!this.hasConsignee){
// this.$set(this.params, 'drawee', 1)
// }
this.setDefaultDrawee()
},
toback(){
uni.navigateBack()
......@@ -1738,12 +1761,12 @@
title: this.$lang.lang.notices.consigneePhone,
icon: 'error',
})
}else if(!this.params.isCargoControl && this.params.countryCode==this.config.countrySn.value[0]){
}/*else if(!this.params.isCargoControl && this.params.countryCode==this.config.countrySn.value[0]){
return uni.showToast({
title: this.$lang.lang.notices.foreignConsignee,
icon: 'error',
})
}
}*/
if(this.params.consigneeEmail){
let email_reg = /[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/
......@@ -1954,15 +1977,108 @@
})
},
getOrderData(id){
getOrderData(id, copy){
let that = this
that.$request.get('/app-api/my/order/get',{orderId:id}).then(async (res) => {
if(res.code==0&&res.data){
that.params = res.data
if (copy){
// 复制订单,需要将数据初始化
that.params.orderId = null
that.params.orderNo = null
that.params.containerNumber = null
that.params.tidanNo = null
that.params.parentOrderId = null
that.params.parentNumber = null
that.params.number = null
that.params.initialParentOrderId = null
that.params.initialParentOrderNo = null
that.params.noChargeRecord = null
that.params.oldNumbers = null
that.params.userId = 0
that.params.sumNum = null
that.params.sumQuantity = null
that.params.sumVolume = null
that.params.sumWeight = null
that.params.pickleType = null
that.params.pickRatio = null
that.params.pickNum = null
that.params.releaseRatio = null
that.params.cost = null
that.params.packingListUrl = null
that.params.commissionPayable = null
that.params.specialVWeight = null
that.params.handlerChannelAttrException = null
that.params.weightBeforePack = null
that.params.weightAfterPack = null
that.params.stockOverWeightLimit = null
that.params.firstStockedTime = null
that.params.isLimitUpdateConsignee = null
that.params.lockConsigneeDay = null
that.params.lockConsigneeTime = null
that.params.firstStockedTime = null
// 状态重置
that.params.status = 0
that.params.cargoControlStatus = 0
that.params.abnormalState = 0
that.params.inWarehouseState = 0
that.params.shipmentState = 0
that.params.auditType = 0
that.params.auditResult = null
that.params.airShipment = null
that.params.splitSeparateOrder = null
that.params.pickState = null
that.params.guanLianOrderStatus = null
that.params.oldInWarehouseState = null
that.params.oldStatus = null
that.params.oldShipmentState = null
// 时间重置
that.params.takeTime = null
that.params.unloadTime = null
that.params.rucangTime = null
that.params.loadTime = null
that.params.preLoadTime = null
that.params.deliveryDate = null
that.params.daogangTime = null
that.params.qingguanTime = null
that.params.splitTime = null
that.params.isException = null
that.params.exceptionReason = null
that.params.externalWarehouseJson = null
that.params.hasExitAndEntry = null
that.params.hasSendRucangSms = null
that.params.hasSendWarehouseInNotice = null
if (that.params.consignorVO){
that.params.consignorVO.id = null
that.params.consignorVO.orderId = null
}
if (that.params.consigneeVO){
that.params.consigneeVO.id = null
that.params.consigneeVO.orderId = null
}
}
// if(!that.params.number) that.params.number = ''
that.getType()
if(that.params.orderItemVOList.length>0){
that.params.orderItemVOList.forEach((item,index)=>{
if (this.$route.query.copy && this.$route.query.copy == 1) {
item = {
link: item.link,
prodId: item.prodId,
prodTitleEn: item.prodTitleEn,
prodTitleZh: item.prodTitleZh,
prodAttrIds: item.prodAttrIds,
prodType: item.prodType,
volume: item.volume,
weight: item.weight,
quantity: item.quantity,
num: item.num,
worth: item.worth,
boxGauge: item.boxGauge,
brand: item.brand,
brandType: item.brandType
}
}
if(item.prodAttrIds) item.prodAttrs = item.prodAttrIds.split(',')
})
}
......@@ -2101,7 +2217,7 @@
async updateOrder(){
await this.validateCountryAndAreaCode()
this.params.hasConsignee = this.hasConsignee
this.$request.put('/app-api/my/order/update', this.params).then(res => {
this.$request.put('/app-api/my/order/update', { ...this.params, status: 2}).then(res => {
this.isClick = false
if(res.code == 0){
this.params = {
......@@ -3104,7 +3220,8 @@
},
createOrder(){
this.closePayNotice()
if(this.orderId>0){
if(this.orderId > 0 && !this.copy){
// 订单id大于0,且不是复制订单,则调用编辑订单业务
this.updateOrder()
}else{
this.creatOrder()
......@@ -3338,6 +3455,10 @@
changeHarvestMethod(e){
this.currentHarvestIndex = e.detail.value
this.params.harvestMethod = this.harvestList[this.currentHarvestIndex].value
},
// 去掉唛头首尾空格
trimMarks(){
this.params.marks = this.params.marks.trim()
}
}
}
......
......@@ -96,7 +96,7 @@
</view>
<view v-if="selectIndex==1||(selectIndex==0&&item.deliverGoods)" class="order-btn">
<view @click="toOrderInfo(item.orderId)">{{$lang.lang.order.see}}</view>
<view v-if='item.status==0||item.status==2' @click="toEditOrder(item.orderId)">{{$lang.lang.order.edit}}</view>
<view v-if='item.status==0||item.status==2' @click="toEditOrder(item.orderId, false)">{{$lang.lang.order.edit}}</view>
<view v-if='item.status==0||item.status==88' @click="delOrder(item.orderId)">{{$lang.lang.order.delete}}</view>
<view v-if='item.status==2&&item.status!=88' @click="cancelOrder(item.orderId)">{{$lang.lang.order.cancelOrder}}</view>
<view v-if='item.status==5&&item.status!=88' @click="returnOrder(index)">{{$lang.lang.order.exit}}</view>
......@@ -222,24 +222,58 @@
<text>{{$lang.lang.order.haveNum}}{{parseInt(selectOrder.sumNum)-parseInt(selectOrder.releaseNum)}}</text>
<text>{{$lang.lang.order.sumVolume}}{{selectOrder.sumVolume}}</text>
<text>{{$lang.lang.order.sumWeight}}{{selectOrder.sumWeight}}</text>
<text style="width:100%">{{$lang.lang.order.unloadTime}}{{releaseData.unloadTime || '-'}}</text>
<text style="width:100%">{{$lang.lang.order.lockConsigneeTime}}{{releaseData.lockConsigneeTime || '-'}}</text>
<text style="width:100%">{{$lang.lang.order.isLimitUpdateConsignee}}{{releaseData.isLimitUpdateConsignee ? $lang.lang.order.yes : $lang.lang.order.no}}</text>
</view>
<view class="lendFrom_title">{{$lang.lang.order.writeInfo}}</view>
<!--
http://czxy.cpolar.top/task-view-818.html
新增备注信息,逻辑如下:
1. 当订单限制修改收货人=是&&订单已卸柜/到仓&&当前时间<=放货锁定收货人到期时间
备注:订单锁定收货人未到期,不允许修改控货收货人
2. 当订单限制修改收货人=是&&订单已卸柜/到仓&&当前时间>放货锁定收货人到期时间
备注:订单锁定收货人信息已到期,允许修改控货收货人
3. 当订单限制修改收货人=是&&订单未卸柜/到仓
备注:订单未卸柜/到仓,不允许修改控货收货人
4. 当订单限制修改收货人=否
备注: 订单允许修改控货收货人
-->
<view class="tips" v-if="releaseData.isLimitUpdateConsignee && releaseData.unloadTime && Date.now() <= (new Date(releaseData.lockConsigneeTime)).getTime()">
{{$lang.lang.order.remark1}}
</view>
<view class="tips" v-if="releaseData.isLimitUpdateConsignee && releaseData.unloadTime && Date.now() > (new Date(releaseData.lockConsigneeTime)).getTime()">
{{$lang.lang.order.remark2}}
</view>
<view class="tips" v-if="releaseData.isLimitUpdateConsignee && !releaseData.unloadTime">
{{$lang.lang.order.remark1}}
</view>
<view class="tips" v-if="!releaseData.isLimitUpdateConsignee">
{{$lang.lang.order.remark4}}
</view>
<view class="lendFrom_info">
<view class="corder-tab1-item">
<text>{{$lang.lang.order.consignee}}<span class="redcolor">*</span></text>
<input v-model="lendingFrom.consigneeName" type="text" :placeholder="$lang.lang.notices.consignee" />
<view v-if="disableUpdateCongsignee" class="corder-phone">
{{lendingFrom.consigneeName}}
</view>
<input v-else v-model="lendingFrom.consigneeName" type="text" :placeholder="$lang.lang.notices.consignee" />
</view>
<view class="corder-tab1-item">
<text>{{$lang.lang.order.consigneeTel}}<span class="redcolor">*</span></text>
<view class="corder-phone">
<view class="countrySn-item">
<picker class="countrySn" :value="config.countrySn.index" :range="config.countrySn.label" data-config="countrySn" data-key="consigneeCountryCode" @change="configChange" v-if="config.countrySn.value.length > 0">
<view class="uni-input">{{$request.checkAddIcon(config.countrySn.value[config.countrySn.index])}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
<input class="countrySn-input" v-model="lendingFrom.consigneePhone" maxlength="11" type="number" :placeholder="$lang.lang.notices.phone" />
</view>
<view class="corder-phone" v-if="disableUpdateCongsignee">
{{$request.checkAddIcon(config.countrySn.value[config.countrySn.index])}}
{{lendingFrom.consigneePhone}}
</view>
<view class="corder-phone" v-else>
<view class="countrySn-item">
<picker class="countrySn" :value="config.countrySn.index" :range="config.countrySn.label" data-config="countrySn" data-key="consigneeCountryCode" @change="configChange" v-if="config.countrySn.value.length > 0">
<view class="uni-input" style="white-space: nowrap;">{{$request.checkAddIcon(config.countrySn.value[config.countrySn.index])}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
<input class="countrySn-input" :disabled="disableUpdateCongsignee" v-model="lendingFrom.consigneePhone" maxlength="11" type="number" :placeholder="$lang.lang.notices.phone" />
</view>
</view>
<view class="corder-tab1-item">
<text>{{$lang.lang.order.num}}<span class="redcolor">*</span></text>
......@@ -519,6 +553,16 @@
smsIndex: 0
}
},
computed:{
disableUpdateCongsignee(){
if(!this.releaseData?.isLimitUpdateConsignee) return false
// 锁定且过期了返回false,其他情况全部是true
if(this.releaseData.isLimitUpdateConsignee && this.releaseData.lockConsigneeTime && new Date(this.releaseData.lockConsigneeTime).getTime() < Date.now()){
return false
}
return true
}
},
onLoad() {
this.getStatusData()
this.getCountrySn()
......@@ -1126,10 +1170,16 @@
url:'../orderInfo/orderInfo?id='+id
})
},
toEditOrder(id){
uni.navigateTo({
url:'../create_order/create_order?id='+id
})
toEditOrder(id, copy){
if (copy){
uni.navigateTo({
url:'../create_order/create_order?id='+id +'&copy=1'
})
}else {
uni.navigateTo({
url:'../create_order/create_order?id='+id
})
}
},
toException(id){
uni.navigateTo({
......@@ -1326,9 +1376,10 @@
})
},*/
copy(orderId){
this.$request.post("/app-api/my/order/copy/" + orderId).then(res => {
this.toEditOrder(res.data)
})
this.toEditOrder(orderId, true)
// this.$request.post("/app-api/my/order/copy/" + orderId).then(res => {
// this.toEditOrder(res.data)
// })
}
},
......@@ -1337,4 +1388,9 @@
<style>
@import url("../../static/css/order.css");
.lendFrom_content .tips{
color: red;
padding-left: 12px;
padding-bottom: 10px;
}
</style>
This diff is collapsed.
......@@ -356,5 +356,5 @@ page{
border-bottom: none;
margin-bottom: -20upx;
padding-left: 8rpx;
display: flex;
}
......@@ -125,4 +125,4 @@ export default {
"hideBillLadingPrice": "No",
"tips": "Tips",
"areaCodeAndDestCountryCheckFail": "The location of the number is different from the destination country. Please check",
}
\ No newline at end of file
}
......@@ -80,5 +80,14 @@ export default {
"manager": "Administrator",
"lendingType": "Verification Method",
"lendSussess": "Successfully released",
"copy": "Copy"
}
\ No newline at end of file
"copy": "Copy",
"unloadTime": "Warehouse Arrival/Unloading Date",
"lockConsigneeTime": "Consignee Lock Expiration",
"isLimitUpdateConsignee": "Order Restricts Consignee Modification",
"yes": "Yes",
"no": "No",
"remark1": "Note: Consignee lock period has not expired; consignee modification is not allowed.",
"remark2": "Note: Consignee lock period has expired; consignee modification is allowed.",
"remark3": "Note: Order has not been unloaded/arrived at the warehouse; consignee modification is not allowed.",
"remark4": "Note: Consignee modification is allowed for the order."
}
......@@ -91,4 +91,4 @@ export default {
"quickNos": "Tracking Number",
"unitType": "Packaging Type",
"is": "Yes"
}
\ No newline at end of file
}
......@@ -80,5 +80,14 @@ export default {
"manager": "管理员",
"lendingType": "校验方式",
"lendSussess": "放货成功",
"copy": "复制"
"copy": "复制",
"unloadTime": "到仓日期/卸柜日期",
"lockConsigneeTime": "放货锁定收货人到期",
"isLimitUpdateConsignee": "订单限制修改收货人",
"yes": "",
"no": "",
"remark1": "备注:订单锁定收货人未到期,不允许修改控货收货人",
"remark2": "备注:订单锁定收货人信息已到期,允许修改控货收货人",
"remark3": "备注:订单未卸柜/到仓,不允许修改控货收货人",
"remark4": "备注:订单允许修改控货收货人",
}
......@@ -2,7 +2,7 @@
// const domain = 'https://api.jd.jdshangmen.com'
// const domain = 'https://api.sit.jdshangmen.com'
// const domain = 'https://api2.groupage.cn'
const domain = 'https://apitest.groupage.cn'
const domain = 'https://api2.groupage.cn'
const config = {
CDN_DOMAIN: domain,
API: domain
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment