Commit 7cd0b997 authored by dragondean@qq.com's avatar dragondean@qq.com
parents c1e5b4b2 7b5bdacb
......@@ -377,6 +377,24 @@ export function getOrderSpecialByApproveId(approveId) {
})
}
// 订单号检索功能
export function getOrderNoSearch(params) {
return request({
url: '/ecw/order/orderNoSearch',
method: 'get',
params
})
}
// 提单号检索功能
export function getBillNoSearch(params) {
return request({
url: '/ecw/order/billNoSearch',
method: 'get',
params
})
}
// 根据合并订单编号获得已合单的订单动态
export function getMergeLogByMergedOrderNo(params){
return request({
......
......@@ -34,6 +34,15 @@ export function getZhongPao(id) {
})
}
// 获得客户最优惠的重泡货配置
export function getZhongPaoBest(query) {
return request({
url: '/ecw/zhong-pao/get-customer-best-zhong-pao',
method: 'get',
params: query
})
}
// 获得重泡货配置分页
export function getZhongPaoPage(query) {
return request({
......
......@@ -8,7 +8,7 @@
<div class="right-menu">
<template v-if="device!=='mobile'">
<el-badge :value="matterNum !== 0 ? matterNum : '' " class="right-menu-item badge">
<div @click="$router.push('/bpm/task/todo')" style="font-size: 28px; color: #cccccc;cursor: pointer;" class="el-icon-postcard"></div>
<div @click="$router.push('/task/todo')" style="font-size: 28px; color: #cccccc;cursor: pointer;" class="el-icon-postcard"></div>
</el-badge>
<el-badge :value="notMessage !== 0 ? notMessage : '' " class="right-menu-item badge">
......@@ -136,7 +136,7 @@ export default {
}
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
......@@ -216,7 +216,7 @@ export default {
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
margin-right: 6px;
margin-right: 15px;
&.hover-effect {
cursor: pointer;
transition: background .3s;
......
......@@ -71,8 +71,8 @@
</el-form>
<el-row class="operate-button" v-if="inReview">
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? '部分退场审核中' : '全部退场审核中'}}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消部分退场审核' : '取消全部退场审核'}}</el-button>
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? '全部退场审核中' : '部分退场审核中'}}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消全部退场审核' : '取消部分退场审核'}}</el-button>
</el-row>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
......
......@@ -2,7 +2,7 @@
<div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="10">
<el-col :span="12">
......@@ -207,6 +207,7 @@
<span>联系人</span>
<el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button>
</div>
<el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table
:data="form.customerContacts"
style="width: 100%"
......@@ -216,8 +217,10 @@
label="部门"
width=""
>
<template v-slot="{ row, column, $index }">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/>
<template v-slot="{ row }">
<el-form-item label="">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -226,43 +229,51 @@
width=""
>
<template v-slot="{row}">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/>
<el-form-item label="">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="name"
label="联系人"
>
<template v-slot:header>
<template slot="header">
联系人 <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label="">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="areaCode"
label="区号"
>
<template v-slot:header>
<template slot="header">
区号 <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-select v-model="row.areaCode" placeholder="请选择区号" filterable>
<el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-select v-model="row.areaCode" placeholder="请选择区号" filterable size="mini">
<el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="phoneNew"
label="联系方式"
>
<template v-slot:header>
<template slot="header">
联系方式 <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row}">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label="">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -270,9 +281,11 @@
label="关联账号"
>
<template v-slot = "{row}">
<el-select v-model="row.userid" @change="selectBD">
<el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select>
<el-form-item label="">
<el-select v-model="row.userid" @change="selectBD" size="mini">
<el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -280,10 +293,12 @@
label="社交软件"
>
<template v-slot="{row}">
<el-select v-model="row.social" placeholder="请选择社交软件">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
<el-form-item label="">
<el-select v-model="row.social" placeholder="请选择社交软件" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -291,7 +306,9 @@
label="社交软件号码"
>
<template v-slot="{row}">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/>
<el-form-item label="">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -299,18 +316,22 @@
label="邮箱"
>
<template v-slot="{row}">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/>
<el-form-item label="">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="isDefault"
label="设为默认"
>
<template v-slot="{row}">
<el-select v-model="row.isDefault" placeholder="设为默认">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-select v-model="row.isDefault" placeholder="设为默认" @change="handleDefaultChange($index)" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
......@@ -318,10 +339,13 @@
label="操作"
>
<template v-slot="{ row, column, $index }">
<el-button type="danger" @click="form.customerContacts.splice($index, 1)">删除</el-button>
<el-form-item label="">
<el-button type="danger" @click="handleDeleteContact($index)" size="mini">删除</el-button>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<el-row :gutter="10" style="margin-top: 15px">
......@@ -367,7 +391,7 @@
</el-col>
</el-row>
</el-form>
<div style="text-align: right">
<div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
......@@ -389,7 +413,7 @@ import {getWarehouseList} from "@/api/ecw/warehouse"
import CustomerLineTable from '@/components/CustomerLineTable'
import {getCustomerSelect} from "@/api/ecw/customer"
import {listServiceUser} from "@/api/system/user"
import {getZhongPaoPage} from '@/api/ecw/zhongPao'
import { getZhongPaoBest, getZhongPaoPage } from '@/api/ecw/zhongPao'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import { getCountryListAll } from '@/api/ecw/country'
import Template from "@/views/cms/template";
......@@ -462,6 +486,13 @@ export default {
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
contactRules: {
name: [{ required: true, message: "请输入联系人", trigger: "blur" }],
areaCode: [{ required: true, message: "请选择区号", trigger: "change" }],
phoneNew: [{ required: true, message: "请输入联系方式", trigger: "blur" }],
},
// 网点
nodeList: [],
......@@ -469,7 +500,7 @@ export default {
productList: [],
showZhong: false,
showZhong1: false,
showPao: true,
showPao: false,
showPao1: false,
warehouseList: [], // 仓库列表
importCityList: [], // 进口地址
......@@ -484,6 +515,29 @@ export default {
},
methods: {
handleDefaultChange($index){
// 只有一个联系人,设置成非默认
if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0){
this.$modal.msgWarning('至少拥有一个默认联系人')
this.form.customerContacts[0].isDefault = 1
return
}
// 设置默认联系人
if (this.form.customerContacts[$index].isDefault === 1) {
// 其他的置否
let i = 0
this.form.customerContacts.forEach(e => {
if (i !== $index){
e.isDefault = 0
}
i++
})
} else {
// 第一个置是
this.form.customerContacts[0].isDefault = 1
}
},
selectBD(){
this.$forceUpdate();
},
......@@ -494,22 +548,35 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
if (this.form.customerContacts.length === 0){
this.$modal.msgError("至少填写一个联系人信息");
return
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
e.customerId = this.customerId
})
this.$refs["contactForm"].validate(valid1 => {
this.$refs["form"].validate(valid2 => {
if (!valid1 || !valid2) {
return;
}
if (this.form.customerContacts.length === 0){
this.$modal.msgError("至少填写一个联系人信息");
return
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
e.customerId = this.customerId
})
updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
......@@ -517,19 +584,8 @@ export default {
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
}).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员')
});
});
})
},
/** 表单重置 */
reset() {
......@@ -608,16 +664,24 @@ export default {
// "username": ""
})
},
handleDeleteContact($index){
this.form.customerContacts.splice($index, 1)
if (this.form.customerContacts.length > 0) {
this.$refs['contactForm'].clearValidate()
if (!this.form.customerContacts.find(e => e.isDefault)){
this.form.customerContacts[0].isDefault = 1
}
}
},
getZhongPao(){
// todo 接口不对,应该用list
getZhongPaoPage().then(r => {
r.data.list.forEach(e => {
if(e.type === 1) {
this.form.lightUnit = e.edge
} else if (e.type === 2 || true){ // todo 缺少type
this.form.weightUnit = e.edge
}
})
getZhongPaoBest({
customerId: this.customerId,
// departureId: this.departureId,
// objectiveId: this.objectiveId
}).then(r => {
this.form.weightUnit = r.data.zhongEdge
this.form.lightUnit = r.data.paoEdge
})
}
},
......@@ -639,6 +703,19 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
::v-deep .el-table__cell {
padding-bottom: 0;
.cell {
.el-form-item {
margin-bottom: 9px;
}
.el-form-item__error {
z-index: 1;
padding-top: 0;
top: 32px;
}
}
}
</style>
......@@ -112,10 +112,38 @@
</el-select>
</el-form-item>
<el-form-item label="订单号" prop="orderId">
<el-input v-model="form.orderId" placeholder="请输入订单号" />
<el-select
v-model="form.orderId"
filterable
remote
reserve-keyword
placeholder="请输入订单号"
:remote-method="getOrderList"
:loading="loading">
<el-option
v-for="item in orderList"
:key="item.value"
:label="item.value"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="提单号" prop="ladingbillId">
<el-input v-model="form.ladingbillId" placeholder="请输入提单号" />
<el-select
v-model="form.ladingbillId"
filterable
remote
reserve-keyword
placeholder="请输入提单号"
:remote-method="getBillList"
:loading="loading">
<el-option
v-for="item in billList"
:key="item.value"
:label="item.value"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="投诉内容" prop="content">
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
......@@ -169,7 +197,7 @@
</el-input>
</el-form-item>
<el-form-item v-show="form.status == '3'" label="处理时间" required>
<el-date-picker type="datetime" v-model="form.handleAt"></el-date-picker>
<el-date-picker type="datetime" v-model="form.handleAt" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -186,6 +214,7 @@ import {getCustomerSelect} from '@/api/ecw/customer'
import CustomerFollow from "../../../components/CustomerFollow"
import DictSelector from '@/components/DictSelector'
import { DICT_TYPE, getDictDataLabel, getDictDatas } from '@/utils/dict'
import { getBillNoSearch, getOrderNoSearch } from '@/api/ecw/order'
export default {
name: "CustomerComplaint",
......@@ -248,7 +277,10 @@ export default {
// 处理
handle: {
dialogVisible: false
}
},
billList: [],
orderList: []
};
},
created() {
......@@ -259,6 +291,22 @@ export default {
})
},
methods: {
getBillList(key){
getBillNoSearch({key, pageNo: 1, pageSize: 20}).then(r => {
if (r.code === 0){
this.billList = r.data.list
}
})
},
getOrderList(key){
getOrderNoSearch({key, pageNo: 1, pageSize: 20}).then(r => {
if (r.code === 0){
this.orderList = r.data.list
}
})
},
/** 查询列表 */
getList() {
this.loading = true;
......
......@@ -129,7 +129,7 @@
<el-form-item label="原因类型">
<dict-selector v-model="params.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item label="附件">
<el-form-item required label="附件">
<image-upload v-model="params.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item label="详细信息">
......@@ -137,7 +137,7 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submit2(false)">转异完成并入仓</el-button>
<el-button type="primary" @click="submit2(false)">确认并完成入仓</el-button>
<el-button @click="escapeBol = false">取消</el-button>
</span>
</el-dialog>
......
......@@ -131,7 +131,7 @@
<el-form-item label="原因类型">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item label="附件">
<el-form-item required label="附件">
<image-upload v-model="form.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item label="详细信息">
......@@ -139,7 +139,7 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit">转异完成并入仓</el-button>
<el-button type="primary" @click="handleSubmit">确认并完成入仓</el-button>
<el-button @click="escapeBol = false">取消</el-button>
</span>
</el-dialog>
......
......@@ -78,11 +78,16 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 2">
<el-col :span="12" v-if="form.type == 2">
<el-form-item label="显示菜单" prop="isShowInMenuBar">
<dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.type == 2">
<el-form-item label="保活" prop="keepalive">
<dict-selector v-model="form.keepalive" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item v-if="form.type != '3'" label="菜单图标">
<el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()">
......@@ -259,6 +264,7 @@ export default {
isShowInMenuBar: undefined,
type: SystemMenuTypeEnum.DIR,
sort: undefined,
keepalive: false,
status: CommonStatusEnum.ENABLE
};
this.resetForm("form");
......
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