Commit c4a47239 by 周子尧

新增字段的一些修改

1 parent 57341e02
...@@ -19,7 +19,7 @@ module.exports = { ...@@ -19,7 +19,7 @@ module.exports = {
}, },
request: { request: {
// baseURL: 'http://scrm.test.glsx.com.cn/', // baseURL: 'http://scrm.test.glsx.com.cn/',
baseURL: 'http://192.168.2.42:8064/', baseURL: 'scrm.dev.glsx.com.cn/',
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
//return window.fetch('https://', {}).then(res => res.json()) // return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
......
...@@ -27,5 +27,6 @@ export async function start() { ...@@ -27,5 +27,6 @@ export async function start() {
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-53e870b5-80d5-483e-8277-cdc4dec0ad80-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-53e870b5-80d5-483e-8277-cdc4dec0ad80-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
Vue.prototype.$common = { utils: utils }
render('/', routes) render('/', routes)
} }
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio> <el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio>
</template> </template>
<template slot="directionalFlagHtml"> <template slot="directionalFlagHtml">
<el-radio v-model="editForm.directionalFlag" label="0" :disabled="apear != 'couponAdd'">否</el-radio> <el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">否</el-radio>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">是</el-radio> <el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">是</el-radio>
</template> </template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio> <el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
...@@ -112,8 +112,8 @@ export default { ...@@ -112,8 +112,8 @@ export default {
name: 'editCashCoupon', name: 'editCashCoupon',
data() { data() {
return { return {
showSubmit:true, showSubmit: true,
userDisable:false, userDisable: false,
size: 'small', size: 'small',
title: '创建', title: '创建',
titleObj: { titleObj: {
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
isMutiSelectVisible: false, isMutiSelectVisible: false,
editForm: { editForm: {
couponName: '', couponName: '',
estimatedCost: '', anticipatedCost: '',
useChannel: '1', useChannel: '1',
effectiveType: '3', effectiveType: '3',
effectiveTime: [], effectiveTime: [],
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
full: '', full: '',
goods: '1', goods: '1',
goodsRefList: [], goodsRefList: [],
directionalFlag: '0' directionalFlag: '1'
}, },
//商品列表 //商品列表
tableParams: { tableParams: {
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
selectedProList: [], selectedProList: [],
editRule: { editRule: {
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }], couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
estimatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }], anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }], effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }],
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }], effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'change' }], effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'change' }],
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
}, },
{ {
label: '预估成本', label: '预估成本',
name: 'estimatedCost', name: 'anticipatedCost',
width: '320px', width: '320px',
type: 'input', type: 'input',
isDisabled: false isDisabled: false
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
{ {
label: '使用说明', label: '使用说明',
name: 'useDescription', name: 'useDescription',
addHtml: 'useDescriptionHtml', addHtml: 'useDescriptionHtml'
// index:10 // index:10
}, },
{ {
...@@ -325,6 +325,9 @@ export default { ...@@ -325,6 +325,9 @@ export default {
'editForm.effectiveDays'(newValue, oldValue) { 'editForm.effectiveDays'(newValue, oldValue) {
this.editForm.effectiveDays = limitPrice(newValue, oldValue, 3, 0) this.editForm.effectiveDays = limitPrice(newValue, oldValue, 3, 0)
}, },
'editForm.anticipatedCost'(newValue, oldValue) {
this.editForm.anticipatedCost = limitPrice(newValue, oldValue, 4, 2, 0, 10000)
},
'editForm.full'(newValue, oldValue) { 'editForm.full'(newValue, oldValue) {
this.editForm.full = limitPrice(newValue, oldValue, 5, 2) this.editForm.full = limitPrice(newValue, oldValue, 5, 2)
}, },
...@@ -412,8 +415,8 @@ export default { ...@@ -412,8 +415,8 @@ export default {
methods: { methods: {
// 编辑按钮 // 编辑按钮
editMessage() { editMessage() {
let estimatedCostIndex = this.editFormData.findIndex(item => item.name == 'estimatedCost') let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
this.editFormData[estimatedCostIndex].isDisabled = false this.editFormData[anticipatedCostIndex].isDisabled = false
this.userDisable = false this.userDisable = false
this.showSubmit = true this.showSubmit = true
}, },
...@@ -520,7 +523,7 @@ export default { ...@@ -520,7 +523,7 @@ export default {
this.editForm.directionalFlag = this.editForm.directionalFlag + '' this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + '' this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.useBarriers = this.editForm.useBarriers + '' this.editForm.useBarriers = this.editForm.useBarriers + ''
this.editForm.estimatedCost = (this.editForm.estimatedCost / 100).toFixed(2) this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) { if (this.editForm.effectiveType == 2) {
...@@ -607,7 +610,7 @@ export default { ...@@ -607,7 +610,7 @@ export default {
//是否定制礼包专用 //是否定制礼包专用
obj.directionalFlag = form.directionalFlag obj.directionalFlag = form.directionalFlag
//预估成本 //预估成本
obj.estimatedCost = form.estimatedCost obj.anticipatedCost = form.anticipatedCost * 100
//面值 //面值
obj.denomination = form.denomination obj.denomination = form.denomination
//库存 //库存
......
...@@ -85,8 +85,8 @@ export default { ...@@ -85,8 +85,8 @@ export default {
name: 'editDiscountCoupon', name: 'editDiscountCoupon',
data() { data() {
return { return {
showSubmit:true, showSubmit: true,
userDisable:false, userDisable: false,
size: 'small', size: 'small',
title: '创建', title: '创建',
titleObj: { titleObj: {
...@@ -127,10 +127,10 @@ export default { ...@@ -127,10 +127,10 @@ export default {
effectiveType: '2', effectiveType: '2',
effectiveTime: [], effectiveTime: [],
effectiveDays: '', effectiveDays: '',
estimatedCost: '' anticipatedCost: ''
}, },
editRule: { editRule: {
estimatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }], anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }], couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }], effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }],
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }], effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
}, },
{ {
label: '预估成本', label: '预估成本',
name: 'estimatedCost', name: 'anticipatedCost',
width: '320px', width: '320px',
type: 'input', type: 'input',
isDisabled: false isDisabled: false
...@@ -219,6 +219,9 @@ export default { ...@@ -219,6 +219,9 @@ export default {
'editForm.effectiveDays'(newValue, oldValue) { 'editForm.effectiveDays'(newValue, oldValue) {
this.editForm.effectiveDays = limitPrice(newValue, oldValue, 3, 0) this.editForm.effectiveDays = limitPrice(newValue, oldValue, 3, 0)
}, },
'editForm.anticipatedCost'(newValue, oldValue) {
this.editForm.anticipatedCost = limitPrice(newValue, oldValue, 4, 2, 0, 10000)
},
'editForm.stock'(newValue, oldValue) { 'editForm.stock'(newValue, oldValue) {
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1) this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
}, },
...@@ -241,8 +244,8 @@ export default { ...@@ -241,8 +244,8 @@ export default {
methods: { methods: {
// 编辑按钮 // 编辑按钮
editMessage() { editMessage() {
let estimatedCostIndex = this.editFormData.findIndex(item => item.name == 'estimatedCost') let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
this.editFormData[estimatedCostIndex].isDisabled = false this.editFormData[anticipatedCostIndex].isDisabled = false
this.userDisable = false this.userDisable = false
this.showSubmit = true this.showSubmit = true
}, },
...@@ -255,7 +258,7 @@ export default { ...@@ -255,7 +258,7 @@ export default {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res) this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveType = this.editForm.effectiveType + '' this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.estimatedCost = (this.editForm.estimatedCost / 100).toFixed(2) this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) { if (this.editForm.effectiveType == 2) {
...@@ -295,8 +298,9 @@ export default { ...@@ -295,8 +298,9 @@ export default {
obj.couponName = form.couponName obj.couponName = form.couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务 //优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
obj.discountType = '2' obj.discountType = '2'
obj.directionalFlag = '1'
//预估成本 //预估成本
obj.estimatedCost = form.estimatedCost obj.anticipatedCost = form.anticipatedCost * 100
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
obj.effectiveType = form.effectiveType obj.effectiveType = form.effectiveType
......
...@@ -106,10 +106,10 @@ export default { ...@@ -106,10 +106,10 @@ export default {
effectiveType: '2', effectiveType: '2',
effectiveTime: [], effectiveTime: [],
effectiveDays: '', effectiveDays: '',
estimatedCost: '' anticipatedCost: ''
}, },
editRule: { editRule: {
estimatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }], anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }], couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }], effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }],
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }], effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
}, },
{ {
label: '预估成本', label: '预估成本',
name: 'estimatedCost', name: 'anticipatedCost',
width: '320px', width: '320px',
type: 'input', type: 'input',
isDisabled: false isDisabled: false
...@@ -194,6 +194,9 @@ export default { ...@@ -194,6 +194,9 @@ export default {
}, },
deep: true deep: true
}, },
'editForm.anticipatedCost'(newValue, oldValue) {
this.editForm.anticipatedCost = limitPrice(newValue, oldValue, 4, 2, 0, 10000)
},
'editForm.effectiveDays'(newValue, oldValue) { 'editForm.effectiveDays'(newValue, oldValue) {
this.editForm.effectiveDays = limitPrice(newValue, oldValue, 3, 0) this.editForm.effectiveDays = limitPrice(newValue, oldValue, 3, 0)
}, },
...@@ -219,8 +222,8 @@ export default { ...@@ -219,8 +222,8 @@ export default {
methods: { methods: {
// 编辑按钮 // 编辑按钮
editMessage() { editMessage() {
let estimatedCostIndex = this.editFormData.findIndex(item => item.name == 'estimatedCost') let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
this.editFormData[estimatedCostIndex].isDisabled = false this.editFormData[anticipatedCostIndex].isDisabled = false
this.userDisable = false this.userDisable = false
this.showSubmit = true this.showSubmit = true
}, },
...@@ -233,7 +236,7 @@ export default { ...@@ -233,7 +236,7 @@ export default {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res) this.editForm = this.$common.utils.deepClone(res)
this.editForm.effectiveType = this.editForm.effectiveType + '' this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.estimatedCost = (this.editForm.estimatedCost / 100).toFixed(2) this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if (this.editForm.effectiveType == 2) { if (this.editForm.effectiveType == 2) {
...@@ -273,8 +276,9 @@ export default { ...@@ -273,8 +276,9 @@ export default {
obj.couponName = form.couponName obj.couponName = form.couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务 //优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
obj.discountType = '4' obj.discountType = '4'
obj.directionalFlag = '1'
//预估成本 //预估成本
obj.estimatedCost = form.estimatedCost obj.anticipatedCost = form.anticipatedCost * 100
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
obj.effectiveType = form.effectiveType obj.effectiveType = form.effectiveType
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<gift-list></gift-list> <gift-list></gift-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已领取" name="receivedGiftList"> <el-tab-pane label="已领取" name="receivedGiftList">
<div class="p-t-20">已领取</div> <receivedGiftList></receivedGiftList>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<script> <script>
import giftList from './giftList.vue' import giftList from './giftList.vue'
import receivedGiftList from './receivedGiftList.vue'
export default { export default {
name: 'gitfBag', name: 'gitfBag',
data() { data() {
...@@ -23,7 +24,8 @@ export default { ...@@ -23,7 +24,8 @@ export default {
}, },
components: { components: {
giftList giftList,
receivedGiftList
}, },
mounted() { }, mounted() { },
......
<!-- 已领取-->
<template>
<div class="marketing p-t-20">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1">
<span slot="footer">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<glsx-combi-form ref="showSearch">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="giftInfo" slot-scope="scope">
<div>礼包明细</div>
<div>{{ scope.scope }}</div>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'giftList',
data() {
return {
size: 'small',
url: url,
searchForm: {
whether: '',
orderCode: '',
commentStatus: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '领用客户',
name: 'customer',
type: 'input'
},
{
label: '礼包名称',
name: 'giftName',
type: 'input'
},
{
label: '是否为企微客户',
name: 'whether',
type: 'select',
optionList: [],
optionId: 'Id',
optionLabel: 'Name',
optionsName: 'List'
}
],
searchFormData1: [
{
label: '发放员工',
name: 'staff',
type: 'input'
},
{
label: '领用日期',
name: 'receiveDate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions'
}
],
baseData: {
List: [
{
Id: '1',
Name: '是'
},
{
id: '2',
Name: '否'
}
]
},
// 表格
getListApi: this.$apis.orderComment.getListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '',
prop: '',
columnattrs: {
type: 'expand'
},
addHtml: 'giftInfo'
},
{
label: '序号',
prop: 'idx'
},
{
label: '领取客户',
prop: 'orderCode'
},
{
label: '是否为企微客户',
prop: 'orderCode',
width: '200'
},
{
label: '礼包名称',
prop: 'orderCode',
width: '200'
},
{
label: '备注名称',
prop: 'orderCode',
width: '200'
},
{
label: '预估成本/元',
prop: 'orderCode'
},
{
label: '已核销成本',
prop: 'orderCode'
},
{
label: '发放员工',
prop: 'orderCode'
},
{
label: '创建时间',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.createStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createEndDateStr = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
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()
}
})
}
}
})
},
// 查看
// handleDetail(row) {
// this.$router.push({
// path: '/orderComment/commentDetail',
// query: {
// id: row.id
// }
// })
// },
handleExport() {
var params = this.getParams()
// this.$apis.couponManage.couponExportApi(params).then(res => {
// exportFn(res)
// })
},
handleDelete(row) {
// this.secondConfirm('删除', '是否确认删除该评论?', 'orderComment', 'deleteCommentApi', { id: row.id })
},
// add-新增;edit-编辑
handleEdit(addOrEdit, row) {
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var params = {
addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 'add' ? '新增信息' : '编辑信息')
}
addOrEdit != 'add' && (params.id = row.id)
this.$router.push({
path: '/giftBag/editGift',
query: params
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
setTableFinishFun() {
var page = this.$refs.giftListRef.page
// 添加序号
this.$refs.giftListRef.data.forEach((item, index) => {
item.idx = index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
})
//接收到的数据为空
this.$refs.giftListRef.data.length ? (this.$refs.giftListRef.tableHeightValues = '') : this.$refs.giftListRef.setTableHeightFun()
},
handleSearch() {
this.$refs.giftListRef.refreshTable()
},
handleReset() {
this.searchForm = {
orderCode: '',
commentStatus: '',
createDate: []
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
line: 1 line: 1
}, },
{ {
label: '预估成本(元)', label: '预估成本/元',
prop: 'anticipatedCost ', prop: 'anticipatedCost ',
formatter: cellValue => { formatter: cellValue => {
return cellValue.anticipatedCost/100 return cellValue.anticipatedCost/100
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!