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