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