Browse Source

添加分账功能

master
xh-pan1 2 years ago
parent
commit
af091a90e6
  1. 2
      canvas-container/assets/font_icon/iconfont.json
  2. 8
      src/api/commodity.js
  3. 19
      src/api/shopSys.js
  4. 48
      src/api/stockNote.js
  5. 4
      src/styles/elDialog.scss
  6. 2
      src/views/active/index.vue
  7. 2
      src/views/commodity/commodityList/commodityGroup.vue
  8. 8
      src/views/commodity/commoditySystem/addComponent.vue
  9. 2
      src/views/commodity/commoditySystem/index.vue
  10. 6
      src/views/customer/operate/index.vue
  11. 2
      src/views/distributor/achievement/humens.vue
  12. 4
      src/views/distributor/achievement/order.vue
  13. 2
      src/views/distributor/customer/popSearch.vue
  14. 2
      src/views/distributor/personnel/list.vue
  15. 2
      src/views/distributor/personnel/msg.vue
  16. 2
      src/views/distributor/personnel/sys.vue
  17. 17
      src/views/finance/list/index.vue
  18. 2
      src/views/login/index.vue
  19. 2
      src/views/marketing/channelCoupons/index.vue
  20. 42
      src/views/shop/material/index.vue
  21. 335
      src/views/stock/stocknote/Edit.vue
  22. 214
      src/views/stock/stocknote/index.vue
  23. 48
      src/views/system/shopSys/index.vue

2
canvas-container/assets/font_icon/iconfont.json

