Commit a4a0032f authored by dragondean@qq.com's avatar dragondean@qq.com

订单编辑适配

parent 288dedd9
......@@ -8,6 +8,9 @@
url: './pages/login/login'
})
}
if(Authorization && !this.$store.state.userInfo){
this.$store.dispatch('updateUserInfo')
}
//#ifdef APP-PLUS
plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) {
// 获取 app的version
......
......@@ -2,8 +2,8 @@
"name" : "E&C logistics",
"appid" : "__UNI__B690450",
"description" : "",
"versionName" : "221",
"versionCode" : 221,
"versionName" : "225",
"versionCode" : 225,
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
......@@ -19,7 +19,8 @@
},
"modules" : {
"VideoPlayer" : {},
"Barcode" : {}
"Barcode" : {},
"Camera" : {}
},
/* 模块配置 */
"distribute" : {
......
......@@ -12,22 +12,32 @@
<view class="corder-tab1">
<view class="corder-tab-top">
<image src="../../static/img/corder-1.png" mode=""></image>
<view>{{$lang.lang.create.consignee}}</view>
<view class="flex items-center flex-1">
<view class="title">{{$lang.lang.create.consignee}}</view>
<radio-group @change="changeHasConsignee" class="flex items-center">
<label class="radio">
<radio value="1" :checked="hasConsignee" /><text></text>
</label>
<label class="radio" style="margin-left: 10rpx">
<radio value="0" :checked="!hasConsignee" /><text></text>
</label>
</radio-group>
</view>
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/order-user.png" mode=""></image>
<text><span class="redcolor">*</span>{{$lang.lang.create.name}}</text>
<view class="addname">
<input class="consignee-input" v-model="params.consigneeName" type="text" :placeholder="$lang.lang.notices.name" />
<view class="choiceBtn" @click="tochoice">{{$lang.lang.create.choiceConsignee}}</view>
<view class="flex items-center" style="width: 30px">
<image src="../../static/img/add.png" class="icon" v-if="!showFullConsignee" @click="showFullConsignee=true"></image>
<image src="../../static/img/sub.png" class="icon" v-else @click="showFullConsignee=false"></image>
</view>
</view>
<!-- v1.7新增 -->
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/order-user.png" mode=""></image>
<text>{{$lang.lang.create.nameEn}}</text>
<text><span class="redcolor">*</span>{{$lang.lang.create.name}}</text>
<view class="addname">
<input class="consignee-input" v-model="params.consigneeNameEn" type="text" :placeholder="$lang.lang.notices.nameEn" />
<input class="consignee-input" v-model="params.consigneeName" type="text"
:placeholder="$lang.lang.notices.name"
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee"
/>
<view v-if="hasConsignee" class="choiceBtn" @click="tochoice">{{$lang.lang.create.choiceConsignee}}</view>
</view>
</view>
<view class="corder-tab1-item">
......@@ -36,30 +46,63 @@
<!-- <input v-model="params.consigneePhone" type="text" :placeholder="请输入电话" /> -->
<view class="corder-phone">
<view class="countrySn-item">
<picker class="countrySn" :value="config.countrySn.indexs" :range="config.countrySn.label" data-config="countrySn" data-key="countryCode" @change="configChange" v-if="config.countrySn.value.length > 0">
<picker
class="countrySn"
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee"
:value="config.countrySn.indexs"
:range="config.countrySn.label" data-config="countrySn" data-key="countryCode" @change="configChange" v-if="config.countrySn.value.length > 0">
<view class="uni-input">{{$request.checkAddIcon(config.countrySn.value[config.countrySn.indexs])}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
<input class="countrySn-input" v-model="params.consigneePhone" @blur="checkMoblie" maxlength="11" type="number" :placeholder="$lang.lang.notices.phone" />
<input
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee"
class="countrySn-input"
v-model="params.consigneePhone" @blur="checkMoblie"
maxlength="11"
type="number"
:placeholder="$lang.lang.notices.phone" />
</view>
</view>
<template v-if="showFullConsignee">
<!-- v1.7新增 -->
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/order-user.png" mode=""></image>
<text>{{$lang.lang.create.nameEn}}</text>
<view class="addname">
<input
class="consignee-input"
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee"
v-model="params.consigneeNameEn" type="text"
:placeholder="$lang.lang.notices.nameEn" />
</view>
</view>
<view class="corder-tab1-item">
<image src="../../static/img/order-email.png" mode=""></image>
<text>{{$lang.lang.create.email}}</text>
<input v-model="params.consigneeEmail" type="text" :placeholder="$lang.lang.notices.email" />
<input v-model="params.consigneeEmail" type="text" :placeholder="$lang.lang.notices.email"
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee" />
</view>
<view class="corder-tab1-item">
<image src="../../static/img/corder-1-3.png" mode=""></image>
<text>{{$lang.lang.create.company}}</text>
<input v-model="params.consigneeCompany" type="text" :placeholder="$lang.lang.notices.company" />
<input v-model="params.consigneeCompany" type="text" :placeholder="$lang.lang.notices.company"
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee" />
</view>
<!-- v1.7新增 -->
<view class="corder-tab1-item">
<image src="../../static/img/corder-1-3.png" mode=""></image>
<text>{{$lang.lang.create.companyEn}}</text>
<input v-model="params.consigneeCompanyEn" type="text" :placeholder="$lang.lang.notices.companyEn" />
<input v-model="params.consigneeCompanyEn" type="text" :placeholder="$lang.lang.notices.companyEn"
:class="{disabled: !hasConsignee}"
:disabled="!hasConsignee" />
</view>
</template>
</view>
</view>
<view class="corder bgf">
......@@ -68,17 +111,15 @@
<image src="../../static/img/corder-1.png" mode=""></image>
<view>{{$lang.lang.create.transport}}</view>
</view>
<view class="corder-tab1-item corder-picker" v-if="lineMethod">
<image src="../../static/img/corder-1-2.png" mode=""></image>
<text>{{$lang.lang.create.type}}</text>
<view class="order_type">
<checkbox-group @change="changeType">
<view v-for="item in items" :key="item.value" v-if="item.show">
<checkbox style="transform:scale(0.8)" :value="item.value" :checked="item.checked" />{{item.name}}
</view>
</checkbox-group>
</view>
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/corder-1-1.png" mode=""></image>
<text><span class="redcolor">*</span>{{$lang.lang.create.method}}</text>
<picker :class="config.transport.index == 0 ? 'v-picker v-picker-2' : 'v-picker'" :value="config.transport.index" :range="config.transport.label" data-config="transport" data-key="transportId" @change="configChange" v-if="config.transport.value.length > 0">
<view class="uni-input">{{config.transport.label[config.transport.index]}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/corder-1-3.png" mode=""></image>
<text><span class="redcolor">*</span>{{$lang.lang.create.startCity}}</text>
......@@ -96,10 +137,10 @@
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/corder-1-1.png" mode=""></image>
<text><span class="redcolor">*</span>{{$lang.lang.create.method}}</text>
<picker :class="config.transport.index == 0 ? 'v-picker v-picker-2' : 'v-picker'" :value="config.transport.index" :range="config.transport.label" data-config="transport" data-key="transportId" @change="configChange" v-if="config.transport.value.length > 0">
<view class="uni-input">{{config.transport.label[config.transport.index]}}</view>
<image src="../../static/img/corder-1-5.png" mode=""></image>
<text><span class="redcolor">*</span>{{$lang.lang.notices.lined}}</text>
<picker :disabled="openedRouterF||!params.transportId" :class="config.openedRouter.index == 0 ? 'v-picker v-picker-2' : 'v-picker'" :value="config.openedRouter.index" :range="config.openedRouter.label" data-config="openedRouter" data-key="lineId" @change="configChange" v-if="config.openedRouter.value.length > 0">
<view class="uni-input">{{config.openedRouter.label[config.openedRouter.index]}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
......@@ -111,13 +152,16 @@
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
<view class="corder-tab1-item corder-picker">
<image src="../../static/img/corder-1-5.png" mode=""></image>
<text><span class="redcolor">*</span>{{$lang.lang.notices.lined}}</text>
<picker :disabled="openedRouterF||!params.transportId" :class="config.openedRouter.index == 0 ? 'v-picker v-picker-2' : 'v-picker'" :value="config.openedRouter.index" :range="config.openedRouter.label" data-config="openedRouter" data-key="lineId" @change="configChange" v-if="config.openedRouter.value.length > 0">
<view class="uni-input">{{config.openedRouter.label[config.openedRouter.index]}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
<view class="corder-tab1-item corder-picker" v-if="lineMethod">
<image src="../../static/img/corder-1-2.png" mode=""></image>
<text>{{$lang.lang.create.type}}</text>
<view class="order_type">
<checkbox-group @change="changeType">
<view v-for="item in items" :key="item.value" v-if="item.show">
<checkbox style="transform:scale(0.8)" :value="item.value" :checked="item.checked" />{{item.name}}
</view>
</checkbox-group>
</view>
</view>
</view>
</view>
......@@ -143,6 +187,28 @@
<text>{{$lang.lang.create.brand}}:</text>
<text>{{item.brandType==1?$lang.lang.create.yes:$lang.lang.create.no}}</text>
</view>
</view>
<view class="corder-goods-v-item">
<view class="flex">
<text>{{$lang.lang.create.prodEn}}:</text>
<text class="flex-1">{{item.prodTitleEn}}</text>
<view class="action">
<image v-if="!item.showFull" @click="item.showFull = true" src="../../static/img/add.png" class="icon"></image>
<image v-else @click="item.showFull = false" src="../../static/img/sub.png" class="icon"></image>
</view>
</view>
<view class="flex items-center">
<text>{{$lang.lang.create.form}}:</text>
<text class="flex-1">{{item.num}}{{$lang.lang.create.box}}</text>
<view class="action flex">
<view class="btn" @click="open(index)">{{$lang.lang.create.edit}}</view>
<view class="btn" @click="delGoods(index)">{{$lang.lang.create.delete}}</view>
</view>
</view>
</view>
</view>
<view class="corder-goods-v" v-if="item.showFull">
<view class="corder-goods-v-item">
<view class="">
<text>{{$lang.lang.create.num}}:</text>
<text>{{item.quantity||0}}{{$lang.lang.create.aunit}}</text>
......@@ -166,14 +232,6 @@
</view>
<view class="corder-goods-v-item">
<view class="">
<text>{{$lang.lang.create.prodEn}}</text>
<text>{{item.prodTitleEn}}</text>
</view>
<view class="">
<text>{{$lang.lang.create.form}}</text>
<text>{{item.num}}{{$lang.lang.create.box}}</text>
</view>
<view class="">
<text>{{$lang.lang.create.prodAttr}}: </text>
<text>{{getProductAttrLabel(item.prodAttrIds)}}</text>
......@@ -188,23 +246,11 @@
</view>
</view>
</view>
<view class="corder-link">
<view class="corder-link" v-if="item.showFull">
<text>{{$lang.lang.create.link}}:</text>
<view class="corder-linkLabel" @click="toLink(item.link)"><input v-model="item.link" type="text" disabled/></view>
<view class="link-btn" @click="openLink(index)">{{item.link?$lang.lang.create.editLink:$lang.lang.create.addLink}}</view>
</view>
<view class="corder-bom">
<view class="corder-bom-v">
<!-- <view v-if="!item.seaFreight" class="corder-bom-desc"><text>运费:</text><text>未报价</text></view>
<view v-if="item.seaFreight" class="corder-bom-desc"><text>运费:</text><text>{{item.seaFreight}} {{getCurrencyType(item.seaFreightCurrency)}}/{{getUnitType(item.seaFreightVolume)}}</text></view>
<view v-if="!item.clearanceFreight" class="corder-bom-desc"><text>清关费:</text><text>未报价</text></view>
<view v-if="item.clearanceFreight" class="corder-bom-desc"><text>清关费:</text><text>{{item.clearanceFreight}} {{getCurrencyType(item.clearanceFreightCurrency)}}/{{getUnitType(item.clearanceFreightVolume)}}</text></view> -->
</view>
<view class="corder-bom-v">
<view class="" @click="open(index)">{{$lang.lang.create.edit}}</view>
<view class="" @click="delGoods(index)">{{$lang.lang.create.delete}}</view>
</view>
</view>
</view>
</view>
......@@ -283,123 +329,7 @@
</view> -->
<!-- </view> -->
<view class="corder-tab2 bgf" v-if="params.transportId">
<view class="corder-tab-top">
<image src="../../static/img/corder-5.png" mode=""></image>
<view class="">{{config.transport.label[config.transport.index]}}</view>
</view>
<view class="corder-v5">
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.quickNo}}</view>
<textarea @blur="bindTextAreaBlur" v-model="params.number" :placeholder="$lang.lang.notices.numbers" />
<view class="autoBtn" @click="autoCreatOrderSn">{{$lang.lang.create.auto}}</view>
</view>
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.lined}}</view>
<view class="">{{config.openedRouter.index==0?$lang.lang.create.no:config.openedRouter.label[config.openedRouter.index]}}</view>
</view>
<view class="corder-v5-v" v-if="!channeled">
<view class="corder-v5-label">{{$lang.lang.create.channel}}</view>
<view class="">{{config.channel.index==0?$lang.lang.create.no:config.channel.label[config.channel.index]}}</view>
</view>
<view class="corder-v5-v" v-if="['2','3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.doubleClear}}</view>
<view class="corder-radio-2">
<radio-group @change="doubleClear">
<label class="radio">
<radio value="1" :checked="params.doubleClear==1" /><text>{{$lang.lang.create.conClear}}</text>
</label>
<label class="radio">
<radio value="2" :checked="params.doubleClear==2" /><text>{{$lang.lang.create.myClear}}</text>
</label>
</radio-group>
</view>
</view>
<!-- <view class="corder-v5-v corder-picker" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.air}}</view>
<picker class="date-picker" :value="config.clientaData.index" :range="config.clientaData.label" data-config="clientaData" data-key="airlineCompany" @change="configChange" v-if="config.clientaData.value.length > 0">
<view class="uni-input">{{config.clientaData.label[config.clientaData.index]}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view> -->
<view class="corder-v5-v corder-picker" v-if="['2'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.ship}}</view>
<picker class="date-picker" :value="config.clientaData.index" :range="config.clientaData.label" data-config="clientaData" data-key="shippingCompany" @change="configChange" v-if="config.clientaData.value.length > 0">
<view class="uni-input">{{config.clientaData.label[config.clientaData.index]}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
<view class="corder-v5-v" v-if="['2','3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.clearCard}}</view>
<view class="corder-radio-2" >
<radio-group @change="customsClearCert" >
<label class="radio">
<radio value="true" :checked="params.customsClearCert" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<radio value="false" :checked="!params.customsClearCert" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
</view>
</view>
<view class="corder-v5-v remark" v-if="['2','3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.clearRemark}}</view>
<input type="text" v-model="params.remarks" :placeholder="$lang.lang.notices.clearRemark">
</view>
<view class="corder-v5-v" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.unpack}}</view>
<view class="corder-radio-2">
<radio-group @change="isUnpack">
<label class="radio">
<radio value="true" :checked="params.isUnpack" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<radio value="false" :checked="!params.isUnpack" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
</view>
</view>
<view class="corder-v5-v" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.nowChange}}</view>
<view class="corder-radio-2">
<radio-group @change="isSingleTicketTransport" >
<label class="radio">
<radio value="true" :checked="params.isSingleTicketTransport" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<radio value="false" :checked="!params.isSingleTicketTransport" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
</view>
</view>
<view class="corder-v5-v" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<image src="../../static/img/tips.png" mode="widthFix"></image>
<text style="margin-left:10px">{{$lang.lang.create.nowNotice}}</text>
</view>
<view class="corder-v5-v">
<view class="corder-v5-label" @click="cnoticeType1=!cnoticeType1">{{$lang.lang.create.special}}
<image src="../../static/img/helps.png" mode=""></image>
<view v-show="cnoticeType1" class="cnotice" style="width: 260px;">
<text>{{$lang.lang.create.cnotice1}}</text>
</view>
</view>
<view style="flex:1">
<checkbox-group @change="getPackageType" class="checklist" v-model="params.packageType">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item,index) in packageType" :key="index">
<view class="checkbox-item">
<checkbox :value="item.value+''" :checked="item.checked" style="transform:scale(0.8)"/>
</view>
<view>{{$lang.locale=='zh'?item.label:item.labelEn}}</view>
</label>
</checkbox-group>
</view>
</view>
<view class="corder-v5-v remark">
<view class="corder-v5-label">{{$lang.lang.create.specialNote}}</view>
<input type="text" :placeholder="$lang.lang.notices.specialNote" v-model="params.packageRemarks">
</view>
</view>
</view>
<view class="corder-tab2 bgf" >
<view class="corder-tab-top">
<image src="../../static/img/corder-1.png" mode=""></image>
......@@ -424,7 +354,7 @@
<label class="radio">
<radio value="true" :checked="params.isCargoControl" :disabled="controlLine" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<label class="radio" v-if="hasConsignee">
<radio value="false" :checked="!params.isCargoControl" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
......@@ -464,19 +394,8 @@
</radio-group>
</view>
</view>
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.issuingMethod}}</view>
<view class="corder-radio-2">
<radio-group @change="issuingMethod">
<label class="radio">
<radio value="1" :checked="params.issuingMethod==1" /><text>{{$lang.lang.create.dianfang}}</text>
</label>
<label class="radio">
<radio value="2" :checked="params.issuingMethod==2" /><text>{{$lang.lang.create.zhengben}}</text>
</label>
</radio-group>
</view>
</view>
<!--是否代收货款-->
<view class="corder-v5-v" v-if='collectionShow'>
<view class="corder-v5-label">{{$lang.lang.create.payment}}</view>
<view class="corder-radio-2">
......@@ -502,23 +421,17 @@
</view>
</view>
</view>
<!--送货日期-->
<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>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
<!-- <view class="address-list">
<view class="corders-picker">
</view> -->
<!-- <view class="corders-picker">
<picker mode="time" class="date-picker" :value="time" start="00:00" end="23:59" @change="bindTimeChange">
<view class="uni-input">{{time}}</view>
</picker>
</view> -->
<!-- </view> -->
</view>
<!--入仓类型-->
<view class="corder-v5-v corder-picker">
<view class="corder-v5-label"><span class="redcolor">*</span>{{$lang.lang.create.levite}}</view>
<picker class="date-picker" :value="config.warehouseType.index" :range="config.warehouseType.label" data-config="warehouseType" data-key="warehouseType" @change="configChange" v-if="config.warehouseType.value.length > 0">
......@@ -526,6 +439,8 @@
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
<!--付款人-->
<view class="corder-v5-v" >
<view class="corder-v5-label"><span class="redcolor">*</span>{{$lang.lang.create.payer}}</view>
<view class="corder-radio-2">
......@@ -539,6 +454,10 @@
</radio-group>
</view>
</view>
<!--提单价格-->
<!--收货方式-->
<view class="corder-v5-v corder-picker">
<view class="corder-v5-label"><span class="redcolor">*</span>{{$lang.lang.create.consignorType}}</view>
<picker class="date-picker" :value="config.harvestMethod.index" :range="config.harvestMethod.label" data-config="harvestMethod" data-key="harvestMethod" @change="configChange" v-if="config.harvestMethod.value.length > 0">
......@@ -569,13 +488,32 @@
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="corder-v5-v" v-if="params.harvestMethod==2">
<image src="../../static/img/corder-1-4.png" mode="widthFix"></image>
<view class="corder-v5-label">{{$lang.lang.create.addressInfo}}</view>
<input type="text" v-model="params.consigneeAddress" :placeholder="$lang.lang.notices.addressInfo"/>
</view>
</view>
<!--下面的字段在新的原型上没有提现,暂时隐藏-->
<view v-if="0">
<!--出单方式-->
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.issuingMethod}}</view>
<view class="corder-radio-2">
<radio-group @change="issuingMethod">
<label class="radio">
<radio value="1" :checked="params.issuingMethod==1" /><text>{{$lang.lang.create.dianfang}}</text>
</label>
<label class="radio">
<radio value="2" :checked="params.issuingMethod==2" /><text>{{$lang.lang.create.zhengben}}</text>
</label>
</radio-group>
</view>
</view>
<!--关联报价单-->
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.baojia}}</view>
<!-- <input type="text" v-model="params.offerId" maxlength="255" :placeholder="$lang.lang.create.baojia" /> -->
......@@ -585,10 +523,154 @@
</view>
</view>
<!--其他-->
<view class="corder-tab2 bgf">
<view class="corder-tab-top">
<image src="../../static/img/corder-5.png" mode=""></image>
<view class="">{{$lang.lang.create.other}}</view>
</view>
<view class="corder-v5">
<!--特殊要求-->
<view class="corder-v5-v">
<view class="corder-v5-label" @click="cnoticeType1=!cnoticeType1">
{{$lang.lang.create.special}}
<image src="../../static/img/helps.png" mode=""></image>
<view v-show="cnoticeType1" class="cnotice" style="width: 260px;">
<text>{{$lang.lang.create.cnotice1}}</text>
</view>
</view>
<view style="flex:1">
<checkbox-group @change="getPackageType" class="checklist" v-model="params.packageType">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item,index) in packageType" :key="index">
<view class="checkbox-item">
<checkbox :value="item.value+''" :checked="item.checked" style="transform:scale(0.8)"/>
</view>
<view>{{$lang.locale=='zh'?item.label:item.labelEn}}</view>
</label>
</checkbox-group>
</view>
</view>
<!--特殊要求备注-->
<view class="corder-v5-v remark">
<view class="corder-v5-label">{{$lang.lang.create.specialNote}}</view>
<input type="text" :placeholder="$lang.lang.notices.specialNote" v-model="params.packageRemarks">
</view>
<!--快递单号-->
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.quickNo}}</view>
<textarea @blur="bindTextAreaBlur" v-model="params.number" :placeholder="$lang.lang.notices.numbers" />
<view class="autoBtn" @click="autoCreatOrderSn">{{$lang.lang.create.auto}}</view>
</view>
</view>
<!--下面海运不显示-->
<view class="corder-v5" v-if="['2','3','4'].indexOf(params.transportId+'') > -1">
<!--清关证书-->
<view class="corder-v5-v" v-if="['2','3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.clearCard}}</view>
<view class="corder-radio-2" >
<radio-group @change="customsClearCert" >
<label class="radio">
<radio value="true" :checked="params.customsClearCert" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<radio value="false" :checked="!params.customsClearCert" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
</view>
</view>
<!--清关证书备注-->
<view class="corder-v5-v remark" v-if="['2','3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.clearRemark}}</view>
<input type="text" v-model="params.remarks" :placeholder="$lang.lang.notices.clearRemark">
</view>
<!--是否拆包-->
<view class="corder-v5-v" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.unpack}}</view>
<view class="corder-radio-2">
<radio-group @change="isUnpack">
<label class="radio">
<radio value="true" :checked="params.isUnpack" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<radio value="false" :checked="!params.isUnpack" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
</view>
</view>
<!--单票立刻转运-->
<view class="corder-v5-v" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.nowChange}}</view>
<view class="corder-radio-2">
<radio-group @change="isSingleTicketTransport" >
<label class="radio">
<radio value="true" :checked="params.isSingleTicketTransport" /><text>{{$lang.lang.create.is}}</text>
</label>
<label class="radio">
<radio value="false" :checked="!params.isSingleTicketTransport" /><text>{{$lang.lang.create.fou}}</text>
</label>
</radio-group>
</view>
</view>
<view class="corder-v5-v" v-if="['3','4'].indexOf(params.transportId+'') > -1">
<image src="../../static/img/tips.png" mode="widthFix"></image>
<text style="margin-left:10px">{{$lang.lang.create.nowNotice}}</text>
</view>
<!--下面内容在新的原型上未有提现,留此备用-->
<view v-if="0">
<view class="corder-v5-v" >
<view class="corder-v5-label">{{$lang.lang.create.doubleClear}}</view>
<view class="corder-radio-2">
<radio-group @change="doubleClear">
<label class="radio">
<radio value="1" :checked="params.doubleClear==1" /><text>{{$lang.lang.create.conClear}}</text>
</label>
<label class="radio">
<radio value="2" :checked="params.doubleClear==2" /><text>{{$lang.lang.create.myClear}}</text>
</label>
</radio-group>
</view>
</view>
<view class="corder-v5-v">
<view class="corder-v5-label">{{$lang.lang.create.lined}}</view>
<view class="">{{config.openedRouter.index==0?$lang.lang.create.no:config.openedRouter.label[config.openedRouter.index]}}</view>
</view>
<view class="corder-v5-v" v-if="!channeled">
<view class="corder-v5-label">{{$lang.lang.create.channel}}</view>
<view class="">{{config.channel.index==0?$lang.lang.create.no:config.channel.label[config.channel.index]}}</view>
</view>
<view class="corder-v5-v corder-picker" v-if="['2'].indexOf(params.transportId+'') > -1">
<view class="corder-v5-label">{{$lang.lang.create.ship}}</view>
<picker class="date-picker" :value="config.clientaData.index" :range="config.clientaData.label" data-config="clientaData" data-key="shippingCompany" @change="configChange" v-if="config.clientaData.value.length > 0">
<view class="uni-input">{{config.clientaData.label[config.clientaData.index]}}</view>
</picker>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>
<view class="footer">
<view class="sumbit" @click="addOrder">{{$lang.lang.create.submit}}</view>
<view v-if="isOverSearWarehouse" class="sumbit disabled">{{$lang.lang.create.submit}}</view>
<view v-else class="sumbit" @click="addOrder">{{$lang.lang.create.submit}}</view>
<view class="cancel" @click="toback">{{$lang.lang.create.cancel}}</view>
</view>
<view v-if="isOverSearWarehouse" class="over-sea-tips">
{{$lang.lang.create.overSeaWarehouseTips}}
</view>
<!-- <button >打开弹窗</button> -->
<uni-popup ref="popup" type="center" :mask-click="false">
<view class="goods">
......@@ -936,7 +1018,7 @@
objectiveId: 0, //目的地ID
lineId: 0, //线路ID
channelId:0,//渠道ID
orderItemVOList:[],
orderItemVOList:[{showFull: false, prodAttrIds: ''}],
costVO:{},
deliveryDate:currentDate+' 00:00:00',
drawee:2,
......@@ -997,7 +1079,11 @@
cnoticeType2:false,
cnoticeType3:false,
cnoticeType4:false,
cnoticeType5:false
cnoticeType5:false,
// 是否有收货人
hasConsignee: true,
// 是否显示完整的收货人信息
showFullConsignee: false
}
},
onLoad (op) {
......@@ -1045,6 +1131,12 @@
},
endDate() {
return this.getDate('end');
},
noConsignee(){
return !!this.$store.state.userInfo?.noConsignee
},
isOverSearWarehouse(){
return this.params.type?.indexOf('2') != -1
}
},
watch:{
......@@ -1054,8 +1146,17 @@
'params.consigneePhone'(){
if(this.params.lineId) this.getOffData()
},
hasConsignee(val){
if(!val){
// 没有收货人必须控货
this.params.isCargoControl = true
}
}
},
methods: {
changeHasConsignee(e){
this.hasConsignee = e.detail.value === "1"
},
toback(){
uni.navigateBack()
},
......@@ -1112,6 +1213,14 @@
}
console.log(this.params.type)
// 如果勾选了海外仓给提示
if(this.params.type.indexOf('2') > -1){
return uni.showModal({
title: this.$lang.lang.tips,
content: this.$lang.lang.create.overSeaWarehouseTips,
showCancel: false
})
}
},
getType(){
var items = this.items,
......@@ -1347,7 +1456,7 @@
},
getProductAttrLabel(data){
var label = ''
var productArr = data.split(',')
var productArr = data?.split(',') || []
this.productAttrList.forEach((item)=>{
if(productArr.find(items => {return items == item.id})){
......@@ -1427,16 +1536,26 @@
this.params.packageType = e.detail.value.join(',')
},
addOrder(){
if(!this.params.consigneeName){
// 如果勾选了海外仓给提示
if(this.params.type.indexOf('2') > -1){
return uni.showModal({
title: this.$lang.lang.tips,
content: this.$lang.lang.create.overSeaWarehouseTips,
showCancel: false
})
}
/*有收货人 但是 没有填写收货人名称*/
if(this.hasConsignee && !this.params.consigneeName){
return uni.showToast({
title: this.$lang.lang.notices.consignee,
icon: 'error',
})
}
if(!this.params.countryCode){
if(this.hasConsignee && !this.params.countryCode){
this.params.countryCode = this.config.countrySn.value[0]
}
if(!this.params.consigneePhone){
// 有收货人但是无收货人电话
if(this.hasConsignee && !this.params.consigneePhone){
return uni.showToast({
title: this.$lang.lang.notices.consigneePhone,
icon: 'error',
......@@ -1516,12 +1635,12 @@
title: this.$lang.lang.notices.marksIn,
icon: 'error',
})
}else if(parseFloat(this.params.marks.slice(0,1)).toString() != "NaN"){
}/*else if(parseFloat(this.params.marks.slice(0,1)).toString() != "NaN"){
return uni.showToast({
title: this.$lang.lang.notices.marksNum,
icon: 'error',
})
}
}*/
if(this.params.customsType==''||this.params.customsType==null){
return uni.showToast({
title: this.$lang.lang.notices.customsType,
......@@ -1566,8 +1685,15 @@
return
}
this.isClick = true
this.ismobiles(this.params.countryCode,this.params.consigneePhone)
if(this.hasConsignee){
return this.ismobiles(this.params.countryCode,this.params.consigneePhone)
}
if(this.params.drawee==1){
this.$refs.payNotice.open()
}else{
this.createOrder()
}
this.isClick = false
},
creatOrder(){
this.$request.post('/app-api/my/order/create',this.params).then(res => {
......@@ -1660,6 +1786,15 @@
that.time = dateArr[1]
}
that.getOffData()
// 没有收货人信息
if(!that.params.consigneeVO){
that.hasConsignee = false
}
// 如果用户当前不支持无收货人,则强制显示收货人信息
if(!that.noConsignee){
that.hasConsignee = true
}
}
})
},
......@@ -1842,7 +1977,10 @@
this.params.orderItemVOList[editIndex] = this.goodsModel
}else{
editIndex = this.params.orderItemVOList.length
this.params.orderItemVOList.push(this.goodsModel)
this.params.orderItemVOList.push({
...this.goodsModel,
showFull: false
})
}
this.calculationPrice(editIndex)
this.$refs.popup.close()
......@@ -2286,7 +2424,7 @@
that.params.consigneeEmail = that.consignee[that.conIndex].email
}
}
if(sid==0){
if(sid==0 && that.params.consigneeVO){
that.params.consigneeCompany = that.params.consigneeVO.company
that.params.consigneeName = that.params.consigneeVO.name
that.params.consigneeCompanyEn = that.params.consigneeVO.companyEn
......@@ -2366,6 +2504,10 @@
},
//是否控货
isCargoControl(e){
// 没有收货人必须控货
if(!this.hasConsignee){
return
}
this.params.isCargoControl = e.detail.value=='true'?true:false
var server = this.config['openedRouter'].otherService[this.config['openedRouter'].index]
if(this.params.isCargoControl){
......@@ -2769,4 +2911,29 @@
<style>
@import url("../../static/css/create_order.css");
.corder-tab-top .title{
border:none; width: auto; margin-right: 20rpx;
padding-bottom: 0;
display: flex !important;
}
</style>
<style scoped>
.disabled{
background: #ccc;
}
.corder-goods-v-item .action .icon{
width: 20px;
height: 20px;
}
.corder-goods-v-item .action .btn{
background: #2A6cd9;
padding: 3px 10rpx;
color:#fff;
border-radius: 5px;
margin-left: 5px;
}
.over-sea-tips{
color: red;
padding: 0 20rpx;
}
</style>
......@@ -104,7 +104,7 @@ radio{
margin: 0 20upx 16upx 0;
}
.corder-tab-top view{
display: block;
/*display: block;*/
width: 90%;
border-bottom: 1px solid var(--cdf);
padding-bottom: 16upx;
......
......@@ -82,3 +82,34 @@ view{
width: 100%;
height: var(--status-bar-height);
} */
.flex{
display: flex;
}
.items-center{
align-items: center;
}
.items-start{
align-items: start;
}
.items-end{
align-items: end;
}
.justify-center{
justify-content: center;
}
.justify-start{
justify-content: start;
}
.justify-end{
justify-content: end;
}
.justify-between{
justify-content: space-between;
}
.justify-around{
justify-content: space-around;
}
.flex-1{
flex: 1;
}
export default{
tips: 'Tips',
notices:{
name:'your name',
nameEn:'your English name',
......@@ -8,7 +9,6 @@ export default{
Id1:'Please upload frontal photo of ID',
Id2:'Please upload back side photo of ID',
success:'Submitted successfully',
loading:'Uploading..',
newPhone: 'new phone',
edited:'Edited Success',
company:'company name',
......@@ -347,6 +347,7 @@ export default{
cnotice3:'The export procedures for the goods will be handled by our company on behalf of us',
cnotice4:'The goods are provided by the shipper with relevant export documents and entrusted to our company for processing',
cnotice5:'The goods have two situations mentioned above',
overSeaWarehouseTips:'If you need overseas warehouse services, please contact customer service, service hotline: 400-900-9962',
},
docException: {
doc:'Document abnormal',
......
export default{
tips: "温馨提示",
notices:{
name:'请输入姓名',
nameEn:'请输入英文名',
......@@ -8,7 +9,6 @@ export default{
Id1:'请上传证件正面照',
Id2:'请上传证件反面照',
success:'提交成功',
loading:'上传中..',
newPhone: '请输入您的新手机号',
edited:'修改成功',
company:'请输入公司名称',
......@@ -129,7 +129,7 @@ export default{
deleteFile:'是否删除附件?',
customsRefund:'报关退税,请备齐资料。',
nofile:'上传文件格式不对',
loading:'加载中......'
loading:'加载中...'
},
auth:{
auth:'实名认证',
......@@ -236,9 +236,9 @@ export default{
},
create:{
create:'我要发货',
transport:'订单运输',
type:'订单类型',
service: '集运服务',
transport:'运输',
type:'服务',
service: '集运',
oversears:'海外仓',
toRoom:'送货上门',
exception:' 提货异常',
......@@ -247,8 +247,8 @@ export default{
endCity:'目的城市',
method:'运输方式',
channel: '出货渠道',
info:'商品信息',
addShop:'添加商品',
info:'商品',
addShop:'添加',
prodZh:'中文品名',
brand:'品牌',
num:'数量',
......@@ -301,7 +301,7 @@ export default{
nowNotice:'注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”',
specialNote:'特需备注',
special:'特殊要求',
orderInfo:'订单信息',
orderInfo:'通用',
marks:'唛头',
isCargoControl:'是否控货',
customsType:'单证报关',
......@@ -318,7 +318,7 @@ export default{
addressInfo:'收货详细地址',
name:'姓名',
nameEn:'英文名',
choiceConsignee:'选择收货人',
choiceConsignee:'收货人',
phone:'电话',
email:'邮箱',
company:'公司名称',
......@@ -347,6 +347,8 @@ export default{
cnotice3:'该货物的出口手续由我司代为办理',
cnotice4:'该货物由发货人提供相关出口单证并委托我司代为办理',
cnotice5:'该货物有以上两种情况出现',
overSeaWarehouseTips: '如需海外仓服务,请联系客服,服务热线:400-900-9962',
other: '其他'
},
docException: {
doc:'单证异常',
......
......@@ -41,7 +41,7 @@ const store = new Vuex.Store({
updateUserInfo({
commit
}) {
http.get("/profile").then(res => {
http.get("/app-api/member/user/get").then(res => {
console.log('更新用户信息', res)
commit('setUser', res.data)
}).catch(res => {
......
const domain = 'https://api2.groupage.cn'
const domain = 'https://apitest.groupage.cn'
// const domain = 'https://api.jd.jdshangmen.com'
// const domain = 'https://api.sit.jdshangmen.com'
// const domain = 'https://api2.groupage.cn'
......
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