<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
|
<title>退货申请单</title>
|
<script src="../../../js/vue/vue.js"></script>
|
<script src="../../../js/vue/element-ui/lib/index.js"></script>
|
<script src="../../../js/vue/axios/dist/axios.min.js"></script>
|
<script src="../../../js/myelement.js?v=20220615"></script>
|
<script src="../../../js/vue/page.js?v=20220615"></script>
|
|
<link href="../../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet">
|
<link href="../../../css/myelement.css?v=20220425" rel="stylesheet">
|
<link href="../../../css/iconfont.css" rel="stylesheet">
|
<link href="../../../css/page.css?v=20220425" rel="stylesheet">
|
<link href="//at.alicdn.com/t/font_2374495_13ltsxm2eor.css" rel="stylesheet">
|
</head>
|
|
<body>
|
<div id="vbody">
|
<div id="page_root">
|
<div class="topbar">
|
<span>{{title}}</span>
|
|
<div style="float: right; margin-right: 24px;">
|
<el-button-group style="margin-left: 3px;">
|
<el-button v-if="buttons.append" :disabled="buttons.append.disabled" icon="el-icon-plus" @click="addData" >添加</el-button>
|
<el-button v-if="buttons.edit" :disabled="!(tableData.length > 0)" @click="setEditTableData" >{{isEditTableData ? '取消编辑' : '在线编辑'}}</el-button>
|
</el-button-group>
|
<el-button-group style="margin-left: 3px;">
|
<el-button v-if="buttons.submit" :disabled="!(selectedrow.id && isClick && (selectedrow.status == 'input' || selectedrow.status == 'refuse'))" @click="submit_before('status','code','revocation')">提交</el-button>
|
<el-button v-if="buttons.cancel" :disabled="!(selectedrow.id && isClick && (selectedrow.status == 'input' || selectedrow.status == 'refuse' || selectedrow.withdraw))" @click="flow_Cancel('status','code','revocation')">作废</el-button>
|
</el-button-group>
|
<el-button-group style="margin-left: 3px;" v-if="activeName == 'tabOpen'">
|
<!-- <el-button @click="onShowInvoice()" >相关发票</el-button> -->
|
<el-button v-if="buttons.refuse" :disabled="!(selectedrow.id && isClick && !selectedrow.withdraw && (selectedrow.revocation_delivery_status == '未退货' || selectedrow.revocation_delivery_status == '全部退货'))" @click="refuseReturn">撤回</el-button>
|
<el-button v-if="buttons.refuse" :disabled="!(selectedrow.id && isClick && !selectedrow.withdraw && selectedrow.revocation_delivery_status == '部分退货')" @click="refuseReturn">关闭</el-button>
|
</el-button-group>
|
<el-button-group style="margin-left: 3px;">
|
<el-button v-if="activeName == 'tabU8'" :disabled="!(selectedrow.id && isClick)" @click="pushU8">推送退货单</el-button>
|
</el-button-group>
|
</div>
|
</div>
|
<div style="margin-left: 20px;">
|
<template>
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="全部" name="tabAll"></el-tab-pane>
|
<el-tab-pane label="待提交" name="tabInput"></el-tab-pane>
|
<el-tab-pane label="待修改" name="tabRefuse"></el-tab-pane>
|
<el-tab-pane label="审批中" name="tabWorking"></el-tab-pane>
|
<el-tab-pane label="审批完成" name="tabOpen"></el-tab-pane>
|
<el-tab-pane label="未推送数据" name="tabU8"></el-tab-pane>
|
<el-tab-pane label="已撤回/关闭" name="tabWithdraw"></el-tab-pane>
|
</el-tabs>
|
</template>
|
</div>
|
<div class="topbar-line">
|
<div class="query-icon">
|
<i class="iconfont icon-query"></i>
|
</div>
|
<div class="query-bar" style="width: 95%;" >
|
<h-form-filter ref="form1"
|
:form-attr="filterAttr"
|
:table-fields="filterFields"
|
:form-data="filterObj"
|
:isbuttonquery="true"
|
v-on:on-formchange="onQuery"
|
v-on:show-popup="showFilterPopup"
|
v-on:on-query="onQuery"
|
v-on:on-init-query="onInitFilter"
|
v-on:on-edit-query="onEditFilter"
|
>
|
</h-form-filter>
|
</div>
|
</div>
|
|
<div class="versionNo">
|
<h-table
|
v-if="isRefresh"
|
ref="table1"
|
:table-fields="tableFields"
|
:table-data="tableData"
|
:is-edit-table-data="isEditTableData"
|
:tableloading="tableloading"
|
:pagesize="pagesize"
|
:pagenum="pagenum"
|
:total="total"
|
:table-height="tableHeight"
|
:is-highlight-row="true"
|
v-on:get-data="getData"
|
v-on:edit-data="editData"
|
v-on:del-data="delData"
|
v-on:row-click="rowClick"
|
v-on:cell-click="cellClick"
|
>
|
</h-table>
|
</div>
|
|
</div>
|
|
<div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 100vh;z-index:9999">
|
<div class="spinner">
|
<div class="cube1"></div>
|
<div class="cube2"></div>
|
</div>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
var setting = getSetting("return_list");
|
var initlized = false;
|
|
new ListVue({
|
el: "#vbody",
|
data: {
|
dataname: "revocationOrder",
|
tabaleFieldsName: "returnBill_",
|
filterFieldsName: "return_",
|
dataRequest: [
|
"orderType",
|
"orderStatus"
|
],
|
tabs:{},
|
pageAttr: {
|
heightType: "page"
|
},
|
activeName:"tabAll",
|
dataRequest: [
|
{
|
isClientMode: false,
|
code: "code",
|
label: "name",
|
name: "delivery_part_name",
|
dataname: "deliveryOrganization",//请求接口
|
},
|
],
|
title: "退货申请单",
|
isClick:false,
|
filterAttr: {
|
columnnumber: 4,
|
labelwidth: "150px",
|
labelposition: "right",
|
size: "medium",
|
border: "3px solid #c6c6c600"
|
},
|
|
orderby: "update_time desc,biz_date desc,code desc",
|
orderStatus: [],
|
filter_o:""
|
},
|
created() {
|
this.pageCode = "A0-5";
|
this.getResoures();
|
this.getMeResoures();
|
let roleList = window.top.userinfo.user.roleList;
|
let isQGXD = false;
|
roleList.map(e=>{
|
if(e.code == 'qgdj') {//全国单据
|
isQGXD = true;
|
}
|
})
|
if(!isQGXD)
|
this.filter_o = this.filter_ = " and (revocation_order.create_operate_code='" + localStorage.emp_code + "' or operate_emp_code='" + localStorage.emp_code + "')";
|
},
|
|
mounted() {
|
let me = this;
|
if (this.dataRequest.length) {
|
var result = {};
|
this.loadRequestData(this.dataRequest, result, function(data) {
|
me.dataRequestObj = data;
|
if (me.filterFields.length) {
|
var formFields_part_ = clone(me.filterFields);
|
formFields_part_.map(e=>{
|
if(e.field == "delivery_part_name") {
|
e.options = me.dataRequestObj.delivery_part_name;
|
}
|
});
|
|
me.filterFields = formFields_part_;
|
}
|
});
|
}
|
this.initData();
|
this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
|
hideLoading();
|
});
|
},
|
|
methods:{
|
initData() {
|
if (initlized) { return; }
|
initlized = true;
|
|
this.onQuery();
|
},
|
|
onServerInitData(data) {
|
var me = this.data;
|
|
me.tableFields = data.tableFields;
|
me.filterFields = data.filterFields;
|
me.orderStatus = data.orderStatus;
|
|
if(me.filterFields.length > 0) {
|
for(var i=0; i < me.filterFields.length; i++) {
|
let fieldObj_ = me.filterFields[i];
|
|
me.filterFieldsObj[fieldObj_.field] = fieldObj_;
|
}
|
}
|
if(me.tableFields.length > 0) {
|
for(var i=0; i < me.tableFields.length; i++) {
|
let fieldObj_ = me.tableFields[i];
|
|
me.tableFieldsObj[fieldObj_.field] = fieldObj_;
|
}
|
}
|
},
|
|
onAddData(config) {
|
var me = this;
|
|
config.combine({
|
totab: true,
|
icon: "icon-product",
|
text: "新增退货单",
|
id: "return_edit",
|
url: "../logistics/return/return_edit.html",
|
sceneCode: "add",
|
data: {},
|
delta: {type :"return"},
|
|
});
|
|
return true;
|
},
|
|
onEditData(config, scope) {
|
|
var me = this;
|
var row = scope.row;
|
|
//1. empty row
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请选择要编辑的数据'
|
});
|
return false;
|
}
|
let user_code = window.top.userinfo.employee.code
|
if(row.create_operate_code != user_code && row.operate_emp_code != user_code) {
|
Root.message({
|
type: 'warning',
|
message: '无编辑权限'
|
});
|
return false;
|
}
|
//2. not input
|
if (!("input" == row.status || "refuse" == row.status)) {
|
Root.message({
|
type: 'warning',
|
message: "当前数据不是输入状态"
|
})
|
return false;
|
}
|
|
//3. popup
|
config.combine({
|
totab: true,
|
icon: "icon-product",
|
text: "修改退货单",
|
id: "return_edit" + row.id,
|
url: "../logistics/return/return_edit.html",
|
sceneCode: "edit",
|
data: row,
|
delta: {type:"return"},
|
});
|
|
return true;
|
},
|
|
onShowInvoice(scope) {
|
var me = this;
|
let row = this.selectedrow;
|
if (!row.code) {
|
Root.message({
|
type: 'warning',
|
message: '请先选择一条数据'
|
})
|
return;
|
}
|
else {
|
Root.popupParames = {
|
width: "1080px",
|
//height: "580px",
|
url: "../tool/popup_invoice.html",
|
callback: function(obj, callback) {
|
me.onQuery();
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
Root.popupParames.data = row;
|
Root.showPopup(Root.popupParames);
|
}
|
},
|
onShowApproval() {
|
var me = this;
|
var row = this.selectedrow;
|
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请先选择一条数据'
|
});
|
return false;
|
}
|
else {
|
let param = {
|
isClientMode: false,
|
flowId:row.flow_id
|
}
|
|
Server.call("root/order/getHistoryTask/", param, function(result) {
|
console.log(result);
|
if (result && result.data) {
|
|
Root.popupParames = {
|
width: "900px",
|
height:"700px",
|
url: "../approval/ApprovalList.html",
|
data: result.data,
|
};
|
|
Root.popupParames.disabled = true;
|
Root.showPopup(Root.popupParames);
|
}
|
|
});
|
|
}
|
},
|
rowClick: function(obj) {
|
this.selectedrow = obj.row;
|
if (obj.row.create_operate_code != localStorage.emp_code && obj.row.operate_emp_code != localStorage.emp_code) {
|
this.isClick = false;
|
}else {
|
this.isClick = true;
|
}
|
if (this.onRowClick) {
|
this.onRowClick.call(this, obj);
|
return;
|
}
|
},
|
onCellClick(config, obj) {
|
let me = this;
|
var clickContext = this.selectCellField.clickContext;
|
if(this.selectCellField.field == "status" ){
|
clickContext.url = "";
|
if(obj.row.flow_id){
|
clickContext.url = "../approval/ApprovalList.html";
|
clickContext.delta = {
|
flow_id: obj.row.flow_id,
|
}
|
clickContext.width = "75vw";
|
clickContext.height = "65vh";
|
clickContext.hide_close = true;
|
}
|
}
|
if(this.selectCellField.field == "file_name" ){
|
if (!obj.row.file_id) {
|
Root.message({
|
type: 'warning',
|
message: '没有附件文件'
|
});
|
return
|
}
|
////////////
|
let fileid = clone(obj.row.file_id);
|
let fileName = clone(obj.row.file_name);
|
let index1 = fileName.lastIndexOf(".");
|
let index2 = fileName.length;
|
let suffix = fileName.substring(index1, index2).toLowerCase(); //后缀名
|
if (suffix == ".png" || suffix == ".jpg") {
|
var fileids_ = [];
|
fileids_.push(fileid)
|
clickContext.data = {
|
filetype: "img",
|
fileids: fileids_
|
};
|
clickContext.width = "75vw";
|
clickContext.height = "65vh";
|
clickContext.hide_close = true;
|
clickContext.url = "../tool/popup_file.html";
|
|
}
|
else if (suffix == ".pdf") {
|
var row = {
|
fileid: fileid,
|
filename: fileName
|
}
|
|
var config = {
|
totab: true,
|
icon: "icon-product",
|
text: "附件预览",
|
id: "pdf_" + fileid,
|
url: "../tool/popup_file_pdf.html",
|
data: row,
|
delta: {},
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
this.doPopupByPublic(config);
|
return false;
|
}
|
}
|
if(this.selectCellField.field == "code"){
|
config.combine({
|
//hide_close: clickContext.hide_close,
|
totab:true,
|
url: clickContext.url,
|
text:"退货单查看",
|
//title:"销售订单查看",
|
//width: clickContext.width,
|
//height: clickContext.height,
|
sceneCode: clickContext.sceneCode,
|
data: obj.row,
|
delta: clickContext.delta ? clickContext.delta : {},
|
})
|
return true;
|
}
|
if (clickContext && clickContext.type == "popup" && clickContext.url != "") {
|
config.combine({
|
url: clickContext.url,
|
hide_close: clickContext.hide_close,
|
sceneCode: clickContext.sceneCode,
|
data: clickContext.data?clickContext.data:obj.row,
|
delta: clickContext.delta ? clickContext.delta : {},
|
width: clickContext.width,
|
height:clickContext.height,
|
})
|
}
|
else {
|
return false;
|
}
|
|
return true;
|
},
|
onApproveData(config, code) {
|
var me = this;
|
var row = this.selectedrow;
|
|
//1. empty row
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请选择要审批的数据'
|
});
|
return false;
|
}
|
if ("working" != row.status) {
|
Root.message({
|
type: 'warning',
|
message: '当前状态不可审批'
|
});
|
return false;
|
}
|
//3. popup
|
config.combine({
|
|
totab: true,
|
icon: "icon-product",
|
text: "审批退货单",
|
id: "sorder_edit",
|
url: "../logistics/return/return_edit.html",
|
sceneCode: "approval",
|
data: row,
|
delta: me.dataname,
|
|
});
|
return true;
|
|
},
|
handleClick(tab, event){
|
this.pagenum = 1;
|
this.filter_ = this.filter_o + " and revocation_order.status = '" + tab.name.substring(3).toLowerCase() + "' and (revocation_order.withdraw = 0 or revocation_order.withdraw is null) "
|
if(tab.name == "tabAll")
|
this.filter_ = this.filter_o
|
else if(tab.name == "tabWithdraw") {
|
this.filter_ = this.filter_o + " and (revocation_order.withdraw = '1' or recall=1) "
|
}else if(tab.name == 'tabOpen') {
|
this.filter_ = this.filter_o + " and revocation_order.status = 'open' and revocation_order.sync = 1 and revocation_order.withdraw <> 1"
|
}else if(tab.name == 'tabU8') {
|
this.filter_ = this.filter_o + " and revocation_order.status = 'open' and (revocation_order.sync = 0 or revocation_order.sync is null)"
|
}
|
this.doQuery();
|
},
|
refuseReturn() {
|
let me = this;
|
/* if(this.selectedrow.sap) {
|
Root.message({
|
type:"warning",
|
message:"U8退货申请单才可以撤回"
|
})
|
} */
|
Root.confirm('确定撤回订单-' + this.selectedrow.code + '-吗?', '撤回提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
document.getElementById('page_loading').style.display = "block";
|
let url = window.top.RootSetting.url_stock + "order/revocationOrderReturn/" + this.selectedrow.id;
|
axios.get(url).then(result=>{
|
if(result.data && result.data.success) {
|
Root.message({
|
type:"success",
|
message:"撤回成功"
|
})
|
me.doQuery();
|
document.getElementById('page_loading').style.display = "none";
|
}else {
|
Root.message({
|
type:"warning",
|
message:result.data.message
|
})
|
document.getElementById('page_loading').style.display = "none";
|
}
|
}).catch(error=>{
|
console.log(error);
|
Root.message({
|
type:"warning",
|
message:"调用U8接口查询退货申请单是否可以撤回失败"
|
})
|
document.getElementById('page_loading').style.display = "none";
|
})
|
}).catch(() => {
|
Root.message({
|
type: 'info',
|
message: '已取消撤回'
|
});
|
})
|
},
|
pushU8(){
|
var me = this;
|
var row = this.selectedrow;
|
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请先选择一条数据'
|
});
|
return false;
|
}
|
let url = window.top.RootSetting.url_stock + "order/revocation/" + row.id;
|
axios.get(url, {
|
})
|
.then(data => {
|
let params = {
|
isClientMode:false,
|
dataname:"revocation_order",
|
id:row.id,
|
sync:1
|
}
|
Server.call("root/data/updateEntity", params, function(result) {
|
if(result && result.success) {
|
Root.message({
|
type: 'success',
|
message: "推送成功"
|
});
|
me.doQuery();
|
}else {
|
Root.message({
|
type: 'warning',
|
message: "推送失败"
|
});
|
}
|
|
},function(result) {
|
Root.message({
|
type: 'warning',
|
message: "推送失败"
|
});
|
});
|
|
|
})
|
.catch( (error) => {
|
Root.message({
|
type: 'warning',
|
message: "推送失败"
|
});
|
return false;
|
});
|
},
|
getMeResoures() {
|
let me = this;
|
|
//tab
|
var params = {
|
dataname: "tab",
|
isClientMode: false,
|
userId: this.userId
|
}
|
|
Server.call("root/data/getEntitySet", params, function(result) {
|
console.log(result);
|
if (result && result.data.entityset) {
|
result.data.entityset.map(e=>{
|
me.tabs[e.id_name] = e;
|
});
|
me.$forceUpdate();
|
}
|
|
});
|
},
|
submit_before(status_,code_,dataType_) {
|
|
let row = this.selectedrow;
|
let me = this;
|
me.flow_Submit(status_,code_,dataType_)
|
/* let url = window.top.RootSetting.url_stock + "order/checkLicence"
|
let expiredLicense = false;
|
axios.post(url, {
|
customerId: row.customer_id || "",
|
bookNo: row.book_no ? row.book_no : "",
|
deliveryPartCode: row.delivery_part_code
|
})
|
.then(data => {
|
console.log(data);
|
if (data.data.success) {
|
if(data.data.data.status != "0") {
|
if(data.data.data.licenceList && data.data.data.licenceList.length > 0){
|
let licenceList_ = data.data.data.licenceList;
|
for (var i = 0; i < licenceList_.length; i++) {
|
if(licenceList_[i].term) {
|
if(new Date(licenceList_[i].term) < new Date()) {
|
expiredLicense =true;
|
break;
|
}
|
}else{
|
selectrow.expiredLicense =true;
|
break;
|
}
|
}
|
}else{
|
expiredLicense =true;
|
}
|
}
|
if(row.has_gsp && expiredLicense) {
|
Root.message({
|
type: 'warning',
|
message: "资质证照过期,无法提交"
|
});
|
return;
|
}else{
|
me.flow_Submit(status_,code_,dataType_)
|
}
|
}else{
|
Root.message({
|
type: 'warning',
|
message: data.data.message
|
});
|
}
|
})
|
.catch((error) => {
|
console.log(error);
|
}); */
|
},
|
flow_Submit: function(status_,code_,dataType_) { //status_:审批的字段 code_:提示语
|
let me = this;
|
var row = this.selectedrow;
|
var id = "";
|
if(dataType_ == "deliver"){
|
id = row.deo_id
|
}
|
else{
|
id = row.id
|
}
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请先选择一条数据'
|
});
|
return false;
|
}
|
else if (row[status_] != "input" && !row[status_] == "refuse") { //待调整只有创建人才可提交
|
Root.message({
|
type: 'warning',
|
message: '当前状态不可提交'
|
});
|
return false;
|
}
|
|
Root.confirm('确定提交-' + row[code_] + '-吗?', '提示', {
|
confirmButtonText: "提交",
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
document.getElementById('page_loading').style.display = "block";
|
let param = {
|
orderId:id,
|
eventType:"commit",
|
dataType:dataType_,
|
isClientMode: false,
|
extra:{
|
variableMap:{
|
province:row.province_code,
|
businessType:row.business_type,
|
departRevoType:row.business_depart_code,
|
ticketDiscountType: row.ticket_discount_type || "",
|
subType:row.sub_type,
|
dataType:row.data_type,
|
flowId:row.flow_id || ""
|
}
|
},
|
|
}
|
Server.call("root/order/onEvent", param, function(result) {
|
console.log(result);
|
if (result.success){
|
if(row.withdraw && row.id) {
|
let param = {
|
isClientMode:false,
|
dataname:"revocation_order",
|
id:row.id,
|
withdraw:0
|
}
|
Server.call("root/data/updateEntity",param,function(result) {
|
|
})
|
}
|
Root.message({
|
type: 'success',
|
message: '提交成功'
|
});
|
}else{
|
Root.message({
|
type: 'warning',
|
message: result.message
|
});
|
}
|
document.getElementById('page_loading').style.display = "none";
|
me.onQuery();
|
},function(result) {
|
document.getElementById('page_loading').style.display = "none";
|
Root.message({
|
type: 'warning',
|
message: result.message
|
});
|
});
|
|
}).catch(() => {
|
document.getElementById('page_loading').style.display = "none";
|
Root.message({
|
type: 'info',
|
message: '已取消'
|
});
|
});
|
},
|
flow_Cancel: function(status_,code_,dataType_) {
|
let me = this;
|
var row = this.selectedrow;
|
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请先选择一条数据'
|
});
|
return false;
|
}
|
else if (row[status_] != "input" && !row[status_] == "refuse" && !row.withdraw) {
|
Root.message({
|
type: 'warning',
|
message: '当前状态不可作废'
|
});
|
return false;
|
}
|
Root.confirm('确定作废-' + row[code_] + '-吗?', '提示', {
|
confirmButtonText: "作废",
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
let param = {
|
orderId:row.id,
|
eventType:"cancellation",
|
dataType:dataType_,
|
isClientMode: false,
|
}
|
Server.call("root/order/onEvent", param, function(result) {
|
console.log(result);
|
if (result.success){
|
Root.message({
|
type: 'success',
|
message: '作废成功'
|
});
|
}else{
|
Root.message({
|
type: 'warning',
|
message: '作废失败'
|
});
|
}
|
|
me.onQuery();
|
});
|
|
}).catch(() => {
|
Root.message({
|
type: 'info',
|
message: '已取消'
|
});
|
});
|
},
|
delData: function(scope) {
|
let me = this;
|
|
|
let row = scope.row;
|
let index_ = scope.$index;
|
let name_ = "该数据";
|
|
if (!this.dataname) {
|
Root.message({
|
type: 'warning',
|
message: '该事件需指定数据对象'
|
});
|
return
|
}
|
let user_code = window.top.userinfo.employee.code
|
if(row.create_operate_code != user_code && row.operate_emp_code != user_code) {
|
Root.message({
|
type: 'warning',
|
message: '无删除权限'
|
});
|
return false;
|
}
|
if (!row.id) {
|
Root.message({
|
type: 'warning',
|
message: '该事件需存在数据ID'
|
});
|
return
|
}
|
if(row.withdraw) {
|
Root.message({
|
type: 'warning',
|
message: '请先作废后删除'
|
});
|
return
|
}
|
if (row.status != "input" && row.status != "close") {
|
Root.message({
|
type: 'warning',
|
message: '审批状态订单不可删除'
|
});
|
return
|
}
|
if (row.code) {
|
name_ = "_" + row.code + "_";
|
}
|
|
Root.confirm('确定删除' + name_ + '吗?', '删除提示', {
|
confirmButtonText: '删除',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
let param1 = {
|
filter:{
|
parent_id: row.id
|
},
|
|
isClientMode: false,
|
dataname: 'revocationOrderDetail',
|
}
|
Server.call("root/data/deleteEntitySet", param1, function(result) {
|
|
});
|
|
let param = {
|
id: row.id,
|
isClientMode: false,
|
dataname: "revocationOrder",
|
}
|
Server.call("root/data/deleteEntity", param, function(result) {
|
console.log(result);
|
Root.message({
|
type: 'success',
|
message: '删除成功!'
|
});
|
me.doQuery();
|
});
|
}).catch(() => {
|
Root.message({
|
type: 'info',
|
message: '已取消删除'
|
});
|
});
|
},
|
onshowFilterPopup(filter) {
|
var me = this;
|
var fieldObj_ = filter.obj;
|
var filterValue = clone(me.filterObj);
|
var field_ = fieldObj_.field;
|
|
if ("customer_name" == field_) {
|
Root.showPopup({
|
|
url: "../md/customer/popup/customer_list.html",
|
width: 800,
|
height: 550,
|
callback: function(result, callback) {
|
filterValue[field_] = result.row.md_description;
|
me.filterObj = filterValue;
|
me.onQuery();
|
if (callback) {
|
callback();
|
}
|
}
|
});
|
}
|
}
|
}
|
});
|
</script>
|
<style>
|
|
</style>
|
</body>
|
</html>
|