|
@@ -1,16 +1,42 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
|
|
|
- <el-form-item label="" prop="companyId">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.companyId"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <div style="display:flex">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="phone"
|
|
|
|
+ placeholder="
|
|
|
|
+ 请输入手机号"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="margin-right: 20px;width: 200px;"
|
|
|
|
+ @keyup.enter.native="handleQuery" />
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="getMember">提取会员</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <div>会员信息</div>
|
|
|
|
+ <div class="member-info">
|
|
|
|
+ <div class="row">
|
|
|
|
+ <span>姓名:</span>
|
|
|
|
+ <span>{{ memberInfo.userName }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="row">
|
|
|
|
+ <span>电话:</span>
|
|
|
|
+ <span>{{ memberInfo.phone }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="row">
|
|
|
|
+ <span>卡号:</span>
|
|
|
|
+ <span>{{ memberInfo.cartNo }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="row">
|
|
|
|
+ <span>余额:</span>
|
|
|
|
+ <span>{{ memberInfo.money }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="服务对象" prop="serviceObject">
|
|
|
|
|
|
+ <!-- <el-form-item label="服务对象" prop="serviceObject">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.serviceObject"
|
|
v-model="queryParams.serviceObject"
|
|
placeholder="请输入服务对象"
|
|
placeholder="请输入服务对象"
|
|
@@ -19,12 +45,12 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="服务分类" prop="serviceType">
|
|
|
|
|
|
+ <el-form-item label="服务分类" prop="serviceType">
|
|
<el-select v-model="queryParams.serviceType" placeholder="请选择服务分类" clearable size="small">
|
|
<el-select v-model="queryParams.serviceType" placeholder="请选择服务分类" clearable size="small">
|
|
<el-option label="请选择字典生成" value="" />
|
|
<el-option label="请选择字典生成" value="" />
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="颜色" prop="color">
|
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <!-- <el-form-item label="颜色" prop="color">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.color"
|
|
v-model="queryParams.color"
|
|
placeholder="请输入颜色"
|
|
placeholder="请输入颜色"
|
|
@@ -32,8 +58,8 @@
|
|
size="small"
|
|
size="small"
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="属性" prop="attribute">
|
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <!-- <el-form-item label="属性" prop="attribute">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.attribute"
|
|
v-model="queryParams.attribute"
|
|
placeholder="请输入属性"
|
|
placeholder="请输入属性"
|
|
@@ -41,8 +67,8 @@
|
|
size="small"
|
|
size="small"
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="服务项目" prop="serviceItems">
|
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <!-- <el-form-item label="服务项目" prop="serviceItems">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.serviceItems"
|
|
v-model="queryParams.serviceItems"
|
|
placeholder="请输入服务项目"
|
|
placeholder="请输入服务项目"
|
|
@@ -60,7 +86,7 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="状态" prop="status">
|
|
|
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
|
<el-option label="请选择字典生成" value="" />
|
|
<el-option label="请选择字典生成" value="" />
|
|
</el-select>
|
|
</el-select>
|
|
@@ -75,20 +101,24 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="gmtCreate">
|
|
<el-form-item label="" prop="gmtCreate">
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
|
|
+ <el-date-picker
|
|
v-model="queryParams.gmtCreate"
|
|
v-model="queryParams.gmtCreate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="gmtUpdate">
|
|
<el-form-item label="" prop="gmtUpdate">
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
|
|
+ <el-date-picker
|
|
v-model="queryParams.gmtUpdate"
|
|
v-model="queryParams.gmtUpdate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="userId">
|
|
<el-form-item label="" prop="userId">
|
|
<el-input
|
|
<el-input
|
|
@@ -108,6 +138,20 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <el-form-item label="" prop="gmtCreate">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="queryParams.gmtCreate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ placeholder="选择日期"/>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -117,164 +161,218 @@
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['unimall:salesSlip:add']"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
size="mini"
|
|
size="mini"
|
|
- @click="handleAdd"
|
|
|
|
- v-permission="['unimall:salesSlip:add']"
|
|
|
|
- >新增</el-button>
|
|
|
|
|
|
+ @click="handleAdd">新增服务</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['unimall:salesSlip:edit']"
|
|
|
|
+ :disabled="single"
|
|
type="success"
|
|
type="success"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
size="mini"
|
|
size="mini"
|
|
- :disabled="single"
|
|
|
|
- @click="handleUpdate"
|
|
|
|
- v-permission="['unimall:salesSlip:edit']"
|
|
|
|
- >修改</el-button>
|
|
|
|
|
|
+ @click="handleUpdate">修改</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['unimall:salesSlip:remove']"
|
|
|
|
+ :disabled="multiple"
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
size="mini"
|
|
size="mini"
|
|
- :disabled="multiple"
|
|
|
|
- @click="handleDelete"
|
|
|
|
- v-permission="['unimall:salesSlip:remove']"
|
|
|
|
- >删除</el-button>
|
|
|
|
|
|
+ @click="handleDelete">删除</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['unimall:salesSlip:export']"
|
|
type="warning"
|
|
type="warning"
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
size="mini"
|
|
- @click="handleExport"
|
|
|
|
- v-permission="['unimall:salesSlip:export']"
|
|
|
|
- >导出</el-button>
|
|
|
|
|
|
+ @click="handleExport">导出</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="salesSlipList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" :data="salesSlipList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
- <el-table-column label="" align="center" prop="id" />
|
|
|
|
- <el-table-column label="" align="center" prop="companyId" />
|
|
|
|
|
|
+ <!-- <el-table-column label="" align="center" prop="id" />
|
|
|
|
+ <el-table-column label="" align="center" prop="companyId" /> -->
|
|
|
|
+ <el-table-column label="姓名" align="center" prop="remark1" />
|
|
|
|
+ <el-table-column label="电话" align="center" prop="remark2" />
|
|
<el-table-column label="服务对象" align="center" prop="serviceObject" />
|
|
<el-table-column label="服务对象" align="center" prop="serviceObject" />
|
|
<el-table-column label="服务分类" align="center" prop="serviceType" />
|
|
<el-table-column label="服务分类" align="center" prop="serviceType" />
|
|
<el-table-column label="颜色" align="center" prop="color" />
|
|
<el-table-column label="颜色" align="center" prop="color" />
|
|
<el-table-column label="属性" align="center" prop="attribute" />
|
|
<el-table-column label="属性" align="center" prop="attribute" />
|
|
<el-table-column label="服务项目" align="center" prop="serviceItems" />
|
|
<el-table-column label="服务项目" align="center" prop="serviceItems" />
|
|
<el-table-column label="金额" align="center" prop="money" />
|
|
<el-table-column label="金额" align="center" prop="money" />
|
|
- <el-table-column label="状态" align="center" prop="status" />
|
|
|
|
- <el-table-column label="备注1" align="center" prop="remark1" />
|
|
|
|
- <el-table-column label="备注2" align="center" prop="remark2" />
|
|
|
|
- <el-table-column label="备注3" align="center" prop="remark3" />
|
|
|
|
- <el-table-column label="0:否" align="center" prop="deleteFlag" />
|
|
|
|
- <el-table-column label="" align="center" prop="gmtCreate" width="180">
|
|
|
|
|
|
+ <!-- <el-table-column label="状态" align="center" prop="status" /> -->
|
|
|
|
+
|
|
|
|
+ <!-- <el-table-column label="备注3" align="center" prop="remark3" /> -->
|
|
|
|
+ <!-- <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
|
|
|
|
+ <el-table-column label="时间" align="center" prop="gmtCreate" width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{ parseTime(scope.row.gmtCreate) }}</span>
|
|
<span>{{ parseTime(scope.row.gmtCreate) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="" align="center" prop="gmtUpdate" width="180">
|
|
|
|
|
|
+ <!-- <el-table-column label="" align="center" prop="gmtUpdate" width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{ parseTime(scope.row.gmtUpdate) }}</span>
|
|
<span>{{ parseTime(scope.row.gmtUpdate) }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="" align="center" prop="userId" />
|
|
<el-table-column label="" align="center" prop="userId" />
|
|
- <el-table-column label="" align="center" prop="adminId" />
|
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
|
+ <el-table-column label="" align="center" prop="adminId" /> -->
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['unimall:salesSlip:edit']"
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
- @click="handleUpdate(scope.row)"
|
|
|
|
- v-permission="['unimall:salesSlip:edit']"
|
|
|
|
- >修改</el-button>
|
|
|
|
|
|
+ @click="handleUpdate(scope.row)">修改</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-permission="['unimall:salesSlip:remove']"
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
- v-permission="['unimall:salesSlip:remove']"
|
|
|
|
- >删除</el-button>
|
|
|
|
|
|
+ @click="handleDelete(scope.row)">删除</el-button>
|
|
|
|
+ <el-button size="mini" type="text" @click="print(scope.row)">打印小票</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
-
|
|
|
|
|
|
+
|
|
<pagination
|
|
<pagination
|
|
- v-show="total>0"
|
|
|
|
|
|
+ v-show="total > 0"
|
|
:total="total"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
:limit.sync="queryParams.pageSize"
|
|
- @pagination="getList"
|
|
|
|
- />
|
|
|
|
-
|
|
|
|
|
|
+ @pagination="getList" />
|
|
|
|
+ <el-dialog :visible.sync="isShowPrint" title="打印小票" width="400px">
|
|
|
|
+ <div id="box">
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>姓名:</span>
|
|
|
|
+ <span>{{ printData.remark1 }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>电话:</span>
|
|
|
|
+ <span>{{ printData.remark2 }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>服务对象:</span>
|
|
|
|
+ <span>{{ printData.serviceObject }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>服务分类:</span>
|
|
|
|
+ <span>{{ printData.serviceType }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>颜色:</span>
|
|
|
|
+ <span>{{ printData.color }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>属性:</span>
|
|
|
|
+ <span>{{ printData.attribute }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>服务项目:</span>
|
|
|
|
+ <span>{{ printData.serviceItems }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>金额:</span>
|
|
|
|
+ <span>{{ printData.money }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-row">
|
|
|
|
+ <span>时间:</span>
|
|
|
|
+ <span>{{ parseTime(printData.gmtCreate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button v-print="printObj" type="primary">打印</el-button>
|
|
|
|
+ <el-button @click="isShowPrint=false">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
<!-- 添加或修改销售单对话框 -->
|
|
<!-- 添加或修改销售单对话框 -->
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px">
|
|
|
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="600px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
- <el-form-item label="" prop="companyId">
|
|
|
|
|
|
+ <!-- <el-form-item label="" prop="companyId">
|
|
<el-input v-model="form.companyId" placeholder="请输入" />
|
|
<el-input v-model="form.companyId" placeholder="请输入" />
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <el-form-item label="姓名" prop="remark1">
|
|
|
|
+ <el-input v-model="form.remark1" placeholder="请输入姓名" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="电话" prop="remark2">
|
|
|
|
+ <el-input v-model="form.remark2" placeholder="请输入电话" disabled/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="服务对象" prop="serviceObject">
|
|
<el-form-item label="服务对象" prop="serviceObject">
|
|
- <el-input v-model="form.serviceObject" placeholder="请输入服务对象" />
|
|
|
|
|
|
+ <!-- <el-input v-model="form.serviceObject" placeholder="请输入服务对象" /> -->
|
|
|
|
+ <el-select v-model="form.serviceObject" placeholder="请选择服务对象" style="width:100%">
|
|
|
|
+ <el-option v-for="item in serviceObject" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="服务分类">
|
|
<el-form-item label="服务分类">
|
|
- <el-select v-model="form.serviceType" placeholder="请选择服务分类">
|
|
|
|
- <el-option label="请选择字典生成" value="" />
|
|
|
|
|
|
+ <el-select v-model="form.serviceType" placeholder="请选择服务分类" style="width:100%">
|
|
|
|
+ <el-option v-for="item in serviceType" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="颜色" prop="color">
|
|
<el-form-item label="颜色" prop="color">
|
|
- <el-input v-model="form.color" placeholder="请输入颜色" />
|
|
|
|
|
|
+ <!-- <el-input v-model="form.color" placeholder="请输入颜色" /> -->
|
|
|
|
+ <el-select v-model="form.color" placeholder="请选择服务颜色" style="width:100%">
|
|
|
|
+ <el-option v-for="item in colorList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="属性" prop="attribute">
|
|
<el-form-item label="属性" prop="attribute">
|
|
- <el-input v-model="form.attribute" placeholder="请输入属性" />
|
|
|
|
|
|
+ <!-- <el-input v-model="form.attribute" placeholder="请输入属性" /> -->
|
|
|
|
+ <el-select v-model="form.attribute" placeholder="请选择属性" style="width:100%">
|
|
|
|
+ <el-option v-for="item in attributeList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="服务项目" prop="serviceItems">
|
|
<el-form-item label="服务项目" prop="serviceItems">
|
|
- <el-input v-model="form.serviceItems" placeholder="请输入服务项目" />
|
|
|
|
|
|
+ <!-- <el-input v-model="form.serviceItems" placeholder="请输入服务项目" /> -->
|
|
|
|
+ <el-checkbox-group v-model="checkList" @change="changeCheckbox">
|
|
|
|
+ <el-checkbox v-for="item in serviceList" :label="item.route" :key="item.id"/>
|
|
|
|
+ </el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="金额" prop="money">
|
|
<el-form-item label="金额" prop="money">
|
|
<el-input v-model="form.money" placeholder="请输入金额" />
|
|
<el-input v-model="form.money" placeholder="请输入金额" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="状态">
|
|
|
|
|
|
+ <!-- <el-form-item label="状态">
|
|
<el-radio-group v-model="form.status">
|
|
<el-radio-group v-model="form.status">
|
|
<el-radio label="1">请选择字典生成</el-radio>
|
|
<el-radio label="1">请选择字典生成</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="备注1" prop="remark1">
|
|
|
|
- <el-input v-model="form.remark1" type="textarea" placeholder="请输入内容" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="备注2" prop="remark2">
|
|
|
|
- <el-input v-model="form.remark2" type="textarea" placeholder="请输入内容" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="备注3" prop="remark3">
|
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <!-- <el-form-item label="备注3" prop="remark3">
|
|
<el-input v-model="form.remark3" type="textarea" placeholder="请输入内容" />
|
|
<el-input v-model="form.remark3" type="textarea" placeholder="请输入内容" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="0:否" prop="deleteFlag">
|
|
<el-form-item label="0:否" prop="deleteFlag">
|
|
<el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
|
|
<el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="gmtCreate">
|
|
<el-form-item label="" prop="gmtCreate">
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
|
|
+ <el-date-picker
|
|
v-model="form.gmtCreate"
|
|
v-model="form.gmtCreate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="gmtUpdate">
|
|
<el-form-item label="" prop="gmtUpdate">
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
|
|
|
+ <el-date-picker
|
|
v-model="form.gmtUpdate"
|
|
v-model="form.gmtUpdate"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 200px"
|
|
type="date"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
- placeholder="选择">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ placeholder="选择" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="userId">
|
|
<el-form-item label="" prop="userId">
|
|
<el-input v-model="form.userId" placeholder="请输入" />
|
|
<el-input v-model="form.userId" placeholder="请输入" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="adminId">
|
|
<el-form-item label="" prop="adminId">
|
|
<el-input v-model="form.adminId" placeholder="请输入" />
|
|
<el-input v-model="form.adminId" placeholder="请输入" />
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-form-item> -->
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -285,11 +383,47 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listSalesSlip, getSalesSlip, delSalesSlip, addSalesSlip, updateSalesSlip, exportSalesSlip } from "@/api/unimall/salesSlip";
|
|
|
|
-
|
|
|
|
|
|
+import { listSalesSlip, getSalesSlip, delSalesSlip, addSalesSlip, updateSalesSlip, exportSalesSlip } from '@/api/unimall/salesSlip'
|
|
|
|
+import { listServiceManger } from '@/api/unimall/serviceManger'
|
|
|
|
+import { listManagement } from '@/api/unimall/management'
|
|
|
|
+import { listMoneyHis, getMoneyHis, delMoneyHis, addMoneyHis, updateMoneyHis, exportMoneyHis } from '@/api/unimall/moneyHis'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ isShowPrint: false,
|
|
|
|
+ printData: {},
|
|
|
|
+ printObj: {
|
|
|
|
+ id: 'box'
|
|
|
|
+ // 其他配置项,
|
|
|
|
+ },
|
|
|
|
+ phone: '',
|
|
|
|
+ serviceType: [{
|
|
|
|
+ name: '鞋类清洗',
|
|
|
|
+ id: 1
|
|
|
|
+ }],
|
|
|
|
+ attributeList: [{
|
|
|
|
+ name: '男款',
|
|
|
|
+ id: 1
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '女款',
|
|
|
|
+ id: 2
|
|
|
|
+ }],
|
|
|
|
+ serviceObject: [{
|
|
|
|
+ name: '鞋类',
|
|
|
|
+ id: 1
|
|
|
|
+ }],
|
|
|
|
+ colorList: [{
|
|
|
|
+ name: '黑色',
|
|
|
|
+ id: 1
|
|
|
|
+ }, {
|
|
|
|
+ name: '白色',
|
|
|
|
+ id: 2
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ memberInfo: {},
|
|
|
|
+ checkList: [],
|
|
|
|
+ serviceList: [],
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -303,7 +437,7 @@ export default {
|
|
// 销售单表格数据
|
|
// 销售单表格数据
|
|
salesSlipList: [],
|
|
salesSlipList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
- title: "",
|
|
|
|
|
|
+ title: '',
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
@@ -332,40 +466,77 @@ export default {
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
deleteFlag: [
|
|
deleteFlag: [
|
|
- { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
|
|
|
|
- ], }
|
|
|
|
- };
|
|
|
|
|
|
+ { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getList();
|
|
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ print(row) {
|
|
|
|
+ this.printData = row
|
|
|
|
+ this.isShowPrint = true
|
|
|
|
+ },
|
|
|
|
+ getMember() {
|
|
|
|
+ listManagement({
|
|
|
|
+ phone: this.phone
|
|
|
|
+ }).then(response => {
|
|
|
|
+ if (response.data.data.items.length!=0) {
|
|
|
|
+ this.memberInfo = response.data.data.items[0]
|
|
|
|
+ } else {
|
|
|
|
+ this.msgError('暂无此会员')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ submitMember() {},
|
|
|
|
+ changeCheckbox(e) {
|
|
|
|
+ const that = this
|
|
|
|
+ this.form.money = 0
|
|
|
|
+ console.log(this.checkList)
|
|
|
|
+ debugger
|
|
|
|
+ const getPlace = function(name) {
|
|
|
|
+ for (let k = 0; k<that.serviceList.length; k++) {
|
|
|
|
+ if (name==that.serviceList[k].route) {
|
|
|
|
+ return that.serviceList[k].unitPrice
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i<this.checkList.length; i++) {
|
|
|
|
+ this.form.money+=getPlace(this.checkList[i])
|
|
|
|
+ }
|
|
|
|
+ },
|
|
/** 查询销售单列表 */
|
|
/** 查询销售单列表 */
|
|
getList() {
|
|
getList() {
|
|
- this.loading = true;
|
|
|
|
|
|
+ this.loading = true
|
|
listSalesSlip(this.queryParams).then(response => {
|
|
listSalesSlip(this.queryParams).then(response => {
|
|
this.salesSlipList = response.data.data.items
|
|
this.salesSlipList = response.data.data.items
|
|
this.total = response.data.data.count
|
|
this.total = response.data.data.count
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ listServiceManger().then(response => {
|
|
|
|
+ this.serviceList = response.data.data.items
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
- this.open = false;
|
|
|
|
- this.reset();
|
|
|
|
|
|
+ this.open = false
|
|
|
|
+ this.reset()
|
|
},
|
|
},
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
this.form = {
|
|
this.form = {
|
|
id: undefined,
|
|
id: undefined,
|
|
companyId: undefined,
|
|
companyId: undefined,
|
|
- serviceObject: undefined,
|
|
|
|
- serviceType: undefined,
|
|
|
|
- color: undefined,
|
|
|
|
- attribute: undefined,
|
|
|
|
|
|
+ serviceObject: '鞋类',
|
|
|
|
+ serviceType: '鞋类清洗',
|
|
|
|
+ color: '黑色',
|
|
|
|
+ attribute: '男款',
|
|
serviceItems: undefined,
|
|
serviceItems: undefined,
|
|
- money: undefined,
|
|
|
|
- status: "0",
|
|
|
|
|
|
+ money: 0,
|
|
|
|
+ status: '正常',
|
|
remark1: undefined,
|
|
remark1: undefined,
|
|
remark2: undefined,
|
|
remark2: undefined,
|
|
remark3: undefined,
|
|
remark3: undefined,
|
|
@@ -374,96 +545,133 @@ export default {
|
|
gmtUpdate: undefined,
|
|
gmtUpdate: undefined,
|
|
userId: undefined,
|
|
userId: undefined,
|
|
adminId: undefined
|
|
adminId: undefined
|
|
- };
|
|
|
|
- this.resetForm("form");
|
|
|
|
|
|
+ }
|
|
|
|
+ this.resetForm('form')
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
- this.queryParams.pageNum = 1;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
- this.resetForm("queryForm");
|
|
|
|
- this.handleQuery();
|
|
|
|
|
|
+ this.resetForm('queryForm')
|
|
|
|
+ this.handleQuery()
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|
|
- this.single = selection.length!=1
|
|
|
|
|
|
+ this.single = selection.length != 1
|
|
this.multiple = !selection.length
|
|
this.multiple = !selection.length
|
|
},
|
|
},
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
- handleAdd() {
|
|
|
|
- this.reset();
|
|
|
|
- this.open = true;
|
|
|
|
- this.title = "添加销售单";
|
|
|
|
|
|
+ handleAdd() { debugger
|
|
|
|
+ if (!this.memberInfo.userName) {
|
|
|
|
+ this.msgError('请先提取会员')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.reset()
|
|
|
|
+ this.open = true
|
|
|
|
+ this.title = '添加销售单'
|
|
|
|
+ this.form.remark1 = this.memberInfo.userName
|
|
|
|
+ this.form.remark2 = this.memberInfo.phone
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
- this.reset();
|
|
|
|
|
|
+ this.reset()
|
|
const id = row.id || this.ids.join(',')
|
|
const id = row.id || this.ids.join(',')
|
|
getSalesSlip(id).then(response => {
|
|
getSalesSlip(id).then(response => {
|
|
this.form = response.data.data
|
|
this.form = response.data.data
|
|
- this.open = true;
|
|
|
|
- this.title = "修改销售单";
|
|
|
|
- });
|
|
|
|
|
|
+ this.open = true
|
|
|
|
+ this.title = '修改销售单'
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
- submitForm: function() {
|
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
|
+ submitForm: function () {
|
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != undefined) {
|
|
if (this.form.id != undefined) {
|
|
updateSalesSlip(this.form).then(response => {
|
|
updateSalesSlip(this.form).then(response => {
|
|
if (response.data) {
|
|
if (response.data) {
|
|
- this.msgSuccess("修改成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ this.getList()
|
|
} else {
|
|
} else {
|
|
- this.msgError(response.msg);
|
|
|
|
|
|
+ this.msgError(response.msg)
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
|
|
+ this.form.serviceItems = this.checkList.toString()
|
|
addSalesSlip(this.form).then(response => {
|
|
addSalesSlip(this.form).then(response => {
|
|
- if (response.data) {
|
|
|
|
- this.msgSuccess("新增成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ if (response.data) { debugger
|
|
|
|
+ this.phone = ''
|
|
|
|
+ this.checkList = []
|
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ console.log(this.memberInfo)
|
|
|
|
+ addMoneyHis({
|
|
|
|
+ xiaofeiId: this.memberInfo.id,
|
|
|
|
+ serviceObject: 2,
|
|
|
|
+ money: this.form.money,
|
|
|
|
+ remark1: this.memberInfo.userName,
|
|
|
|
+ remark2: this.memberInfo.phone
|
|
|
|
+
|
|
|
|
+ }).then(response => {
|
|
|
|
+ if (response.data) {
|
|
|
|
+ this.memberInfo = {}
|
|
|
|
+ this.msgSuccess('消费成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ this.getList()
|
|
|
|
+ } else {
|
|
|
|
+ this.msgError(response.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
- this.msgError(response.msg);
|
|
|
|
|
|
+ this.msgError(response.msg)
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids.join(',')
|
|
const ids = row.id || this.ids.join(',')
|
|
- this.$confirm('是否确认删除销售单编号为"' + ids + '"的数据项?', "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return delSalesSlip(ids);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.getList();
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
- }).catch(function() {});
|
|
|
|
|
|
+ this.$confirm('是否确认删除销售单编号为"' + ids + '"的数据项?', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return delSalesSlip(ids)
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList()
|
|
|
|
+ this.msgSuccess('删除成功')
|
|
|
|
+ }).catch(function () { })
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
- const queryParams = this.queryParams;
|
|
|
|
- this.$confirm('是否确认导出所有销售单数据项?', "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return exportSalesSlip(queryParams);
|
|
|
|
- }).then(response => {
|
|
|
|
- this.download(response.data.data);
|
|
|
|
- }).catch(function() {});
|
|
|
|
|
|
+ const queryParams = this.queryParams
|
|
|
|
+ this.$confirm('是否确认导出所有销售单数据项?', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return exportSalesSlip(queryParams)
|
|
|
|
+ }).then(response => {
|
|
|
|
+ this.download(response.data.data)
|
|
|
|
+ }).catch(function () { })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-};
|
|
|
|
-</script>
|
|
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style scoped>
|
|
|
|
+.member-info {
|
|
|
|
+ display: flex;
|
|
|
|
+}
|
|
|
|
+.row{
|
|
|
|
+ margin-right: 40px;
|
|
|
|
+ }
|
|
|
|
+ .print-row{
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
+</style>
|