Commit c0f06559 authored by 我在何方's avatar 我在何方
parents a9a995dc 9a9db221
...@@ -9,6 +9,14 @@ export function createProductPrice(data) { ...@@ -9,6 +9,14 @@ export function createProductPrice(data) {
}) })
} }
export function createProductPriceAir(data) {
return request({
url: '/ecw/product-price/createAir',
method: 'post',
data: data
})
}
// 更新产品价格 // 更新产品价格
export function updateProductPrice(data) { export function updateProductPrice(data) {
return request({ return request({
...@@ -18,6 +26,15 @@ export function updateProductPrice(data) { ...@@ -18,6 +26,15 @@ export function updateProductPrice(data) {
}) })
} }
// 更新空运价格
export function updateProductPriceAir(data) {
return request({
url: '/ecw/product-price/updateAir',
method: 'put',
data: data
})
}
// 删除产品价格 // 删除产品价格
export function deleteProductPrice(id) { export function deleteProductPrice(id) {
return request({ return request({
...@@ -71,6 +88,15 @@ export function batchUpdateProductPrice(query) { ...@@ -71,6 +88,15 @@ export function batchUpdateProductPrice(query) {
}) })
} }
// 批量修改空运产品价格
export function batchUpdateProductPriceAir(data) {
return request({
url: '/ecw/product-price/batchUpdate',
method: 'put',
data
})
}
// 批量拉黑 // 批量拉黑
export function batchBlock(query) { export function batchBlock(query) {
return request({ return request({
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-input v-model="queryParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable :disabled="loading"/> <el-input v-model="queryParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable :disabled="loading"/>
<el-button type="primary" @click="reLoad" :loading="loading">{{$t('搜索')}}</el-button> <el-button type="primary" @click="reLoad" :loading="loading">{{$t('搜索')}}</el-button>
<div> <div style="height: 36px; display: flex; align-items: center">
<el-checkbox :label="$t('全选') + `(${$t('{total}个', {total})})`" @change="toggleAll" :disabled="isAllProduct || loading"></el-checkbox> <el-checkbox :label="$t('全选') + `(${$t('{total}个', {total})})`" @change="toggleAll" :disabled="isAllProduct || loading"></el-checkbox>
</div> </div>
</div> </div>
...@@ -27,18 +27,28 @@ ...@@ -27,18 +27,28 @@
</div> </div>
<div class="flex-1 ml-10"> <div class="flex-1 ml-10">
<el-card style="height:100%"> <el-card style="height:100%">
<div slot="header" class="header flex"> <div slot="header" class="header">
<div class="flex-1 flex items-center">{{$t('已选{cnt}个产品', {cnt: choosedList.length})}}</div> <el-select v-model="selectedFilterParams.typeId" :placeholder="$t('选择类型')" style="width:120px" clearable :disabled="loading">
<el-option v-for="item in typeList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
<el-select v-model="selectedFilterParams.attrId" :placeholder="$t('选择属性')" style="width:120px" clearable :disabled="loading">
<el-option v-for="item in attrList" :key="item.id" :label="item.attrName" :value="item.id" />
</el-select>
<el-input v-model="selectedFilterParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable :disabled="loading"/>
<!--<el-button type="primary" @click="reLoad" :loading="loading">{{$t('搜索')}}</el-button>-->
<el-button :disabled="!choosedList.length" type="text" @click="clearAll">{{$t('全部清除')}}</el-button> <div class="flex">
<div class="flex-1 flex items-center">{{$t('已选{cnt}个产品', {cnt: choosedList.length})}}</div>
<el-button :disabled="!choosedList.length" type="text" @click="clearAll">{{$t('全部清除')}}</el-button>
</div>
</div> </div>
<div class="list"> <div class="list">
<div class="item" v-for="(choosed) in selectedList" :key="choosed.id" :data-data="JSON.stringify(choosed)"> <div class="item" v-for="(choosed) in selectedList" :key="choosed.id">
<el-link class="el-icon-delete" @click="remove(choosed)" :disabled="isAllProduct"/> {{choosed.titleZh}} <el-link class="el-icon-delete" @click="remove(choosed)" :disabled="isAllProduct"/> {{choosed.titleZh}}
<div>{{choosed.titleEn}}</div> <div>{{choosed.titleEn}}</div>
</div> </div>
</div> </div>
<el-pagination :total="choosedList.length" :page-sizes="[100, 200, 300, 500]" :page-size="pageSize" @current-change="rightPage = $event" layout="prev, pager, next, total, sizes" :current-page="rightPage" /> <el-pagination :total="filteredList.length" :page-sizes="[100, 200, 300, 500]" :page-size="pageSize" @current-change="rightPage = $event" layout="prev, pager, next, total, sizes" :current-page="rightPage" />
</el-card> </el-card>
</div> </div>
</div> </div>
...@@ -75,6 +85,11 @@ export default { ...@@ -75,6 +85,11 @@ export default {
titleZh: null, titleZh: null,
typeId: null typeId: null
}, },
selectedFilterParams:{
attrId: null,
titleZh: null,
typeId: null
},
choosedList: [], choosedList: [],
typeList: [], typeList: [],
attrList: [], attrList: [],
...@@ -110,9 +125,24 @@ export default { ...@@ -110,9 +125,24 @@ export default {
currentList(){ currentList(){
return this.list.slice((this.leftPage - 1) * this.pageSize, this.leftPage * this.pageSize) return this.list.slice((this.leftPage - 1) * this.pageSize, this.leftPage * this.pageSize)
}, },
// 已勾选的显示列表 // 已选中 且符合筛选的
filteredList(){
return this.choosedList.filter(item => {
if(this.selectedFilterParams.typeId && item.typeId != this.selectedFilterParams.typeId){
return false
}
if(this.selectedFilterParams.attrId && item.attrId != this.selectedFilterParams.attrId){
return false
}
if(this.selectedFilterParams.titleZh && item.titleZh.indexOf(this.selectedFilterParams.titleZh) == -1){
return false
}
return true
})
},
// 已勾选的显示列表,当前分页显示的
selectedList(){ selectedList(){
return this.choosedList.slice((this.rightPage - 1) * this.pageSize, this.rightPage * this.pageSize) return this.filteredList.slice((this.rightPage - 1) * this.pageSize, this.rightPage * this.pageSize)
} }
}, },
watch: { watch: {
...@@ -131,7 +161,7 @@ export default { ...@@ -131,7 +161,7 @@ export default {
},*/ },*/
defaultIds(newValue, oldValue){ defaultIds(newValue, oldValue){
if(!oldValue || !oldValue.length){ if(!oldValue || !oldValue.length){
this.loadDefaultProds() // this.loadDefaultProds()
} }
}, },
isall(isall){ isall(isall){
......
This diff is collapsed.
<script>
import {getPriceSnapshotList} from "@/api/ecw/productPrice";
export default {
name: "Logs",
props:{
currencyMap:{
type:Object,
default:() =>{
return {}
}
},
unitMap:{
type:Object,
default:() =>{
return {}
}
},
},
data(){
return {
showLogsDialog: false,
loading: false,
logs:[]
}
},
methods:{
open(id){
this.showLogsDialog = true
this.loading = true
getPriceSnapshotList(id).then(res => {
this.logs = res.data
this.logs.forEach(item => {
item.detail = JSON.parse(item.content)
})
}).finally(() => {
this.loading = false
})
},
closeLogsDialog(){
this.logs = []
this.showLogsDialog = false
}
}
}
</script>
<template>
<el-dialog :title="$t('查看价格日志')" :visible.sync="showLogsDialog" :before-close="closeLogsDialog" width="1000px">
<el-table :data="logs" v-loading="loading">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('修改人')" prop="creatorName" width="200px"></el-table-column>
<el-table-column :label="$t('修改时间')">
<template slot-scope="{row}">{{row.createTime|parseTime}}</template>
</el-table-column>
<el-table-column :label="$t('修改前')">
<template slot-scope="{row}">
<div>{{ $t('预付') }}<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.detail.needPay" /></div>
<div>{{ $t('单价模式') }}<dict-tag :type="DICT_TYPE.ECW_PRICE_TYPE" :value="row.detail.priceType" /></div>
<div v-if="row.detail.minWeight">{{ $t('最小起计量') }}{{ row.detail.minWeight }}{{unitMap[row.detail.minWeightUnit]}}</div>
<!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10">
{{index+1}}阶段
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
</div>
<template v-if="row.detail.priceType != 1">
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<!--空运没有清关费, 不需要显示-->
<div v-if="type != 'air'" :key="item.specialDictType + '_clearance'" class="pl-10">
清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else class="pl-10">
全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
</template>
<template v-else>
<template v-if="row.detail.priceType != 1">
<div>
默认运费:
{{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}}
</div>
<div>
默认清关费:
{{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
全包价:
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div>
<template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<div :key="item.specialDictType + '_clearance'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
</template>
<div v-if="row.detail.validateStartDate || row.detail.validateStartDate">有效期:{{ row.detail.validateStartDate|parseTime }}-{{ row.detail.validateEndDate|parseTime }}</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<style scoped lang="scss">
</style>
<script>
import Selector from "@/components/Selector/index.vue";
import Inputor from "@/components/Inputor/index.vue";
import Template from "@/views/cms/template/index.vue";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
export default {
name: "PriceStep",
components: {Template, Inputor, Selector},
props:{
index: Number,
priceName: String,
fieldPrefix: String,
unitList:{
type: Array,
default: []
},
currencyList:{
type: Array,
default: []
},
showAdd: Boolean,
readonly: Boolean,
value:{
type: Object,
default: () => {
return {
}
}
}
},
created() {
if(!this.value.packagingList){
this.addPackage()
}
// 格式化包装
if(this.value.packagingList?.length){
this.value.packagingList.forEach(item => {
if(item.packagingTypes && typeof item.packagingTypes == 'string'){
item.packagingTypes = item.packagingTypes.split(',')
}
})
}
this.initSpecialPrice()
},
data(){
return {
}
},
computed:{
packagingList(){
return getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE).map(dict => {
dict.enable = true
this.value.packagingList.forEach(item => {
if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){
dict.enable = false
}
})
return dict
})
}
},
methods:{
getDictDatas,
// 初始化特需加价
initSpecialPrice(){
if(!this.value.specialList){
this.$set(this.value, 'specialList', [])
}
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
if(!this.value.specialList.find(special => special.specialDictType == item.value)){
this.value.specialList.push({
[`${this.fieldPrefix}Price`]: undefined, // 新建默认给0,否则默认是null
[`${this.fieldPrefix}PriceUnit`]: this.value[`${this.fieldPrefix}PriceUnit`],
[`${this.fieldPrefix}VolumeUnit`]: this.value[`${this.fieldPrefix}VolumeUnit`],
"specialDictType": item.value
})
}
})
},
// 添加包装类型运费
addPackage(){
if(!this.value.packagingList){
this.$set(this.value, 'packagingList', [])
}
this.value.packagingList.push({
packagingPrice: undefined,
packagingPriceUnit : this.value[`${this.fieldPrefix}PriceUnit`],
packagingVolumeUnit : this.value[`${this.fieldPrefix}VolumeUnit`],
})
},
// 删除包装类型运费
deletePackage(index){
this.value.packagingList.splice(index, 1)
},
// 校验
validate(){
let valid = true
const index = this.index
// 区间设置检查
if(index > 0 && !this.value.startNum){
valid = false
this.$message.error(`请设置第${index+1}阶段的起始值`)
}
if(!this.value.endNum){
valid = false
this.$message.error(`请设置第${index+1}阶段的结束值`)
}
// 价格检查
if(!this.validatePrice(this.value[`${this.fieldPrefix}Price`])){
valid = false
this.$message.error(`请设置第${index+1}阶段的${this.priceName}`)
}
// 包装价格检查
if(this.value.packagingList?.length){
this.value.packagingList.forEach((item, i) => {
if(item.packagingTypes?.length && !this.validatePrice(item.packagingPrice)){
valid = false
this.$message.error(`请设置第${index+1}阶段的包装类型${i+1}${this.priceName}`)
}
})
}
return valid
},
// 校验价格是否为空,可以是0
validatePrice(value){
if(value === undefined || value === null || value === ''){
return false
}
return true
},
}
}
</script>
<template>
<div>
<div class="bold text-lg">{{$t('空运{type}设置', {type: priceName})}}</div>
<div style="font-size:14px; margin:10px 0">
{{$t('第{index}阶梯定价方案', {index: index+1})}}
<template v-if="showAdd">
<el-link type="primary" @click.native="$emit('add', fieldPrefix)">{{$t('添加区间')}}</el-link>
<el-divider direction="vertical"></el-divider>
<el-link type="danger" @click.native="$emit( 'delete', index)">{{$t('删除')}}</el-link>
</template>
</div>
<el-form-item :label="$t('第{index}阶梯', {index: index+1})">
<el-input-number v-model="value.startNum" :controls="false" class="w-100"></el-input-number>
-
<el-input-number v-model="value.endNum" :controls="false" class="w-100"></el-input-number>
/
<selector
:disabled="index>0"
v-model="value.weightUnit"
:options="unitList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: 'weightUnit',
type: fieldPrefix
})"
value-field="id"
class="w-100" />
</el-form-item>
<el-form-item :label="$t('默认') + priceName">
<el-input-number v-model="value[`${fieldPrefix}Price`]" :placeholder="$t('整数或者两位小数')" :precision="2" :controls="false" class="w-100 mr-10"/>
<selector
:disabled="index>0"
v-model="value[`${fieldPrefix}PriceUnit`]"
:options="currencyList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `${fieldPrefix}PriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled="index>0"
v-model="value[`${fieldPrefix}VolumeUnit`]"
:options="unitList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `${fieldPrefix}VolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<!--特性加价-->
<template v-for="(special, specialIndex) in value.specialList">
<el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + priceName"
:key="specialIndex + 'transport'"
>
<el-input-number v-model.number="special[`${fieldPrefix}Price`]" :controls="false" :min="0" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="special[`${fieldPrefix}PriceUnit`]" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special[`${fieldPrefix}VolumeUnit`]" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
</template>
<!--包装类型价格-->
<template v-for="(item, i) in value.packagingList">
<el-form-item :label="$t('包装类型') + priceName + (i+1)">
<template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div>
</template>
<el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block">
<el-option
v-for="item in packagingList"
:key="item.value"
:label="$l(item, 'label')"
:value="item.value"
:disabled="!item.enable"
>
</el-option>
</el-select>
<el-input-number v-model="item.packagingPrice" :controls="false" :min="0" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="item.packagingPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="item.packagingVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
<template v-if="i == value.packagingList.length -1 && !readonly">
<el-link type="primary" @click.native="addPackage" class="ml-5">{{$t('添加')}}</el-link>
<el-divider direction="vertical"></el-divider>
<el-link type="danger" @click.native="deletePackage(i)">{{$t('删除')}}</el-link>
</template>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型,将被忽略')}}</div>
</el-form-item>
</template>
</div>
</template>
<style scoped lang="scss">
.bold {
font-weight: bold;
}
.text-lg{
font-size: 1.3rem;
}
.tips{
font-size: 1rem; color: red;
}
</style>
<script>
import Selector from "@/components/Selector/index.vue";
export default {
name: "QuickSet.vue",
props:{
unitList:{
type: Array,
default: []
},
currencyList:{
type: Array,
default: []
},
value:{
type: Object,
default(){
return {}
}
}
},
components: {Selector},
data(){
return {
quickForm:{}, // 快速加价/减价表单
}
},
computed:{
getUnit(){
return (field, unitField) => {
if(!this.value[field]?.length) return null
return this.value[field][0][unitField]
}
}
},
methods:{
handleConfirm(type){
let amount = this.quickForm[type]
if(!amount){
return this.$message.error(this.$t('请输入加价金额'))
}
if(this.value?.priceType == 1){
this.batchSetPrice("fullPriceStepList", 'all', amount)
}else if(type == 'transport'){
this.batchSetPrice("freightPriceStepList","transport", amount)
}else if(type == 'clearance'){
this.batchSetPrice("clearancePriceStepList", "clearance", amount)
}
},
batchSetPrice(field, fieldPrefix, amount){
if(!this.value[field]?.length) return
this.value[field].forEach(item => {
if(item[fieldPrefix + 'Price']){
item[fieldPrefix + 'Price'] = (item[fieldPrefix + 'Price'] * 100 + amount * 100) / 100
}
// 特性价格
if(item.specialList?.length){
item.specialList.forEach(special => {
console.log(special.specialDictType, special[fieldPrefix + 'Price'])
if(special[fieldPrefix + 'Price']){
special[fieldPrefix + 'Price'] = (special[fieldPrefix + 'Price'] * 100 + amount * 100) / 100
}
})
}
// 包装价格
if(item.packagingList?.length){
item.packagingList.forEach(packaging => {
if(packaging['packagingPrice']){
packaging['packagingPrice'] = (packaging['packagingPrice'] * 100 + amount * 100) / 100
}
})
}
})
}
}
}
</script>
<template>
<div>
<h2 class="mt-5">{{$t('快捷设置')}}</h2>
<div class="flex items-center" v-if="value.priceType != 1">
<div class="w-100">{{$t('运费快捷加价')}}</div>
<el-input-number :controls="false" v-model="quickForm.transport" class="w-100 ml-10 mr-10"></el-input-number>
<selector disabled :value="getUnit('freightPriceStepList', 'transportPriceUnit')" :options="currencyList" :label-field="$l('title')" value-field="id" class="w-100" />
/ <selector disabled :value="getUnit('freightPriceStepList', 'transportVolumeUnit')" :options="unitList" :label-field="$l('title')" value-field="id" class="w-100" />
<div class="ml-10">
<el-button @click="handleConfirm('transport')" type="primary">{{$t('提交运费')}}</el-button>
</div>
</div>
<div class="flex items-center mt-10" v-if="value.priceType != 1">
<div class="w-100">{{$t('清关费快捷加价')}}</div>
<el-input-number :controls="false" v-model="quickForm.clearance" class="w-100 ml-10 mr-10"></el-input-number>
<selector disabled :value="getUnit('clearancePriceStepList', 'clearancePriceUnit')" :options="currencyList" :label-field="$l('title')" value-field="id" class="w-100" />
/ <selector disabled :value="getUnit('clearancePriceStepList', 'clearanceVolumeUnit')" :options="unitList" :label-field="$l('title')" value-field="id" class="w-100" />
<div class="ml-10">
<el-button @click="handleConfirm('clearance')" type="primary">{{$t('提交清关费')}}</el-button>
</div>
</div>
<div class="flex items-center" v-if="value.priceType == 1">
<div class="w-100">{{$t('全包价快捷加价')}}</div>
<el-input-number v-model="quickForm.all" :controls="false" class="w-100 ml-10 mr-10"></el-input-number>
<selector disabled :value="getUnit('fullPriceStepList', 'allPriceUnit')" :options="currencyList" :label-field="$l('title')" value-field="id" class="w-100" />
/ <selector disabled :value="getUnit('fullPriceStepList', 'allVolumeUnit')" :options="unitList" :label-field="$l('title')" value-field="id" class="w-100" />
<div class="ml-10">
<el-button @click="handleConfirm('all')" type="primary">{{$t('提交全包价')}}</el-button>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
</style>
This diff is collapsed.
...@@ -4,7 +4,15 @@ ...@@ -4,7 +4,15 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<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">
<template #prepend>
<el-select v-model="queryParams.searchType" style="width: 100px">
<el-option :value="1" :label="$t('包含')"></el-option>
<el-option :value="2" :label="$t('不包含')"></el-option>
<el-option :value="3" :label="$t('等于')"></el-option>
</el-select>
</template>
</el-input>
</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">
...@@ -58,7 +66,12 @@ ...@@ -58,7 +66,12 @@
<el-option :label="$t('否')" value="0"></el-option> <el-option :label="$t('否')" value="0"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('单价模式')" prop="priceType">
<el-select v-model="queryParams.priceType" :placeholder="$t('请选择')" clearable>
<el-option :label="$t('运费+清关费')" value="0"></el-option>
<el-option :label="$t('全包价')" value="1"></el-option>
</el-select>
</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>
...@@ -393,6 +406,7 @@ export default { ...@@ -393,6 +406,7 @@ export default {
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
searchType: 1,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
productId: null, productId: null,
......
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