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 = ( ...@@ -25,6 +25,8 @@ const request = (
apiName = "dj" apiName = "dj"
} else if (params.method.includes("dj.api.script")) { } else if (params.method.includes("dj.api.script")) {
apiName = "script" apiName = "script"
} else if (params.method.includes("dj.smartcarlife.stock")) {
apiName = "dj.smartcarlife"
} else { } else {
// console.log(params.method.split(".api")) // console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0] 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 { ...@@ -56,7 +56,9 @@ export default {
promiseGetGoods: null, promiseGetGoods: null,
goods: null, goods: null,
isLoadingGoods: false, // 加载状态 isLoadingGoods: false, // 加载状态
merchantSettleDistributeRuleLastRule: null merchantSettleDistributeRuleLastRule: null,
firstLineSunshineOnlinePointsFlag: null,
firstLineSunshine2OnlinePointsFlag: null
}, },
mutations: { mutations: {
/** /**
...@@ -204,6 +206,12 @@ export default { ...@@ -204,6 +206,12 @@ export default {
}, },
operationModeAsync(state) { operationModeAsync(state) {
return state.operationModeAsync return state.operationModeAsync
},
firstLineSunshineOnlinePointsFlagAsync(state) {
return state.firstLineSunshineOnlinePointsFlag
},
firstLineSunshine2OnlinePointsFlagAsync(state) {
return state.firstLineSunshine2OnlinePointsFlag
} }
} }
} }
...@@ -39,21 +39,6 @@ ...@@ -39,21 +39,6 @@
</template> </template>
<template v-else>-</template> <template v-else>-</template>
</div> </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"> <div slot="merchantName" slot-scope="scope">
<template v-if="scope.scope.merchantName"> <template v-if="scope.scope.merchantName">
{{ scope.scope.merchantName.split(",").length > 1 ? scope.scope.merchantName.split(",")[0] + '...' : {{ scope.scope.merchantName.split(",").length > 1 ? scope.scope.merchantName.split(",")[0] + '...' :
...@@ -119,11 +104,11 @@ export default { ...@@ -119,11 +104,11 @@ export default {
prop: "brandName", prop: "brandName",
addHtml: "brandName" addHtml: "brandName"
}, },
{ // {
label: "子品牌", // label: "子品牌",
prop: "subBrandName", // prop: "subBrandName",
addHtml: "subBrandName" // addHtml: "subBrandName"
}, // },
{ {
label: "关联门店", label: "关联门店",
prop: "merchantName", prop: "merchantName",
...@@ -237,7 +222,7 @@ export default { ...@@ -237,7 +222,7 @@ export default {
id: row.id, id: row.id,
isRelMerchant: res.isRelMerchant, isRelMerchant: res.isRelMerchant,
materialInfoList: res.materialInfoList, materialInfoList: res.materialInfoList,
brandData: res.relBrandList, brandData: res.relList,
storeData: res.relMerchantList storeData: res.relMerchantList
} }) } })
}, },
......
...@@ -71,7 +71,8 @@ export default { ...@@ -71,7 +71,8 @@ export default {
dialogVisible: Boolean, dialogVisible: Boolean,
formInfo: Object, formInfo: Object,
brandData: Array, brandData: Array,
levelId: Number levelId: Number,
carSeriesList: Array
}, },
watch: { watch: {
formInfo(val) { formInfo(val) {
...@@ -94,8 +95,12 @@ export default { ...@@ -94,8 +95,12 @@ export default {
handleConfirm() { handleConfirm() {
this.$refs.seriesForm.validate((valid) => { this.$refs.seriesForm.validate((valid) => {
if (valid) { if (valid) {
console.log(this.formData)
const {contentPicUrl, carSeries, index} = 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 = { const obj = {
seriesId: carSeries.id, seriesId: carSeries.id,
seriesName: carSeries.name, seriesName: carSeries.name,
......
<template> <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"> @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline"> <el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:"> <el-form-item label="品牌名称:">
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
</template> </template>
<script> <script>
import { deepClone } from "@/common/util"
import { getCarbrandTree } from "@api/contentManager" import { getCarbrandTree } from "@api/contentManager"
export default { export default {
name: "brandTree", name: "brandTree",
...@@ -46,50 +47,11 @@ export default { ...@@ -46,50 +47,11 @@ export default {
checked: false, checked: false,
checkList: [], checkList: [],
brandData: [], 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: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
} },
selectList: []
} }
}, },
watch: { watch: {
...@@ -99,9 +61,10 @@ export default { ...@@ -99,9 +61,10 @@ export default {
defaultKeys(val) { defaultKeys(val) {
console.log(val) console.log(val)
this.$nextTick(() => { this.$nextTick(() => {
val.forEach(i => { // val.forEach(i => {
this.$refs.tree.setChecked(i, true) // this.$refs.tree.setChecked(i, true)
}) // })
this.$refs.tree.setCheckedKeys(val)
}) })
} }
}, },
...@@ -120,7 +83,13 @@ export default { ...@@ -120,7 +83,13 @@ export default {
}, },
handleConfirm() { handleConfirm() {
this.resetChecked() 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() { onSearch() {
this.$refs.tree.filter(this.filterText) this.$refs.tree.filter(this.filterText)
...@@ -129,6 +98,20 @@ export default { ...@@ -129,6 +98,20 @@ export default {
console.log(data, this.$refs.tree.getCheckedNodes()); console.log(data, this.$refs.tree.getCheckedNodes());
this.checkList = 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() { resetChecked() {
this.$refs.tree.setCheckedKeys([]); this.$refs.tree.setCheckedKeys([]);
...@@ -189,8 +172,8 @@ export default { ...@@ -189,8 +172,8 @@ export default {
background: #ffffff; background: #ffffff;
height: 324px; height: 324px;
overflow-y: auto; overflow-y: auto;
width: 600px; width: 100%;
margin-right: 20px; // margin-right: 20px;
.tree-title { .tree-title {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -15,11 +15,12 @@ ...@@ -15,11 +15,12 @@
v-model.trim="storeSearchForm.brandName" v-model.trim="storeSearchForm.brandName"
placeholder="门店名称" placeholder="门店名称"
max-length="20" max-length="20"
@input="handleStoreInput"
@keydown.native="handleStoreInput" @keydown.native="handleStoreInput"
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button> <el-button type="primary" @click="handleSearchStore">搜索</el-button>
</el-form> </el-form>
<el-row class="tableCon"> <el-row class="tableCon">
<div class="tableBox"> <div class="tableBox">
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
@select-all="handleAll" @select-all="handleAll"
> >
<el-table-column type="selection" width="55" align="center" /> <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 prop="merchantName" label="门店名称" align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -72,6 +74,8 @@ ...@@ -72,6 +74,8 @@
</template> </template>
<script> <script>
import { debounce } from "../../../index/debounce"
import { deepClone } from "@/common/util"
import { getCarBrandIds } from "@api/contentManager" import { getCarBrandIds } from "@api/contentManager"
export default { export default {
name: "RelateStoreDialog", name: "RelateStoreDialog",
...@@ -84,6 +88,7 @@ export default { ...@@ -84,6 +88,7 @@ export default {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
storeSearchForm: {}, storeSearchForm: {},
allData: []
} }
}, },
...@@ -101,8 +106,13 @@ export default { ...@@ -101,8 +106,13 @@ export default {
default: () => [] default: () => []
} }
}, },
created() {
// 创建防抖版本的搜索函数
this.debouncedSearch = debounce(this.handleSearchStore, 300);
},
mounted() { mounted() {
console.log(this.brandData) console.log(this.brandData)
this.allData = deepClone(this.storeSelected)
this.selectedData = this.storeSelected this.selectedData = this.storeSelected
this.getSelectingList() this.getSelectingList()
}, },
...@@ -124,6 +134,7 @@ export default { ...@@ -124,6 +134,7 @@ export default {
secBrandIdList: _second secBrandIdList: _second
} }
getCarBrandIds(params).then((res) => { getCarBrandIds(params).then((res) => {
this.allData = deepClone(res)
this.selectingData = res this.selectingData = res
this.total = res.total this.total = res.total
this.$nextTick(() => { this.$nextTick(() => {
...@@ -131,6 +142,21 @@ export default { ...@@ -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) { handleChange(selection, row) {
var addOrDelete = !!selection.find((item) => item.merchantNo === row.merchantNo) var addOrDelete = !!selection.find((item) => item.merchantNo === row.merchantNo)
addOrDelete addOrDelete
...@@ -156,10 +182,10 @@ export default { ...@@ -156,10 +182,10 @@ export default {
const obj = this.selectingData.find((v) => v.merchantNo == row.merchantNo) const obj = this.selectingData.find((v) => v.merchantNo == row.merchantNo)
this.$refs.seletingTable.toggleRowSelection(obj) this.$refs.seletingTable.toggleRowSelection(obj)
}, },
handleCurrentChange(val) { // handleCurrentChange(val) {
this.currentPage = val // this.currentPage = val
this.getSelectingList() // this.getSelectingList()
}, // },
handleRelateStoreConfirm() { handleRelateStoreConfirm() {
this.$emit("handleRelateStoreConfirm", this.selectedData) this.$emit("handleRelateStoreConfirm", this.selectedData)
}, },
......
...@@ -1053,7 +1053,11 @@ export default { ...@@ -1053,7 +1053,11 @@ export default {
// 取消按钮返回列表页 // 取消按钮返回列表页
handleCancel() { handleCancel() {
this.$router.push({ this.$router.push({
name: "packageConfig" name: "packageConfig",
params: {
tabPane: '1',
tabLabel: 'UpgradeLightly'
}
}) })
}, },
getParams() { getParams() {
......
...@@ -5,49 +5,26 @@ ...@@ -5,49 +5,26 @@
<span>分账配置</span> <span>分账配置</span>
</div> </div>
<div style="padding: 20px"> <div style="padding: 20px">
<el-form <el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px">
ref="divisionRuleRef"
:model="financialObj"
label-suffix=":"
label-width="154px"
>
<el-form-item label="" prop="autoFlag"> <el-form-item label="" prop="autoFlag">
<span class="tips-block" slot="label"> <span class="tips-block" slot="label">
<span class="tips-label">线上自动分账</span> <span class="tips-label">线上自动分账</span>
<el-tooltip <el-tooltip popper-class="tooltip-class" effect="dark" content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
popper-class="tooltip-class" placement="top">
effect="dark" <span class="tips-icon" /> </el-tooltip>:
content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement="top"
>
<span class="tips-icon" /> </el-tooltip
>:
</span> </span>
<el-switch <el-switch v-model="financialObj.autoFlag" active-value="Y" disabled inactive-value="N" />
v-model="financialObj.autoFlag"
active-value="Y"
disabled
inactive-value="N"
/>
</el-form-item> </el-form-item>
<el-form-item label="结算时间方式"> <el-form-item label="结算时间方式">
<span class="tips-block" slot="label"> <span class="tips-block" slot="label">
<span class="tips-label">分账周期</span> <span class="tips-label">分账周期</span>
<el-tooltip <el-tooltip popper-class="tooltip-class" effect="dark" content="用户支付的款项可按T+1或指定日自动打款给商户。" placement="top">
popper-class="tooltip-class" <span class="tips-icon" /> </el-tooltip>:
effect="dark"
content="用户支付的款项可按T+1或指定日自动打款给商户。"
placement="top"
>
<span class="tips-icon" /> </el-tooltip
>:
</span> </span>
<div class="block_item" style="margin-bottom: 20px"> <div class="block_item" style="margin-bottom: 20px">
<span> <span>
分账周期 T+{{ settleTimeObj.first }}日 分账周期 T+{{ settleTimeObj.first }}日
<span v-show="financialObj.settleTimeType == 1" <span v-show="financialObj.settleTimeType == 1">(分账后第2天到分账方对公账户)</span>
>(分账后第2天到分账方对公账户)</span
>
</span> </span>
</div> </div>
</el-form-item> </el-form-item>
...@@ -57,26 +34,14 @@ ...@@ -57,26 +34,14 @@
</el-form> </el-form>
<el-tabs v-model="editableTabsValue" type="card" class="my-tab-pane"> <el-tabs v-model="editableTabsValue" type="card" class="my-tab-pane">
<!-- closable --> <!-- closable -->
<el-tab-pane <el-tab-pane v-for="item in editableTabs" :key="item.name" :label="item.title" :name="item.name">
v-for="item in editableTabs"
:key="item.name"
:label="item.title"
:name="item.name"
>
<span slot="label">{{ item.title }} </span> <span slot="label">{{ item.title }} </span>
<div class="classificationCptContainer"> <div class="classificationCptContainer">
<el-form <el-form ref="divisionRuleRef" :model="financialObj" label-suffix=":" label-width="154px">
ref="divisionRuleRef" <h3 v-if="
:model="financialObj" financialObj.goodsTypeGroupRules[editableTabsValue - 1]
label-suffix=":" .groupType == 1
label-width="154px" ">
>
<h3
v-if="
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.groupType == 1
"
>
全部品类 全部品类
</h3> </h3>
...@@ -85,21 +50,17 @@ ...@@ -85,21 +50,17 @@
{{ {{
financialObj.goodsTypeGroupRules[editableTabsValue - 1] financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.categoryType || "--" .categoryType || "--"
}}</el-form-item }}</el-form-item>
>
<el-form-item label=""> <el-form-item label="">
{{ {{
financialObj.goodsTypeGroupRules[editableTabsValue - 1] financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.packageArrText .packageArrText
}}</el-form-item }}</el-form-item>
>
</div> </div>
<template <template v-for="(item, index) in financialObj.goodsTypeGroupRules[
v-for="(item, index) in financialObj.goodsTypeGroupRules[ editableTabsValue - 1
editableTabsValue - 1 ].expenseCategoryRules">
].expenseCategoryRules"
>
<el-form-item :key="index" :label="item.expenseCategoryName"> <el-form-item :key="index" :label="item.expenseCategoryName">
<span>{{ <span>{{
getExpenseCategoryCalculateType( getExpenseCategoryCalculateType(
...@@ -111,15 +72,9 @@ ...@@ -111,15 +72,9 @@
</template> </template>
</el-form> </el-form>
</div> </div>
<tableAccount <tableAccount ref="tableAccount" :merchant-distribution-rules="financialObj.goodsTypeGroupRules[editableTabsValue - 1]
ref="tableAccount" .merchantDistributionRules
:merchant-distribution-rules=" " :table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules
"
:table-select-options="tableSelectOptions"
:classification-obj-select="tableClassificationObjSelect"
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -137,7 +92,7 @@ export default { ...@@ -137,7 +92,7 @@ export default {
props: { props: {
divisiObj: { divisiObj: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
data() { data() {
...@@ -185,19 +140,38 @@ export default { ...@@ -185,19 +140,38 @@ export default {
const platformSideobj = { const platformSideobj = {
merchantId: info.realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1) merchantId: info.realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
merchantName: info.realityPlatformMerchantName, merchantName: info.realityPlatformMerchantName,
targetMerchantType: 1 targetMerchantType: 1,
targetMerchantLevel: 1
} }
// 流量方 // 流量方
const merchantSideobj = { // const merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1) // merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.realityShopMerchantName, // merchantName: info.realityShopMerchantName,
targetMerchantType: 3 // 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 = { const serviceObj = {
merchantId: info.partnerMerchantId, merchantId: info.partnerMerchantId,
merchantName: info.partnerMerchantName, merchantName: info.partnerMerchantName,
targetMerchantType: 2 targetMerchantType: 2,
targetMerchantLevel: 1
} }
// // 如果勾选商户 就追加进去 // // 如果勾选商户 就追加进去
// if (info.djzhySubMerchantId) { // if (info.djzhySubMerchantId) {
...@@ -228,7 +202,7 @@ export default { ...@@ -228,7 +202,7 @@ export default {
deep: true deep: true
} }
}, },
created() {}, created() { },
methods: { methods: {
initData(data) { initData(data) {
...@@ -323,28 +297,6 @@ export default { ...@@ -323,28 +297,6 @@ export default {
this.financialObj = result this.financialObj = result
this.initSettleTimeObj() 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() { initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj const { settleTimeType, settleTime } = this.financialObj
this.settleTimeObj[settleTimeType == 1 ? "first" : "second"] = settleTime this.settleTimeObj[settleTimeType == 1 ? "first" : "second"] = settleTime
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId) arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId)
) )
}) })
console.log("list", arr) // console.log("list", arr)
return arr return arr
} }
}, },
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
const obj = this.classificationObjSelect const obj = this.classificationObjSelect
const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1) const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1)
const form = {} const form = {}
console.log("obj", obj) // console.log("obj", obj)
for (const key in obj) { for (const key in obj) {
obj[key].map((item) => { obj[key].map((item) => {
// 数字转字符串 // 数字转字符串
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
}) })
// 还要跟存在现在的选项里面 // 还要跟存在现在的选项里面
// console.log('findObj', findObj) console.log('findObj', findObj?.merchantId)
// console.log(name) // console.log(name)
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId }) // const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId })
// console.log(optIndex, 'optIndex') // console.log(optIndex, 'optIndex')
...@@ -194,7 +194,7 @@ export default { ...@@ -194,7 +194,7 @@ export default {
} }
// 判断id是否有在选项里面 没有就去掉 // 判断id是否有在选项里面 没有就去掉
this.form = form this.form = form
console.log(this.form, "this.form") // console.log(this.form, "this.form")
}, },
changFormList() { changFormList() {
console.log(this.form, "this.form") console.log(this.form, "this.form")
...@@ -211,62 +211,6 @@ export default { ...@@ -211,62 +211,6 @@ export default {
// this.handleConfirm() // this.handleConfirm()
// console.log('validField', validField) // console.log('validField', validField)
this.$refs.divisionRuleRef.clearValidate(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 @@ ...@@ -4,7 +4,7 @@
<div class="title"> <div class="title">
<span>分账配置</span> <span>分账配置</span>
<el-button class="ruleBtn" type="text" @click="ruleUpdateDialogShow = true">变更说明</el-button> <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>
<div class="publicContainer"> <div class="publicContainer">
<el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":" label-width="180px"> <el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":" label-width="180px">
...@@ -360,7 +360,7 @@ export default { ...@@ -360,7 +360,7 @@ export default {
// 按商品分类 // 按商品分类
async getGoodsCategoryConfigurationData() { async getGoodsCategoryConfigurationData() {
const result = await this.getGoodsCategoryConfiguration() const result = await this.getGoodsCategoryConfiguration()
const list = result const list = result.list
// console.log(result, "getGoodsCategoryConfigurationData") // console.log(result, "getGoodsCategoryConfigurationData")
if (list.length) { if (list.length) {
this.productType = list.map(({ categoryType, categoryName }) => { this.productType = list.map(({ categoryType, categoryName }) => {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-tab-pane v-for="(item, idx) in editableTabs" :key="item.name" :label="item.title" :name="item.name" <el-tab-pane v-for="(item, idx) in editableTabs" :key="item.name" :label="item.title" :name="item.name"
:closable="idx != 0"> :closable="idx != 0">
<span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title <span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title
}} }}
</span> </span>
<div class="classificationCptContainer"> <div class="classificationCptContainer">
<classificationCpt :goods-list="goodsTypeGroupRelations" :ref="`classification${item.name}`" <classificationCpt :goods-list="goodsTypeGroupRelations" :ref="`classification${item.name}`"
...@@ -201,8 +201,8 @@ export default { ...@@ -201,8 +201,8 @@ export default {
}, },
async getGoodsCategoryConfigurationData() { async getGoodsCategoryConfigurationData() {
const result = await this.getGoodsCategoryConfiguration() const result = await this.getGoodsCategoryConfiguration()
const list = result const list = result.list
console.log(result, "getGoodsCategoryConfigurationData") console.log(list, "getGoodsCategoryConfigurationData")
if (list.length) { if (list.length) {
this.productType = list.map(({ categoryType, categoryName }) => { this.productType = list.map(({ categoryType, categoryName }) => {
return { return {
......
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
// 按商品分类 // 按商品分类
async getGoodsCategoryConfigurationData() { async getGoodsCategoryConfigurationData() {
const result = await this.getGoodsCategoryConfiguration() const result = await this.getGoodsCategoryConfiguration()
const list = result const list = result.list
// console.log(result, "getGoodsCategoryConfigurationData") // console.log(result, "getGoodsCategoryConfigurationData")
if (list.length) { if (list.length) {
this.productType = list.map(({ categoryType, categoryName }) => { this.productType = list.map(({ categoryType, categoryName }) => {
......
...@@ -66,6 +66,16 @@ export default { ...@@ -66,6 +66,16 @@ export default {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.editData.operationMode = newVal this.editData.operationMode = newVal
} }
},
firstLineSunshineOnlinePointsFlagAsync: {
handler(newVal, oldVal) {
this.editData.firstLineSunshineOnlinePointsFlag = newVal
}
},
firstLineSunshine2OnlinePointsFlagAsync: {
handler(newVal, oldVal) {
this.editData.firstLineSunshine2OnlinePointsFlag = newVal
}
} }
}, },
data() { data() {
...@@ -97,7 +107,7 @@ export default { ...@@ -97,7 +107,7 @@ export default {
{ required: true, message: "请选择一线阳光是否开启线上积分" } { required: true, message: "请选择一线阳光是否开启线上积分" }
], ],
firstLineSunshine2OnlinePointsFlag: [ firstLineSunshine2OnlinePointsFlag: [
{ required: true, message: "请选择一线阳光是否开启线上积分" } { required: true, message: "请选择一线阳光2是否开启线上积分" }
] ]
}, },
editFormData: [ editFormData: [
...@@ -309,7 +319,14 @@ export default { ...@@ -309,7 +319,14 @@ export default {
optionList: [], optionList: [],
optionId: "confId", optionId: "confId",
optionLabel: "confName", optionLabel: "confName",
optionsName: "onlinePointsEnabledList" optionsName: "onlinePointsEnabledList",
changeAttr: (value, targetItem) => {
this.dealPartnerMer()
this.SET_DATA({
name: "firstLineSunshineOnlinePointsFlag",
data: value
})
}
}, },
{ {
label: "一线阳光2是否开启线上积分", label: "一线阳光2是否开启线上积分",
...@@ -319,7 +336,14 @@ export default { ...@@ -319,7 +336,14 @@ export default {
optionList: [], optionList: [],
optionId: "confId", optionId: "confId",
optionLabel: "confName", optionLabel: "confName",
optionsName: "onlinePointsEnabledList" optionsName: "onlinePointsEnabledList",
changeAttr: (value, targetItem) => {
this.dealPartnerMer()
this.SET_DATA({
name: "firstLineSunshine2OnlinePointsFlag",
data: value
})
}
} }
], ],
baseData: { baseData: {
...@@ -339,7 +363,9 @@ export default { ...@@ -339,7 +363,9 @@ export default {
...mapGetters("goodsInfoData", { ...mapGetters("goodsInfoData", {
estimatedFlow: "estimatedFlow", estimatedFlow: "estimatedFlow",
estimatedUpgradeRate: "estimatedUpgradeRate", estimatedUpgradeRate: "estimatedUpgradeRate",
operationModeAsync: "operationModeAsync" operationModeAsync: "operationModeAsync",
firstLineSunshineOnlinePointsFlagAsync: "firstLineSunshineOnlinePointsFlagAsync",
firstLineSunshine2OnlinePointsFlagAsync: "firstLineSunshine2OnlinePointsFlagAsync"
}) })
}, },
mounted() { mounted() {
......
...@@ -94,11 +94,11 @@ export default { ...@@ -94,11 +94,11 @@ export default {
}).then((result) => { }).then((result) => {
console.log(result, "result") console.log(result, "result")
const realityShopMerchantName = result.basicInfo.shelfType == 1 ? result.merchantSettleDistributeRule.realityShopMerchantName : result.merchantSettleDistributeRule.realityShopLevel == 1 ? '门店' : '上级' 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, { this.divisiObj = Object.assign(result.merchantSettleDistributeRule, {
realityShopMerchantName, realityShopMerchantName,
partnerMerchantName: result.createBusinessApproveMerchantList[0].partnerMerchantName, partnerMerchantName: result.createBusinessApproveMerchantList[0].partnerMerchantName,
partnerMerchantId: result.createBusinessApproveMerchantList[0].parentMerchantId partnerMerchantId: result.createBusinessApproveMerchantList[0].partnerMerchantId
}) })
this.financialObj = result.merchantReconciliationRule this.financialObj = result.merchantReconciliationRule
......
<!-- 嘀加上架 --> <!-- 嘀加上架 -->
<template> <template>
<d2-container class="shelfManage"> <d2-container class="shelfManage">
<div class="header" <div class="header" slot="header">
slot="header"> <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
<d2-search ref="showSearch" :form-data="showFormData">
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset"> 重置 </el-button>
@click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -24,57 +17,41 @@ ...@@ -24,57 +17,41 @@
<span slot="left"> <span slot="left">
<!-- 嘀加上架与销售合同 --> <!-- 嘀加上架与销售合同 -->
<span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" <auth-button category="Button" :show-btn-ids="['9031301']" />
:show-btn-ids="['9031301']" />
</span> </span>
<!-- 嘀加上架修改 --> <!-- 嘀加上架修改 -->
<auth-button style="display: inline-block" <auth-button style="display: inline-block" category="Button" :show-btn-ids="['9031303']" />
category="Button"
:show-btn-ids="['9031303']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="packageIndexTable" <d2-table ref="packageIndexTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:search-form="searchForm" :before-search-fn="beforeSearchFn">
:table-params="tableParams" <div slot="auth-button" slot-scope="scope">
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 - 查看合同 --> <!-- 查看 - 查看合同 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" <auth-button :data="scope.scope" :show-btn-ids="['9031304']" />
:show-btn-ids="['9031304']" />
</span> </span>
<!-- 确认 - 编辑合同 --> <!-- 确认 - 编辑合同 -->
<span style="margin-right: 10px" <span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1">
v-if="scope.scope.systemStatus == 1"> <auth-button :data="scope.scope" :show-btn-ids="['9031306']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9031306']" />
</span> </span>
<!-- 驳回 --> <!-- 驳回 -->
<span style="margin-right: 10px" <span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1">
v-if="scope.scope.systemStatus == 1"> <auth-button :data="scope.scope" :show-btn-ids="['9031308']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9031308']" />
</span> </span>
<!-- 重新发起 --> <!-- 重新发起 -->
<span style="margin-right: 10px" <span style="margin-right: 10px" v-if="
v-if=" scope.scope.systemStatus == 4 ||
scope.scope.systemStatus == 4 || scope.scope.approveStatus == 3 ||
scope.scope.approveStatus == 3 || scope.scope.approveStatus == 4
scope.scope.approveStatus == 4 ">
"> <auth-button :data="scope.scope" :show-btn-ids="['9031309']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9031309']" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 驳回 --> <!-- 驳回 -->
<reject-dialog :reject-visible="rejectVisible" <reject-dialog :reject-visible="rejectVisible" :params-obj="recordInfo" v-if="rejectVisible"
:params-obj="recordInfo" @dialogClose="rejectDialogClose" />
v-if="rejectVisible"
@dialogClose="rejectDialogClose" />
</d2-container> </d2-container>
</template> </template>
<script> <script>
...@@ -166,16 +143,6 @@ export default { ...@@ -166,16 +143,6 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "approveStatusOpt" optionsName: "approveStatusOpt"
},
{
label: "上架类型",
name: "shelfType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "shelfTypeOpt"
} }
], ],
getListApi: getPage, getListApi: getPage,
......
<template> <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"> <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"> <div slot="invoiceIssueOptions" slot-scope="scope">
<el-checkbox-group v-model="editData[scope.scope.name]"> <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]"> <el-checkbox v-for="(item, index) in baseData[scope.scope.optionsName]" :key="index" :label="item[scope.scope.optionId]">
...@@ -9,13 +9,21 @@ ...@@ -9,13 +9,21 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div slot="bizOrderCode" slot-scope="scope"> <div slot="bizOrderCode" class="bizOrderCode" slot-scope="scope">
<el-input :placeholder="scope.scope.placeholder" v-model="editData[scope.scope.name]" :maxlength="scope.scope.maxlength"></el-input> <div class="flex">
<el-button type="text" class="add-mer-btn" @click="getInvoiceInfo">搜索</el-button> <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> </div>
</glsx-combi-form> </glsx-combi-form>
<el-button type="primary" @click="handleConfirm">提交</el-button> <div class="btn-box">
<!-- <el-button type="default" @click="goBack">取消</el-button> --> <el-button type="primary" @click="handleConfirm">提交</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div> </div>
</d2-container> </d2-container>
</template> </template>
...@@ -36,21 +44,22 @@ export default { ...@@ -36,21 +44,22 @@ export default {
bizOrderCode: '', bizOrderCode: '',
privateProject: '', privateProject: '',
privateMoney: 0, privateMoney: 0,
privateAmount: '',
privatePrice: '',
privateSpec: '',
privateUnit: '',
casherName: '', casherName: '',
reviewerName: '', reviewerName: '',
allowInvoiceCount: 0, allowInvoiceCount: 0,
invoiceRemark: '', invoiceRemark: '',
expireDay: '', expireDay: '7',
email: '' email: ''
}, },
formRules: { formRules: {
invoiceIssueOptions: [{ required: true, message: '请选择可选开票种类', trigger: 'change' }], invoiceIssueOptions: [{ required: true, message: '请选择可选开票种类', trigger: 'change' }],
bizOrderCode: [{ required: true, message: '请输入主订单号', trigger: 'blur' }], 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: [ editFormData: [
{ {
...@@ -92,48 +101,12 @@ export default { ...@@ -92,48 +101,12 @@ export default {
maxlength: '23' 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: "收款人", label: "收款人",
name: "casherName", name: "casherName",
type: "input", type: "input",
style: { width: '42%' }, style: { width: '42%' },
placeholder: "请填写", placeholder: "请填写",
maxlength: '20' maxlength: '16'
}, },
{ {
label: "复核人", label: "复核人",
...@@ -141,7 +114,7 @@ export default { ...@@ -141,7 +114,7 @@ export default {
type: "input", type: "input",
style: { width: '42%' }, style: { width: '42%' },
placeholder: "请填写", placeholder: "请填写",
maxlength: '20' maxlength: '16'
}, },
{ {
label: "可开票张数", label: "可开票张数",
...@@ -229,7 +202,7 @@ export default { ...@@ -229,7 +202,7 @@ export default {
}) })
}, },
resetPrivateVal() { resetPrivateVal() {
const attrList = ['privateProject', 'privateAmount', 'privatePrice'] const attrList = ['privateProject']
attrList.forEach(item => { attrList.forEach(item => {
this.editData[item] = '' this.editData[item] = ''
}) })
...@@ -255,8 +228,6 @@ export default { ...@@ -255,8 +228,6 @@ export default {
let separate = idx ? '/' : '' let separate = idx ? '/' : ''
this.editData.privateProject = this.editData.privateProject + separate + item.itemName this.editData.privateProject = this.editData.privateProject + separate + item.itemName
this.editData.privateMoney = (Number(this.editData.privateMoney) + Number(item.invoiceItemAmount)).toFixed(2) 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") { getOptionsList(formName = "editFormData") {
...@@ -280,6 +251,9 @@ export default { ...@@ -280,6 +251,9 @@ export default {
}) })
return params return params
}, },
handleCancel() {
this.$emit('handleChangeTab', { activeTab: "2" })
},
handleConfirm() { handleConfirm() {
if (this.loading) { if (this.loading) {
...@@ -288,12 +262,12 @@ export default { ...@@ -288,12 +262,12 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.dealParams() var params = this.dealParams()
console.log(params, 'params----')
this.loading = true this.loading = true
invoiceCreate(params).then(res => { invoiceCreate(params).then(res => {
if (res) { if (res) {
this.$message.success("操作成功") this.$message.success("操作成功")
this.resetAll() this.resetAll()
this.handleCancel()
} }
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
...@@ -304,8 +278,36 @@ export default { ...@@ -304,8 +278,36 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style lang="scss">
.m-t-40 { .edit-invoice {
margin-top: 40px; .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> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:key="index"> :key="index">
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<components :is="tabName"></components> <components :is="tabName" @handleChangeTab="handleChangeTab"></components>
</div> </div>
</div> </div>
</template> </template>
...@@ -57,7 +57,15 @@ export default { ...@@ -57,7 +57,15 @@ export default {
2: "invoiceCodeList" 2: "invoiceCodeList"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
} },
handleChangeTab(e) {
if(!e) {
return true
}
let { activeTab } = e
this.activeName = activeTab
this.handleClick()
},
} }
} }
</script> </script>
......
...@@ -317,6 +317,9 @@ export default { ...@@ -317,6 +317,9 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
if (this.$route.params.orderCode) {
this.searchForm.bizOrderCode = this.$route.params.orderCode
}
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.invoiceData) { if (this.searchFormSearch.invoiceData) {
this.searchFormSearch.invoiceStartDate = Util.dateFormate(this.searchFormSearch.invoiceData[0], 'YYYY-MM-DD HH:mm:ss') 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 @@ ...@@ -135,7 +135,18 @@
class="info-item" class="info-item"
> >
<span class="item-label">{{ item.label }}:</span> <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> </div>
<block <block
v-for="(item, index) in busiInfoAttrObj.dynamic" v-for="(item, index) in busiInfoAttrObj.dynamic"
...@@ -369,7 +380,8 @@ export default { ...@@ -369,7 +380,8 @@ export default {
fixed: [ fixed: [
{ {
label: "退款子项", label: "退款子项",
name: "refundSubOrderCode" name: "refundSubOrderCode",
tooltip: true
}, },
{ {
label: "可退总价", label: "可退总价",
...@@ -857,6 +869,14 @@ export default { ...@@ -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>
<style> <style>
......
...@@ -197,6 +197,16 @@ import { uploadFile } from "@/api/sys.base" ...@@ -197,6 +197,16 @@ import { uploadFile } from "@/api/sys.base"
export default { export default {
name: "NewSignRefundDialog", name: "NewSignRefundDialog",
data() { 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 { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
loading: false, loading: false,
...@@ -334,7 +344,7 @@ export default { ...@@ -334,7 +344,7 @@ export default {
optionLabel: "confLabel", optionLabel: "confLabel",
optionsName: "refundList", optionsName: "refundList",
optionList: [], optionList: [],
isDisabled: false, isDisabled: true,
style: { width: "520px" }, style: { width: "520px" },
handleRadioChange: () => {} handleRadioChange: () => {}
}, },
...@@ -466,7 +476,8 @@ export default { ...@@ -466,7 +476,8 @@ export default {
required: true, required: true,
message: "请输入金额,支持输入1~999999的数字,支持小数点后2位", message: "请输入金额,支持输入1~999999的数字,支持小数点后2位",
trigger: "change" trigger: "change"
} },
{ validator: checkAmount, trigger: "blur" }
] ]
}, },
{ {
...@@ -684,6 +695,7 @@ export default { ...@@ -684,6 +695,7 @@ export default {
mounted() { mounted() {
this.infoForm.orderType = this.orderType this.infoForm.orderType = this.orderType
console.log(this.detail, '===========detail')
// 入口:精品升级、会员权益升级、次新车转化,售后众筹、积分商城 // 入口:精品升级、会员权益升级、次新车转化,售后众筹、积分商城
if (this.detail) { if (this.detail) {
this.orderInfoList.push({ this.orderInfoList.push({
...@@ -692,6 +704,7 @@ export default { ...@@ -692,6 +704,7 @@ export default {
total: this.detail.total, total: this.detail.total,
refundSubOrderCode: this.detail.refundSubOrderCode refundSubOrderCode: this.detail.refundSubOrderCode
}) })
// this.infoForm.refundType = this.detail.isAll ? 1 : 2
this.infoForm.bizOrderCodeList.push(this.detail.orderCode) this.infoForm.bizOrderCodeList.push(this.detail.orderCode)
// 判断是否部分退款 // 判断是否部分退款
this.judgeRefundType() this.judgeRefundType()
...@@ -815,7 +828,7 @@ export default { ...@@ -815,7 +828,7 @@ export default {
this.judgeRefundPoints(this.detail.refundType, "refundPoints") this.judgeRefundPoints(this.detail.refundType, "refundPoints")
this.judgeRefundPoints(this.detail.refundType, "refundPoints2") this.judgeRefundPoints(this.detail.refundType, "refundPoints2")
} }
this.infoForm.refundType = this.detail.isAll ? '1' : '2'
// if (this.infoForm.refundPoints2 === 0 || this.infoForm.refundPoints2) { // if (this.infoForm.refundPoints2 === 0 || this.infoForm.refundPoints2) {
// }/ // }/
...@@ -833,6 +846,7 @@ export default { ...@@ -833,6 +846,7 @@ export default {
this.infoForm.marketingCost = this.infoForm.marketingCost =
res.marketingCost + res.rewardAndPenaltyCost res.marketingCost + res.rewardAndPenaltyCost
} }
console.log(this.infoForm, this.detail, 'infoForm')
}) })
}, },
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<div> <div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange" <el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange"
@select-all="handleAll"> @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"> <template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center"> <el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope">{{ <span slot-scope="scope">
scope.row[item.prop] ? scope.row[item.prop] : "-" {{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }}
}}</span> </span>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
}, },
{ {
label: '售价', label: '售价',
prop: 'upgradePrice' prop: 'upgradePrice',
unit: '¥'
}, },
{ {
label: '数量/件', label: '数量/件',
...@@ -60,11 +61,13 @@ export default { ...@@ -60,11 +61,13 @@ export default {
}, },
{ {
label: '支付金额', label: '支付金额',
prop: 'totalPrice' prop: 'totalPrice',
unit: '¥'
} }
], ],
total: 0, total: 0,
refundSubOrderCode: '' refundSubOrderCode: '',
isAll: false
} }
}, },
props: { props: {
...@@ -88,18 +91,21 @@ export default { ...@@ -88,18 +91,21 @@ export default {
selectableFn(row) { selectableFn(row) {
console.log(row) console.log(row)
if (row.status == 2) return false if (row.status == 2) return false
else if (row.status == 1) return true else return true
}, },
async getList(orderCode) { async getList(orderCode) {
const res = await goodsSubOrder({ orderCode }) const res = await goodsSubOrder({ orderCode })
this.tableData = res this.tableData = res
this.$refs.seletingTable.toggleAllSelection()
}, },
handleChange(selection) { handleChange(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
handleAll(selection) { handleAll(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
getParams(selection) { getParams(selection) {
...@@ -114,10 +120,11 @@ export default { ...@@ -114,10 +120,11 @@ export default {
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const {refundSubOrderCode, total} = this const {refundSubOrderCode, total, isAll} = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode refundSubOrderCode,
isAll
}) })
}, },
handleClose() { handleClose() {
......
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="商品名称:"> <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 </el-form-item></el-col
> >
...@@ -66,7 +68,7 @@ ...@@ -66,7 +68,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item <el-form-item
:label=" :label="
detailInfo.failType == '退款' ? '退回积分' : '积分收益:' detailInfo.failType == '退款' ? '退回积分:' : '积分收益:'
" "
class="halfItem" class="halfItem"
> >
...@@ -171,7 +173,9 @@ ...@@ -171,7 +173,9 @@
v-if="detailInfo.status == '已失效'" v-if="detailInfo.status == '已失效'"
> >
<el-form-item label="退款子订单信息:" class="halfItem"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -531,6 +535,12 @@ export default { ...@@ -531,6 +535,12 @@ export default {
justify-content: center; justify-content: center;
margin-top: 20px; margin-top: 20px;
} }
.max-width {
white-space: nowrap; /* 禁止文本换行 */
overflow: hidden; /* 超出内容隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
max-width: 150px;
}
</style> </style>
<style> <style>
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<div> <div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange" <el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange"
@select-all="handleAll"> @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"> <template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center"> <el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope">{{ <span slot-scope="scope">
scope.row[item.prop] ? scope.row[item.prop] : "-" {{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }}
}}</span> </span>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
}, },
{ {
label: '售价', label: '售价',
prop: 'upgradePrice' prop: 'upgradePrice',
unit: '¥'
}, },
{ {
label: '数量/件', label: '数量/件',
...@@ -60,11 +61,13 @@ export default { ...@@ -60,11 +61,13 @@ export default {
}, },
{ {
label: '支付金额', label: '支付金额',
prop: 'totalPrice' prop: 'totalPrice',
unit: '¥'
} }
], ],
total: 0, total: 0,
refundSubOrderCode: '' refundSubOrderCode: '',
isAll: false
} }
}, },
props: { props: {
...@@ -88,18 +91,21 @@ export default { ...@@ -88,18 +91,21 @@ export default {
selectableFn(row) { selectableFn(row) {
console.log(row) console.log(row)
if (row.status == 2) return false if (row.status == 2) return false
else if (row.status == 1) return true else return true
}, },
async getList(orderCode) { async getList(orderCode) {
const res = await getGoodsSubOrder({ orderCode }) const res = await getGoodsSubOrder({ orderCode })
this.tableData = res this.tableData = res
this.$refs.seletingTable.toggleAllSelection()
}, },
handleChange(selection) { handleChange(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
handleAll(selection) { handleAll(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
getParams(selection) { getParams(selection) {
...@@ -114,10 +120,11 @@ export default { ...@@ -114,10 +120,11 @@ export default {
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const {refundSubOrderCode, total} = this const {refundSubOrderCode, total, isAll} = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode refundSubOrderCode,
isAll
}) })
}, },
handleClose() { handleClose() {
......
...@@ -101,6 +101,12 @@ ...@@ -101,6 +101,12 @@
:form-obj="refundForm" :form-obj="refundForm"
:form-data="refundFormData" :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> </glsx-combi-form>
</d2-dialog> </d2-dialog>
<refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail> <refundDetail :dataInfo="dataInfo" :refundVisible="refundDetailVisible" @handleClose="handleRefundDetailClose" @handleConfirm="handleConfirm"></refundDetail>
...@@ -146,7 +152,7 @@ export default { ...@@ -146,7 +152,7 @@ export default {
) { ) {
callback(new Error("输入的积分超过当前订单最大积分")) callback(new Error("输入的积分超过当前订单最大积分"))
} else if ( } else if (
value >= this.refundForm.remainingScore && value > this.refundForm.remainingScore &&
this.refundForm.refundType == 2 this.refundForm.refundType == 2
) { ) {
callback(new Error("输入的积分超过当前订单最大积分")) callback(new Error("输入的积分超过当前订单最大积分"))
...@@ -384,12 +390,18 @@ export default { ...@@ -384,12 +390,18 @@ export default {
isDisabled: false isDisabled: false
}, },
{ {
addHtml: 'maxPoints'
},
{
label: "退回金额", label: "退回金额",
name: "refundAmount", name: "refundAmount",
type: "input", type: "input",
width: "290px", width: "290px",
isDisabled: false isDisabled: false
} },
{
addHtml: 'maxAmount'
},
], ],
refundDetailVisible: false, refundDetailVisible: false,
dataInfo: {}, dataInfo: {},
...@@ -671,6 +683,9 @@ export default { ...@@ -671,6 +683,9 @@ export default {
console.log(val, '=====') console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total 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.handleRefund(this.refundInfo) // 原来的逻辑
this.refundDetailVisible = false this.refundDetailVisible = false
}, },
...@@ -682,7 +697,8 @@ export default { ...@@ -682,7 +697,8 @@ export default {
this.refundForm.orderCode = data.orderCode this.refundForm.orderCode = data.orderCode
this.refundForm.tempPoints = data.integralIncome this.refundForm.tempPoints = data.integralIncome
this.refundForm.refundPoints = 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.staffUuid = data.staffUuid
this.refundForm.refundSubOrderCode = data.refundSubOrderCode this.refundForm.refundSubOrderCode = data.refundSubOrderCode
this.refundForm.refundableTotalPrice = data.total this.refundForm.refundableTotalPrice = data.total
...@@ -700,7 +716,7 @@ export default { ...@@ -700,7 +716,7 @@ export default {
this.refundForm.remainingScore = res.remainingScore //剩余积分 this.refundForm.remainingScore = res.remainingScore //剩余积分
// this.refundForm.remainAmount = res.remainAmount //剩余金额 // this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = true this.refundForm.firstInto = true
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退), // this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundFormData[ this.refundFormData[
this.findAttrIdx("refundType") this.findAttrIdx("refundType")
].optionList[0].isDisabled = false ].optionList[0].isDisabled = false
...@@ -708,7 +724,7 @@ export default { ...@@ -708,7 +724,7 @@ export default {
this.refundForm.remainingScore = res.remainingScore this.refundForm.remainingScore = res.remainingScore
// this.refundForm.remainAmount = res.remainAmount //剩余金额 // this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = false this.refundForm.firstInto = false
this.refundForm.refundType = 2 // this.refundForm.refundType = 2
this.refundFormData[ this.refundFormData[
this.findAttrIdx("refundType") this.findAttrIdx("refundType")
].optionList[0].isDisabled = true ].optionList[0].isDisabled = true
...@@ -872,4 +888,7 @@ export default { ...@@ -872,4 +888,7 @@ export default {
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
} }
.max-value {
margin-left: 220px;
}
</style> </style>
...@@ -249,11 +249,15 @@ export default { ...@@ -249,11 +249,15 @@ export default {
) + ' 23:59:59' ) + ' 23:59:59'
delete params.extractionTime delete params.extractionTime
} }
if (params.checkStatus === 0) {
params.checkStatusList = [params.checkStatus]
delete params.checkStatus
}
if (params.checkStatus) { if (params.checkStatus) {
if (params.checkStatus == 3) { if (params.checkStatus == 3) {
params.checkStatusList = [3, 4] params.checkStatusList = [3, 4]
} else { } else {
params.checkStatusList = Array.from[params.checkStatus] params.checkStatusList = [params.checkStatus]
} }
delete params.checkStatus delete params.checkStatus
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</template> </template>
</div> </div>
<d2-table-header title="审批列表"> <d2-table-header title="未推送列表">
<el-button size="mini" type="primary" plain @click="exportTable">导出</el-button> <el-button size="mini" type="primary" plain @click="exportTable">导出</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</template> </template>
</div> </div>
<d2-table-header title="审批列表"> <d2-table-header title="推送列表">
<el-button size="mini" type="primary" plain @click="exportTable">导出</el-button> <el-button size="mini" type="primary" plain @click="exportTable">导出</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
return { return {
settingInfo: [], settingInfo: [],
formData: { formData: {
carBrand: false, carBrand: true,
carNo: false, carNo: false,
idNumber: false, idNumber: false,
zyVoucher: true zyVoucher: true
......
...@@ -65,6 +65,12 @@ ...@@ -65,6 +65,12 @@
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :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" <div slot="auth-button"
slot-scope="scope"> slot-scope="scope">
<!-- 详情 --> <!-- 详情 -->
...@@ -74,13 +80,13 @@ ...@@ -74,13 +80,13 @@
</span> </span>
<!-- 修改 --> <!-- 修改 -->
<span style="margin-right: 10px" <span style="margin-right: 10px"
v-if="shouldShowEditDeleteButtons(scope.scope.dealMonth)"> v-if="scope.scope.allowUpdate == true">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9061932']" /> :show-btn-ids="['9061932']" />
</span> </span>
<!-- 删除 --> <!-- 删除 -->
<span style="margin-right: 10px" <span style="margin-right: 10px"
v-if="shouldShowEditDeleteButtons(scope.scope.dealMonth)"> v-if="scope.scope.allowUpdate == true">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9061933']" /> :show-btn-ids="['9061933']" />
</span> </span>
...@@ -198,7 +204,7 @@ export default { ...@@ -198,7 +204,7 @@ export default {
label: '驻店员工', label: '驻店员工',
name: 'staffName', name: 'staffName',
type: 'input', type: 'input',
maxlength: 10 maxlength: 50
}, },
{ {
label: '成交率', label: '成交率',
...@@ -261,7 +267,8 @@ export default { ...@@ -261,7 +267,8 @@ export default {
}, },
{ {
label: "业务类型", label: "业务类型",
prop: "businessTypeDesc" addHtml: "typeHtml",
width: "150"
}, },
{ {
label: "录入时间", label: "录入时间",
...@@ -285,7 +292,17 @@ export default { ...@@ -285,7 +292,17 @@ export default {
}, { }, {
confId: 2, confId: 2,
confValue: '延保' confValue: '延保'
}] }],
businessOptShowClass: {
0: "type-yellow",
1: "type-blue",
2: "type-green"
},
businessNameShow: {
0: "轻改",
1: "权益",
2: "延保"
},
}, },
fileRules: { fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }] fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
...@@ -339,32 +356,6 @@ export default { ...@@ -339,32 +356,6 @@ export default {
this.getBrands() 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() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -638,6 +629,31 @@ export default { ...@@ -638,6 +629,31 @@ export default {
font-size: 0; 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 { .import-template {
position: absolute; position: absolute;
height: 20px; height: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!