Commit 0f5df4c2 authored by dragondean@qq.com's avatar dragondean@qq.com

修复订单优惠券路线价格等bug

parent 0b2db738
......@@ -5,10 +5,24 @@
<el-form-item :label="$t('任务名称')" prop="name">
<el-input v-model="queryParams.name" :placeholder="$t('请输入任务名称')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-form-item :label="$t('流程编号')" prop="name">
<!--// TODO 缺少查询字段-->
<!-- <el-input v-model="queryParams.no" :placeholder="$t('请输入流程编号')" clearable @keyup.enter.native="handleQuery"/>-->
缺少字段
</el-form-item>
<el-form-item :label="$t('流程分类')" prop="name">
<!--// TODO 缺少查询字段-->
<!-- <el-input v-model="queryParams.no" :placeholder="$t('请输入流程编号')" clearable @keyup.enter.native="handleQuery"/>-->
缺少字段
</el-form-item>
<el-form-item :label="$t('提交时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item :label="$t('业务编号')" prop="name">
缺少字段
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......@@ -18,30 +32,37 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('任务编号')" align="center" prop="id" width="320" fixed />
<el-table-column :label="$t('任务名称')" align="center" prop="name" width="200" />
<el-table-column :label="$t('所属流程')" align="center" prop="processInstance.name" width="200" />
<el-table-column :label="$t('任务名称')" align="center" prop="processInstance.name" width="200" />
<el-table-column :label="$t('业务编号')" align="center" prop="" width="200" >
缺少字段
</el-table-column>
<el-table-column :label="$t('流程分类')" align="center" prop="category" width="200" />
<el-table-column :label="$t('当前审批节点')" align="center" prop="name" width="200" />
<el-table-column :label="$t('状态')" align="center" prop="" width="200" >
缺少字段
</el-table-column>
<el-table-column :label="$t('流程发起人')" align="center" prop="processInstance.startUserNickname" width="120" />
<el-table-column :label="$t('结果')" align="center" prop="result">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="scope.row.result"/>
</template>
</el-table-column>
<el-table-column :label="$t('审批意见')" align="center" prop="comment" width="200" />
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<!-- <el-table-column :label="$t('审批意见')" align="center" prop="comment" width="200" />-->
<el-table-column :label="$t('提交时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('审批时间')" align="center" prop="endTime" width="180">
<el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('耗时')" align="center" prop="durationInMillis" width="180">
<!-- <el-table-column :label="$t('耗时')" align="center" prop="durationInMillis" width="180">
<template slot-scope="scope">
<span>{{ getDateStar(scope.row.durationInMillis) }}</span>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleAudit(scope.row)"
......
......@@ -2,37 +2,28 @@
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('任务名称')" prop="name">
<el-input v-model="queryParams.name" :placeholder="$t('请输入任务名')" clearable @keyup.enter.native="handleQuery"/>
<el-form-item :label="$t('流程名')" prop="name">
<el-input v-model="queryParams.name" :placeholder="$t('请输入流程名')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- // TODO 接口暂不支持
<el-form-item label="流程编号" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入流程编号" clearable @keyup.enter.native="handleQuery"/>
<el-form-item label="编号" prop="name">
缺少字段
</el-form-item>
-->
<el-form-item :label="$t('流程分类')" prop="category">
<el-select v-model="queryParams.category" :placeholder="$t('请选择流程分类')" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BPM_MODEL_CATEGORY)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('提交时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"/>
</el-form-item>
<!-- // TODO 接口暂不支持
<el-form-item label="状态" prop="name">
</el-form-item>
<el-form-item label="结果" prop="name">
</el-form-item>
-->
<el-form-item :label="$t('业务编码')" prop="businessNo">
<el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编码')" clearable @keyup.enter.native="handleQuery"/>
<el-form-item :label="$t('业务编号')" prop="businessNo">
<el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编号')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......@@ -41,25 +32,34 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('任务编号')" align="center" prop="id" width="320"/>
<el-table-column :label="$t('业务编号')" align="center" prop="businessNo"/>
<el-table-column :label="$t('编号')" align="center" prop="id" width="320"/>
<el-table-column :label="$t('流程名称')" align="center" prop="processInstance.name" width="320"/>
<el-table-column :label="$t('流程分类')" align="center" prop="category">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="scope.row.category"/>
</template>
</el-table-column>
<el-table-column :label="$t('所属流程')" align="center" prop="processInstance.name"/>
<el-table-column :label="$t('当前审批任务')" align="center" prop="name"/>
<el-table-column :label="$t('流程发起人')" align="center" prop="processInstance.startUserNickname"/>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<el-table-column :label="$t('业务编号')" align="center" prop="businessNo"/>
<el-table-column :label="$t('当前审批节点')" align="center" prop="name"/>
<el-table-column :label="$t('状态')" align="center" prop="version" width="80">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.suspensionState === 1">{{$t('激活')}}</el-tag>
<el-tag type="warning" v-if="scope.row.suspensionState === 2">{{$t('挂起')}}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('结果')" align="center" prop="processInstance.startUserNickname">
缺少字段
</el-table-column>
<el-table-column :label="$t('提交时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="version" width="80">
<el-table-column :label="$t('结束时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.suspensionState === 1">{{$t('激活')}}</el-tag>
<el-tag type="warning" v-if="scope.row.suspensionState === 2">{{$t('挂起')}}</el-tag>
缺少字段
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
......
......@@ -54,83 +54,83 @@
<el-form-item label="*运费" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1">
<div class="fee-item" v-for="(item, index) in fee[1]" :key="index">
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
<el-input v-model="item.fullAmount" style="width:100px" />
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> -->
<selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 2" v-model="item.combUnit" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1"></span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span>
<span v-if="[5].indexOf(form.type) > -1"></span>
<el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" />
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
<el-input v-model="item.fullAmount" style="width:100px" />
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> -->
<selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 2" v-model="item.combUnit" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span>
</template>
<template v-if="form.type==7">
> <el-input v-model="item.startAmount" style="width:100px" />
<el-input v-model="item.endAmount" style="width:100px" />
<selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
价格
</template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6">
/
<selector v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</template>
<span v-if="[2].indexOf(form.type) > -1"></span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span>
<el-button class="el-icon-plus" size="mini" type="primary" @click="fee[1].push({type:1})" />
<el-button v-if="fee[1].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[1].splice(index,1)" />
</div>
<span v-if="[5].indexOf(form.type) > -1"></span>
<el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span>
</template>
<template v-if="form.type==7">
> <el-input v-model="item.startAmount" style="width:100px" />
<el-input v-model="item.endAmount" style="width:100px" />
<selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
价格
</template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6">
/
<selector v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</template>
<el-button class="el-icon-plus" size="mini" type="primary" @click="fee[1].push({type:1})" />
<el-button v-if="fee[1].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[1].splice(index,1)" />
</div>
</el-form-item>
<el-form-item label="清关费" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1">
<div class="fee-item" v-for="(item, index) in fee[2]" :key="index">
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
<el-input v-model="item.fullAmount" style="width:100px" />
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1"></span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span>
<span v-if="[5].indexOf(form.type) > -1"></span>
<el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" />
<div class="fee-item" v-for="(item, index) in fee[2]" :key="index">
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
<el-input v-model="item.fullAmount" style="width:100px" />
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span>
</template>
<template v-if="form.type==7">
> <el-input v-model="item.startAmount" style="width:100px" />
<el-input v-model="item.endAmount" style="width:100px" />
<Selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
价格
</template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6">
/
<selector v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</template>
<span v-if="[2].indexOf(form.type) > -1"></span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span>
<span v-if="[5].indexOf(form.type) > -1"></span>
<el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span>
</template>
<template v-if="form.type==7">
> <el-input v-model="item.startAmount" style="width:100px" />
<el-input v-model="item.endAmount" style="width:100px" />
<Selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
价格
</template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6">
/
<selector v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</template>
<el-button class="el-icon-plus" size="mini" type="primary" @click="fee[2].push({type:2})" />
<el-button v-if="fee[2].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[2].splice(index,1)" />
</div>
<el-button class="el-icon-plus" size="mini" type="primary" @click="fee[2].push({type:2})" />
<el-button v-if="fee[2].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[2].splice(index,1)" />
</div>
</el-form-item>
<el-form-item label="叠加优惠" prop="discountDetailed">
......@@ -152,7 +152,7 @@
>
<dict-selector
form-type="radio"
:type="DICT_TYPE.ECW_YESNO"
:type="DICT_TYPE.ECW_YESNO"
v-model="form.isSimilarSuperposition"
formatter="bool"
placeholder="请选择类型"
......@@ -227,7 +227,7 @@
>
<dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.documentDeclaration" multiple />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(0)">保 存</el-button>
<el-button type="primary" @click="submitForm(1)">发 布</el-button>
......@@ -264,8 +264,8 @@ export default {
loading: true,
// 表单参数
form: {
status: 1,
},
status: 1,
},
// 表单校验
rules: {
isCargoControl: [{required: true, message: '请选择是否控货'}],
......@@ -288,85 +288,91 @@ export default {
};
},
computed:{
// 是否显示客户选择器
showCustomerSelector(){
let dict = getDictData(this.DICT_TYPE.ECW_SUITABLE_USER_TYPE, this.form.suitableUserType)
return dict && dict.cssClass == 'show-selector'
},
// 是否显示路线选择器
showRouterSelector(){
let dict = getDictData(this.DICT_TYPE.ECW_SUITABLE_LINE_TYPE, this.form.suitableLineType)
return dict && dict.cssClass == 'show-selector'
},
// 显示显示产品选择器
showProductsSelector(){
let dict = getDictData(this.DICT_TYPE.ECW_SUITABLE_PROD_TYPE, this.form.suitableProdType)
return dict && dict.cssClass == 'show-selector'
},
availCouponList(){
return this.couponList.filter(item => !this.form.isSimilarSuperposition || item.type != this.form.type)
},
costType(){
// 优惠券
if(this.form.type == 1){
return 3
}
let costType = null
for(let type in this.fee){
let feeList = this.fee[type]
feeList.forEach(item => {
if(item.reduceAmount){
costType = type
return false
}
})
}
return costType
},
// 满减组合单位列表
combUnitList(){
let arr = []
this.currencyList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'fullCurrencyId_' + item.id
})
})
this.unitList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'prodUnit_' + item.id
})
})
return arr
}
// 是否显示客户选择器
showCustomerSelector(){
let dict = getDictData(this.DICT_TYPE.ECW_SUITABLE_USER_TYPE, this.form.suitableUserType)
return dict && dict.cssClass == 'show-selector'
},
// 是否显示路线选择器
showRouterSelector(){
let dict = getDictData(this.DICT_TYPE.ECW_SUITABLE_LINE_TYPE, this.form.suitableLineType)
return dict && dict.cssClass == 'show-selector'
},
// 显示显示产品选择器
showProductsSelector(){
let dict = getDictData(this.DICT_TYPE.ECW_SUITABLE_PROD_TYPE, this.form.suitableProdType)
return dict && dict.cssClass == 'show-selector'
},
availCouponList(){
return this.couponList.filter(item => !this.form.isSimilarSuperposition || item.type != this.form.type)
},
costType(){
// 优惠券
if(this.form.type == 1){
return 3
}
let costType = null
for(let type in this.fee){
let feeList = this.fee[type]
feeList.forEach(item => {
if(item.reduceAmount){
costType = type
return false
}
})
}
return costType
},
// 满减组合单位列表
combUnitList(){
let arr = []
this.currencyList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'fullCurrencyId_' + item.id
})
})
this.unitList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'prodUnit_' + item.id
})
})
return arr
}
},
watch:{
'form.type'(val){
// 方数满减3和特价6需要单位
if((val == 3 || val == 6 || val == 2) && !this.unitList.length){
this.getUnitList()
}
'form.type'(val){
// 方数满减3和特价6需要单位
if((val == 3 || val == 6 || val == 2) && !this.unitList.length){
this.getUnitList()
}
// 非优惠券则查询优惠券列表
if(val && val != 1){
this.getCouponSelect()
}
},
'form.isSimilarSuperposition'(val){
if(val){
let keepIds = []
this.couponIds.forEach((item, index) => {
if(this.availCouponList.findIndex(coupon => coupon.couponId == item) > -1){
keepIds.push(item)
}
})
this.couponIds = keepIds
}
}
// 非优惠券则查询优惠券列表
if(val && val != 1){
this.getCouponSelect()
// 非优惠券给默认数据
this.$set(this.form, 'documentDeclaration', ["1"])
this.$set(this.form, 'isCargoControl', ["0"])
this.$set(this.form, 'orderAttr', ["2","3","1"])
this.$set(this.form, 'brand', ["0","1"])
}
},
'form.isSimilarSuperposition'(val){
if(val){
let keepIds = []
this.couponIds.forEach((item, index) => {
if(this.availCouponList.findIndex(coupon => coupon.couponId == item) > -1){
keepIds.push(item)
}
})
this.couponIds = keepIds
}
}
},
created() {
getCurrencyList().then(res => this.currencyList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
if (this.$route.query.id) {
getCoupon(this.$route.query.id).then((res) => {
this.form = res.data
......@@ -377,8 +383,7 @@ export default {
this.couponIds = couponIds.map(item => parseInt(item))
})
}
/* this.costType = this.form.costType */
if(this.form.discountDetailedVOs){
/* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */
this.fee[this.form.costType] = this.form.discountDetailedVOs
......@@ -405,7 +410,7 @@ export default {
getUnitList(){
getUnitList().then(res => this.unitList = res.data)
},
/** 表单重置 */
reset() {
this.form = {
......@@ -464,7 +469,7 @@ export default {
// status必填
data.status = status
data.couponIds = this.couponIds.join(',')
// 费用类型 1 运输费 2 清关费 3 总费用(优惠卷专用)
if(this.form.type == 1){
data.costType = 3
......@@ -501,4 +506,4 @@ export default {
padding: 10px;
overflow-y: auto;
}
</style>
\ No newline at end of file
</style>
......@@ -290,7 +290,7 @@
</el-form-item>
</div>
<div>
<el-form-item :label="$t('外部仓库')" prop="warehouseType">
<el-form-item :label="$t('外部仓库')" prop="isExternalWarehouse">
<el-checkbox label="" :checked="!!form.isExternalWarehouse" @change="form.isExternalWarehouse=$event" :disabled="false"></el-checkbox>
</el-form-item>
<div v-if="form.isExternalWarehouse" class="pl-50">
......
......@@ -2,7 +2,7 @@
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<products-selector v-model="form.productIdList" class="mb-20" />
<routers-selector v-model="selectedRoutes" />
<el-card style="margin-bottom: 10px">
......@@ -90,7 +90,7 @@
</el-row>
</el-form-item>
</template>
<!--特需-->
<template v-if="form.priceType==1">
......@@ -154,6 +154,11 @@
<!-- <el-form-item label="是否预付" prop="advanceStatus">
<dict-selector form-type="radio" :type="DICT_TYPE.ADVANCE_STATUS" v-model="form.advanceStatus" />
</el-form-item> -->
<el-form-item :label="$t('价格有效期')">
<el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
-
<el-date-picker v-model="form.validateEndDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-card>
......@@ -197,6 +202,7 @@ import ProductsSelector from '@/components/ProductsSelector'
import { arrryToKeyedObjectBy } from '@/utils/index'
import Selector from '@/components/Selector'
import Inputor from '@/components/Inputor'
import { parseTime } from '@/utils/ruoyi'
export default {
components: { RoutersSelector, ProductsSelector, Selector, Inputor },
......@@ -306,7 +312,7 @@ export default {
}
},
async created() {
/* this.productDisabled = false
// 获取类型列表
......@@ -319,6 +325,10 @@ export default {
this.$set(this.form, 'productId', +this.$route.query.product_id)
}
*/
// 默认今天起,两年有效
this.form.validateStartDate = parseTime(Date.now())
this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000)
// 默认费用单位
this.setDefaultVolumeUnit(7)
......@@ -364,7 +374,7 @@ export default {
}
data.lineChannelList = this.selectedRoutes
if(data.lineChannelList.length < 1){
return this.$message.error(this.$t('请选择需要修改的路线'))
}
......@@ -384,4 +394,4 @@ export default {
.mr10{
margin-right: 10px;
}
</style>
\ No newline at end of file
</style>
......@@ -127,7 +127,7 @@
<selector v-model="form.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w-100" />
</el-form-item>
</template>
<!--特需-->
<template v-if="form.priceType==1">
......@@ -230,17 +230,9 @@ export default {
priceStepList: [{},{}], // 阶梯价格
// specialList:[], // 特殊需求,默认四个
rules: {
/* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }],
titleZh: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }], */
transportPrice: [{ required: true, message: this.$t("海运费不能为空"), trigger: "blur" }],
clearancePrice: [{ required: true, message: this.$t("清关费不能为空"), trigger: "blur" }],
advanceStatus: [{ required: true, message: this.$t("是否预付不能为空"), trigger: "blur" }],
//containerLocation: [{ required: true, message: "货柜位置不能为空", trigger: "blur" }],
//square: [{ required: true, message: "方数不能为空", trigger: "blur" }],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
// paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }],
// needBook: [{ required: true, message: "预约入仓不能为空", trigger: "blur" }],
advanceStatus: [{ required: true, message: this.$t("是否预付不能为空"), trigger: "blur" }]
},
product: null,
/* productType: null, */
......@@ -274,7 +266,7 @@ export default {
this.$set(this.form, 'square', this.product.square)
this.$set(this.form, 'dayLimit', this.product.dayLimit)
this.$set(this.form, 'containerLocation', this.product.containerLocation)
},
form(val) {
if (!val) return
......@@ -375,6 +367,9 @@ export default {
}
getProductPriceList(query).then(res => {
this.lineList = res.data
this.lineList.forEach(item =>{
this.checkList.push(item.id)
})
})
}
......@@ -382,7 +377,7 @@ export default {
if(!this.$route.query.product_id){
this.productDisabled = false
}
// 获取类型列表
getProductTypeList().then(res => this.productTypeList = res.data)
......@@ -516,4 +511,4 @@ export default {
.mr10{
margin-right: 10px;
}
</style>
\ No newline at end of file
</style>
......@@ -566,7 +566,7 @@ export default {
for(let index in transportTypes) {
let transportType = transportTypes[index];
let name = this.transportName(transportType);
names.push(name);
if(name)names.push(name);
}
return names.join(',');
}
......@@ -855,7 +855,7 @@ export default {
this.destName = row.titleZh;
}
this.getRouteList();
},
......
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