Commit f5d996fc authored by 我在何方's avatar 我在何方
parents c3ee67ac eae3e96f
......@@ -203,3 +203,28 @@ export function orderStatistics(params){
params
})
}
//创建客户信用日志
export function creditLogCreate(data){
return request({
url:'/customer/credit-log/create',
method:'post',
data
})
}
//获得客户统计
export function creditScoreStatistic(params){
return request({
url:'/customer/detail/infoList/creditScoreStatistic',
method:'get',
params
})
}
//获取账单数据
export function infoListReceiptPage(params){
return request({
url:'/customer/detail/infoList/receiptPage',
method:'get',
params
})
}
......@@ -90,10 +90,11 @@ export function createOfferSpecial(data) {
}
// 特价详情
export function getOfferSpecial(offerProdId) {
export function getOfferSpecial(offerProdId, params) {
return request({
url: '/ecw/offer/special/info/' + offerProdId,
method: 'get'
method: 'get',
params
})
}
......
......@@ -242,32 +242,6 @@ export function getMyOrderPage(query) {
}
// 创建提货
export function createOrderPickup(data){
return request({
url: '/ecw/order-pickup/create',
method: 'post',
data
})
}
// 批量提货
export function createOrderPickupBatch(data){
return request({
url: '/ecw/order-pickup/createBatch',
method: 'post',
data
})
}
// 分批提货
export function createOrderPickupSplitBatch(data){
return request({
url: '/ecw/order-pickup/createSplitBatch',
method: 'post',
data
})
}
//根据流程ID获得订单信息
export function applicationGetOrderByProcessId(params){
return request({
......@@ -454,4 +428,4 @@ export function orderSpecialNeedGet(params){
method:'delete',
data
})
}
}
\ No newline at end of file
import request from '@/utils/request'
// 根据订单编号获得分批提货数据
export function getPickUpListByOrderNo(params){
return request({
url:'/ecw/order-pickup/getPickUpListByOrderNo',
method:'get',
params
})
}
// 创建提货
export function create(data){
return request({
url: '/ecw/order-pickup/create',
method: 'post',
data
})
}
// 批量提货
export function createBatch(data){
return request({
url: '/ecw/order-pickup/createBatch',
method: 'post',
data
})
}
// 分批提货
export function createSplitBatch(data){
return request({
url: '/ecw/order-pickup/createSplitBatch',
method: 'post',
data
})
}
// 获取提货日志
export function getAllPickUpListByOrderNo(params){
return request({
url: '/ecw/order-pickup/getAllPickUpListByOrderNo',
method: 'get',
params
})
}
// 撤销提货日志
export function deletePickup(params){
return request({
url: '/ecw/order-pickup/delete',
method: 'delete',
params
})
}
......@@ -268,28 +268,6 @@ export const constantRoutes = [
}
]
},
{
path: '/offer',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'special/:offerId(\\d+)',
component: (resolve) => import('@/views/ecw/offer/special'),
props: true,
name: 'special',
meta: {title: '特价申请', icon: '', activeMenu: '/offer/index'}
},
{
path: 'discount/:offerProdId(\\d+)',
component: (resolve) => import('@/views/ecw/offer/specialDiscount'),
props: true,
name: 'discount',
meta: {title: '优惠申请', icon: '', activeMenu: '/offer/index'}
},
]
},
{
path: '/order',
component: Layout,
......
......@@ -131,7 +131,7 @@ import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssig
import {getDate} from "@/utils/dateUtils";
import {listSimpleUsers} from "@/api/system/user";
import {getActivityList} from "@/api/bpm/activity";
import specialDiscount from "@/views/ecw/offer/specialDiscount"
import specialDetail from "@/views/ecw/offer/components/specialDetail"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail'
import SplitDetail from '@/views/ecw/order/components/SplitDetail'
......@@ -142,7 +142,7 @@ export default {
name: "ProcessInstanceDetail",
components: {
Parser,
specialDiscount,
specialDetail,
warehouseDetails,
shippingDetail,
SplitDetail,
......@@ -158,7 +158,7 @@ export default {
}
const map = {
"special-discount": {
component: 'special-discount',
component: 'special-detail',
id: this.processInstance.businessKey,
readonly: true
},
......
......@@ -233,20 +233,28 @@
<customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
</el-tab-pane>
<el-tab-pane label="账单">
<el-table style="width: 100%">
<el-table-column label="序号"></el-table-column>
<el-table-column label="账单"></el-table-column>
<el-table-column label="订单号"></el-table-column>
<el-table-column label="箱数"></el-table-column>
<el-table-column label="方数"></el-table-column>
<el-table-column label="重量"></el-table-column>
<el-table-column label="类型"></el-table-column>
<el-table-column label="费用类型"></el-table-column>
<el-table-column label="金额"></el-table-column>
<el-table-column label="汇率"></el-table-column>
<el-table-column label="实收金额"></el-table-column>
<el-table-column label="实收日期"></el-table-column>
<el-table-column label="业务员"></el-table-column>
<el-table style="width: 100%" :data="infoListReceiptList">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="账单" prop="receiptNo"></el-table-column>
<el-table-column label="订单号" prop="orderNo"></el-table-column>
<el-table-column label="箱数" prop="num"></el-table-column>
<el-table-column label="方数" prop="volume" ></el-table-column>
<el-table-column label="重量" prop="weight" ></el-table-column>
<el-table-column label="类型">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.PAYMENT_TYPE" :value="row.collectionType" />
</template>
</el-table-column>
<el-table-column label="费用类型">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column label="金额" prop="totalAmount">
</el-table-column>
<el-table-column label="已核销比例" prop="writeOffScale"></el-table-column>
<el-table-column label="实收日期" prop="writeOffAt"></el-table-column>
<el-table-column label="业务员" prop="salesmanName"></el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="数据">
......@@ -312,11 +320,7 @@
<div slot="header" class="clearfix">
<el-button style="float: right;" type="primary" @click="dialogVisible = true" >添加信用日志</el-button>
<el-descriptions :column="5" border>
<el-descriptions-item label="信用分"></el-descriptions-item>
<el-descriptions-item label="身份认证"></el-descriptions-item>
<el-descriptions-item label="贷款"></el-descriptions-item>
<el-descriptions-item label="提货率"></el-descriptions-item>
<el-descriptions-item label="发货"></el-descriptions-item>
<el-descriptions-item v-for="(item,index) in creditScoreStatisticObj" :key="index" :label="creditScoreCalculation(item.type)">{{item.score}}</el-descriptions-item>
</el-descriptions>
</div>
<el-table :data="customerCreditLogList">
......@@ -329,7 +333,7 @@
</el-table-column>
<el-table-column prop="score" label="规则得分"></el-table-column>
<el-table-column prop="remark" label="备注"></el-table-column>
<el-table-column label="添加人"></el-table-column>
<el-table-column label="添加人" prop="createName"></el-table-column>
<el-table-column label="时间">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
......@@ -366,20 +370,22 @@
width="30%"
>
<h1 slot="title">
给客户【小六子】添加信用日志
给客户【{{customer.name}}】添加信用日志
</h1>
<el-form label-width="100">
<el-form-item label="客户编号:"></el-form-item>
<el-form-item label="客户编号:">{{customer.number}}</el-form-item>
<el-form-item label="信用类别">
<el-select ></el-select>
<el-select v-model="creditFrom.ruleId">
<el-option v-for="(item,index) in creditTypeList" :key="index" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="信用分"></el-form-item>
<el-form-item v-if="creditTypeList.length > 0" label="信用分">{{(creditTypeList.find(r=>creditFrom.ruleId === r.id) || {}).score }}</el-form-item>
<el-form-item label="备注">
<el-input type="textarea"> </el-input>
<el-input type="textarea" v-model="creditFrom.remark"> </el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button>提交</el-button>
<el-button @click="submit">提交</el-button>
<el-button @click="dialogVisible = false" >取消</el-button>
</span>
</el-dialog>
......@@ -392,7 +398,13 @@ import {
getCustomerSelect,
getBrankByCustomer,
levelLogPage,
customerCreditLogPage, infoListOrderPage, infoListOfferPage, orderStatistics
customerCreditLogPage,
infoListOrderPage,
infoListOfferPage,
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -404,6 +416,7 @@ import { listServiceUser } from '@/api/system/user'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import {getOrderPage} from "@/api/ecw/order";
import Template from "@/views/cms/template";
import {getCreditRulePage} from "@/api/customer/creditRule";
export default {
name: 'query',
......@@ -416,6 +429,10 @@ export default {
CustomerComplaint
},
created() {
//获取信用类型
getCreditRulePage({page:1,rows:999,type:2}).then(r => {
this.creditTypeList = r.data.list
})
getNodeList().then(r => {
this.nodeList = r.data
})
......@@ -442,6 +459,8 @@ export default {
this.getorderList()
this.getInfoListOfferPage()
this.getOrderStatistics()
this.creditScoreStatisticFn()
this.infoListReceiptFn()
},
data() {
return {
......@@ -531,7 +550,16 @@ export default {
},
infoListOfferTotal:0,
infoListOfferList:[],
orderStatisticsObj:{}
orderStatisticsObj:{},
creditTypeList:[],
creditFrom:{},//添加信用 日志
creditScoreStatisticObj:[],
infoListReceiptList:[],
infoListReceiptFrom:{
pageNo:1,
pageSize:10,
},
infoListReceiptTotal:0
}
},
computed: {
......@@ -551,6 +579,15 @@ export default {
},
id() {
return this.customerId ? parseInt(this.customerId) : undefined
},
creditScoreCalculation(){
return (val)=>{
if(val === 'all'){
return '信用分'
}else{
return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label
}
}
}
},
methods:{
......@@ -614,6 +651,32 @@ export default {
this.orderStatisticsObj = r.data
}
})
},
submit(){
creditLogCreate({customerId:this.id,...this.creditFrom}).then(r => {
if(r.code === 0){
this.creditLogPage();
this.creditFrom = {};
this.dialogVisible = false;
}
})
},
//获得信用客户统计
creditScoreStatisticFn(){
creditScoreStatistic({customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0) this.creditScoreStatisticObj = r.data
})
},
// 获取账单数据
infoListReceiptFn(){
infoListReceiptPage({...this.infoListReceiptFrom,customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0){
this.infoListReceiptList = r.data.list;
this.infoListReceiptTotal = r.data.total;
}
})
}
}
}
......
<template>
<el-descriptions border :column="1">
<el-descriptions-item label="商品类型">{{ form.productType }}</el-descriptions-item>
<el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-descriptions-item>
<el-descriptions-item label="是否预付">{{ form.isPayAdvance === 0 ? '' : '' }}</el-descriptions-item>
<el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item>
</el-descriptions>
</template>
<script>
import {createOfferSpecial, getOfferSpecial, getOfferSpecialByApproveId} from "@/api/ecw/offer"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
export default {
name: "specialDetail",
props: {
offerProdId: Number,
id: [String, Number],
readonly: {
type: Boolean,
default: false
}
},
created() {
// 从流程查看详情
if(this.id)
this.getOfferSpecialByApproveId()
getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
},
data() {
return {
getDictDataLabel,
DICT_TYPE,
unitList:[],
channelList:[],
currencyList:[],
productAttrList:[],
ccIdArr: [],
form: {
type: 1
},
rules:{
seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'}
}
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
console.log(this.form.type)
createOfferSpecial(Object.assign({}, this.form, {type: 1})).then(res => {
this.$message.success(r.msg || '提交成功')
})
})
},
getOfferSpecial(){
getOfferSpecial(this.offerProdId, {type: 1}).then(r => {
this.form = r.data
})
},
getOfferSpecialByApproveId(){
getOfferSpecialByApproveId(this.id).then(r => {
this.form = r.data
})
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
}
},
computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
})
return map
}
}
}
</script>
<style scoped>
</style>
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('优惠申请')">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('商品类型')">
<span>{{ getProductAttrNameById(form.productType) }}</span>
</el-form-item>
<el-form-item :label="$t('商品名称')">
<span>{{ form.prodTitleZh }}</span>
</el-form-item>
<el-form-item :label="$t('英文名称')">
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item :label="$t('线路')">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-form-item>
<el-form-item :label="$t('是否预付')">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="form.isPayAdvance" />
</el-form-item>
<el-row v-if="!form.charging">
<el-col :span="12">
<el-form-item :label="$t('旧运费')">
{{form.orgSeaFreight}} {{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('旧清关费')">
{{form.orgClearanceFreight}} {{ currentMap[form.orgClearanceFreightCurrency] }} / {{ unitMap[form.orgClearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-row v-if="!form.charging">
<el-col :span="12">
<el-form-item :label="$t('新运费')" style="width: 400px" prop="seaFreight">
<el-input v-model="form.seaFreight" type="number" class="w-100" />
{{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('新清关费')" style="width: 400px" prop="clearanceFreight">
<el-input v-model="form.clearanceFreight" type="number" class="w-100" />
{{ currentMap[form.orgClearanceFreightCurrency] }} / {{ unitMap[form.orgClearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('旧全包价')" v-if="form.charging">
{{form.orgSeaFreight}} {{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}
</el-form-item>
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="form.charging">
<el-input v-model="form.seaFreight" type="number" class="w-100" />
{{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}
</el-form-item>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="sheet_sale" v-model="ccIdArr" />
<div>
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
</el-dialog>
</template>
<script>
import {createOfferSpecial, getOfferSpecial, getOfferSpecialByApproveId} from "@/api/ecw/offer"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
import WorkFlow from '@/components/WorkFlow'
export default {
name: "specialDiscount",
props: {
offerProdId: Number,
},
components: {
DictSelector, WorkFlow
},
created() {
// 查看详情,列表进来的
if(this.offerProdId){
this.getOfferSpecial()
}
getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
},
data() {
return {
getDictDataLabel,
DICT_TYPE,
unitList:[],
channelList:[],
currencyList:[],
productAttrList:[],
ccIdArr: [],
form: {
type: 1
},
rules:{
seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'}
}
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
console.log(this.form.type)
createOfferSpecial(Object.assign({}, this.form, {type: 1})).then(res => {
this.$message.success(this.$t('提交成功'))
})
})
},
getOfferSpecial(){
getOfferSpecial(this.offerProdId, {type: 1}).then(r => {
this.form = r.data
})
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
},
closeDialog(){
this.$emit('close')
}
},
computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
}
}
}
</script>
......@@ -465,8 +465,13 @@
<el-form-item label="" class="mt-20">
<el-button type="primary" @click="submitForm(2)">{{$t('保存草稿')}}</el-button>
<el-button type="primary" @click="submitForm(3)">{{$t('确认报价')}}</el-button>
<!-- 非草稿状态显示为编辑按钮 -->
<el-button v-if="form.offerId && form.status != 2" type="primary" @click="submitForm(2)">{{$t('编辑')}}</el-button>
<template v-else>
<el-button type="primary" @click="submitForm(2)">{{$t('保存草稿')}}</el-button> <!-- 草稿 -->
<el-button type="primary" @click="submitForm(3)">{{$t('确认报价')}}</el-button> <!-- 需求确认 -->
</template>
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
</el-form-item>
</el-form>
......@@ -847,19 +852,8 @@ export default {
/** 提交按钮 */
submitForm(status) {
this.$refs["form"].validate((valid, errors) => {
console.log({valid, errors})
if (!valid) {
return this.$showFormValidateErrors(errors);
/* let h = this.$createElement
this.$notify({
'title': '表单错误',
type: 'warning',
message: h('div', [
h('div', '请填写某某'),
h('div', '水电费水电费')
])
}) */
return;
return this.$showFormValidateErrors(errors)
}
this.form.prodCreateReqVOList.map(item => {
......@@ -867,14 +861,8 @@ export default {
item.lineId = this.form.lineId
item.channelId = this.form.channelId
item.transportId = this.form.transportId
// item.brandType = item.brand ? 1 : 0
})
/* 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, {
......@@ -891,7 +879,6 @@ export default {
return;
}
let data = Object.assign({}, this.form, {
// transportCreateReqVOList: this.transportList.filter(item => item._enabled),
prodCreateReqVOList: this.getProductListWithDefaultValue(),
status
})
......
......@@ -113,18 +113,26 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!--
0 取消 恢复
1 特价审批 编辑、跟进、 取消 删除
2 草稿 编辑、 删除
3 需求确认 编辑、跟进、结果、特价、取消 删除
4 赢单 删除
5 输单 删除
6 完成 删除
-->
<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-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" >{{$t('详情')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1,2,3].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-if="[1,3].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('结果')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[3].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item @click.native="$alert('// TODO')" v-if="[1,3].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('取消')}}</el-dropdown-item>
<el-dropdown-item @click.native="$alert('// TODO')" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item @click.native="$alert('// TODO')" v-if="[1,2,3,4,5,6].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......
......@@ -69,10 +69,9 @@
</template>
</el-table-column>
<el-table-column
prop="address"
:label="$t('操作')">
<template v-slot="{row}">
<el-button size="mini" type="text" @click="$router.push(`/offer/discount/${row.offerProdId}?offerId=${row.offerId}`)">{{$t('优惠申请')}}</el-button>
<el-button size="mini" type="text" @click="showOfferProdId=row.offerProdId">{{$t('优惠申请')}}</el-button>
<el-button size="mini" type="text" @click="$alert('// TODO')">{{$t('佣金规则')}}</el-button>
</template>
</el-table-column>
......@@ -84,6 +83,7 @@
<el-button type="primary">申请泡货优惠</el-button>
<el-button type="primary">关闭窗口</el-button>
</div> -->
<special-discount v-if="showOfferProdId" :offerProdId="showOfferProdId" @close="showOfferProdId=null" @success="onSuccess" />
</el-card>
</div>
</template>
......@@ -97,9 +97,11 @@ import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi'
import {listByIds} from '@/api/ecw/region'
import {getChannel} from '@/api/ecw/channel'
import specialDiscount from '@/views/ecw/offer/components/specialDiscount'
export default {
name: "OfferSpecial",
components: {
specialDiscount
},
props: {
offerId: String
......@@ -131,6 +133,7 @@ export default {
objective: null,
departure: null,
channel: null, // 渠道信息
showOfferProdId: null // 显示申请优惠的产品id
};
},
watch:{
......@@ -145,11 +148,12 @@ export default {
methods: {
getOffer(){
this.loading = true
getOffer(this.offerId || this.params.offerId).then(response => {
this.loading = false
getOffer(this.offerId || this.$route.query.offerId).then(response => {
this.offer = response.data
this.getCity()
this.getChannel()
}).finally(() => {
this.loading = false
})
},
getChannel(){
......@@ -174,6 +178,9 @@ export default {
})
})
return result.join(',')
},
onSuccess(){
this.showOfferProdId = null
}
},
computed: {
......
<template>
<div class="app-container">
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-card class="box-card">
<div slot="header" class="clearfix" v-if="!readonly">
<span>优惠申请</span>
</div>
<el-form v-if="!readonly" ref="form" :model="form" label-width="80px">
<el-form-item label="商品类型">
<span>{{ getProductAttrNameById(form.productType) }}</span>
</el-form-item>
<el-form-item label="商品名称">
<span>{{ form.prodTitleZh }}</span>
</el-form-item>
<el-form-item label="英文名称">
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-form-item>
<el-form-item label="是否预付">
{{ form.isPayAdvance === 0 ? '' : '' }}
</el-form-item>
<el-form-item label="旧运费">
<el-input v-model="form.orgSeaFreight" readonly style="width: 400px">
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgSeaFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgSeaFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="旧清关费">
<el-input v-model="form.orgClearanceFreight" readonly style="width: 400px">
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新运费" required style="width: 400px">
<el-input v-model="form.seaFreight" type="number">
<el-select v-model="form.seaFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.seaFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="新清关费" required style="width: 400px">
<el-input v-model="form.clearanceFreight" type="number">
<el-select v-model="form.clearanceFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.clearanceFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
</el-form>
<div v-if="!readonly">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<el-descriptions border v-if="readonly" :column="1">
<el-descriptions-item label="商品类型">{{ form.productType }}</el-descriptions-item>
<el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-descriptions-item>
<el-descriptions-item label="是否预付">{{ form.isPayAdvance === 0 ? '' : '' }}</el-descriptions-item>
<el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {createOfferSpecial, getOfferSpecial, getOfferSpecialByApproveId} from "@/api/ecw/offer"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
export default {
name: "specialDiscount",
props: {
offerProdId: String,
id: Number,
readonly: {
type: Boolean,
default: false
}
},
components: {
DictSelector
},
created() {
// 临时
if(this.$route.query.offerId){
this.form.offerId = this.$route.query.offerId - 0
// this.getOffer()
}
// 查看详情,列表进来的
if(this.offerProdId){
this.form.offerProdId = this.offerProdId - 0
this.getOfferSpecial()
}
// 从流程查看详情
if(this.id)
this.getOfferSpecialByApproveId()
getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
},
data() {
return {
getDictDataLabel,
DICT_TYPE,
unitList:[],
channelList:[],
currencyList:[],
productAttrList:[],
form: {
"applyResult": "",
"applyStatus": 0,
"channelId": 0,
"clearanceFreight": 0,
"clearanceFreightCurrency": 0,
"clearanceFreightVolume": 0,
"createTime": "",
"departureId": 0,
"departureName": "",
"details": "",
"finishBy": "",
"finishTime": "",
"followUpSalesmanId": "",
"formId": "",
"isPayAdvance": 0,
"lineId": 0,
"objectiveId": 0,
"objectiveName": "",
"offerApprovalId": 0,
"offerId": 0,
"offerProdId": 0,
"orgClearanceFreight": 0,
"orgClearanceFreightCurrency": 0,
"orgClearanceFreightVolume": 0,
"orgSeaFreight": 0,
"orgSeaFreightCurrency": 0,
"orgSeaFreightVolume": 0,
"processingResults": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"productType": 0,
"seaFreight": 0,
"seaFreightCurrency": 0,
"seaFreightVolume": 0,
"status": 0,
"transportId": 0,
"type": 0
}
}
},
methods: {
handleSubmit(){
createOfferSpecial({
clearanceFreight: this.form.clearanceFreight,
clearanceFreightCurrency: this.form.clearanceFreightCurrency,
clearanceFreightVolume: this.form.clearanceFreightVolume,
offerId: this.form.offerId,
offerProdId: this.form.offerProdId,
seaFreight: this.form.seaFreight,
seaFreightCurrency: this.form.seaFreightCurrency,
seaFreightVolume: this.form.seaFreightVolume,
}).then(r => {
this.$message.success(r.msg || '提交成功')
})
},
getOfferSpecial(){
getOfferSpecial(this.form.offerProdId).then(r => {
this.form = r.data
})
},
getOfferSpecialByApproveId(){
getOfferSpecialByApproveId(this.id).then(r => {
this.form = r.data
})
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
}
},
computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
})
return map
}
}
}
</script>
<style scoped>
</style>
......@@ -83,20 +83,10 @@
调至
</div></el-col>
<el-col :span="8"><el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" :value="item.id" :label="item.titleZh"
<el-option v-for="(item ,index) in availableWarehouse" v-if="item.status !== 1" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select></el-col>
</el-row>
<div style="display: flex;justify-content:center; margin-top: 20px">
<div style="width: 200px; margin: 0 10px">
</div>
<div>
</div>
<div style="width: 200px;">
</div>
</div>
<el-divider></el-divider>
<h1 class="title">
审批流程
......
......@@ -2,7 +2,7 @@
<el-dialog :title="$t('批量提货')" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules">
<el-tabs v-model="current" type="card">
<el-tab-pane :label="$t('全部提货')" name="createOrderPickupBatch">
<el-tab-pane :label="$t('全部提货')" name="createBatch">
<el-form-item :label="$t('订单号') + '/' + this.$t('提单号')" prop="orderId">
<el-input v-model="form.orderId" :placeholder="$t('例:NA2200001L')"></el-input>
<div>{{$t('注:单号之间使用逗号或空格隔开')}}</div>
......@@ -11,8 +11,25 @@
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-tab-pane>
<el-tab-pane :label="$t('分批提货')" name="createOrderPickupSplitBatch">
// TODO
<el-tab-pane :label="$t('分批提货')" name="createSplitBatch">
<el-form-item :label="$t('订单号') + '/' + this.$t('提单号')" prop="orderId">
<el-input v-model="form.orderId" :placeholder="$t('例:NA2200001L')" class="w-200 mr-10"></el-input>
<el-button type="primary" icon="el-icon-search" @click="getPickUpListByOrderNo"></el-button>
<div>{{$t('注:单号之间使用逗号或空格隔开')}}</div>
</el-form-item>
<el-form-item :label="$t('提货时间')" prop="pickTime">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item label="">
<el-table :data="orderList">
<el-table-column label="提单号" prop="tidanNo"></el-table-column>
<el-table-column label="提货数量" prop="tidanNo">
<template slot-scope="{row}">
<el-input v-model.number="row.pickNum" placeholder=""></el-input>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item label="">
......@@ -22,14 +39,15 @@
</el-dialog>
</template>
<script>
import {createOrderPickupBatch, createOrderPickupSplitBatch} from '@/api/ecw/order'
import {createBatch, createSplitBatch, getPickUpListByOrderNo} from '@/api/ecw/orderPickup'
export default {
props:{
},
data(){
return {
current: 'createOrderPickupBatch',
current: 'createBatch',
show: false,
form:{
orderId: '',
......@@ -39,7 +57,8 @@ export default {
rules:{
orderId: [{required: true, message: this.$t('请填写单号')}],
pickTime: [{required: true, message: this.$t('请选择时间')}]
}
},
orderList:[]
}
},
computed:{
......@@ -56,20 +75,37 @@ export default {
}
let orderIdArr = this.form.orderId.replace(/,/g, ' ').split(' ').filter(item => item !='')
let data = []
for(let orderId of orderIdArr){
data.push({
pickType: 1,
orderId,
pickTime: this.form.pickTime
// 分批提货
if(this.current == 'createSplitBatch'){
data = this.orderList.map(item => {
item.pickType = 1
item.pickTime = this.form.pickTime
return item
})
}
// 批量提货
else{
for(let orderId of orderIdArr){
data.push({
pickType: 1, // 1字体,2送货上门
orderId,
pickTime: this.form.pickTime
})
}
}
({createOrderPickupBatch, createOrderPickupSplitBatch}[this.current])(data).then(res => {
({createBatch, createSplitBatch}[this.current])(data).then(res => {
this.$message.success(this.$t("操作成功"));
this.$emit('success')
})
})
},
getPickUpListByOrderNo(){
getPickUpListByOrderNo({orderIds: this.form.orderId}).then(res => {
this.orderList = res.data
})
},
closeDialog(){
this.show = false
this.$emit('close');
......
<template>
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" v-loading="loading">
<el-timeline v-if="list.length">
<el-timeline-item v-for="item in list" :timestamp="item.pickTime|parseTime" placement="top" :key="item.id">
<div> {{item.deleted ? $t('已撤销') : $t('已提货')}} <el-button v-if="!item.deleted" size="mini" @click="deletePickup(item.id)" class="ml-10">{{$t('撤销')}}</el-button></div>
<div>{{$t('提货箱数')}}{{item.pickNum}}</div>
<div>{{$t('操作人')}}{{item.creator}}</div>
<div v-if="item.deleted">{{$t('撤销人')}}{{item.updater}}</div>
</el-timeline-item>
</el-timeline>
<el-empty v-if="!loading && !list.length" :description="$t('暂无提货日志')"></el-empty>
</el-dialog>
</template>
<script>
import {deletePickup, getAllPickUpListByOrderNo} from '@/api/ecw/orderPickup'
import {parseTime} from '@/utils/ruoyi'
export default {
filters: {parseTime},
props:{
orderNo: String
},
data(){
return {
show: false,
list:[],
loading: false
}
},
computed:{
title(){
return this.$t('提货日志') + '-' + this.orderNo
}
},
created(){
this.getList()
},
methods:{
getList(){
this.loading = true
getAllPickUpListByOrderNo({orderNo: this.orderNo}).then(res => {
this.list = res.data
})
.finally(() => {
this.loading = false
})
},
deletePickup(id){
this.$confirm('确定要撤销此提货么?').then(res => {
return deletePickup({id})
}).then(res => {
this.$message.success('操作成功')
})
},
closeDialog(){
this.show = false
this.$emit('close');
}
}
}
</script>
\ No newline at end of file
......@@ -50,7 +50,7 @@
</el-table-column>
<el-table-column
label="出货渠道">
<template v-slot="{row}">{{row.channelName || '/'}}</template>
</el-table-column>
<el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>
<el-table-column label="目的地" prop="objectiveName"></el-table-column>
......
......@@ -902,9 +902,9 @@ export default {
/** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓
submitForm(submitType) {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid, errors) => {
if (!valid) {
return;
return this.$showFormValidateErrors(errors)
}
this.form.orderItemVOList.map(item => {
......
......@@ -65,7 +65,7 @@
<el-button v-if="!IsExamine" style="margin-right: 30px;" @click="submit">提交</el-button>
<el-button v-if="IsExamine" style="margin-right: 30px;" @click="examineFn">审核中</el-button>
<el-button v-if="IsExamine" style="margin-right: 30px;" @click="cancel">取消审核</el-button>
<el-button>取消</el-button>
<el-button @click="$emit('update:dialogVisible',false)">返回</el-button>
</div>
</div>
</el-dialog>
......
......@@ -183,6 +183,7 @@
<el-button type="text" size="mini" @click="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)">{{$t('合单申请')}}</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)">{{$t('拆单申请')}}</el-button>
<el-button type="text" size="mini" @click="showMergedLogOrderNo=scope.row.orderNo">{{$t('合单日志')}}</el-button>
<el-button type="text" size="mini" @click="showPickupLogOrderNo=scope.row.orderNo">{{$t('提货日志')}}</el-button>
</div>
</el-popover>
......@@ -246,6 +247,7 @@
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
<merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo=null" />
<pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" />
</div>
</template>
......@@ -278,6 +280,7 @@ import UserSelector from '@/components/UserSelector'
import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication";
import FeeApplication from "@/views/ecw/order/feeApplication";
import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
export default {
name: "Order",
components: {
......@@ -285,6 +288,7 @@ export default {
FeeApplication,
BatchSingleApplication,
MergeLog,
PickupLog,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
props: {
......@@ -361,6 +365,7 @@ export default {
printLadingBillInfo: null, // 打印提单
showBatchPickup: false, // 是否显示批量提货弹窗
showMergedLogOrderNo:null, // 显示合单日志订单号
showPickupLogOrderNo: null, // 显示提货日志的订单号
isShow:false,//特殊显示
orderId:undefined,
/* DICT_TYPE,
......
......@@ -8,7 +8,7 @@
<el-input v-model="form.brandName" placeholder="商标"></el-input>
</el-form-item>
<el-form-item :label="`商标${index + 1}分类`">
<el-select v-model="form.productTypeId" :placeholder="`请选择商标${index + 1}分类`" @change="form.productIds = [], updateValue()">
<el-select v-model="form.productTypeId" :placeholder="`请选择商标${index + 1}分类`" @change="form.productIds = [0], updateValue()">
<el-option
v-for="item in productTypeList"
:key="item.id"
......@@ -19,7 +19,7 @@
</el-select>
</el-form-item>
<el-form-item :label="`商标${index + 1}商品`">
<el-select v-model="form.productIds" :placeholder="`请选择商标${index + 1}商品`" multiple filterable @change="updateValue">
<el-select v-model="form.productIds" :placeholder="`请选择商标${index + 1}商品`" multiple filterable clearable @change="updateValue">
<el-option
v-for="item in getProductListByTypeId(form.productTypeId)"
:key="item.id"
......@@ -73,9 +73,22 @@ export default {
},
methods: {
getProductListByTypeId(typeId) {
return typeId === 0 ? [] : this.productList.filter((p) => p.typeId === typeId)
return [
{id: 0, titleZh: '全部'},
...(typeId === 0 ? [] : this.productList.filter((p) => p.typeId === typeId))
]
},
// 删除商品0
delete0(){
if (this.form.productIds.length > 1){
const index = this.form.productIds.indexOf(0)
if (index !== -1) {
this.form.productIds.splice(index, 1)
}
}
},
updateValue() {
this.delete0()
const trademarkCategoryRelList = []
this.form.productIds.forEach(productId => {
trademarkCategoryRelList.push({
......
......@@ -124,7 +124,7 @@
trademarkCategoryRelList: []
})">添加商标</el-button>
<div slot="footer" class="dialog-footer">
<div slot="footer" style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
......@@ -143,7 +143,6 @@ import {getProductList} from "@/api/ecw/product"
import BrandForm from "@/views/ecw/productBrank/BrandForm"
import Empower from "@/views/ecw/productBrank/Empower"
export default {
name: "ProductBrank",
components: {
......@@ -182,6 +181,10 @@ export default {
form: {},
// 表单校验
rules: {
titleZh: [{ required: true, message: '请输入品牌中文标题', trigger: "blur" }],
titleEn: [{ required: true, message: '请输入品牌英文标题', trigger: "blur" }],
// aorder: [{ required: true, message: '请输入排序', trigger: "blur" }],
filing: [{ required: true, message: '请选择是否备案', trigger: "change" }],
},
recordStatus: getDictDatas(DICT_TYPE.BRAND_REG_TYPE),
......@@ -196,7 +199,7 @@ export default {
created() {
this.getList();
getProductTypeList().then(r => {
this.productTypeList = r.data
this.productTypeList = [{id: 0, titleZh: '全部'}, ...r.data]
})
getProductList().then(r => {
this.productList = r.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment