Commit 2c74ae72 by chenwq

新车频道;商品编辑;带货管理接口联调

1 parent a684207d
...@@ -54,6 +54,16 @@ const getMerchantList = params => { ...@@ -54,6 +54,16 @@ const getMerchantList = params => {
}) })
} }
const getSimpleMerchantList = params => {
params.method = 'scrm.api.carlife.merchant.listWithPageSimpleByCurMerchant'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
const getZoneListApi = params => { const getZoneListApi = params => {
params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId' params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId'
return http({ return http({
...@@ -84,4 +94,4 @@ const pictureUpload = params => { ...@@ -84,4 +94,4 @@ const pictureUpload = params => {
noSignAttr: ['file'] noSignAttr: ['file']
}) })
} }
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getZoneListApi, getClassifyListApi, pictureUpload } export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
import { http } from '@/main'
const getCarListApi = params => {
params.method = 'scrm.api.wwbench.clue.vehicle.list'
return http({
url: 'rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCarListApi }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column> <el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column>
<el-table-column prop="merchantName" label="商户名称" align="center"></el-table-column> <el-table-column prop="merchantName" label="商户名称" align="center"></el-table-column>
</el-table> </el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination v-if="hasPage" small background @current-change="handleCurrentChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-table :data="selectedData" class="table hightline" height="464px"> <el-table :data="selectedData" class="table hightline" height="464px">
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
hasPage: {
type: Boolean,
default: true
},
// 页面来源 // 页面来源
// sourcePage: { // sourcePage: {
// type: String, // type: String,
...@@ -62,7 +66,7 @@ export default { ...@@ -62,7 +66,7 @@ export default {
// }, // },
storeApi: { storeApi: {
type: Function, type: Function,
default: () => {} default: () => { }
}, },
storeSelected: { storeSelected: {
type: Array, type: Array,
...@@ -70,7 +74,7 @@ export default { ...@@ -70,7 +74,7 @@ export default {
}, },
storeSearchForm: { storeSearchForm: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
// 去掉表格中某些字段 // 去掉表格中某些字段
// noTableField: { // noTableField: {
...@@ -111,7 +115,8 @@ export default { ...@@ -111,7 +115,8 @@ export default {
...this.storeSearchForm, ...this.storeSearchForm,
pageNum: this.pageNum, pageNum: this.pageNum,
currentPage: this.pageNum, currentPage: this.pageNum,
pageSize: this.pageSize pageSize: this.hasPage ? this.pageSize : 99999
// pageSize: this.pageSize
}).then(res => { }).then(res => {
this.selectingData = res.list this.selectingData = res.list
this.total = res.total this.total = res.total
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
], ],
// 选择门店 // 选择门店
relateStoreVisible: false, relateStoreVisible: false,
storeApi: this.$apis.common.getMerchantList, storeApi: this.$apis.common.getSimpleMerchantList,
storeSearchForm: { storeSearchForm: {
merchantId: '', merchantId: '',
merchantName: '' merchantName: ''
......
...@@ -2,25 +2,30 @@ ...@@ -2,25 +2,30 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增新车</el-button> --> <!-- <GLButton :size="size" type="primary" fn="新增新车" class="el-icon-plus" @click="handleEdit(1)">新增新车</GLButton> -->
<GLButton :size="size" type="primary" fn="新增新车" class="el-icon-plus" @click="handleEdit(1)">新增新车</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div slot="logoUrl" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
<div slot="showImageUrl" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</div>
<!-- <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div> -->
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
...@@ -37,48 +42,49 @@ export default { ...@@ -37,48 +42,49 @@ export default {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
zoneName: '', name: ''
createDate: []
}, },
// tableSearchForm: {},
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
label: '车辆关键字', label: '车辆关键字',
name: 'zoneName', name: 'name',
type: 'input', type: 'input',
placeholder: '请输入车系名称', placeholder: '请输入车系名称',
maxlength: 20 maxlength: 100
},
{
label: '状态',
name: 'status',
type: 'select'
} }
// {
// label: '创建日期',
// name: 'createDate',
// type: 'datePicker',
// isClear: true,
// pickerOptions: 'beforeRangePickerOptions'
// }
], ],
// 表格 // 表格
getListApi: this.$apis.zoneList.getZoneListApi, getListApi: this.$apis.newCar.getCarListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '新车名称', label: '车型名称',
prop: 'zoneName' prop: 'name'
}, },
{ {
label: '创建日期', label: '指导价',
prop: 'createdDate', prop: 'guidePrice',
width: '180', formatter: cellValue => {
return cellValue.guidePrice ? cellValue.guidePrice + '万元' : '-'
}
},
{
label: '品牌logo',
prop: 'logoUrl',
addHtml: 'logoUrl'
},
{
label: '车辆图片',
prop: 'showImageUrl',
addHtml: 'showImageUrl'
},
{
label: '状态',
prop: '',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') return '已上架'
} }
} }
] ]
...@@ -90,61 +96,43 @@ export default { ...@@ -90,61 +96,43 @@ export default {
mounted() { }, mounted() { },
methods: { methods: {
// getParams() { // secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
// var params = JSON.parse(JSON.stringify(this.searchForm)) // this.$confirm(txt, title, {
// if (this.searchForm.createDate.length) { // confirmButtonText: '确定',
// params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' // cancelButtonText: '取消',
// params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' // type: 'warning',
// callback: action => {
// if (action == 'confirm') {
// this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : res.message,
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// fn && fn()
// this.handleSearch()
// }
// })
// }
// } // }
// delete params.createDate
// return params
// },
// beforeSearchFn() {
// return new Promise(resolve => {
// this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate
// resolve()
// }) // })
// }, // },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
// 1-新增;2-编辑 // 1-新增;2-编辑
handleEdit(addOrEdit, row) { // handleEdit(addOrEdit, row) {
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id) // var params = {
var params = { // addOrEdit: addOrEdit,
addOrEdit: addOrEdit, // $title: encodeURI(addOrEdit == 1 ? '新建新车' : '编辑新车')
$title: encodeURI(addOrEdit == 1 ? '新建新车' : '编辑新车') // }
} // addOrEdit != 1 && (params.id = row.id)
addOrEdit != 1 && (params.id = row.id) // this.$router.push({
this.$router.push({ // path: '/zoneList/editZone',
path: '/zoneList/editZone', // query: params
query: params // })
}) // },
},
handleDelete(row) { // handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该新车?', 'zoneList', 'deleteZoneApi', { id: row.id }) // this.secondConfirm('删除', '是否确认删除该新车?', 'zoneList', 'deleteZoneApi', { id: row.id })
}, // },
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
...@@ -157,8 +145,7 @@ export default { ...@@ -157,8 +145,7 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
zoneName: '', name: ''
createDate: []
} }
this.handleSearch() this.handleSearch()
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-form label-width="100px" :inline="true"> <el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index"> <el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label"> <el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] }}</span> <span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] + (subItem.suffix || '') || '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -88,19 +88,16 @@ export default { ...@@ -88,19 +88,16 @@ export default {
}, },
{ {
label: '手机号', label: '手机号',
name: '' name: 'customerPhone'
}, },
{ {
label: '客户信息', label: '客户信息',
name: 'customerName' name: 'customerName'
}, },
{ {
label: '发货地址',
name: ''
},
{
label: '分润比例', label: '分润比例',
name: '' name: 'takeFee',
suffix: '%'
}, },
{ {
label: '订单类型', label: '订单类型',
...@@ -165,7 +162,6 @@ export default { ...@@ -165,7 +162,6 @@ export default {
}, },
created() { created() {
this.formToRow('detailFormData')
this.formToRow('afterInfoData') this.formToRow('afterInfoData')
}, },
...@@ -208,6 +204,11 @@ export default { ...@@ -208,6 +204,11 @@ export default {
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '-' this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '-'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-' this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-' this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
if (!this.detailForm.takeFee) {
var takeFeeIdx = this.detailFormData.findIndex(item => item.name == 'takeFee')
this.detailFormData.splice(takeFeeIdx, 1)
}
this.formToRow('detailFormData')
}) })
}, },
handleCancel() { handleCancel() {
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
], ],
// 选择门店 // 选择门店
relateStoreVisible: false, relateStoreVisible: false,
storeApi: this.$apis.common.getMerchantList, storeApi: this.$apis.common.getSimpleMerchantList,
storeSearchForm: { storeSearchForm: {
merchantId: '', merchantId: '',
merchantName: '' merchantName: ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!