Commit 2867e5f7 by 吴娟华

Merge branch 'v1.1.1' of http://192.168.3.233:8090/glsx-business/dj-car-life-system into v1.1.1

2 parents 4a158570 40476915
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</el-form> </el-form>
</div> </div>
<div class="relateProDialog flex"> <div class="relateProDialog flex">
<span style="width: 180px;">分配给导流方 (4S门店)</span> <span class="sub-title">分配给导流方 (4S门店)</span>
<el-form <el-form
:model="proInfo" :model="proInfo"
:rules="rules" :rules="rules"
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
</el-form> </el-form>
</div> </div>
<div class="relateProDialog flex"> <div class="relateProDialog flex">
<span style="width: 180px;">分配给合伙人 (合作商)</span> <span class="sub-title">分配给合伙人 (合作商)</span>
<el-form <el-form
:model="proInfo" :model="proInfo"
:rules="rules" :rules="rules"
...@@ -282,15 +282,15 @@ export default { ...@@ -282,15 +282,15 @@ export default {
}, },
rules: { rules: {
goodsCode: [{ required: true, message: '请选择关联升级商品', trigger: 'change' }], goodsCode: [{ required: true, message: '请选择关联升级商品', trigger: 'change' }],
upgradePrice: [{ required: true, message: '请输入建议升级价', trigger: 'blur' }], upgradePrice: [
shopPrice: [ { required: true, message: '请输入建议升级价', trigger: 'blur' },
{ required: true, message: '请输入到店价', trigger: 'blur' }, { required: true,
{ trigger: 'blur', trigger: 'change',
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
(+value > +this.proInfo.upgradePrice) ? callback(new Error('到店价需小于建议升级价格')) : callback() (+value < +this.proInfo.shopPrice) ? callback(new Error('建议升级价需要大于或等于到店价格')) : callback()
} }
} }],
], shopPrice: [{ required: true, message: '请输入到店价', trigger: 'blur' }],
profitType: [{ required: true, message: '请输入分润规则', trigger: 'change' }], profitType: [{ required: true, message: '请输入分润规则', trigger: 'change' }],
profitValue: [{ required: true, message: '请输入分润比例', trigger: 'blur' }], profitValue: [{ required: true, message: '请输入分润比例', trigger: 'blur' }],
partnerProfitPer: [{ required: true, message: '请输入分润比例', trigger: 'blur' }] partnerProfitPer: [{ required: true, message: '请输入分润比例', trigger: 'blur' }]
...@@ -358,6 +358,8 @@ export default { ...@@ -358,6 +358,8 @@ export default {
handleShopPrice(newVal) { handleShopPrice(newVal) {
this.proInfo.shopPrice = limitPrice(newVal, this.oldVal.shopPrice, 6, 2) this.proInfo.shopPrice = limitPrice(newVal, this.oldVal.shopPrice, 6, 2)
this.oldVal.shopPrice = this.proInfo.shopPrice this.oldVal.shopPrice = this.proInfo.shopPrice
var validateObj = (this.proInfo.shopPrice <= this.proInfo.upgradePrice) ? 'clearValidate' : 'validateField'
this.$refs.proRuleForm1[validateObj]('upgradePrice')
}, },
handleMaxUpgradeDiscount(newVal) { handleMaxUpgradeDiscount(newVal) {
this.proInfo.maxUpgradeDiscount = limitPrice(newVal, this.oldVal.maxUpgradeDiscount, 1, 1, 1) this.proInfo.maxUpgradeDiscount = limitPrice(newVal, this.oldVal.maxUpgradeDiscount, 1, 1, 1)
...@@ -391,6 +393,11 @@ export default { ...@@ -391,6 +393,11 @@ export default {
.relateProDialog.flex { .relateProDialog.flex {
display: flex; display: flex;
} }
.relateProDialog .sub-title {
display: inline-block;
height: 52px;
line-height: 36px;
}
.relateProDialog .w-50 { .relateProDialog .w-50 {
display: inline-block; display: inline-block;
width: 50%; width: 50%;
......
<template> <template>
<el-row class="table-header"> <el-row class="table-header">
<el-col :span="12"> <el-col :span="12">
<d2-el-icon
name="s-grid"
class="grid"
/>
<span v-text="title"></span> <span v-text="title"></span>
<slot name="left"></slot> <slot name="left"></slot>
</el-col> </el-col>
......
...@@ -195,7 +195,6 @@ ...@@ -195,7 +195,6 @@
v-if="form.carChildsBrandId" v-if="form.carChildsBrandId"
v-model="form.carSeriesId" v-model="form.carSeriesId"
placeholder="请选择车系" placeholder="请选择车系"
@change="getCarType(form.carSeriesId)"
style="width:150px; margin-right: 20px;" style="width:150px; margin-right: 20px;"
> >
<el-option <el-option
...@@ -205,7 +204,7 @@ ...@@ -205,7 +204,7 @@
:label="item.carSeriesName" :label="item.carSeriesName"
/> />
</el-select> </el-select>
<el-select <!-- <el-select
v-if="form.carSeriesId" v-if="form.carSeriesId"
v-model="form.carTypeId" v-model="form.carTypeId"
placeholder="请选择车型" placeholder="请选择车型"
...@@ -218,7 +217,7 @@ ...@@ -218,7 +217,7 @@
:value="item.id" :value="item.id"
:label="item.name" :label="item.name"
/> />
</el-select> </el-select> -->
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="车架号:" label="车架号:"
...@@ -232,6 +231,7 @@ ...@@ -232,6 +231,7 @@
placeholder="请输入车架号" placeholder="请输入车架号"
clearable clearable
/> />
<p class="tips">完整的车架号是17位的车辆识别代码(VIN码)</p>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="钥匙号:" label="钥匙号:"
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
import _ from 'lodash' import _ from 'lodash'
import { Util } from '@/common/util' import { Util } from '@/common/util'
import util from '@/libs/util' import util from '@/libs/util'
import { getServiceStore, getParkStore, getStaff, getCarInfo, getCarType, getGoods, addOrder, editOrder } from '@api/editCustomer' import { getServiceStore, getParkStore, getStaff, getCarInfo, getGoods, addOrder, editOrder } from '@api/editCustomer'
import { BaseData } from '@/common/constants.js' import { BaseData } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
export default { export default {
...@@ -361,15 +361,15 @@ export default { ...@@ -361,15 +361,15 @@ export default {
} }
function checkContacts(rule, value, callback) { function checkContacts(rule, value, callback) {
if (value) { if (value) {
if (value.length != 17) { // if (value.length != 17) {
callback(new Error('车架号必须为17位数字或字符')) // callback(new Error('车架号必须为17位数字或字符'))
return false // return false
} else { // } else {
if (Util.validationInput(value)) { if (Util.validationInput(value)) {
callback(new Error('车架号必须为17位数字或字符')) callback(new Error('车架号必须为数字或字符'))
return false return false
} }
} // }
} }
callback() callback()
} }
...@@ -398,7 +398,7 @@ export default { ...@@ -398,7 +398,7 @@ export default {
carBrandOptions: [], carBrandOptions: [],
carSmallBrandOptions: [], carSmallBrandOptions: [],
carSeriesOptions: [], carSeriesOptions: [],
carTypeOptions: [], // carTypeOptions: [],
goodsType: '', goodsType: '',
productTypeList: [], productTypeList: [],
TB_height: 90, TB_height: 90,
...@@ -471,9 +471,9 @@ export default { ...@@ -471,9 +471,9 @@ export default {
this.form.carChildsBrandId = this.$route.params.form.carChildsBrandId this.form.carChildsBrandId = this.$route.params.form.carChildsBrandId
this.$route.params.form.carSeriesId && this.changeCarSmallBrand(this.form.carChildsBrandId, () => { this.$route.params.form.carSeriesId && this.changeCarSmallBrand(this.form.carChildsBrandId, () => {
this.form.carSeriesId = this.$route.params.form.carSeriesId this.form.carSeriesId = this.$route.params.form.carSeriesId
this.$route.params.form.carTypeId && this.getCarType(this.form.carSeriesId, () => { // this.$route.params.form.carTypeId && this.getCarType(this.form.carSeriesId, () => {
this.form.carTypeId = this.$route.params.form.carTypeId // this.form.carTypeId = this.$route.params.form.carTypeId
}) // })
}) })
}) })
}) })
...@@ -563,7 +563,7 @@ export default { ...@@ -563,7 +563,7 @@ export default {
this.carSmallBrandOptions = [] this.carSmallBrandOptions = []
this.$set(this.form, 'carChildsBrandId', '') this.$set(this.form, 'carChildsBrandId', '')
this.$set(this.form, 'carSeriesId', '') this.$set(this.form, 'carSeriesId', '')
this.$set(this.form, 'carTypeId', '') // this.$set(this.form, 'carTypeId', '')
for (var i = 0; i < this.carInfoList.length; i++) { for (var i = 0; i < this.carInfoList.length; i++) {
if (this.carInfoList[i].carBrandId == id) { if (this.carInfoList[i].carBrandId == id) {
this.carSmallBrandOptions.push(this.carInfoList[i]) this.carSmallBrandOptions.push(this.carInfoList[i])
...@@ -583,7 +583,7 @@ export default { ...@@ -583,7 +583,7 @@ export default {
// 获取车系 // 获取车系
changeCarSmallBrand(id, fn = () => { }) { changeCarSmallBrand(id, fn = () => { }) {
this.$set(this.form, 'carSeriesId', '') this.$set(this.form, 'carSeriesId', '')
this.$set(this.form, 'carTypeId', '') // this.$set(this.form, 'carTypeId', '')
this.carSeriesOptions = [] this.carSeriesOptions = []
for (var i = 0; i < this.carInfoList.length; i++) { for (var i = 0; i < this.carInfoList.length; i++) {
if (this.carInfoList[i].carChildsBrandId == id) { if (this.carInfoList[i].carChildsBrandId == id) {
...@@ -604,25 +604,25 @@ export default { ...@@ -604,25 +604,25 @@ export default {
}, },
// 根据车系id获取车辆类型 // 根据车系id获取车辆类型
getCarType(id, fn = () => { }) { // getCarType(id, fn = () => { }) {
this.$set(this.form, 'carTypeId', '') // this.$set(this.form, 'carTypeId', '')
this.carTypeOptions = [] // this.carTypeOptions = []
if (id) { // if (id) {
const params = { 'seriesId': id } // const params = { 'seriesId': id }
getCarType(params).then(res => { // getCarType(params).then(res => {
this.carTypeOptions = res || [] // this.carTypeOptions = res || []
const o = this.carSeriesOptions.find(k => k.carSeriesId == id) // const o = this.carSeriesOptions.find(k => k.carSeriesId == id)
this.form.carSeriesName = o.carSeriesName // this.form.carSeriesName = o.carSeriesName
}) // })
fn() // fn()
} // }
}, // },
changeCarType(id) { // changeCarType(id) {
const o = this.carTypeOptions.find(k => k.id == id) // const o = this.carTypeOptions.find(k => k.id == id)
this.form.carTypeName = o.name // this.form.carTypeName = o.name
}, // },
searchGoods() { searchGoods() {
/** 根据门店商户号获取基础商品列表 */ /** 根据门店商户号获取基础商品列表 */
...@@ -720,10 +720,10 @@ export default { ...@@ -720,10 +720,10 @@ export default {
customer.carSeriesId = this.form.carSeriesId customer.carSeriesId = this.form.carSeriesId
customer.carSeriesName = this.form.carSeriesName customer.carSeriesName = this.form.carSeriesName
} }
if (this.form.carTypeId) { // if (this.form.carTypeId) {
customer.carTypeId = this.form.carTypeId // customer.carTypeId = this.form.carTypeId
customer.carTypeName = this.form.carTypeName // customer.carTypeName = this.form.carTypeName
} // }
if (this.form.carKeyNo) { if (this.form.carKeyNo) {
customer.carKeyNo = this.form.carKeyNo customer.carKeyNo = this.form.carKeyNo
} }
......
...@@ -389,7 +389,7 @@ export default { ...@@ -389,7 +389,7 @@ export default {
this.getOptionsList() this.getOptionsList()
}) })
} else { } else {
this.showFormData = this.showFormData.filter(item => item.name !== 'sellerMerchantId') this.showFormData = this.showFormData.filter(item => item.name !== 'yqMerchantId')
this.getServiceStore(this.userInfo.detail.merchantId) this.getServiceStore(this.userInfo.detail.merchantId)
} }
console.log(this.$store.state.d2admin.user.info.detail.merchantId) console.log(this.$store.state.d2admin.user.info.detail.merchantId)
...@@ -469,6 +469,12 @@ export default { ...@@ -469,6 +469,12 @@ export default {
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName]) this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
} }
}) })
...@@ -476,7 +482,7 @@ export default { ...@@ -476,7 +482,7 @@ export default {
getSummary() { getSummary() {
getSummary({ getSummary({
beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD'), beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD'),
endDateStr : moment(this.summaryDate).endOf('month').format('YYYY-MM-DD'), endDateStr: moment(this.summaryDate).endOf('month').format('YYYY-MM-DD')
}).then((res) => { }).then((res) => {
this.summayData = res this.summayData = res
}) })
...@@ -498,12 +504,12 @@ export default { ...@@ -498,12 +504,12 @@ export default {
'goodsExtraCost', 'goodsExtraCost',
'yqIncentiveTotal', 'yqIncentiveTotal',
'yqGrossProfit', 'yqGrossProfit',
'paidMoney','sellPrice', 'shopCost', 'allocationMoney'] 'paidMoney', 'sellPrice', 'shopCost', 'allocationMoney']
getList(params).then(res => { getList(params).then(res => {
// console.log(res) // console.log(res)
this.tableData = res.list.map((item) => { this.tableData = res.list.map((item) => {
for(let key in item) { for (const key in item) {
if(moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') { if (moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') {
item[key] = `¥${item[key]}` item[key] = `¥${item[key]}`
} }
} }
...@@ -516,18 +522,18 @@ export default { ...@@ -516,18 +522,18 @@ export default {
}, },
getParams() { getParams() {
var params = {} var params = {}
if(this.searchForm.yqMerchantId) { if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId params.yqMerchantId = this.searchForm.yqMerchantId
} }
if(this.searchForm.merchantId) { if (this.searchForm.merchantId) {
params.merchantId = this.searchForm.merchantId params.merchantId = this.searchForm.merchantId
} }
if (this.searchForm.time) { if (this.searchForm.time) {
params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-')+' 00:00:00' params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-')+' 23:59:59' params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
if(this.searchForm.subOrderCode) { if (this.searchForm.subOrderCode) {
params.subOrderCode = this.searchForm.subOrderCode params.subOrderCode = this.searchForm.subOrderCode
} }
return params return params
...@@ -550,7 +556,7 @@ export default { ...@@ -550,7 +556,7 @@ export default {
handleCurrentChange(value) { handleCurrentChange(value) {
this.page.pageNum = value this.page.pageNum = value
this.getList() this.getList()
}, }
} }
} }
......
...@@ -50,11 +50,13 @@ export default { ...@@ -50,11 +50,13 @@ export default {
rules: { rules: {
yqMerchantId: [{ required: true, message: '请选择园区店', trigger: 'change' }], yqMerchantId: [{ required: true, message: '请选择园区店', trigger: 'change' }],
goodsCode: [{ required: true, message: '请选择产品名称', trigger: 'change' }], goodsCode: [{ required: true, message: '请选择产品名称', trigger: 'change' }],
shopPrice: [ shopPrice: [{ required: true, message: '请输入到店价', trigger: 'blur' }],
{ required: true, message: '请输入到店价', trigger: 'blur' }, retailPrice: [
{ trigger: 'blur', { required: true, message: '请输入零售价格', trigger: 'blur' },
{ required: true,
trigger: 'change',
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
(+value > +this.markOldVal.retailPrice) ? callback(new Error('到店价需小于建议升级价')) : callback() (+value < +this.markOldVal.shopPrice) ? callback(new Error('配置零售价格需要大于或等于到店价格')) : callback()
} }
} }
], ],
...@@ -99,6 +101,8 @@ export default { ...@@ -99,6 +101,8 @@ export default {
handleInput: (newVal) => { handleInput: (newVal) => {
this.$refs.d2Form.formData.shopPrice = limitPrice(newVal, this.markOldVal.shopPrice, 6, 2) this.$refs.d2Form.formData.shopPrice = limitPrice(newVal, this.markOldVal.shopPrice, 6, 2)
this.markOldVal.shopPrice = this.$refs.d2Form.formData.shopPrice this.markOldVal.shopPrice = this.$refs.d2Form.formData.shopPrice
var validateObj = (this.markOldVal.shopPrice <= this.markOldVal.retailPrice) ? 'clearValidate' : 'validateField'
this.$refs.d2Form.$refs[this.comFormRef + 'd2FormRuleForm'][validateObj]('retailPrice')
} }
}, { }, {
name: 'retailPrice', name: 'retailPrice',
...@@ -164,6 +168,7 @@ export default { ...@@ -164,6 +168,7 @@ export default {
}), }),
linkMerchantIds: res.merchantRefList ? res.merchantRefList.map(item => Object.assign(item, item.merchantInfo)) : [] linkMerchantIds: res.merchantRefList ? res.merchantRefList.map(item => Object.assign(item, item.merchantInfo)) : []
} }
this.markOldVal.shopPrice = res.shopPrice
this.markOldVal.retailPrice = res.retailPrice this.markOldVal.retailPrice = res.retailPrice
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left"></span> <span slot="left">订单列表</span>
<auth-button category="Button"></auth-button> <auth-button category="Button"></auth-button>
</d2-table-header> </d2-table-header>
<el-table <el-table
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
2: '未升级', 2: '未升级',
3: '待支付', 3: '待支付',
4: '已支付', 4: '已支付',
//5: '已退款', // 5: '已退款',
6: '已完成' 6: '已完成'
}, },
showFormData: [{ showFormData: [{
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left">服务门店列表</span>
<auth-button category="Button"></auth-button> <auth-button category="Button"></auth-button>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!