Commit 418a6372 authored by 332784038@qq.com's avatar 332784038@qq.com

6

parent b223b3c3
...@@ -142,6 +142,7 @@ import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/use ...@@ -142,6 +142,7 @@ import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/use
import { parseTime } from "@/utils/ruoyi" import { parseTime } from "@/utils/ruoyi"
import FileUpload from "@/components/FileUpload/fileUpload" import FileUpload from "@/components/FileUpload/fileUpload"
import { formatDate } from "@/utils/index" import { formatDate } from "@/utils/index"
import { log } from "util"
export default { export default {
/** /**
* 客户跟进 * 客户跟进
...@@ -168,7 +169,6 @@ export default { ...@@ -168,7 +169,6 @@ export default {
customerFollowList: [], customerFollowList: [],
serviceUserList: [], serviceUserList: [],
customerContactsList: [], customerContactsList: [],
customerFollow: { customerFollow: {
dialogVisible: false, dialogVisible: false,
form: { form: {
...@@ -203,7 +203,6 @@ export default { ...@@ -203,7 +203,6 @@ export default {
} }
}, },
created() { created() {
this.init()
listServiceUser().then((r) => { listServiceUser().then((r) => {
this.serviceUserList = r.data this.serviceUserList = r.data
}) })
...@@ -213,9 +212,9 @@ export default { ...@@ -213,9 +212,9 @@ export default {
}, },
methods: { methods: {
init() { init() {
if (!!this.customerId) if (!!this.form.customerId)
getCustomerContactsListByCustomer({ getCustomerContactsListByCustomer({
customerId: this.customerId customerId: this.form.customerId
}).then((r) => { }).then((r) => {
this.customerContactsList = r.data this.customerContactsList = r.data
}) })
...@@ -362,8 +361,9 @@ export default { ...@@ -362,8 +361,9 @@ export default {
this.reset() this.reset()
let r = await getFollowupNewNumber() let r = await getFollowupNewNumber()
console.log(r) console.log(r)
this.form.customerId = this.customerId
this.form.number = r.data this.form.number = r.data
this.init()
}, },
async handleUpdate(row, flag) { async handleUpdate(row, flag) {
this.isView = false this.isView = false
...@@ -384,6 +384,7 @@ export default { ...@@ -384,6 +384,7 @@ export default {
nextPlan: "" nextPlan: ""
} }
} }
this.init()
} }
} }
} }
......
...@@ -9,22 +9,14 @@ ...@@ -9,22 +9,14 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('到仓确认')" prop="arrivalConfirm"> <el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch <el-switch v-model="form.arrivalConfirm" :active-value="1" :inactive-value="0" />
v-model="form.arrivalConfirm"
:active-value="1"
:inactive-value="0"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('重货标准')" prop="weightUnit"> <el-form-item :label="$t('重货标准')" prop="weightUnit">
<el-switch v-model="showZhong" /> <el-switch v-model="showZhong" disabled />
<el-input <el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准')" v-show="showZhong">
v-model="form.weightUnit"
:placeholder="$t('请输入重货标准')"
v-show="showZhong"
>
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -32,24 +24,14 @@ ...@@ -32,24 +24,14 @@
<el-col :span="24" v-show="showZhong"> <el-col :span="24" v-show="showZhong">
<el-form-item :label="$t('指定线路')" prop="line"> <el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showZhong1"></el-switch> <el-switch v-model="showZhong1"></el-switch>
<customer-line-table <customer-line-table v-if="showZhong1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="zhongLines" :zhong-pao-type="1"></customer-line-table>
v-if="showZhong1"
:warehouse-list="warehouseList"
:import-city-list="importCityList"
v-model="zhongLines"
:zhong-pao-type="1"
></customer-line-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('泡货标准')" prop="lightUnit"> <el-form-item :label="$t('泡货标准')" prop="lightUnit">
<el-switch v-model="showPao" /> <el-switch v-model="showPao" disabled />
<el-input <el-input v-model="form.lightUnit" :placeholder="$t('请输入泡货标准')" v-show="showPao">
v-model="form.lightUnit"
:placeholder="$t('请输入泡货标准')"
v-show="showPao"
>
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -57,13 +39,7 @@ ...@@ -57,13 +39,7 @@
<el-col :span="24" v-show="showPao"> <el-col :span="24" v-show="showPao">
<el-form-item :label="$t('指定线路')" prop="line"> <el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showPao1"></el-switch> <el-switch v-model="showPao1"></el-switch>
<customer-line-table <customer-line-table v-if="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="2"></customer-line-table>
v-if="showPao1"
:warehouse-list="warehouseList"
:import-city-list="importCityList"
v-model="paoLines"
:zhong-pao-type="2"
></customer-line-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -85,18 +61,18 @@ ...@@ -85,18 +61,18 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="warning" @click="handleClose">{{$t('关 闭')}}</el-button> <el-button type="warning" @click="handleClose">{{ $t("关 闭") }}</el-button>
<el-button type="primary" @click="handerSubmit">{{$t('保 存')}}</el-button> <el-button type="primary" @click="handerSubmit">{{ $t("保 存") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import CustomerLineTable from "@/components/CustomerLineTable"; import CustomerLineTable from "@/components/CustomerLineTable"
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse"
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region"
import { getZhongPaoBest, getZhongPaoPage } from "@/api/ecw/zhongPao"; import { getZhongPaoBest, getZhongPaoPage } from "@/api/ecw/zhongPao"
import { getCustomer, getCustomerLines, customerSettingButton } from "@/api/ecw/customer"; import { getCustomer, getCustomerLines, customerSettingButton } from "@/api/ecw/customer"
export default { export default {
name: "CustomerSetting", name: "CustomerSetting",
components: { components: {
...@@ -125,16 +101,16 @@ export default { ...@@ -125,16 +101,16 @@ export default {
warehouseList: [], // 仓库列表 warehouseList: [], // 仓库列表
importCityList: [], // 进口地址 importCityList: [], // 进口地址
paoLines: [], paoLines: [],
paoLines: [], paoLines: []
} }
}, },
created() { created() {
getWarehouseList().then((r) => { getWarehouseList().then((r) => {
this.warehouseList = r.data; this.warehouseList = r.data
}); })
getTradeCityList({ type: 1 }).then((r) => { getTradeCityList({ type: 1 }).then((r) => {
this.importCityList = r.data.filter((item) => item.type === "1"); this.importCityList = r.data.filter((item) => item.type === "1")
}); })
}, },
methods: { methods: {
init(id) { init(id) {
...@@ -158,29 +134,29 @@ export default { ...@@ -158,29 +134,29 @@ export default {
} }
// 打开重泡货开关 // 打开重泡货开关
if (this.form.weightUnit) { if (this.form.weightUnit) {
this.showZhong = true; this.showZhong = true
} }
if (this.form.lightUnit) { if (this.form.lightUnit) {
this.showPao = true; this.showPao = true
} }
getCustomerLines(this.customerId).then((res) => { getCustomerLines(this.customerId).then((res) => {
this.zhongLines = res.data.filter((item) => item.zhongPaoType == 1); this.zhongLines = res.data.filter((item) => item.zhongPaoType == 1)
this.paoLines = res.data.filter((item) => item.zhongPaoType == 2); this.paoLines = res.data.filter((item) => item.zhongPaoType == 2)
if (this.zhongLines.length) this.showZhong1 = true; if (this.zhongLines.length) this.showZhong1 = true
if (this.paoLines.length) this.showPao1 = true; if (this.paoLines.length) this.showPao1 = true
}); })
this.getZhongPao() this.getZhongPao()
}) })
}, },
getZhongPao() { getZhongPao() {
getZhongPaoBest({ getZhongPaoBest({
customerId: this.customerId, customerId: this.customerId
// departureId: this.departureId, // departureId: this.departureId,
// objectiveId: this.objectiveId // objectiveId: this.objectiveId
}).then((r) => { }).then((r) => {
if (!this.form.weightUnit) this.form.weightUnit = r.data.zhongEdge; if (!this.form.weightUnit) this.form.weightUnit = r.data.zhongEdge
if (!this.form.lightUnit) this.form.lightUnit = r.data.paoEdge; if (!this.form.lightUnit) this.form.lightUnit = r.data.paoEdge
}); })
}, },
handleClose() { handleClose() {
this.resetForm("form") this.resetForm("form")
...@@ -190,52 +166,51 @@ export default { ...@@ -190,52 +166,51 @@ export default {
this.$refs["form"].validate((valid, err) => { this.$refs["form"].validate((valid, err) => {
// 重货标准和泡货标准,未打开就不传,提交前清空一下 // 重货标准和泡货标准,未打开就不传,提交前清空一下
if (!this.showZhong) { if (!this.showZhong) {
this.form.weightUnit = null; this.form.weightUnit = null
this.zhongLines = []; this.zhongLines = []
} }
if (!this.showZhong1) { if (!this.showZhong1) {
this.zhongLines = []; this.zhongLines = []
} }
if (!this.showPao) { if (!this.showPao) {
this.form.lightUnit = null; this.form.lightUnit = null
this.paoLines = []; this.paoLines = []
} }
if (!this.showPao1) { if (!this.showPao1) {
this.paoLines = []; this.paoLines = []
} }
this.updateCustomerLines(); this.updateCustomerLines()
// 检查路线是否启用了但是没选择目的仓 // 检查路线是否启用了但是没选择目的仓
let errors = 0; let errors = 0
this.form.customerLines.forEach((line) => { this.form.customerLines.forEach((line) => {
if (!line.objectiveIds || line.objectiveIds == "") { if (!line.objectiveIds || line.objectiveIds == "") {
errors++; errors++
} }
}); })
if (errors) { if (errors) {
return this.$message.error("有两条路线未选择目的地"); return this.$message.error("有两条路线未选择目的地")
} }
customerSettingButton(this.form).then((response) => { customerSettingButton(this.form).then((response) => {
this.$modal.msgSuccess(this.$t("操作成功")); this.$modal.msgSuccess(this.$t("操作成功"))
this.dialogVisible = false; this.dialogVisible = false
const obj = { path: "/customer/customer" }; const obj = { path: "/customer/customer" }
this.$emit('refresh') this.$emit("refresh")
}); })
}); })
}, },
updateCustomerLines() { updateCustomerLines() {
let zhongLines = [], let zhongLines = [],
paoLines = []; paoLines = []
if (this.zhongLines.length > 0) { if (this.zhongLines.length > 0) {
zhongLines = this.zhongLines; zhongLines = this.zhongLines
} }
if (this.paoLines.length > 0) { if (this.paoLines.length > 0) {
paoLines = this.paoLines; paoLines = this.paoLines
} }
this.form.customerLines = [...zhongLines, ...paoLines]; this.form.customerLines = [...zhongLines, ...paoLines]
}, }
} }
} }
</script> </script>
...@@ -385,7 +385,7 @@ ...@@ -385,7 +385,7 @@
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('重货标准')" prop="weightUnit"> <el-form-item :label="$t('重货标准')" prop="weightUnit">
<el-switch v-model="showZhong" /> <el-switch v-model="showZhong" disabled />
<el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准')" v-show="showZhong"> <el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准')" v-show="showZhong">
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('泡货标准')" prop="lightUnit"> <el-form-item :label="$t('泡货标准')" prop="lightUnit">
<el-switch v-model="showPao" /> <el-switch v-model="showPao" disabled />
<el-input v-model="form.lightUnit" :placeholder="$t('请输入泡货标准')" v-show="showPao"> <el-input v-model="form.lightUnit" :placeholder="$t('请输入泡货标准')" v-show="showPao">
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
...@@ -853,10 +853,10 @@ export default { ...@@ -853,10 +853,10 @@ export default {
allSimplList: [], allSimplList: [],
currecyList: [], currecyList: [],
enterOpenSeaTime: undefined, enterOpenSeaTime: undefined,
showBaseFlag: true, showBaseFlag: false,
showShippingFlag: true, showShippingFlag: false,
showSettingFlag: true, showSettingFlag: false,
showFinanceFlag: true, showFinanceFlag: false,
competitorList: [] competitorList: []
} }
}, },
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户')" prop="searchCustomer"> <el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model.trim="queryParams.searchCustomer" clearable @keyup.enter.native="handleQuery" /> <el-input v-model.trim="queryParams.searchCustomer" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('联系方式')" prop="relationPhone"> <el-form-item :label="$t('联系方式')" prop="relationPhone">
<el-input v-model.trim="queryParams.relationPhone" clearable @keyup.enter.native="handleQuery" @input="queryParams.relationPhone = queryParams.relationPhone.replace(/\s+/g, '')" /> <el-input v-model.trim="queryParams.relationPhone" clearable @keyup.enter.native="handleQuery" @input="queryParams.relationPhone = queryParams.relationPhone.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('区号')" prop="relationAreaCode"> <el-form-item :label="$t('区号')" prop="relationAreaCode">
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('create?copyId=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("复制") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('create?copyId=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("复制") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`logList?offerId=${scope.row.offerId}&customerId=${scope.row.customerId}`)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }}</el-dropdown-item> <el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }}</el-dropdown-item>
......
...@@ -43,16 +43,7 @@ ...@@ -43,16 +43,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button> <el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button>
<el-button <el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
type="primary"
@click="
() => {
followForm = { pageNo: 1, pageSize: 10 }
getCustomerFollowList()
}
"
>{{ $t("重置") }}
</el-button>
<el-button type="success" @click="handleAdd" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button> <el-button type="success" @click="handleAdd" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']"> <el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t("导出") }} {{ $t("导出") }}
...@@ -217,6 +208,11 @@ export default { ...@@ -217,6 +208,11 @@ export default {
this.customerFollowList = r.data.list this.customerFollowList = r.data.list
this.customerFollowTotal = r.data.total this.customerFollowTotal = r.data.total
}) })
},
reset() {
this.followFormTmp.nextTime = ["", ""]
this.followForm = { pageNo: 1, pageSize: 10 }
this.getCustomerFollowList()
} }
} }
} }
......
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