Commit 0859f444 authored by dragondean@qq.com's avatar dragondean@qq.com

修复优惠,报价单订单等bug

parent 2684caf5
This diff is collapsed.
...@@ -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)
......
...@@ -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 => {
......
...@@ -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('自有仓') }}
......
...@@ -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.forEach(item => { this.form.orderItemVOList = [];
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
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item) if(product.id != row.prodId){
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'
}); });
} }
......
...@@ -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 => {
......
This diff is collapsed.
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