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.
This diff is collapsed.
...@@ -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