| | |
| | | <LINK rel="Bookmark" href="../images/favicon.ico"> |
| | | <!-- 本框架基本脚本和样式 --> |
| | | <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> |
| | | <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> |
| | | <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> |
| | | |
| | | <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/function/meiduCommon.js}"></script> |
| | | <title></title> |
| | | <style> |
| | |
| | | label { |
| | | width: 100%; |
| | | margin: 5px 0 !important; |
| | | } |
| | | .arrears { |
| | | color: #E6A23C; |
| | | } |
| | | |
| | | .paymethod ul { |
| | | padding: 0; |
| | | margin: 0; |
| | | height: 50px; |
| | | } |
| | | .paymethod ul li { |
| | | padding: 10px; |
| | | margin: 5px; |
| | | list-style:none; |
| | | float: left; |
| | | display: block; |
| | | cursor: pointer; |
| | | position: relative; |
| | | border: white 1px solid; |
| | | } |
| | | .paymethod ul li:hover { |
| | | border: #409EFF 1px solid; |
| | | } |
| | | .paymethod .active { |
| | | border: #409EFF 1px solid; |
| | | } |
| | | .paymethod .active::after { |
| | | content: ''; |
| | | display: block; |
| | | height: 0px; |
| | | width: 0px; |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |
| | | color:#fff; |
| | | /**对号大小*/ |
| | | font-size: 10px; |
| | | line-height: 8px; |
| | | border: 3px solid; |
| | | border-color: transparent #4884ff #4884ff transparent; |
| | | } |
| | | |
| | | .el-dialog__body { |
| | | padding-top: 10px !important; |
| | | } |
| | | </style> |
| | | </head> |
| | |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="订单明细" name="first"> |
| | | <el-row> |
| | | <el-button size="medium" type="primary">退款</el-button> |
| | | <el-button size="mini" type="primary" @click="openPayMoneyDialog" v-if="isRefund">提交退款</el-button> |
| | | <el-button size="mini" type="danger" @click="isRefund = false" v-if="isRefund">取消</el-button> |
| | | <el-button size="mini" type="primary" @click="isRefund = true" v-else>退款</el-button> |
| | | </el-row> |
| | | <el-row v-if="!isRefund"> |
| | | <el-table |
| | | :data="orderItems" |
| | | style="width: 100%"> |
| | |
| | | <el-table-column label="小计" :formatter="calOrderTotalFormatter"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | <el-row v-if="isRefund"> |
| | | <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="280"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="shoppingGoods.goodType" |
| | | label="产品类型"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zkPrice" |
| | | label="单价"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="count" |
| | | label="可退数量"> |
| | | </el-table-column> |
| | | <el-table-column label="退款单价"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.refundPrice"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="退款数量"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.refundCount"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <el-checkbox v-model="isReturnAchieve">退业绩</el-checkbox> |
| | | |
| | | <el-row v-if="isReturnAchieve"> |
| | | <el-table |
| | | :data="achieveItems" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="goodsNo" |
| | | label="产品编号" |
| | | width="100"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="goodsName" |
| | | label="产品名称" |
| | | width="200"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zkTotal" |
| | | label="收款"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="t3" |
| | | label="业绩类型"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="t1" |
| | | label="原业绩"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="projPercentage" |
| | | label="原提成"> |
| | | </el-table-column> |
| | | <el-table-column label="业绩"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.returnAchieve"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="提成"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.returnCommission"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="员工" prop="meiliao"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="业绩设置" name="second"> |
| | | <el-row> |
| | |
| | | prop="achieve" |
| | | label="业绩"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.achieve"></el-input> |
| | | <el-input v-model="scope.row.t1"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | </el-tabs> |
| | | </el-main> |
| | | </el-container> |
| | | |
| | | <el-dialog title="退款" :visible.sync="dialogSettleVisible"> |
| | | <el-row type="flex" align="middle" style="padding: 0 0 10px 0;"> |
| | | <el-col :span="5" style="text-align: center;">退款金额</el-col> |
| | | <el-col :span="10" style="text-align: center; line-height: 50px;"><span style="color: red; font-size: 20px;">¥ {{refundMoney}}</span></el-col> |
| | | </el-row> |
| | | |
| | | <el-row type="flex" align="middle" style="padding: 10px 0;"> |
| | | <el-col :span="5" style="text-align: center;">退款方式</el-col> |
| | | <el-col class="paymethod" :span="15"> |
| | | <el-row> |
| | | <ul> |
| | | <span v-for="(item, index) in payMethods"> |
| | | <el-popover |
| | | :disabled="item.type != '储值卡'" |
| | | placement="bottom" |
| | | trigger="hover" |
| | | @hide="popoverHide(item)"> |
| | | <el-row style="text-align: center;"><span style="padding: 0 0 10px 0; display: block; font-size: 12px;">选择储值卡支付方式</span></el-row> |
| | | <el-tree :data="moneyCards" |
| | | show-checkbox |
| | | default-expand-all |
| | | node-key="id" |
| | | ref="tree" |
| | | check-strictly |
| | | highlight-current |
| | | @check="(click, checked,$item)=>{handleCheckChange(click, checked,$item)}" |
| | | :props="defaultProps"> |
| | | </el-tree> |
| | | <li :class="{active : item.isActive}" slot="reference" @click="payMethodSelect(item, index)">{{item.value}}</li> |
| | | </el-popover> |
| | | </span> |
| | | </ul> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row type="flex" align="middle" style="padding: 10px 0 50px 0;"> |
| | | <el-col :span="5" style="text-align: center;">退款方式</el-col> |
| | | <el-col :span="15"> |
| | | <el-row style="line-height: 50px;" v-for="(item, index) in payMoneys"> |
| | | <el-col :span="6" style="text-align: right; padding-right: 10px; font-size: 12px;">{{item.value}}</el-col> |
| | | <el-col :span="8"><el-input v-model.number="item.money"></el-input></el-col> |
| | | <el-col :span="6" style="margin-left: 10px;" v-if="item.type == '储值卡'">{{item.isGift == 1 ? '赠送余额' : '余额' }}:<span class="arrears">¥ {{item.balance}}</span></el-col> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- <el-row style="text-align: center; margin: 20px 0 10px 0">--> |
| | | <!-- <el-checkbox v-model="printPaper">打印小票</el-checkbox>--> |
| | | <!-- </el-row>--> |
| | | |
| | | <el-row style="text-align: center; margin: 10px 0 0 0"> |
| | | <el-button type="primary" @click="confirmSubmit">确认收款</el-button> |
| | | </el-row> |
| | | </el-dialog> |
| | | </div> |
| | | </body> |
| | | |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/LodopFuncs.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> |
| | | <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script type="text/javascript" th:inline="javascript"> |
| | | //<![CDATA[ |
| | | var app = new Vue({ |
| | |
| | | data : { |
| | | vipInfo : "", |
| | | order : "", |
| | | activeName : "second", |
| | | activeName : "first", |
| | | circleUrl : "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png", |
| | | userList : [], |
| | | achieveTypeList : [ |
| | |
| | | achieveItems : [], |
| | | flowItems : [], |
| | | payMethodItems : [], |
| | | isRefund : false, |
| | | isReturnAchieve : false, |
| | | payMethods: [{ |
| | | value: '现金支付', |
| | | isActive: false, |
| | | type: '现金支付' |
| | | }, { |
| | | value: '微信', |
| | | isActive: false, |
| | | type: '微信' |
| | | }, { |
| | | value: '支付宝', |
| | | isActive: false, |
| | | type: '支付宝' |
| | | }, { |
| | | value: '银行卡', |
| | | isActive: false, |
| | | type: '银行卡' |
| | | }, { |
| | | value: '团购', |
| | | isActive: false, |
| | | type: '团购' |
| | | }, { |
| | | value: '储值卡', |
| | | isActive: false, |
| | | type: '储值卡' |
| | | }, ], |
| | | |
| | | dialogSettleVisible : false, |
| | | moneyCards: [], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'showLable' |
| | | }, |
| | | treeSelect : [], |
| | | payMoneys : [], |
| | | printPaper : true, |
| | | refundMoney : "", |
| | | |
| | | }, |
| | | created : function() { |
| | |
| | | _this.userList = data.rows; |
| | | } |
| | | }); |
| | | _this.getVipMoneyCards(); |
| | | |
| | | }, |
| | | methods : { |
| | | openPayMoneyDialog() { |
| | | let _this = this; |
| | | let items = this.orderItems; |
| | | |
| | | for(var i = 0; i < items.length; i++) { |
| | | let item = items[i] |
| | | if (item.refundPrice && item.refundCount) { |
| | | _this.refundMoney += (item.refundPrice * item.refundCount); |
| | | } else { |
| | | if (item.refundCount > item.count) { |
| | | |
| | | } |
| | | |
| | | _this.$message.error("退款单价或退款数量不能为空"); |
| | | return; |
| | | } |
| | | } |
| | | }, |
| | | calOrderTotalFormatter(row, column) { |
| | | return row.count * row.price; |
| | | }, |
| | | getVipMoneyCards() { |
| | | let _this = this; |
| | | if (_this.order.vipId) { |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data: {vipId: _this.order.vipId}, |
| | | contentType: 'application/x-www-form-urlencoded', |
| | | url: basePath + '/admin/moneyCardUse/getUseMoneyCard', |
| | | callback: function (data) { |
| | | if (data.rows.length > 0) { |
| | | data.rows.forEach(function (item, index, input) { |
| | | item.showLable = item.cardName + "-余额:" + (item.realMoney) |
| | | item.uuid = MTools.uuid(); |
| | | if (item.giftMoney != 0) { |
| | | var children = []; |
| | | var gift = {}; |
| | | gift.id = item.id; |
| | | gift.giftMoney = item.giftMoney; |
| | | gift.showLable = item.cardName + '-赠送金额' + item.giftMoney; |
| | | gift.cardName = item.cardName; |
| | | gift.isGift = 1; |
| | | gift.uuid = MTools.uuid(); |
| | | children.push(gift); |
| | | item.children = children; |
| | | } |
| | | }); |
| | | _this.moneyCards = data.rows; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | payMethodSelect(item, index) { |
| | | let _this = this; |
| | | let payMoneys = _this.payMoneys; |
| | | if (item.type != '储值卡') { |
| | | this.$nextTick(function () { |
| | | if (item.isActive) { |
| | | Vue.set(item,'isActive',false); |
| | | var index = -1; |
| | | for (var i = 0; i < payMoneys.length; i++) { |
| | | let payMoney = payMoneys[i]; |
| | | if (payMoney.value == item.value) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (index > -1) { |
| | | _this.payMoneys.splice(index, 1) |
| | | } |
| | | } else { |
| | | Vue.set(item,'isActive',true); |
| | | _this.payMoneys.push(item); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | popoverHide(item) { |
| | | if(this.treeSelect.length <= 0) { |
| | | Vue.set(item, 'isActive', false) |
| | | } else { |
| | | Vue.set(item, 'isActive', true) |
| | | } |
| | | }, |
| | | handleCheckChange(clickNode, checked) { |
| | | let _this = this; |
| | | |
| | | let nodes = checked.checkedNodes; |
| | | _this.treeSelect = nodes; |
| | | var index = -1; |
| | | // 判断点击节点是否在已展示支付方式中 |
| | | for(var i = 0; i < _this.payMoneys.length; i++) { |
| | | let node = _this.payMoneys[i]; |
| | | if (node.uuid === clickNode.uuid) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // 若点击节点在选中节点中,且已展示支付方式不存在,则添加 |
| | | if (nodes.indexOf(clickNode) > -1 && index === -1) { |
| | | var node = clickNode; |
| | | var item = {}; |
| | | if (node.isGift) { |
| | | item.value = node.cardName; |
| | | item.balance = node.giftMoney; |
| | | item.isGift = 'Y'; |
| | | } else { |
| | | item.value = node.cardName; |
| | | item.balance = node.realMoney; |
| | | item.isGift = 'N'; |
| | | } |
| | | item.type = '储值卡'; |
| | | item.id = node.id; |
| | | item.uuid = clickNode.uuid; |
| | | _this.payMoneys.push(item); |
| | | } |
| | | |
| | | // 若点击节点不存在选中节点中,且已展示支付方式中存在,则移除 |
| | | if (nodes.indexOf(clickNode) === -1 && index > -1) { |
| | | _this.payMoneys.splice(index, 1); |
| | | } |
| | | }, |
| | | closeFrame() { |
| | | parent.layer.close(parent.layer.getFrameIndex(window.name)); |
| | | }, |
| | | confirmSubmit() { |
| | | |
| | | }, |
| | | saveAchieve() { |
| | | let _this = this; |
| | |
| | | }, |
| | | shareAchieve(index, row) { |
| | | var row2 = JSON.parse(JSON.stringify(row)); |
| | | row2.id = null; |
| | | row2.isShare = true; |
| | | this.achieveItems.push(row2); |
| | | }, |
| | | delAchieve(index, row) { |
| | | this.achieveItems.splice(index, 1); |
| | | let _this = this; |
| | | if (row.id) { |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/achieve/del?id=' + row.id, |
| | | callback: function (data) { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | _this.achieveItems.splice(index, 1); |
| | | }, |
| | | checkAchieveIsDel(items) { |
| | | var achieveIds = []; |
| | |
| | | item.isShare = true; |
| | | } |
| | | |
| | | item.achieve = item.consume + item.cardCash; |
| | | item.t1 = item.consume + item.cardCash; |
| | | } |
| | | }, |
| | | printf() { |