@ -1,6 +1,6 @@
{
"id": "2224733",
"name": "cereshop",
"name": "Thee",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",

8
src/api/commodity.js

@ -28,6 +28,14 @@ export function getClassifyGetAll(data) {
})
}
export function getClassifyGetList(data) {
return request({
url: '/product/getList',
method: 'post',
data
})
}
// 修改商品查询
export function getClassifyGetById(data) {
return request({

19
src/api/shopSys.js

@ -19,6 +19,16 @@ export function shopSysUpdate(data) {
})
}
// 支付认证
export function registerByXs(data) {
return request({
url: '/shop/registerByXs',
method: 'post',
data
})
}
//* ******************** 物流方案 *********************
// 物流方案查询
export function logisticsGetAll(data) {
@ -68,6 +78,15 @@ export function logisticsDelete(data) {
//* ******************** 仓库 *********************
// 仓库查询
export function storehouseGetList(data) {
return request({
url: '/storehouse/getList',
method: 'post',
data
})
}
export function storehouseGetAll(data) {
return request({
url: '/storehouse/getAll',

48
src/api/stockNote.js

@ -0,0 +1,48 @@
import request from '@/utils/request'
//* ******************** 出入库记录 *********************
// 出入库记录查询
export function stocknoteGetAll(data) {
return request({
url: '/stocknote/getAll',
method: 'post',
data
})
}
// 出入库记录详情
export function stocknoteGetById(data) {
return request({
url: '/stocknote/getById',
method: 'post',
data
})
}
// 添加出入库记录
export function stocknoteAdd(data) {
return request({
url: '/stocknote/save',
method: 'post',
data
})
}
// 修改出入库记录
export function stocknoteUpdate(data) {
return request({
url: '/stocknote/update',
method: 'post',
data
})
}
// 删除仓库
export function stocknoteDelete(data) {
return request({
url: '/stocknote/delete',
method: 'post',
data
})
}

4
src/styles/elDialog.scss

@ -10,6 +10,10 @@
color: #FFFFFF;
}
.el-dialog__headerbtn .el-dialog__close {
color: #FFFFFF;
}
.fenye {
padding-top: 20px;
}

2
src/views/active/index.vue

@ -40,7 +40,7 @@
</el-select>
</div>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
</FixedNav>
<!-- 表格 -->
<div class="tableBox">

2
src/views/commodity/commodityList/commodityGroup.vue

@ -105,7 +105,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clearData">重置</el-button>
<el-button type="info" plain @click="clearData">重置</el-button>
</el-form-item>
</el-form>
</div>

8
src/views/commodity/commoditySystem/addComponent.vue

@ -86,7 +86,7 @@
<el-table-column label="库存">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.stockNumber" type="number" oninput="value=value.replace(/[^\d]/g,'')" /> -->
<el-input-number v-model="scope.row.stockNumber" :controls="false" :max="999999999" :min="0" :precision="0" />
<el-input-number v-model="scope.row.stockNumber" :disabled="true" :controls="false" :max="999999999" :min="0" :precision="0" />
</template>
</el-table-column>
<el-table-column label="重量(KG)">
@ -219,7 +219,7 @@
<el-table-column label="库存">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.stockNumber" type="number" oninput="value=value.replace(/[^\d]/g,'')" /> -->
<el-input-number v-model="scope.row.stockNumber" :controls="false" :max="999999999" :min="0" :precision="0" />
<el-input-number v-model="scope.row.stockNumber" :disabled="true" :controls="false" :max="999999999" :min="0" :precision="0" />
</template>
</el-table-column>
<el-table-column label="重量(KG)">
@ -697,12 +697,12 @@ export default {
}
.sku-attr-list {
.el-input {
width: 180px;
width: 100px;
}
}
.single-style {
.el-input {
max-width: 180px;
max-width: 100px;
}
}
.add-attr-btn {

2
src/views/commodity/commoditySystem/index.vue

@ -31,7 +31,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
<el-button type="success" plain @click="add">新增商品</el-button>
<el-button type="success" plain @click="sends">批量导入</el-button>
<el-button type="success" plain @click="productDataExport">导出商品</el-button>

6
src/views/customer/operate/index.vue

@ -34,9 +34,9 @@
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clearData">重置</el-button>
<el-button plain @click="addOperate">新增</el-button>
<el-button plain @click="delData(id = null)">删除</el-button>
<el-button type="info" plain @click="clearData">重置</el-button>
<el-button type="primary" plain @click="addOperate">新增</el-button>
<el-button type="primary" plain @click="delData(id = null)">删除</el-button>
</el-form-item>
</el-form>
</div>

2
src/views/distributor/achievement/humens.vue

@ -23,7 +23,7 @@
</el-form-item>
<el-form-item label-width="0">
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
</el-form-item>
</el-form>
</div>

4
src/views/distributor/achievement/order.vue

@ -33,7 +33,7 @@
</el-form-item>
<el-form-item label-width="0">
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
</el-form-item>
</el-form>
</div>
@ -62,7 +62,7 @@
<el-table-column prop="transactionTime" label="交易时间" />
</el-table>
<div class="tablefoot">
<el-button plain :disabled="!multipleSelection.length" @click="getOrder">标记为已结算</el-button>
<el-button type="info" plain :disabled="!multipleSelection.length" @click="getOrder">标记为已结算</el-button>
</div>
<div class="fenye">
<el-pagination

2
src/views/distributor/customer/popSearch.vue

@ -23,7 +23,7 @@
</el-form-item>
<el-form-item label-width="0">
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
</el-form-item>
</el-form>
</div>

2
src/views/distributor/personnel/list.vue

@ -33,7 +33,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
<el-button type="success" plain @click="add">添加分销员</el-button>
</el-form-item>
</el-form>

2
src/views/distributor/personnel/msg.vue

@ -31,7 +31,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
</el-form-item>
</el-form>
</div>

2
src/views/distributor/personnel/sys.vue

@ -27,7 +27,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label-width="100" style="padding-left: 120px;">
<el-button plain @click="cancel">取消</el-button>
<el-button type="info" plain @click="cancel">取消</el-button>
<el-button type="primary" @click="subm">保存</el-button>
</el-form-item>
</el-form>

17
src/views/finance/list/index.vue

@ -49,6 +49,7 @@
</el-table-column>
<el-table-column prop="income" label="收入(元)" width="220" />
<el-table-column prop="expenditure" label="支出(元)" show-overflow-tooltip />
<el-table-column prop="commission" label="佣金(元)" show-overflow-tooltip />
<el-table-column label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<div class="btnList">
@ -70,7 +71,7 @@
</p>
<el-form-item label="提现金额" prop="amount">
<el-col :span="16">
<el-input v-model="form.amount" maxlength="9" :placeholder="'可提现金额:' + cardList[2].money" />
<el-input v-model="form.amount" maxlength="9" :placeholder="'可提现金额:' + cardList[3].money" />
</el-col>
<el-col :span="6" style="text-align:center">
<span class="sub_text" @click="getAllAmount">全部提现</span>
@ -132,6 +133,7 @@
<el-table-column prop="orderFormid" label="订单ID" />
<el-table-column prop="incomeType" label="收支类型" />
<el-table-column prop="money" label="金额(元)" />
<el-table-column prop="commission" label="佣金(元)" />
<el-table-column prop="balance" label="余额(元)" />
<el-table-column prop="time" label="入账时间" />
</el-table>
@ -173,6 +175,10 @@ export default {
money: '0.00'
},
{
name: '累计佣金(元)',
money: '0.00'
},
{
name: '冻结金额(元)',
money: '0.00'
},
@ -296,7 +302,7 @@ export default {
},
//
getAllAmount() {
this.form.amount = this.cardList[2].money
this.form.amount = this.cardList[3].money
},
//
async getAll(formInline) {
@ -304,9 +310,10 @@ export default {
if (res.code === '') {
this.tableData = res.data.finances
this.cardList[0].money = res.data.turnover
this.cardList[1].money = res.data.frozenMoney
this.cardList[2].money = res.data.withdrawableMoney
this.cardList[3].money = res.data.withdrawableStayMoney
this.cardList[1].money = res.data.platformCommission
this.cardList[2].money = res.data.frozenMoney
this.cardList[3].money = res.data.withdrawableMoney
this.cardList[4].money = res.data.withdrawableStayMoney
}
},
//

2
src/views/login/index.vue

@ -233,7 +233,7 @@
</div>
</div>
<!-- 底部 -->
<div class="login-footer">© 2019 cereshop</div>
<div class="login-footer">© 2019 Thee</div>
</div>
</template>

2
src/views/marketing/channelCoupons/index.vue

@ -10,7 +10,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="search">查询</el-button>
<el-button plain @click="clear">重置</el-button>
<el-button type="info" plain @click="clear">重置</el-button>
</el-form-item>
</el-form>
</div>

42
src/views/shop/material/index.vue

@ -33,7 +33,7 @@
</div>
</div>
<div v-if="tipsShow" class="tagBox">
<div v-for="(item,index) in lableList" :key="index" class="tagDetail">
<div v-for="(item,labelIndex) in lableList" :key="labelIndex" class="tagDetail">
<div class="topTags" />
<div v-if="item.image.includes('mp4')" class="tagsImgs">
<video ref="videos" controls="controls" loop="loop">
@ -45,7 +45,7 @@
</div>
<div class="tagBtns">
<el-button type="text" @click="link(item.image)">链接</el-button>
<el-button type="text" @click="changeTips(item.labelId)">标签</el-button>
<el-button type="text" @click="changeTips(labelIndex)">标签</el-button>
<el-button type="text" @click="delTips(item)">删除</el-button>
</div>
</div>
@ -177,13 +177,13 @@ export default {
addtips: {},
tipsName: '',
tipsList: '',
findIndex: 0,
findIndex: 0, //
tipsShow: false,
isVisible: false,
tipsDio: false,
typeList: '.jpg,.jpeg,.png,.gif,.JPG,.JPEG,.PBG,.GIF,.mp4,.MP4',
attachment: this.initAttachment(),
currentIndex: '',
currentIndex: '', //
sizeForm: {},
dataObj: {
folderId: 1
@ -192,9 +192,12 @@ export default {
tagId: '',
id: 0
},
currentIndexs: '',
currentIndexs: '',//
lableList: [],
tipsImgLsit: [],
currentLabelIndex: 0,
imageUrl: '',
fileLength: 0,
disabled: false,
@ -217,7 +220,7 @@ export default {
}
},
mounted() {
this.getAllTips()
this.getAllTips(true)
},
methods: {
btnClick(id) {
@ -232,30 +235,22 @@ export default {
console.log(tab, 'tab')
console.log(event, 'event')
this.activeName = tab.name
const res = await tipsGetAll({
labelType: tab.name
})
this.tipsList = res.data
if(this.tipsList && this.tipsList.length > 0){
this.getTips(0, this.tipsList[0])
}
console.log(res)
this.getAllTips(true)
},
//
async getAllTips() {
async getAllTips(init) {
const res = await tipsGetAll({
labelType: this.activeName
})
this.tipsList = res.data
console.log(res)
if(this.tipsList && this.tipsList.length > 0){
if(init && this.tipsList && this.tipsList.length > 0){
this.getTips(0, this.tipsList[0])
}
},
//
async getTips(index, arr) {
console.log(index)
console.log("getTips index:"+index)
this.findIndex = index
this.tipsName = arr.labelName
this.tipsShow = true
@ -278,7 +273,7 @@ export default {
}
},
//
edit(row) {
edit() {
this.tipsName = this.tipsList[this.findIndex].labelName
this.addtips = {
title: '编辑标签',
@ -318,22 +313,23 @@ export default {
})
},
//
changeTips(labelId) {
changeTips(labelIndex) {
this.currentLabelIndex = labelIndex;
this.tipsDio = true
},
async tipsDioEn() {
console.log(this.lableList, this.currentIndexs)
const res = await updateSource({
labelId: this.tipsList[this.currentIndexs].labelId,
image: this.lableList[0].image
image: this.lableList[this.currentLabelIndex].image
})
if (res.code === '') {
this.$message.success('修改成功')
this.getAllTips()
this.tipsDio = false
//
this.getTips(this.findIndex, {
labelName: this.tipsName,
labelId: this.tipsList[this.currentIndexs].labelId
labelId: this.tipsList[this.findIndex].labelId
})
}
},

335
src/views/stock/stocknote/Edit.vue

@ -0,0 +1,335 @@
<template>
<el-dialog
:close-on-click-modal="false"
:title="title"
:type="type"
:visible.sync="isVisible"
:modal-append-to-body="false"
:center="true"
width="80%"
top="50px"
class="dialog-wrap"
>
<el-form ref="ruleForm" :model="params" label-width="150px">
<el-form-item label="仓库">
<el-select v-model="params.storehouseId" placeholder="请选择仓库" @change="changeStorehouseValue" clearable>
<el-option
v-for="(item,index) in storehouseList"
:key="index"
:label="item.storehouseName"
:value="item.storehouseId"
/>
</el-select>
</el-form-item>
<el-form-item label="商品">
<el-select v-model="params.productId" placeholder="请选择商品" @change="changeProductValue" clearable>
<el-option
v-for="(item,index) in productList"
:key="index"
:label="item.productName"
:value="item.productId"
/>
</el-select>
</el-form-item>
<el-form-item label="SKU" v-if="isSkuVisible == 1">
<el-select v-model="params.skuId" placeholder="请选择规格" clearable>
<el-option
v-for="(item,index) in skuList"
:key="index"
:label="item.skuName"
:value="item.skuId"
/>
</el-select>
</el-form-item>
<el-form-item label="单据类型">
<el-radio-group v-model="params.billTypeId">
<el-radio :disabled="isDisabled" :label="1">采购入库</el-radio>
<el-radio :disabled="isDisabled" :label="4">报废出库</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="数量">
<div class="form-item-row">
<div class="el-row" style="margin-bottom: 10px;">
<el-input
v-model="params.quantity"
maxlength="20"
:readonly="isDisabled"
onblur="value=value.replace(/(^\s*)|(\s*$)/g, '')"
/>
</div>
</div>
</el-form-item>
<el-form-item label="价格">
<div class="form-item-row">
<div class="el-row" style="margin-bottom: 10px;">
<el-input
v-model="params.price"
maxlength="20"
:readonly="isDisabled"
onblur="value=value.replace(/(^\s*)|(\s*$)/g, '')"
/>
</div>
</div>
</el-form-item>
</el-form>
<!-- <el-table-column label="商品">
<template slot-scope="scope">
<el-select v-model="scope.row.productId" placeholder="请选择商品" clearable>
<el-option
v-for="(item,index) in productList"
:key="index"
:label="item.productName"
:value="item.productId"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="规格">
<template slot-scope="scope">
<el-select v-model="scope.row.skuId" placeholder="请选择规格" clearable>
<el-option
v-for="(item,index) in skuList"
:key="index"
:label="item.skuName"
:value="item.skuId"
/>
</el-select>
</template>
</el-table-column>
-->
<div slot="footer" class="btn-wrap">
<el-button type="primary" @click="onSubmit">确定</el-button>
<el-button @click="isVisible = false">取消</el-button>
</div>
</el-dialog>
</template>
<script>
import { stocknoteGetById, stocknoteAdd, stocknoteUpdate } from '@/api/stockNote'
import { storehouseGetList } from '@/api/shopSys'
import { getClassifyGetList,getClassifyGetById } from '@/api/commodity'
export default {
props: {
dialogVisible: {
type: Boolean,
default: false
},
type: {
type: String,
default: 'add'
}
},
data() {
return {
params: {
storehouseId: 0,
storehouseName: '',
productId: 0,
productName: '',
skuId : 0,
skuName: '',
billTypeId: 0,//
billTypeName: '',
originPrice: 0,
price: 0,
quantity: 0
},
storehouseList:[],//
productList:[],//
skuList:[],//
isSkuVisible : 1,
checkId: null
}
},
computed: {
isVisible: {
get() {
return this.dialogVisible
},
set() {
this.close()
this.reset()
}
},
isDisabled() {
return this.type === 'check'
},
title() {
const titleMap = {
add: '新建出入库单',
check: '查看出入库单',
edit: '修改出入库单'
}
return titleMap[this.type]
}
},
mounted() {
this.getStorehouseList();
},
methods: {
//
async getStorehouseList() {
const res = await storehouseGetList({})
this.storehouseList = res.data
if(this.storehouseList && this.storehouseList.length > 0){
this.params.storehouseId = this.storehouseList[0].storehouseId
this.params.storehouseName = this.storehouseList[0].storehouseName
this.getProductList();
}
},
//
async getProductList() {
const res = await getClassifyGetList({ storehouseId: this.params.storehouseId})
this.productList = res.data
if(this.productList && this.productList.length > 0){
this.params.productId = this.productList[0].productId
this.params.productName = this.productList[0].productName
this.getSkuList();
}
},
async getSkuList() {
const res = await getClassifyGetById({ productId: this.params.productId})
this.skuList = res.data.skus
if(this.skuList && this.skuList.length > 0){
this.params.skuId = this.skuList[0].skuId
this.params.skuName = this.skuList[0].skuName
if(this.skuList[0].skuAttrCodeDTOList.length > 0){
//
this.isSkuVisible = 1
}else{
this.isSkuVisible = 0
}
}
},
async changeStorehouseValue(){
this.getProductList();
},
async changeProductValue(){
this.getSkuList();
},
close() {
this.$emit('close')
},
async reset() {
console.log("reset")
this.params = {
storehouseId: 0,
storehouseName: '',
productId: 0,
productName: '',
skuId : 0,
skuName: '',
billTypeId: 0,//
billTypeName: '',
originPrice: 0,
price: 0,
quantity: 0
}
if(this.storehouseList && this.storehouseList.length > 0){
this.params.storehouseId = this.storehouseList[0].storehouseId
this.getProductList();
}
},
//
async getDetails() {
const res = await stocknoteGetById({ stockNoteId: this.checkId })
if (res.code === '') {
this.params = res.data
}
},
async onSubmit() {
this.params.originPrice = this.params.price;
if (this.params.storehouseName === '') {
this.$message.error('请输入仓库名称')
} else if (this.type === 'add') {
this.add()
} else if (this.type === 'edit') {
this.update()
} else {
this.isVisible = false
}
},
async add() {
const res = await stocknoteAdd(this.params)
if (res.code === '') {
this.isVisible = false
this.$message({
message: '成功添加',
type: 'success'
})
this.$emit('success')
}
},
async update() {
const res = await stocknoteUpdate(this.params)
if (res.code === '') {
this.isVisible = false
this.$message({
message: '成功',
type: 'success'
});
this.$emit('success')
}
},
setParams(val = {}) {
if (val['params']) {
this.params = val['params']
}
if (val['checkId']) {
this.checkId = val['checkId']
this.getDetails()
}
}
}
}
</script>
<style lang="scss" scoped>
.dialog-wrap {
::v-deep .el-dialog {
display: flex;
flex-direction: column;
max-height: 80vh;
max-width: 900px;
overflow: hidden;
.el-dialog__body {
flex: 1;
overflow: auto;
}
}
.dialog-from {
width: 90%;
margin: auto;
}
.btn-wrap {
margin: 45px auto 0;
text-align: right;
}
.form-item-row {
// padding-top: 40px;
::v-deep .el-input {
width: 80px;
margin: 0 5px;
}
}
}
</style>

214
src/views/stock/stocknote/index.vue

@ -0,0 +1,214 @@
<!-- -->
<template>
<div>
<div class="pending">
<!-- 搜索 -->
<div class="formSearch">
<el-form :inline="true" :model="formParams" class="demo-form-inline">
<!-- <el-form-item label="仓库名称">
<el-input v-model="formParams.logisticsName" placeholder="请输入仓库名称" />
</el-form-item> -->
<el-form-item>
<el-button type="success" plain @click="add">新增出入库单</el-button>
<!-- <el-button type="primary" plain @click="search">查询</el-button>-->
</el-form-item>
</el-form>
</div>
<!-- 表格 -->
<div class="tableBox">
<el-table
ref="multipleTable"
:data="tableData"
border
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column label="仓库名称" width="200">
<template slot-scope="scope">{{ scope.row.storehouseName }}</template>
</el-table-column>
<el-table-column label="商品名称" width="200">
<template slot-scope="scope">{{ scope.row.productName }}</template>
</el-table-column>
<el-table-column label="SKU" width="200">
<template slot-scope="scope">{{ scope.row.skuName }}</template>
</el-table-column>
<el-table-column label="单据类型" width="100">
<template slot-scope="scope">{{ scope.row.billTypeName }}</template>
</el-table-column>
<el-table-column label="出入库数量" width="100">
<template slot-scope="scope">{{ scope.row.quantity }}</template>
</el-table-column>
<el-table-column label="成本单价" width="100">
<template slot-scope="scope">{{ scope.row.originPrice }}</template>
</el-table-column>
<el-table-column label="出入库单价" width="100">
<template slot-scope="scope">{{ scope.row.price }}</template>
</el-table-column>
<el-table-column label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<div class="btnList">
<el-button type="text" :visible="false" @click="seeMore(scope.row)">查看</el-button>
<el-button type="text" :visible="false" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="fenye">
<el-pagination
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
</div>
<!-- 方案组件 -->
<stock-note-edit
ref="edit"
:dialog-visible="dialog.isVisible"
:type="dialog.type"
@close="editClose"
@success="getLists"
/>
</div>
</template>
<script>
import { stocknoteGetAll, stocknoteDelete } from '@/api/stockNote'
import StockNoteEdit from './Edit'
export default {
components: {
StockNoteEdit
},
data() {
//
return {
formParams: {
storehouseName: '',
page: 1,
pageSize: 10
},
total: 1,
tableData: [],
currentPage: 1,
dialog: {
type: 'add',
isVisible: false
}
}
},
// data
computed: {},
// data
watch: {},
// - 访this
created() {},
// - 访DOM
mounted() {
this.getList(this.formParams)
},
//
methods: {
btnClick(id) {
console.log(id)
if (id.permissionName === '新增') {
this.add()
}
},
handleSizeChange(val) {
this.formParams.pageSize = val
this.getList(this.formParams)
},
handleCurrentChange(val) {
this.formParams.page = val
this.getList(this.formParams)
},
getLists() {
this.getList(this.formParams)
},
//
search() {
this.total = 1
this.formParams.page = 1
this.getList(this.formParams)
},
//
add() {
this.dialog = {
type: 'add',
isVisible: true
}
},
//
seeMore(row) {
const { storehouseId } = row
this.dialog = {
type: 'check',
isVisible: true
}
this.$refs.edit.setParams({
checkId: storehouseId
})
},
//
edit(row) {
const { storehouseId } = row
this.dialog = {
type: 'edit',
isVisible: true
}
this.$refs.edit.setParams({
checkId: storehouseId
})
},
//
editClose() {
this.dialog.isVisible = false
},
//
del(row) {
this.$confirm('选中数据将被永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
stocknoteDelete({ stockNoteId: row.stockNoteId }).then(res => {
if (res.code === '') {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.getList(this.formParams)
})
})
.catch(() => {})
},
//
async getList(formParams) {
const res = await stocknoteGetAll(formParams)
this.tableData = res.data.list
this.total = res.data.total
}
}
}
</script>
<style lang='scss' scoped>
//@import url(); css
@import url("../../../styles/elDialog.scss");
.pending {
padding: 30px;
background: #FFFFFF;
border-radius: 10px;
}
.fenye {
margin-top: 20px;
}
</style>

48
src/views/system/shopSys/index.vue

@ -78,7 +78,26 @@
<div class="title">店铺认证</div>
</div>
<div class="shop-details" v-if="storeDetails.xsPayId && storeDetails.xsPayId.length > 0" style="overflow: hidden; line-height: 40px">
支付信息已认证 {{storeDetails.xsPayId}}
<el-form-item label="支付信息Id">
<el-input
v-model="storeDetails.xsPayId"
maxlength="60"
:disabled="true"
/>
</el-form-item>
<el-form-item label="分账账期">
<el-select v-model="storeDetails.shareDays" placeholder="请选择分账账期"
:disabled="disabled1">
<el-option
v-for="item in shareDaySettings"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="shop-details" v-else style="overflow: hidden; line-height: 40px">
支付信息认证
@ -123,13 +142,27 @@
</div>
</template>
<script>
import { shopSysGetById, shopSysUpdate } from '@/api/shopSys';
import { shopSysGetById, shopSysUpdate, registerByXs } from '@/api/shopSys';
import { uploadUrl } from '@/utils/request';
import { getToken } from '@/utils/auth';
const PhoneRule = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
export default {
data() {
return {
shareDaySettings:[
{
value : 7,
label : '7天'
},
{
value : 15,
label : '15天'
},
{
value : 30,
label : '30天'
}
],
form: {
name: '',
region: '',
@ -245,7 +278,16 @@ export default {
this.storeDetails.shopLogo = url;
},
approve() {
this.$router.push({ path: '/setting/shop/wechat-approve' });
// this.$router.push({ path: '/setting/shop/wechat-approve' });
registerByXs().then(res => {
if (res.code === '') {
this.storeDetails.xsPayId = res.data.xsPayId
this.$message({
message: '认证成功',
type: 'success',
});
}
})
},
//
inputShopPhone() {

Loading…
Cancel
Save