Commit 25d4f04e authored by dragondean@qq.com's avatar dragondean@qq.com

空运变更渠道

parent 65f3058a
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline>
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline :disabled="updateChannel">
<el-card v-if="form.applyStatus == 1" class="mb-10">
<div slot="header" class="card-title">{{$t('以下信息修改审核中')}}</div>
<el-table :data="form.applyInfoList">
......@@ -26,8 +26,8 @@
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consignorName" placeholder="" :disabled2="inWarehouse"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='0'" />
<img v-if="!updateChannel" src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img v-if="!updateChannel" src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='0'" />
</div>
</el-form-item>
<!-- v1.7新增 -->
......@@ -57,8 +57,8 @@
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consigneeName" placeholder="" :disabled2="inWarehouse"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
<img v-if="!updateChannel" src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img v-if="!updateChannel" src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
</div>
</el-form-item>
<!-- v1.7新增 -->
......@@ -89,18 +89,20 @@
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'">
<!--嵌套一个form来脱离disabled控制-->
<el-form>
<selector
:disabled2="inWarehouse || getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId"
:options="channelList"
value-field="channelId"
:label-field="$l(null, 'name')"
></selector>
</el-form>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('始发城市')" prop="departureId">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')" :disabled2="inWarehouse">
<el-form-item :label="$t('始发城市')" prop="departureId" :disabled="false">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')" :disabled="false">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -114,7 +116,8 @@
<el-form-item :label="$t('选择线路')" prop="lineId">
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item>
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px" :disabled2="inWarehouse">
<!--select是原生组件,不受el-form的disabled控制-->
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">
<option v-for="item in routerList" :value="item.id" :key="item.id">
{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}
(<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportType"></dict-tag>)
......@@ -144,8 +147,8 @@
<el-card class="mt-10">
<div slot="header" class="card-title">
<div class="card-name">{{$t('商品信息')}}</div>
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct || !productEditable">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct || !productEditable">{{$t('批量添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('批量添加货物')}}</el-button>
</div>
<el-table :data="form.orderItemVOList" border class="product-list" v-if="!initing">
<el-table-column :label="$t('序号')" width="60px" fixed>
......@@ -297,7 +300,7 @@
</el-table-column>
<el-table-column :label="$t('操作')" width="80px" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)" :disabled="!productEditable">{{$t('删除')}}</el-button>
<el-button size="mini" type="danger" @click="delProduct(scope.$index)" :disabled="!productEditable || updateChannel">{{$t('删除')}}</el-button>
</template>
</el-table-column>
......@@ -494,7 +497,7 @@
<work-flow xmlkey="order_modify" v-model="ccIdArr" />
</el-card>
<el-form-item label="" style="margin: 30px 0">
<el-form label="" style="margin: 30px 0">
<template v-if="form.applyStatus == 1">
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">{{$t('审核中')}}</el-button>
</template>
......@@ -504,7 +507,7 @@
<el-button type="primary" @click="submitForm(2)" v-else>{{$t('编辑订单')}}</el-button> <!--修改-->
</template>
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</el-form-item>
</el-form>
</el-form>
<el-dialog :title="$t('批量导入')" :visible.sync="showBatchImportDialog" width="1000px" :close-on-click-modal="false">
......@@ -637,7 +640,8 @@ export default {
quickCreateType: null, // 快速新建客户类型,1发货人,2收货人
showWorkFlow: false, // 是否显示工作流表单
calculating: false, // 是否正在计算费用,防止频繁重新请求
initing: true, // 初始化中
initing: true, // 初始化中,
updateChannel: false // 是否更新渠道
};
},
computed:{
......@@ -921,6 +925,12 @@ export default {
if(!enable && this.form.harvestMethod != 1){
this.form.harvestMethod = 1
}
},
// 变更渠道需要显示工作流组件
updateChannel(updateChannel){
if(updateChannel){
this.$set(this, 'showWorkFlow', true)
}
}
},
activated(){
......@@ -930,6 +940,9 @@ export default {
if(this.$route.query.transportType != this.transportId){
this.set(this.form.transportId, +this.$route.query.transportType)
}
// 变更出货渠道
this.updateChannel = this.$route.query.updateChannel == 1
},
async created() {
......@@ -949,6 +962,10 @@ export default {
if(this.$route.query.transportType){
this.$set(this.form, 'transportId', +this.$route.query.transportType)
}
// 变更出货渠道
if(this.$route.query.updateChannel){
this.updateChannel = true
}
if(this.$route.query.id){
this.getOrder()
}else{
......
......@@ -335,6 +335,13 @@
<el-dropdown-item @click.native="showMergedLogOrderNo=scope.row.orderNo" v-hasPermi="['ecw:order:merge_log']">{{$t('合单日志')}}</el-dropdown-item>
<el-dropdown-item @click.native="showPickupLogOrderNo=scope.row.orderNo" v-hasPermi="['ecw:order:split_log']">{{$t('提货日志')}}</el-dropdown-item>
</template>
<!--变更出货渠道-->
<template v-if="(
scope.row.transportId == 3
)">
<el-dropdown-item @click.native="handleUpdate(scope.row, true)" v-hasPermi="['ecw:order:update_channel']">{{$t('变更出货渠道')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
......@@ -828,9 +835,13 @@ export default {
handleAdd() {
this.$router.push('create?transportType=' + this.transportId)
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('edit?id=' + row.orderId)
/** 修改按钮操作, updateChannel表示变更出货渠道 */
handleUpdate(row, updateChannel = false) {
let url = 'edit?id=' + row.orderId
if(updateChannel){
url += "&updateChannel=1"
}
this.$router.push(url)
},
/** 导出按钮操作 */
......
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