Merge branch 'dwb' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
commit
747b408e7b
|
|
@ -4,8 +4,8 @@ ENV = 'development'
|
|||
# VUE_APP_BASE_API = 'http://192.168.2.17:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.42:8000'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.133:8000'
|
||||
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
||||
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
||||
VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.96:8000'
|
||||
VUE_APP_WS_API = 'ws://192.168.2.128:8000'
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ ENV = 'production'
|
|||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
||||
VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.98:8000'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = 'wss://123.56.110.252
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@
|
|||
"babel-jest": "23.6.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.0",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"cache-loader": "^4.1.0",
|
||||
"chalk": "2.4.2",
|
||||
"chokidar": "2.1.5",
|
||||
"compression-webpack-plugin": "5.0.2",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 查询耗材类型
|
||||
* @returns
|
||||
*/
|
||||
export function gettbConsType(params) {
|
||||
return request({
|
||||
url: '/api/tbConsType',
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增耗材类型
|
||||
* @returns
|
||||
*/
|
||||
export function posttbConsType(data) {
|
||||
return request({
|
||||
url: '/api/tbConsType',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 修改耗材类型
|
||||
* @returns
|
||||
*/
|
||||
export function puttbConsType(data) {
|
||||
return request({
|
||||
url: '/api/tbConsType',
|
||||
method: "put",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询耗材信息
|
||||
* @returns
|
||||
*/
|
||||
export function gettbConsInfo(params) {
|
||||
return request({
|
||||
url: '/api/tbConsInfo',
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 耗材入库
|
||||
* @returns
|
||||
*/
|
||||
export function posttbConsInfostockIn(data) {
|
||||
return request({
|
||||
url: '/api/tbConsInfo/stockIn',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 新增耗材信息
|
||||
* @returns
|
||||
*/
|
||||
export function posttbConsInfo(data) {
|
||||
return request({
|
||||
url: '/api/tbConsInfo',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询查询耗材规格信息
|
||||
* @returns
|
||||
*/
|
||||
export function getviewConSku(params) {
|
||||
return request({
|
||||
url: '/api/viewConSku',
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询查询商品规格
|
||||
* @returns
|
||||
*/
|
||||
export function gettbProductSpec(params) {
|
||||
return request({
|
||||
url: '/api/viewProductSkuShop',
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 新增商品规格耗材信息
|
||||
* @returns
|
||||
*/
|
||||
export function posttbProskuCon(data) {
|
||||
return request({
|
||||
url: '/api/tbProskuCon',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 修改商品规格耗材信息状态
|
||||
* @returns
|
||||
*/
|
||||
export function puttbProskuCon(data) {
|
||||
return request({
|
||||
url: '/api/tbProskuCon',
|
||||
method: "put",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除商品规格耗材信息状态
|
||||
* @returns
|
||||
*/
|
||||
export function deletetbProskuCon(data) {
|
||||
return request({
|
||||
url: '/api/tbProskuCon',
|
||||
method: "delete",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询耗材流水信息
|
||||
* @returns
|
||||
*/
|
||||
export function gettbConsInfoFlow(params) {
|
||||
return request({
|
||||
url: '/api/tbConsInfoFlow',
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
|
@ -59,7 +59,14 @@ export function tbShopPurveyorGet(params) {
|
|||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 供应商列表1
|
||||
export function tbShopPurveyorGets(params) {
|
||||
return request({
|
||||
url: `/api/tbShopPurveyorTransact`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 增加供应商
|
||||
* @returns
|
||||
|
|
@ -95,7 +102,14 @@ export function tbShopPurveyorTransactInfo(data) {
|
|||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 付款
|
||||
export function paidAmount(data) {
|
||||
return request({
|
||||
url: `/api/tbShopPurveyorTransact/payTransact`,
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 进货账目汇总(单一供应商)
|
||||
* @returns
|
||||
|
|
@ -149,19 +163,26 @@ export function tbProductStockOperateOutAndOn(data) {
|
|||
*/
|
||||
export function stock(params) {
|
||||
return request({
|
||||
url: `/api/stock`,
|
||||
url: `/api/stock/v2`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
// 库存列表子集列表
|
||||
export function stocks(params) {
|
||||
return request({
|
||||
url: `/api/stock/sku`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @returns
|
||||
*/
|
||||
export function stockdownload(data) {
|
||||
return request({
|
||||
url: "/api/stock/download",
|
||||
url: "/api/stock/download/v2",
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
|
@ -180,7 +201,7 @@ export function stockdoImport(file) {
|
|||
formData.append("file", file);
|
||||
formData.append("shopId", localStorage.getItem("shopId"));
|
||||
return request({
|
||||
url: "/api/stock/doImport",
|
||||
url: "/api/stock/doImport/v2",
|
||||
method: "post",
|
||||
data: formData,
|
||||
Headers: {
|
||||
|
|
@ -203,3 +224,14 @@ export function stockStateChange(params) {
|
|||
}
|
||||
});
|
||||
}
|
||||
// 共享库存
|
||||
export function stockStateChanges(params) {
|
||||
return request({
|
||||
url: `/api/stock/productStatus`,
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
...params
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ import request from "@/utils/request";
|
|||
*/
|
||||
export function tbProduct(params) {
|
||||
return request({
|
||||
url: "/api/tbProduct",
|
||||
url: "/api/tbProduct/list",
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,6 +30,19 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.typeEnum }}
|
||||
</template>
|
||||
</el-table-column> <el-table-column label="是否售罄">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.isPauseSale == 1?'是':'否' }}
|
||||
</template>
|
||||
</el-table-column> <el-table-column label="是否分销">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.isDistribute == 1?'是':'否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="售价">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.lowPrice }}
|
||||
|
|
@ -40,7 +53,7 @@
|
|||
{{ scope.row.realSalesNumber }}/{{ scope.row.stockNumber }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分类" prop="categoryName"></el-table-column>
|
||||
<el-table-column label="分类名称" prop="categoryName"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
|
|
|
|||
|
|
@ -61,11 +61,16 @@
|
|||
<div class="head-container">
|
||||
<el-table :data="tableData.data" v-loading="tableData.loading" v-if="orderType == 1">
|
||||
<el-table-column label="日期" prop="tradeDay"></el-table-column>
|
||||
<el-table-column label="总金额" prop="total">
|
||||
<el-table-column label="营业额" prop="total">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.total }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销售额" prop="total">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.total | totalfilter(scope.row.refund) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信小程序支付" prop="wxLite">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.wxLite }}
|
||||
|
|
@ -81,11 +86,16 @@
|
|||
¥{{ scope.row.cash }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值金额" prop="cash">
|
||||
<el-table-column label="会员支付" prop="deposit">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.deposit }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="充值金额" prop="cash">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.recharge }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="退款金额" prop="cash">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.refund }}
|
||||
|
|
@ -96,6 +106,7 @@
|
|||
<el-table-column label="商品名称" prop="productName"></el-table-column>
|
||||
<el-table-column label="商品分类" prop="cateName"></el-table-column>
|
||||
<el-table-column label="商品描述" prop="productSkuName"></el-table-column>
|
||||
<el-table-column label="单价" prop="price"></el-table-column>
|
||||
<el-table-column label="销量" prop="salesNum"></el-table-column>
|
||||
<el-table-column label="退单量" prop="refNum"></el-table-column>
|
||||
<el-table-column label="销售金额" prop="salesAmount">
|
||||
|
|
@ -151,6 +162,10 @@ export default {
|
|||
filters: {
|
||||
timeFilter(time) {
|
||||
return dayjs(time).format("YYYY-MM-DD HH:mm:ss");
|
||||
},
|
||||
totalfilter(item,d) {
|
||||
let num = item + d
|
||||
return num.toFixed(2)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
<el-form-item label="地址">
|
||||
<el-input type="textarea" v-model="form.address" placeholder="请输入地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标签">
|
||||
<!-- <el-form-item label="标签">
|
||||
<el-input v-model="form.tip" placeholder="请输入标签"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -35,7 +35,7 @@ export default {
|
|||
purveyorName: '',
|
||||
purveyorTelephone: '',
|
||||
address: '',
|
||||
tip: '',
|
||||
// tip: '',
|
||||
remark: '',
|
||||
},
|
||||
rules: {
|
||||
|
|
@ -85,7 +85,7 @@ export default {
|
|||
this.form.purveyorName = ''
|
||||
this.form.purveyorTelephone = ''
|
||||
this.form.address = ''
|
||||
this.form.tip = ''
|
||||
// this.form.tip = ''
|
||||
this.form.remark = ''
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,513 @@
|
|||
<!-- eslint-disable no-empty -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conTypeId" size="small" clearable placeholder="请输入类型id" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conTypeName" size="small" clearable placeholder="请输入类型名称" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conCode" size="small" clearable placeholder="请输入耗材代码" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conName" size="small" clearable placeholder="请输入耗材名称" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-select v-model="query.status" placeholder="请选择商品规格" style="width: 100%;">
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in typeEnums" :key="item.label" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
||||
<el-table-column prop="id" label="ID" width="50px" />
|
||||
<el-table-column label="耗材名称" prop="conName" />
|
||||
<el-table-column label="耗材代码" prop="conCode" />
|
||||
<el-table-column label="类型id" prop="conTypeId" />
|
||||
<el-table-column label="类型名称" prop="conTypeName" />
|
||||
<el-table-column label="单位" prop="conUnit" />
|
||||
<el-table-column label="创建时间" prop="createTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近入库量" prop="lasterInStock" />
|
||||
<el-table-column label="库存数量" prop="stockNumber" />
|
||||
<el-table-column label="剩余库存量" prop="surplusStock" />
|
||||
<!-- <el-table-column label="排序" prop="sort" sortable /> -->
|
||||
<el-table-column label="更新时间" prop="updateTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耗材信息">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="clicksee(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-button type="text" icon="el-icon-rank">排序</el-button> -->
|
||||
<el-button type="text" @click="clickdialogfadd(scope.row)">入库</el-button>
|
||||
<!-- <el-button type="text" icon="el-icon-edit" @click="clickdialogframe('edit', scope.row)">编辑</el-button> -->
|
||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||
slot="reference">删除</el-button>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
layout="total, sizes, prev, pager, next, jumper" @current-change="paginationChange" />
|
||||
</div>
|
||||
<!-- 耗材入库 -->
|
||||
<el-dialog title="耗材入库" :visible.sync="libraryshow">
|
||||
<el-form :inline="true" ref="reflibrary" :model="libraryshowdata" :rules="ruleslibrary" class="demo-form-inline">
|
||||
<el-form-item label="耗材入库数量" prop="stockNumber">
|
||||
<el-input v-model.number="libraryshowdata.stockNumber" type="number" placeholder="请输入单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="libraryshow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="clickdialoglibraryshow('reflibrary')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 修改和增加 -->
|
||||
<el-dialog :title="dialogtitle" :visible.sync="dialogshow">
|
||||
<el-form :inline="true" ref="refruleForm" :model="ruleForm" :rules="rules" class="demo-form-inline">
|
||||
<el-form-item label="单位" prop="conUnit">
|
||||
<el-input v-model="ruleForm.conUnit" placeholder="请输入单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材信息名称" prop="conName">
|
||||
<el-input v-model="ruleForm.conName" placeholder="请输耗材信息名称" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="typedialogshow = true">去选择</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="surplusStock">
|
||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog title="选择类型" :visible.sync="typedialogshow">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<el-input v-model="querytypedialogshowquery.conTypeName" size="small" clearable placeholder="请输入耗材类型名称"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="querytypedialogshowquery.conTypeCode" size="small" clearable placeholder="请输入耗材类型代码"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-select v-model="querytypedialogshowquery.status" placeholder="请选择商品规格" style="width: 100%;">
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in typeEnums" :key="item.label" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" @click="getTableDatatype">查询</el-button>
|
||||
<el-button @click="resetHandletype">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table ref="table" :data="tableDatatype.data" v-loading="tableDatatype.loading" row-key="id">
|
||||
<el-table-column label="耗材类型名称" prop="conTypeName" />
|
||||
<el-table-column label="耗材类型代码" prop="conTypeCode" />
|
||||
<el-table-column label="店铺ID" prop="shopId" />
|
||||
<el-table-column label="状态" prop="status">
|
||||
<template v-slot="scope">
|
||||
<el-tag type="primary" v-if="scope.row.status == '1'">正常</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.status == '0'">禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="tableDatatypetable(scope.row)">确定</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableDatatype.total" :current-page="tableDatatype.page + 1"
|
||||
:page-size="tableDatatype.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="paginationChangetype" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="耗材信息" :visible.sync="clickseetypedialogshow">
|
||||
<el-table ref="table" :data="clickseetableData.data" v-loading="clickseetableData.loading" row-key="id">
|
||||
<el-table-column label="消耗金额" prop="amount" />
|
||||
<el-table-column label="剩余额" prop="balance" />
|
||||
<el-table-column label="业务编码" prop="bizCode" />
|
||||
<el-table-column label="业务说明" prop="bizName" />
|
||||
<el-table-column label="正负号标识" prop="bizType" />
|
||||
<el-table-column label="耗材名称" prop="conName" />
|
||||
<el-table-column label="耗材id" prop="consId" />
|
||||
<el-table-column label="创建时间" prop="createTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="updateTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="clickseetableData.total" :current-page="clickseetableData.page + 1"
|
||||
:page-size="clickseetableData.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="paginationChangetype" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Sortable from 'sortablejs'
|
||||
import dayjs from 'dayjs'
|
||||
import settings from '@/settings'
|
||||
import { upProSort } from '@/api/shop'
|
||||
import { gettbConsType, gettbConsInfo, posttbConsInfo, gettbConsInfoFlow, posttbConsInfostockIn } from '@/api/consumable'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dayjs,
|
||||
query: {
|
||||
conTypeId: '',
|
||||
conTypeName: '',
|
||||
conCode: '',
|
||||
conName: ''
|
||||
},
|
||||
libraryshow: false,//耗材入库显示
|
||||
libraryshowdata: {
|
||||
id: '',
|
||||
stockNumber: ''
|
||||
},
|
||||
ruleslibrary: {
|
||||
stockNumber: [
|
||||
{ required: true, message: '请输入入库数量', trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
categorys: [],
|
||||
typeEnums: [{
|
||||
label: '正常',
|
||||
value: '1'
|
||||
}, {
|
||||
label: '禁用',
|
||||
value: '0'
|
||||
}],
|
||||
dialogshow: false, //弹框显示
|
||||
dialogtitle: '', //文字显示
|
||||
typedialogshow: false,
|
||||
tableData: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
querytypedialogshowquery: {
|
||||
conTypeCode: '',
|
||||
conTypeName: '',
|
||||
status: ''
|
||||
},
|
||||
tableDatatype: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
clickseetypedialogshow: false,
|
||||
clickseetableData: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
ruleForm: {
|
||||
conCode: '',
|
||||
conName: '',
|
||||
conTypeId: '',
|
||||
surplusStock:'',
|
||||
conUnit: '',
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
},
|
||||
rules: {
|
||||
conCode: [
|
||||
{ required: true, message: '请输入耗材信息代码', trigger: 'blur' }
|
||||
],
|
||||
conName: [
|
||||
{ required: true, message: '请输入耗材信息名称', trigger: 'blur' }
|
||||
],
|
||||
conTypeId: [
|
||||
{ required: true, message: '请输入耗材类型id', trigger: 'blur' }
|
||||
],
|
||||
conUnit: [
|
||||
{ required: true, message: '请输入单位', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
this.getTableDatatype()
|
||||
this.$nextTick(() => {
|
||||
this.tableDrag()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//表格拖拽
|
||||
tableDrag() {
|
||||
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')
|
||||
new Sortable(el, {
|
||||
animation: 150,
|
||||
onEnd: async e => {
|
||||
if (e.oldIndex == e.newIndex) return
|
||||
let oid = this.tableData.data[e.oldIndex].id
|
||||
let nid = this.tableData.data[e.newIndex].id
|
||||
let ids = this.tableData.data.map(item => item.id)
|
||||
try {
|
||||
await upProSort({
|
||||
strId: oid,
|
||||
endId: nid,
|
||||
ids: ids
|
||||
})
|
||||
await this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query.conTypeId = ''
|
||||
this.query.conTypeName = ''
|
||||
this.query.conCode = ''
|
||||
this.query.conName = ''
|
||||
this.tableData.page = 0
|
||||
this.getTableData()
|
||||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1
|
||||
this.getTableData()
|
||||
},
|
||||
paginationChangetype(e) {
|
||||
this.tableDatatype.page = e - 1
|
||||
this.getTableDatatype()
|
||||
},
|
||||
// 获取信息
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
const res = await gettbConsInfo({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
conTypeId: this.query.conTypeId,
|
||||
conTypeName: this.query.conTypeName,
|
||||
conCode: this.query.conCode,
|
||||
conName: this.query.conName,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.data = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
// 获取类型
|
||||
async getTableDatatype() {
|
||||
this.tableDatatype.loading = true
|
||||
try {
|
||||
const res = await gettbConsType({
|
||||
page: this.tableDatatype.page,
|
||||
size: this.tableDatatype.size,
|
||||
conTypeCode: this.querytypedialogshowquery.conTypeCode,
|
||||
conTypeName: this.querytypedialogshowquery.conTypeName,
|
||||
status: this.querytypedialogshowquery.status,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableDatatype.loading = false
|
||||
this.tableDatatype.data = res.content
|
||||
this.tableDatatype.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
// 重置查询
|
||||
resetHandletype() {
|
||||
this.querytypedialogshowquery.conTypeName = ''
|
||||
this.querytypedialogshowquery.conTypeCode = ''
|
||||
this.querytypedialogshowquery.status = ''
|
||||
this.tableData.page = 0
|
||||
this.getTableDatatype()
|
||||
},
|
||||
// 选择的类型
|
||||
tableDatatypetable(item) {
|
||||
console.log(item)
|
||||
this.ruleForm.conCode = item.conTypeCode
|
||||
this.ruleForm.conName = item.conTypeName
|
||||
this.ruleForm.conTypeId = item.id
|
||||
this.typedialogshow = false
|
||||
},
|
||||
async clickdialogfadd(item) {
|
||||
this.libraryshow = true
|
||||
this.libraryshowdata.id = item.id
|
||||
},
|
||||
async clickdialoglibraryshow(formName) {
|
||||
this.$refs[formName].validate(async (valid) => {
|
||||
if (valid) {
|
||||
await posttbConsInfostockIn({
|
||||
id: this.libraryshowdata.id,
|
||||
stockNumber: this.libraryshowdata.stockNumber
|
||||
})
|
||||
this.libraryshow = false
|
||||
this.$refs[formName].resetFields()
|
||||
this.getTableData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 弹框修改值 添加 编辑
|
||||
clickdialogframe(type, item) {
|
||||
if (type == 'add') { // 添加
|
||||
this.dialogtitle = '添加'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.refruleForm.resetFields()
|
||||
})
|
||||
} else {
|
||||
this.dialogtitle = '编辑'
|
||||
this.ruleForm.id = item.id
|
||||
this.ruleForm.conCode = item.conCode
|
||||
this.ruleForm.conName = item.conName
|
||||
this.ruleForm.conTypeId = item.conTypeId
|
||||
this.ruleForm.conUnit = item.conUnit
|
||||
}
|
||||
this.dialogshow = true
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.dialogtitle == '编辑') {
|
||||
// await puttbConsType({
|
||||
// id: this.ruleForm.id,
|
||||
// conCode: this.ruleForm.conCode,
|
||||
// conName: this.ruleForm.conName,
|
||||
// conTypeId: this.ruleForm.conTypeId,
|
||||
// conUnit: this.ruleForm.conUnit,
|
||||
// shopId: this.ruleForm.shopId
|
||||
// })
|
||||
// this.dialogshow = false
|
||||
} else {//添加
|
||||
await posttbConsInfo({
|
||||
conCode: this.ruleForm.conCode,
|
||||
conName: this.ruleForm.conName,
|
||||
conTypeId: this.ruleForm.conTypeId,
|
||||
surplusStock:this.ruleForm,surplusStock,
|
||||
conUnit: this.ruleForm.conUnit,
|
||||
shopId: this.ruleForm.shopId
|
||||
})
|
||||
}
|
||||
this.dialogshow = false
|
||||
this.$refs[formName].resetFields()
|
||||
this.getTableData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 删除商品
|
||||
async delTableHandle(ids) {
|
||||
try {
|
||||
await tbProductDelete(ids)
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
//查看查询耗材流水信息
|
||||
async clicksee(item) {
|
||||
console.log(item)
|
||||
this.clickseetypedialogshow = true
|
||||
this.clickseetableData.loading = true
|
||||
try {
|
||||
const res = await gettbConsInfoFlow({
|
||||
page: this.clickseetableData.page,
|
||||
size: this.clickseetableData.size,
|
||||
consId: item.id,
|
||||
conName: item.conName,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.clickseetableData.loading = false
|
||||
this.clickseetableData.data = res.content
|
||||
this.clickseetableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.handle {
|
||||
font-size: 18px;
|
||||
color: #999;
|
||||
|
||||
&:hover {
|
||||
cursor: grab;
|
||||
}
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
display: flex;
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.tag_wrap {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,494 @@
|
|||
<!-- eslint-disable no-empty -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conName" size="small" clearable placeholder="请输入耗材信息名称"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.specSnap" size="small" clearable placeholder="请输入规格名称" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.name" size="small" clearable placeholder="请输入商品名称" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-select v-model="query.status" placeholder="请选择商品规格" style="width: 100%;">
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in typeEnums"
|
||||
:key="item.label" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
||||
<el-table-column prop="id" label="ID" width="50px" />
|
||||
<el-table-column label="耗材信息ID" prop="conInfoId" />
|
||||
<el-table-column label="耗材信息名称" prop="conName" />
|
||||
<el-table-column label="规格名称" prop="specSnap" />
|
||||
<el-table-column label="耗材信息代码" prop="conCode" />
|
||||
<el-table-column label="耗材信息单位" prop="conUnit" />
|
||||
<el-table-column label="商品名称" prop="name" />
|
||||
<el-table-column label="库存" prop="stockNumber" />
|
||||
<el-table-column label="单笔消耗数" prop="surplusStock" />
|
||||
<el-table-column label="创建时间" prop="createTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status">
|
||||
<template v-slot="scope">
|
||||
<el-tag type="primary" v-if="scope.row.status == '1'">启用</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.status == '0'">禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="updateTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-button type="text" icon="el-icon-rank">排序</el-button> -->
|
||||
<el-button type="text" icon="el-icon-edit"
|
||||
@click="clickdialogframe('edit', scope.row)">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||
slot="reference">删除</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
layout="total, sizes, prev, pager, next, jumper" @current-change="paginationChange" />
|
||||
</div>
|
||||
<el-dialog :title="dialogtitle" :visible.sync="dialogshow">
|
||||
<el-form ref="refruleForm" :model="ruleForm" :rules="rules" :inline="true">
|
||||
<el-form-item label="商品规格" prop="productSkuIdname">
|
||||
<el-input v-model="ruleForm.productSkuIdname" placeholder="请输入商品规格" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="tableDataskudialogshow = true">去选择商品规格</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材信息" prop="conInfoIdname">
|
||||
<el-input v-model="ruleForm.conInfoIdname" placeholder="请输入耗材信息" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="informationdialogshow = true">去选择耗材信息</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否禁用" prop="status">
|
||||
<el-switch v-model="ruleForm.status" />
|
||||
</el-form-item>
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改" :visible.sync="dialogshows">
|
||||
<el-form ref="refruleForm" :model="ruleForm" :inline="true">
|
||||
<el-form-item label="是否禁用" prop="status">
|
||||
<el-switch v-model="ruleForm.status" />
|
||||
</el-form-item>
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshows = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog title="耗材信息" :visible.sync="informationdialogshow">
|
||||
<div class="head-container">
|
||||
<el-input v-model="queryinformation.conTypeId" size="small" clearable placeholder="请输入类型id"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatainformation" />
|
||||
<el-input v-model="queryinformation.conTypeName" size="small" clearable placeholder="请输入类型名称"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatainformation" />
|
||||
<el-input v-model="queryinformation.conCode" size="small" clearable placeholder="请输入耗材代码"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatainformation" />
|
||||
<el-input v-model="queryinformation.conName" size="small" clearable placeholder="请输入耗材名称"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatainformation" />
|
||||
<div style="display: flex; justify-content: flex-end;">
|
||||
<el-button style="margin-right: 20px;" type="primary"
|
||||
@click="getTableDatainformation">查询</el-button>
|
||||
<el-button @click="resetHandleinformation">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table ref="table" :data="tableDatainformation.data" v-loading="tableDatainformation.loading"
|
||||
row-key="id">
|
||||
<el-table-column prop="id" label="ID" width="50px" />
|
||||
<el-table-column label="耗材名称" prop="conName" />
|
||||
<el-table-column label="耗材代码" prop="conCode" />
|
||||
<el-table-column label="类型名称" prop="conTypeName" />
|
||||
<el-table-column label="单位" prop="conUnit" />
|
||||
<el-table-column label="库存数量" prop="stockNumber" />
|
||||
<el-table-column label="剩余库存量" prop="surplusStock" />
|
||||
<el-table-column label="" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="tableDatainformationtable(scope.row)">确定</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableDatainformation.total" :current-page="tableDatainformation.page + 1"
|
||||
:page-size="tableDatainformation.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="paginationChangeinformation" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="选择规格" :visible.sync="tableDataskudialogshow" width="700px;">
|
||||
<div class="head-container">
|
||||
<el-input v-model="querytableDatasku.specSnap" size="small" clearable placeholder="请输入规格"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatasku" />
|
||||
<el-input v-model="querytableDatasku.name" size="small" clearable placeholder="请输入商品名称"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatasku" />
|
||||
<el-input v-model="querytableDatasku.shopName" size="small" clearable placeholder="请输入店铺名称"
|
||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatasku" />
|
||||
<div style="display: flex; justify-content: flex-end;">
|
||||
<el-button style="margin-right: 20px;" type="primary" @click="getTableDatasku">查询</el-button>
|
||||
<el-button @click="resetHandlesku">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table ref="table" :data="tableDatasku.data" v-loading="tableDatasku.loading" row-key="id">
|
||||
<el-table-column label="店铺名称" prop="shopName" />
|
||||
<el-table-column label="商品名称" prop="name" />
|
||||
<el-table-column label="规格" prop="specSnap" />
|
||||
<el-table-column label="" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="tableDatatablesku(scope.row)">确定</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableDatasku.total" :current-page="tableDatasku.page + 1"
|
||||
:page-size="tableDatasku.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="Changeinformationsku" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Sortable from 'sortablejs'
|
||||
import dayjs from 'dayjs'
|
||||
import settings from '@/settings'
|
||||
import { upProSort } from '@/api/shop'
|
||||
import { getviewConSku, gettbProductSpec, gettbConsInfo, posttbProskuCon, puttbProskuCon, deletetbProskuCon } from '@/api/consumable'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dayjs,
|
||||
query: {
|
||||
conName: '',
|
||||
specSnap: '',
|
||||
name: '',
|
||||
status: ''
|
||||
},
|
||||
categorys: [],
|
||||
typeEnums: [{
|
||||
label: '正常',
|
||||
value: '1'
|
||||
}, {
|
||||
label: '禁用',
|
||||
value: '0'
|
||||
}],
|
||||
dialogshow: false, //弹框显示
|
||||
dialogshows: false,
|
||||
dialogtitle: '', //文字显示
|
||||
informationdialogshow: false,
|
||||
tableData: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
queryinformation: {
|
||||
conTypeId: '',
|
||||
conTypeName: '',
|
||||
conCode: '',
|
||||
conName: ''
|
||||
},
|
||||
tableDatainformation: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
tableDataskudialogshow: false,
|
||||
querytableDatasku: {
|
||||
specSnap: '',
|
||||
name: '',
|
||||
shopName: ''
|
||||
},
|
||||
tableDatasku: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
ruleForm: {
|
||||
conInfoId: "",
|
||||
conInfoIdname: "",
|
||||
productSkuId: "",
|
||||
productSkuIdname: "",
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
status: false
|
||||
},
|
||||
rules: {
|
||||
conInfoIdname: [
|
||||
{ required: true, message: '请输入耗材信息', trigger: 'blur' }
|
||||
],
|
||||
productSkuIdname: [
|
||||
{ required: true, message: '请输入商品规格', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '选择状态', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
this.getTableDatasku()
|
||||
this.getTableDatainformation()
|
||||
this.$nextTick(() => {
|
||||
this.tableDrag()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//表格拖拽
|
||||
tableDrag() {
|
||||
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')
|
||||
new Sortable(el, {
|
||||
animation: 150,
|
||||
onEnd: async e => {
|
||||
// console.log('拖拽结束===', e);
|
||||
if (e.oldIndex == e.newIndex) return
|
||||
let oid = this.tableData.data[e.oldIndex].id
|
||||
let nid = this.tableData.data[e.newIndex].id
|
||||
let ids = this.tableData.data.map(item => item.id)
|
||||
try {
|
||||
await upProSort({
|
||||
strId: oid,
|
||||
endId: nid,
|
||||
ids: ids
|
||||
})
|
||||
await this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query.conName = ''
|
||||
this.query.specSnap = ''
|
||||
this.query.name = ''
|
||||
this.query.status = ''
|
||||
this.tableData.page = 0
|
||||
this.getTableData()
|
||||
},
|
||||
resetHandlesku() {
|
||||
this.querytableDatasku.specSnap = ''
|
||||
this.querytableDatasku.name = ''
|
||||
this.querytableDatasku.shopName = ''
|
||||
this.tableDatasku.page = 0
|
||||
this.getTableDatasku()
|
||||
},
|
||||
resetHandleinformation() {
|
||||
this.queryinformation.conTypeId = ''
|
||||
this.queryinformation.conTypeName = ''
|
||||
this.queryinformation.conCode = ''
|
||||
this.queryinformation.conName = ''
|
||||
this.tableDatainformation.page = 0
|
||||
this.getTableDatainformation()
|
||||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1
|
||||
this.getTableData()
|
||||
},
|
||||
// 获取商品列表
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
const res = await getviewConSku({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
conName: this.query.conName,
|
||||
specSnap: this.query.specSnap,
|
||||
name: this.query.name,
|
||||
status: this.query.status,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.data = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
paginationChangeinformation(e) {
|
||||
this.tableDatainformation.page = e - 1
|
||||
this.getTableDatainformation()
|
||||
},
|
||||
// 获取信息管理
|
||||
async getTableDatainformation() {
|
||||
this.tableDatainformation.loading = true
|
||||
try {
|
||||
const res = await gettbConsInfo({
|
||||
page: this.tableDatainformation.page,
|
||||
size: this.tableDatainformation.size,
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
conTypeId: this.queryinformation.conTypeId,
|
||||
conTypeName: this.queryinformation.conTypeName,
|
||||
conCode: this.queryinformation.conCode,
|
||||
conName: this.queryinformation.conName,
|
||||
})
|
||||
this.tableDatainformation.loading = false
|
||||
this.tableDatainformation.data = res.content
|
||||
this.tableDatainformation.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
// 耗材信息的信息
|
||||
tableDatainformationtable(item) {
|
||||
this.ruleForm.conInfoId = item.id
|
||||
this.ruleForm.conInfoIdname = item.conName
|
||||
this.informationdialogshow = false
|
||||
},
|
||||
tableDatatablesku(item) {///规格
|
||||
console.log(item)
|
||||
this.ruleForm.productSkuId = item.id
|
||||
this.ruleForm.productSkuIdname = item.name
|
||||
this.tableDataskudialogshow = false
|
||||
},
|
||||
// 获取商品规格
|
||||
async getTableDatasku() {
|
||||
this.tableDatasku.loading = true
|
||||
try {
|
||||
const res = await gettbProductSpec({
|
||||
page: this.tableDatasku.page,
|
||||
size: this.tableDatasku.size,
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
specSnap: this.querytableDatasku.specSnap,
|
||||
name: this.querytableDatasku.name,
|
||||
shopName: this.querytableDatasku.shopName
|
||||
})
|
||||
this.tableDatasku.loading = false
|
||||
this.tableDatasku.data = res.content
|
||||
this.tableDatasku.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
Changeinformationsku(e) {
|
||||
this.tableDatasku.page = e - 1
|
||||
this.getTableDatasku()
|
||||
},
|
||||
// 弹框修改值 添加 编辑
|
||||
clickdialogframe(type, item) {
|
||||
if (type == 'add') { // 添加
|
||||
this.dialogtitle = '添加'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.refruleForm.resetFields()
|
||||
})
|
||||
this.dialogshow = true
|
||||
|
||||
} else {
|
||||
this.dialogshows = true
|
||||
this.dialogtitle = '编辑'
|
||||
this.ruleForm.id = item.id
|
||||
this.ruleForm.status = item.status == 0 ? true : false
|
||||
}
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.dialogtitle == '编辑') {
|
||||
await puttbProskuCon({
|
||||
id: this.ruleForm.id,
|
||||
productSkuId: this.ruleForm.productSkuId,
|
||||
conInfoId: this.ruleForm.conInfoId,
|
||||
shopId: this.ruleForm.shopId,
|
||||
status: this.ruleForm.status ? '0' : '1'
|
||||
})
|
||||
this.dialogshows = false
|
||||
|
||||
this.getTableData()
|
||||
} else {
|
||||
await posttbProskuCon({
|
||||
productSkuId: this.ruleForm.productSkuId,
|
||||
conInfoId: this.ruleForm.conInfoId,
|
||||
shopId: this.ruleForm.shopId,
|
||||
status: this.ruleForm.status ? '0' : '1'
|
||||
})
|
||||
this.dialogshow = false
|
||||
}
|
||||
this.$refs[formName].resetFields()
|
||||
this.getTableData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 删除商品
|
||||
async delTableHandle(ids) {
|
||||
try {
|
||||
await deletetbProskuCon(ids)
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.handle {
|
||||
font-size: 18px;
|
||||
color: #999;
|
||||
|
||||
&:hover {
|
||||
cursor: grab;
|
||||
}
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
display: flex;
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.tag_wrap {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,294 @@
|
|||
<!-- eslint-disable no-empty -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conTypeName" size="small" clearable placeholder="请输入耗材类型名称" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="query.conTypeCode" size="small" clearable placeholder="请输入耗材类型代码" style="width: 100%;"
|
||||
class="filter-item" @keyup.enter.native="getTableData" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-select v-model="query.status" placeholder="请选择商品规格" style="width: 100%;">
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in typeEnums" :key="item.label" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
||||
<el-table-column prop="id" label="ID" width="50px" />
|
||||
<el-table-column label="耗材类型名称" prop="conTypeName" />
|
||||
<el-table-column label="耗材类型代码" prop="conTypeCode" />
|
||||
<el-table-column label="创建时间" prop="createTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="店铺ID" prop="shopId" />
|
||||
<el-table-column label="状态" prop="status">
|
||||
<template v-slot="scope">
|
||||
<el-tag type="primary" v-if="scope.row.status == '1'">正常</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.status == '0'">禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="排序" prop="sort" sortable /> -->
|
||||
<el-table-column label="更新时间" prop="updateTime">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-button type="text" icon="el-icon-rank">排序</el-button> -->
|
||||
<el-button type="text" icon="el-icon-edit" @click="clickdialogframe('edit', scope.row)">编辑</el-button>
|
||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||
slot="reference">删除</el-button>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
layout="total, sizes, prev, pager, next, jumper" @current-change="paginationChange" />
|
||||
</div>
|
||||
<el-dialog :title="dialogtitle" :visible.sync="dialogshow">
|
||||
<el-form ref="refruleForm" :model="ruleForm" :rules="rules">
|
||||
<el-form-item label="耗材类型名称" prop="conTypeName">
|
||||
<el-input v-model="ruleForm.conTypeName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材类型代码" prop="conTypeCode">
|
||||
<el-input v-model="ruleForm.conTypeCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否禁用" prop="status">
|
||||
<el-switch v-model="ruleForm.status" />
|
||||
</el-form-item>
|
||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||
<el-button @click="dialogshow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Sortable from 'sortablejs'
|
||||
import dayjs from 'dayjs'
|
||||
import settings from '@/settings'
|
||||
import { upProSort } from '@/api/shop'
|
||||
import { gettbConsType, posttbConsType, puttbConsType } from '@/api/consumable'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dayjs,
|
||||
query: {
|
||||
conTypeCode: '',
|
||||
conTypeName: '',
|
||||
status: ''
|
||||
},
|
||||
categorys: [],
|
||||
typeEnums: [{
|
||||
label: '正常',
|
||||
value: '1'
|
||||
}, {
|
||||
label: '禁用',
|
||||
value: '0'
|
||||
}],
|
||||
dialogshow: false, //弹框显示
|
||||
dialogtitle: '', //文字显示
|
||||
tableData: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
ruleForm: {
|
||||
conTypeCode: '',
|
||||
conTypeName: '',
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
status: false
|
||||
},
|
||||
rules: {
|
||||
conTypeName: [
|
||||
{ required: true, message: '请输入耗材类型名称', trigger: 'blur' }
|
||||
],
|
||||
conTypeCode: [
|
||||
{ required: true, message: '请输入耗材类型代码', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '选择状态', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
this.$nextTick(() => {
|
||||
this.tableDrag()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//表格拖拽
|
||||
tableDrag() {
|
||||
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')
|
||||
new Sortable(el, {
|
||||
animation: 150,
|
||||
onEnd: async e => {
|
||||
// console.log('拖拽结束===', e);
|
||||
if (e.oldIndex == e.newIndex) return
|
||||
let oid = this.tableData.data[e.oldIndex].id
|
||||
let nid = this.tableData.data[e.newIndex].id
|
||||
let ids = this.tableData.data.map(item => item.id)
|
||||
try {
|
||||
await upProSort({
|
||||
strId: oid,
|
||||
endId: nid,
|
||||
ids: ids
|
||||
})
|
||||
await this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query.conTypeCode = ''
|
||||
this.query.conTypeName = ''
|
||||
this.query.status = ''
|
||||
this.tableData.page = 0
|
||||
this.getTableData()
|
||||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1
|
||||
this.getTableData()
|
||||
},
|
||||
// 获取商品列表
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
const res = await gettbConsType({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
conTypeCode: this.query.conTypeCode,
|
||||
conTypeName: this.query.conTypeName,
|
||||
status: this.query.status,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.data = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
// 弹框修改值 添加 编辑
|
||||
clickdialogframe(type, item) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (type == 'add') { // 添加
|
||||
this.dialogtitle = '添加'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.refruleForm.resetFields()
|
||||
})
|
||||
} else {
|
||||
this.dialogtitle = '编辑'
|
||||
this.ruleForm.id = item.id
|
||||
this.ruleForm.conTypeCode = item.conTypeCode
|
||||
this.ruleForm.conTypeName = item.conTypeName
|
||||
this.ruleForm.status = item.status == 0 ? true : false
|
||||
}
|
||||
this.dialogshow = true
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.dialogtitle == '编辑') {
|
||||
await puttbConsType({
|
||||
id: this.ruleForm.id,
|
||||
conTypeCode: this.ruleForm.conTypeCode,
|
||||
conTypeName: this.ruleForm.conTypeName,
|
||||
shopId: this.ruleForm.shopId,
|
||||
status: this.ruleForm.status ? '0' : '1'
|
||||
})
|
||||
this.dialogshow = false
|
||||
|
||||
this.getTableData()
|
||||
} else {
|
||||
await posttbConsType({
|
||||
conTypeCode: this.ruleForm.conTypeCode,
|
||||
conTypeName: this.ruleForm.conTypeName,
|
||||
shopId: this.ruleForm.shopId,
|
||||
status: this.ruleForm.status ? '0' : '1'
|
||||
})
|
||||
}
|
||||
this.dialogshow = false
|
||||
this.$refs[formName].resetFields()
|
||||
this.getTableData()
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 删除商品
|
||||
async delTableHandle(ids) {
|
||||
try {
|
||||
await tbProductDelete(ids)
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.handle {
|
||||
font-size: 18px;
|
||||
color: #999;
|
||||
|
||||
&:hover {
|
||||
cursor: grab;
|
||||
}
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
display: flex;
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.tag_wrap {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -23,18 +23,25 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-table :data="tableData.list" v-loading="tableData.loading">
|
||||
<el-table-column label="商品信息">
|
||||
<el-table :data="tableData.list" v-loading="tableData.loading" row-key="id" lazy :load="load"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
||||
<el-table-column width="30">
|
||||
<template v-slot="scope">
|
||||
<i class="" v-if="scope.row.hasChildren == false"></i>
|
||||
<!-- <div v-if="scope.row.iskaiguans == 1" style="padding-left: 20px;"></div> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品信息" width="200px">
|
||||
<template v-slot="scope">
|
||||
<div class="shop_info">
|
||||
<el-image :src="scope.row.img" class="cover">
|
||||
<el-image :src="scope.row.img" class="cover" v-if="scope.row.iskaiguans!=1">
|
||||
<div class="img_error" slot="error">
|
||||
<i class="icon el-icon-document-delete"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
<div class="info">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
<div>
|
||||
<div v-if="scope.row.iskaiguans!=1">
|
||||
<el-tag type="primary">{{ scope.row.type }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -42,23 +49,38 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="number">
|
||||
<template v-slot="scope">
|
||||
{{scope.row.specSnap }}
|
||||
<template v-slot="scope" >
|
||||
<div v-if="scope.row.iskaiguans ">
|
||||
{{ scope.row.specSnap }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" prop="number">
|
||||
<template v-slot="scope">
|
||||
{{ `${scope.row.number} ${scope.row.unitName}` }}
|
||||
{{ `${scope.row.stockNumber} ${scope.row.unitName}` }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存开关">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isStock" :active-value="1" :inactive-value="0"
|
||||
v-if="scope.row.hasChildren || scope.row.hasChildren == false"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column label="共享库存">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isDistribute" :active-value="1" :inactive-value="0"
|
||||
v-if="scope.row.hasChildren || scope.row.hasChildren == false"
|
||||
@change="showChanges($event, scope.row, 'proId', 'distribute')"></el-switch>
|
||||
</template>
|
||||
</el-table-column> <el-table-column label="售罄">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isPauseSale" :active-value="1" :inactive-value="0"
|
||||
@change="showChangess($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" size="mini"
|
||||
@click="$refs.invoicingDetail.show(scope.row)">库存记录</el-button>
|
||||
|
|
@ -79,7 +101,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { stock, stockdownload, stockdoImport, stockStateChange } from '@/api/invoicing'
|
||||
import { stock, stockdownload, stockdoImport, stockStateChange, stockStateChanges, stocks } from '@/api/invoicing'
|
||||
import settings from '@/settings'
|
||||
import invoicingDetail from './components/invoicingDetail'
|
||||
import UploadExcel from '@/components/UploadExcel/'
|
||||
|
|
@ -113,6 +135,15 @@ export default {
|
|||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
async load(tree, treeNode, resolve) {
|
||||
const res = await stocks({
|
||||
productId: tree.proId,
|
||||
})
|
||||
res.forEach(ele => ele.iskaiguans = 1)
|
||||
setTimeout(() => {
|
||||
resolve(res)
|
||||
}, 50);
|
||||
},
|
||||
async excelSuccessUpload(file) {
|
||||
console.log(file);
|
||||
try {
|
||||
|
|
@ -121,6 +152,7 @@ export default {
|
|||
const res = await stockdoImport(file)
|
||||
this.uploadLoading = false
|
||||
this.$notify.success('导入成功')
|
||||
this.tableData.list = []
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
this.dialogVisible = false
|
||||
|
|
@ -146,15 +178,48 @@ export default {
|
|||
},
|
||||
// 状态切换
|
||||
async showChange(e, row) {
|
||||
try {
|
||||
await stockStateChange({
|
||||
proId: row.proId,
|
||||
isStock: row.isStock
|
||||
await stockStateChanges({
|
||||
"updateKey": 'stock',
|
||||
"updateValue": row.isStock,
|
||||
"targetId": row.proId,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
// 共享库存
|
||||
async showChanges(e, row, name, value) {
|
||||
await stockStateChanges({
|
||||
"updateKey": value,
|
||||
"updateValue": row.isDistribute,
|
||||
"targetId": row[name],
|
||||
shopId: localStorage.getItem('shopId')
|
||||
|
||||
})
|
||||
this.tableData.list = []
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
},
|
||||
// 售罄
|
||||
async showChangess(e, row) {
|
||||
if (row.hasChildren || row.hasChildren == false) {
|
||||
await stockStateChanges({
|
||||
"updateKey": 'pauseSale',
|
||||
"updateValue": row.isPauseSale,
|
||||
"targetId": row.proId,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
|
||||
})
|
||||
} else {
|
||||
await stockStateChanges({
|
||||
"updateKey": 'pauseSaleSku',
|
||||
"updateValue": row.isPauseSale,
|
||||
"targetId": row.skuId,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
|
|
@ -168,8 +233,18 @@ export default {
|
|||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.list = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
// 多规格数据处理
|
||||
res.content.forEach(element => {
|
||||
if (element.type == '多规格' && element.isDistribute == 0) {
|
||||
element.hasChildren = true
|
||||
} else {
|
||||
element.hasChildren = false
|
||||
|
||||
}
|
||||
});
|
||||
this.tableData.list = res.content
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
@ -177,6 +252,7 @@ export default {
|
|||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1
|
||||
this.tableData.list = []
|
||||
this.getTableData()
|
||||
},
|
||||
// 重置查询
|
||||
|
|
@ -185,6 +261,7 @@ export default {
|
|||
this.query.num = ''
|
||||
this.query.isStock = ''
|
||||
this.tableData.page = 0;
|
||||
this.tableData.list = []
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
|
|
@ -223,3 +300,10 @@ export default {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* flex-direction: row-reverse; */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
</el-row>
|
||||
<el-row v-if="shopTypes[shopTypesActive].value == 'purveyor'">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="应收金额">
|
||||
<el-form-item label="应付金额">
|
||||
<el-input v-model="queryForm.totalAmount" placeholder="请输入应收金额"
|
||||
style="width: 220px;"></el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -89,15 +89,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-input-number v-model="scope.row.guidePrice" :min="0" controls-position="right"
|
||||
@change="e => scope.row.totalAmount = e * scope.row.number"></el-input-number> -->
|
||||
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
||||
@change="e => { modifyPrice(); scope.row.costPrice = e }"></el-input-number>
|
||||
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||
@change="e => scope.row.totalAmount = e * scope.row.guidePrice"></el-input-number>
|
||||
@change="e => { modifyPrice(); scope.row.totalAmount = e }"></el-input-number>
|
||||
<div class="tips">入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -178,7 +178,7 @@ export default {
|
|||
purveyorId: [
|
||||
{
|
||||
required: true,
|
||||
message: ' ',
|
||||
message: '请选择供应商',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
|
|
@ -202,6 +202,13 @@ export default {
|
|||
this.tbShopPurveyorGet()
|
||||
},
|
||||
methods: {
|
||||
modifyPrice() {
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = zong
|
||||
},
|
||||
// 提交
|
||||
submitHandle() {
|
||||
this.$refs.queryForm.validate(async valid => {
|
||||
|
|
|
|||
|
|
@ -89,15 +89,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-input-number v-model="scope.row.guidePrice" :min="0" controls-position="right"
|
||||
@change="e => scope.row.totalAmount = e * scope.row.number"></el-input-number> -->
|
||||
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
||||
@change="e => { modifyPrice(); scope.row.costPrice = e }"></el-input-number>
|
||||
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||
@change="e => scope.row.totalAmount = e * scope.row.guidePrice"></el-input-number>
|
||||
@change="e => { modifyPrice(); scope.row.totalAmount = e }"></el-input-number>
|
||||
<div class="tips">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -202,6 +202,13 @@ export default {
|
|||
this.tbShopPurveyorGet()
|
||||
},
|
||||
methods: {
|
||||
modifyPrice() {
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = zong
|
||||
},
|
||||
// 提交
|
||||
submitHandle() {
|
||||
this.$refs.queryForm.validate(async valid => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,163 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div class="filter_wrap">
|
||||
<el-input v-model="query.name" size="small" clearable placeholder="供应商"
|
||||
@keyup.enter.native="getTableData" style="width: 200px;" />
|
||||
<el-select v-model="query.type" placeholder="选择类型">
|
||||
<el-option label="进货" value="purveyor"></el-option>
|
||||
<el-option label="退货" value="reject"></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="$refs.addSupplier.show()">添加供应商</el-button>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-table :data="tableData.list" v-loading="tableData.loading">
|
||||
<el-table-column label="供应商" prop="purveyorName"></el-table-column>
|
||||
<el-table-column label="联系电话" prop="purveyorTelephone"></el-table-column>
|
||||
<el-table-column label="地址" prop="address"></el-table-column>
|
||||
<!-- <el-table-column label="标签" prop="tip"></el-table-column> -->
|
||||
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||
<el-table-column label="剩余付款金额" prop="waitAmount">
|
||||
<template v-slot="scope">
|
||||
<span class="num" v-if="scope.row.waitAmount > 0">¥{{ scope.row.waitAmount }}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待付款笔数" prop="waitCount">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.waitCount > 0">
|
||||
有<span class="count">{{ scope.row.waitCount }}笔</span>未付
|
||||
</template>
|
||||
<template v-else>-</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="type">
|
||||
<template v-slot="scope">
|
||||
<el-tag :type="scope.row.type == 0 ? 'warning' : 'success'">
|
||||
{{ scope.row.type == 0 ? '待支付' : '已完结' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上笔进货日期" prop="lastTransactAt">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.lastTransactAt && dayjs(scope.row.lastTransactAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" size="mini" round icon="el-icon-edit"
|
||||
@click="$refs.addSupplier.show(scope.row)">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delHandle([scope.row.id])">
|
||||
<el-button type="text" size="mini" round icon="el-icon-delete" slot="reference">
|
||||
删除
|
||||
</el-button>
|
||||
</el-popconfirm>
|
||||
<router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.id } }">
|
||||
<el-button type="text" size="mini">查看详情</el-button>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
@current-change="paginationChange" @size-change="pagesizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
<addSupplier ref="addSupplier" @success="getTableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import { tbShopPurveyorGets, tbShopPurveyor } from '@/api/invoicing'
|
||||
import addSupplier from './components/addSupplier'
|
||||
export default {
|
||||
components: {
|
||||
addSupplier
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dayjs,
|
||||
query: {
|
||||
name: '',
|
||||
type:""
|
||||
},
|
||||
tableData: {
|
||||
page: 0,
|
||||
size: 10,
|
||||
total: 0,
|
||||
sort: 'id',
|
||||
loading: false,
|
||||
list: []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
// 删除
|
||||
async delHandle(ids) {
|
||||
try {
|
||||
await tbShopPurveyor(ids, 'delete')
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: `删除成功`,
|
||||
type: 'success'
|
||||
});
|
||||
this.getTableData()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
const res = await tbShopPurveyorGets({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
sort: this.tableData.sort,
|
||||
purveyorName: this.query.name,
|
||||
type: this.query.type,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.list = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query.name = ''
|
||||
this.query.type=''
|
||||
this.tableData.page = 0;
|
||||
this.getTableData()
|
||||
},
|
||||
pagesizeChange(e) {
|
||||
this.tableData.size = e
|
||||
this.getTableData()
|
||||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.num {
|
||||
color: #F56C6C;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: #409EFF;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -13,9 +13,13 @@
|
|||
</div>
|
||||
<div class="head-container">
|
||||
<div class="filter_wrap">
|
||||
<el-select v-model="query.type" placeholder="付款状态">
|
||||
<el-select v-model="query.status" placeholder="付款状态">
|
||||
<el-option label="待支付" value="0"></el-option>
|
||||
<el-option label="已完结" value="1"></el-option>
|
||||
<el-option label="已付款" value="1"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="query.type" placeholder="选择类型">
|
||||
<el-option label="进货" value="purveyor"></el-option>
|
||||
<el-option label="退货" value="reject"></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
|
|
@ -83,18 +87,24 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="类型" prop="type">
|
||||
<template v-slot="scope">
|
||||
进货单
|
||||
{{ scope.row.type == 'purveyor' ? '进货单' : '退货单' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" prop="totalAmount">
|
||||
<el-table-column label="应付金额" prop="totalAmount">
|
||||
<template v-slot="scope">
|
||||
¥{{ scope.row.totalAmount }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付款金额" prop="totalAmount">
|
||||
<template v-slot="scope">
|
||||
<span style="color: #47B505;">
|
||||
¥{{ scope.row.paidAmount }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待付款金额" prop="waitAmount">
|
||||
<template v-slot="scope">
|
||||
<span class="num" v-if="scope.row.waitAmount > 0">¥{{ scope.row.waitAmount }}</span>
|
||||
<span v-else>-</span>
|
||||
<span class="num" >¥{{ scope.row.waitAmount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status">
|
||||
|
|
@ -110,27 +120,43 @@
|
|||
{{ scope.row.paidAt && dayjs(scope.row.paidAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" width="80">
|
||||
<el-table-column label="操作" width="80" align="center">
|
||||
<template v-slot="scope">
|
||||
<router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.purveyorId } }">
|
||||
<!-- <router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.purveyorId } }">
|
||||
<el-button type="text" size="mini">查看详情</el-button>
|
||||
</router-link>
|
||||
</router-link> -->
|
||||
<el-button type="text" size="mini" round @click="Uppop(scope.row.id)">付款</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
<!-- 付款弹窗组件 -->
|
||||
<el-dialog title="" :visible.sync="dialogTableVisible" width="350px">
|
||||
<el-form>
|
||||
<el-form-item label="付款金额" label-width="80px">
|
||||
<el-input v-model="montey" type="number" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogTableVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="sumbit()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import { tbShopPurveyorTransactInfo, dictDetail, tbShopPurveyorTransactSum } from '@/api/invoicing'
|
||||
import { tbShopPurveyorTransactInfo, paidAmount, dictDetail, tbShopPurveyorTransactSum } from '@/api/invoicing'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 付款当前的id
|
||||
idinfo: "",
|
||||
dayjs,
|
||||
dialogTableVisible: false,
|
||||
timeList: [
|
||||
{
|
||||
label: '全部',
|
||||
|
|
@ -179,9 +205,11 @@ export default {
|
|||
label: '作废'
|
||||
}
|
||||
],
|
||||
montey: null,
|
||||
selectCount: 0,
|
||||
query: {
|
||||
type: '',
|
||||
status: '',
|
||||
time: 'all',
|
||||
createdAt: []
|
||||
},
|
||||
|
|
@ -198,9 +226,29 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
this.tbShopPurveyorTransactSum()
|
||||
},
|
||||
methods: {
|
||||
Uppop(id) {
|
||||
this.dialogTableVisible = true
|
||||
this.idinfo = id
|
||||
},
|
||||
async sumbit() {
|
||||
try {
|
||||
const res = await paidAmount({
|
||||
id: this.idinfo,
|
||||
paidAmount: this.montey,
|
||||
})
|
||||
|
||||
this.$message({ type: 'success', message: '付款成功!' });
|
||||
setTimeout(() => {
|
||||
this.dialogTableVisible = false
|
||||
this.getTableData()
|
||||
}, 1500);
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
|
|
@ -209,13 +257,14 @@ export default {
|
|||
size: this.tableData.size,
|
||||
sort: this.tableData.sort,
|
||||
purveyorId: this.$route.query.purveyorId,
|
||||
status: this.query.type,
|
||||
type: 'purveyor',
|
||||
createdAt: this.query.createdAt
|
||||
status: this.query.status,
|
||||
type: this.query.type,
|
||||
createdAt: this.query.createdAt,
|
||||
})
|
||||
this.tableData.loading = false
|
||||
this.tableData.list = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
this.tbShopPurveyorTransactSum()
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
@ -225,6 +274,8 @@ export default {
|
|||
this.query.time = 'all'
|
||||
this.query.createdAt = []
|
||||
this.tableData.page = 0;
|
||||
this.query.type = ''
|
||||
this.query.status = ''
|
||||
this.getTableData()
|
||||
},
|
||||
// 分页回调
|
||||
|
|
@ -266,7 +317,7 @@ export default {
|
|||
this.selectCount = selection.length
|
||||
},
|
||||
async tbShopPurveyorTransactSum() {
|
||||
this.info = await tbShopPurveyorTransactSum({ purveyorId: this.$route.query.purveyorId, type: 'purveyor' })
|
||||
this.info = await tbShopPurveyorTransactSum({ purveyorId: this.$route.query.purveyorId, type: this.query.type })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -355,3 +406,8 @@ export default {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<!-- <style>
|
||||
/deep/ .el-dialog__body{
|
||||
padding-right: 20px!important;
|
||||
}
|
||||
</style> -->
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="foot">退款:¥-{{ item.refundAmount }}</div>
|
||||
<div class="foot">退款:¥-{{ item.orderAmount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
</div>
|
||||
<div class="head-container">
|
||||
<div class="collect_wrap">
|
||||
<div class="item">
|
||||
<!-- <div class="item">
|
||||
<div class="icon_wrap" style="--bg-color:#C978EE">
|
||||
<i class="icon el-icon-s-goods"></i>
|
||||
</div>
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
<div class="m">¥{{ payCountTotal }}</div>
|
||||
<div class="t">总金额</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="item" v-for="item in payCountList" :key="item.payType">
|
||||
<div class="icon_wrap" style="--bg-color:#fff">
|
||||
<el-image class="img" :src="item.icon"></el-image>
|
||||
|
|
@ -123,10 +123,8 @@
|
|||
{{ item.productName }}
|
||||
<span
|
||||
class="refund"
|
||||
v-if="
|
||||
item.status == 'refunding' || item.status == 'refund'
|
||||
"
|
||||
>(退 - {{ item.num }})</span
|
||||
v-if="item.refundNumber"
|
||||
>(退 - {{ item.refundNumber }})</span
|
||||
>
|
||||
</div>
|
||||
<div class="sku">{{ item.productSkuName }}</div>
|
||||
|
|
@ -141,12 +139,12 @@
|
|||
<div
|
||||
class="refund"
|
||||
v-if="
|
||||
scope.row.status == 'refunding' || scope.row.status == 'refund'
|
||||
scope.row.orderType == 'return'
|
||||
"
|
||||
>
|
||||
退款:-¥{{ scope.row.refundAmount }}
|
||||
退款:-¥{{ scope.row.orderAmount }}
|
||||
</div>
|
||||
<div>¥{{ scope.row.orderAmount }}</div>
|
||||
<div v-else>¥{{ scope.row.orderAmount }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
|
|
|
|||
Loading…
Reference in New Issue