Commit aad58337 authored by dcy's avatar dcy

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

parents 349a8df6 66183b78
...@@ -12,6 +12,7 @@ export const DICT_TYPE = { ...@@ -12,6 +12,7 @@ export const DICT_TYPE = {
AUDIT_STATUS: 'audit_status', AUDIT_STATUS: 'audit_status',
ADVANCE_STATUS: 'advance_status', ADVANCE_STATUS: 'advance_status',
BOX_SHIPMENT_STATUS: 'box_shipment_status', BOX_SHIPMENT_STATUS: 'box_shipment_status',
BOX_SEA_AIR_SHIPMENT_STATUS: 'shipment_sea_air_state',
// ========== SYSTEM 模块 ========== // ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX: 'system_user_sex', SYSTEM_USER_SEX: 'system_user_sex',
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
size="small" size="small"
> >
<el-option <el-option
v-for="dict in this.getDictDatas(DICT_TYPE.BOX_ORDER_SHIPMENT_STATE)" v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR_SHIPMENT_STATUS)"
:key="dict.value" :key="dict.value"
:label="$l(dict, 'label')" :label="$l(dict, 'label')"
:value="dict.value" :value="dict.value"
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" :disabled="readonly">
<el-form-item label="类型" prop="type" :rules='[{required: true, message: "请选择类型"}]'> <el-form-item :label="$t('类型')" prop="type" :rules='[{required: true, message: $t("请选择类型")}]'>
<dict-selector <dict-selector
:type="DICT_TYPE.ECW_COUPON_TYPE" :type="DICT_TYPE.ECW_COUPON_TYPE"
v-model.number="form.type" v-model.number="form.type"
placeholder="请选择类型" :placeholder="$t('请选择类型')"
:disabled="!!form.couponId" :disabled="!!form.couponId"
/> />
</el-form-item> </el-form-item>
<el-form-item label="标题中文" prop="titleZh" :rules='[{required: true, message: "不能为空"}]'> <el-form-item :label="$t('标题中文')" prop="titleZh" :rules='[{required: true, message: $t("不能为空")}]'>
<el-input <el-input
v-model="form.titleZh" v-model="form.titleZh"
placeholder="请输入标题-中文" :placeholder="$t('请输入中文标题')"
/> />
</el-form-item> </el-form-item>
<el-form-item label="标题英文" prop="titleEn" :rules='[{required: true, message: "不能为空"}]'> <el-form-item :label="$t('标题英文')" prop="titleEn" :rules='[{required: true, message: $t("不能为空")}]'>
<el-input <el-input
v-model="form.titleEn" v-model="form.titleEn"
placeholder="请输入标题-英文" :placeholder="$t('请输入英文标题')"
/> />
</el-form-item> </el-form-item>
<el-form-item label="有效期" prop="titleEn"> <el-form-item :label="$t('有效期')" prop="titleEn">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.startTime" v-model="form.startTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择开始时间" :placeholder="$t('选择开始时间')"
/> />
~ ~
<el-date-picker <el-date-picker
...@@ -35,27 +35,27 @@ ...@@ -35,27 +35,27 @@
v-model="form.endTime" v-model="form.endTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择结束时间" :placeholder="$t('选择结束时间')"
/> />
注意:留空则表示永久有效 {{$t('注意:留空则表示永久有效')}}
</el-form-item> </el-form-item>
<!--1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价--> <!--1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价-->
<el-form-item label="优惠券金额" v-if="form.type == 1"> <el-form-item :label="$t('优惠券金额')" v-if="form.type == 1">
<div class="fee-item"> <div class="fee-item">
<el-input v-model="form.reduceAmount" style="width:100px" /> <el-input v-model="form.reduceAmount" style="width:100px" />
<selector v-model="form.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="form.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span></span> <span>{{$t('')}}</span>
<el-input type="number" v-model="form.cashCondition" style="width:100px" /> <el-input type="number" v-model="form.cashCondition" style="width:100px" />
<span>使用</span> <span>{{$t('使用')}}</span>
<span style="color:red">注意:留空则表示不受满金额限制</span> <span style="color:red">{{$t('注意:留空则表示不受满金额限制')}}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="*运费" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1"> <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"> <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"> <template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}}
<el-input v-model="item.fullAmount" type="number" style="width:100px" /> <el-input v-model="item.fullAmount" type="number" style="width:100px" />
<!-- <el-select v-model="item.fullCurrencyId" 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-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
<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="[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="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="[2].indexOf(form.type) > -1">{{$t('')}}</span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span> <span v-if="[4].indexOf(form.type) > -1">{{$t('折扣率')}}</span>
<span v-if="[5].indexOf(form.type) > -1"></span> <span v-if="[5].indexOf(form.type) > -1">{{$t('')}}</span>
<el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" /> <el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" />
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
> <el-input v-model="item.startAmount" type="number" style="width:100px" /> > <el-input v-model="item.startAmount" type="number" style="width:100px" />
<el-input v-model="item.endAmount" type="number" style="width:100px" /> <el-input v-model="item.endAmount" type="number" style="width:100px" />
<selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
价格 {{$t('价格')}}
</template> </template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" /> <el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" />
...@@ -93,18 +93,18 @@ ...@@ -93,18 +93,18 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="清关费" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1"> <el-form-item :label="$t('清关费')" 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"> <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"> <template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}}
<el-input v-model="item.fullAmount" type="number" style="width:100px" /> <el-input v-model="item.fullAmount" type="number" 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="[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="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="[2].indexOf(form.type) > -1">{{$t('')}}</span>
<span v-if="[4].indexOf(form.type) > -1">折扣率</span> <span v-if="[4].indexOf(form.type) > -1">{{$t('折扣率')}}</span>
<span v-if="[5].indexOf(form.type) > -1"></span> <span v-if="[5].indexOf(form.type) > -1">{{$t('')}}</span>
<el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" /> <el-input v-if="[2,3,4].indexOf(form.type) > -1" type="number" v-model="item.reduceAmount" style="width:100px" />
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
> <el-input v-model="item.startAmount" type="number" style="width:100px" /> > <el-input v-model="item.startAmount" type="number" style="width:100px" />
<el-input v-model="item.endAmount" type="number" style="width:100px" /> <el-input v-model="item.endAmount" type="number" style="width:100px" />
<Selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <Selector v-model="item.startAndEndCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
价格 {{$t('价格')}}
</template> </template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" /> <el-input v-if="[5,6,7].indexOf(form.type) > -1" type="number" v-model="item.netReceiptsAmount" style="width:100px" />
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
</el-form-item> </el-form-item>
<el-form-item label="叠加优惠" prop="discountDetailed"> <el-form-item :label="$t('叠加优惠')" prop="discountDetailed">
<div class="coupon-list"> <div class="coupon-list">
<el-checkbox-group v-model="couponIds"> <el-checkbox-group v-model="couponIds">
<div class="coupon-item" v-for="item in availCouponList" :key="item.couponId"> <div class="coupon-item" v-for="item in availCouponList" :key="item.couponId">
...@@ -140,12 +140,12 @@ ...@@ -140,12 +140,12 @@
</div> </div>
</el-checkbox-group> </el-checkbox-group>
<div v-if="!availCouponList.length" style="padding:50px"> <div v-if="!availCouponList.length" style="padding:50px">
暂无可用优惠券 {{$t('暂无可用优惠券')}}
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="同类优惠不叠加" :label="$t('同类优惠不叠加')"
prop="isSimilarSuperposition" prop="isSimilarSuperposition"
v-if="form.type != 1" v-if="form.type != 1"
> >
...@@ -154,19 +154,19 @@ ...@@ -154,19 +154,19 @@
:type="DICT_TYPE.ECW_YESNO" :type="DICT_TYPE.ECW_YESNO"
v-model="form.isSimilarSuperposition" v-model="form.isSimilarSuperposition"
formatter="bool" formatter="bool"
placeholder="请选择类型" :placeholder="$t('请选择类型')"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="可叠加优惠劵列表" prop="couponIds" v-if="form.type != 1"> <!-- <el-form-item :label="$t('可叠加优惠劵列表')" prop="couponIds" v-if="form.type != 1">
<el-input <el-input
v-model="form.couponIds" v-model="form.couponIds"
placeholder="请输入可叠加优惠劵列表" :placeholder="$t('请输入可叠加优惠劵列表')"
/> />
</el-form-item> --> </el-form-item> -->
<el-form-item <el-form-item
label="适用用户" :label="$t('适用用户')"
prop="suitableUserType" prop="suitableUserType"
> >
<dict-selector v-if="form.type != 1" :type="DICT_TYPE.ECW_SUITABLE_USER_TYPE" v-model="form.suitableUserType" defaultable /> <dict-selector v-if="form.type != 1" :type="DICT_TYPE.ECW_SUITABLE_USER_TYPE" v-model="form.suitableUserType" defaultable />
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
<customer-contacts-selector v-if="showCustomerSelector" v-model="form.customerIds" style="margin-top:5px" /> <customer-contacts-selector v-if="showCustomerSelector" v-model="form.customerIds" style="margin-top:5px" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="适用线路类型" :label="$t('适用线路类型')"
prop="suitableLineType" prop="suitableLineType"
v-if="form.type != 1" v-if="form.type != 1"
> >
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<routers-selector v-if="showRouterSelector" v-model="form.lineIds" style="margin-top:5px" /> <routers-selector v-if="showRouterSelector" v-model="form.lineIds" style="margin-top:5px" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="适用商品" :label="$t('适用商品')"
prop="prodIds" prop="prodIds"
v-if="form.type != 1" v-if="form.type != 1"
> >
...@@ -190,50 +190,51 @@ ...@@ -190,50 +190,51 @@
<products-selector v-model="form.prodIds" /> <products-selector v-model="form.prodIds" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="订单属性" :label="$t('订单属性')"
prop="orderAttr" prop="orderAttr"
v-if="form.type != 1" v-if="form.type != 1"
> >
<dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_ORDER_ATTR" v-model="form.orderAttrArr" multiple /> <dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_ORDER_ATTR" v-model="form.orderAttrArr" multiple />
</el-form-item> </el-form-item>
<!-- <el-form-item label="是否发送站内信" prop="isSiteContent"> <!-- <el-form-item :label="$t('是否发送站内信')" prop="isSiteContent">
<dict-selector formatter="bool" form-type="radio" :type="DICT_TYPE.ECW_YESNO" v-model="form.isSiteContent" :formater="Boolean" /> <dict-selector formatter="bool" form-type="radio" :type="DICT_TYPE.ECW_YESNO" v-model="form.isSiteContent" :formater="Boolean" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="中文内容" prop="contentZh" :rules='[{required: true, message: "不能为空"}]'> <el-form-item :label="$t('中文内容')" prop="contentZh" :rules='[{required: true, message: $t("不能为空")}]'>
<editor v-model="form.contentZh" :min-height="192" /> <editor v-model="form.contentZh" :min-height="192" />
</el-form-item> </el-form-item>
<el-form-item label="英文内容" prop="contentEn" :rules='[{required: true, message: "不能为空"}]'> <el-form-item :label="$t('英文内容')" prop="contentEn" :rules='[{required: true, message: $t("不能为空")}]'>
<editor v-model="form.contentEn" :min-height="192" /> <editor v-model="form.contentEn" :min-height="192" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="品牌" :label="$t('品牌')"
prop="brand" prop="brand"
v-if="form.type != 1" v-if="form.type != 1"
> >
<dict-selector form-type="checkbox" :type="DICT_TYPE.BRAND_REG_TYPE" v-model="form.brandArr" multiple /> <dict-selector form-type="checkbox" :type="DICT_TYPE.BRAND_REG_TYPE" v-model="form.brandArr" multiple />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="是否控货" :label="$t('是否控货')"
prop="isCargoControl" prop="isCargoControl"
v-if="form.type != 1" v-if="form.type != 1"
> >
<dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_YESNO" v-model="form.isCargoControlArr" multiple /> <dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_YESNO" v-model="form.isCargoControlArr" multiple />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="单证报关" :label="$t('单证报关')"
prop="documentDeclaration" prop="documentDeclaration"
v-if="form.type != 1" v-if="form.type != 1"
> >
<dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.documentDeclarationArr" multiple /> <dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.documentDeclarationArr" multiple />
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(0)">保 存</el-button>
<el-button type="primary" @click="submitForm(1)">发 布</el-button>
<el-button @click="$router.back()">返 回</el-button>
<el-button type="default" @click="reset">重 置</el-button>
</el-form-item>
</el-form> </el-form>
<div class="pl-100">
<template v-if="!readonly">
<el-button type="primary" @click="submitForm(0)">{{$t('保存')}}</el-button>
<el-button type="primary" @click="submitForm(1)">{{$t('发布')}}</el-button>
<el-button type="default" @click="reset">{{$t('重置')}}</el-button>
</template>
<el-button @click="$router.back()">{{$t('返回')}}</el-button>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -261,16 +262,17 @@ export default { ...@@ -261,16 +262,17 @@ export default {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
readonly: false,
// 表单参数 // 表单参数
form: { form: {
status: 1, status: 1,
}, },
// 表单校验 // 表单校验
rules: { rules: {
isCargoControl: [{required: true, message: '请选择是否控货'}], isCargoControl: [{required: true, message: this.$t('请选择是否控货')}],
brand: [{required: true, message: '请选择品牌'}], brand: [{required: true, message: this.$t('请选择品牌')}],
orderAttr: [{required: true, message: '请选择订单属性'}], orderAttr: [{required: true, message: this.$t('请选择订单属性')}],
documentDeclaration: [{required: true, message: '请选择单证报关'}] documentDeclaration: [{required: true, message: this.$t('请选择单证报关')}]
}, },
currencyList:[], currencyList:[],
/* clearanceFeeList:[{},{}], /* clearanceFeeList:[{},{}],
...@@ -280,9 +282,9 @@ export default { ...@@ -280,9 +282,9 @@ export default {
couponList: [], // 优惠券列表 couponList: [], // 优惠券列表
couponIds:[], couponIds:[],
fee:{ fee:{
1: [{type:1},{type:1}], // 运费 1: [],
2: [{type:2},{type:2}], // 清关费 2: [],
3: [{}] // 优惠券专用 3: []
} }
}; };
}, },
...@@ -383,6 +385,9 @@ export default { ...@@ -383,6 +385,9 @@ export default {
} }
}, },
created() { created() {
if(this.$route.query.readonly == 1){
this.readonly = true
}
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
if (this.$route.query.id) { if (this.$route.query.id) {
getCoupon(this.$route.query.id).then((res) => { getCoupon(this.$route.query.id).then((res) => {
...@@ -397,12 +402,15 @@ export default { ...@@ -397,12 +402,15 @@ export default {
if(this.form.discountDetailedVOs){ if(this.form.discountDetailedVOs){
/* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */ /* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */
this.fee[this.form.costType] = this.form.discountDetailedVOs // this.fee[this.form.costType] = this.form.discountDetailedVOs.filter(item => item.type == this.form.costType)
} }
if(this.costType != this.form.costType){ this.form.discountDetailedVOs.forEach(item => {
this.fee[item.type].push(item)
})
/* if(this.costType != this.form.costType){
console.error(`费用类型冲突,计算出来的类型为${this.costType},接口费用类型为${res.data.costType},类型为${res.data.type}`) console.error(`费用类型冲突,计算出来的类型为${this.costType},接口费用类型为${res.data.costType},类型为${res.data.type}`)
this.$alert('费用类型冲突') this.$alert(this.$t('费用类型冲突'))
} } */
// 非优惠券需要查询出优惠券作为叠加备选 // 非优惠券需要查询出优惠券作为叠加备选
if(this.form.type != 1){ if(this.form.type != 1){
this.getCouponSelect() this.getCouponSelect()
...@@ -412,8 +420,15 @@ export default { ...@@ -412,8 +420,15 @@ export default {
if(this.$route.query.action == 'copy'){ if(this.$route.query.action == 'copy'){
this.form.couponId = null this.form.couponId = null
} }
})
}
// 不是编辑查看则给默认的费用表格
else{
this.fee = {
1: [{type:1},{type:1}], // 运费
2: [{type:2},{type:2}], // 清关费
3: [{}] // 优惠券专用
} }
);
} }
this.reset() this.reset()
}, },
...@@ -469,7 +484,7 @@ export default { ...@@ -469,7 +484,7 @@ export default {
return; return;
} }
if(!this.costType){ if(!this.costType){
return this.$message('暂无费用设置') return this.$message(this.$t('暂无费用设置'))
} }
// 非有优惠券需要把运费和清关费一起提交 // 非有优惠券需要把运费和清关费一起提交
let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]).filter(item => item.netReceiptsAmount || item.fullAmount) let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]).filter(item => item.netReceiptsAmount || item.fullAmount)
...@@ -494,14 +509,14 @@ export default { ...@@ -494,14 +509,14 @@ export default {
// 修改的提交 // 修改的提交
if (data.couponId != null) { if (data.couponId != null) {
updateCoupon(data).then((response) => { updateCoupon(data).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t("修改成功"));
this.$redirect("index"); this.$redirect("index");
}); });
return; return;
} }
// 添加的提交 // 添加的提交
createCoupon(data).then((response) => { createCoupon(data).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess(this.$t("新增成功"));
this.$redirect("index"); this.$redirect("index");
}); });
}); });
......
...@@ -161,6 +161,8 @@ ...@@ -161,6 +161,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row, true)"
v-hasPermi="['ecw:coupon:update']">查看</el-button>
<el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:coupon:update']">编辑</el-button> v-hasPermi="['ecw:coupon:update']">编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)"
...@@ -277,9 +279,13 @@ export default { ...@@ -277,9 +279,13 @@ export default {
return this.$router.push('edit') return this.$router.push('edit')
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row, readonly) {
const couponId = row.couponId; const couponId = row.couponId;
return this.$router.push('edit?id=' + couponId) let url = 'edit?id=' + couponId
if(readonly){
url += '&readonly=1'
}
return this.$router.push(url)
}, },
handleCopy(row){ handleCopy(row){
this.$router.push('edit?action=copy&id=' + row.couponId) this.$router.push('edit?action=copy&id=' + row.couponId)
......
...@@ -106,11 +106,15 @@ ...@@ -106,11 +106,15 @@
</el-select> --> </el-select> -->
<dict-selector :type="DICT_TYPE.TARGET_TYPE" v-model="form.targetType" :placeholder="$t('请选择目标类型')" /> <dict-selector :type="DICT_TYPE.TARGET_TYPE" v-model="form.targetType" :placeholder="$t('请选择目标类型')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('计算周期')" prop="targetPeriodName"> <div class="flex">
<el-select v-model="form.targetPeriodName" :placeholder="$t('请选择计算周期')" @change="setTime"> <el-form-item :label="$t('计算周期')" prop="startTime">
<el-option v-for="item in targetPeriod" :label="item.name" :value="item.name" :key="item.name"></el-option> <el-date-picker v-model="form.startTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss" class="w-150"></el-date-picker>
</el-select> </el-form-item>
<div class="ml-10 mr-10 flex flex-center" style="margin-bottom:22px">-</div>
<el-form-item prop="endTime" label-width="0">
<el-date-picker v-model="form.endTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss" class="w-150"></el-date-picker>
</el-form-item> </el-form-item>
</div>
<el-form-item :label="$t('运输方式')" prop="transportType"> <el-form-item :label="$t('运输方式')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportType" formatter="number" @change="showChannel"/> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportType" formatter="number" @change="showChannel"/>
</el-form-item> </el-form-item>
...@@ -147,6 +151,7 @@ ...@@ -147,6 +151,7 @@
import {listSimpleDepts} from "@/api/system/dept"; import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel'; import {getChannelList} from '@/api/ecw/channel';
import dayjs from "dayjs"; import dayjs from "dayjs";
import { parseTime } from '@/utils/ruoyi';
export default { export default {
name: "DeptTarget", name: "DeptTarget",
...@@ -213,6 +218,8 @@ ...@@ -213,6 +218,8 @@
targetPeriodName: [{required: true, message: this.$t("计算周期不能为空"), trigger: "change"}], targetPeriodName: [{required: true, message: this.$t("计算周期不能为空"), trigger: "change"}],
transportType: [{required: true, message: this.$t("运输方式不能为空"), trigger: "change"}], transportType: [{required: true, message: this.$t("运输方式不能为空"), trigger: "change"}],
cubeNum: [{required: true, message: this.$t("立方数不能为空"), trigger: "blur"}], cubeNum: [{required: true, message: this.$t("立方数不能为空"), trigger: "blur"}],
startTime: [{required: true, message: this.$t("起始时间不能为空"), trigger: "change"}],
endTime: [{required: true, message: this.$t("截止时间不能为空"), trigger: "change"}],
} }
}; };
}, },
...@@ -372,6 +379,10 @@ ...@@ -372,6 +379,10 @@
} else { } else {
this.targetPeriod = this.yearList; this.targetPeriod = this.yearList;
} }
this.form.startTime = parseTime(this.form.startTime)
this.form.endTime = parseTime(this.form.endTime)
this.open = true; this.open = true;
this.title = this.$t("修改部门业绩目标设置"); this.title = this.$t("修改部门业绩目标设置");
}); });
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</tr> </tr>
<tr v-for="(item, index) in list" :key="index"> <tr v-for="(item, index) in list" :key="index">
<td>{{ index + 1 }}</td> <td>{{ index + 1 }}</td>
<td>{{ item.receiptNo||''}}</td> <td>{{ orderData.tidanNo||''}}</td>
<td>{{ item.orderNo }}</td> <td>{{ item.orderNo }}</td>
<td>{{ item.titleZh }}</td> <td>{{ item.titleZh }}</td>
<td><dict-tag :value="item.feeType" :type="DICT_TYPE.FEE_TYPE"></dict-tag></td> <td><dict-tag :value="item.feeType" :type="DICT_TYPE.FEE_TYPE"></dict-tag></td>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<td>{{ item.discountTotal||0 }}</td> <td>{{ item.discountTotal||0 }}</td>
</tr> </tr>
<tr v-for="(items, indexs) in receiptAccountList" :key="indexs"> <tr v-for="(items, indexs) in receiptAccountList" :key="indexs">
<td><dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="items.collectionCurrencyId" />应收合计</td> <td><dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="items.currencyId" />应收合计</td>
<td ><span v-if="items.discountTotal>0">{{ `${items.receivableAmount - items.discountTotal }(${items.receivableAmount} - ${items.discountTotal})` }}</span> <td ><span v-if="items.discountTotal>0">{{ `${items.receivableAmount - items.discountTotal }(${items.receivableAmount} - ${items.discountTotal})` }}</span>
<span v-else>{{ `${items.receivableAmount - items.discountTotal }` }}</span> <span v-else>{{ `${items.receivableAmount - items.discountTotal }` }}</span>
</td> </td>
...@@ -57,14 +57,14 @@ ...@@ -57,14 +57,14 @@
<div style="text-align: center;border-left:1px solid #666;border-right: 1px solid #666;height: 36px;line-height: 36px;"> <div style="text-align: center;border-left:1px solid #666;border-right: 1px solid #666;height: 36px;line-height: 36px;">
银行信息 银行信息
</div> </div>
<div style="display: flex;align-items: center;border-top: 1px solid #666;border-left:1px solid #666;border-right: 1px solid #666;" v-for="(bankTiem,index) in receiptAccountList" :key="index"> <div style="display: flex;align-items: center;border-top: 1px solid #666;border-left:1px solid #666;border-right: 1px solid #666;" v-for="(bankTiem,index) in detailed" :key="index">
<div style="padding:6px 0;width: 12.5%;text-align: center;border-right: 1px solid #666;" > <div style="padding:6px 0;width: 12.5%;text-align: center;border-right: 1px solid #666;" >
<p style="margin: 0;word-break: break-all;">户名:{{bankTiem.platformAccountName}}</p> <p style="margin: 0;word-break: break-all;">户名:{{bankTiem.accountName}}</p>
<p style="margin: 0;word-break: break-all;">银行名称:{{bankTiem.platformAccountBlankName}}</p> <p style="margin: 0;word-break: break-all;">银行名称:{{bankTiem.accountBankName||''}}</p>
<p style="margin: 0;word-break: break-all;">A/C NO{{bankTiem.platformAccountNo}}</p> <p style="margin: 0;word-break: break-all;">A/C NO{{bankTiem.accountNo}}</p>
</div> </div>
<div style="padding:6px 0;width: 87.5%;text-align: center;"> <div style="padding:6px 0;width: 87.5%;text-align: center;">
<p style="margin: 0;">应收<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="bankTiem.currencyId" />{{bankTiem.receivableAmount}}¥</p> <p style="margin: 0;">实收<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="bankTiem.currencyId" />{{bankTiem.writeOffAmount}}¥</p>
<!-- <p style="margin: 0;">未收:¥{{bankTiem.noReceipt}}</p> --> <!-- <p style="margin: 0;">未收:¥{{bankTiem.noReceipt}}</p> -->
</div> </div>
</div> </div>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
loadings: false, loadings: false,
form:{}, form:{},
title:'收款单', title:'收款单',
creatorData:[], // creatorData:[],
list:[], list:[],
fileList:[], fileList:[],
bankData:[], bankData:[],
...@@ -119,14 +119,14 @@ ...@@ -119,14 +119,14 @@
deptData:[], deptData:[],
deptArr:[], deptArr:[],
id:0, id:0,
orderData:[], orderData:{},
detailed:[] detailed:[]
} }
}, },
async created() { async created() {
let that = this let that = this
listSimpleUsers().then(res =>that.creatorData = res.data) // listSimpleUsers().then(res =>that.creatorData = res.data)
getBankAccountPage(that.params).then(res =>that.bankData = res.data.list) // getBankAccountPage(that.params).then(res =>that.bankData = res.data.list)
await listSimpleDepts().then(res =>{ await listSimpleDepts().then(res =>{
res.data.forEach((item)=>{ res.data.forEach((item)=>{
if(item.parentId==0){ if(item.parentId==0){
...@@ -205,14 +205,7 @@ ...@@ -205,14 +205,7 @@
methods: { methods: {
getList() { getList() {
getReceivableItem({ id: this.id }).then(res => { getReceivableItem({ id: this.id }).then(res => {
this.detailed = res.data.map(v => ({ this.detailed = res.data
...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
}))
this.calculation()
}) })
}, },
getCollectionData(){ getCollectionData(){
...@@ -222,6 +215,16 @@ ...@@ -222,6 +215,16 @@
that.form.departmentName = that.deptData.find(v => v.id == that.form.departmentId).name that.form.departmentName = that.deptData.find(v => v.id == that.form.departmentId).name
}) })
}, },
getRecep(id){
var total = 0
if(id){
var data = this.detailed.filter(item=>item.currencyId==id)
data.forEach(item => {
total = NP.plus(total, item.writeOffAmount)
})
}
return total
},
handleAddReceiptItem() { handleAddReceiptItem() {
let recepted = [] let recepted = []
this.detailed.forEach(item => { this.detailed.forEach(item => {
...@@ -351,7 +354,7 @@ ...@@ -351,7 +354,7 @@
} }
} }
if(chineseStr == ''){ if(chineseStr == ''){
chineseStr += cnNums[0] + cnIntLast + cnInteger; chineseStr = cnNums[0] + cnIntLast + cnInteger
}else if(decimalNum == ''){ }else if(decimalNum == ''){
chineseStr += cnInteger; chineseStr += cnInteger;
} }
......
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('收款账户')" prop="accountNo" :rules="{ required: true, trigger: ['blur', 'change'], message: $t('收款账户不能为空') }"> <el-form-item :label="$t('收款账户')" prop="accountNo" :rules="{ required: true, trigger: ['blur', 'change'], message: $t('收款账户不能为空') }">
<el-select v-if="!isView" v-model="addForm.accountNo" :placeholder="$t('请选择收款账户')" style="width: 220px" @change="accountChange"> <el-select v-if="!isView" v-model="addForm.accountId" :placeholder="$t('请选择收款账户')" style="width: 220px" @change="accountChange">
<el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id" /> <el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id" />
</el-select> </el-select>
<span v-else>{{ addForm.accountNo }}</span> <span v-else>{{ addForm.accountNo }}</span>
...@@ -647,6 +647,8 @@ export default { ...@@ -647,6 +647,8 @@ export default {
accountChange(val){ accountChange(val){
var data = this.bankData.find(item=>item.id==val) var data = this.bankData.find(item=>item.id==val)
this.$set(this.addForm,'accountName',data.baAccountName) this.$set(this.addForm,'accountName',data.baAccountName)
this.$set(this.addForm,'accountNo',data.baAccountNum)
this.$set(this.addForm,'accountBankName',data.baBankName)
}, },
RMBtoUS() { RMBtoUS() {
return NP.divide(100, this.currencyList.find(v => v.titleEn === 'USD').huilv) return NP.divide(100, this.currencyList.find(v => v.titleEn === 'USD').huilv)
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
{{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }} {{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('佣金类型')" prop="commissionType"> <el-form-item :label="$t('佣金类型')" prop="commissionType">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" /> <dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" formatter="number" />
</el-form-item> </el-form-item>
<!-- 明佣或者明佣+暗佣才显示 --> <!-- 明佣或者明佣+暗佣才显示 -->
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<div v-if="form.applyStatus != 1"> <div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button> <el-button type="primary" @click="handleSubmit" :disabled="!submitable">提交</el-button>
</div> </div>
<div v-else> <div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
...@@ -133,6 +133,20 @@ export default { ...@@ -133,6 +133,20 @@ export default {
} }
}, },
computed: { computed: {
// 是否可以提交
submitable(){
let submitable = false;
[
['orgLightCommissionAmount', 'lightCommissionAmount'],
['orgShadeCommissionAmount', 'shadeCommissionAmount'],
['commissionType', 'orgCommissionType']
].forEach(item => {
if(this.form[item[0]] != this.form[item[1]]){
submitable = true
}
})
return submitable
},
// 根据渠道id显示渠道名 // 根据渠道id显示渠道名
getChannelNameById(){ getChannelNameById(){
return channelId => { return channelId => {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<div class="page-title">审批流程</div> <div class="page-title">审批流程</div>
<work-flow xmlkey="sheet_sale" v-model="ccIdArr" /> <work-flow xmlkey="sheet_sale" v-model="ccIdArr" />
<div v-if="form.applyStatus != 1"> <div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button> <el-button type="primary" @click="handleSubmit" :disabled="!submitable">提交</el-button>
</div> </div>
<div v-else> <div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
...@@ -107,6 +107,7 @@ export default { ...@@ -107,6 +107,7 @@ export default {
form: { form: {
type: 1 type: 1
}, },
orignal: {}, // 原始数据,用来判断是否做了修改
rules:{ rules:{
seaFreight : {required: true, message: '运费不能为空'}, seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'} clearanceFreight: {required: true, message: '清关费不能为空'}
...@@ -130,6 +131,7 @@ export default { ...@@ -130,6 +131,7 @@ export default {
getOfferSpecial(){ getOfferSpecial(){
getOfferSpecial(this.offerProdId, {type: 1}).then(r => { getOfferSpecial(this.offerProdId, {type: 1}).then(r => {
this.form = r.data this.form = r.data
this.orignal = r.data
}) })
}, },
getProductTypeNameById(id){ getProductTypeNameById(id){
...@@ -140,6 +142,19 @@ export default { ...@@ -140,6 +142,19 @@ export default {
} }
}, },
computed: { computed: {
// 是否可以提交
submitable(){
let submitable = false;
[
['orgClearanceFreight', 'clearanceFreight'],
['orgSeaFreight', 'seaFreight']
].forEach(item => {
if(this.form[item[0]] != this.form[item[1]]){
submitable = true
}
})
return submitable
},
// 根据渠道id显示渠道名 // 根据渠道id显示渠道名
getChannelNameById(){ getChannelNameById(){
return channelId => { return channelId => {
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</div> </div>
<el-table :data="[formData]" border class="release-table"> <el-table :data="[formData]" border class="release-table">
<el-table-column :label="$t('控货箱数')"> <el-table-column :label="$t('控货箱数')">
{{detail.sumNum}} {{detail.sumNum - detail.releaseNum }}
</el-table-column> </el-table-column>
<el-table-column :label="$t('放货箱数')"> <el-table-column :label="$t('放货箱数')">
<template slot-scope="{row}"> <template slot-scope="{row}">
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('代收货款')"> <el-descriptions-item :label="$t('代收货款')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCollection" /> <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCollection" />
<template v-if="order.isCollection == 1">({{order.collectionProxy}}{{currencyMap[order.collectionProxyCurrency]}})</template>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('集运仓库')"> <el-descriptions-item :label="$t('集运仓库')">
{{order.isExternalWarehouse ? $t('外部仓') : $t('自有仓') }} {{order.isExternalWarehouse ? $t('外部仓') : $t('自有仓') }}
...@@ -200,10 +201,14 @@ ...@@ -200,10 +201,14 @@
{{objective.titleZh || '-'}} {{objective.titleZh || '-'}}
</el-table-column> </el-table-column>
<el-table-column :label="$t('品名')" prop="titleZh"></el-table-column> <el-table-column :label="$t('品名')" prop="titleZh"></el-table-column>
<el-table-column :label="$t('箱数')" prop="num"></el-table-column> <el-table-column :label="$t('箱数')" prop="num">
<template slot-scope="{row}">
{{row.num || '-'}}
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')"> <el-table-column :label="$t('体积/重量')">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.volume}} / {{row.weight}} {{row.volume || '-'}} / {{row.weight || '-'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收款类型')"> <el-table-column :label="$t('收款类型')">
......
...@@ -733,8 +733,11 @@ export default { ...@@ -733,8 +733,11 @@ export default {
if(!router) return if(!router) return
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
this.calculationPrice()
}, },
'form.packageTypeArr'(val){ 'form.packageTypeArr'(val){
console.log('packageType', val, val.length)
this.$set(this.form, 'packageType', val ? val.join(',') : '') this.$set(this.form, 'packageType', val ? val.join(',') : '')
}, },
'form.isExternalWarehouse'(isExternalWarehouse){ 'form.isExternalWarehouse'(isExternalWarehouse){
...@@ -787,12 +790,12 @@ export default { ...@@ -787,12 +790,12 @@ export default {
methods: { methods: {
getOrder(){ getOrder(){
getUpdateInfo(this.$route.query.id).then(res => { getUpdateInfo(this.$route.query.id).then(res => {
this.form = res.data this.form = {...res.data}
this.form.orderItemVOList = [];
this.form.orderItemVOList.forEach(item => {
item.prodAttrArr = item.prodAttrIds.split(',').filter(item => item != '')
})
this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : [] this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : []
this.form.packageTypeArr = this.form.packageType ? this.form.packageType.split(',').filter(item => item != '') : []
this.$set(this.form, 'consignorCompany', res.data.consignorVO.company) this.$set(this.form, 'consignorCompany', res.data.consignorVO.company)
this.$set(this.form, 'consignorContactsId', res.data.consignorVO.customerContactsId) this.$set(this.form, 'consignorContactsId', res.data.consignorVO.customerContactsId)
this.$set(this.form, 'consignorCountryCode', res.data.consignorVO.countryCode.replace('+', '')) this.$set(this.form, 'consignorCountryCode', res.data.consignorVO.countryCode.replace('+', ''))
...@@ -818,7 +821,12 @@ export default { ...@@ -818,7 +821,12 @@ export default {
} }
// 如果已完成入仓,则需要监听必填内容,发生更改后需要填写审批表单 // 如果已完成入仓,则需要监听必填内容,发生更改后需要填写审批表单
this.$nextTick(res => { this.$nextTick(() => {
res.data.orderItemVOList.forEach(item => {
item.prodAttrArr = item.prodAttrIds.split(',').filter(item => item != '').map(attrId => +attrId)
this.form.orderItemVOList.push({...item})
})
if(this.inWarehouse){ if(this.inWarehouse){
Object.keys(this.rules).forEach(field => { Object.keys(this.rules).forEach(field => {
console.log("watch", field) console.log("watch", field)
...@@ -908,7 +916,9 @@ export default { ...@@ -908,7 +916,9 @@ export default {
onProductChange(row, product){ onProductChange(row, product){
console.log(product) console.log(product)
// row.goodsType = product ? product.typeId : null // row.goodsType = product ? product.typeId : null
if(product.id != row.prodId){
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item) row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
}
row.prodTitleEn = product.titleEn row.prodTitleEn = product.titleEn
row.prodTitleZh = product.titleZh row.prodTitleZh = product.titleZh
this.calculationPrice() this.calculationPrice()
...@@ -972,8 +982,8 @@ export default { ...@@ -972,8 +982,8 @@ export default {
if(this.form.harvestMethod == 2){ if(this.form.harvestMethod == 2){
if(!this.form.country || !this.form.province || !this.form.city){ if(!this.form.country || !this.form.province || !this.form.city){
return this.$notify({ return this.$notify({
title: '提示', title: this.$t('提示'),
message: "收货地区填写不完整", message: this.$t("收货地区填写不完整"),
type: 'warning' type: 'warning'
}); });
} }
......
...@@ -79,8 +79,9 @@ ...@@ -79,8 +79,9 @@
<el-row :span="12"> <el-row :span="12">
<el-form-item :label="$t('异常描述')+':'"> <el-form-item :label="$t('异常描述')+':'">
<dict-tag :type="DICT_TYPE.ORDER_ERROR_TYPE" :value="orderExceptionData.orderExceptionType" /> <!-- <dict-tag :type="DICT_TYPE.ORDER_ERROR_TYPE" :value="orderExceptionData.orderExceptionType" /> -->
<!-- {{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}} --> <!-- {{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}} -->
{{$l(orderExceptionData.orderExceptionDescVO, 'desc')}}
</el-form-item> </el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button> <el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row> </el-row>
...@@ -232,7 +233,7 @@ ...@@ -232,7 +233,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'"> <el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'">
<el-form-item :label="$t('报关资料')+':'" size="medium"> <el-form-item :label="$t('报关资料')+':'" size="medium" :require="true">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.file" ></file-upload> <file-upload v-model="handlerParams.fileList" :value="orderExceptionData.file" ></file-upload>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -470,6 +471,12 @@ ...@@ -470,6 +471,12 @@
this.$modal.msgError(this.$t('请选择处理结果')); this.$modal.msgError(this.$t('请选择处理结果'));
return return
} }
if(this.orderExceptionData.orderExceptionType=='order_doc_exception'){
if(!this.handlerParams.fileList||this.handlerParams.fileList.length==0){
this.$modal.msgError(this.$t('请上传报关资料'));
return
}
}
handlerExceptionByExceptionId(this.handlerParams).then(res=>{ handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功')); this.$modal.msgSuccess(this.$t('提交成功'));
this.$redirect('/order/pending?id=' + this.orderData.orderId) this.$redirect('/order/pending?id=' + this.orderData.orderId)
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<div class="page-title">审批流程</div> <div class="page-title">审批流程</div>
<work-flow xmlkey="commission_config" v-model="ccIdArr" /> <work-flow xmlkey="commission_config" v-model="ccIdArr" />
<div v-if="form.applyStatus != 1"> <div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button> <el-button type="primary" @click="handleSubmit" :disabled="!submitable">提交</el-button>
</div> </div>
<div v-else> <div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
...@@ -199,6 +199,20 @@ export default { ...@@ -199,6 +199,20 @@ export default {
} }
}, },
computed: { computed: {
// 是否可以提交
submitable(){
let submitable = false;
[
['orgLightCommissionAmount', 'lightCommissionAmount'],
['orgShadeCommissionAmount', 'shadeCommissionAmount'],
['commissionType', 'orgCommissionType']
].forEach(item => {
if(this.form[item[0]] != this.form[item[1]]){
submitable = true
}
})
return submitable
},
// 根据渠道id显示渠道名 // 根据渠道id显示渠道名
getChannelNameById(){ getChannelNameById(){
return channelId => { return channelId => {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div class="page-title">审批流程</div> <div class="page-title">审批流程</div>
<work-flow xmlkey="special_apply" v-model="ccIdArr" /> <work-flow xmlkey="special_apply" v-model="ccIdArr" />
<div v-if="form.applyStatus != 1"> <div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">提交</el-button> <el-button type="primary" @click="handleSubmit" :disabled="!submitable">提交</el-button>
</div> </div>
<div v-else> <div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
...@@ -148,6 +148,19 @@ export default { ...@@ -148,6 +148,19 @@ export default {
} }
}, },
computed: { computed: {
// 是否可以提交
submitable(){
let submitable = false;
[
['orgClearanceFreight', 'clearanceFreight'],
['orgFreight', 'freight']
].forEach(item => {
if(this.form[item[0]] != this.form[item[1]]){
submitable = true
}
})
return submitable
},
// 根据渠道id显示渠道名 // 根据渠道id显示渠道名
getChannelNameById(){ getChannelNameById(){
return channelId => { return channelId => {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </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" />
</el-form-item> </el-form-item>
<!--阶梯订单--> <!--阶梯订单-->
<template v-if="form.stepPrice==1" > <template v-if="form.stepPrice==1" >
...@@ -38,60 +38,60 @@ ...@@ -38,60 +38,60 @@
- -
<el-input v-model="item.endNum" type="number" placeholder="" class="w100"></el-input> <el-input v-model="item.endNum" type="number" placeholder="" class="w100"></el-input>
/ /
<selector v-model="form.weightUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> <selector v-model="form.weightUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认运费')" v-if="form.priceType != 1"> <el-form-item :label="$t('默认运费')" v-if="form.priceType != 1">
<inputor default="0" v-model.number="item.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" /> <inputor default2="0" v-model.number="item.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" />
<selector v-model="item.transportPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> <selector v-model="item.transportPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> / <selector v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认清关费')" v-if="form.priceType != 1"> <el-form-item :label="$t('默认清关费')" v-if="form.priceType != 1">
<inputor default="0" v-model.number="item.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" /> <inputor default2="0" v-model.number="item.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" />
<selector v-model="item.clearancePriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> <selector v-model="item.clearancePriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> / <selector v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认全包价')" v-if="form.priceType == 1"> <el-form-item :label="$t('默认全包价')" v-if="form.priceType == 1">
<inputor default="0" v-model.number="item.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" /> <inputor default2="0" v-model.number="item.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" />
<selector v-model="item.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> <selector v-model="item.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="item.allVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> / <selector v-model="item.allVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<el-form-item :label="$t('默认全包价')" v-if="form.priceType == 1"> <el-form-item :label="$t('默认全包价')" v-if="form.priceType == 1">
<inputor default="0" v-model.number="form.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" /> <inputor default2="0" v-model.number="form.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w100 mr10" />
<selector v-model="form.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> <selector v-model="form.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="form.allVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w100" /> / <selector v-model="form.allVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
</el-form-item> </el-form-item>
<template v-else> <template v-else>
<el-form-item :label="$t('默认运费')" prop="transportPrice"> <el-form-item :label="$t('默认运费')" prop="transportPrice">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="form.transportPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> <selector v-model="form.transportPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="form.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor default2="0" v-model.number="form.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="form.transportVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> / <selector v-model="form.transportVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认清关费')" prop="clearancePrice"> <el-form-item :label="$t('默认清关费')" prop="clearancePrice">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="form.clearancePriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> <selector v-model="form.clearancePriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="form.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor default2="0" v-model.number="form.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ /
<selector v-model="form.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> <selector v-model="form.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -106,15 +106,15 @@ ...@@ -106,15 +106,15 @@
:key="specialIndex + 'transport'"> :key="specialIndex + 'transport'">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="special.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> <selector v-model="special.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="special.allPrice" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor default2="0" v-model.number="special.allPrice" type="number" :placeholder="$t('整数或者两位小数')" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="special.allVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> / <selector v-model="special.allVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -125,15 +125,15 @@ ...@@ -125,15 +125,15 @@
:key="specialIndex + 'transport'"> :key="specialIndex + 'transport'">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="special.transportPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> <selector v-model="special.transportPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="special.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor default2="0" v-model.number="special.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="special.transportVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> / <selector v-model="special.transportVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -142,15 +142,15 @@ ...@@ -142,15 +142,15 @@
:key="specialIndex + 'clearance'"> :key="specialIndex + 'clearance'">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="special.clearancePriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> <selector v-model="special.clearancePriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="special.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor default2="0" v-model.number="special.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable class="w-100" /> / <selector v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100" />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
checkList: [], checkList: [],
selectedRoutes: [], // 勾选的路线渠道 selectedRoutes: [], // 勾选的路线渠道
form: { form: {
stepPrice: 0, // stepPrice: 0,
// advanceStatus: 0, // advanceStatus: 0,
// needBook: 0, // needBook: 0,
// dayLimit: 10000 // dayLimit: 10000
...@@ -229,8 +229,8 @@ export default { ...@@ -229,8 +229,8 @@ export default {
/* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }], /* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }],
titleZh: [{ required: true, message: "产品名称不能为空", trigger: "blur" }], titleZh: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
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" }],
...@@ -333,11 +333,11 @@ export default { ...@@ -333,11 +333,11 @@ export default {
} }
*/ */
// 默认今天起,两年有效 // 默认今天起,两年有效
this.form.validateStartDate = parseTime(Date.now()) /* this.form.validateStartDate = parseTime(Date.now())
this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000) this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000) */
// 默认费用单位 // 默认费用单位
this.setDefaultVolumeUnit(7) //this.setDefaultVolumeUnit(7)
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
......
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