执行退货

This commit is contained in:
JinLu.Yin 2022-06-13 23:25:24 +08:00
parent f14613f2ca
commit 551a6a0a51
2 changed files with 35 additions and 1 deletions

View File

@ -42,3 +42,11 @@ export function delRtvendor(rtId) {
method: 'delete'
})
}
//执行入库
export function execute(rtId) {
return request({
url: '/mes/wm/rtvendor/' + rtId,
method: 'put'
})
}

View File

@ -112,6 +112,14 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-if="scope.row.status =='CONFIRMED'"
@click="handleExecute(scope.row)"
v-hasPermi="['mes:wm:rtvendor:edit']"
>执行退货</el-button>
<el-button
size="mini"
type="text"
@ -224,7 +232,7 @@
</template>
<script>
import { listRtvendor, getRtvendor, delRtvendor, addRtvendor, updateRtvendor } from "@/api/mes/wm/rtvendor";
import { listRtvendor, getRtvendor, delRtvendor, addRtvendor, updateRtvendor,execute } from "@/api/mes/wm/rtvendor";
import {genCode} from "@/api/system/autocode/rule"
import VendorSelect from "@/components/vendorSelect/single.vue";
import Rtvendorline from "./line.vue"
@ -386,6 +394,24 @@ export default {
}
});
},
//
doconfirm(){
let that = this;
this.$modal.confirm('是否完成供应商退货编制?【完成后将不能更改】').then(function(){
that.form.status = 'CONFIRMED';
that.submitForm();
});
},
//退
handleExecute(row){
const rtIds = row.rtId || this.ids;
this.$modal.confirm('确认执行退货?').then(function() {
return execute(rtIds)//
}).then(() => {
this.getList();
this.$modal.msgSuccess("退货成功");
}).catch(() => {});
},
/** 删除按钮操作 */
handleDelete(row) {
const rtIds = row.rtId || this.ids;