Commit f1a1da62 authored by Smile's avatar Smile

需求135 后台-集运-包裹列表-操作-退仓

parent cad1a8e7
......@@ -8,6 +8,21 @@ export function createCons(data) {
data: data
})
}
// 创建集运包裹主
export function createConsRetiredWarehouseApplication(data) {
return request({
url: '/ecw/cons/createConsRetiredWarehouseApplication',
method: 'post',
data: data
})
}
export function editAndUpdateConsRetiredWarehouseDeal(data) {
return request({
url: '/ecw/cons/editAndUpdateConsRetiredWarehouseDeal',
method: 'post',
data: data
})
}
// 更新集运包裹主
export function updateCons(data) {
......@@ -50,6 +65,13 @@ export function getCons(id) {
})
}
export function cancelApplyAndUpdate(id) {
return request({
url: '/ecw/cons-approval/cancelApplyAndUpdate?id=' + id,
method: 'get'
})
}
// 获得集运包裹转运临时order
export function getTempOrderByConsIds(params){
return request({
......
......@@ -129,6 +129,7 @@ import MergeDetail from "@/views/ecw/order/components/MergeDetail"
import CargoControlDetail from "@/views/ecw/order/components/CargoControlDetail"
import BoxSplitDetail from "@/views/ecw/order/components/BoxSplitDetail"
import UpdateFeeApproval from "@/views/ecw/cons/components/UpdateFeeApproval"
import retiredWarehouseApproval from "@/views/ecw/cons/retiredWarehouseApproval"
// 流程实例的详情页,可用于审批
export default {
......@@ -142,6 +143,7 @@ export default {
MergeDetail,
CargoControlDetail,
UpdateFeeApproval,
retiredWarehouseApproval,
BoxSplitDetail
},
computed: {
......@@ -495,6 +497,10 @@ export default {
component: "updateFeeApproval",
id: this.processInstance.id
},
ecw_cons_retired_warehouse: {
component: "retiredWarehouseApproval",
id: this.processInstance.id
},
}
console.log("formCustomViewPath", this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
......@@ -7,12 +7,22 @@
}"
width="80%">
<div style="padding: 0 20px">
<h1>{{$t('申请退仓')}}-{{consDetails.expressNo}}</h1>
<h1>{{consDetails.expressNo}}-{{consDetails.customerNumber}}-{{$t('申请退仓')}}</h1>
<h3>{{$t('包裹ID')}}-{{consDetails.consNum}}</h3>
<el-divider></el-divider>
<el-form label-width="150px">
<el-form-item :label="$t('退仓原因')">
<el-input v-model="params.reason" style="width:500px" type="textarea"></el-input>
</el-form-item>
<el-form-item :label="$t('退仓收件人')">
<el-input v-model="params.name" style="width:500px"></el-input>
</el-form-item>
<el-form-item :label="$t('退仓收件电话')">
<el-input v-model="params.phone" style="width:500px"></el-input>
</el-form-item>
<el-form-item :label="$t('退仓收件地址')">
<el-input v-model="params.address" style="width:500px" type="textarea"></el-input>
</el-form-item>
<el-form-item :label="$t('图片')">
<image-and-video-upload :file-type="['png' , 'jpg', 'jpeg']" :fileSize="50" :isShowTip="true" v-model="params.imgUrl" ></image-and-video-upload>
</el-form-item>
......@@ -20,12 +30,12 @@
<el-divider></el-divider>
<h2>{{$t('审批流程')}}</h2>
<div style="padding: 20px">
<work-flow xmlkey="retired_warehouse" v-model="params.copyUserId" />
<work-flow xmlkey="ecw_cons_retired_warehouse" v-model="params.copyUserId" />
</div>
<div>
<el-button v-if="isExamine" @click="submit" type="primary" style="margin-right: 20px;">{{$t('确定退仓')}}</el-button>
<el-button v-if="!isExamine" @click="goBpm" type="primary" style="margin-right: 20px;">{{$t('审核中')}}</el-button>
<el-button v-if="!isExamine" type="primary" style="margin-right: 20px;" @click="cancellationOfOrder">{{$t('取消审核')}}</el-button>
<el-button v-if="!isExamine" type="primary" style="margin-right: 20px;" @click="cancellationOfCons">{{$t('取消审核')}}</el-button>
<el-button @click="$parent.show = false;">{{$t('不,再考虑考虑')}}</el-button>
</div>
</div>
......@@ -33,16 +43,10 @@
</template>
<!--退仓-->
<script>
import {cancelAdjust, getOrder} from "@/api/ecw/order";
import {
getRollbackApprovalInfo,
orderWarehouseInDelete,
warehouseApprovalCancel
} from "@/api/ecw/batchSingleApplication";
import workFlow from "@/components/WorkFlow";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
import {getCons} from "@/api/ecw/cons";
import {getConsApproval} from "@/api/ecw/consApproval";
import {cancelApplyAndUpdate, createConsRetiredWarehouseApplication, getCons} from "@/api/ecw/cons";
import {getConsApprovalList} from "@/api/ecw/consApproval";
export default {
name: "withdrawal",
......@@ -57,9 +61,13 @@ export default {
data(){
return {
consDetails:{},
approvalDetail:{},
params:{
consId:undefined,
expressNo:undefined,
name:'',
phone:'',
address:'',
reason:'',
copyUserId:[],
imgUrl:[]
......@@ -71,13 +79,19 @@ export default {
}
},
created() {
getCons(this.consId).then(r => this.consDetails = r.data);
getConsApproval({id:this.consId}).then(r => {
console.log(r)
if(r.data.status === 1){
this.details = r.data;
getCons(this.consId).then(r =>{
this.consDetails = r.data
});
getConsApprovalList({consId:this.consId,approvalType:0,status: 1}).then(r => {
if(r.data.length!=0){
this.details = r.data[0];
this.isExamine = false;
this.params.reason = JSON.parse(this.details.details).reason
this.approvalDetail = JSON.parse(r.data[0].approvalDetail)
this.params.reason = this.approvalDetail.reason
this.params.imgUrl = this.approvalDetail.imgUrl
this.params.name = this.approvalDetail.name
this.params.phone = this.approvalDetail.phone
this.params.address = this.approvalDetail.address
}
})
......@@ -88,10 +102,10 @@ export default {
this.$router.push({query:{id:this.details.formId},path:'/bpm/process-instance/detail'})
},
submit(){
this.params.consId = this.consDetails.consId;
this.params.expressNo =this.consDetails.expressNo;
this.params.consId = this.consDetails.id;
this.params.imgUrl = this.params.imgUrl.join(',')
orderWarehouseInDelete(this.params).then(r => {
this.params.consNum = this.consDetails.consNum
createConsRetiredWarehouseApplication(this.params).then(r => {
if(r.code === 0){
this.$message.success(this.$t('退仓成功'));
this.params = {}
......@@ -99,25 +113,27 @@ export default {
}
})
},
cancellationOfOrder(){
this.$prompt(this.$t('请输入取消审核原因'), this.$t('提示'), {
cancellationOfCons(){
//仅确认取消
this.$confirm(this.$t('是否确认取消审核?'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
}).then(({ value }) => {
warehouseApprovalCancel(this.details.id,value) .then(r => {
type: 'warning'
}).then(() => {
cancelApplyAndUpdate(this.details.id) .then(r => {
if(r.data){
this.$message.success(this.$t('取消成功'))
this.params = {}
this.$parent.show = false
}
})
}).catch(() => {
this.$message({
type: 'info',
message: this.$t('取消成功')
});
this.$message({
type: 'info',
message: this.$t('取消成功')
})
});
}
}
}
......
<template xmlns="http://www.w3.org/1999/html">
<el-dialog
:visible.sync="dialogVisible"
:before-close="()=>{
$parent.showReturnWarehouse = false;
}"
width="80%">
<div style="padding: 0 20px">
<h1>{{consDetails.expressNo}}-{{$t('集运包裹退仓处理')}}</h1>
<h3>{{$t('包裹ID')}}-{{consDetails.consNum}}</h3>
<h3><span>{{$t('退仓原因')}}-{{params.reason}}</span><span style="margin-left: 20px">{{$t('退仓审核通过时间')}}-{{params.approvalTime|parseTime}}</span></h3>
<el-divider></el-divider>
<el-form label-width="150px">
<el-form-item :label="$t('退仓快递公司')">
<el-select v-model="params.expressId" :placeholder="$t('请选择快递公司')">
<el-option v-for="nodeItem in expressList" :key="nodeItem.id" :label="nodeItem.companyName"
:value="nodeItem.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('退仓快递单号')">
<el-input v-model="params.expressNo" :placeholder="$t('请输入退仓的快递单号')" :disabled="false"/>
</el-form-item>
<el-form-item :label="$t('退仓费用')" >
<el-input v-model="params.expenses" :disabled="isExamine" placeholder="" class="w-100 mr-10"></el-input>
<el-select :disabled="isExamine" defaultable v-model="params.currency" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh :item.titleEn" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('退仓收件人')">
<el-input v-model="params.name" style="width:500px"></el-input>
</el-form-item>
<el-form-item :label="$t('退仓收件电话')">
<el-input v-model="params.phone" style="width:500px"></el-input>
</el-form-item>
<el-form-item :label="$t('退仓收件地址')">
<el-input v-model="params.address" style="width:500px" type="textarea"></el-input>
</el-form-item>
<el-form-item :label="$t('图片')">
<image-and-video-upload :file-type="['png' , 'jpg', 'jpeg']" :fileSize="50" :isShowTip="true" v-model="params.imgUrl" ></image-and-video-upload>
</el-form-item>
</el-form>
<el-divider></el-divider>
<div>
<el-button v-if="!isExamine" @click="submit(1)" type="primary" style="margin-right: 20px;">{{$t('退仓完成')}}</el-button>
<el-button @click="submit(2)" type="primary" style="margin-right: 20px;">{{$t('确认修改')}}</el-button>
<el-button @click="$parent.showReturnWarehouse = false;">{{$t('稍后再看')}}</el-button>
</div>
</div>
</el-dialog>
</template>
<!--退仓-->
<script>
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
import {editAndUpdateConsRetiredWarehouseDeal, getCons} from "@/api/ecw/cons";
import {getConsApprovalList} from "@/api/ecw/consApproval";
import {parseTime} from "@/utils/ruoyi";
import {getExpressPage} from "@/api/ecw/express";
import {getCurrencyPage} from "@/api/ecw/currency";
export default {
filters: { parseTime },
name: "withdrawal",
props:{
consId:Number,
dialogVisible:Boolean
},
components:{
ImageAndVideoUpload,
},
data(){
return {
consDetails:{},
approvalDetail:{},
params:{
consId:undefined,
expressNo:undefined,
name:'',
phone:'',
address:'',
reason:'',
copyUserId:[],
imgUrl:[]
},
isExamine:false,
details:{},
expressList: [],
currencyList:[],
}
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
created() {
this.getExpressList()
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getCons(this.consId).then(r =>{
this.consDetails = r.data
});
getConsApprovalList({consId:this.consId,approvalType:0,status: 2}).then(r => {
if(r.data.length!=0){
this.details = r.data[0];
this.approvalDetail = JSON.parse(r.data[0].approvalDetail)
this.params.reason = this.approvalDetail.reason
this.params.imgUrl = this.approvalDetail.imgUrl
this.params.name = this.approvalDetail.name
this.params.phone = this.approvalDetail.phone
this.params.address = this.approvalDetail.address
this.params.expressId = this.approvalDetail.expressId
this.params.expressNo = this.approvalDetail.expressNo
this.params.expenses = this.approvalDetail.expenses
this.params.currency = this.approvalDetail.currency
if (this.approvalDetail.isDeal){
this.isExamine = this.approvalDetail.isDeal;
}
this.params.approvalTime = r.data[0].approvalTime
this.params.formId = r.data[0].formId
}
})
},
methods:{
getExpressList() {
let params = {
pageNo: 1,
pageSize: 1000
}
getExpressPage(params).then((res) => {
this.expressList = res.data.list
})
},
submit(val){
this.params.consId = this.consDetails.id;
this.params.imgUrl = Array.isArray(this.params.imgUrl)? this.params.imgUrl.join(','): this.params.imgUrl;
this.params.consNum = this.consDetails.consNum
if (val === 1){
this.params.isDeal = true
}else {
this.params.isDeal = false
}
//退仓完成
editAndUpdateConsRetiredWarehouseDeal(this.params).then(r => {
if(r.code === 0){
if (val === 1){
this.$message.success(this.$t('退仓成功'));
}else {
this.$message.success(this.$t('退仓修改成功'));
}
this.params = {}
this.$parent.showReturnWarehouse = false
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -202,8 +202,8 @@
</el-form-item>
</el-card>
</el-form>
<el-button type="primary" @click="submitForm(0)" v-if="editMode">{{ $t('添加包裹') }}</el-button><!--草稿-->
<el-button type="primary" @click="submitForm(1)" v-if="!editMode&&!signedMode">{{ $t('保存') }}</el-button><!--草稿-->
<el-button type="primary" @click="submitForm(0)" v-if="!editMode&&!signedMode">{{ $t('添加包裹') }}</el-button><!--草稿-->
<el-button type="primary" @click="submitForm(1)" v-if="editMode">{{ $t('保存') }}</el-button><!--草稿-->
<el-button type="primary" @click="submitForm(1)" v-if="signedMode">{{ $t('确认签收') }}</el-button><!--草稿-->
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('取消') }}</el-button>
<choose-contact-dialog v-if="!!contactChooseType" :type="2" @choose="onContactChoose"
......
......@@ -243,6 +243,14 @@
"
v-hasPermi="['ecw:order:warehouse_exit']"
>{{ $t("退仓") }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-edit"
@click.native="
showReturnWarehouse = true
consId = scope.row.id
"
v-hasPermi="['ecw:order:warehouse_exit']"
>{{ $t("处理退仓") }}
</el-button>
</template>
</el-table-column>
......@@ -343,6 +351,7 @@
<batch-cons-edit :showConsBatchEdit.sync="showConsBatchEdit" @determine="getList"
:consIds="consIds"></batch-cons-edit>
<consWithdrawal v-if="show" :dialog-visible="show" :consId="consId"></consWithdrawal>
<cons-cons-withdrawal-deal v-if="showReturnWarehouse" :dialog-visible="showReturnWarehouse" :consId="consId" ></cons-cons-withdrawal-deal>
</div>
</template>
......@@ -362,14 +371,15 @@ import {getChannelList} from "@/api/ecw/channel";
import ConsFollowupEdit from "@/views/ecw/consFollowup/components/ConsFollowupEdit.vue"
import BatchSignOff from "@/views/ecw/cons/batchSignOff.vue";
import BatchConsEdit from "@/views/ecw/cons/batchConsEdit.vue";
import consWithdrawal from "@/views/ecw/cons/withdrawal.vue";
import ConsConsWithdrawal from "@/views/ecw/cons/consWithdrawal.vue";
import ConsConsWithdrawalDeal from "@/views/ecw/cons/consWithdrawalDeal.vue";
import {DICT_TYPE} from "@/utils/dict";
import {arrryToKeyedObjectBy} from "@/utils";
export default {
name: "Cons",
components: {
consWithdrawal,
consWithdrawal: ConsConsWithdrawal,
UserSelector,
Transmutation,
Template,
......@@ -378,7 +388,8 @@ export default {
ConsFollowupEdit,
SpecialNeedsCons,
BatchSignOff,
BatchConsEdit
BatchConsEdit,
ConsConsWithdrawalDeal
},
data() {
return {
......@@ -389,6 +400,7 @@ export default {
// 显示搜索条件
showSearch: true,
show: false,
showReturnWarehouse: false,
consId: undefined,
// 总条数
total: 0,
......
<template xmlns="http://www.w3.org/1999/html">
<div>
<div class="title-font">
<label>{{ $t("包裹信息") }}</label>
</div>
<el-descriptions :column="6" :colon="false" :border="true" :contentStyle="{'color': '#000000'}" :labelStyle="{'color': '#000000'}">
<el-descriptions-item :label="$t('包裹编号')+':'">{{ form.consNum }}</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')+':'">
<dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="form.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('包裹状态')+':'">
<dict-tag :type="DICT_TYPE.CONS_STATUS" :value="form.status"/>
</el-descriptions-item>
<el-descriptions-item :label="$t('客户编号')+':'">{{ form.customerNumber }}
</el-descriptions-item>
<el-descriptions-item :label="$t('始发仓')+':'">{{ warehouseList.filter(a => a.id == form.wareId)[0]!=undefined?warehouseList.filter(a => a.id == form.wareId)[0].titleZh:'' }}</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')+':'">{{ warehouseList.filter(a => a.id == form.consigneeWarehouseId)[0]!=undefined?warehouseList.filter(a => a.id == form.consigneeWarehouseId)[0].titleZh:'' }}</el-descriptions-item>
<el-descriptions-item :label="$t('快递单号')+':'">{{ form.expressNo }}</el-descriptions-item>
</el-descriptions>
<div class="title-font">
<label>{{ $t("申请理由") }}</label>
</div>
<div>
<span>{{ $t("退仓原因") }}:{{ approvalDetail.reason }}</span><br/>
<span>{{ $t("退仓收件人") }}:{{ approvalDetail.name }}</span><br/>
<span>{{ $t("退仓收件电话") }}:{{ approvalDetail.phone }}</span><br/>
<span>{{ $t("退仓收件地址") }}:{{ approvalDetail.address }}</span>
<image-and-video-upload :file-type="['png' , 'jpg', 'jpeg']" readonly :fileSize="50" :isShowTip="true" v-model="approvalDetail.imgUrl" ></image-and-video-upload>
</div>
</div>
</template>
<script>
import { getConsApprovalList } from "@/api/ecw/consApproval"
import { getCurrencyList } from "@/api/ecw/currency"
import { getCons } from "@/api/ecw/cons"
import { getWarehouseList } from "@/api/ecw/warehouse"
import Template from "@/views/cms/template/index.vue";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
export default {
name: "retiredWarehouseApproval",
components: {ImageAndVideoUpload, Template},
props: {
id: [String]
},
data() {
return {
approvalDetail: [],
currencyList: [],
form: {
consigneeWarehouseId: null,
wareId: null
},
warehouseList:[],
}
},
created() {
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
getCurrencyList().then((res) => (this.currencyList = res.data))
if (this.id) {
getConsApprovalList({ formId: this.id }).then((res) => {
if (res.data.length != 0) {
this.approvalDetail = JSON.parse(res.data[0].approvalDetail)
getCons(res.data[0].consId).then(res => {
this.form = res.data
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.title {
padding: 10px 0;
span {
font-size: 14px;
font-weight: bold;
}
}
.bold {
font-weight: bold;
}
.title-font {
font-size: 16px;
font-weight: 600;
margin-top: 10px;
margin-bottom: 10px;
}
</style>
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