|
@@ -16,7 +16,11 @@
|
|
|
<el-tag prop="status" v-for="(item, index) in salesStatusOptions" v-if="afterSales.salesStatus==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
<el-tag prop="status" v-for="(item, index) in salesStatusOptions" v-if="afterSales.salesStatus==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
</span>
|
|
</span>
|
|
|
<div class="operate-button-container" >
|
|
<div class="operate-button-container" >
|
|
|
- <el-button size="mini" v-hasPermi="['store:storeAfterSales:edit']" v-show="afterSales.salesStatus==0&&afterSales.status===1" @click="addDelivery">编辑物流</el-button>
|
|
|
|
|
|
|
+ <el-button size="mini" v-hasPermi="['store:storeAfterSales:edit']" v-show="afterSales.salesStatus==0&&afterSales.status===1" @click="addDelivery">编辑物流</el-button>
|
|
|
|
|
+ <el-button size="mini" v-hasPermi="['store:storeAfterSales:audit1']" v-show="afterSales.salesStatus==0&&afterSales.status===0" @click="handleAudit1">平台审核</el-button>
|
|
|
|
|
+ <el-button size="mini" v-hasPermi="['store:storeAfterSales:audit2']" v-show="afterSales.salesStatus==0&&afterSales.status===2" @click="handleAudit2">仓库审核</el-button>
|
|
|
|
|
+ <el-button size="mini" v-hasPermi="['store:storeAfterSales:refund']" @click="handleRefund" v-show="afterSales.salesStatus==0&&afterSales.status===3">财务审核</el-button>
|
|
|
|
|
+ <el-button size="mini" v-hasPermi="['store:storeAfterSales:cancel']" @click="cancel" v-show="afterSales.salesStatus==0">撤销</el-button>
|
|
|
<el-button size="mini" @click="showOrder">查看订单</el-button>
|
|
<el-button size="mini" @click="showOrder">查看订单</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -204,7 +208,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {getStoreAfterSales,cancel,refund,audit,updateStoreAfterSales } from "@/api/hisStore/storeAfterSales";
|
|
|
|
|
|
|
+import {getStoreAfterSales,cancel,refund,audit1,audit2,updateStoreAfterSales} from "@/api/hisStore/storeAfterSales";
|
|
|
|
|
|
|
|
import productOrder from "./productOrder";
|
|
import productOrder from "./productOrder";
|
|
|
export default {
|
|
export default {
|
|
@@ -312,53 +316,116 @@ export default {
|
|
|
this.$refs.productOrder.getOrder(orderId);
|
|
this.$refs.productOrder.getOrder(orderId);
|
|
|
}, 500);
|
|
}, 500);
|
|
|
},
|
|
},
|
|
|
- handleAudit(){
|
|
|
|
|
- this.audit.open=true;
|
|
|
|
|
- this.form.serviceType=this.afterSales.serviceType;
|
|
|
|
|
- this.form.salesId=this.afterSales.id;
|
|
|
|
|
- this.form.refundAmount=this.afterSales.refundAmount;
|
|
|
|
|
- },
|
|
|
|
|
- submitAuditForm() {
|
|
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- audit(this.form).then(response => {
|
|
|
|
|
- if (response.code === 200) {
|
|
|
|
|
- this.audit.open = false;
|
|
|
|
|
- this.getStoreAfterSales(this.afterSales.id);
|
|
|
|
|
- this.msgSuccess("操作成功");
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- cancel(){
|
|
|
|
|
|
|
+ handleAudit1(){
|
|
|
var id=this.afterSales.id;
|
|
var id=this.afterSales.id;
|
|
|
- this.$confirm('是否确认取消订单?', "警告", {
|
|
|
|
|
|
|
+ this.$confirm('确定审请通过?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
}).then(function() {
|
|
}).then(function() {
|
|
|
var data={salesId:id}
|
|
var data={salesId:id}
|
|
|
- return cancel(data);
|
|
|
|
|
|
|
+ return audit1(data);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getStoreAfterSales(id);
|
|
this.getStoreAfterSales(id);
|
|
|
this.msgSuccess("操作成功");
|
|
this.msgSuccess("操作成功");
|
|
|
}).catch(function() {});
|
|
}).catch(function() {});
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
- refund(){
|
|
|
|
|
|
|
+ handleAudit2(){
|
|
|
var id=this.afterSales.id;
|
|
var id=this.afterSales.id;
|
|
|
- this.$confirm('是否确认收货,确认后将自动退款给客户', "警告", {
|
|
|
|
|
|
|
+ this.$confirm('确定审请通过?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
}).then(function() {
|
|
}).then(function() {
|
|
|
var data={salesId:id}
|
|
var data={salesId:id}
|
|
|
- return refund(data);
|
|
|
|
|
|
|
+ return audit2(data);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getStoreAfterSales(id);
|
|
this.getStoreAfterSales(id);
|
|
|
this.msgSuccess("操作成功");
|
|
this.msgSuccess("操作成功");
|
|
|
}).catch(function() {});
|
|
}).catch(function() {});
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ handleRefund(){
|
|
|
|
|
+ this.audit.open=true;
|
|
|
|
|
+ this.form.salesId=this.afterSales.id;
|
|
|
|
|
+ this.form.refundAmount=this.afterSales.refundAmount;
|
|
|
|
|
+ },
|
|
|
|
|
+ submitAuditForm() {
|
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ refund(this.form).then(response => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ this.audit.open = false;
|
|
|
|
|
+ this.getStoreAfterSales(this.afterSales.id);
|
|
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ cancel(){
|
|
|
|
|
+ var id=this.afterSales.id;
|
|
|
|
|
+ this.$prompt('是否确定取消订单?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ }).then(({ value }) => {
|
|
|
|
|
+ var data={salesId:id,remark:value};
|
|
|
|
|
+ return cancel(data);
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.getStoreAfterSales(id);
|
|
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
+ // handleAudit(){
|
|
|
|
|
+ // this.audit.open=true;
|
|
|
|
|
+ // this.form.serviceType=this.afterSales.serviceType;
|
|
|
|
|
+ // this.form.salesId=this.afterSales.id;
|
|
|
|
|
+ // this.form.refundAmount=this.afterSales.refundAmount;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // submitAuditForm() {
|
|
|
|
|
+ // this.$refs["form"].validate(valid => {
|
|
|
|
|
+ // if (valid) {
|
|
|
|
|
+ // audit(this.form).then(response => {
|
|
|
|
|
+ // if (response.code === 200) {
|
|
|
|
|
+ // this.audit.open = false;
|
|
|
|
|
+ // this.getStoreAfterSales(this.afterSales.id);
|
|
|
|
|
+ // this.msgSuccess("操作成功");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+ // cancel(){
|
|
|
|
|
+ // var id=this.afterSales.id;
|
|
|
|
|
+ // this.$confirm('是否确认取消订单?', "警告", {
|
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
|
+ // type: "warning"
|
|
|
|
|
+ // }).then(function() {
|
|
|
|
|
+ // var data={salesId:id}
|
|
|
|
|
+ // return cancel(data);
|
|
|
|
|
+ // }).then(() => {
|
|
|
|
|
+ // this.getStoreAfterSales(id);
|
|
|
|
|
+ // this.msgSuccess("操作成功");
|
|
|
|
|
+ // }).catch(function() {});
|
|
|
|
|
+ // },
|
|
|
|
|
+ // refund(){
|
|
|
|
|
+ // var id=this.afterSales.id;
|
|
|
|
|
+ // this.$confirm('是否确认收货,确认后将自动退款给客户', "警告", {
|
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
|
+ // type: "warning"
|
|
|
|
|
+ // }).then(function() {
|
|
|
|
|
+ // var data={salesId:id}
|
|
|
|
|
+ // return refund(data);
|
|
|
|
|
+ // }).then(() => {
|
|
|
|
|
+ // this.getStoreAfterSales(id);
|
|
|
|
|
+ // this.msgSuccess("操作成功");
|
|
|
|
|
+ // }).catch(function() {});
|
|
|
|
|
+ // },
|
|
|
getStoreAfterSales(id){
|
|
getStoreAfterSales(id){
|
|
|
getStoreAfterSales(id).then(response => {
|
|
getStoreAfterSales(id).then(response => {
|
|
|
this.afterSales = response.afterSales;
|
|
this.afterSales = response.afterSales;
|