Commit e1bb3803 authored by 邓春圆's avatar 邓春圆

返回商品相关列表时筛选条件、页码未保存 bug 修复

parent 769f064a
......@@ -212,7 +212,7 @@ export const constantRoutes = [
path: 'product-price',
component: (resolve) => require(['@/views/ecw/productPrice/index'], resolve),
name: 'ProductPrice',
meta: {title: '价格列表', activeMenu: '/product/product-list'}
meta: {title: '价格列表', activeMenu: '/product/product-list',componentPath:'/ecw/productprice/index'}
}
]
},
......
......@@ -575,4 +575,4 @@ export default {
}
}
};
</script>
\ No newline at end of file
</script>
......@@ -14,7 +14,7 @@
<el-form-item :label="$t('商品名称')" prop="titleZh" v-if="!$route.query.product_id">
<el-input v-model="queryParams.titleZh" :placeholder="$t('请输入中英文名称、商品编码、海关编码')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('商品类型')" prop="typeId" v-if="!$route.query.product_id">
<el-select v-model="queryParams.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/>
......@@ -30,24 +30,24 @@
</el-form-item> -->
<el-form-item :label="$t('运输方式')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" clearable />
</el-form-item>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" clearable>
<el-option v-for="item in channelList" :key="item.id" :label="$l(item, 'name')" :value="item.channelId" />
<el-option v-for="item in channelList" :key="item.id" :label="$l(item, 'name')" :value="item.channelId" />
</el-select>
</el-form-item>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="startCityId">
<el-select v-model="queryParams.startCityId" clearable>
<el-option v-for="city in startCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
<el-option v-for="city in startCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
</el-select>
</el-form-item>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId">
<el-select v-model="queryParams.destCityId" clearable>
<el-option v-for="city in destCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
<el-option v-for="city in destCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
</el-select>
</el-form-item>
</el-form-item>
<el-form-item :label="$t('上架状态')" prop="auditStatus">
<dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/>
</el-form-item>
......@@ -57,8 +57,8 @@
<el-option :label="$t('黑名单')" value="blacklist_1"></el-option>
</el-select>
</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>
......@@ -160,31 +160,31 @@
})}}<br/>
<div v-if="scope.row.priceType == 0">
{{$t('运费')}}:{{ getCurrencySymbol(scope.row.priceStepList[0].transportPriceUnit) + scope.row.priceStepList[0].transportPrice}}&nbsp;
{{$t('运费')}}:{{ getCurrencySymbol(scope.row.priceStepList[0].transportPriceUnit) + scope.row.priceStepList[0].transportPrice}}&nbsp;
{{ getCurrencyTitle(scope.row.priceStepList[0].transportPriceUnit) + '/' + getUnitTitle(scope.row.priceStepList[0].transportVolumeUnit)}}
<br />
{{$t('清关费')}}:{{ getCurrencySymbol(scope.row.priceStepList[0].clearancePriceUnit) + scope.row.priceStepList[0].clearancePrice}}&nbsp;
{{$t('清关费')}}:{{ getCurrencySymbol(scope.row.priceStepList[0].clearancePriceUnit) + scope.row.priceStepList[0].clearancePrice}}&nbsp;
{{ getCurrencyTitle(scope.row.priceStepList[0].clearancePriceUnit) + '/' + getUnitTitle(scope.row.priceStepList[0].clearanceVolumeUnit)}}
</div>
<div v-if="scope.row.priceType == 1">
{{$t('全包价')}}:{{ getCurrencySymbol(scope.row.priceStepList[0].allPriceUnit) + scope.row.priceStepList[0].allPrice}}&nbsp;
{{$t('全包价')}}:{{ getCurrencySymbol(scope.row.priceStepList[0].allPriceUnit) + scope.row.priceStepList[0].allPrice}}&nbsp;
{{ getCurrencyTitle(scope.row.priceStepList[0].allPriceUnit) + '/' + getUnitTitle(scope.row.priceStepList[0].allVolumeUnit)}}
</div>
</template>
<template v-else>
<div v-if="scope.row.priceType == 0">
{{$t('运费')}}:{{ getCurrencySymbol(scope.row.transportPriceUnit) + scope.row.transportPrice}}&nbsp;
{{$t('运费')}}:{{ getCurrencySymbol(scope.row.transportPriceUnit) + scope.row.transportPrice}}&nbsp;
{{ getCurrencyTitle(scope.row.transportPriceUnit) + '/' + getUnitTitle(scope.row.transportVolumeUnit)}}
<br />
{{$t('清关费')}}:{{ getCurrencySymbol(scope.row.clearancePriceUnit) + scope.row.clearancePrice}}&nbsp;
{{$t('清关费')}}:{{ getCurrencySymbol(scope.row.clearancePriceUnit) + scope.row.clearancePrice}}&nbsp;
{{ getCurrencyTitle(scope.row.clearancePriceUnit) + '/' + getUnitTitle(scope.row.clearanceVolumeUnit)}}
</div>
<div v-if="scope.row.priceType == 1">
{{$t('全包价')}}:{{ getCurrencySymbol(scope.row.allPriceUnit) + scope.row.allPrice}}&nbsp;
{{$t('全包价')}}:{{ getCurrencySymbol(scope.row.allPriceUnit) + scope.row.allPrice}}&nbsp;
{{ getCurrencyTitle(scope.row.allPriceUnit) + '/' + getUnitTitle(scope.row.allVolumeUnit)}}
</div>
</template>
</template>
</el-table-column>
......@@ -335,7 +335,7 @@ export default {
/* advanceStatusDictDatas: getDictDatas(DICT_TYPE.ADVANCE_STATUS), */
AuditStatusEnum: AuditStatusEnum,
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION),
};
},
......@@ -437,7 +437,7 @@ export default {
},
},
activated() {
console.log('activated', Object.assign({}, this.$route.query))
// console.log('activated', Object.assign({}, this.$route.query))
/* this.$set(this.queryParams, 'typeId', +this.$route.query.product_type || null)
let productId = this.product?.id
......@@ -450,25 +450,25 @@ export default {
}
this.handleQuery()
*/
this.getList();
},
watch:{
'$route.query.product_id'(){
console.log(this.$route.query)
if(!this.$route.query.product_id){
return this.product = null
}
// if(!this.$route.query.product_id){
// return this.product = null
// }
let productId = this.product?.id
if(this.$route.query.product_id != productId){
this.queryParams = {
pageNo: 1,
pageSize: 10,
productId: this.$route.query.product_id
if(this.$route.name === 'ProductPrice'){
if(this.$route.query.product_id != productId){
this.queryParams = {
pageNo: 1,
pageSize: 10,
productId: this.$route.query.product_id,
}
}
getProduct(this.$route.query.product_id).then(res => {
this.product = res.data
})
this.handleQuery()
this.getList();
}
}
},
......@@ -482,15 +482,15 @@ export default {
getProduct(this.$route.query.product_id).then(res => {
this.product = res.data
})
}else{
}else{
this.getAttrList();
}
//获取城市列表
this.getAllCityList()
this.getChannelList()
this.getTypeList()
//获取货币列表
this.requestCurrencyList();
//获取单位列表
......@@ -540,7 +540,7 @@ export default {
requestCurrencyList() {
getCurrencyList().then(response => {
this.currecyList = response.data;
})
})
},
/**获取所有单位列表 */
......@@ -634,7 +634,7 @@ export default {
/** 新增按钮操作 */
handleAdd() {
return this.$router.push('../../lineProject/product-price/edit?' + (new URLSearchParams(this.$route.query)).toString())
},
// 批量修改单个商品的价格(一条或者多条,后者全部路线)
batchSetSingleProductPrice(){
......@@ -665,11 +665,11 @@ export default {
} else {
row.auditStatus = row.auditStatus === AuditStatusEnum.PASS ? AuditStatusEnum.NOT_PASS : AuditStatusEnum.PASS;
}
});
},
checkSelectable() {
return !this.isUpdate;
},
......@@ -768,7 +768,7 @@ export default {
this.handleQuery()
})
},
}
};
</script>
......
......@@ -79,7 +79,10 @@
import { createProductType, updateProductType, deleteProductType, getProductType, getProductTypePage, exportProductTypeExcel } from "@/api/ecw/productType";
export default {
name: "ProductType",
name: "EcwProducttypeIndex",
activated() {
this.getList();
},
components: {
},
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