|
@@ -18,6 +18,19 @@
|
|
|
@click="getReturns">
|
|
|
销售退货
|
|
|
</el-button>
|
|
|
+ <el-dropdown style="padding: 0 6px;line-height: 0">
|
|
|
+ <el-button v-show="form.id " type="danger"
|
|
|
+ :disabled="!form.id || !(form.status == '待确认'||form.status == '录入'||form.status == '退款请核')" size="small">
|
|
|
+ 售 后<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item @click.native="applySettlement('申请')" :disabled="!(form.status == '待确认'||form.status == '录入')">申请退款
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="revocationRequest('撤销')" :disabled="form.status != '退款请核'">撤销请核
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
<!-- <el-button v-if="form.status != '已发货'" class="el-button--small-yh" style="margin-left: 6px;"
|
|
|
type="success" size="small" :disabled="!form.id || editButton || form.businessSource == '外部销售'"
|
|
|
@click="confirm(1)">确认到货
|
|
@@ -35,12 +48,12 @@
|
|
|
<dic-select v-model="form.customerName" placeholder="客户" key="id" label="cname" res="records"
|
|
|
url="/blade-sales-part/corpsDesc/list?current=1&size=10&corpType=KH" :filterable="true"
|
|
|
:remote="true" dataName="cname" @selectChange="dicChange('customerName', $event)"
|
|
|
- :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0"></dic-select>
|
|
|
+ :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0"></dic-select>
|
|
|
</tempalte>
|
|
|
<template slot-scope="{row,index}" slot="contacts">
|
|
|
<el-select v-model="form.contacts" placeholder="请选择" size="small" style="width:60%" clearable
|
|
|
filterable allow-create default-first-option @change="contactsChange($event)"
|
|
|
- :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0">
|
|
|
+ :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0">
|
|
|
<el-option v-for="item in contactsOption" :key="item.id" :label="item.contacts"
|
|
|
:value="item.contacts" />
|
|
|
</el-select>
|
|
@@ -56,14 +69,14 @@
|
|
|
@saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 434)">
|
|
|
<template slot-scope="{scope,row}" slot="menuLeft">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="small"
|
|
|
- :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售'"
|
|
|
+ :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'"
|
|
|
@click="rowAdd(row, 1)">添加商品</el-button>
|
|
|
<el-button type="success" size="small"
|
|
|
- :disabled="!form.id || editButton || form.status == '已发货' || form.businessSource == '外部销售'"
|
|
|
+ :disabled="!form.id || editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'"
|
|
|
icon="el-icon-bottom" @click="excelDialogfun('名称')">按名称导入
|
|
|
</el-button>
|
|
|
<el-button type="success" size="small"
|
|
|
- :disabled="!form.id || editButton || form.status == '已发货' || form.businessSource == '外部销售'"
|
|
|
+ :disabled="!form.id || editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'"
|
|
|
icon="el-icon-bottom" @click="excelDialogfun('code')">按Code导入
|
|
|
</el-button>
|
|
|
<el-button type="primary" plain size="small" @click="quickCopy">快捷复制</el-button>
|
|
@@ -74,14 +87,14 @@
|
|
|
:disabled="selectionMultilist.length != 1">查看库存</el-button>
|
|
|
</el-popover>
|
|
|
<el-button type="primary" plain size="small"
|
|
|
- :disabled="selectionMultilist.length == 0 || editButton || form.status == '已发货' "
|
|
|
+ :disabled="selectionMultilist.length == 0 || editButton || form.status == '已发货'|| form.status == '已取消'"
|
|
|
@click="allClick('派发销售单')">派发销售单</el-button>
|
|
|
<el-button type="danger" plain size="small" @click="allClick('撤销派发')"
|
|
|
:disabled="selectionMultilist.length == 0 || editButton || form.goodsTotalShipNum == 0">撤销派发</el-button>
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small"
|
|
|
@click="handlePrint">打印</el-button>
|
|
|
<el-button type="danger" plain size="small" @click="batchDelete"
|
|
|
- :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售'">一键删除</el-button>
|
|
|
+ :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'">一键删除</el-button>
|
|
|
</template>
|
|
|
<template slot="goodsId" slot-scope="{ row }">
|
|
|
{{ row.goodsName }}
|
|
@@ -108,7 +121,7 @@
|
|
|
<span v-else>{{ row.dot }}</span>
|
|
|
</template>
|
|
|
<template slot="subTotalMoney" slot-scope="{ row }">{{ row.goodsNum * row.price
|
|
|
- }}</template>
|
|
|
+ }}</template>
|
|
|
<template slot="remarks" slot-scope="{ row }">
|
|
|
<el-input v-if="row.$cellEdit" size="small" v-model="row.remarks"
|
|
|
style="width: 100%"></el-input>
|
|
@@ -116,14 +129,14 @@
|
|
|
</template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
<el-button v-if="!row.$cellEdit" :size="size"
|
|
|
- :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'"
|
|
|
+ :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'|| form.status == '已取消'"
|
|
|
:type="type" icon="el-icon-edit" @click="rowCell(row, index)">编辑
|
|
|
</el-button>
|
|
|
<el-button v-else :size="size" :disabled="editButton || row.sendNum > 0" :type="type"
|
|
|
icon="el-icon-plus" @click="rowSave(row, index)">保存
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size"
|
|
|
- :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'"
|
|
|
+ :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'|| form.status == '已取消'"
|
|
|
:type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -1501,6 +1514,58 @@ export default {
|
|
|
})
|
|
|
this.dialogVisible = false
|
|
|
},
|
|
|
+ //申请退款
|
|
|
+ applySettlement(type) {
|
|
|
+ this.$confirm("您确定申请退款吗?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done()
|
|
|
+ if (valid) {
|
|
|
+ const data = {
|
|
|
+ id: this.form.id,
|
|
|
+ url: '/tirePartsMall/basicData/sharedSales/index',
|
|
|
+ pageStatus: "",
|
|
|
+ pageLabel: "共享销售",
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ checkOrder({ ...data }).then((res) => {
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ this.$message.success('申请退款成功');
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //撤销请核
|
|
|
+ revocationRequest() {
|
|
|
+ this.$confirm("您确定撤回此次申请吗?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeCheckOrder({ ...this.form }).then(res => {
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ this.$message.success('撤回成功')
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
//导入商品弹窗列表查询
|
|
|
onLoad(page, params = {}) {
|
|
|
this.loading = true;
|