Commit 8f405d4e by 张晓玮

Merge branch 'dev_v4.26.0' into 'develop'

Dev v4.26.0

See merge request !229
2 parents a7247966 65309aa5
......@@ -89,24 +89,33 @@ export function settingYqMerchantSceneAPI(data) {
// 获取服务商数据
export function getServiceListAPI(data) {
data.method = 'dj.api.smarcarlife.yqMerchantConfig.partnerMerchantDetail'
data.method = "dj.api.smarcarlife.yqMerchantConfig.partnerMerchantDetail"
return request(data, "post")
}
// 获取服务商配置
export function getProviderProcurementInfo(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.selectProviderProcurementInfo'
data.method =
"dj.smartcarlife.api.yqPartnerMerchant.selectProviderProcurementInfo"
return request(data, "post")
}
// 配置服务商
export function updateProviderProcurementInfo(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.updateProviderProcurementInfo'
data.method =
"dj.smartcarlife.api.yqPartnerMerchant.updateProviderProcurementInfo"
return request(data, "post")
}
// 获取发货主体
export function getShippingEntityInfoAll(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll'
data.method =
"dj.smartcarlife.api.yqPartnerMerchant.selectShippingEntityInfoAll"
return request(data, "post")
}
// 获取下级商户
export function searchServiceMerchant(data) {
data.method = "dj.api.serviceMerchant.page.search"
return request(data, "post")
}
......@@ -50,3 +50,9 @@ export const severSelectOptionsLabel = {
5: "按(产值-流量成本-其他费用不包含产品成本))比例",
6: "按(产值-流量成本-其他费用包含产品成本)比例"
}
// 商品来源
export const goodsSourceList = [
{ confId: 1, confValue: "嘀加" },
{ confId: 2, confValue: "自店" },
{ confId: 3, confValue: "云中鹤" }
]
......@@ -493,7 +493,8 @@ export const sceneType = {
1: "精品升级",
2: "次新车转化",
3: "售后众筹",
0: "会员权益/升级"
0: "会员权益/升级",
4: "积分商城"
}
export const proportionType = {
......
......@@ -42,6 +42,14 @@ export const routerName = {
},
auth: [
{
authId: "9080204",
parentId: "90802",
label: "库存对账单",
category: "Button",
type: "primary",
handle: "handleStatementOfAccount"
},
{
authId: "9080201",
parentId: "90802",
label: "导出",
......
import Vue from 'vue'
import Vuex from 'vuex'
import Vue from "vue"
import Vuex from "vuex"
import d2admin, { storeResets } from './modules/d2admin'
import goodsInfoData from './modules/goodsInfoData'
Vue.prototype.$StoreReset = function() {
return new Promise(resolve => {
storeResets.forEach(reset => this.dispatch(reset))
import d2admin, { storeResets } from "./modules/d2admin"
import goodsInfoData from "./modules/goodsInfoData"
import FinancialRules from "./modules/FinancialRules"
Vue.prototype.$StoreReset = function () {
return new Promise((resolve) => {
storeResets.forEach((reset) => this.dispatch(reset))
resolve()
})
}
Vue.use(Vuex)
const isProd = process.env.NODE_ENV === 'production'
const isProd = process.env.NODE_ENV === "production"
// console.log(isProd)
if (!isProd) {
Vue.config.devtools = true
......@@ -20,6 +21,7 @@ if (!isProd) {
export default new Vuex.Store({
modules: {
d2admin,
goodsInfoData
goodsInfoData,
FinancialRules
}
})
export default {
namespaced: true,
state: {
// 列表搜索框状态
active: true
// // 列表搜索框状态
// active: true
goodsSource: [], // 财务商品来源
goodsSourceReconciliation: [] // 对账
},
mutations: {
/**
* @description 切换状态
* @param {Object} state state
* @description 合计商品来源
* @param {Object} goodsSource 商品来源
* @param {Boolean} tabIndex tab索引
*/
toggle(state) {
console.log("toggle")
state.active = !state.active
setGoodsSource(state, { goodsSource, tabIndex }) {
// console.log("setGoodsSource", goodsSource, tabIndex, state)
if (goodsSource) {
state.goodsSource[tabIndex] = goodsSource
state.goodsSource = [...state.goodsSource]
}
},
/**
* @description 设置搜索框状态
* @param {Object} state state
* @param {Boolean} active active
* @description 删除商品来源
* @param {Object} goodsSource 商品来源
* @param {Boolean} tabIndex tab索引
*/
set(state, active) {
state.active = active
delGoodsSource(state, { goodsSource, tabIndex }) {
state.goodsSource = state.goodsSource.splice(1, tabIndex)
},
/**
* @description 合计对账商品来源
* @param {Object} goodsSource 商品来源
* @param {Boolean} tabIndex tab索引
*/
setGoodsSourceReconciliation(state, { goodsSource, tabIndex }) {
// console.log("setGoodsSource", goodsSource, tabIndex, state)
if (goodsSource) {
state.goodsSourceReconciliation[tabIndex] = goodsSource
state.goodsSourceReconciliation = [...state.goodsSource]
}
},
/**
* @description 删除对账商品来源
* @param {Object} goodsSource 商品来源
* @param {Boolean} tabIndex tab索引
*/
delGoodsSourceReconciliation(state, { goodsSource, tabIndex }) {
state.goodsSourceReconciliation = state.goodsSourceReconciliation.splice(
1,
tabIndex
)
}
},
actions: {
// get4sService({ state }, { scene, merchantId } = {}) {
// console.log("get4sService")
// // const params = {
// // scene,
// // merchantId
// // }
// // console.log("params", params)
// // console.log(scenemerchantrefQueryServiceRefByShop)
// // scenemerchantrefQueryServiceRefByShop(params).then((res) => {
// // console.log(res)
// // })
// },
reset({ state }, { scene, merchantId }) {
console.log("reset")
console.log("scene", scene)
state.active = true
actions: {},
getters: {
// 财务商品来源去重
goodsSourceSet(state) {
return [...new Set(state.goodsSource)]
},
// 对账商品来源去重
goodsSourceReconciliationSet(state) {
return [...new Set(state.goodsSourceReconciliation)]
}
}
}
......@@ -11,7 +11,8 @@
</div>
<div style="margin-left: 120px;">
<div class="add-btns">
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '2'" @click="handleSpecsEdit(1)">新增规格</el-button>
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '2'"
@click="handleSpecsEdit(1)">新增规格</el-button>
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '1'" @click="addShop">新增商品</el-button>
<div class="assi_type">
<span>规格:</span>
......@@ -22,12 +23,16 @@
</div>
</div>
<div class="speci-box" id="specificationDetailList">
<singleSpecificationForm ref="singleSpecificationFormRef" v-show="goodsInfoData.specificationType == '1'" :productServiceItemList="productServiceItemList" :positionTypeList="positionTypeList"></singleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" v-show="goodsInfoData.specificationType == '2'" :productServiceItemList="productServiceItemList" :positionTypeList="positionTypeList"></multipleSpecificationForm>
<singleSpecificationForm ref="singleSpecificationFormRef" v-show="goodsInfoData.specificationType == '1'"
:product-service-item-list="productServiceItemList" :position-type-list="positionTypeList">
</singleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" v-show="goodsInfoData.specificationType == '2'"
:product-service-item-list="productServiceItemList" :position-type-list="positionTypeList">
</multipleSpecificationForm>
</div>
</div>
</div>
</div>
</template>
<script>
......@@ -36,7 +41,7 @@ import singleSpecificationForm from './singleSpecificationForm.vue'
import { mapGetters, mapMutations, mapActions } from 'vuex'
import { BaseData } from '@/common/constants.js'
export default {
name: 'specifications',
name: 'Specifications',
components: {
singleSpecificationForm,
multipleSpecificationForm
......@@ -50,7 +55,7 @@ export default {
}
},
computed: {
...mapGetters('goodsInfoData', {goodsInfoData: 'getGoodsInfoData'})
...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
},
mounted() {
if (this.goodsInfoData.goodsSpecificationNameList?.length > 1) {
......@@ -70,28 +75,29 @@ export default {
...mapMutations('goodsInfoData', ['setUpdateGoodsInfo']),
// 新增规格
handleSpecsEdit(num) {
this.$refs['multipleSpecificationFormRef'].handleSpecsEdit(num)
this.$refs.multipleSpecificationFormRef.handleSpecsEdit(num)
},
// 新增商品
addShop() {
this.$refs['singleSpecificationFormRef'].addShop()
this.$refs.singleSpecificationFormRef.addShop()
},
// 切换规格将数据清空
changeRadio(value) {
if (value == 1) { // 单规格
this.setUpdateGoodsInfo({specificationSingleDetailList: [], goodsSpecificationSingleList: []})
this.setUpdateGoodsInfo({ specificationSingleDetailList: [], goodsSpecificationSingleList: [] })
} else { // 多规格
this.setUpdateGoodsInfo({specificationDetailList: []})
this.setUpdateGoodsInfo({ specificationDetailList: [] })
}
}
}
}
</script>
<style lang="scss" scoped>
.specifications-form{
.specifications-form {
margin-top: 20px;
background: #ffffff;
.title{
.title {
height: 50px;
line-height: 50px;
padding: 0 20px;
......@@ -100,19 +106,24 @@ export default {
font-weight: 600;
color: #333333;
}
.content-box{
.content-box {
padding: 20px 20px 40px 20px;
}
.add-btns{
.add-btns {
display: flex;
justify-content: space-between;
font-size: 14px;
.el-button{
.el-button {
width: 140px;
}
}
.speci-box {
width: 100%;
.title-tip {
display: flex;
justify-content: space-between;
......@@ -123,14 +134,17 @@ export default {
background: #F2F4F7;
}
}
.sync_type_class{
.sync_type_class {
font-size: 14px;
padding: 20px 0;
.label{
.label {
display: inline-block;
text-align: right;
width: 120px;
.color-red{
.color-red {
color: #eb4e4e;
font-size: 14px;
margin-right: 4px;
......@@ -138,5 +152,4 @@ export default {
}
}
}
}
</style>
\ No newline at end of file
}</style>
......@@ -130,6 +130,7 @@ import orderManage from "@api/orderManage"
import { Util, deepClone } from "@/common/util"
import {
orderManageStatusList,
orderManageStatusList_integral,
orderSourceList,
deliveryTypeList
} from "@/common/constants"
......@@ -184,6 +185,7 @@ export default {
// 基本数据
baseData: {
orderStatusList: orderManageStatusList,
orderManageStatusList_integral: orderManageStatusList_integral,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
......@@ -384,13 +386,24 @@ export default {
(item) => item.confId == res.orderSource
).confName
: "-"
this.detailForm.orderStatusName = this.baseData.orderStatusList
.map((item) => item.confId)
.includes(res.orderStatus + "")
? this.baseData.orderStatusList.find(
(item) => item.confId == res.orderStatus
).confName
: "-"
if (this.routeInfo.orderType == 'integralShopping') {
this.detailForm.orderStatusName = this.baseData.orderManageStatusList_integral
.map((item) => item.confId)
.includes(res.orderStatus + "")
? this.baseData.orderManageStatusList_integral.find(
(item) => item.confId == res.orderStatus
).confName
: "-"
} else {
this.detailForm.orderStatusName = this.baseData.orderStatusList
.map((item) => item.confId)
.includes(res.orderStatus + "")
? this.baseData.orderStatusList.find(
(item) => item.confId == res.orderStatus
).confName
: "-"
}
// if (!this.detailForm.takeFee) {
// var takeFeeIdx = this.detailFormData.findIndex(
// (item) => item.name == "takeFee"
......
<!-- 订单列表 -->
<!-- 1.1 精品升级订单列表 -->
<template>
<d2-container class="order-list m-t-40">
<div class="header" slot="header">
......@@ -368,6 +368,12 @@ export default {
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '支付时间',
name: 'paySuccessDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '订单编号',
name: 'orderCode',
type: 'input',
......@@ -419,11 +425,13 @@ export default {
yqMerchantId: '',
merchantId: '',
orderTime: '',
paySuccessDate: '',
constructionFlag: '',
sourceList: '',
channelType: '',
businessModel: '',
subShopMerchantId: ''
subShopMerchantId: '',
paySuccessDate: ''
},
baseData: {
orderStatusList: [{
......@@ -687,6 +695,7 @@ export default {
yqMerchantId: '',
merchantId: '',
orderTime: '',
paySuccessDate: '',
constructionFlag: '',
channelType: '',
businessModel: '',
......@@ -743,10 +752,21 @@ export default {
params.placeOrderEndDateStr = Util.dateFormate(form.orderTime[1], 'YYYY-MM-DD') + ' 23:59:59'
}
if (form.paySuccessDate && form.paySuccessDate.length) {
params.paySuccessStartDate = Util.dateFormate(form.paySuccessDate[0], 'YYYY-MM-DD HH:mm:ss')
params.paySuccessEndDate = Util.dateFormate(form.paySuccessDate[1], 'YYYY-MM-DD') + ' 23:59:59'
}
if (params.sourceList != '') {
// 处理d2-search 下拉选不支持绑定数组的问题
params.sourceList = params.sourceList == '1' ? ['1', '2', '3', '4', '5', '6'] : ['7']
}
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '') {
delete params[key]
}
}
return params
},
keyDowmGetList() {
......@@ -871,11 +891,11 @@ export default {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
cancelDivideAccountsAPI({orderCode: row.orderCode}).then(res => {
cancelDivideAccountsAPI({ orderCode: row.orderCode }).then(res => {
this.notice.okTips()
this.handleSearch()
})
}).catch(() => {})
}).catch(() => { })
},
ruleInfoDialogClose(flag) {
......
<!-- 库存对账单弹窗 -->
<template>
<d2-dialog title="库存对账单" :is-visible="dialogVisible" mode="mid" class="statementOfAccountDialog" width="720px" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form ref="statementOfAccountForm" :model="dataForm" :rules="formRules" label-width="154px" size="small">
<el-form-item label="时间:" prop="dataMonthStr">
<el-date-picker
v-model="dataForm.dataMonthStr"
type="month"
:clearable="false"
value-format="yyyy-MM"
:append-to-body="false"
format="yyyy-MM"
class="form-node"
placeholder="选择时间"
popper-class="statement-of-account-month-picker"
:picker-options="beforeRangePickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="仓库:" prop="yqMerchantId">
<el-select v-model="dataForm.yqMerchantId" class="form-node" filterable @change="yqMerchantIdChange" placeholder="请选择仓库">
<el-option v-for="(subItem, subIndex) in stockList" :key="subIndex" :value="subItem.merchantNo" :label="subItem.merchantName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="门店:" prop="merchantId">
<el-select v-model="dataForm.merchantId" class="form-node" filterable @focus="merchantSelectFocus" placeholder="请选择门店">
<el-option v-for="(subItem, subIndex) in merchantList" :key="subIndex" :value="subItem.merchantId" :label="subItem.merchantName"></el-option>
</el-select>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
import { getServicemerchantrefList } from '@api/stockManage'
export default {
name: 'statementOfAccountDialog',
props: {
visible: {
type: Boolean,
default: false
},
yqMerchantList: {
type: Array,
default: () => []
}
},
data() {
return {
beforeRangePickerOptions: {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
},
dataForm: {
dataMonthStr: '',
yqMerchantId: '',
merchantId: ''
},
formRules: {
dataMonthStr: [{ required: true, message: '请选择时间', trigger: 'change' }],
yqMerchantId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
merchantId: [
{ required: true, message: '请选择门店', trigger: 'change' }
]
},
merchantList: []
}
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
},
stockList: {
get() {
let list = deepClone(this.yqMerchantList)
if (list[0]?.merchantName == '全部') {
list.shift()
}
return list
}
}
},
mounted() {
this.$nextTick(() => {
this.$refs['statementOfAccountForm'] && this.$refs['statementOfAccountForm'].resetFields()
})
},
methods: {
// 门店
merchantSelectFocus() {
if (!this.dataForm?.yqMerchantId) return this.$message.error('请先选择仓库')
},
// 仓库
yqMerchantIdChange(e) {
this.dataForm.merchantId = ''
this.merchantList = []
this.$nextTick(() => {
this.$refs['statementOfAccountForm'].clearValidate()
})
//总店
let _headOffice = this.stockList.find(item => item.merchantNo === e)
_headOffice.merchantId = _headOffice.merchantNo
// 获取仓库下的门店列表
getServicemerchantrefList({
yqMerchantId: e
}).then(res => {
this.merchantList = res || []
this.merchantList.push(_headOffice) // 园区店可选择自己
})
},
handleClose() {
this.dialogVisible = false
},
handleConfirm() {
this.$refs['statementOfAccountForm'].validate(valid => {
if (valid) {
this.$emit('handleRelateProConfirm', this.dataForm)
}
})
}
}
}
</script>
<style scoped lang="scss">
.statementOfAccountDialog{
.form-node{
width: 432px;
}
}
</style>
<style lang="scss">
.statement-of-account-month-picker {
.el-picker-panel__body-wrapper .el-picker-panel__body .el-picker-panel__content .el-month-table td.current:not(.disabled) .cell {
color: #fff;
background: #2A58AD;
border-radius: 18px;
}
.el-month-table td.today .cell{
color: #2A58AD;
}
}
</style>
\ No newline at end of file
......@@ -25,7 +25,9 @@
<d2-table-header>
<span slot="left"
class="leftSpan">合计:当前库存<span class="count-txt">{{ statisticsData }}</span></span>
<auth-button category="Button" />
<div>
<auth-button category="Button" />
</div>
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
......@@ -47,6 +49,11 @@
:record-info="recordInfo"
v-if="stockDetailDialogVisible">
</stockDetailDialog>
<statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible"
:yqMerchantList="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm">
</statementOfAccountDialog>
</div>
</template>
......@@ -57,12 +64,14 @@ import { getProductTypeBySceneId } from '@api/product'
import { getyqMerchantList, getMerchantGoodsStockMonthReport, stockMonthReportCount } from '@api/stockManage'
import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog'
import statementOfAccountDialog from './statementOfAccountDialog'
import { membraneTypeList } from '@/common/constants.js'
export default {
name: 'StockList',
components: {
stockMonthDialog,
stockDetailDialog
stockDetailDialog,
statementOfAccountDialog
},
data() {
return {
......@@ -180,7 +189,8 @@ export default {
stockDetailDialogVisible: false,
stockMonthVisible: false,
recordInfo: null,
statisticsData: {}
statisticsData: {},
statementOfAccountDialogVisible: false
}
},
computed: {
......@@ -223,6 +233,11 @@ export default {
})
},
// 库存对账单
handleStatementOfAccount() {
this.statementOfAccountDialogVisible = true
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -261,6 +276,25 @@ export default {
this.stockMonthReportCount()
},
// 库存对账单导出
handleRelateProConfirm(data) {
var params = data
params.method = 'dj.api.smartcarlife.merchantShopGoodsStock.statement.exportAsync'
console.log(params)
// return
const list = [
...this.dowloadList,
{
name: '库存对账单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.statementOfAccountDialogVisible = false
},
handleExport() {
var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.MerchantGoodsStockMonthReport.export.async'
......
......@@ -157,7 +157,8 @@ export default {
confName: '门店'
}]
},
logining: false
logining: false,
hasReg: false
}
},
created() {
......
......@@ -10,7 +10,21 @@
<p class="edit-sub-title">
分账品类
</p>
<div style="display: flex" v-if="tabindex">
<el-form-item v-if="tabindex" label="商品来源" prop="goodsSource" required :rules="[
{
required: true,
message: '请选择商品来源',
trigger: ['change', 'blur']
}
]">
<el-radio-group v-model="classificationObj.goodsSource">
<el-radio v-for="(goodsItem, goodsIndex) in goodsSourceList"
:disabled="goodsSourceSet.includes(goodsItem.confId) && goodsItem.confId != 1 && classificationObj.goodsSource != goodsItem.confId"
:key="goodsIndex" :label="goodsItem.confId">{{
goodsItem.confValue }}</el-radio>
</el-radio-group>
</el-form-item>
<div style="display: flex" v-if="tabindex && ![2, 3].includes(classificationObj.goodsSource)">
<el-form-item label="分账品类" prop="categoryType" required :rules="[
{
required: true,
......@@ -390,7 +404,7 @@
<script>
// 1按毛利比例;2按收入比例;3按固定金额
// 1按收入比例;2按毛利比例;3按固定金额;4按(产值-流量成本)比例;5按(产值-流量成本-其他费用不包含产品成本))比例;6按(产值-流量成本-其他费用包含产品成本)比例);其他费用:1按收入比例
import { mapActions, mapState } from "vuex"
import { mapMutations, mapGetters } from "vuex"
import tableAccount from "./tableAccount"
import { limitPrice } from "@/common/format"
import { deepClone } from "@/common/util"
......@@ -398,7 +412,8 @@ import { divisionRuleTestGet } from "@api/merchant"
import { getAllGoodsList } from '@api/grounding'
import {
defaultSelectOptions,
severSelectOptions
severSelectOptions,
goodsSourceList
} from "@/common/constant/merchant"
import tipsDialog from "./tipsDialog"
import financialCalculationDialog from "./financialCalculationDialog.vue"
......@@ -513,7 +528,8 @@ export default {
categoryType: '', // 分类类别
upgradeGoods: [], // 具体商品
virtualAccountCostFlag: 'Y',
recoveryCostFlag: 'Y'
recoveryCostFlag: 'Y',
goodsSource: 1
// expenseCategoryRules: [
// {
// expenseCategoryCalculateType: "string", // 计算方式
......@@ -527,6 +543,7 @@ export default {
},
defaultSelectOptions: Object.freeze(defaultSelectOptions),
severSelectOptions: Object.freeze(severSelectOptions),
goodsSourceList: Object.freeze(goodsSourceList),
// serviceMerchantList: [],
rules: {
// goodsTypes: [
......@@ -541,13 +558,7 @@ export default {
}
},
computed: {
// ...mapState({
// test: (state) => {
// return state.FinancialRules.active
// // return state.FinancialRules.active
// }
// }),
...mapGetters('FinancialRules', { goodsSourceSet: 'goodsSourceSet' }),
// 不可选择的商品分类
disabledGoodsTypeList() {
// 根据区别已选的过滤出该组件自己勾选的 剩下的就是其他组件选的 要禁用
......@@ -675,6 +686,19 @@ export default {
}
},
watch: {
"classificationObj.goodsSource": {
handler(newVal, oldVal) {
// this.initList()
// tabindex
// this.set
this.setGoodsSource({
goodsSource: newVal,
tabIndex: this.tabindex
})
},
deep: true,
immediate: true
},
// 解决商品分类取消选择的数据锁死问题
"classificationObj.goodsTypes": {
handler(val, oldVal) {
......@@ -694,7 +718,6 @@ export default {
},
deep: true
},
upgradeGoodsList: {
handler(val, oldVal) {
if (val) {
......@@ -725,19 +748,6 @@ export default {
},
deep: true
},
// 'classificationObj.goodsCostFlag': {
// handler(val, oldVal) {
// // console.log(oldVal)
// // console.log(val, 'val')
// if (val == 'Y') {
// // this.$emit('goodsCostFlag', true)
// } else {
// // this.$emit('goodsCostFlag', false)
// }
// },
// deep: true,
// immediate: true
// },
classificationObjSelect: {
handler() {
this.initList()
......@@ -766,6 +776,9 @@ export default {
},
methods: {
...mapMutations('FinancialRules', [
'setGoodsSource', 'delGoodsSource'
]),
// 获取商品数据
remoteMethod(query) {
this.goodsNameKeyword = query
......@@ -822,8 +835,7 @@ export default {
const res = new Map()
return arr.filter((a) => !res.has(a.upgradeGoodsId) && res.set(a.upgradeGoodsId, 1))
},
...mapActions("FinancialRules", ["reset"]),
// ...mapMutations('FinancialRules', ['toggle', 'set']),
// ...mapActions("FinancialRules", ["reset"]),
resetGoodsTypeGroupDivisionId() {
// goodsTypeGroupDivisionId() {
// console.log(
......@@ -968,7 +980,8 @@ export default {
"groupType",
"goodsTypes",
"categoryType",
"upgradeGoods"
"upgradeGoods",
"goodsSource"
]
keyNameList.forEach((item) => {
this.goodsTypeGroupRules[item] &&
......@@ -1067,17 +1080,21 @@ export default {
val.categoryType = 2 // 按具体商品
return val
})
return {
// categoryType: obj.categoryType,
// goodsTypeGroupRelations: obj.categoryType == 1 ? goodsTypes : upgradeGoods,
const returnObj = {
expenseCategoryRules,
goodsTypeGroupRelations: obj.categoryType == 1 ? goodsTypes : upgradeGoods,
categoryType: obj.categoryType,
shop4sDeductChargeFlag: obj.shop4sDeductChargeFlag,
partnerDeductChargeFlag: obj.partnerDeductChargeFlag,
virtualAccountCostFlag: obj.virtualAccountCostFlag,
recoveryCostFlag: obj.recoveryCostFlag,
goodsCostFlag: obj.goodsCostFlag,
goodsSource: obj.goodsSource,
groupType
}
// 根据商品来源去除无用字段
return obj.goodsSource != 1 ? returnObj : { ...returnObj, categoryType: obj.categoryType, goodsTypeGroupRelations: obj.categoryType == 1 ? goodsTypes : upgradeGoods }
},
async handleConfirm() {
return new Promise((resolve, reject) => {
......@@ -1097,6 +1114,9 @@ export default {
})
})
}
},
beforeDestroy() {
this.delGoodsSource({ tabIndex: this.tabindex })
}
}
</script>
......
......@@ -111,7 +111,7 @@
</template>
<script>
import { mapActions, mapState, mapMutations } from 'vuex'
import { mapActions, mapGetters, mapMutations } from 'vuex'
import { sceneList, userType, attrToVal as attrToValOptions } from '@/common/constants'
import { deepClone } from '@/common/util'
import { scenemerchantrefQueryServiceRefByShop, merchantSettleDistributeRuleLastRule, merchantSettleDistributeRule, getMerchantLevelApi } from '@api/merchant'
......@@ -201,6 +201,7 @@ export default {
// productType: (state) => state.d2admin.base.productType
// //
// }),
...mapGetters('goodsSourceSet', { goodsSourceSet: 'goodsSourceSet' }),
routerInfo() {
return this.$route.query.params ? JSON.parse(this.$route.query.params) : ''
},
......@@ -210,11 +211,9 @@ export default {
const length1 = this.goodsTypeGroupRelations.length
const length2 = this.editableTabs.length - 1
const length3 = this.goodsSelectList.length
console.log(length1, length2, length3, 'addVisible')
console.log((length1 - length3) > 0 && length1 > length2, 'addVisible')
return (length1 - length3) > 0 && length1 > length2
// 现在要考虑商品来源的影响 现在固定为有另外两个先写死
return (length1 - length3 - 2) > 0 && length1 > length2
},
//
financialLedgerParty() {
const { realityPlatformMerchantId, realityPlatformMerchantName, realityShopMerchantId, realityShopMerchantName } = this.financialObj
return {
......
<!-- 对账 -->
<template>
<div>
<!-- shopMerchantTotalFeeCalculateType,
<!-- shopMerchantTotalFeeCalculateType,
shopMerchantExpenseCategoryValue,
partnerMerchantTotalFeeCalculateType,
partnerMerchantExpenseCategoryValue -->
<div class="header" v-if="formItem.shopMerchantTotalFeeCalculateType || formItem.partnerMerchantTotalFeeCalculateType">
<div class="header"
v-if="formItem.shopMerchantTotalFeeCalculateType || formItem.partnerMerchantTotalFeeCalculateType">
<div class="shop" v-if="formItem.shopMerchantTotalFeeCalculateType">
<span class="label">流量方总对账费用:{{ severSelectOptionsLabel[formItem.shopMerchantTotalFeeCalculateType] }}</span>
<span class="value">{{ formItem.shopMerchantExpenseCategoryValue }}{{
......@@ -33,7 +34,11 @@
分账品类
</div>
<div class="cont">
<div class="msg">
<div class="msg" v-if="index">
<div class="msg-title">商品来源:</div>
<div class="msg-val">{{ item.goodsSource | filterName }}</div>
</div>
<div class="msg" v-if="item.goodsSource == 1">
<div class="msg-title">分账品类:</div>
<div class="msg-val">
{{ formatGoodsTypeGroupRelations(item.groupType, item.goodsTypeGroupRelations) }}
......@@ -93,7 +98,7 @@
<div class="detail-i">{{ childItem.targetMerchantName }}</div>
<div class="detail-i">{{ childItem.targetMerchantId }}</div>
</div>
<!-- <div class="detail">
<!-- <div class="detail">
<div class="detail-i">对账费用2</div>
<div class="detail-i">按收入25%</div>
<div class="detail-i">商户名称商户名称商户名称</div>
......@@ -111,9 +116,7 @@
</template>
<script>
import {
severSelectOptionsLabel
} from "@/common/constant/merchant"
import { severSelectOptionsLabel, goodsSourceList } from "@/common/constant/merchant"
export default {
name: "Reconciliation",
props: {
......@@ -128,10 +131,16 @@ export default {
},
data() {
return {
goodsSourceList: Object.freeze(goodsSourceList),
activeType: 0,
severSelectOptionsLabel
}
},
filters: {
filterName(val) {
return goodsSourceList.find(item => item.confId === val)?.confValue || '嘀加'
}
},
created() { },
mounted() { },
methods: {
......@@ -177,7 +186,7 @@ export default {
}
</script>
<style lang="scss" scoped>
.header{
.header {
height: 72px;
background: #FFFFFF;
padding: 0 50px;
......@@ -185,7 +194,8 @@ export default {
align-items: center;
margin-bottom: 15px;
font-size: 14px;
div{
div {
flex: 1;
}
}
......
<template>
<d2-container class="edit_service">
<div class="d2-container-content form_class">
<el-form label-width="120px" :model="detailInfo" ref="editServiceForm" :rules="rules">
<el-form-item label="采购模式:" prop="procurementType">
<el-radio-group size="mini" v-model="detailInfo.procurementType">
<el-radio v-for="(subItem, subIdx) in procureModeList" :key="subIdx" :label="subItem.confId">{{
<el-form label-width="120px"
:model="detailInfo"
ref="editServiceForm"
:rules="rules">
<el-form-item label="采购模式:"
prop="procurementType">
<el-radio-group size="mini"
v-model="detailInfo.procurementType">
<el-radio v-for="(subItem, subIdx) in procureModeList"
:key="subIdx"
:label="subItem.confId">{{
subItem.confName }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="发货主体:" prop="shippingEntityId">
<el-select v-model="detailInfo.shippingEntityId" class="select_class" placeholder="请选择发货主体">
<el-option v-for="(subItem, subIndex) in shippingEntityList" :key="subIndex" :label="subItem.shippingEntity"
:value="subItem.shippingEntityId" />
<el-form-item label="发货主体:"
prop="shippingEntityId">
<el-select v-model="detailInfo.shippingEntityId"
class="select_class"
placeholder="请选择发货主体">
<el-option v-for="(subItem, subIndex) in shippingEntityList"
:key="subIndex"
:label="subItem.shippingEntity"
:value="subItem.shippingEntityId" />
</el-select>
</el-form-item>
<el-form-item label="下级服务商:">
<div v-for="(item, index) in detailInfo.subMerchantList"
:key="index">
<div class="inputCol">
<el-form-item>
<el-select v-model="item.merchantId"
filterable
remote
reserve-keyword
placeholder="请输入关键字"
style="width: 432px"
:remote-method="remoteMethod"
@change="changeOpt"
:loading="loading">
<el-option v-for="(opt, optIndex) in options"
:key="optIndex"
:label="opt.merchantName"
:value="opt.merchantId"
:disabled="setDisabled(opt.merchantId)">
</el-option>
</el-select>
<el-button type="text"
style="color: red;paddingLeft:10px"
@click="handleDelMerchant(index)">删除</el-button>
</el-form-item>
</div>
</div>
<div>
<el-button type="primary"
size="small"
plain
@click="handleAddMerchant">添加一行</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div style="margin-top: 40px;text-align: center;">
<el-button class="width_100 cancel-btn" @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleUp" :disabled="$store.state.d2admin.loading.value"
class="width_100">提交</el-button>
<el-button class="width_100 cancel-btn"
@click="handleClose">取消</el-button>
<el-button type="primary"
@click="handleUp"
:disabled="$store.state.d2admin.loading.value"
class="width_100">提交</el-button>
</div>
</d2-container>
</template>
<script>
import { deepClone } from '@/common/util'
import { procureModeList } from "@/common/constants"
import { mapActions } from 'vuex'
import { getProviderProcurementInfo, updateProviderProcurementInfo, getShippingEntityInfoAll } from "@api/serviceManage"
import { getProviderProcurementInfo, updateProviderProcurementInfo, getShippingEntityInfoAll, searchServiceMerchant } from "@api/serviceManage"
export default {
name: "EditService",
data() {
......@@ -38,10 +88,13 @@ export default {
},
detailInfo: {
procurementType: '',
shippingEntityId: ''
shippingEntityId: '',
subMerchantList: []
},
shippingEntityList: [],
serviceMerchantId: ''
serviceMerchantId: '',
loading: false,
options: [],
}
},
mounted() {
......@@ -60,7 +113,18 @@ export default {
}),
getInfo() {
getProviderProcurementInfo({ merchantId: this.serviceMerchantId }).then(res => {
this.detailInfo = res || {}
this.detailInfo = deepClone(res) || this.detailInfo
if (this.detailInfo.subMerchantList && this.detailInfo.subMerchantList.length > 0) {
this.detailInfo.subMerchantList = this.detailInfo.subMerchantList.map(item => {
const item_new = {
id: item.id,
merchantName: item.subMerchantName,
merchantId: item.subMerchantId
}
this.options.push(item_new)
return item_new
})
}
this.$nextTick(() => {
this.$refs.editServiceForm.clearValidate()
})
......@@ -95,6 +159,27 @@ export default {
shippingEntity: this.shippingEntityList.filter(val => val.shippingEntityId == this.detailInfo.shippingEntityId)[0]?.shippingEntity || '',
shippingEntityId: this.detailInfo.shippingEntityId
}
if (this.detailInfo.subMerchantList && this.detailInfo.subMerchantList.length > 0) {
let _subMerchantList = deepClone(this.detailInfo.subMerchantList)
const list = []
let info
let _flag = true
_subMerchantList.forEach(item => {
info = {}
info.subMerchantId = item.merchantId
info.subMerchantName = item.merchantName
list.push(info)
if (!item.merchantId) {
_flag = false
}
})
if (!_flag) {
this.notice.warningTips('请选择下级商户')
return
}
params.subMerchantList = list
}
updateProviderProcurementInfo(params).then(res => {
this.notice.okTips()
this.handleClose(true)
......@@ -103,14 +188,63 @@ export default {
return true
}
})
}
},
handleAddMerchant() {
this.options = []
this.detailInfo.subMerchantList.push({
// merchantName: '',
merchantId: ''
})
},
handleDelMerchant(index) {
this.detailInfo.subMerchantList.splice(index, 1)
},
remoteMethod(queryString) {
if (queryString) {
this.loading = true
setTimeout(() => {
this.loading = false
var params = { currentPage: 1, pageSize: 1000, merchantName: queryString, merchantTypeList: [7] }
searchServiceMerchant(params).then(res => {
this.options = res.list || []
})
}, 200)
} else {
this.options = []
}
},
changeOpt(val) {
const info = this.options.find(item => item.merchantId == val)
this.detailInfo.subMerchantList = this.detailInfo.subMerchantList.map(item => {
if (item.merchantId == info.merchantId) {
const id = deepClone(item.id)
delete info.id
item = deepClone(info)
if (id) {
item.id = id
// return item = Object.assign(info, { id: item.id })
}
}
return item
})
},
setDisabled(val) {
const info = this.detailInfo.subMerchantList.find(item => item.merchantId == val)
if (info) {
return true
} else {
return false
}
},
}
}
</script>
<style lang="scss" scoped>
.edit_service {
.form_class {
height: calc(100vh - 300px);
// height: calc(100vh - 300px);
}
.select_class {
......@@ -120,5 +254,13 @@ export default {
.width_100 {
width: 100px;
}
.inputCol {
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 0 20px;
}
}
</style>
......@@ -180,10 +180,11 @@ export default {
},
{
label: "实际权益金额/元",
prop: "equityPrice",
// prop: "equityPrice",
prop: "quotedPriceUpdate",
width: "250px",
formatter: (cellValue) => {
return cellValue.equityPrice ? (cellValue.equityPrice / 100).toFixed(2) : "-"
return !isNaN(cellValue.quotedPriceUpdate) ? (cellValue.quotedPriceUpdate / 100).toFixed(2) : "-"
}
},
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!