Commit 1cab5ade by 前端

Merge branch 'saas+v4.20.0' into 'master'

Saas+v4.20.0

See merge request !3
2 parents e58d467f 1834f280
......@@ -14,7 +14,7 @@
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^2.0.8",
"glsx-common": "^2.0.9",
"glsx-components": "^1.2.5",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
import { http } from '@/main'
// const path = 'dj.api.'
// const path2 = 'dj.smartcarlife.api.'
// 查询优惠券列表
const getListApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.merchant.coupon.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 领用明细 - 查询优惠券列表
const getDetailListApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.customer.coupon.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getTypeList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.goods.type.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const addCouponApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.coupon.info.add`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const updateCouponApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.merchant.coupon.update`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const deleteCouponApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.merchant.coupon.delete`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 分页查找园区店
const commodityAddSeviceMerchant = function(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.servicemerchantref.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取核销人
const getDistinctColum = function(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.life.customer.coupon.distinctColum`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const exportCoupon = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.life.merchant.coupon.exportExcel'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const exportCustomerCoupon = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.life.customer.coupon.exportExcel'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, getDetailListApi, getTypeList, addCouponApi, updateCouponApi, deleteCouponApi, commodityAddSeviceMerchant, getDistinctColum, exportCoupon, exportCustomerCoupon }
......@@ -8,10 +8,10 @@
* @FilePath: \scrm\scrm-sub-blog\src\components\index.js
*/
import Vue from 'vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
// import glsxDialog from '@/components/glsx-dialog/index.vue'
import GlsxCombiForm from '@/components/glsx-combi-form/index.vue'
import GlsxForm from '@/components/glsx-form/index.vue'
Vue.component('glsx-dialog', glsxDialog)
// Vue.component('glsx-dialog', glsxDialog)
Vue.component('GlsxCombiForm', GlsxCombiForm)
Vue.component('GlsxForm', GlsxForm)
\ No newline at end of file
......@@ -11,14 +11,14 @@
let cfg = require('./conf.js')
import { Http, utils } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) {
export const fetchConfig = function(common) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
let params = { moduleName: 'inventory', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config',httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return utils.getConfig(params)
return common.utils.getConfig(params)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
}
......@@ -26,4 +26,4 @@ export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file
}
......@@ -12,13 +12,14 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig()
const { response, request, sign, secret, sign_common, request_common, purchaseType} = await fetchConfig(common)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$purchaseType = purchaseType
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
......
export function debounce(func, wait = 200) {
let timeout;
return function (event) {
let timeout
return function(event) {
clearTimeout(timeout)
timeout = setTimeout(() => {
func.call(this, event)
......@@ -24,10 +24,50 @@ export function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') {
return format
}
/**
* 校验手机号码格式
*/
* 校验手机号码格式
*/
export function checkPhone(mobile) {
const myreg =
/^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
}
/**
* 用于glsx-combi-form的select写入options
* formName String FormData的属性名
* hasAll Boolean 是否需要添加“全部”属性
* refreshSigle String 更新特定的属性的options
*/
export function getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = that[formName].find(k => k.name == refreshSigle)
var index = that[formName].findIndex(k => k.name == refreshSigle)
that.$set(that[formName][index], 'optionList', that.$common.utils.deepClone(that.baseData[item.optionsName]))
if (hasAll && that.baseData[item.optionsName].length && that.baseData[item.optionsName][0][that[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[that[formName][index].optionId] = ''
temp[that[formName][index].optionLabel] = '全部'
that[formName][index].optionList.unshift(temp)
}
} else {
that[formName].forEach((item, index) => {
if (item.type === 'select' && that.baseData[item.optionsName]?.length) {
that.$set(that[formName][index], 'optionList', that.$common.utils.deepClone(that.baseData[item.optionsName]))
if (hasAll && that.baseData[item.optionsName].length && that.baseData[item.optionsName][0][that[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[that[formName][index].optionId] = ''
temp[that[formName][index].optionLabel] = '全部'
that[formName][index].optionList.unshift(temp)
}
}
})
}
}
export function aToExport(url) {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', url)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
}
......@@ -2,15 +2,18 @@
<template>
<div class="addWrap">
<div class="d2-container-content gl-form-min" style="padding: 10px 20px">
<el-form :inline="true" size="small" :model="editAllocationForm" ref="editAllocationFormRef" :rules="formRules" class="demo-form-inline">
<el-form :inline="true" size="small" :model="editAllocationForm" ref="editAllocationFormRef" :rules="formRules"
class="demo-form-inline">
<el-form-item label="调出门店:" prop="callOutYqMerchantId">
<el-select v-model="editAllocationForm.callOutYqMerchantId" style="width: 300px">
<el-option v-for="item in callOutYqMerchantList" :key="item.merchantNo" :label="item.merchantName" :value="item.merchantNo" />
<el-option v-for="item in callOutYqMerchantList" :key="item.merchantNo" :label="item.merchantName"
:value="item.merchantNo" />
</el-select>
</el-form-item>
<el-form-item label="调入门店:" prop="callInYqMerchantId">
<el-select v-model="editAllocationForm.callInYqMerchantId" filterable style="width: 300px">
<el-option v-for="item in callInYqMerchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" />
<el-option v-for="item in callInYqMerchantList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantId" />
</el-select>
</el-form-item>
</el-form>
......@@ -20,13 +23,15 @@
<div class="gl-form-min">
<el-form :inline="true" size="small" :model="editAllocationForm">
<el-form-item label="">
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20" clearable />
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20"
clearable />
</el-form-item>
<el-button @click="handleSearch" size="small" type="primary" style="marginleft: 15px">查询</el-button>
</el-form>
</div>
</div>
<GLTable ref="allocationTable" :getListApi="getListApi" :pageConf="pageConf" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<GLTable ref="allocationTable" :getListApi="getListApi" :pageConf="pageConf" :searchForm="searchFormSearch"
:tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="allocation(scope.scope)" :disabled="setDisabled(scope.scope)">选择</el-button>
</div>
......@@ -40,9 +45,11 @@
</div>
</GLTable>
</div>
<glsx-form ref="allocationForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef" @handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
<glsx-form ref="allocationForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef"
@handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
<!-- 盘点 -->
<allocation-num-dialog :allocation-num-visible="allocationNumVisible" :allocation-info="allocationInfo" v-if="allocationNumVisible" @dialogClose="dialogClose" />
<allocation-num-dialog :allocation-num-visible="allocationNumVisible" :allocation-info="allocationInfo"
v-if="allocationNumVisible" @dialogClose="dialogClose" />
</div>
</template>
......@@ -87,6 +94,11 @@ export default {
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode',
width: '250px'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
......@@ -117,6 +129,11 @@ export default {
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode',
width: '250px'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
......@@ -288,17 +305,20 @@ export default {
padding: 20px;
margin-bottom: 20px;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.title {
font-weight: 600;
font-size: 16px;
color: #333333;
padding: 17px 0;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
......
<!-- 盘点详情弹窗弹窗 -->
<template>
<GLDialog bigTitle="详细信息"
:visible.sync="allocationDetailVisible"
class="inventoryDetailDailog"
mode="big"
okText="关闭"
@onCancel="handleClose"
@onOk="handleClose">
<GLDialog bigTitle="详细信息" :visible.sync="allocationDetailVisible" class="inventoryDetailDailog" mode="big" okText="关闭"
@onCancel="handleClose" @onOk="handleClose">
<div>
<div class="d2-container-content">
<GLTable ref="recordTable"
:getListApi="getListApi"
:searchForm="searchFormSearch"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
</GLTable>
</div>
</div>
<span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleClose">关闭</el-button>
</span>
</GLDialog>
......@@ -47,6 +39,11 @@ export default {
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode',
// width: 250
},
{
label: '系列',
prop: 'sourceMaterialName'
},
......@@ -74,7 +71,7 @@ export default {
},
allocationInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
......@@ -104,6 +101,7 @@ export default {
color: #2a58ad;
margin: 0 2px;
}
.inventoryDetailDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
......
......@@ -6,7 +6,8 @@
<div class="gl-form-min">
<el-form ref="ruleForm" :model="searchForm" size="small" inline="true">
<el-form-item label="">
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20" clearable />
<el-input v-model="searchForm.searchName" style="width: 200px" placeholder="请输入商品名称/系列" maxlength="20"
clearable />
</el-form-item>
<el-button @click="handleSearch" size="small" type="primary">查询</el-button>
......@@ -14,7 +15,8 @@
</div>
</div>
<p class="title">盘存</p>
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn" :pageConf="pageConf">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="inventory(scope.scope)" :disabled="setDisabled(scope.scope)">盘点</el-button>
</div>
......@@ -25,9 +27,14 @@
<GLTable ref="recordTable2" :tableData="chooseDataList" :tableParams="tableParams2" :hasPage="false">
<template slot="profitAndLoss" slot-scope="scope">
<span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0">
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' +
parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' :
'件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{
parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' :
'件') }}</span>
<span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) +
(membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
</span>
<span v-else>-</span>
</template>
......@@ -36,9 +43,11 @@
</div>
</GLTable>
</div>
<glsx-form ref="addInventoryForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef" @handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
<glsx-form ref="addInventoryForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef"
@handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
<!-- 盘点 -->
<inventory-num-dialog :inventory-num-visible="inventoryNumVisible" :record-info="recordInfo" v-if="inventoryNumVisible" @dialogClose="dialogClose" />
<inventory-num-dialog :inventory-num-visible="inventoryNumVisible" :record-info="recordInfo"
v-if="inventoryNumVisible" @dialogClose="dialogClose" />
</div>
</template>
......@@ -70,6 +79,11 @@ export default {
prop: 'goodsName'
},
{
label: '商品编码',
prop: 'productCode',
width: '250px'
},
{
label: '系列',
prop: 'sourceMaterialName'
},
......@@ -101,6 +115,11 @@ export default {
width: '160px'
},
{
label: '商品编码',
prop: 'productCode',
width: '250px'
},
{
label: '系列',
prop: 'sourceMaterialName',
width: '250px'
......@@ -272,20 +291,22 @@ export default {
padding: 20px;
margin-bottom: 20px;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.title {
font-weight: 600;
font-size: 16px;
color: #333333;
padding: 17px 0;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
}</style>
<!-- 盘点详情弹窗弹窗 -->
<template>
<GLDialog bigTitle="详细信息" :visible.sync="inventoryDetailVisible" :before-close="handleClose" class="inventoryDetailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<GLDialog bigTitle="详细信息" :visible.sync="inventoryDetailVisible" :before-close="handleClose"
class="inventoryDetailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<div>
<div class="header" slot="header" style="padding: 10px 20px">
<!-- <GLCombiForm ref="showSearch"
......@@ -10,12 +11,18 @@
:form-data="showFormData"></GLCombiForm> -->
</div>
<div class="d2-container-content">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
<template slot="profitAndLoss" slot-scope="scope">
<span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0">
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' +
parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米'
: '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{
parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米'
: '件') }}</span>
<span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) +
(membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
</span>
<span v-else>-</span>
</template>
......@@ -55,6 +62,11 @@ export default {
// width: '200px'
},
{
label: '商品编码',
prop: 'productCode',
// width: 250
},
{
label: '系列',
prop: 'sourceMaterialName'
},
......@@ -97,12 +109,12 @@ export default {
},
recordInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
computed: {},
mounted() {},
mounted() { },
methods: {
beforeSearchFn() {
......@@ -125,6 +137,7 @@ export default {
color: #2a58ad;
margin: 0 2px;
}
.inventoryDetailDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
......
<!-- 盘点 -->
<template>
<GLDialog title="盘点" :visible.sync="inventoryNumVisible" class="inventoryNumDailog" @onCancel="handleClose" @onOk="handleAddConfirm">
<GLDialog title="盘点" :visible.sync="inventoryNumVisible" class="inventoryNumDailog" @onCancel="handleClose"
@onOk="handleAddConfirm">
<div class="gl-form-page gl-form-min">
<el-form ref="inventoryNumForm" :model="infoForm" :rules="formRules" label-width="154px" size="small">
<el-form-item label="盘点数量:" prop="inventoryNum">
......@@ -43,18 +44,18 @@ export default {
},
recordInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
watch: {},
created() {},
created() { },
components: {},
computed: {},
mounted() {},
mounted() { },
methods: {
handleUpgradeNum(newVal) {
......@@ -78,5 +79,4 @@ export default {
}
}
</script>
<style >
</style>
<style ></style>
<!-- 关联门店弹窗 -->
<template>
<GLDialog bigTitle="关联门店" :visible.sync="relateStoreVisible" mode="big" okText="关联" @onOk="handleRelateStoreConfirm" @onCancel="handleRelateStoreClose" class="relateStore">
<slot />
<el-row class="tableCon">
<!-- <el-col :span="12"> -->
<div class="tableBox">
<el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="handleChange" @select-all="handleAll">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column v-if="sourcePage != 'serviceStore'" prop="yqMerchantName" label="园区店名称" align="center">
<template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.yqMerchantName }}</span>
</template>
</el-table-column>
<el-table-column prop="merchantName" label="4S店名称" align="center">
<template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.merchantName }}</span>
<el-tooltip v-if="!scope.row.isSetUpgradeSettleRule" popper-class="tooltip-class" effect="dark" content="该门店无配置财务分润规则,无法关联!" placement="top">
<span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)" class="tip-icon">?</span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<!-- </el-col> -->
<!-- <el-col :span="12"> -->
<el-table :data="selectedData" class="table tableBox" border height="464px">
<el-table-column v-if="sourcePage != 'serviceStore'" prop="yqMerchantName" label="园区店名称" align="center" />
<el-table-column prop="merchantName" label="4S店名称" align="center" />
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
</el-table>
<!-- </el-col> -->
</el-row>
</GLDialog>
</template>
<script>
export default {
name: 'RelateStoreDialog',
data() {
return {
selectedData: [],
selectingData: [],
needTip: ['editProduct'],
// 分页
total: 0,
currentPage: 1,
pageSize: 20
}
},
props: {
relateStoreVisible: {
type: Boolean,
default: false
},
// 页面来源
sourcePage: {
type: String,
default: ''
},
storeApi: {
type: Function,
default: () => { }
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => { }
}
// 去掉表格中某些字段
// noTableField: {
// type: Array,
// default: () => []
// }
},
mounted() {
console.log('???/')
this.selectedData = this.storeSelected
this.getSelectingList()
},
methods: {
selectable(row, index) {
var isSelect = row.hasOwnProperty('beServed') ? !row.beServed : true
if (this.sourcePage === 'editProduct') {
// 不能选的判断
// console.log('??')
isSelect = row.isSetUpgradeSettleRule
}
return isSelect
},
recoverySelection() {
var exitIds = this.selectedData.map(item => item.merchantId)
this.selectingData.forEach(item => {
exitIds.includes(item.merchantId) && this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
this.storeApi({
...this.storeSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(item => item.merchantId === row.merchantId)
addOrDelete ? this.selectedData.push(row) : (this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId))
},
handleAll(selection) {
this.selectingData.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.merchantId === item.merchantId)
var isServed = item.hasOwnProperty('beServed') ? item.beServed : false
if (selection.length && (isExit === -1) && !isServed) {
this.selectedData.push(item)
} else if (!selection.length && (isExit !== -1)) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId)
this.$refs.seletingTable.toggleRowSelection(row)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit('handleRelateStoreConfirm', this.selectedData)
},
handleRelateStoreClose() {
this.$emit('handleRelateStoreClose')
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .tableCon {
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
<!-- 被选中门店展示 -->
<template>
<div>
<el-table :data="tableData" style="width: 690px" border class="store-table">
<el-table-column label="序号" align="center" type="index" width="64px" />
<el-table-column prop="yqMerchantName" label="园区店名称" align="center" />
<el-table-column prop="merchantName" label="4S店名称" align="center" />
<el-table-column prop="merchantId" label="商户编号" align="center" />
<el-table-column prop="userType" label="商户类型" align="center">
<template slot-scope="scope">
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
<el-table-column label="券码数量(张)" align="center" width="160px">
<template slot-scope="scope">
<slot name="num" :scope="{row: scope.row, index: scope.$index}" />
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
// import { userType, ghUserType } from '@/common/constants.js'
export default {
name: 'SelectedShowTable',
data() {
return {
// 基本数据
baseData: {
userTypeList: [],
ghUserTypeList: []
}
}
},
props: {
tableData: {
type: Array,
default: () => []
}
},
components: {},
computed: {},
mounted() { },
methods: {
handleDelete(row) {
this.$confirm('是否确认删除该门店?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('handleTableStoreDelete', row)
})
}
}
}
</script>
<style scoped>
</style>
const couponsObj = {
searchFormData: [
{
label: '礼券名称',
name: 'couponName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '类型',
name: 'couponTypeList',
type: 'select',
multiple: true,
optionList: [],
optionId: 'goodsType',
optionLabel: 'goodsTypeName',
optionsName: 'typeList'
},
{
label: '状态',
name: 'enabledFlagList',
type: 'select',
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'enabledFlagList'
},
{
label: '发券人',
name: 'employeeNameKeyword',
type: 'input',
isClear: true,
isHide: true
},
{
label: '核销状态',
name: 'usedFlagList',
type: 'select',
multiple: true,
isHide: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'usedFlagList'
},
{
label: '核销人',
name: 'sellerNameList',
type: 'select',
multiple: true,
isHide: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'sellerNameList'
}
]
}
export default {
couponsObj
}
......@@ -32,7 +32,8 @@ export default {
upgradeGoodsName: '',
yqMerchantId: '',
goodsType: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
},
tableSearchForm: {},
stockInfo: {},
......@@ -45,7 +46,12 @@ export default {
maxlength: '20',
isClear: true
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true
},
{
label: '系列',
name: 'goodsSeries',
......@@ -82,6 +88,10 @@ export default {
label: '商品名称',
prop: 'upgradeGoodsName'
},
{
label: '商品编码',
prop: 'productCode'
},
{
label: '系列',
prop: 'goodsSeries'
......@@ -197,7 +207,9 @@ export default {
upgradeGoodsName: '',
yqMerchantId: '',
goodsType: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
}
this.handleSearch()
}
......
......@@ -2,14 +2,17 @@
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>出库列表</h2>
<el-button type="primary" size="small" @click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -33,7 +36,8 @@ export default {
yqMerchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
},
tableSearchForm: {},
paramsObj: {},
......@@ -64,6 +68,12 @@ export default {
isClear: true
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true
},
{
label: '出库门店',
name: 'yqMerchantId',
type: 'select',
......@@ -72,6 +82,14 @@ export default {
optionLabel: 'merchantName',
optionsName: 'yqMerchantList'
},
{
label: '使用门店',
name: 'storeUsage',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '所属分类',
name: 'goodsType',
......@@ -117,6 +135,12 @@ export default {
line: 1
},
{
label: '商品编码',
prop: 'productCode',
width: 180,
line: 1
},
{
label: '系列',
prop: 'goodsSeries'
},
......@@ -156,6 +180,15 @@ export default {
label: '出库门店',
prop: 'yqMerchantName',
width: 200
},
{
// label: '适用门店',
label: '使用门店',
prop: 'storeUsage',
width: 200,
formatter: cellValue => {
return cellValue.storeUsage || '-'
}
}
]
},
......@@ -258,7 +291,8 @@ export default {
yqMerchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
}
this.handleSearch()
}
......@@ -268,10 +302,12 @@ export default {
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.purchase {
.table-header {
@include space-between_center;
margin-bottom: 10px;
h2 {
font-weight: 600;
font-size: 16px;
......
......@@ -40,7 +40,8 @@ export default {
upgradeGoodsName: '',
yqMerchantId: '',
goodsType: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
},
tableSearchForm: {},
stockInfo: {},
......@@ -53,7 +54,12 @@ export default {
maxlength: '20',
isClear: true
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true
},
{
label: '系列',
name: 'goodsSeries',
......@@ -93,6 +99,12 @@ export default {
line: 1
},
{
label: '商品编码',
prop: 'productCode',
width: 180,
line: 1
},
{
label: '系列',
prop: 'goodsSeries'
},
......@@ -195,7 +207,7 @@ export default {
},
exportExcel() {
this.exportLoading = true
var params = this.searchForm
var params = this.tableSearchForm
this.$apis.stockManage.exportMerchantExcel(params).then(res => {
window.location.href = res
})
......@@ -209,7 +221,8 @@ export default {
upgradeGoodsName: '',
yqMerchantId: '',
goodsType: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
}
this.handleSearch()
},
......
<template>
<GLDialog class="stock-dialog" v-if="stockMonthVisible" :destroy-on-close="true" bigTitle="月度库存结算单" mode="big" okText="关闭" :visible.sync="stockMonthVisible" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose">
<GLDialog class="stock-dialog" v-if="stockMonthVisible" :destroy-on-close="true" :before-close="handleClose" bigTitle="月度库存结算单" mode="big" okText="关闭" :visible.sync="stockMonthVisible" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose">
<div class="detail-content" v-if="stockMonthVisible">
<el-form :inline="true" :model="searchForm" size="small">
<el-form-item label="年度:">
......@@ -150,6 +150,7 @@ export default {
},
handleClose() {
console.log(111)
this.$emit('dialogClose')
}
}
......
<template>
<div class="purchase">
<div class="container">
......@@ -33,7 +32,8 @@ export default {
yqMerchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
},
tableSearchForm: {},
paramsObj: {},
......@@ -64,6 +64,12 @@ export default {
isClear: true
},
{
label: '商品编码',
name: 'productCode',
type: 'input',
isClear: true
},
{
label: '入库门店',
name: 'yqMerchantId',
type: 'select',
......@@ -117,6 +123,12 @@ export default {
line: 1
},
{
label: '商品编码',
prop: 'productCode',
width: 180,
line: 1
},
{
label: '系列',
prop: 'goodsSeries',
width: 150,
......@@ -132,7 +144,7 @@ export default {
label: '入库数量',
prop: 'increaseStockNum',
formatter: cellValue => {
return cellValue.increaseStockNum || cellValue.increaseStockNum == 0 ? parseFloat(cellValue.increaseStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
return cellValue.increaseStockNum || cellValue.increaseStockNum == 0 ? parseFloat(cellValue.increaseStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) && cellValue.goodsType != this.$purchaseType? '米' : '件') : '-'
},
width: 120
},
......@@ -302,7 +314,8 @@ export default {
yqMerchantId: '',
goodsType: '',
businessCode: '',
goodsSeries: ''
goodsSeries: '',
productCode: ''
}
this.handleSearch()
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!