Commit ab00143c authored by 我在何方's avatar 我在何方
parents 018789dd e5cb05f3
......@@ -5,9 +5,6 @@
<el-form-item :label="$t('自编号')" prop="selfNo">
<el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('柜号')" prop="cubNo">
<el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
......
......@@ -64,7 +64,14 @@
{{ scope.row.loadWeight }}kg
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="left" prop="orderStatusString" />
<el-table-column :label="$t('首次入仓时间')" align="left" prop="rucangTime">
<template slot-scope="scope">
{{ scope.row.rucangTime }}
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="salesmanId" />
<el-table-column :label="$t('制作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- 0 (未制作提货单) 1(审核中) 2(审核通过) 3(审核拒绝) -->
......
......@@ -15,12 +15,10 @@
</template>
<template v-if="cDocObj.cdOutBillType === '2'">
<el-form-item :label="$t('寄送时间')">
<el-form-item :label="$t('清关时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cDocObj.cdSendTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('快递单号')">
<el-input v-model="cDocObj.cdBillNo" :placeholder="$t('请输入快递单号')"></el-input>
</el-form-item>
</template>
<el-form-item label="agent list">
......
......@@ -758,21 +758,12 @@ function getColmnMapping() {
key: "cdAgentlistType",
type: "isFile",
},
{
title: "soncap",
key: "cdSoncapType",
type: "isFile",
},
{
title: i18n.$t("出单方式"),
key: "cdOutBillType",
type: "billingMethod",
},
{
title: i18n.$t("寄送时间"),
key: "cdSendTime",
type: "date",
},
{
title: i18n.$t("业务员"),
key: "operator",
......
......@@ -19,6 +19,26 @@
</el-col>
</el-row>
</el-form-item>
<el-row :gutter="20">
<el-col :span="8" >
<el-form-item label="社交软件" >
<el-select v-model="form.customerContacts[0].social" :placeholder="$t('请选择社交软件')" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label=" $l(dict,'label')" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="社交软件号码" >
<el-input v-model="form.customerContacts[0].socialNumber" :placeholder="$t('请输入社交软件号码')" size="mini"/>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="邮箱" >
<el-input v-model="form.customerContacts[0].email" :placeholder="$t('请输入邮箱')" size="mini"/>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="source" :label="$t('客户来源')">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
......@@ -93,8 +113,9 @@ export default {
},
reset(){
this.form = {
name:undefined,
customerContacts:[{areaCode:undefined,phoneNew:undefined,name:undefined,isDefault: 1}],
customerContacts:[{areaCode:undefined,phoneNew:undefined,name:undefined,isDefault: 1, social:undefined, socialNumber:undefined, email:undefined,}],
source:undefined,
type:[],
customerService:undefined,
......@@ -103,7 +124,7 @@ export default {
inquiry:undefined,
productType:undefined,
productId:undefined,
picture:undefined
picture:undefined,
}
},
submit(){
......
......@@ -45,7 +45,7 @@
<el-form-item :label="$t('出货渠道')" prop="transportType">
<!-- <dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>-->
<el-checkbox-group v-model="form.transportType">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="[3,4].includes(+item.value)">{{item.label}}</el-checkbox>
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="[3].includes(+item.value)">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
......@@ -316,6 +316,7 @@
prop="phoneNew"
:label="$t('联系方式')"
>
<template slot="header">
{{$t('联系方式')}} <span style="color: #ff0000">*</span>
</template>
......@@ -689,7 +690,11 @@ export default {
},
contactRules: {
name: [{ required: true, message: this.$t('请输入联系人'), trigger: "blur" }],
areaCode: [{ required: true, message: this.$t('请选择区号'), trigger: "change" }],
areaCode: [{ required: true, message: this.$t('请选择区号'), trigger: "change" },{
required: true,
trigger: 'change',
validator:this.codeValidator
}],
phoneNew: [{
required: true,
trigger: "blur",
......@@ -771,20 +776,45 @@ export default {
phoneValidator(rule, value, callback){
if (!value) {
return callback(new Error(this.$t('请输入联系方式')));
}
validatorMobile({
code: this.form.customerContacts.find(e => e.phoneNew === value).areaCode,
mobile: value
}).then(r => {
if (r.data){
let areaCode = this.form.customerContacts.find(e => e.phoneNew === value).areaCode
if(areaCode){
validatorMobile({
code: areaCode,
mobile: value
}).then(r => {
if (r.data){
callback()
} else {
callback(new Error(r.msg || this.$t('手机号验证失败')))
}
}).catch(e => {
console.error(e)
callback(new Error(this.$t('手机号验证失败')))
})
}
},
codeValidator(rule, value, callback){
let index = +(rule.field.split('.')[1])
let phone = this.form.customerContacts[index].phoneNew
if(phone){
validatorMobile({
code:value,
mobile: phone
}).then(r => {
if (r.data){
callback()
} else {
callback()
this.$message.error(r.msg || this.$t('手机号验证失败'))
}
}).catch(e => {
console.error(e)
callback()
} else {
callback(new Error(r.msg || this.$t('手机号验证失败')))
}
}).catch(e => {
console.error(e)
callback(new Error(this.$t('手机号验证失败')))
})
this.$message.error(this.$t('手机号验证失败'))
})
}
},
handleDefaultChange($index){
// 只有一个联系人,设置成非默认
......
......@@ -81,12 +81,12 @@
v-hasPermi="[selectAuthorityFn('ecw:customer:export')]">{{$t('导出')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button>
<!-- <el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button>-->
</el-col>
<el-col :span="1.5">
<el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>
<!-- <el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>-->
</el-col>
<el-col :span="1.5">
<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>
......@@ -815,7 +815,8 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('/customer/edit/' + row.id)
console.log(row.id)
this.$router.push('/customer/add-edit/' + row.id)
// this.reset();
// const id = row.id;
// getCustomer(id).then(response => {
......
......@@ -9,9 +9,15 @@
<el-row :gutter="24">
<el-col :span="12" v-if="order.consignorVO" >
<el-descriptions class="margin-top" border :title="$t('发货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('中文名称')">{{order.consignorVO.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('中文名称')">
<component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consignorVO.customerId}`">{{order.consignorVO.name}}</component>
</el-descriptions-item>
<!-- v1.7新增 -->
<el-descriptions-item :label="$t('英文名称')">{{order.consignorVO.nameEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文名称')">
<component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consignorVO.customerId}`">
{{order.consignorVO.nameEn}}
</component>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')">
+{{order.consignorVO.countryCode}} {{order.consignorVO.phone}}
</el-descriptions-item>
......@@ -34,9 +40,13 @@
<el-col :span="12" v-if="order.consigneeVO" style="position: relative;">
<span style="color:#409EFF;position: absolute;right:40px;top:0;font-size:16px;cursor: pointer;" @click="consigneeChange">{{consigneeText}}</span>
<el-descriptions class="margin-top" border :title="$t('收货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('中文名称')">{{order.consigneeVO.name}}</el-descriptions-item>
<el-descriptions-item :label="$t('中文名称')">
<component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consigneeVO.customerId}`">{{order.consigneeVO.name}}</component>
</el-descriptions-item>
<!-- v1.7新增 -->
<el-descriptions-item :label="$t('英文名称')">{{order.consigneeVO.nameEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文名称')">
<component :is="hasCustomerDetailPermi ? 'router-link' : 'span'" :to="`/customer/query/${order.consigneeVO.customerId}`">{{order.consigneeVO.nameEn}}</component>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')">
+{{order.consigneeVO.countryCode}} {{order.consigneeVO.phone}}
</el-descriptions-item>
......@@ -197,6 +207,17 @@
{{row.warehouseInInfoVO ? row.warehouseInInfoVO.quantityAll : row.quantity}}
</template>
</el-table-column>
<el-table-column prop="weight" :label="$t('收费重量') + '(kg)'" width="100px">
<template slot-scope="{row}">
{{row.chargeWeight}}
</template>
</el-table-column>
<el-table-column prop="volume" :label="$t('收费方数') + '(m³)'" width="100px">
<template slot-scope="{row}">
{{row.chargeVolume}}
</template>
</el-table-column>
<el-table-column prop="" :label="$t('费用类型')">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.isPayAdvance" />
......@@ -315,6 +336,11 @@
{{row.totalAmount}}{{currencyMap[row.currencyId]}}
</template>
</el-table-column>
<el-table-column :label="$t('核销比例')" prop="totalAmount">
<template slot-scope="{row}">
{{row.writeOffProportion || 0}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- 这个地方v-hasPermi不生效,所以换checkPermi函数检查 -->
......@@ -548,6 +574,10 @@ export default {
return JSON.parse(this.order.departureVO.departure)
}
return {}
},
// 判断用户是否有查看客户详情的权限
hasCustomerDetailPermi(){
return checkPermi(['ecw:customer:index-query'])
}
},
watch:{
......
......@@ -24,7 +24,7 @@
<template v-if="index < order.orderItemVOList.length - 1">{{ $t('') }}</template>
</span>
</div>
<div class="line">{{$t('总件数')}}:{{order.sumNum}}</div>
<div class="line">{{$t('总件数')}}:{{order.costVO.totalNum}}</div>
</div>
</div>
<div class="w-800" style="margin: auto">
......
......@@ -130,7 +130,7 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<el-dialog :modal-append-to-body="false" :title="title" :visible.sync="open" width="850px" >
<el-dialog :modal="false" :modal-append-to-body="true" :title="title" :visible.sync="open" width="850px" >
<el-form v-if="open" ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="form.typeId" :placeholder="$t('选择商品类型')" clearable>
......@@ -231,9 +231,10 @@
<span>
复制模板线路价格:{{lineNum}}个
</span>
<span @click="toPriceManager(formCopy)" style="color: #0a84ff;cursor: pointer;">
<span @click="toPriceManager(formCopy, true)" style="color: #0a84ff;cursor: pointer;">
查看《#{{$l(formCopy,'title')}}#》路线价格
</span>
<el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button>
</p>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -241,7 +242,7 @@
<el-button @click="cancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="visible" >
<el-dialog width="60%" :visible.sync="visible" @close="()=>{open = true}" >
<product-dialog @copyLine="copyLine"></product-dialog>
</el-dialog>
</div>
......@@ -453,7 +454,7 @@ export default {
// this.form.priceLineCount = val.id;
this.lineNum = val.priceLineCount;
this.form.productTemplateId = val.id;
this.isCopyProductPriceTemplate = true;
this.form.isCopyProductPriceTemplate = true;
copy()
this.open = true;
}).catch(() => {
......@@ -462,6 +463,8 @@ export default {
}else {
this.open = true;
copy()
this.lineNum = 0
this.form.isCopyProductPriceTemplate = false;
}
this.$forceUpdate()
},
......@@ -480,15 +483,25 @@ export default {
},
/**跳转价格管理 */
toPriceManager(row) {
toPriceManager(row, flag = false) {
/* localStorage.setItem('product', JSON.stringify(row));
localStorage.setItem('typeList', JSON.stringify(this.typeList)); */
this.$router.push({
name: 'ProductPrice',
query: {
let p
if (flag){
p = {
product_id: row.id,
product_type: row.typeId
product_type: row.typeId,
transportType:3,
}
}else {
p = {
product_id: row.id,
product_type: row.typeId,
}
}
this.$router.push({
name: 'ProductPrice',
query: p
})
},
......@@ -638,6 +651,7 @@ export default {
this.$router.replace({ path: '/product/product-list'})
}
this.getList();
this.lineNum = 0
});
return;
}
......@@ -646,6 +660,7 @@ export default {
this.$modal.msgSuccess(this.$t("新增成功"));
this.open = false;
this.getList();
this.lineNum = 0
});
});
},
......
......@@ -62,7 +62,7 @@
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button @click="copyLine(scope.row , false)" type="text">仅复制商品</el-button>
<el-button @click="copyLine(scope.row , true)" type="text">仅复制商品与线路价格</el-button>
<el-button @click="copyLine(scope.row , true)" type="text">复制商品与路线价格</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -33,7 +33,7 @@
</el-checkbox-group>
</el-form-item>
<el-form-item :label="$t('商品材质')" prop="materialType">
<dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.materialTypeArr" multiple />
<dict-selector form-type="radio" :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.materialType" />
</el-form-item>
<packaging-type key-arr="priceStepClearanceList" v-model="form">
<el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button>
......@@ -42,9 +42,10 @@
<span>
复制模板线路价格:{{lineNum}}个
</span>
<span @click="toPriceManager(formCopv)" style="color: #0a84ff;cursor: pointer;">
<span @click="toPriceManager(formCopv)" style="color: #0a84ff;cursor: pointer;">
查看《#{{$l(formCopv,'title')}}#》路线价格
</span>
<el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button>
</p>
<el-form-item>
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
......@@ -112,9 +113,6 @@ export default {
this.form.isAllProduct = 1
}
}, */
'form.materialTypeArr'(typeArr){
this.$set(this.form, 'form.materialTyp', typeArr.join(','))
},
attrIds(val){
this.form.attrId = val.join(',')
}
......@@ -141,7 +139,8 @@ export default {
name: 'ProductPrice',
query: {
product_id: row.id,
product_type: row.typeId
product_type: row.typeId,
transportType:3
}
})
},
......@@ -214,7 +213,6 @@ export default {
priceStepClearanceList:[],
priceLineCount:undefined,
isCopyProductPriceTemplate:false,
materialTypeArr:[],
};
this.attrIds = []
......
......@@ -371,6 +371,7 @@ export default {
},
editAdd(row){
this.editDialog.form.customerId = row.customerId
this.editDialog.form.feeScale = row.feeScale;
if(row.customerContactsId){
this.editDialog.form.customerContactsId = row.customerContactsId
}
......
......@@ -885,7 +885,7 @@ export default {
if(data.lineChannelList.length < 1){
return this.$message.error(this.$t('请选择需要修改的路线'))
}
await this.$confirm(this.t("已选择{route}条路线,确认提交?", {route: data.lineChannelList.length}))
await this.$confirm(this.$t("已选择{route}条路线,确认提交?", {route: data.lineChannelList.length}))
data.productIdList = [this.form.productId]
this.loading = true
batchUpdateProductPrice(data).then(response => {
......
......@@ -542,7 +542,28 @@ export default {
}
this.handleQuery()
*/
this.getList()
if(this.$route.query.product_type){
this.$set(this.queryParams, 'typeId', +this.$route.query.product_type);
}
if(this.$route.query.transportType){
this.$set(this.queryParams, 'transportType', +this.$route.query.transportType);
}
// 指定产品获取产品信息
if(this.$route.query.product_id){
this.$set(this.queryParams, 'productId', +this.$route.query.product_id);
getProduct(this.$route.query.product_id).then(res => {
this.product = res.data
})
}else {
if (this.transportType) {
// 如果指定了单个的运输方式则赋值
if (this.transportType.split('_').length == 1) {
this.$set(this.queryParams, 'transportType', +this.transportType)
}
}
this.getAttrList();
}
},
watch:{
'$route.query.product_id'(){
......@@ -560,6 +581,9 @@ export default {
pageNo: 1,
pageSize: 10,
productId: this.$route.query.product_id,
typeId: this.$route.query.product_type,
transportType:this.$route.query.transportType
}
}
getProduct(this.$route.query.product_id).then(res => {
......@@ -574,6 +598,9 @@ export default {
if(this.$route.query.product_type){
this.$set(this.queryParams, 'typeId', +this.$route.query.product_type);
}
if(this.$route.query.transportType){
this.$set(this.queryParams, 'transportType', +this.$route.query.transportType);
}
// 指定产品获取产品信息
if(this.$route.query.product_id){
this.$set(this.queryParams, 'productId', +this.$route.query.product_id);
......@@ -687,10 +714,12 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
console.log(this.queryParams,'this.queryParams')
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
console.log(params,'params')
getProductPricePage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
......
......@@ -581,7 +581,7 @@ export default {
lineform: {
otherService:[],
isClientShow:1,
makeBillNode:'2',
makeBillNode:'6',
controlStatus:'0',
currencyUnit:1,
minPrice:0,
......@@ -933,7 +933,7 @@ export default {
this.lineform.transportType = row.transportType;
this.lineform.isClientShow = row.isClientShow ? 1 : 0;
this.lineform.makeBillNode = row.makeBillNode;
this.lineform.makeBillNode = row.makeBillNode || '6';
this.lineform.currencyUnit = row.currencyUnit ? row.currencyUnit : 1
this.lineform.controlStatus = row.controlStatus ? row.controlStatus : 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