| | |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="业绩设置" name="second"> |
| | | <el-row> |
| | | <el-button size="mini" type="primary">保存</el-button> |
| | | </el-row> |
| | | <el-table |
| | | :data="achieveItems" |
| | | style="width: 100%"> |
| | |
| | | label="收款"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="achieveType" |
| | | 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="commission" |
| | | prop="projPercentage" |
| | | label="提成"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.projPercentage"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="staffId" |
| | | 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="text" size="small">分享</el-button> |
| | | <el-button type="text" size="small">删除</el-button> |
| | | <el-button type="primary" |
| | | 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> |
| | |
| | | data : { |
| | | vipInfo : "", |
| | | order : "", |
| | | activeName : "first", |
| | | activeName : "second", |
| | | circleUrl : "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png", |
| | | userList : [], |
| | | achieveTypeList : [ |
| | | { |
| | | "key" : "现金业绩", |
| | | "value" : "现金业绩" |
| | | },{ |
| | | "key" : "划扣业绩", |
| | | "value" : "划扣业绩" |
| | | }, |
| | | ], |
| | | orderItems : [], |
| | | achieveItems : [], |
| | | flowItems : [], |
| | |
| | | |
| | | }, |
| | | created : function() { |
| | | let _this = this; |
| | | this.vipInfo = /*[[${vipInfo}]]*/ |
| | | this.order = /*[[${order}]]*/ |
| | | this.orderItems = /*[[${orderItems}]]*/ |
| | | this.payMethodItems = /*[[${payMethods}]]*/ |
| | | this.achieveItems = /*[[${achieveList}]]*/ |
| | | this.flowItems = this.order.flows; |
| | | |
| | | var achieveDel = false; |
| | | if (this.achieveItems.length > 1) { |
| | | achieveDel = true; |
| | | } |
| | | this.achieveItems.forEach(item=>{ |
| | | item.achieve = item.consume + item.cardCash; |
| | | item.isShare = achieveDel; |
| | | }) |
| | | this.order.orderTime = moment(this.order.orderTime).format("YYYY-MM-DD HH:mm"); |
| | | |
| | | var arrears = 0; |
| | |
| | | refund += item.amount; |
| | | } |
| | | } |
| | | console.log(this.orderItems); |
| | | 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 : { |
| | | calOrderTotalFormatter(row, column) { |
| | | return row.count * row.price; |
| | | }, |
| | | shareAchieve(index, row) { |
| | | var row2 = JSON.parse(JSON.stringify(row)); |
| | | this.achieveItems.push(row2); |
| | | }, |
| | | delAchieve(index, row) { |
| | | this.achieveItems.splice(index, 1); |
| | | }, |
| | | printf() { |
| | | var id = this.order.id; |
| | |
| | | content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id] |
| | | }); |
| | | }, |
| | | checkAchieveIsDel(items) { |
| | | var orderItems = []; |
| | | for(var i = 0; i < items.length; i++) { |
| | | var item = items[i]; |
| | | } |
| | | }, |
| | | handleClick() { |
| | | |
| | | }, |