Commit 365fc985 authored by dragondean@qq.com's avatar dragondean@qq.com

Merge branch 'release' into dev

# Conflicts:
#	src/views/ecw/order/batchSingleApplication.vue
#	src/views/ecw/order/detail.vue
parents 51b9884e 2b02e2ea
......@@ -54,6 +54,9 @@
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('图片')" prop="picture">
<upload v-model="form.picture" :limit="1"></upload>
</el-form-item>
<el-form-item :label="$t('询盘信息')" >
<el-input
v-model="form.inquiry"
......@@ -78,7 +81,7 @@ import {listServiceUser} from "@/api/system/user";
import {getProductTypeList} from "@/api/ecw/productType";
import {getProductList} from "@/api/ecw/product";
import {createPotential} from "@/api/ecw/customer";
import upload from '@/components/ImageUpload'
export default {
name: "addPotentialCustom",
methods: {
......@@ -100,6 +103,7 @@ export default {
inquiry:undefined,
productType:undefined,
productId:undefined,
picture:undefined
}
},
submit(){
......@@ -122,7 +126,7 @@ export default {
},
},
components: {AreaCodeSelector},
components: {AreaCodeSelector,upload},
created() {
this.reset()
listServiceUser().then(r => {
......
......@@ -92,11 +92,11 @@
<el-button v-hasPermi="['ecw:customer:fcl']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading">{{$t('设置海运整柜客户')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['ecw:customer:create-potential']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
<el-button v-hasPermi="['ecw:customer:fcl-mistake']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
>{{$t('设置海运非整柜客户')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-has-permi="['ecw:customer:fcl-mistake']" v-if="path === '/customer/customer'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
<el-button v-has-permi="['ecw:customer:create-potential']" v-if="path === '/customer/customer'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......
......@@ -47,9 +47,9 @@
<el-descriptions-item :label="$t('主营类别')">{{ $l(customer,'productTypeName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('常提货网点')">{{ $l(customer,'pickupPointName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('图片')">
<el-image v-if="customer.picture" :src="customer.picture" style="width: 100px;height: 100px">
<span slot="error">加载失败</span>
</el-image>
<image-display :picture-urls="customer.picture ? customer.picture.split(',') : []" >
<el-button type="text" > 查看图片</el-button>
</image-display>
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
......@@ -513,10 +513,12 @@ import {getCountry} from "@/api/ecw/country"
import {getCurrencyList} from "@/api/ecw/currency";
import customerLog from "@/views/ecw/customer/customerLog.vue";
import {checkPermi} from "@/utils/permission";
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
export default {
name: 'query',
components: {
ImageDisplay,
Template,
CustomerFollow,
CustomerComplaint,
......
......@@ -6,7 +6,7 @@
<el-dialog
append-to-body
title="提示"
:title="$t('图片')"
:visible.sync="visible"
width="80%">
<div style="display: flex;flex-wrap: wrap;">
......@@ -14,6 +14,7 @@
<video controls width="148px" height="148px" slot="error" :src="bizId ? item.url : item" ></video>
</el-image>
</div>
<el-empty v-if="!list.length" description="暂无图片"></el-empty>
</el-dialog>
</div>
</template>
......
......@@ -150,9 +150,9 @@
<el-descriptions-item :label="$t('创建时间')">
{{order.createTime|parseTime}}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">
{{order.salesmanName}}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">
{{order.salesmanName}}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -627,7 +627,6 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
},
methods: {
checkPermi, // 检查权限
......
......@@ -12,35 +12,35 @@
</div></el-form-item>
<el-form-item :label="$t('发货人')+':'"><div class="content">{{orderDetails.consignorVO ? orderDetails.consignorVO.name :''}}</div></el-form-item>
<el-form-item :label="$t('唛头')"><div class="content">{{orderDetails.marks}}</div></el-form-item>
<el-form-item> <el-button :disabled="!!processInstanceId" @click="addCost">{{$t('添加申请')}}</el-button></el-form-item>
<el-form-item> <el-button :disabled="!!processInstanceId || editMode" @click="addCost">{{$t('添加申请')}}</el-button></el-form-item>
</el-form>
<el-table :data="list">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('费用类型')">
<template v-slot:default = "scope">
<dict-selector :disabled="!!scope.row.status" :type="DICT_TYPE.FEE_TYPE" v-model="scope.row.feeType" />
<dict-selector :disabled="!scope.row.editMode && !!scope.row.status" :type="DICT_TYPE.FEE_TYPE" v-model="scope.row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('金额')">
<template v-slot:default = 'scope'>
<el-input :disabled="!!scope.row.status" v-model.number="scope.row.applicationFee" ></el-input>
<el-input :disabled="!scope.row.editMode && !!scope.row.status" v-model.number="scope.row.applicationFee" ></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('货币类型')">
<template v-slot:default = 'scope'>
<el-select :disabled="!!scope.row.status" v-model="scope.row.applicationFeeCurrency">
<el-select :disabled="!scope.row.editMode && !!scope.row.status" v-model="scope.row.applicationFeeCurrency">
<el-option v-for="item in JSON.parse(currencys)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</template>
</el-table-column>
<el-table-column :label="$t('付款类型')">
<template v-slot = {row}>
<dict-selector :disabled="row.status" :type="DICT_TYPE.PAYMENT_TYPE" v-model="row.payType" />
<dict-selector :disabled="!row.editMode && !!row.status" :type="DICT_TYPE.PAYMENT_TYPE" v-model="row.payType" />
</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template v-slot:default="scope">
<el-input :disabled="!!scope.row.status" v-model="scope.row.remarks" type="textarea"></el-input>
<el-input :disabled="!scope.row.editMode && !!scope.row.status" v-model="scope.row.remarks" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('确认收款')">
......@@ -55,9 +55,9 @@
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot:default = 'scope'>
<el-button type="text" v-if="scope.row.status !== 0&&scope.row.status !== 1">{{STATUS[scope.row.status]}}</el-button>
<!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button>
<el-button type="text" v-if="scope.row.status === 2" @click="modify(scope.row)">{{$t('修改')}}</el-button>-->
<el-tag v-if="scope.row.status !== 0 && !scope.row.editMode">{{STATUS[scope.row.status]}}</el-tag>
<!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button-->
<el-button type="text" v-if="modifable(scope.$index)" @click="modify(scope.row)">{{$t('修改')}}</el-button>
<el-button type="text" v-if="scope.row.status === 0" @click="del(scope.$index)">删除</el-button>
</template>
</el-table-column>
......@@ -66,7 +66,7 @@
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
</div>
<div style="text-align: center;margin-top: 20px;">
<el-button type="primary" v-if="!processInstanceId" style="margin-right: 30px;" :disabled="!feeList.length" @click="submit">{{$t('提交')}}</el-button>
<el-button type="primary" v-if="!processInstanceId" style="margin-right: 30px;" :disabled="!feeList.length && !editMode" @click="submit">{{$t('提交')}}</el-button>
<el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="goProcessDetail">{{$t('审核中')}}</el-button>
<el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="cancel">{{$t('取消审核')}}</el-button>
<el-button @click="$emit('update:dialogVisible',false)">{{$t('返回')}}</el-button>
......@@ -112,14 +112,31 @@ export default {
DICT_TYPE,
getDictDatas,
STATUS:{},
isModify:[],
isModifyIf:false,
selectedUsers:[]
}
},
computed:{
feeList(){
return this.list.filter(item => item.status === 0)
},
// 正在编辑的费用申请
currentItem(){
return this.list.find(item => item.editMode)
},
// 是否修改模式
editMode(){
return !!this.currentItem
},
modifable(){
return (index) => {
// 审核中不允许修改
if(this.processInstanceId) return false
// 有未提交的不允许修改
if(this.feeList.length) return false
// 有修改中的不允许修改
if(this.list.findIndex(item => item.editMode) > -1) return false
return true
}
}
},
created() {
......@@ -152,6 +169,10 @@ export default {
this.list.splice(index, 1)
})
},
// 修改
modify(item){
this.$set(item, 'editMode', true)
},
addCost(){
this.list.push({
orderId:this.orderId,
......@@ -172,17 +193,26 @@ export default {
if(errList.length){
return this.$message.error('请填写完整费用申请信息')
}
feeApplicationCreateBatch( {
orderFeeApplicationCreateReqVOList: this.feeList,
copyUserId:this.selectedUsers,
orderId: this.orderId
}).then(r=>{
if(r.code === 0){
this.$emit('update:dialogVisible',false)
this.$message.success(this.$t('添加成功'));
this.selectedUsers = [];
if(this.editMode){
// 要提交status=1,否则保持原状态
const data = {...this.currentItem,status:1, copyUserId:this.selectedUsers}
return applicationUpdate(data).then(r => {
this.$message.success(this.$t('修改成功'));
this.$emit('update:dialogVisible',false)
})
}
})
feeApplicationCreateBatch( {
orderFeeApplicationCreateReqVOList: this.feeList,
copyUserId:this.selectedUsers,
orderId: this.orderId
}).then(r=>{
if(r.code === 0){
this.$emit('update:dialogVisible',false)
this.$message.success(this.$t('添加成功'));
this.selectedUsers = [];
}
})
},
goProcessDetail(){
this.$emit('update:dialogVisible',false)
......@@ -208,7 +238,6 @@ export default {
watch:{
dialogVisible(val){
if(val){
this.isModify = []
this.getOrderList()
getOrder(this.orderId).then(r =>{
if(r.code === 0){
......
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