|
@@ -18,6 +18,9 @@
|
|
|
@backFunc="jumpRefund"
|
|
|
>
|
|
|
<template slot="customize">
|
|
|
+ <el-button size="medium" type="primary" @click="addsales"
|
|
|
+ >批量添加业务员</el-button
|
|
|
+ >
|
|
|
<el-button size="medium" type="warning" @click="setGoodsOptions(1)" :disabled="$route.query.orderFrom == 6"
|
|
|
>计费单收费</el-button
|
|
|
><el-button size="medium" type="success" @click="setGoodsOptions(2)"
|
|
@@ -30,6 +33,9 @@
|
|
|
<el-button type="text" @click="adds(props.scope.row)"
|
|
|
>订单收费信息</el-button
|
|
|
>
|
|
|
+ <el-button type="text" @click="addsale({ orderGoodsIds:[props.scope.row.orderGoodsId], salesman:''})"
|
|
|
+ >添加业务员</el-button
|
|
|
+ >
|
|
|
<!-- <el-button
|
|
|
type="text"
|
|
|
:disabled="props.scope.row.goodsPayStatus !== 1"
|
|
@@ -361,6 +367,48 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ addsale(postdata){
|
|
|
+ this.$prompt('请输入业务员', '添加业务员', {
|
|
|
+ confirmButtonText: '保存',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then(({ value }) => {
|
|
|
+ if(!value)
|
|
|
+ {
|
|
|
+ this.$message.error("请输入业务员名称");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ postdata.salesman=value;
|
|
|
+ this.$api
|
|
|
+ .ordersavesalesman(postdata)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.search();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error(err.msg);
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '取消输入'
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addsales(){
|
|
|
+ if (this.$refs.tableList.allCheckData.length == 0) {
|
|
|
+ this.$message.error("请勾选需要添加业务员的订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var ids = this.$refs.tableList.allCheckData.map((item) => {
|
|
|
+ return item.orderGoodsId;
|
|
|
+ });
|
|
|
+ if (ids.length==0) {
|
|
|
+ this.$message.error("请勾选待审核的订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var data={ orderGoodsIds:ids, salesman:''};
|
|
|
+ this.addsale(data);
|
|
|
+ },
|
|
|
jumpRefund(row) {
|
|
|
const jump = () => {
|
|
|
this.$router.push({
|