| | |
| | | .ibox-content { |
| | | background-color: rgba(240, 242, 245, 1); |
| | | } |
| | | label { |
| | | width: 100%; |
| | | margin: 5px 0 !important; |
| | | } |
| | | </style> |
| | | </head> |
| | | <div class="ibox-content" id="app"> |
| | | <el-container> |
| | | <el-header style="height: 210px; background-color: white; margin: 15px;"> |
| | | <el-row style="line-height: 60px; padding-top: 20px;"> |
| | | <el-col :span="1" style="font-size: 40px; color:#409EFF;"> |
| | | <i class="el-icon-s-order" type="primary"></i> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <h1 style="line-height: 60px; margin: 0 0;">订单号:{{order.orderNo}}</h1> |
| | | </el-col> |
| | | <el-col :span="5" style="float: right; margin-right: 10px;"> |
| | | <el-button type="info" @click="printf">打印</el-button> |
| | | <el-button type="danger" @click="toBack">返回</el-button> |
| | | <el-aside style="width: 300px; background-color: white; padding: 10px;"> |
| | | <el-row style="border-bottom: #E4E7ED 1px solid;"> |
| | | <el-col :span="20" style="padding: 10px;"> |
| | | <el-row type="flex" align="middle"> |
| | | <el-col :span="7"> |
| | | <el-avatar :size="60" :src="circleUrl"></el-avatar> |
| | | </el-col> |
| | | <el-col :span="15" style="margin-left: 10px;"> |
| | | <label>{{vipInfo.vipName}}({{vipInfo.vipLevel == null ? '' : vipInfo.vipLevel.levelName}})</label> |
| | | <label>{{vipInfo.vipNo}}</label> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 20px;"> |
| | | <label>订单号: <span>{{order.orderNo}}</span></label> |
| | | <label>下单顾问: <span>{{order.staffName}}</span></label> |
| | | <label>消费门店: <span>{{order.shopShortName}}</span></label> |
| | | <label>订单时间: <span>{{order.orderTime}}</span></label> |
| | | <label>备 注: <span>{{order.remark}}</span></label> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row class="order-info" type="flex" justify="space-around" style="height: 150px; padding: 30px 30px;"> |
| | | <el-col :span="5"> |
| | | <p>顾问姓名:{{order.staffName}}</p> |
| | | <p>会员姓名:{{order.vipName}}</p> |
| | | <p>会员编号:{{order.vipNo}}</p> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <p>卡支付:{{order.cardPay}}</p> |
| | | <p>现金支付:{{order.cashPay}}</p> |
| | | <p>备注:{{order.remark}}</p> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-col :span="6"> |
| | | <p>欠款总额</p> |
| | | <h2>¥ {{order.arrears}}</h2> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <p>折后总额</p> |
| | | <h2>¥ {{order.zkTotal}}</h2> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <p>订单总额</p> |
| | | <h2>¥ {{order.total}}</h2> |
| | | </el-col> |
| | | <el-row style="padding: 10px; border-bottom: #E4E7ED 1px solid;"> |
| | | <el-col :span="24"> |
| | | <el-row> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <label>总金额</label> |
| | | <label>整单折扣</label> |
| | | <label style="font-size: 14px;">应收金额</label> |
| | | <label>欠款</label> |
| | | <label>已还</label> |
| | | <label>退款</label> |
| | | </el-col> |
| | | <el-col :span="14" style="text-align: right;"> |
| | | <label>¥ {{order.total}}</label> |
| | | <label>¥ {{order.zkTotal - order.total}}</label> |
| | | <label>¥ {{order.zkTotal}}</label> |
| | | <label>¥ {{order.arrears}}</label> |
| | | <label>¥ {{order.repay}}</label> |
| | | <label>¥ {{order.refund}}</label> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </el-header> |
| | | <el-main style="background-color: white; margin: 15px; padding: 20px 30px;"> |
| | | <el-row style="padding: 10px; border-bottom: #E4E7ED 1px solid;"> |
| | | <el-col :span="24"> |
| | | <el-row> |
| | | <h3>收款明细</h3> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <label v-for="(item, index) in payMethodItems">{{item.payMethod}}</label> |
| | | </el-col> |
| | | <el-col :span="14" style="text-align: right;"> |
| | | <label v-for="(item, index) in payMethodItems">¥ {{item.amount}}</label> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row type="flex" justify="center" style="margin: 20px;"> |
| | | <el-button size="medium" type="primary">打印</el-button> |
| | | </el-row> |
| | | </el-aside> |
| | | <el-main style="background-color: white; margin-right: 15px; margin-left: 15px; padding: 20px 30px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="商品" name="goods"> |
| | | <el-table :data="orderData" |
| | | <el-tab-pane label="订单明细" name="first"> |
| | | <el-row> |
| | | <el-button size="medium" type="primary">退款</el-button> |
| | | </el-row> |
| | | <el-table |
| | | :data="orderItems" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="shoppingGoods.code" |
| | | label="产品编号" |
| | | width="100"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="shoppingGoods.name" |
| | | label="商品名称" |
| | | width="300"> |
| | | label="产品名称" |
| | | width="280"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="shoppingGoods.goodType" |
| | | label="产品类型"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="price" |
| | | label="单价" |
| | | width="80"> |
| | | label="单价"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="count" |
| | | label="购买数量"> |
| | | label="数量"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zkPrice" |
| | | label="折后金额"> |
| | | label="折扣单价"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cardPay" |
| | | label="卡付款"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cashPay" |
| | | label="现金付款"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="arrears" |
| | | label="欠款"> |
| | | <el-table-column label="小计" :formatter="calOrderTotalFormatter"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="业绩" name="yj">业绩</el-tab-pane> |
| | | <el-tab-pane label="业绩设置" name="second"> |
| | | <el-row> |
| | | <el-button size="mini" type="primary" @click="saveAchieve">保存</el-button> |
| | | </el-row> |
| | | <el-table |
| | | :data="achieveItems" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="goodsNo" |
| | | label="产品编号" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="goodsName" |
| | | label="产品名称" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zkTotal" |
| | | label="收款"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="t3" |
| | | label="业绩类型"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.t3" placeholder="请选择业绩类型"> |
| | | <el-option |
| | | v-for="item in achieveTypeList" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="achieve" |
| | | label="业绩"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.achieve"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="projPercentage" |
| | | label="提成"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.projPercentage"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="员工"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.beaultId" placeholder="请选择员工"> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.suId" |
| | | :label="item.suName" |
| | | :value="item.suId"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" v-if="scope.row.isShare" |
| | | size="mini" |
| | | @click="delAchieve(scope.$index, scope.row)">删除 |
| | | </el-button> |
| | | <el-tooltip content="分享业绩" placement="top"> |
| | | <el-button @click="shareAchieve(scope.$index, scope.row)" icon="el-icon-share" |
| | | size="mini" type="primary"></el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="交易流水" name="third"> |
| | | <el-table |
| | | :data="flowItems" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="orderNo" |
| | | label="订单号" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowContent" |
| | | label="交易内容" |
| | | width="300"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowType" |
| | | label="交易类型"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="amount" |
| | | label="交易金额"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="payMethod" |
| | | label="支付方式"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowNo" |
| | | label="流水号"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | var app = new Vue({ |
| | | el : "#app", |
| | | data : { |
| | | activeName : "goods", |
| | | vipInfo : "", |
| | | order : "", |
| | | orderItems : "", |
| | | cards : "", |
| | | orderData : [] |
| | | activeName : "second", |
| | | circleUrl : "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png", |
| | | userList : [], |
| | | achieveTypeList : [ |
| | | { |
| | | "key" : "现金业绩", |
| | | "value" : "现金业绩" |
| | | },{ |
| | | "key" : "划扣业绩", |
| | | "value" : "划扣业绩" |
| | | }, |
| | | ], |
| | | orderItems : [], |
| | | achieveItems : [], |
| | | flowItems : [], |
| | | payMethodItems : [], |
| | | |
| | | }, |
| | | created : function() { |
| | | let _this = this; |
| | | this.vipInfo = /*[[${vipInfo}]]*/ |
| | | this.order = /*[[${order}]]*/ |
| | | this.orderItems = /*[[${orderItems}]]*/ |
| | | this.cards = /*[[${cards}]]*/ |
| | | this.payMethodItems = /*[[${payMethods}]]*/ |
| | | this.achieveItems = /*[[${achieveList}]]*/ |
| | | this.flowItems = this.order.flows; |
| | | |
| | | this.orderData = this.order.items; |
| | | this.checkAchieveIsDel(this.achieveItems); |
| | | this.order.orderTime = moment(this.order.orderTime).format("YYYY-MM-DD HH:mm"); |
| | | |
| | | var arrears = 0; |
| | | var refund = 0; |
| | | var repay = 0; |
| | | for(var i = 0; i < this.flowItems.length; i++) { |
| | | var item = this.flowItems[i]; |
| | | if (item.payMethod === '欠款') { |
| | | arrears += item.amount; |
| | | } |
| | | |
| | | if (item.flowType === '还款') { |
| | | repay += item.amount; |
| | | } |
| | | |
| | | if (item.flowType === '退款') { |
| | | refund += item.amount; |
| | | } |
| | | } |
| | | this.order.arrears = arrears; |
| | | this.order.refund = refund; |
| | | this.order.repay = repay; |
| | | |
| | | //获取用户列表 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/shopAll', |
| | | callback: function (data) { |
| | | _this.userList = data.rows; |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | methods : { |
| | | handleClick(tab, event) { |
| | | calOrderTotalFormatter(row, column) { |
| | | return row.count * row.price; |
| | | }, |
| | | saveAchieve() { |
| | | let _this = this; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data: _this.achieveItems, |
| | | contentType: 'application/json', |
| | | url: basePath + '/admin/achieve/add', |
| | | callback: function (data) { |
| | | _this.$message.success(data.info); |
| | | } |
| | | }); |
| | | }, |
| | | shareAchieve(index, row) { |
| | | var row2 = JSON.parse(JSON.stringify(row)); |
| | | this.achieveItems.push(row2); |
| | | }, |
| | | delAchieve(index, row) { |
| | | this.achieveItems.splice(index, 1); |
| | | }, |
| | | checkAchieveIsDel(items) { |
| | | var achieveIds = []; |
| | | for(var i = 0; i < items.length; i++) { |
| | | var item = items[i]; |
| | | if(achieveIds.indexOf(item.orderItemId) === -1) { |
| | | achieveIds.push(item.orderItemId); |
| | | item.isShare = false; |
| | | } else { |
| | | item.isShare = true; |
| | | } |
| | | |
| | | item.achieve = item.consume + item.cardCash; |
| | | } |
| | | }, |
| | | printf() { |
| | | var id = 1; |
| | | var id = this.order.id; |
| | | layer.open({ |
| | | type: 2, |
| | | title: "打印服务单", |
| | | area: ['250px', '550px'], |
| | | maxmin: true, |
| | | content: [basePath + '/admin/redirect/hive/beautySalon/print-service?id=' + id] |
| | | content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id] |
| | | }); |
| | | }, |
| | | handleClick() { |
| | | |
| | | }, |
| | | toBack() { |
| | | MTools.closeForm(); |
| | |
| | | } |
| | | }); |
| | | //]]> |
| | | function print() { |
| | | var id=$("#orderId").val(); |
| | | layer.open({ |
| | | type: 2, |
| | | title: "打印订单", |
| | | area: ['250px', '550px'], |
| | | maxmin: true, |
| | | content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id] |
| | | }); |
| | | }; |
| | | |
| | | |
| | | </script> |
| | | </html> |