Commit 51239613 authored by dragondean@qq.com's avatar dragondean@qq.com

Merge branch 'release' into dev

# Conflicts:
#	src/components/RoutersSelector/index.vue
#	src/views/ecw/box/indexAir.vue
#	src/views/ecw/order/batchSingleApplication.vue
#	src/views/ecw/order/splitApply/index.vue
#	src/views/ecw/productPrice/batchEdit.vue
#	src/views/ecw/productPrice/edit.vue
parents c5a4f36f 5c7091af
...@@ -95,6 +95,8 @@ export default { ...@@ -95,6 +95,8 @@ export default {
this.$emit('input', val) this.$emit('input', val)
}, },
isAllProduct(isAllProduct){ isAllProduct(isAllProduct){
console.log('isAllProduct', isAllProduct)
this.choosedList = []
this.$emit('setall', isAllProduct) this.$emit('setall', isAllProduct)
}, },
defaultIds(newValue, oldValue){ defaultIds(newValue, oldValue){
......
...@@ -22,11 +22,12 @@ ...@@ -22,11 +22,12 @@
</template> </template>
</div> </div>
<div class="mb-10"> <div class="mb-10 flex-row">
<el-radio-group v-model="checkAll"> <el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio> <el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio> <el-radio :label="false">{{$t('全不选')}}</el-radio>
</el-radio-group> </el-radio-group>
<el-link class="ml-20" type="danger">{{$t('已选择{n}条路线', {n: selectedRoutes.length})}}</el-link>
</div> </div>
<el-row class="" :gutter="10"> <el-row class="" :gutter="10">
<template v-for="(item, index) in filteredRouterList"> <template v-for="(item, index) in filteredRouterList">
...@@ -104,6 +105,8 @@ export default { ...@@ -104,6 +105,8 @@ export default {
checkAll: null, checkAll: null,
groupChecker: {}, // 分组全选状态 groupChecker: {}, // 分组全选状态
attrList:[], // 商品特性 attrList:[], // 商品特性
inited: false
} }
}, },
computed:{ computed:{
...@@ -222,32 +225,30 @@ export default { ...@@ -222,32 +225,30 @@ export default {
if(option){ if(option){
this.changeOption() this.changeOption()
} }
},
} // 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){
if(this.inited)this.selectedRoutes = []
}
}, },
created(){ async created(){
getChannelList().then(res => { this.channelList = (await getChannelList()).data
this.channelList = res.data this.tradeCityList = (await getTradeCityList()).data
}) // 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
getTradeCityList().then(res => { await this.getOpenedRouterList()
this.tradeCityList = res.data if(this.option){
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线 this.changeOption()
this.getOpenedRouterList() }
})
if(this.value && this.value.length){ await this.$nextTick()
this.selectedRoutes = this.value if(this.value && this.value.length){
} this.selectedRoutes = this.value
}
if(this.option){
this.changeOption()
}
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
}, },
methods:{ methods:{
getAttrList(){ getAttrList(){
...@@ -270,7 +271,7 @@ export default { ...@@ -270,7 +271,7 @@ export default {
this.toggleChecker(router, selected) this.toggleChecker(router, selected)
}) })
}, },
getOpenedRouterList(){ async getOpenedRouterList(){
let params = {} let params = {}
if(this.exportCity){ if(this.exportCity){
params.startCityId = this.exportCity params.startCityId = this.exportCity
...@@ -278,9 +279,10 @@ export default { ...@@ -278,9 +279,10 @@ export default {
if(this.importCity){ if(this.importCity){
params.destCityId = this.importCity params.destCityId = this.importCity
} }
openedRouterList(params).then(res => this.openedRouterList = res.data.filter(item => { const res = await openedRouterList(params)
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1 this.openedRouterList = res.data.filter(item => {
})) return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1
})
}, },
// 切换路线选择 // 切换路线选择
toggleChecker(router, selected){ toggleChecker(router, selected){
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<template v-if="form.type==7"> <template v-if="form.type==7">
> <el-input v-model="item.startAmount" @blur="checkPositive(item, 'startAmount')" style="width:100px" /> > <el-input v-model="item.startAmount" @blur="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @blur="checkPositive(item, 'endAmount')" style="width:100px" /> <el-input v-model="item.endAmount" @blur="checkPositive(item, 'endAmount')" style="width:100px" />
<!-- <selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <!-- <selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
--> -->
<selector v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" /> <selector v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
/ /
<selector v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
</template> </template>
<!-- 特价只有一行,不显示增删 --> <!-- 特价只有一行,不显示增删 -->
<template v-if="form.type != 6"> <template v-if="form.type != 6">
<el-button class="el-icon-plus" size="mini" type="primary" @click="fee[1].push({type:1})" /> <el-button class="el-icon-plus" size="mini" type="primary" @click="fee[1].push({type:1})" />
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
> >
<!---第一个不是全部,所以不能使用defaultable--> <!---第一个不是全部,所以不能使用defaultable-->
<dict-selector :type="DICT_TYPE.ECW_SUITABLE_LINE_TYPE" v-model="form.suitableLineType" formatter="number" defaultable /> <dict-selector :type="DICT_TYPE.ECW_SUITABLE_LINE_TYPE" v-model="form.suitableLineType" formatter="number" defaultable />
<routers-selector v-if="showRouterSelector" v-model="form.lineIds" style="margin-top:5px" /> <routers-selector v-if="showRouterSelector" v-model="form.lineIds" :lineIds="form.lineIds" style="margin-top:5px" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('适用商品')" :label="$t('适用商品')"
...@@ -372,7 +372,7 @@ export default { ...@@ -372,7 +372,7 @@ export default {
}) })
}) })
} }
this.unitList.forEach(item => { this.unitList.forEach(item => {
arr.push({ arr.push({
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
// 非优惠券则查询优惠券列表 // 非优惠券则查询优惠券列表
if(val && val != 1){ if(val && val != 1){
this.getCouponSelect() this.getCouponSelect()
if(!this.initing){ if(!this.initing){
// 非优惠券给默认数据 // 非优惠券给默认数据
this.$set(this.form, 'documentDeclarationArr', ["1", "2", "3"]) this.$set(this.form, 'documentDeclarationArr', ["1", "2", "3"])
...@@ -441,15 +441,16 @@ export default { ...@@ -441,15 +441,16 @@ export default {
this.readonly = true this.readonly = true
} }
this.getUnitList() this.getUnitList()
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
if (this.$route.query.id) { if (this.$route.query.id) {
this.initing = true this.initing = true
getCoupon(this.$route.query.id).then((res) => { getCoupon(this.$route.query.id).then((res) => {
this.form = res.data; this.form = res.data;
['orderAttr', 'isCargoControl', 'brand', 'documentDeclaration'].forEach(field => { ['orderAttr', 'isCargoControl', 'brand', 'documentDeclaration'].forEach(field => {
this.$set(this.form, field + 'Arr', str2arr(res.data[field])) this.$set(this.form, field + 'Arr', str2arr(res.data[field]))
}) })
// 没有商品则表示全部 // 没有商品则表示全部
if(!this.form.prodIds || !this.form.prodIds.length){ if(!this.form.prodIds || !this.form.prodIds.length){
this.isAllProduct = true this.isAllProduct = true
...@@ -461,7 +462,7 @@ export default { ...@@ -461,7 +462,7 @@ export default {
this.couponIds = couponIds.map(item => parseInt(item)) this.couponIds = couponIds.map(item => parseInt(item))
}) })
} }
console.log('lineIds', this.form.lineIds)
if(this.form.discountDetailedVOs){ if(this.form.discountDetailedVOs){
/* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */ /* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */
// this.fee[this.form.costType] = this.form.discountDetailedVOs.filter(item => item.type == this.form.costType) // this.fee[this.form.costType] = this.form.discountDetailedVOs.filter(item => item.type == this.form.costType)
...@@ -477,7 +478,6 @@ export default { ...@@ -477,7 +478,6 @@ export default {
this.fee[item.type].push({...item}) this.fee[item.type].push({...item})
}) })
console.log(JSON.stringify(this.fee, null, 4))
/* if(this.costType != this.form.costType){ /* 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.$t('费用类型冲突')) this.$alert(this.$t('费用类型冲突'))
...@@ -512,7 +512,7 @@ export default { ...@@ -512,7 +512,7 @@ export default {
3: [{}] // 优惠券专用 3: [{}] // 优惠券专用
} }
} }
this.reset() this.reset()
}, },
methods: { methods: {
// 满减清关费修改满的货币后需要同步减的货币 // 满减清关费修改满的货币后需要同步减的货币
...@@ -545,7 +545,7 @@ export default { ...@@ -545,7 +545,7 @@ export default {
this.$set(item, 'netReceiptsCurrencyId', currencyId) this.$set(item, 'netReceiptsCurrencyId', currencyId)
} }
}else this.$set(item, 'reduceCurrencyDisabled', false) }else this.$set(item, 'reduceCurrencyDisabled', false)
return return
} }
...@@ -573,7 +573,7 @@ export default { ...@@ -573,7 +573,7 @@ export default {
if(item.reduceCurrencyDisabled){ if(item.reduceCurrencyDisabled){
this.$set(item, 'reduceCurrencyDisabled', false) this.$set(item, 'reduceCurrencyDisabled', false)
} }
}, },
getCouponSelect(){ getCouponSelect(){
getCouponSelect({overdueStatus: 1, status: 1, pageSize: 100}).then(res => { getCouponSelect({overdueStatus: 1, status: 1, pageSize: 100}).then(res => {
...@@ -652,10 +652,10 @@ export default { ...@@ -652,10 +652,10 @@ export default {
let tmp = item.combUnit.split('_') let tmp = item.combUnit.split('_')
/* if(this.form.type == 5){ /* if(this.form.type == 5){
item['fullCurrencyId'] = item['fullCurrencyId'] =
} */ } */
/* if(this.form.type == 7){ /* if(this.form.type == 7){
item.startAndEndCurrencyId = item.startAndEndCurrencyId =
} */ } */
// 这里目前只能是满减,优惠会提示 “优惠劵满减货币不能为空” // 这里目前只能是满减,优惠会提示 “优惠劵满减货币不能为空”
item[tmp[0]] = tmp[1] item[tmp[0]] = tmp[1]
......
...@@ -268,7 +268,8 @@ ...@@ -268,7 +268,8 @@
]" ]"
class="mb-0 mr-0" class="mb-0 mr-0"
> >
<el-input v-model.number="scope.row.worth" :disabled="!canAddProduct" @input="calculationPrice" type="number" /> <!--input事件在快速输入的时候,可能最后拿到的结果不是最后输入的参数,所以改成在blur的时候计算-->
<el-input v-model.number="scope.row.worth" :disabled="!canAddProduct" @blur="calculationPrice" type="number" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -622,8 +622,6 @@ export default { ...@@ -622,8 +622,6 @@ export default {
getOrderWarehouseIn(this.queryParams.orderId).then(res => { getOrderWarehouseIn(this.queryParams.orderId).then(res => {
this.warehouseInList = res.data this.warehouseInList = res.data
}) })
}, },
watch: { watch: {
//监听table这个对象 //监听table这个对象
......
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
this.$set(this.form, 'allVolumeUnit', unit) this.$set(this.form, 'allVolumeUnit', unit)
}, },
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(async (valid) => {
if (!valid) { if (!valid) {
return; return;
} }
...@@ -480,6 +480,10 @@ export default { ...@@ -480,6 +480,10 @@ export default {
if(data.lineChannelList.length < 1){ if(data.lineChannelList.length < 1){
return this.$message.error(this.$t('请选择需要修改的路线')) return this.$message.error(this.$t('请选择需要修改的路线'))
} }
await this.$confirm(this.$t('已选择{route}条路线,{product}个商品;确认提交修改?', {
route: data.lineChannelList.length,
product: this.isAllProduct ? this.$refs.productSelector.allTotal : this.form.productIdList.length
}))
this.loading = true this.loading = true
batchUpdateProductPrice(data).then(response => { batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"));
......
...@@ -771,7 +771,7 @@ export default { ...@@ -771,7 +771,7 @@ export default {
}, },
// force 为是否强制提交,在价格过期的时候需要确认后强制提交 // force 为是否强制提交,在价格过期的时候需要确认后强制提交
submitForm(force = false) { submitForm(force = false) {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(async (valid) => {
if (!valid) { if (!valid) {
return; return;
} }
...@@ -877,6 +877,7 @@ export default { ...@@ -877,6 +877,7 @@ export default {
if(data.lineChannelList.length < 1){ if(data.lineChannelList.length < 1){
return this.$message.error(this.$t('请选择需要修改的路线')) return this.$message.error(this.$t('请选择需要修改的路线'))
} }
await this.$confirm(this.t("已选择{route}条路线,确认提交?", {route: data.lineChannelList.length}))
data.productIdList = [this.form.productId] data.productIdList = [this.form.productId]
this.loading = true this.loading = true
batchUpdateProductPrice(data).then(response => { batchUpdateProductPrice(data).then(response => {
...@@ -886,8 +887,12 @@ export default { ...@@ -886,8 +887,12 @@ export default {
return; return;
} }
// 添加的提交 // 添加的提交
if(!this.product){
return this.$message.error(this.$t('请选择商品'))
}
data.productId = this.product.id; data.productId = this.product.id;
data.lineChannelList = this.lineList.length ? this.lineList : this.selectedRoutes data.lineChannelList = this.lineList.length ? this.lineList : this.selectedRoutes
await this.$confirm(this.$t("已选择{route}条路线,确认提交?", {route: data.lineChannelList.length}))
// 空运且不是全包价的清关费用0填充 // 空运且不是全包价的清关费用0填充
if(this.type == 'air' && this.form.priceType == 0){ if(this.type == 'air' && this.form.priceType == 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment