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

解决若干bug

parent 7c23156a
......@@ -106,7 +106,7 @@
//,fullscreen : false //是否开启初始化时即全屏,默认关闭
//,imagePopup:true //图片操作的浮层开关,默认打开
,imagePopup:true //图片操作的浮层开关,默认打开
//,autoSyncData:true //自动同步编辑器要提交的数据
//,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
......@@ -297,7 +297,7 @@
//,toolbarTopOffset:400
//设置远程图片是否抓取到本地保存
//,catchRemoteImageEnable: true //设置是否抓取远程图片
,catchRemoteImageEnable: true //设置是否抓取远程图片
//pageBreakTag
//分页标识符,默认是_ueditor_page_break_tag_
......
......@@ -60,3 +60,13 @@ export function exportNeedKnowExcel(query) {
responseType: 'blob'
})
}
// 下载需知
export function download(query) {
return request({
url: '/system/need-know/download',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -2,7 +2,7 @@
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10 flex-center">
<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>
</div>
<div class="list">
......@@ -18,7 +18,7 @@
</div>
<div class="line">
<div class="label">邮箱:</div>
<div class="value">{{item.emial}}</div>
<div class="value">{{item.email}}</div>
</div>
<div class="line">
<div class="label">公司:</div>
......
......@@ -5,9 +5,10 @@
</div>
</template>
<script>
import {getNeedKnowByKey} from '@/api/system/needKnow'
import {getNeedKnowByKey, download} from '@/api/system/needKnow'
import html2canvas from 'html2canvas'
import FileSaver from 'file-saver'
import saveFie from '@/plugins/download'
export default {
props:{
keyname: String
......@@ -23,6 +24,11 @@ export default {
})
},
methods:{
downloadPdf(){
download({id: this.detail.id}).then(res => {
saveFie.pdf(res, '入仓须知.pdf')
})
},
download(){
// 直接保存图片
let l = this.$loading()
......
......@@ -24,6 +24,11 @@ export default {
this.download0(data, fileName, 'text/markdown');
},
// 下载pdf
pdf(data, fileName){
this.download0(data, fileName, 'application/pdf');
},
download0(data, fileName, mineType) {
// 创建 blob
let blob = new Blob([data], {type: mineType});
......
......@@ -6,8 +6,8 @@
<div slot="header" class="card-title">{{$t('新建报价单')}}</div>
<el-form-item :label="$t('所属人')" prop="relation">
<el-radio-group v-model="form.relation">
<el-radio label="1">{{$t('发件人')}}</el-radio>
<el-radio label="2">{{$t('收件人')}}</el-radio>
<el-radio :label="1">{{$t('发件人')}}</el-radio>
<el-radio :label="2">{{$t('收件人')}}</el-radio>
</el-radio-group>
</el-form-item>
<br/>
......@@ -21,39 +21,39 @@
<div class="form-section">
<el-form-item :label="$t('发货人')" prop="consignorId" >
<div class="contact">
<el-input v-model="form.consignorName" placeholder="选择或新建" disabled/>
<el-input v-model="form.consignorName" placeholder="选择或新建" disabled style="width:120px"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
</div>
</el-form-item>
<el-form-item :label="$t('发货人电话')" prop="consignorPhone">
<!-- <area-code-selector v-model="form.consignorCountryCode" class="w-200 mr-10" disabled /> -->
<el-input :value="`${form.consignorCountryCode || ''} ${form.consignorPhone || ''}`" class="w-200" disabled />
<el-input :value="`${form.consignorCountryCode || ''} ${form.consignorPhone || ''}`" class="w-200" disabled/>
</el-form-item>
<el-form-item :label="$t('发货人公司')" prop="consignorCompany">
<el-input v-model="form.consignorCompany" disabled />
<el-input v-model="form.consignorCompany" disabled class="w-200"/>
</el-form-item>
<el-form-item label="Email" prop="consignorEmail">
<el-input v-model="form.consignorEmail" disabled />
<el-input v-model="form.consignorEmail" disabled class="w-200"/>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('收货人')" prop="consigneeId">
<div class="contact">
<el-input v-model="form.consigneeName" placeholder="请选择或新建" :disabled="true"/>
<el-input v-model="form.consigneeName" placeholder="请选择或新建" :disabled="true" style="width:120px"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='2'" />
</div>
</el-form-item>
<el-form-item :label="$t('收货人电话')" prop="consigneePhone">
<!-- <area-code-selector v-model="form.consigneeCountryCode" class="w-200 mr-10" disabled/> -->
<el-input :value="`${form.consigneeCountryCode || ''} ${form.consigneePhone || ''}`" class="w-200" disabled/>
<el-input :value="`${form.consigneeCountryCode || ''} ${form.consigneePhone || ''}`" class="w-200"/>
</el-form-item>
<el-form-item :label="$t('收货人公司')" prop="consigneeCompany">
<el-input v-model="form.consigneeCompany" :disabled="true" />
<el-input v-model="form.consigneeCompany" :disabled="true" class="w-200"/>
</el-form-item>
<el-form-item label="Email" prop="consigneeEmail">
<el-input v-model="form.consigneeEmail" :disabled="true"/>
<el-input v-model="form.consigneeEmail" :disabled="true" class="w-200"/>
</el-form-item>
</div>
......@@ -93,7 +93,7 @@
<div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" @input="calculationPrice" />
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" @input="calculationPrice" class="w-200"/>
</el-form-item>
<el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" prop="channelId">
<selector
......@@ -103,18 +103,19 @@
value-field="channelId"
label-field="nameZh"
@input="calculationPrice"
class="w-200"
></selector>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('始发城市')" prop="departureId">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')" class="w-200">
<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="form.objectiveId" :placeholder="$t('请选择目的地')">
<el-select v-model="form.objectiveId" :placeholder="$t('请选择目的地')" class="w-200">
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -122,7 +123,7 @@
<div class="form-section">
<el-form-item :label="$t('选择线路')" prop="lineId">
<!-- <el-input :value="getRouterNameById(form.lineId)" readonly :placeholder="$t('请在右侧选择线路')"></el-input> -->
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')" class="w-200"></el-input>
</el-form-item>
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">
<template v-for="item in routerList">
......@@ -208,7 +209,7 @@
}"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.worth" />
<el-input v-model="scope.row.worth" @input="calculationPrice" />
</el-form-item>
</template>
</el-table-column>
......@@ -365,7 +366,7 @@
<div class="card-title" slot="header">{{$t('通用')}}</div>
<div class="form-section">
<el-form-item :label="$t('唛头')" prop="marks">
<el-input v-model="form.marks" placeholder=""></el-input>
<el-input v-model="form.marks" placeholder="" class="w-200"></el-input>
</el-form-item>
</div>
<div class="form-section">
......@@ -375,15 +376,15 @@
</div>
<div class="form-section">
<el-form-item :label="$t('预计结束时间')" prop="stopTime">
<el-date-picker v-model="form.stopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.stopTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('是否控货')" prop="control">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" defaultable />
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" />
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('竞争对手')" prop="competitor">
<el-input v-model="form.competitor" placeholder=""></el-input>
<el-input v-model="form.competitor" placeholder="" class="w-200"></el-input>
</el-form-item>
<el-form-item :label="$t('重要程度')" prop="importance">
<el-rate v-model="form.importance"></el-rate>
......@@ -391,10 +392,10 @@
</div>
<div class="form-section">
<el-form-item :label="$t('价格有效时间')" prop="startTime">
<el-date-picker v-model="form.startTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.startTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item>
<el-form-item label="" prop="endTime">
<el-date-picker v-model="form.endTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.endTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item>
</div>
......@@ -404,7 +405,7 @@
接口要求数据为整数,所以增加trade_type类型的字典,用1234代码以下不同类型
FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)
-->
<dict-selector :type="DICT_TYPE.ECW_TRADE_TYPE" fomtter="number" v-model="form.tradeType" />
<dict-selector :type="DICT_TYPE.ECW_TRADE_TYPE" fomtter="number" v-model="form.tradeType" class="w-200"/>
</el-form-item>
<el-form-item :label="$t('交货地址')">
......@@ -464,7 +465,8 @@
<el-form-item label="" class="mt-20">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button type="primary" @click="submitForm(2)">{{$t('保存草稿')}}</el-button>
<el-button type="primary" @click="submitForm(3)">{{$t('确认报价')}}</el-button>
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
</el-form-item>
</el-form>
......@@ -517,6 +519,7 @@ export default {
form: {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
......@@ -706,6 +709,11 @@ export default {
})
}
},
activated(){
if(this.form.offerId != this.$route.query.id){
this.getOffer()
}
},
created() {
getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
......@@ -715,6 +723,11 @@ export default {
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
if(this.$route.query.id){
this.getOffer()
}//else this.addProduct()
},
methods: {
getOffer(){
getOffer(this.$route.query.id).then(res => {
let formData = res.data
formData.type = formData.type ? formData.type.split(',').filter(item => item != '') : []
......@@ -748,9 +761,7 @@ export default {
this.onContactChoose(data.list.find(item => item.customerContactsId == res.data.consignorId))
})
})
}//else this.addProduct()
},
methods: {
onContactChoose(contact){
console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return
......@@ -838,7 +849,7 @@ export default {
})
},
/** 提交按钮 */
submitForm() {
submitForm(status) {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
......@@ -851,18 +862,21 @@ export default {
item.transportId = this.form.transportId
// item.brandType = item.brand ? 1 : 0
})
this.transportList.map(item => {
/* this.transportList.map(item => {
if(item._enabled){
item.lineIds = Array.from(item.lineIdSet).join(',')
item.channelIds = Array.from(item.channelIdSet).join(',')
}
})
}) */
// 修改的提交
if (this.form.offerId != null) {
let data = Object.assign({}, this.form, {
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
prodUpdateReqVOList: this.getProductListWithDefaultValue()
})
if(data.status < 3){
data.status = status
}
updateOffer(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功"));
this.$router.back()
......@@ -871,7 +885,8 @@ export default {
}
let data = Object.assign({}, this.form, {
// transportCreateReqVOList: this.transportList.filter(item => item._enabled),
prodCreateReqVOList: this.getProductListWithDefaultValue()
prodCreateReqVOList: this.getProductListWithDefaultValue(),
status
})
// 添加的提交
createOffer(data).then(response => {
......
......@@ -2,19 +2,67 @@
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('报价单号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('请输入报价单号')" clearable @keyup.enter.native="handleQuery"/>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="$t('编号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery"/>
<!--// TODO -->
</el-form-item>
<el-form-item :label="$t('订单编号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单编号')" clearable @keyup.enter.native="handleQuery"/>
<el-form-item :label="$t('客户')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery"/>
<!--// TODO -->
</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-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
</el-form-item>
</div>
</el-form>
<!-- 操作工具栏 -->
......@@ -55,7 +103,7 @@
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost">
<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" />
{{item.amount}} {{currencyMap[item.currencyId]}}
</div>
......@@ -65,13 +113,35 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<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">
<el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('详情')}}</el-button>
<el-button size="mini" type="text" @click="$router.push('edit?id=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-button>
<el-button size="mini" type="text" @click="$router.push('logList?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-button>
<el-link type="primary" @click.native="$router.push('detail?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:detail']">{{$t('详情')}}</el-link>
<el-link type="primary" @click="$router.push('edit?id=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-link>
<el-link type="primary" @click="$router.push('logList?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-link>
</template>
<template v-if="scope.row.status == 2">
<el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)"
......@@ -87,10 +157,14 @@
<el-button size="mini" type="text"
v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-button>
</template>
<el-button size="mini" type="text" @click="$router.push('detail?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:update']">{{$t('详情')}}</el-button>
<el-button size="mini" type="text"
v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-button>
</div>
</el-popover> -->
</template>
</el-table-column>
</el-table>
......@@ -104,10 +178,12 @@
<script>
import { deleteOffer, getOfferPage, exportOfferExcel } from "@/api/ecw/offer";
import { getCurrencyList } from '@/api/ecw/currency';
import {getTradeCityList} from '@/api/ecw/region'
import UserSelector from '@/components/UserSelector'
export default {
name: "Offer",
components: {
UserSelector
},
data() {
return {
......@@ -160,7 +236,8 @@ export default {
estCost: null,
sendstatus: null,
},
currencyList: []
currencyList: [],
tradeCityList:[]
};
},
......@@ -172,12 +249,21 @@ export default {
})
return map
},
exportCityList() {
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
},
},
created() {
this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => {
this.currencyList = res.data
})
this.getList();
},
methods: {
/** 查询列表 */
......
......@@ -25,7 +25,7 @@
</template>
<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-form-item>
</el-form>
......@@ -86,8 +86,12 @@ export default {
return;
}
let data = Object.assign({}, this.form)
updateOfferResult(data).then((response) => {
this.$modal.msgSuccess("修改成功");
updateOfferResult(data).then(response => {
this.$modal.msgSuccess(this.$t("赢单成功"));
if(response.data > 0){
this.$redirect('../order/edit?id=' + response.data)
return
}
this.$router.back();
});
});
......
......@@ -11,7 +11,7 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="offer.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
// TODO
{{channel ? $l(channel, 'name') : '/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{offer.createTime}}</el-descriptions-item>
......@@ -47,25 +47,25 @@
<el-table-column
:label="$t('原价')">
<template v-slot="{row}">
运费{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
{{$t('运费')}}{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br>
清关费:{{ row.originalClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
{{$t('清关费')}}{{ row.oneClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template>
</el-table-column>
<el-table-column
label="成本价">
<template v-slot="{row}">
运费{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
{{$t('运费')}}{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br>
清关费:{{ row.clearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
{{$t('清关费')}}{{ row.oneClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template>
</el-table-column>
<el-table-column
label="销售价">
:label="$t('销售价')">
<template v-slot="{row}">
运费:{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
{{$t('运费')}}{{ row.saleSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br>
清关费:{{ row.clearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
{{$t('清关费')}}{{ row.oneClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template>
</el-table-column>
<el-table-column
......@@ -96,6 +96,7 @@ import {getCurrencyList} from "@/api/ecw/currency"
import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi'
import {listByIds} from '@/api/ecw/region'
import {getChannel} from '@/api/ecw/channel'
export default {
name: "OfferSpecial",
components: {
......@@ -128,7 +129,8 @@ export default {
currencyList:[],
productAttrList:[],
objective: null,
departure: null
departure: null,
channel: null, // 渠道信息
};
},
watch:{
......@@ -147,6 +149,13 @@ export default {
this.loading = false
this.offer = response.data
this.getCity()
this.getChannel()
})
},
getChannel(){
if(!this.offer.channelId) return
getChannel(this.offer.channelId).then(res => {
this.channel = res.data
})
},
getCity(){
......@@ -171,14 +180,14 @@ export default {
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
map[item.id] = this.$l(item, 'title')
})
return map
}
......
......@@ -78,7 +78,11 @@
</template>
</el-table-column>
<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">
<template slot-scope="{row}">{{row.releaseNum}}</template>
</el-table-column>
......
......@@ -22,7 +22,7 @@
</el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId">
<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-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId">
......@@ -373,7 +373,7 @@ export default {
};
},
computed: {
expoerCityList() {
exportCityList() {
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList() {
......
......@@ -31,7 +31,7 @@
<!-- <img :src="noticeUrl" id="noticeImg" /> -->
<need-know keyname="warehousing" ref="needKnow" />
<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>
</el-dialog>
</div>
......
......@@ -15,11 +15,11 @@
<el-input v-model="queryParams.titleZh" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="商品类型" prop="typeId">
<!-- <el-form-item label="商品属性" prop="attrId">
<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-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="商品特性" prop="attrId">
<el-select v-model="queryParams.attrId" placeholder="选择商品特性" clearable>
......@@ -27,7 +27,7 @@
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<!-- <el-form-item label="审核状态" prop="auditStatus">
<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-select>
......@@ -37,7 +37,7 @@
<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-select>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
......@@ -70,11 +70,19 @@
<el-table-column label="海关编码" align="center" prop="customsCode" />
<el-table-column label="中文标题" align="center" prop="titleZh" />
<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">
<span>{{ getAttrName(scope.row.attrId) }}</span>
</template>
</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">
<template slot-scope="scope">
......@@ -86,9 +94,10 @@
<el-table-column prop="status" align="center" label="状态" width="120">
<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-select>
</el-select> -->
</template>
</el-table-column>
......@@ -123,16 +132,17 @@
</el-form-item>
<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-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">
上传图片
<i class="el-icon-upload el-icon--right"></i>
</el-button>
</el-upload>
</el-upload> -->
</el-form-item>
......@@ -206,10 +216,11 @@ import { getProductTypeList } from "@/api/ecw/productType";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { CommonStatusEnum, AuditStatusEnum } from '@/utils/constants';
import { uploadFile } from "@/api/infra/file";
import ImageUpload from '@/components/ImageUpload'
export default {
name: "ProductList",
components: {
ImageUpload
},
data() {
return {
......@@ -309,6 +320,13 @@ export default {
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