Commit fc32bf2e by 杨明

Merge branch 'SAAS+V4.53.0-0528' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.53.0-0528
2 parents 426d9a58 d5753d49
Showing 36 changed files with 744 additions and 432 deletions
import request from "./request"
import RequestMethods from "./request.methods"
// AI助理-账号管理-账号列表
export function getAccountList(data) {
data.method = `dj.api.script.aiagent.account.list`
return request(data, RequestMethods.POST)
}
// AI助理-账号管理-新建账号
export function createAccount(data) {
data.method = `dj.api.script.aiagent.account.create`
return request(data, RequestMethods.POST)
}
// AI助理-账号管理-启用/禁用账号
export function switchAccount(data) {
data.method = `dj.api.script.aiagent.account.switch`
return request(data, RequestMethods.POST)
}
// AI助理-账号管理-编辑账号
export function updateAccount(data) {
data.method = `dj.api.script.aiagent.account.update`
return request(data, RequestMethods.POST)
}
// // AI助理-账号管理-删除账号
export function deleteAccount(data) {
data.method = `dj.api.script.aiagent.account.delete`
return request(data, RequestMethods.POST)
}
......@@ -25,6 +25,8 @@ const request = (
apiName = "dj"
} else if (params.method.includes("dj.api.script")) {
apiName = "script"
} else if (params.method.includes("dj.smartcarlife.stock")) {
apiName = "dj.smartcarlife"
} else {
// console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0]
......
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-04-24 15:36:37
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-24 16:31:47
* @FilePath: \dj-car-life-system\src\router\modules\916_largeModel.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
916: {
path: "/largeModel",
name: "largeModel",
meta: {
title: "AI大模型",
authId: "916",
parentId: "1",
cache: false
}
},
91601: {
path: "/accountManagement",
name: "accountManagement",
meta: {
title: "账号管理",
authId: "91601",
parentId: "916",
cache: false
},
auth: [
{
authId: "9160102",
parentId: "91601",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9160103",
parentId: "91601",
label: "禁用",
handle: "handleDisabled"
},
{
authId: "9160104",
parentId: "91601",
label: "删除",
handle: "handleDelete"
}
],
component: _import("largeModel/accountManagement/index")
}
}
......@@ -56,7 +56,9 @@ export default {
promiseGetGoods: null,
goods: null,
isLoadingGoods: false, // 加载状态
merchantSettleDistributeRuleLastRule: null
merchantSettleDistributeRuleLastRule: null,
firstLineSunshineOnlinePointsFlag: null,
firstLineSunshine2OnlinePointsFlag: null
},
mutations: {
/**
......@@ -204,6 +206,12 @@ export default {
},
operationModeAsync(state) {
return state.operationModeAsync
},
firstLineSunshineOnlinePointsFlagAsync(state) {
return state.firstLineSunshineOnlinePointsFlag
},
firstLineSunshine2OnlinePointsFlagAsync(state) {
return state.firstLineSunshine2OnlinePointsFlag
}
}
}
......@@ -39,21 +39,6 @@
</template>
<template v-else>-</template>
</div>
<div slot="subBrandName" slot-scope="scope">
<template v-if="scope.scope.subBrandName">
{{ scope.scope.subBrandName.split(",").length > 1 ? scope.scope.subBrandName.split(",")[0] + '...' :
scope.scope.subBrandName.split(",")[0]}}
<el-popover placement="top-start" width="200" trigger="hover">
<p v-for="(item, index) in scope.scope.subBrandName.split(',')" :key="index">
{{ item }}
</p>
<span class="trick-no" slot="reference" v-show="scope.scope.subBrandName.split(',').length > 1">({{
scope.scope.subBrandName.split(",").length - 1 }})</span>
<!-- <el-button slot="reference">hover 激活</el-button> -->
</el-popover>
</template>
<template v-else>-</template>
</div>
<div slot="merchantName" slot-scope="scope">
<template v-if="scope.scope.merchantName">
{{ scope.scope.merchantName.split(",").length > 1 ? scope.scope.merchantName.split(",")[0] + '...' :
......@@ -119,11 +104,11 @@ export default {
prop: "brandName",
addHtml: "brandName"
},
{
label: "子品牌",
prop: "subBrandName",
addHtml: "subBrandName"
},
// {
// label: "子品牌",
// prop: "subBrandName",
// addHtml: "subBrandName"
// },
{
label: "关联门店",
prop: "merchantName",
......@@ -237,7 +222,7 @@ export default {
id: row.id,
isRelMerchant: res.isRelMerchant,
materialInfoList: res.materialInfoList,
brandData: res.relBrandList,
brandData: res.relList,
storeData: res.relMerchantList
} })
},
......
......@@ -71,7 +71,8 @@ export default {
dialogVisible: Boolean,
formInfo: Object,
brandData: Array,
levelId: Number
levelId: Number,
carSeriesList: Array
},
watch: {
formInfo(val) {
......@@ -94,8 +95,12 @@ export default {
handleConfirm() {
this.$refs.seriesForm.validate((valid) => {
if (valid) {
console.log(this.formData)
const {contentPicUrl, carSeries, index} = this.formData
const _index = this.carSeriesList.find(i => carSeries.id == i.seriesId)
if (_index) {
this.$message.error('不可重复选择车系')
return
}
const obj = {
seriesId: carSeries.id,
seriesName: carSeries.name,
......
<template>
<d2-dialog title="选择品牌" :is-visible="dialogVisible" class="brand-dialog" width="60%" @closeDialog="handleClose"
<d2-dialog title="选择品牌" :is-visible="dialogVisible" class="brand-dialog" width="50%" @closeDialog="handleClose"
@confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:">
......@@ -33,6 +33,7 @@
</template>
<script>
import { deepClone } from "@/common/util"
import { getCarbrandTree } from "@api/contentManager"
export default {
name: "brandTree",
......@@ -46,50 +47,11 @@ export default {
checked: false,
checkList: [],
brandData: [],
// brandData: [{
// id: 1,
// label: '奥迪',
// children: [{
// id: 11,
// label: 'Audi Sport'
// }, {
// id: 12,
// label: '奥迪(进口)'
// }, {
// id: 13,
// label: '上汽奥迪'
// }, {
// id: 14,
// label: '一汽奥迪'
// }]
// }, {
// id: 2,
// label: '阿斯顿*马丁',
// children: [{
// id: 21,
// label: '阿斯顿*马丁'
// }, {
// id: 22,
// label: '阿斯顿*大发疯',
// }]
// }, {
// id: 3,
// label: '问界',
// children: [{
// id: 31,
// label: 'M5'
// }, {
// id: 32,
// label: 'M7'
// }, {
// id: 33,
// label: 'M9'
// }]
// }],
defaultProps: {
children: 'children',
label: 'label'
}
},
selectList: []
}
},
watch: {
......@@ -99,9 +61,10 @@ export default {
defaultKeys(val) {
console.log(val)
this.$nextTick(() => {
val.forEach(i => {
this.$refs.tree.setChecked(i, true)
})
// val.forEach(i => {
// this.$refs.tree.setChecked(i, true)
// })
this.$refs.tree.setCheckedKeys(val)
})
}
},
......@@ -120,7 +83,13 @@ export default {
},
handleConfirm() {
this.resetChecked()
this.$emit('submit', this.checkList)
console.log(this.checkList, 'checkList')
const newList = this.filterCheckList(deepClone(this.checkList))
console.log(newList, 'newList')
this.$emit('submit', {
checkList: this.checkList,
newList: newList
})
},
onSearch() {
this.$refs.tree.filter(this.filterText)
......@@ -129,6 +98,20 @@ export default {
console.log(data, this.$refs.tree.getCheckedNodes());
this.checkList = this.$refs.tree.getCheckedNodes()
},
filterCheckList(checkList) {
// 收集所有 children 中的 id
const childrenIds = new Set();
checkList.forEach(item => {
if (item.children && item.children.length > 0) {
item.children.forEach(child => {
childrenIds.add(child.id);
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
// 清空
resetChecked() {
this.$refs.tree.setCheckedKeys([]);
......@@ -189,8 +172,8 @@ export default {
background: #ffffff;
height: 324px;
overflow-y: auto;
width: 600px;
margin-right: 20px;
width: 100%;
// margin-right: 20px;
.tree-title {
display: flex;
align-items: center;
......
......@@ -15,11 +15,12 @@
v-model.trim="storeSearchForm.brandName"
placeholder="门店名称"
max-length="20"
@input="handleStoreInput"
@keydown.native="handleStoreInput"
clearable
/>
</el-form-item>
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
<el-button type="primary" @click="handleSearchStore">搜索</el-button>
</el-form>
<el-row class="tableCon">
<div class="tableBox">
......@@ -33,6 +34,7 @@
@select-all="handleAll"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="merchantNo" label="门店商户号" align="center"></el-table-column>
<el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column>
</el-table>
......@@ -72,6 +74,8 @@
</template>
<script>
import { debounce } from "../../../index/debounce"
import { deepClone } from "@/common/util"
import { getCarBrandIds } from "@api/contentManager"
export default {
name: "RelateStoreDialog",
......@@ -84,6 +88,7 @@ export default {
currentPage: 1,
pageSize: 20,
storeSearchForm: {},
allData: []
}
},
......@@ -101,8 +106,13 @@ export default {
default: () => []
}
},
created() {
// 创建防抖版本的搜索函数
this.debouncedSearch = debounce(this.handleSearchStore, 300);
},
mounted() {
console.log(this.brandData)
this.allData = deepClone(this.storeSelected)
this.selectedData = this.storeSelected
this.getSelectingList()
},
......@@ -124,6 +134,7 @@ export default {
secBrandIdList: _second
}
getCarBrandIds(params).then((res) => {
this.allData = deepClone(res)
this.selectingData = res
this.total = res.total
this.$nextTick(() => {
......@@ -131,6 +142,21 @@ export default {
})
})
},
handleStoreInput(e) {
this.debouncedSearch()
},
handleSearchStore() {
console.log(this.storeSearchForm.brandName)
const {brandName} = this.storeSearchForm
if(brandName) {
this.selectingData = this.selectingData.filter(item => {
return item.merchantName.includes(brandName)
})
} else {
this.selectingData = deepClone(this.allData)
}
},
handleChange(selection, row) {
var addOrDelete = !!selection.find((item) => item.merchantNo === row.merchantNo)
addOrDelete
......@@ -156,10 +182,10 @@ export default {
const obj = this.selectingData.find((v) => v.merchantNo == row.merchantNo)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
// handleCurrentChange(val) {
// this.currentPage = val
// this.getSelectingList()
// },
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
......
......@@ -1053,7 +1053,11 @@ export default {
// 取消按钮返回列表页
handleCancel() {
this.$router.push({
name: "packageConfig"
name: "packageConfig",
params: {
tabPane: '1',
tabLabel: 'UpgradeLightly'
}
})
},
getParams() {
......
......@@ -5,49 +5,26 @@
<span>分账配置</span>
</div>
<div style="padding: 20px">
<el-form
ref="divisionRuleRef"
:model="financialObj"
label-suffix=":"
label-width="154px"
>
<el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px">
<el-form-item label="" prop="autoFlag">
<span class="tips-block" slot="label">
<span class="tips-label">线上自动分账</span>
<el-tooltip
popper-class="tooltip-class"
effect="dark"
content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement="top"
>
<span class="tips-icon" /> </el-tooltip
>:
<el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span>
<el-switch
v-model="financialObj.autoFlag"
active-value="Y"
disabled
inactive-value="N"
/>
<el-switch v-model="financialObj.autoFlag" active-value="Y" disabled inactive-value="N" />
</el-form-item>
<el-form-item label="结算时间方式">
<span class="tips-block" slot="label">
<span class="tips-label">分账周期</span>
<el-tooltip
popper-class="tooltip-class"
effect="dark"
content="用户支付的款项可按T+1或指定日自动打款给商户。"
placement="top"
>
<span class="tips-icon" /> </el-tooltip
>:
<el-tooltip popper-class="tooltip-class" effect="dark" content="用户支付的款项可按T+1或指定日自动打款给商户。" placement="top">
<span class="tips-icon" /> </el-tooltip>:
</span>
<div class="block_item" style="margin-bottom: 20px">
<span>
分账周期 T+{{ settleTimeObj.first }}日
<span v-show="financialObj.settleTimeType == 1"
>(分账后第2天到分账方对公账户)</span
>
<span v-show="financialObj.settleTimeType == 1">(分账后第2天到分账方对公账户)</span>
</span>
</div>
</el-form-item>
......@@ -57,26 +34,14 @@
</el-form>
<el-tabs v-model="editableTabsValue" type="card" class="my-tab-pane">
<!-- closable -->
<el-tab-pane
v-for="item in editableTabs"
:key="item.name"
:label="item.title"
:name="item.name"
>
<el-tab-pane v-for="item in editableTabs" :key="item.name" :label="item.title" :name="item.name">
<span slot="label">{{ item.title }} </span>
<div class="classificationCptContainer">
<el-form
ref="divisionRuleRef"
:model="financialObj"
label-suffix=":"
label-width="154px"
>
<h3
v-if="
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.groupType == 1
"
>
<el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px">
<h3 v-if="
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.groupType == 1
">
全部品类
</h3>
......@@ -85,21 +50,17 @@
{{
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.categoryType || "--"
}}</el-form-item
>
}}</el-form-item>
<el-form-item label="">
{{
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.packageArrText
}}</el-form-item
>
}}</el-form-item>
</div>
<template
v-for="(item, index) in financialObj.goodsTypeGroupRules[
editableTabsValue - 1
].expenseCategoryRules"
>
<template v-for="(item, index) in financialObj.goodsTypeGroupRules[
editableTabsValue - 1
].expenseCategoryRules">
<el-form-item :key="index" :label="item.expenseCategoryName">
<span>{{
getExpenseCategoryCalculateType(
......@@ -111,15 +72,9 @@
</template>
</el-form>
</div>
<tableAccount
ref="tableAccount"
:merchant-distribution-rules="
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules
"
:table-select-options="tableSelectOptions"
:classification-obj-select="tableClassificationObjSelect"
/>
<tableAccount ref="tableAccount" :merchant-distribution-rules="financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules
" :table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
</el-tab-pane>
</el-tabs>
</div>
......@@ -137,7 +92,7 @@ export default {
props: {
divisiObj: {
type: Object,
default: () => {}
default: () => { }
}
},
data() {
......@@ -185,19 +140,38 @@ export default {
const platformSideobj = {
merchantId: info.realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
merchantName: info.realityPlatformMerchantName,
targetMerchantType: 1
targetMerchantType: 1,
targetMerchantLevel: 1
}
// 流量方
const merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.realityShopMerchantName,
targetMerchantType: 3
// const merchantSideobj = {
// merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
// merchantName: info.realityShopMerchantName,
// targetMerchantType: 3
// }
// 流量方 判断是多流量方还是单个,做不同的值处理
let merchantSideobj = {}
if (!info.multiPlatformMerchantFlag) {
merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.realityShopMerchantName,
targetMerchantType: 3,
targetMerchantLevel: 1
}
} else {
merchantSideobj = {
merchantId: info.realityShopMerchantId,
merchantName: info.realityShopLevel == 1 ? '门店' : '上级',
targetMerchantType: 3,
targetMerchantLevel: info.realityShopLevel
}
}
//服务商
// 服务商
const serviceObj = {
merchantId: info.partnerMerchantId,
merchantName: info.partnerMerchantName,
targetMerchantType: 2
targetMerchantType: 2,
targetMerchantLevel: 1
}
// // 如果勾选商户 就追加进去
// if (info.djzhySubMerchantId) {
......@@ -228,7 +202,7 @@ export default {
deep: true
}
},
created() {},
created() { },
methods: {
initData(data) {
......@@ -323,28 +297,6 @@ export default {
this.financialObj = result
this.initSettleTimeObj()
},
// filterData(data) {
// let arrIdx = [1, 302, 2]
// console.log(this.financialObj, ' this.financialObj')
// this.financialObj.goodsTypeGroupRules.forEach((item) => {
// item.expenseCategoryTypeRules = []
// item.expenseCategoryRules.forEach((type) => {
// if (arrIdx.includes(type.expenseCategoryId)) {
// if (type.expenseCategoryId == 1100)
// type.expenseCategoryName = "一线阳光激励费"
// if (type.expenseCategoryId == 809)
// type.expenseCategoryName = "一线阳光2激励费"
// item.expenseCategoryTypeRules.push(type)
// }
// })
// this.$set(
// item,
// "expenseCategoryTypeRules",
// item.expenseCategoryTypeRules
// )
// })
// this.initSettleTimeObj()
// },
initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj
this.settleTimeObj[settleTimeType == 1 ? "first" : "second"] = settleTime
......
......@@ -134,7 +134,7 @@ export default {
arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId)
)
})
console.log("list", arr)
// console.log("list", arr)
return arr
}
},
......@@ -170,7 +170,7 @@ export default {
const obj = this.classificationObjSelect
const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1)
const form = {}
console.log("obj", obj)
// console.log("obj", obj)
for (const key in obj) {
obj[key].map((item) => {
// 数字转字符串
......@@ -182,7 +182,7 @@ export default {
})
// 还要跟存在现在的选项里面
// console.log('findObj', findObj)
console.log('findObj', findObj?.merchantId)
// console.log(name)
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId })
// console.log(optIndex, 'optIndex')
......@@ -194,7 +194,7 @@ export default {
}
// 判断id是否有在选项里面 没有就去掉
this.form = form
console.log(this.form, "this.form")
// console.log(this.form, "this.form")
},
changFormList() {
console.log(this.form, "this.form")
......@@ -211,62 +211,6 @@ export default {
// this.handleConfirm()
// console.log('validField', validField)
this.$refs.divisionRuleRef.clearValidate(validField)
},
handleConfirm() {
// console.log(this.merchantInfo)
return new Promise((resolve, reject) => {
this.$refs.divisionRuleRef.validate((valid) => {
if (valid) {
// this.form
const merchantDistributionRules = this.radioList.reduce(
(prev, next) => {
const id = this.form["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
// (item) => item.merchantId == id
(item) => (item.merchantId == id) || item.targetMerchantLevel == id
)
// console.log(merchantObj, 'merchantObj')
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
},
[]
)
resolve(merchantDistributionRules)
} else {
resolve(false)
}
})
})
},
getTableAccountParams() {
const merchantDistributionRules = this.radioList.reduce((prev, next) => {
const id = this.form["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
(item) => (item.merchantId == id) || item.targetMerchantLevel == id
)
// console.log(merchantObj, 'merchantObj')
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
}, [])
return merchantDistributionRules
}
}
}
......
......@@ -4,7 +4,7 @@
<div class="title">
<span>分账配置</span>
<el-button class="ruleBtn" type="text" @click="ruleUpdateDialogShow = true">变更说明</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" plain v-if="addVisible" @click="addTab">新增</el-button>
<el-button icon="el-icon-plus" type="primary" v-if="addVisible" size="small" plain @click="addTab">新增</el-button>
</div>
<div class="publicContainer">
<el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":" label-width="180px">
......@@ -360,7 +360,7 @@ export default {
// 按商品分类
async getGoodsCategoryConfigurationData() {
const result = await this.getGoodsCategoryConfiguration()
const list = result
const list = result.list
// console.log(result, "getGoodsCategoryConfigurationData")
if (list.length) {
this.productType = list.map(({ categoryType, categoryName }) => {
......
......@@ -14,7 +14,7 @@
<el-tab-pane v-for="(item, idx) in editableTabs" :key="item.name" :label="item.title" :name="item.name"
:closable="idx != 0">
<span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title
}}
}}
</span>
<div class="classificationCptContainer">
<classificationCpt :goods-list="goodsTypeGroupRelations" :ref="`classification${item.name}`"
......@@ -201,8 +201,8 @@ export default {
},
async getGoodsCategoryConfigurationData() {
const result = await this.getGoodsCategoryConfiguration()
const list = result
console.log(result, "getGoodsCategoryConfigurationData")
const list = result.list
console.log(list, "getGoodsCategoryConfigurationData")
if (list.length) {
this.productType = list.map(({ categoryType, categoryName }) => {
return {
......
......@@ -388,7 +388,7 @@ export default {
// 按商品分类
async getGoodsCategoryConfigurationData() {
const result = await this.getGoodsCategoryConfiguration()
const list = result
const list = result.list
// console.log(result, "getGoodsCategoryConfigurationData")
if (list.length) {
this.productType = list.map(({ categoryType, categoryName }) => {
......
......@@ -66,6 +66,16 @@ export default {
handler(newVal, oldVal) {
this.editData.operationMode = newVal
}
},
firstLineSunshineOnlinePointsFlagAsync: {
handler(newVal, oldVal) {
this.editData.firstLineSunshineOnlinePointsFlag = newVal
}
},
firstLineSunshine2OnlinePointsFlagAsync: {
handler(newVal, oldVal) {
this.editData.firstLineSunshine2OnlinePointsFlag = newVal
}
}
},
data() {
......@@ -97,7 +107,7 @@ export default {
{ required: true, message: "请选择一线阳光是否开启线上积分" }
],
firstLineSunshine2OnlinePointsFlag: [
{ required: true, message: "请选择一线阳光是否开启线上积分" }
{ required: true, message: "请选择一线阳光2是否开启线上积分" }
]
},
editFormData: [
......@@ -309,7 +319,14 @@ export default {
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "onlinePointsEnabledList"
optionsName: "onlinePointsEnabledList",
changeAttr: (value, targetItem) => {
this.dealPartnerMer()
this.SET_DATA({
name: "firstLineSunshineOnlinePointsFlag",
data: value
})
}
},
{
label: "一线阳光2是否开启线上积分",
......@@ -319,7 +336,14 @@ export default {
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "onlinePointsEnabledList"
optionsName: "onlinePointsEnabledList",
changeAttr: (value, targetItem) => {
this.dealPartnerMer()
this.SET_DATA({
name: "firstLineSunshine2OnlinePointsFlag",
data: value
})
}
}
],
baseData: {
......@@ -339,7 +363,9 @@ export default {
...mapGetters("goodsInfoData", {
estimatedFlow: "estimatedFlow",
estimatedUpgradeRate: "estimatedUpgradeRate",
operationModeAsync: "operationModeAsync"
operationModeAsync: "operationModeAsync",
firstLineSunshineOnlinePointsFlagAsync: "firstLineSunshineOnlinePointsFlagAsync",
firstLineSunshine2OnlinePointsFlagAsync: "firstLineSunshine2OnlinePointsFlagAsync"
})
},
mounted() {
......
......@@ -94,11 +94,11 @@ export default {
}).then((result) => {
console.log(result, "result")
const realityShopMerchantName = result.basicInfo.shelfType == 1 ? result.merchantSettleDistributeRule.realityShopMerchantName : result.merchantSettleDistributeRule.realityShopLevel == 1 ? '门店' : '上级'
// console.log(partnerMerchantName, 'partnerMerchantName')
console.log(result.createBusinessApproveMerchantList[0].parentMerchantId, 'partnerMerchantName')
this.divisiObj = Object.assign(result.merchantSettleDistributeRule, {
realityShopMerchantName,
partnerMerchantName: result.createBusinessApproveMerchantList[0].partnerMerchantName,
partnerMerchantId: result.createBusinessApproveMerchantList[0].parentMerchantId
partnerMerchantId: result.createBusinessApproveMerchantList[0].partnerMerchantId
})
this.financialObj = result.merchantReconciliationRule
......
<!-- 嘀加上架 -->
<template>
<d2-container class="shelfManage">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset"> 重置 </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
......@@ -24,57 +17,41 @@
<span slot="left">
<!-- 嘀加上架与销售合同 -->
<span style="display: inline-block; margin-right: 10px">
<auth-button category="Button"
:show-btn-ids="['9031301']" />
<auth-button category="Button" :show-btn-ids="['9031301']" />
</span>
<!-- 嘀加上架修改 -->
<auth-button style="display: inline-block"
category="Button"
:show-btn-ids="['9031303']" />
<auth-button style="display: inline-block" category="Button" :show-btn-ids="['9031303']" />
</span>
</d2-table-header>
<d2-table ref="packageIndexTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<d2-table ref="packageIndexTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<!-- 查看 - 查看合同 -->
<span style="margin-right: 10px">
<auth-button :data="scope.scope"
:show-btn-ids="['9031304']" />
<auth-button :data="scope.scope" :show-btn-ids="['9031304']" />
</span>
<!-- 确认 - 编辑合同 -->
<span style="margin-right: 10px"
v-if="scope.scope.systemStatus == 1">
<auth-button :data="scope.scope"
:show-btn-ids="['9031306']" />
<span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1">
<auth-button :data="scope.scope" :show-btn-ids="['9031306']" />
</span>
<!-- 驳回 -->
<span style="margin-right: 10px"
v-if="scope.scope.systemStatus == 1">
<auth-button :data="scope.scope"
:show-btn-ids="['9031308']" />
<span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1">
<auth-button :data="scope.scope" :show-btn-ids="['9031308']" />
</span>
<!-- 重新发起 -->
<span style="margin-right: 10px"
v-if="
scope.scope.systemStatus == 4 ||
scope.scope.approveStatus == 3 ||
scope.scope.approveStatus == 4
">
<auth-button :data="scope.scope"
:show-btn-ids="['9031309']" />
<span style="margin-right: 10px" v-if="
scope.scope.systemStatus == 4 ||
scope.scope.approveStatus == 3 ||
scope.scope.approveStatus == 4
">
<auth-button :data="scope.scope" :show-btn-ids="['9031309']" />
</span>
</div>
</d2-table>
</div>
<!-- 驳回 -->
<reject-dialog :reject-visible="rejectVisible"
:params-obj="recordInfo"
v-if="rejectVisible"
@dialogClose="rejectDialogClose" />
<reject-dialog :reject-visible="rejectVisible" :params-obj="recordInfo" v-if="rejectVisible"
@dialogClose="rejectDialogClose" />
</d2-container>
</template>
<script>
......@@ -166,16 +143,6 @@ export default {
optionId: "confId",
optionLabel: "confValue",
optionsName: "approveStatusOpt"
},
{
label: "上架类型",
name: "shelfType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "shelfTypeOpt"
}
],
getListApi: getPage,
......
<template>
<d2-container class="customer-tags m-t-40" v-loading="loading">
<d2-container class="edit-invoice" v-loading="loading">
<div class="d2-container-content">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="150px" default-width="308px" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<glsx-combi-form class="edit-form-container p-t-20" ref="editFormRef" label-width="150px" default-width="308px" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<div slot="invoiceIssueOptions" slot-scope="scope">
<el-checkbox-group v-model="editData[scope.scope.name]">
<el-checkbox v-for="(item, index) in baseData[scope.scope.optionsName]" :key="index" :label="item[scope.scope.optionId]">
......@@ -9,13 +9,21 @@
</el-checkbox>
</el-checkbox-group>
</div>
<div slot="bizOrderCode" slot-scope="scope">
<el-input :placeholder="scope.scope.placeholder" v-model="editData[scope.scope.name]" :maxlength="scope.scope.maxlength"></el-input>
<el-button type="text" class="add-mer-btn" @click="getInvoiceInfo">搜索</el-button>
<div slot="bizOrderCode" class="bizOrderCode" slot-scope="scope">
<div class="flex">
<el-input :placeholder="scope.scope.placeholder" v-model="editData[scope.scope.name]" :maxlength="scope.scope.maxlength"></el-input>
<el-button type="text" class="btn-search" @click="getInvoiceInfo">搜索</el-button>
</div>
<div class="tip">
<img class="icon-mark" src="@/assets/mark.png">
主订单必需是嘀加收款且为已支付状态才允许开票。开票信息在填写符合条件主订单号后自动填写。
</div>
</div>
</glsx-combi-form>
<el-button type="primary" @click="handleConfirm">提交</el-button>
<!-- <el-button type="default" @click="goBack">取消</el-button> -->
<div class="btn-box">
<el-button type="primary" @click="handleConfirm">提交</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
</d2-container>
</template>
......@@ -36,21 +44,22 @@ export default {
bizOrderCode: '',
privateProject: '',
privateMoney: 0,
privateAmount: '',
privatePrice: '',
privateSpec: '',
privateUnit: '',
casherName: '',
reviewerName: '',
allowInvoiceCount: 0,
invoiceRemark: '',
expireDay: '',
expireDay: '7',
email: ''
},
formRules: {
invoiceIssueOptions: [{ required: true, message: '请选择可选开票种类', trigger: 'change' }],
bizOrderCode: [{ required: true, message: '请输入主订单号', trigger: 'blur' }],
email: [{ required: true, message: '请输入发送邮件', trigger: 'blur' }],
email: [
{ required: true, message: '请输入发送邮件', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
],
privateProject: [{ required: true, message: '请输入开票项目', trigger: 'blur' }],
privateMoney: [{ required: true, message: '请输入待开票金额', trigger: 'blur' }],
},
editFormData: [
{
......@@ -92,48 +101,12 @@ export default {
maxlength: '23'
},
{
label: "数量",
name: "privateAmount",
type: "input",
style: { width: '42%' },
placeholder: "接口返回(多条数量使用“/”隔开)",
isDisabled: true,
maxlength: '20'
},
{
label: "单价",
name: "privatePrice",
type: "input",
style: { width: '42%' },
placeholder: "接口返回(多条单价使用“/”隔开)",
isDisabled: true,
maxlength: '23'
},
{
label: "规格型号",
name: "privateSpec",
type: "input",
style: { width: '42%' },
placeholder: "接口返回(默认为空,显示为--)",
isDisabled: true,
maxlength: '20'
},
{
label: "单位",
name: "privateUnit",
type: "input",
style: { width: '42%' },
placeholder: "接口返回(默认展示“pcs”)",
isDisabled: true,
maxlength: '50'
},
{
label: "收款人",
name: "casherName",
type: "input",
style: { width: '42%' },
placeholder: "请填写",
maxlength: '20'
maxlength: '16'
},
{
label: "复核人",
......@@ -141,7 +114,7 @@ export default {
type: "input",
style: { width: '42%' },
placeholder: "请填写",
maxlength: '20'
maxlength: '16'
},
{
label: "可开票张数",
......@@ -229,7 +202,7 @@ export default {
})
},
resetPrivateVal() {
const attrList = ['privateProject', 'privateAmount', 'privatePrice']
const attrList = ['privateProject']
attrList.forEach(item => {
this.editData[item] = ''
})
......@@ -255,8 +228,6 @@ export default {
let separate = idx ? '/' : ''
this.editData.privateProject = this.editData.privateProject + separate + item.itemName
this.editData.privateMoney = (Number(this.editData.privateMoney) + Number(item.invoiceItemAmount)).toFixed(2)
this.editData.privateAmount = this.editData.privateAmount + separate + '1'
this.editData.privatePrice = this.editData.privatePrice + separate + item.invoiceItemAmount
})
},
getOptionsList(formName = "editFormData") {
......@@ -280,6 +251,9 @@ export default {
})
return params
},
handleCancel() {
this.$emit('handleChangeTab', { activeTab: "2" })
},
handleConfirm() {
if (this.loading) {
......@@ -288,12 +262,12 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.dealParams()
console.log(params, 'params----')
this.loading = true
invoiceCreate(params).then(res => {
if (res) {
this.$message.success("操作成功")
this.resetAll()
this.handleCancel()
}
}).finally(() => {
this.loading = false
......@@ -304,8 +278,36 @@ export default {
}
};
</script>
<style scoped>
.m-t-40 {
margin-top: 40px;
<style lang="scss">
.edit-invoice {
.p-t-20 {
padding-top: 20px;
}
.bizOrderCode {
.flex {
display: flex;
width: 308px;
}
.el-input--small {
width: calc(100% - 30px);
}
.btn-search {
margin-left: 10px;
}
.tip {
display: flex;
align-items: center;
color: #999999;
font-size: 26rpx;
.icon-mark {
width: 18px;
height: 18px;
margin-right: 4px;
}
}
}
.btn-box {
text-align: center;
}
}
</style>
......@@ -10,7 +10,7 @@
:key="index">
</el-tab-pane>
</el-tabs>
<components :is="tabName"></components>
<components :is="tabName" @handleChangeTab="handleChangeTab"></components>
</div>
</div>
</template>
......@@ -57,7 +57,15 @@ export default {
2: "invoiceCodeList"
}
this.tabName = arr[+this.activeName]
}
},
handleChangeTab(e) {
if(!e) {
return true
}
let { activeTab } = e
this.activeName = activeTab
this.handleClick()
},
}
}
</script>
......
......@@ -317,6 +317,9 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
if (this.$route.params.orderCode) {
this.searchForm.bizOrderCode = this.$route.params.orderCode
}
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.invoiceData) {
this.searchFormSearch.invoiceStartDate = Util.dateFormate(this.searchFormSearch.invoiceData[0], 'YYYY-MM-DD HH:mm:ss')
......
<!-- 驳回 -->
<template>
<d2-dialog
:title="detailInfo && detailInfo.id ? '编辑总部账号' : '新建总部账号'"
:is-visible="visible"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm"
>
<div class="reject-dialog">
<glsx-combi-form
class="edit-form-container"
ref="formRef"
label-width="112px"
default-width="390px"
:form-ref="rejectRef"
:form-obj="accountForm"
:form-data="formData"
:form-rules="formRules"
></glsx-combi-form>
</div>
</d2-dialog>
</template>
<script>
import { createAccount, updateAccount } from "@api/large"
import { Validator } from "@/common/validator"
export default {
name: "addAccountDialog",
data() {
var checkPhoneObj = {
required: true,
validator: (rule, value, callback) => {
Validator.checkPhoneNumber(value)
? callback()
: callback(new Error("你输入的手机号码不正确,请重新输入"))
},
trigger: "blur"
}
return {
accountForm: {
accountName: "",
accountPhone: "",
accountPhone: "",
ownerShipType: "",
ownerDept: ""
},
dialogConfig: {
title: "提示",
width: "576px",
height: "315px"
},
rejectRef: "rejectRef",
formRules: {
accountName: [
{ required: true, message: "请输入员工姓名", trigger: "blur" }
],
accountPhone: [
{ required: true, message: "请输入手机号码", trigger: "blur" },
checkPhoneObj
],
ownerPost: [{ required: true, message: "请输入岗位", trigger: "blur" }]
},
formData: [
{
label: "员工姓名",
name: "accountName",
type: "input",
width: "300px",
labelWidth: "10px"
},
{
label: "手机号码",
name: "accountPhone",
type: "input",
width: "300px",
maxlength: "11",
labelWidth: "10px"
},
// {
// label: "归属中心",
// name: "ownerShipType",
// type: "select",
// width: "300px",
// optionList: [
// {
// confValue: "总部",
// confId: 0
// },
// {
// confValue: "驻店",
// confId: 1
// }
// ],
// optionId: "confId",
// optionLabel: "confValue",
// isDisabled: true
// },
// {
// label: "归属部门",
// name: "deliveryType",
// type: "select",
// optionList: [],
// optionId: "confId",
// optionLabel: "confName",
// optionsName: "deliveryTypeList"
// },
// {
// label: "归属中心",
// name: "ownerShipType",
// type: "input",
// width: "300px",
// labelWidth: "10px",
// isDisabled: true
// },
// {
// label: "归属部门",
// name: "ownerDept",
// type: "input",
// width: "300px",
// labelWidth: "10px",
// isDisabled: true
// },
{
label: "岗位",
name: "ownerPost",
type: "input",
width: "300px",
labelWidth: "10px"
}
],
baseData: {}
}
},
props: {
visible: {
type: Boolean,
default: false
},
detailInfo: {
type: Object,
default: () => {}
}
},
computed: {
isVisible: {
get() {
return this.visible
},
set(newVal) {}
}
},
watch: {
detailInfo(val) {
if (val) {
this.accountForm = val
}
}
},
mounted() {},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(async (valid) => {
if (valid) {
let api =
this.detailInfo && this.detailInfo.id
? updateAccount
: createAccount
let params = {
accountName: this.accountForm.accountName,
accountPhone: this.accountForm.accountPhone,
ownerPost: this.accountForm.ownerPost,
ownerShipType: 0,
ownerDept: this.accountForm.ownerDept,
ownerCenter: this.accountForm.ownerCenter,
useStatus: 1
}
if (this.detailInfo && this.detailInfo.id) {
params.id = this.detailInfo.id
params.useStatus = this.detailInfo.useStatus
params.ownerShipType = this.accountForm.ownerShipType
}
api(params).then((res) => {
if (res) {
this.handleClose()
this.notice.okTips("操作成功")
}
})
}
})
},
handleClose() {
this.$emit("dialogClose", false)
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 21px 0 83px;
::v-deep .el-textarea__inner {
height: 70px;
}
::v-deep .el-input__count {
right: 15px !important;
bottom: 3px !important;
font-size: 12px;
color: #999999;
}
}
</style>
......@@ -135,7 +135,18 @@
class="info-item"
>
<span class="item-label">{{ item.label }}:</span>
<span>{{ detailInfo[item.name] || "-" }}</span>
<!-- <span>{{ detailInfo[item.name] || "-" }}</span> -->
<template v-if="item.tooltip">
<template v-if="detailInfo[item.name]">
<el-tooltip class="item" effect="dark" :content="detailInfo[item.name]" placement="top-start">
<span class="max-width">{{ detailInfo[item.name] }}</span>
</el-tooltip>
</template>
<template v-else><span>-</span></template>
</template>
<template v-else>
<span>{{ detailInfo[item.name] || "-" }}</span>
</template>
</div>
<block
v-for="(item, index) in busiInfoAttrObj.dynamic"
......@@ -369,7 +380,8 @@ export default {
fixed: [
{
label: "退款子项",
name: "refundSubOrderCode"
name: "refundSubOrderCode",
tooltip: true
},
{
label: "可退总价",
......@@ -857,6 +869,14 @@ export default {
}
}
}
.max-width {
display: inline-block;
white-space: nowrap; /* 禁止文本换行 */
overflow: hidden; /* 超出内容隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
max-width: 290px;
vertical-align: middle;
}
</style>
<style>
......
......@@ -197,6 +197,16 @@ import { uploadFile } from "@/api/sys.base"
export default {
name: "NewSignRefundDialog",
data() {
var checkAmount = (rule, value, callback) => {
if (!value) {
return callback(new Error("请输入金额,支持输入1~999999的数字,支持小数点后2位"))
}
if (value > this.detail.total) {
callback(new Error('本次退款金额不可超过可退总价'))
} else {
callback()
}
}
return {
userInfo: this.$store.state.d2admin.user.info,
loading: false,
......@@ -334,7 +344,7 @@ export default {
optionLabel: "confLabel",
optionsName: "refundList",
optionList: [],
isDisabled: false,
isDisabled: true,
style: { width: "520px" },
handleRadioChange: () => {}
},
......@@ -466,7 +476,8 @@ export default {
required: true,
message: "请输入金额,支持输入1~999999的数字,支持小数点后2位",
trigger: "change"
}
},
{ validator: checkAmount, trigger: "blur" }
]
},
{
......@@ -684,6 +695,7 @@ export default {
mounted() {
this.infoForm.orderType = this.orderType
console.log(this.detail, '===========detail')
// 入口:精品升级、会员权益升级、次新车转化,售后众筹、积分商城
if (this.detail) {
this.orderInfoList.push({
......@@ -692,6 +704,7 @@ export default {
total: this.detail.total,
refundSubOrderCode: this.detail.refundSubOrderCode
})
// this.infoForm.refundType = this.detail.isAll ? 1 : 2
this.infoForm.bizOrderCodeList.push(this.detail.orderCode)
// 判断是否部分退款
this.judgeRefundType()
......@@ -815,7 +828,7 @@ export default {
this.judgeRefundPoints(this.detail.refundType, "refundPoints")
this.judgeRefundPoints(this.detail.refundType, "refundPoints2")
}
this.infoForm.refundType = this.detail.isAll ? '1' : '2'
// if (this.infoForm.refundPoints2 === 0 || this.infoForm.refundPoints2) {
// }/
......@@ -833,6 +846,7 @@ export default {
this.infoForm.marketingCost =
res.marketingCost + res.rewardAndPenaltyCost
}
console.log(this.infoForm, this.detail, 'infoForm')
})
},
......
......@@ -4,12 +4,12 @@
<div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column :selectable-fn="selectableFn" type="selection" width="55" align="center" />
<el-table-column :selectable="selectableFn" type="selection" width="55" align="center" />
<template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope">{{
scope.row[item.prop] ? scope.row[item.prop] : "-"
}}</span>
<span slot-scope="scope">
{{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }}
</span>
</el-table-column>
</template>
</el-table>
......@@ -52,7 +52,8 @@ export default {
},
{
label: '售价',
prop: 'upgradePrice'
prop: 'upgradePrice',
unit: '¥'
},
{
label: '数量/件',
......@@ -60,11 +61,13 @@ export default {
},
{
label: '支付金额',
prop: 'totalPrice'
prop: 'totalPrice',
unit: '¥'
}
],
total: 0,
refundSubOrderCode: ''
refundSubOrderCode: '',
isAll: false
}
},
props: {
......@@ -88,18 +91,21 @@ export default {
selectableFn(row) {
console.log(row)
if (row.status == 2) return false
else if (row.status == 1) return true
else return true
},
async getList(orderCode) {
const res = await goodsSubOrder({ orderCode })
this.tableData = res
this.$refs.seletingTable.toggleAllSelection()
},
handleChange(selection) {
console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection)
},
handleAll(selection) {
console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection)
},
getParams(selection) {
......@@ -114,10 +120,11 @@ export default {
console.log(this.refundSubOrderCode)
},
handleConfirm() {
const {refundSubOrderCode, total} = this
const {refundSubOrderCode, total, isAll} = this
this.$emit("handleConfirm", {
total,
refundSubOrderCode
refundSubOrderCode,
isAll
})
},
handleClose() {
......
......@@ -32,7 +32,9 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="商品名称:">
{{ detailInfo.goodsName ? detailInfo.goodsName : "-" }}
<el-tooltip class="item" effect="dark" :content="detailInfo.goodsName" placement="top-start">
<div class="max-width">{{ detailInfo.goodsName ? detailInfo.goodsName : "-" }}</div>
</el-tooltip>
</el-form-item></el-col
>
......@@ -66,7 +68,7 @@
<el-col :span="8">
<el-form-item
:label="
detailInfo.failType == '退款' ? '退回积分' : '积分收益:'
detailInfo.failType == '退款' ? '退回积分:' : '积分收益:'
"
class="halfItem"
>
......@@ -171,7 +173,9 @@
v-if="detailInfo.status == '已失效'"
>
<el-form-item label="退款子订单信息:" class="halfItem">
{{ detailInfo.refundSubOrderCode ? detailInfo.refundSubOrderCode : "-" }}
<el-tooltip class="item" effect="dark" :content="detailInfo.refundSubOrderCode" placement="top-start">
<div class="max-width">{{ detailInfo.refundSubOrderCode ? detailInfo.refundSubOrderCode : "-" }}</div>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
......@@ -531,6 +535,12 @@ export default {
justify-content: center;
margin-top: 20px;
}
.max-width {
white-space: nowrap; /* 禁止文本换行 */
overflow: hidden; /* 超出内容隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
max-width: 150px;
}
</style>
<style>
......
......@@ -4,12 +4,12 @@
<div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column :selectable-fn="selectableFn" type="selection" width="55" align="center" />
<el-table-column :selectable="selectableFn" type="selection" width="55" align="center" />
<template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope">{{
scope.row[item.prop] ? scope.row[item.prop] : "-"
}}</span>
<span slot-scope="scope">
{{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }}
</span>
</el-table-column>
</template>
</el-table>
......@@ -52,7 +52,8 @@ export default {
},
{
label: '售价',
prop: 'upgradePrice'
prop: 'upgradePrice',
unit: '¥'
},
{
label: '数量/件',
......@@ -60,11 +61,13 @@ export default {
},
{
label: '支付金额',
prop: 'totalPrice'
prop: 'totalPrice',
unit: '¥'
}
],
total: 0,
refundSubOrderCode: ''
refundSubOrderCode: '',
isAll: false
}
},
props: {
......@@ -88,18 +91,21 @@ export default {
selectableFn(row) {
console.log(row)
if (row.status == 2) return false
else if (row.status == 1) return true
else return true
},
async getList(orderCode) {
const res = await getGoodsSubOrder({ orderCode })
this.tableData = res
this.$refs.seletingTable.toggleAllSelection()
},
handleChange(selection) {
console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection)
},
handleAll(selection) {
console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection)
},
getParams(selection) {
......@@ -114,10 +120,11 @@ export default {
console.log(this.refundSubOrderCode)
},
handleConfirm() {
const {refundSubOrderCode, total} = this
const {refundSubOrderCode, total, isAll} = this
this.$emit("handleConfirm", {
total,
refundSubOrderCode
refundSubOrderCode,
isAll
})
},
handleClose() {
......
......@@ -101,6 +101,12 @@
:form-obj="refundForm"
:form-data="refundFormData"
>
<template slot="maxPoints">
<div class="max-value">可退积分:{{refundForm.remainingScore}}</div>
</template>
<template slot="maxAmount">
<div class="max-value">可退金额:{{refundInfo.total}}</div>
</template>
</glsx-combi-form>
</d2-dialog>
<refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail>
......@@ -146,7 +152,7 @@ export default {
) {
callback(new Error("输入的积分超过当前订单最大积分"))
} else if (
value >= this.refundForm.remainingScore &&
value > this.refundForm.remainingScore &&
this.refundForm.refundType == 2
) {
callback(new Error("输入的积分超过当前订单最大积分"))
......@@ -384,12 +390,18 @@ export default {
isDisabled: false
},
{
addHtml: 'maxPoints'
},
{
label: "退回金额",
name: "refundAmount",
type: "input",
width: "290px",
isDisabled: false
}
},
{
addHtml: 'maxAmount'
},
],
refundDetailVisible: false,
dataInfo: {},
......@@ -671,6 +683,9 @@ export default {
console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total
this.refundInfo.isAll = val.isAll
this.refundForm.refundType = val.isAll ? 1 : 2
this.refundFormData[0].isDisabled = true
this.handleRefund(this.refundInfo) // 原来的逻辑
this.refundDetailVisible = false
},
......@@ -682,7 +697,8 @@ export default {
this.refundForm.orderCode = data.orderCode
this.refundForm.tempPoints = data.integralIncome
this.refundForm.refundPoints = data.integralIncome //退还积分
this.refundForm.refundAmount = data.orderMoney //退还金额
this.refundForm.refundAmount = data.total
// this.refundForm.refundAmount = data.orderMoney //退还金额
this.refundForm.staffUuid = data.staffUuid
this.refundForm.refundSubOrderCode = data.refundSubOrderCode
this.refundForm.refundableTotalPrice = data.total
......@@ -700,7 +716,7 @@ export default {
this.refundForm.remainingScore = res.remainingScore //剩余积分
// this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = true
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
// this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundFormData[
this.findAttrIdx("refundType")
].optionList[0].isDisabled = false
......@@ -708,7 +724,7 @@ export default {
this.refundForm.remainingScore = res.remainingScore
// this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = false
this.refundForm.refundType = 2
// this.refundForm.refundType = 2
this.refundFormData[
this.findAttrIdx("refundType")
].optionList[0].isDisabled = true
......@@ -872,4 +888,7 @@ export default {
border-top: 1px solid #e5e5e5;
}
}
.max-value {
margin-left: 220px;
}
</style>
......@@ -249,11 +249,15 @@ export default {
) + ' 23:59:59'
delete params.extractionTime
}
if (params.checkStatus === 0) {
params.checkStatusList = [params.checkStatus]
delete params.checkStatus
}
if (params.checkStatus) {
if (params.checkStatus == 3) {
params.checkStatusList = [3, 4]
} else {
params.checkStatusList = Array.from[params.checkStatus]
params.checkStatusList = [params.checkStatus]
}
delete params.checkStatus
}
......
......@@ -23,7 +23,7 @@
</div>
</template>
</div>
<d2-table-header title="审批列表">
<d2-table-header title="未推送列表">
<el-button size="mini" type="primary" plain @click="exportTable">导出</el-button>
</d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
......
......@@ -23,7 +23,7 @@
</div>
</template>
</div>
<d2-table-header title="审批列表">
<d2-table-header title="推送列表">
<el-button size="mini" type="primary" plain @click="exportTable">导出</el-button>
</d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
......
......@@ -91,7 +91,7 @@ export default {
return {
settingInfo: [],
formData: {
carBrand: false,
carBrand: true,
carNo: false,
idNumber: false,
zyVoucher: true
......
......@@ -65,6 +65,12 @@
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<template slot="typeHtml"
slot-scope="scope">
<span :class="baseData.businessOptShowClass[scope.scope.businessType]">
{{ baseData.businessNameShow[scope.scope.businessType] }}
</span>
</template>
<div slot="auth-button"
slot-scope="scope">
<!-- 详情 -->
......@@ -74,13 +80,13 @@
</span>
<!-- 修改 -->
<span style="margin-right: 10px"
v-if="shouldShowEditDeleteButtons(scope.scope.dealMonth)">
v-if="scope.scope.allowUpdate == true">
<auth-button :data="scope.scope"
:show-btn-ids="['9061932']" />
</span>
<!-- 删除 -->
<span style="margin-right: 10px"
v-if="shouldShowEditDeleteButtons(scope.scope.dealMonth)">
v-if="scope.scope.allowUpdate == true">
<auth-button :data="scope.scope"
:show-btn-ids="['9061933']" />
</span>
......@@ -198,7 +204,7 @@ export default {
label: '驻店员工',
name: 'staffName',
type: 'input',
maxlength: 10
maxlength: 50
},
{
label: '成交率',
......@@ -261,7 +267,8 @@ export default {
},
{
label: "业务类型",
prop: "businessTypeDesc"
addHtml: "typeHtml",
width: "150"
},
{
label: "录入时间",
......@@ -285,7 +292,17 @@ export default {
}, {
confId: 2,
confValue: '延保'
}]
}],
businessOptShowClass: {
0: "type-yellow",
1: "type-blue",
2: "type-green"
},
businessNameShow: {
0: "轻改",
1: "权益",
2: "延保"
},
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
......@@ -339,32 +356,6 @@ export default {
this.getBrands()
},
// 已录入数据成交月份是当前月份 或者上月(当前日期是1-10号)
shouldShowEditDeleteButtons(monthParam) {
const today = new Date()
const currentYear = today.getFullYear()
const currentMonth = today.getMonth() + 1
const currentDay = today.getDate()
// 格式化当前月份为 YYYY-MM
const currentYearMonth = `${currentYear}-${String(currentMonth).padStart(2, '0')}`
// 计算上个月
let lastYear = currentYear
let lastMonth = currentMonth - 1
if (lastMonth === 0) {
lastMonth = 12
lastYear -= 1
}
// 格式化上个月为 YYYY-MM
const lastYearMonth = `${lastYear}-${String(lastMonth).padStart(2, '0')}`
if (monthParam === currentYearMonth) {
return true // 当前月直接返回 true
}
if (monthParam === lastYearMonth) {
return currentDay <= 10 // 上月时,判断是否在1-10号
}
return false // 其他情况
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -638,6 +629,31 @@ export default {
font-size: 0;
}
@mixin typeBase {
width: 52px;
border-radius: 239px;
opacity: 1;
font-size: 14px;
text-align: center;
line-height: 24px;
display: inline-block;
}
.type-yellow {
@include typeBase();
background: #ff8d1a1a;
color: #ff8d1a;
}
.type-blue {
@include typeBase();
background: #5850ff1a;
color: #5850ff;
}
.type-green {
@include typeBase();
background: #43cf7c1a;
color: #43cf7c;
}
.import-template {
position: absolute;
height: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!