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

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

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