Commit eb55a7a0 authored by Marcus's avatar Marcus

Merge remote-tracking branch 'origin/dev' into dev

parents 05992bf2 b45aeb5e
<template xmlns=""> <template xmlns="">
<div> <div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center"> <el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20"> <el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
...@@ -103,7 +102,7 @@ ...@@ -103,7 +102,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="!!(customerId !== '0' && form.customerService)"> <el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(!!(customerId !== '0' && form.customerService) || isCustomerServiceConfirmed)">
<el-option v-for="item in serviceUserList" <el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" /> :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
...@@ -282,7 +281,7 @@ ...@@ -282,7 +281,7 @@
> >
<template v-slot = "{row}"> <template v-slot = "{row}">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="row.userid" remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable> <el-select v-model="row.userid" clearable remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option> <el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -430,7 +429,7 @@ import {customerDropDownList} from "@/api/ecw/customerCommissionInfo"; ...@@ -430,7 +429,7 @@ import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
export default { export default {
name: "edit", name: "edit",
props: { props: {
customerId: String customerId: String,
}, },
components: { components: {
Template, Template,
...@@ -438,6 +437,7 @@ export default { ...@@ -438,6 +437,7 @@ export default {
CustomerLineTable CustomerLineTable
}, },
created() { created() {
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect() this.getCustomerSelect()
this.reset() this.reset()
this.getUserMemberUserFn() this.getUserMemberUserFn()
...@@ -462,6 +462,10 @@ export default { ...@@ -462,6 +462,10 @@ export default {
} else { } else {
// 新建客户 // 新建客户
this.handleAddContact() this.handleAddContact()
if(this.isCustomerServiceConfirmed){
console.log(this.userId);
this.form.customerService = this.userId
}
} }
getNodeList().then(r => { getNodeList().then(r => {
...@@ -489,6 +493,7 @@ export default { ...@@ -489,6 +493,7 @@ export default {
}, },
data(){ data(){
return { return {
isCustomerServiceConfirmed:false,
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
...@@ -595,6 +600,9 @@ export default { ...@@ -595,6 +600,9 @@ export default {
} }
}, },
selectBD(val){ selectBD(val){
if(!val){
return
}
let i = this.selectMemberList.find(item => item.id === val); let i = this.selectMemberList.find(item => item.id === val);
if(i === undefined){ if(i === undefined){
this.selectMemberList.push(this.memberList.find(item => item.id === val)) this.selectMemberList.push(this.memberList.find(item => item.id === val))
...@@ -642,6 +650,8 @@ export default { ...@@ -642,6 +650,8 @@ export default {
return; return;
} }
// 添加的提交 // 添加的提交
//我的客户页面跳转直接
form.isCustomerServiceConfirmed = true;
createCustomer(form).then(response => { createCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('新增成功')); this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false; this.open = false;
...@@ -752,6 +762,9 @@ export default { ...@@ -752,6 +762,9 @@ export default {
} }
}, },
computed: { computed: {
userId(){
return this.$store.state.user.id
},
userMemberUser(){ userMemberUser(){
let list = this.memberList.filter(item => { let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0 return this.selectMemberList.findIndex(i => i.id === item.id) < 0
......
...@@ -67,6 +67,10 @@ ...@@ -67,6 +67,10 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button> v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="$router.push({path:'/customer/add-edit/0',query:{isCustomerServiceConfirmed:true,}})"
v-hasPermi="['ecw:customer:create']">{{$t('新增')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
......
...@@ -412,6 +412,7 @@ ...@@ -412,6 +412,7 @@
<!-- <div slot="header" class="card-title">添加未收客户款项</div> --> <!-- <div slot="header" class="card-title">添加未收客户款项</div> -->
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form <el-form
v-if="open"
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
...@@ -518,7 +519,6 @@ ...@@ -518,7 +519,6 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
row-key="id" row-key="id"
height="calc(100vh - 480px)" height="calc(100vh - 480px)"
:key="dialogTableKey"
> >
<el-table-column type="selection" width="55" :reserve-selection="true"> </el-table-column> <el-table-column type="selection" width="55" :reserve-selection="true"> </el-table-column>
<el-table-column :label="$t('订单号')" align="center" prop="orderNo" /> <el-table-column :label="$t('订单号')" align="center" prop="orderNo" />
...@@ -718,8 +718,7 @@ export default { ...@@ -718,8 +718,7 @@ export default {
discountForm: {}, discountForm: {},
selectListRow: {}, selectListRow: {},
selectListIndex: 0, selectListIndex: 0,
flag: false, flag: false
orderData:{}
}; };
}, },
async created() { async created() {
......
...@@ -303,7 +303,7 @@ export default { ...@@ -303,7 +303,7 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$router.push('/customer/add-edit/0') this.$router.push({path:'/customer/add-edit/0',query:{isCustomerServiceConfirmed:true,}})
// this.reset(); // this.reset();
// this.open = true; // this.open = true;
// this.title = "添加客户"; // this.title = "添加客户";
......
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</div> </div>
<div> <div>
<el-form-item :label="$t('外部仓库')" prop="isExternalWarehouse"> <el-form-item :label="$t('外部仓库')" prop="isExternalWarehouse">
<el-checkbox label="" :checked="!!form.isExternalWarehouse" @change="form.isExternalWarehouse=$event" :disabled="false"></el-checkbox> <el-checkbox label="" v-model="form.isExternalWarehouse" @change="form.isExternalWarehouse=$event" :disabled="false"></el-checkbox>
</el-form-item> </el-form-item>
<div v-if="form.isExternalWarehouse" class="pl-50"> <div v-if="form.isExternalWarehouse" class="pl-50">
<div v-for="(item, index) in form.externalWarehouseDtoList" class="flex" :key="index"> <div v-for="(item, index) in form.externalWarehouseDtoList" class="flex" :key="index">
...@@ -583,7 +583,7 @@ export default { ...@@ -583,7 +583,7 @@ export default {
computed:{ computed:{
// 是否已完成入仓 // 是否已完成入仓
inWarehouse(){ inWarehouse(){
return this.form.inWarehouseState && this.form.inWarehouseState > 201 return !!this.form.inWarehouseState && this.form.inWarehouseState > 201
}, },
exportCityList(){ exportCityList(){
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3) return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
...@@ -739,7 +739,13 @@ export default { ...@@ -739,7 +739,13 @@ export default {
}, },
'form.isExternalWarehouse'(isExternalWarehouse){ 'form.isExternalWarehouse'(isExternalWarehouse){
// 勾选外部仓则添加一个默认的,取消则删除默认的空的 // 勾选外部仓则添加一个默认的,取消则删除默认的空的
this.$set(this.form, 'externalWarehouseDtoList', isExternalWarehouse ? [{}] : []) if(!isExternalWarehouse){
this.$set(this.form, 'externalWarehouseDtoList', [])
}else if(!this.form.externalWarehouseDtoList.length){
this.$set(this.form, 'externalWarehouseDtoList', [{}])
}
}, },
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择 // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){ selectedRouter(val){
......
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
'handlerParams.orderExceptionHandlerResult'(val){ 'handlerParams.orderExceptionHandlerResult'(val){
if(val == 'no_pay'){ if(val == 'no_pay'){
this.showWorkFlow = true this.showWorkFlow = true
} }else this.showWorkFlow = false
} }
}, },
computed: { computed: {
......
...@@ -9,10 +9,16 @@ ...@@ -9,10 +9,16 @@
<div slot="header" style="font-size:20px;"> <div slot="header" style="font-size:20px;">
{{$t('价格设置')}} {{$t('价格设置')}}
<span> <span>
<el-checkbox label="" @change="form.advanceStatus=$event ? 1 : 0">{{$t('预付')}}</el-checkbox> <!-- <el-checkbox label="" @change="form.needPay=$event ? 1 : 0">{{$t('预付')}}</el-checkbox> -->
<el-checkbox label="" @change="form.stepPrice=$event ? 1 : 0">{{$t('阶梯订单')}}</el-checkbox> <el-checkbox label="" @change="form.stepPrice=$event ? 1 : 0">{{$t('阶梯订单')}}</el-checkbox>
</span> </span>
</div> </div>
<el-form-item :label="$t('预付')" prop="needPay" >
<el-radio-group v-model="form.needPay">
<el-radio :label="1">预付</el-radio>
<el-radio :label="0">均可</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('单价模式')" prop="priceType"> <el-form-item :label="$t('单价模式')" prop="priceType">
<dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" defaultable /> <dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" defaultable />
</el-form-item> </el-form-item>
...@@ -187,7 +193,7 @@ ...@@ -187,7 +193,7 @@
</el-form> </el-form>
<div style="margin: 20px 0"> <div style="margin: 20px 0">
<el-button @click="submitForm" type="primary">{{$t('确认提交')}}</el-button> <el-button @click="submitForm" type="primary" :loading="loading">{{$t('确认提交')}}</el-button>
<el-button type="default" @click="$router.back()">{{$t('返回上一页')}}</el-button> <el-button type="default" @click="$router.back()">{{$t('返回上一页')}}</el-button>
</div> </div>
</div> </div>
...@@ -225,7 +231,7 @@ export default { ...@@ -225,7 +231,7 @@ export default {
titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }], */ titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }], */
transportPrice: [{ required: true, message: this.$t("海运费不能为空"), trigger: "blur" }], transportPrice: [{ required: true, message: this.$t("海运费不能为空"), trigger: "blur" }],
clearancePrice: [{ required: true, message: this.$t("清关费不能为空"), trigger: "blur" }], clearancePrice: [{ required: true, message: this.$t("清关费不能为空"), trigger: "blur" }],
advanceStatus: [{ required: true, message: this.$t("是否预付不能为空"), trigger: "blur" }], /* advanceStatus: [{ required: true, message: this.$t("是否预付不能为空"), trigger: "blur" }], */
//containerLocation: [{ required: true, message: "货柜位置不能为空", trigger: "blur" }], //containerLocation: [{ required: true, message: "货柜位置不能为空", trigger: "blur" }],
//square: [{ required: true, message: "方数不能为空", trigger: "blur" }], //square: [{ required: true, message: "方数不能为空", trigger: "blur" }],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }], // zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
...@@ -238,7 +244,8 @@ export default { ...@@ -238,7 +244,8 @@ export default {
unitList: [], unitList: [],
productTypeList: [], productTypeList: [],
productDisabled: true, productDisabled: true,
lineList: [] //路线数组 lineList: [], //路线数组
loading: false
} }
}, },
computed: { computed: {
...@@ -378,10 +385,12 @@ export default { ...@@ -378,10 +385,12 @@ export default {
if(data.lineChannelList.length < 1){ if(data.lineChannelList.length < 1){
return this.$message.error(this.$t('请选择需要修改的路线')) return this.$message.error(this.$t('请选择需要修改的路线'))
} }
this.loading = true
batchUpdateProductPrice(data).then(response => { batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"));
this.$router.replace('/lineProject/product-price?' + (new URLSearchParams(this.$route.query)).toString()) this.$router.replace('/lineProject/product-price?' + (new URLSearchParams(this.$route.query)).toString())
}) })
.finally(res => this.loading = false)
}); });
}, },
} }
......
...@@ -63,10 +63,16 @@ ...@@ -63,10 +63,16 @@
<div slot="header" style="font-size:20px;"> <div slot="header" style="font-size:20px;">
{{$t('价格设置')}} {{$t('价格设置')}}
<span> <span>
<el-checkbox label="" v-model="needPay">{{$t('预付')}}</el-checkbox> <el-checkbox v-if="$route.query.action != 'batchUpdate'" label="" v-model="needPay">{{$t('预付')}}</el-checkbox>
<el-checkbox label="" v-model="stepPrice">{{$t('阶梯定价')}}</el-checkbox> <el-checkbox label="" v-model="stepPrice">{{$t('阶梯定价')}}</el-checkbox>
</span> </span>
</div> </div>
<el-form-item :label="$t('预付')" prop="needPay" v-if="$route.query.action == 'batchUpdate'" >
<el-radio-group v-model="form.needPay">
<el-radio :label="1">预付</el-radio>
<el-radio :label="0">均可</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('单价模式')" prop="priceType"> <el-form-item :label="$t('单价模式')" prop="priceType">
<dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" formatter="number" defaultable /> <dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" formatter="number" defaultable />
</el-form-item> </el-form-item>
...@@ -194,7 +200,7 @@ ...@@ -194,7 +200,7 @@
</el-form> </el-form>
<div style="margin: 20px 0"> <div style="margin: 20px 0">
<el-button @click="submitForm" type="primary" v-if="!readonly">{{$t('确认提交')}}</el-button> <el-button @click="submitForm" type="primary" v-if="!readonly" :loading="loading">{{$t('确认提交')}}</el-button>
<el-button type="default" @click="$router.back()">{{$t('返回上一页')}}</el-button> <el-button type="default" @click="$router.back()">{{$t('返回上一页')}}</el-button>
</div> </div>
</div> </div>
...@@ -241,7 +247,8 @@ export default { ...@@ -241,7 +247,8 @@ export default {
productTypeList: [], productTypeList: [],
productDisabled: true, productDisabled: true,
readonly: false, readonly: false,
lineList: [] //路线数组 lineList: [], //路线数组
loading: false
} }
}, },
computed: { computed: {
...@@ -455,10 +462,11 @@ export default { ...@@ -455,10 +462,11 @@ export default {
// 修改单条路线 // 修改单条路线
if (this.$route.query.action == 'update') { if (this.$route.query.action == 'update') {
this.loading = true
return updateProductPrice(data).then(res => { return updateProductPrice(data).then(res => {
this.$modal.msgSuccess(this.$t("请求成功")); this.$modal.msgSuccess(this.$t("请求成功"));
this.$router.back() this.$router.back()
}) }).finally(res => this.loading = false)
} }
// 批量修改(单个商品的单个路线,多个路线,或者全部路线)的提交 // 批量修改(单个商品的单个路线,多个路线,或者全部路线)的提交
...@@ -491,10 +499,11 @@ export default { ...@@ -491,10 +499,11 @@ export default {
return this.$message.error(this.$t('请选择需要修改的路线')) return this.$message.error(this.$t('请选择需要修改的路线'))
} }
data.productIdList = [this.form.productId] data.productIdList = [this.form.productId]
this.loading = true
batchUpdateProductPrice(data).then(response => { batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"));
this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString()) this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString())
}) }).finally(res => this.loading = false)
return; return;
} }
// 添加的提交 // 添加的提交
...@@ -504,10 +513,11 @@ export default { ...@@ -504,10 +513,11 @@ export default {
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){ if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error(this.$t('运费/全包价不能为0')) return this.$message.error(this.$t('运费/全包价不能为0'))
} }
this.loading = true
createProductPrice(data).then(response => { createProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("请求成功")); this.$modal.msgSuccess(this.$t("请求成功"));
this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString()) this.$router.replace('/product/product-price?' + (new URLSearchParams(this.$route.query)).toString())
}); }).finally(res => this.loading = false);
}); });
}, },
} }
......
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