Commit 25ca1b86 authored by dragondean@qq.com's avatar dragondean@qq.com

解决若干bug

parent 7c23156a
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
//,fullscreen : false //是否开启初始化时即全屏,默认关闭 //,fullscreen : false //是否开启初始化时即全屏,默认关闭
//,imagePopup:true //图片操作的浮层开关,默认打开 ,imagePopup:true //图片操作的浮层开关,默认打开
//,autoSyncData:true //自动同步编辑器要提交的数据 //,autoSyncData:true //自动同步编辑器要提交的数据
//,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹 //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
//,toolbarTopOffset:400 //,toolbarTopOffset:400
//设置远程图片是否抓取到本地保存 //设置远程图片是否抓取到本地保存
//,catchRemoteImageEnable: true //设置是否抓取远程图片 ,catchRemoteImageEnable: true //设置是否抓取远程图片
//pageBreakTag //pageBreakTag
//分页标识符,默认是_ueditor_page_break_tag_ //分页标识符,默认是_ueditor_page_break_tag_
......
...@@ -60,3 +60,13 @@ export function exportNeedKnowExcel(query) { ...@@ -60,3 +60,13 @@ export function exportNeedKnowExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 下载需知
export function download(query) {
return request({
url: '/system/need-know/download',
method: 'get',
params: query,
responseType: 'blob'
})
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false"> <el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10 flex-center"> <div class="header mb-10 flex-center">
<div class="flex-center">关键字:</div> <div class="flex-center">关键字:</div>
<el-input v-model="form.searchKey" placeholder="" class="w-200"></el-input> <el-input v-model="form.searchKey" clearable class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button> <el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button>
</div> </div>
<div class="list"> <div class="list">
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="line"> <div class="line">
<div class="label">邮箱:</div> <div class="label">邮箱:</div>
<div class="value">{{item.emial}}</div> <div class="value">{{item.email}}</div>
</div> </div>
<div class="line"> <div class="line">
<div class="label">公司:</div> <div class="label">公司:</div>
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
</div> </div>
</template> </template>
<script> <script>
import {getNeedKnowByKey} from '@/api/system/needKnow' import {getNeedKnowByKey, download} from '@/api/system/needKnow'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
import saveFie from '@/plugins/download'
export default { export default {
props:{ props:{
keyname: String keyname: String
...@@ -23,6 +24,11 @@ export default { ...@@ -23,6 +24,11 @@ export default {
}) })
}, },
methods:{ methods:{
downloadPdf(){
download({id: this.detail.id}).then(res => {
saveFie.pdf(res, '入仓须知.pdf')
})
},
download(){ download(){
// 直接保存图片 // 直接保存图片
let l = this.$loading() let l = this.$loading()
......
...@@ -24,6 +24,11 @@ export default { ...@@ -24,6 +24,11 @@ export default {
this.download0(data, fileName, 'text/markdown'); this.download0(data, fileName, 'text/markdown');
}, },
// 下载pdf
pdf(data, fileName){
this.download0(data, fileName, 'application/pdf');
},
download0(data, fileName, mineType) { download0(data, fileName, mineType) {
// 创建 blob // 创建 blob
let blob = new Blob([data], {type: mineType}); let blob = new Blob([data], {type: mineType});
......
This diff is collapsed.
...@@ -2,19 +2,67 @@ ...@@ -2,19 +2,67 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<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="100px">
<el-form-item :label="$t('报价单号')" prop="number"> <el-form-item :label="$t('编号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('请输入报价单号')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.number" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery"/>
<!--// TODO -->
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单编号')" prop="orderNo"> <el-form-item :label="$t('客户')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单编号')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.orderNo" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery"/>
<!--// TODO -->
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')" prop="orderNo">
<el-date-picker v-model="queryParams.beginCreateTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="queryParams.endCreateTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="departureId">
<el-select v-model="queryParams.departureId" :placeholder="$t('请选择始发地')">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="objectiveId">
<el-select v-model="queryParams.objectiveId" :placeholder="$t('请选择目的地')">
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="orderNo">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
<el-form-item :label="$t('商品')" prop="orderNo">
<el-input v-model="queryParams.product" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery"/>
<!--// TODO -->
</el-form-item>
<el-form-item :label="$t('控货')" prop="control">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" />
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="orderNo">
<user-selector v-model="queryParams.salesman" />
<!--// TODO -->
</el-form-item>
<el-form-item :label="$t('销售阶段')" prop="status">
<dict-selector :type="DICT_TYPE.ECW_OFFER_STATUS" v-model="queryParams.status" />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" />
</el-form-item>
<div>
<el-form-item :label="$t('预计结束时间')" prop="orderNo">
<el-date-picker v-model="queryParams.beginStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="queryParams.endStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</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>
</el-form-item> </el-form-item>
</div>
</el-form> </el-form>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
...@@ -55,7 +103,7 @@ ...@@ -55,7 +103,7 @@
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost"> <el-table-column :label="$t('预计销售额')" align="left" prop="estCost">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div class="" v-for="item in row.estCostVO.feeDtoList" :key="item.feeType"> <div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex">
<dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" /> <dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" />
{{item.amount}} {{currencyMap[item.currencyId]}} {{item.amount}} {{currencyMap[item.currencyId]}}
</div> </div>
...@@ -65,13 +113,35 @@ ...@@ -65,13 +113,35 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown>
<el-button icon="el-icon-plus" circle type="primary"></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)">{{$t('详情')}}</el-dropdown-item>
<el-dropdown-item v-if="[1,2].indexOf(scope.row.status) > -1" @click.native="$router.push('edit?id=' + scope.row.offerId)" v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item v-if="[1,2].indexOf(scope.row.status) > -1" @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-dropdown-item>
<el-dropdown-item v-if="[2].indexOf(scope.row.status) > -1" @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-hasPermi="['ecw:offer:update']">{{$t('结果')}}</el-dropdown-item>
<el-dropdown-item v-if="[2].indexOf(scope.row.status) > -1" @click.native="$router.push('/offer/special/' + scope.row.offerId)" v-hasPermi="['ecw:offer:update']">{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item v-if="[1,2].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('取消')}}</el-dropdown-item>
<el-dropdown-item v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item v-if="[1,2,4,5].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-popover
style="margin-left: 10px;"
placement="bottom"
width="100"
trigger="hover">
<el-button slot="reference" icon="el-icon-plus" circle type="primary"></el-button>
<div style=" display:flex; flex-direction:column">
<template v-if="[1,2].indexOf(scope.row.status) > -1"> <template v-if="[1,2].indexOf(scope.row.status) > -1">
<el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)" <el-link type="primary" @click.native="$router.push('detail?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('详情')}}</el-button> v-hasPermi="['ecw:offer:detail']">{{$t('详情')}}</el-link>
<el-button size="mini" type="text" @click="$router.push('edit?id=' + scope.row.offerId)" <el-link type="primary" @click="$router.push('edit?id=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-button> v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-link>
<el-button size="mini" type="text" @click="$router.push('logList?offerId=' + scope.row.offerId)" <el-link type="primary" @click="$router.push('logList?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-button> v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-link>
</template> </template>
<template v-if="scope.row.status == 2"> <template v-if="scope.row.status == 2">
<el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)" <el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)"
...@@ -87,10 +157,14 @@ ...@@ -87,10 +157,14 @@
<el-button size="mini" type="text" <el-button size="mini" type="text"
v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-button> v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-button>
</template> </template>
<el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)" <el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('详情')}}</el-button> v-hasPermi="['ecw:offer:update']">{{$t('详情')}}</el-button>
<el-button size="mini" type="text" <el-button size="mini" type="text"
v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-button> v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-button>
</div>
</el-popover> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -104,10 +178,12 @@ ...@@ -104,10 +178,12 @@
<script> <script>
import { deleteOffer, getOfferPage, exportOfferExcel } from "@/api/ecw/offer"; import { deleteOffer, getOfferPage, exportOfferExcel } from "@/api/ecw/offer";
import { getCurrencyList } from '@/api/ecw/currency'; import { getCurrencyList } from '@/api/ecw/currency';
import {getTradeCityList} from '@/api/ecw/region'
import UserSelector from '@/components/UserSelector'
export default { export default {
name: "Offer", name: "Offer",
components: { components: {
UserSelector
}, },
data() { data() {
return { return {
...@@ -160,7 +236,8 @@ export default { ...@@ -160,7 +236,8 @@ export default {
estCost: null, estCost: null,
sendstatus: null, sendstatus: null,
}, },
currencyList: [] currencyList: [],
tradeCityList:[]
}; };
}, },
...@@ -172,12 +249,21 @@ export default { ...@@ -172,12 +249,21 @@ export default {
}) })
return map return map
}, },
exportCityList() {
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
},
}, },
created() { created() {
this.getList(); getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => { getCurrencyList().then(res => {
this.currencyList = res.data this.currencyList = res.data
}) })
this.getList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</template> </template>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submitForm">{{form.result==1?"确定并新增草稿订单":"提交"}}</el-button> <el-button type="primary" @click="submitForm">{{form.result==1? $t("确定并新增草稿订单") : $t("提交")}}</el-button>
<el-button @click="$router.back()">返 回</el-button> <el-button @click="$router.back()">返 回</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -86,8 +86,12 @@ export default { ...@@ -86,8 +86,12 @@ export default {
return; return;
} }
let data = Object.assign({}, this.form) let data = Object.assign({}, this.form)
updateOfferResult(data).then((response) => { updateOfferResult(data).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t("赢单成功"));
if(response.data > 0){
this.$redirect('../order/edit?id=' + response.data)
return
}
this.$router.back(); this.$router.back();
}); });
}); });
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="offer.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="offer.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')"> <el-descriptions-item :label="$t('出货渠道')">
// TODO {{channel ? $l(channel, 'name') : '/'}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{offer.createTime}}</el-descriptions-item> <el-descriptions-item :label="$t('创建时间')">{{offer.createTime}}</el-descriptions-item>
...@@ -47,25 +47,25 @@ ...@@ -47,25 +47,25 @@
<el-table-column <el-table-column
:label="$t('原价')"> :label="$t('原价')">
<template v-slot="{row}"> <template v-slot="{row}">
运费{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} {{$t('运费')}}{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br> <br>
清关费:{{ row.originalClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} {{$t('清关费')}}{{ row.oneClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="成本价"> label="成本价">
<template v-slot="{row}"> <template v-slot="{row}">
运费{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} {{$t('运费')}}{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br> <br>
清关费:{{ row.clearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} {{$t('清关费')}}{{ row.oneClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="销售价"> :label="$t('销售价')">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} {{$t('运费')}}{{ row.saleSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br> <br>
清关费:{{ row.clearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} {{$t('清关费')}}{{ row.oneClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -96,6 +96,7 @@ import {getCurrencyList} from "@/api/ecw/currency" ...@@ -96,6 +96,7 @@ import {getCurrencyList} from "@/api/ecw/currency"
import {getProductAttrList} from "@/api/ecw/productAttr" import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import {listByIds} from '@/api/ecw/region' import {listByIds} from '@/api/ecw/region'
import {getChannel} from '@/api/ecw/channel'
export default { export default {
name: "OfferSpecial", name: "OfferSpecial",
components: { components: {
...@@ -128,7 +129,8 @@ export default { ...@@ -128,7 +129,8 @@ export default {
currencyList:[], currencyList:[],
productAttrList:[], productAttrList:[],
objective: null, objective: null,
departure: null departure: null,
channel: null, // 渠道信息
}; };
}, },
watch:{ watch:{
...@@ -147,6 +149,13 @@ export default { ...@@ -147,6 +149,13 @@ export default {
this.loading = false this.loading = false
this.offer = response.data this.offer = response.data
this.getCity() this.getCity()
this.getChannel()
})
},
getChannel(){
if(!this.offer.channelId) return
getChannel(this.offer.channelId).then(res => {
this.channel = res.data
}) })
}, },
getCity(){ getCity(){
...@@ -171,14 +180,14 @@ export default { ...@@ -171,14 +180,14 @@ export default {
currencyMap(){ currencyMap(){
let map = {} let map = {}
this.currencyList.forEach(item => { this.currencyList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = this.$l(item, 'title')
}) })
return map return map
}, },
unitMap(){ unitMap(){
let map = {} let map = {}
this.unitList.forEach(item => { this.unitList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = this.$l(item, 'title')
}) })
return map return map
} }
......
...@@ -78,7 +78,11 @@ ...@@ -78,7 +78,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" /> <el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum" /> <el-table-column :label="$t('箱数')" align="center" prop="sumNum" >
<template v-slot="{row}">
{{row.inWarehouseState > 1 ? row.sumNum : row.totalNum}}
</template>
</el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight"> <el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.releaseNum}}</template> <template slot-scope="{row}">{{row.releaseNum}}</template>
</el-table-column> </el-table-column>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')"> <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId"> <el-form-item :label="$t('目的地')" prop="destWarehouseId">
...@@ -373,7 +373,7 @@ export default { ...@@ -373,7 +373,7 @@ export default {
}; };
}, },
computed: { computed: {
expoerCityList() { exportCityList() {
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter(item => item.type == 2)
}, },
importCityList() { importCityList() {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<!-- <img :src="noticeUrl" id="noticeImg" /> --> <!-- <img :src="noticeUrl" id="noticeImg" /> -->
<need-know keyname="warehousing" ref="needKnow" /> <need-know keyname="warehousing" ref="needKnow" />
<div style="text-align:center"> <div style="text-align:center">
<el-button type="primary" @click="$refs.needKnow.download()">{{$t('下载')}}</el-button> <el-button type="primary" @click="$refs.needKnow.downloadPdf()">{{$t('下载')}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<el-input v-model="queryParams.titleZh" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.titleZh" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="商品类型" prop="typeId"> <!-- <el-form-item label="商品属性" prop="attrId">
<el-select v-model="queryParams.typeId" placeholder="选择商品类型" clearable> <el-select v-model="queryParams.typeId" placeholder="选择商品类型" 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" />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="商品特性" prop="attrId"> <el-form-item label="商品特性" prop="attrId">
<el-select v-model="queryParams.attrId" placeholder="选择商品特性" clearable> <el-select v-model="queryParams.attrId" placeholder="选择商品特性" clearable>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="审核状态" prop="auditStatus"> <!-- <el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="选择审核状态" clearable> <el-select v-model="queryParams.auditStatus" placeholder="选择审核状态" clearable>
<el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="auditStatusItem.label" :value="auditStatusItem.value" /> <el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="auditStatusItem.label" :value="auditStatusItem.value" />
</el-select> </el-select>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<el-select v-model="queryParams.status" placeholder="选择上架状态" clearable> <el-select v-model="queryParams.status" placeholder="选择上架状态" clearable>
<el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE ? '已上架' : '已下架'" :value="statusItem.value" /> <el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE ? '已上架' : '已下架'" :value="statusItem.value" />
</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">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
...@@ -70,11 +70,19 @@ ...@@ -70,11 +70,19 @@
<el-table-column label="海关编码" align="center" prop="customsCode" /> <el-table-column label="海关编码" align="center" prop="customsCode" />
<el-table-column label="中文标题" align="center" prop="titleZh" /> <el-table-column label="中文标题" align="center" prop="titleZh" />
<el-table-column label="英文标题" align="center" prop="titleEn" /> <el-table-column label="英文标题" align="center" prop="titleEn" />
<el-table-column label="商品性" align="center" prop="attrId"> <el-table-column label="商品性" align="center" prop="attrId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getAttrName(scope.row.attrId) }}</span> <span>{{ getAttrName(scope.row.attrId) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!--商品特性-->
<el-table-column label="商品图片" align="center" prop="attrId">
<template slot-scope="scope">
<el-image :src="firstImg(scope.row.imgs)" style="width:50px; height:50px">
</el-image>
</template>
</el-table-column>
<el-table-column prop="auditStatus" align="center" label="是否审核" width="120"> <el-table-column prop="auditStatus" align="center" label="是否审核" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -86,9 +94,10 @@ ...@@ -86,9 +94,10 @@
<el-table-column prop="status" align="center" label="状态" width="120"> <el-table-column prop="status" align="center" label="状态" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.status" @change="handleStatusChange(scope.row, 'status')"> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
<!-- <el-select v-model="scope.row.status" @change="handleStatusChange(scope.row, 'status')">
<el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE + '' ? '已上架' : '已下架'" :value="parseInt(statusItem.value)" /> <el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE + '' ? '已上架' : '已下架'" :value="parseInt(statusItem.value)" />
</el-select> </el-select> -->
</template> </template>
</el-table-column> </el-table-column>
...@@ -123,16 +132,17 @@ ...@@ -123,16 +132,17 @@
</el-form-item> </el-form-item>
<el-form-item label="商品图片" prop="img"> <el-form-item label="商品图片" prop="img">
<el-col :span="8"> <image-upload v-model="form.imgs" />
<!-- <el-col :span="8">
<el-input v-model="form.imgs" placeholder="请上传图片" disabled /> <el-input v-model="form.imgs" placeholder="请上传图片" disabled />
</el-col> </el-col> -->
<el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload"> <!-- <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
<el-button size="small"> <el-button size="small">
上传图片 上传图片
<i class="el-icon-upload el-icon--right"></i> <i class="el-icon-upload el-icon--right"></i>
</el-button> </el-button>
</el-upload> </el-upload> -->
</el-form-item> </el-form-item>
...@@ -206,10 +216,11 @@ import { getProductTypeList } from "@/api/ecw/productType"; ...@@ -206,10 +216,11 @@ import { getProductTypeList } from "@/api/ecw/productType";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { CommonStatusEnum, AuditStatusEnum } from '@/utils/constants'; import { CommonStatusEnum, AuditStatusEnum } from '@/utils/constants';
import { uploadFile } from "@/api/infra/file"; import { uploadFile } from "@/api/infra/file";
import ImageUpload from '@/components/ImageUpload'
export default { export default {
name: "ProductList", name: "ProductList",
components: { components: {
ImageUpload
}, },
data() { data() {
return { return {
...@@ -309,6 +320,13 @@ export default { ...@@ -309,6 +320,13 @@ export default {
return productAttrArray.join(','); return productAttrArray.join(',');
} }
}, },
firstImg(){
return imgString => {
if(!imgString || imgString == '') return imgString
let imgs = imgString.split(',')
return imgs.length ? imgs[0] : 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