<!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 type="text/javascript">
|
var pageVue = null;
|
function loadJsCss(callback) {
|
var jscss_urls = [];
|
window.top.initJsCss(document, jscss_urls, callback);
|
};
|
|
function initVue() {
|
new FormVue({
|
el: "#vbody",
|
data: {
|
dataname: "wm_distribution",
|
table_dataname: "wm_transfer_detail",
|
title: "渠道订单发货",
|
dataRequest: [
|
// {
|
// name: "wm_stock_type",
|
// dataname: "wm_stock_type",
|
// // filter: " table_name='agm_record'",
|
// orderby: "name",
|
// isnotoption: false, //true:不是选项
|
// code:"code",//是下拉选项时设置
|
// label:"name",//是下拉选项时设置
|
// },
|
// {
|
// name: "wm_warehouse",
|
// dataname: "wm_warehouse_all",
|
// // filter: "org_id='"+window.top.vue.userinfo.org_id+"'", // 标识
|
// isnotoption: false, //true:不是选项
|
// code:"code",//是下拉选项时设置
|
// label:"name",//是下拉选项时设置
|
// },
|
],
|
options_wm_warehouse: [],
|
oldFormData:[],
|
formAttr_channel: {
|
istitle: false,
|
title: "订单信息",
|
columnnumber: 3,
|
labelwidth: "100px",
|
labelposition: "left",//"left",// right//top
|
size: "mini",
|
border: "5px solid #c6c6c600",
|
disabled: true
|
},
|
formAttr: {
|
istitle: false,
|
title: "表单名称",
|
columnnumber: 3,
|
labelwidth: "100px",
|
labelposition: "left",//"left",// right//top
|
size: "mini",
|
border: "5px solid #c6c6c600",
|
|
},
|
|
formFields: [],
|
|
newformData: {
|
code: createCode("DB"),
|
doc_date: createDate(),
|
state_code: "Input",
|
state_name: "草稿",
|
},
|
formData: {},
|
|
isRefresh: true,
|
tablebuttonClick:[],
|
tableFields: [],
|
newTableData: {
|
create_time: createDatetime(),
|
creator_name: window.top.vue.userinfo.name,
|
},
|
tableAttr: {
|
istitle: true,
|
title: "发货明细对照",
|
isborder: true, // 显示表格的网格线
|
},
|
tableData: [],
|
rowkey: "id",
|
//按键权限设置
|
isedit: false,//提交前编辑,保存/提交
|
isrefuseedit: false,//拒绝后编辑,保存/再次提交
|
isapproval: false,//审批,同意/拒绝/转办/退回
|
|
iscommit: false,//提交标记
|
|
//弹窗参数
|
popupParames: {},
|
//字段设置
|
tablefieldClick: {},
|
formfieldClick: {},
|
formfieldClick_channel: {},
|
dheight: 0,
|
qty_available:0,
|
|
//审批相关变量
|
loading_save: false,
|
loading_pass: false,
|
reasonvisible:false,//审批通过或拒绝填写原因
|
approveremark: "",//填写理由
|
passOrRefuse:false,
|
|
iscustomer: false, // 是否经销商
|
iscustomerfreeze: false,//是否经销商冻结
|
issecond: false, // 是否非直采经销商
|
isplatform: false, // 是否平台商
|
|
channelOrderFormData: {},
|
channelOrderTableData: [],
|
meta_so_channel: [],
|
meta_so_channel_detail: [],
|
|
distribution_detail: []
|
|
},
|
created() {
|
this.iscustomer = window.top.vue.isCustomer
|
|
if (window.top.vue.userinfo.currentactor && window.top.vue.userinfo.currentactor.code) {
|
var role_code = window.top.vue.userinfo.currentactor.code; // window.top.vue.userinfo.currentactor.actor_id
|
if (role_code == "Actor-Customer-Second") {
|
this.issecond = true;
|
}
|
else if (role_code == "Actor-Customer-Platform") {
|
this.isplatform = true;
|
}
|
}
|
|
this.dheight = document.documentElement.clientHeight - 92;
|
this.popupParames = clone(Root.popupParames);
|
this.title = this.popupParames.title || this.popupParames.text
|
if (this.popupParames.data) {
|
this.formData = clone(this.popupParames.data);
|
}
|
var channelOrderData = {};
|
if (this.popupParames.delta) {
|
channelOrderData = clone(this.popupParames.delta);
|
}
|
// 传过来的是订单id
|
// 获取订单详情包含订单明细
|
// 获取订单对应的调拨头
|
// 如果是平台商,可以看到调拨保存和调拨生效数据
|
// 如果是其他角色,只能看到调拨生效数据
|
var so_channel_ = {
|
name: "so_channel", // 渠道订单详情
|
url: "root/data/getEntity",
|
paramsobj: {dataname: "so_channel", id: channelOrderData.id, attachMeta: true},
|
isnotoption: true, //true:不是选项
|
}
|
var wm_distribution_detail = {
|
name: "wm_distribution_detail", // 渠道订单发货详情
|
url: "root/data/getEntitySet",
|
paramsobj: {dataname: "wm_transfer_detail_list", filter: "order_channel_id='"+ channelOrderData.id +"' and state_code='Received'"},
|
isnotoption: true, //true:不是选项
|
}
|
if (this.popupParames.sceneCode == "delivery") {
|
wm_distribution_detail = {
|
name: "wm_distribution_detail", // 渠道订单发货详情
|
url: "root/data/getEntitySet",
|
paramsobj: {dataname: "wm_transfer_detail_list", filter: "order_channel_id='"+ channelOrderData.id +"'"},
|
isnotoption: true, //true:不是选项
|
}
|
}
|
//动态获取默认数据
|
var newEntity_ = {
|
name: "newEntity",
|
url: "root/data/newEntity",
|
paramsobj: {dataname: this.dataname},
|
isnotoption: true, //true:不是选项
|
}
|
this.dataRequest.push(so_channel_);
|
this.dataRequest.push(wm_distribution_detail);
|
this.dataRequest.push(newEntity_);
|
|
if (this.popupParames.sceneCode) {
|
if (this.popupParames.sceneCode == "browse") {//只读
|
this.formAttr.disabled = true;
|
this.isedit = false;
|
}
|
else if (this.popupParames.sceneCode == "delivery") {// 发货
|
this.isedit = true;
|
}
|
else if (this.popupParames.sceneCode == "approval") {//审批
|
this.formAttr.disabled = true;
|
this.isapproval = true;
|
}
|
}
|
},
|
|
mounted() {
|
var me = this;
|
//预加载数据
|
if (this.dataRequest && this.dataRequest.length) {
|
var result = {};
|
this.loadRequestData(this.dataRequest, result, function(data) {
|
me.dataRequestObj = data;
|
//预加载数据后给哪些字段设置options或formatterjson
|
// if(me.dataRequestObj.wm_warehouse) {
|
// me.options_wm_warehouse = me.dataRequestObj.wm_warehouse;
|
// }
|
/*
|
this.dataRequest.push(newEntity_);
|
this.dataRequest.push(so_channel_);
|
this.dataRequest.push(wm_distribution_);
|
|
*/
|
|
if (me.dataRequestObj.so_channel) {
|
var meta_so_channel_ = me.dataRequestObj.so_channel.meta.so_channel.fields;
|
var meta_so_channel_detail_ = me.dataRequestObj.so_channel.meta.so_channel_detail.fields;
|
|
var data_so_channel_ = me.dataRequestObj.so_channel.data.so_channel;
|
var data_so_channel_detail_ = me.dataRequestObj.so_channel.data.so_channel_detail;
|
var data_so_channel_file_ = me.dataRequestObj.so_channel.data.so_channel_file;
|
|
meta_so_channel_.map(f=>{
|
f.isshow = "T";
|
f.required = false
|
f.group_name = "订单信息"
|
if (f.field == "shipto_address_id") {
|
var address_ = {
|
code: data_so_channel_.shipto_address_id,
|
value: data_so_channel_.shipto_address
|
}
|
|
f.options = [address_];
|
}
|
|
})
|
meta_so_channel_detail_.map(f=>{
|
f.isshow = "T";
|
})
|
|
if (data_so_channel_file_ && data_so_channel_file_.length) {
|
var attachment_id_ = []
|
var attachment_approve_id_ = []
|
data_so_channel_file_.map(f=>{
|
if (f.sender_field_file_name == "attachment_id") {
|
var f_ = {
|
id: f.id,
|
file_name: f.file_name
|
}
|
attachment_id_.push(f_);
|
}
|
})
|
me.$set(data_so_channel_, "attachment_id", attachment_id_);
|
}
|
|
me.meta_so_channel = meta_so_channel_;
|
me.meta_so_channel_detail = meta_so_channel_detail_;
|
|
me.channelOrderFormData = data_so_channel_;
|
me.channelOrderTableData = data_so_channel_detail_;
|
|
|
if (me.isedit) {
|
me.newformData.type_code = "platform_delivery";
|
me.newformData.order_channel_id = me.channelOrderFormData.id
|
me.newformData.order_channel_code = me.channelOrderFormData.code
|
me.newformData.org_id = me.channelOrderFormData.platform_org_id
|
me.newformData.org_code = me.channelOrderFormData.platform_customer_code
|
me.newformData.org_name = me.channelOrderFormData.platform_customer_name
|
me.newformData.account_id = me.channelOrderFormData.platform_customer_id
|
me.newformData.company_id = me.channelOrderFormData.company_id
|
me.newformData.bu_id = me.channelOrderFormData.bu_id
|
me.newformData.to_company_id = me.channelOrderFormData.company_id
|
me.newformData.to_bu_id = me.channelOrderFormData.bu_id
|
me.newformData.to_org_id = me.channelOrderFormData.org_id
|
me.newformData.to_org_code = me.channelOrderFormData.customer_code
|
me.newformData.to_org_name = me.channelOrderFormData.customer_name
|
me.newformData.to_account_id = me.channelOrderFormData.customer_id
|
}
|
}
|
|
var isnew = false;
|
if (me.channelOrderFormData.state_code == "Open" || me.channelOrderFormData.state_code == "Partial") {
|
isnew = true;
|
}
|
|
if (me.dataRequestObj.wm_distribution_detail && me.dataRequestObj.wm_distribution_detail.data && me.dataRequestObj.wm_distribution_detail.data.entityset && me.dataRequestObj.wm_distribution_detail.data.entityset.length) {
|
var distribution_detail_ = me.dataRequestObj.wm_distribution_detail.data.entityset;
|
var distribution_detail_sum_obj = {
|
id: {delivery_qty: 0, qty:0}
|
};
|
var distribution_detail_obj = {};
|
distribution_detail_.map(r=>{
|
if (r.wm_transfer__state_code == "Input") { // 本次发货数量
|
isnew = false;
|
me.formData = {
|
id: r.wm_transfer__id,
|
}
|
r.isWithinEdit = true;
|
r.file_operate = "删除";
|
r.h_classname = "h_row_input"
|
}
|
else { // 已发货的数量
|
r.delivery_qty = r.qty * 1;
|
r.qty = null;
|
r.file_operate = "已发货"
|
r.h_classname = "h_row_freeze"
|
}
|
|
if (!distribution_detail_obj[r.order_channel_detail_id]) {
|
distribution_detail_obj[r.order_channel_detail_id] = []
|
distribution_detail_sum_obj[r.order_channel_detail_id] = {delivery_qty: 0, qty:0}
|
}
|
distribution_detail_sum_obj[r.order_channel_detail_id].delivery_qty += r.delivery_qty ? r.delivery_qty *1 : 0
|
distribution_detail_sum_obj[r.order_channel_detail_id].qty += r.qty ? r.qty *1 : 0
|
|
distribution_detail_obj[r.order_channel_detail_id].push(r);
|
})
|
me.channelOrderTableData.map(cr=>{
|
cr.file_operate = "新增发货"
|
cr.wm_transfer__code = "订单明细";
|
cr.h_classname = "h_row_headline"
|
cr.order_qty = cr.qty * 1; // 订单数量
|
cr.delivery_qty = null; // 已发货数量
|
cr.qty = null;
|
cr.children = [];
|
|
if (distribution_detail_obj[cr.id]) {
|
cr.delivery_qty = distribution_detail_sum_obj[cr.id].delivery_qty
|
cr.qty = distribution_detail_sum_obj[cr.id].qty
|
|
cr.children = distribution_detail_obj[cr.id];
|
}
|
})
|
|
me.distribution_detail = distribution_detail_;
|
}
|
else { // 功能完善后要删除的
|
me.channelOrderTableData.map((cr, index)=>{
|
cr.file_operate = "新增发货"
|
cr.wm_transfer__code = "订单明细";
|
cr.h_classname = "h_row_headline"
|
cr.order_qty = cr.qty*1; // 订单数量
|
cr.delivery_qty = null; // 已发货数量
|
cr.qty = null;
|
cr.children = [];
|
})
|
}
|
|
me.tableData = me.channelOrderTableData;
|
|
if (me.dataRequestObj.newEntity && isnew && me.isedit) {
|
var formData = clone(me.dataRequestObj.newEntity.data["wm_distribution"]);
|
if (me.newformData) {
|
let formData_ = clone(formData);
|
|
for (var k in me.newformData) {
|
if (!formData_[k]) {
|
formData_[k] = me.newformData[k];
|
}
|
}
|
|
if (!formData_.doc_date) {
|
formData_.doc_date = formData_.create_time
|
}
|
me.formDataNew = formData_;
|
me.formData = formData_;
|
}
|
}
|
else {
|
me.newformData = null;
|
}
|
// if (me.formData.id) {
|
me.initData();
|
// }
|
});
|
}
|
else {
|
this.initData();
|
}
|
|
// 以服务的方式调用的 Loading 需要异步关闭
|
this.$nextTick(() => {
|
hideLoading();
|
|
//重新设置弹窗宽高
|
this.$nextTick(function(){
|
//let w_ = this.$refs.popup_body.offsetWidth + "px";
|
let w_ = "900px";
|
let h_ = this.$refs.popup_body.offsetHeight + "px";
|
Root.setPopupWH(w_, h_);
|
})
|
});
|
},
|
|
methods:{
|
//关闭弹窗
|
closeDialog() {
|
var me = this;
|
if (me.popupParames.totab){
|
Root.tab.removeItem(Root.tab.selected);
|
Root.tab.open(me.popupParames.parentOption, false);
|
}
|
else {
|
Root.hidePopup();
|
}
|
},
|
//关闭前调回调
|
saveAfter() {
|
var me = this;
|
if(this.popupParames.callback) {
|
let obj = {
|
//row: this.formData
|
}
|
this.popupParames.callback(obj, function() {
|
me.closeDialog();
|
});
|
}
|
else {
|
me.closeDialog();
|
}
|
},
|
|
initData() {
|
let me = this
|
var id_ = null;
|
|
if (this.formData.id) {
|
id_ = this.formData.id;
|
}
|
me.tableButtonClick();
|
this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的
|
if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) {
|
var metas = clone(result.meta[me.dataname].fields);
|
var table_metas = clone(result.meta[me.table_dataname].fields);
|
|
var formFields_ = [];
|
var tableFields_ = [];
|
metas.map(f=>{
|
f.isshow = "T";
|
if(f.field == "from_warehouse_name") {
|
f.options = me.options_wm_warehouse
|
}
|
if(f.field == "to_warehouse_name") {
|
f.options = me.options_wm_warehouse
|
}
|
if (f.field == "org_name" || f.field == "to_org_name") {
|
f.inputtype = "span"
|
}
|
if(f.field == "doc_date") {
|
f.disabled = true
|
}
|
|
formFields_.push(clone(f));
|
})
|
table_metas.map(f=>{
|
f.isshow = "T";
|
|
if (f.field == "valid_from" || f.field == "create_time" || f.field == "create_time") {
|
f.isshow = "F";
|
}
|
|
if (f.field == "stock_type_code") {
|
f.options = me.dataRequestObj.wm_stock_type
|
var formatterjson_ = {};
|
me.dataRequestObj.wm_stock_type.map(r=>{
|
formatterjson_[r.code] = r.name;
|
})
|
f.formatterjson = formatterjson_
|
}
|
if (f.field == "qty") {
|
f.inputkeys = "number";//按键正整数
|
f.labelchinese = "本次发货数量";
|
f.istablesum = true;
|
var order_qty_ = {isshow: "T", field: "order_qty", labelchinese: "订单数量", width: "100", align: "right", istablesum: true};
|
var delivery_qty_ = {isshow: "T", field: "delivery_qty", labelchinese: "已发货数量", width: "100", align: "right", istablesum: true};
|
tableFields_.push(clone(order_qty_));
|
tableFields_.push(clone(delivery_qty_));
|
}
|
|
tableFields_.push(clone(f));
|
})
|
|
if (me.isedit) {
|
var file_operate_ = {isshow: "T", field: "file_operate", name: "操作", type: "capsuletag", width: "100", align: "center", isfixed: "right"}
|
tableFields_.push(clone(file_operate_));
|
}
|
var wm_transfer__code_ = {isshow: "T", field: "wm_transfer__code", labelchinese: "发货单号", width: "170", align: "left"};
|
tableFields_.unshift(clone(wm_transfer__code_));
|
|
if (!me.formFields || (me.formFields && me.formFields.length == 0)) {
|
me.formFields = clone(formFields_);
|
me.tableFields = clone(tableFields_);
|
}
|
}
|
|
if (me.rowData[me.dataname]) {
|
me.formData = me.rowData[me.dataname];
|
}
|
else if (me.formDataNew) {
|
me.formData = me.formDataNew;
|
}
|
else {
|
me.formFields = [];
|
}
|
// if (me.rowData[me.table_dataname]) {
|
// me.tableData = me.rowData[me.table_dataname];
|
// }
|
|
// 调拨附件的赋值
|
if (me.rowData["wm_transfer_file"] && me.rowData["wm_transfer_file"].length) {
|
var comeback_attachment_name_ = []
|
me.rowData["wm_transfer_file"].map(f=>{
|
var f_ = {
|
id: f.id,
|
file_name: f.file_name
|
}
|
comeback_attachment_name_.push(f_);
|
|
})
|
me.$set(me.formData, "transfer_file", comeback_attachment_name_);
|
}
|
})
|
|
|
//字段数组转字段obj,目的为了筛选时获取字段属性
|
me.fieldsToFieldsObj();
|
|
//设置字段事件
|
me.tableFieldClick();
|
},
|
|
tableFieldClick() {
|
var me = this;
|
//表单字段事件设置
|
this.formfieldClick_channel = {
|
|
}
|
this.formfieldClick = {
|
org_name: {
|
popup: {
|
onclick: function(obj) {//弹窗点击事件
|
me.openOrg(obj,function(popupobj){
|
let formData_ = clone(me.formData);
|
formData_.org_name = popupobj.row.account_name;
|
formData_.org_id = popupobj.row.org_id;
|
formData_.org_code = popupobj.row.code;
|
formData_.account_id = popupobj.row.id; //account_id,待验证
|
formData_.company_id = popupobj.row.company_id;
|
formData_.bu_id = popupobj.row.bu_id;
|
formData_.from_warehouse_name = "";//标识:更换公司后,相应的仓库重新选择
|
formData_.from_warehouse_id = "";
|
formData_.from_warehouse_code = "";
|
me.formData = formData_;
|
// me.onQuery();
|
})
|
}
|
}
|
},
|
to_org_name: {
|
popup: {
|
onclick: function(obj) {//弹窗点击事件
|
me.openOrg(obj,function(popupobj){
|
let formData_ = clone(me.formData);
|
formData_.to_org_name = popupobj.row.account_name;
|
formData_.to_org_id = popupobj.row.org_id;
|
formData_.to_org_code = popupobj.row.code;
|
formData_.to_account_id = popupobj.row.id; //to_account_id与id待验证
|
formData_.to_company_id = popupobj.row.company_id;
|
formData_.to_bu_id = popupobj.row.bu_id;
|
formData_.to_warehouse_name = "";//标识:更换公司后,相应的仓库重新选择
|
formData_.to_warehouse_id = "";
|
formData_.to_warehouse_code = "";
|
me.formData = formData_;
|
// me.onQuery();
|
})
|
}
|
}
|
},
|
|
from_warehouse_name: {
|
visible: {
|
onchange: function(obj) {
|
me.oldFormData = clone(me.formData)
|
// me.formData.from_warehouse_name//这是出仓项
|
var formFields_ = [];
|
var options_ = []
|
formFields_ = clone(me.formFields)
|
me.options_wm_warehouse.map(f=>{
|
if(f.org_id == me.formData.org_id && f.account_id == me.formData.account_id) { //出仓项根据对应公司和户头过滤
|
options_.push(clone(f))
|
}
|
// if(f.name != me.formData.to_warehouse_name) {//出入仓项互斥
|
// options_.push(clone(f))
|
// }
|
})
|
formFields_.map(f=>{
|
if(f.field == "from_warehouse_name") {
|
f.options = clone(options_)
|
}
|
})
|
me.formFields = clone(formFields_)
|
if(me.formData.from_warehouse_name) {
|
Root.confirm('更换调出仓库将会重置明细,是否继续?', '更换提示', { //下拉提示
|
confirmButtonText: '确定',
|
// cancelButtonText: '取消',
|
showCancelButton:false,
|
type: 'warning'
|
}).then(() => {
|
return
|
}).catch(() => {
|
return
|
});
|
}
|
}
|
},
|
select: {
|
onchange: function(obj) {
|
// if(JSON.stringify(obj.selectoption)=="{}") {
|
// if(me.formData.from_warehouse_name) {
|
// Root.confirm(',是否继续?', '更换提示', { //下拉提示
|
// confirmButtonText: '确定',
|
// // cancelButtonText: '取消',
|
// showCancelButton:false,
|
// type: 'warning'
|
// }).then(() => {
|
// return
|
// }).catch(() => {
|
// return
|
// });
|
// }
|
// }
|
me.tableData = []
|
obj.data.from_warehouse_name = obj.selectoption.value//将选中项赋值
|
obj.data.from_warehouse_id = obj.selectoption.id
|
obj.data.from_warehouse_code = obj.selectoption.code
|
}
|
}
|
|
},
|
to_warehouse_name: {
|
visible: {
|
onchange: function(obj) {
|
var formFields_ = [];
|
var options_ = []
|
formFields_ = clone(me.formFields)
|
me.options_wm_warehouse.map(f=>{
|
//标识二
|
if(f.org_id == me.formData.to_org_id && f.account_id == me.formData.to_account_id) { //入仓项根据对应公司和户头过滤
|
options_.push(clone(f))
|
}
|
|
})
|
formFields_.map(f=>{
|
if(f.field == "to_warehouse_name") {
|
f.options = clone(options_)
|
}
|
})
|
me.formFields = clone(formFields_)
|
|
}
|
},
|
select: {
|
onchange: function(obj){
|
obj.data.to_warehouse_name = obj.selectoption.value
|
obj.data.to_warehouse_id = obj.selectoption.id
|
obj.data.to_warehouse_code = obj.selectoption.code
|
}
|
}
|
},
|
|
transfer_file: { // 相关附件(多附件)
|
buttonarray: {
|
onclick: function(obj) {
|
var filenamefield = obj.obj.field;
|
var fileidfield = "";
|
|
if(obj.buttonobj && obj.buttonobj.code == "showfilebyfile"){
|
me.showFileImgByFileId_n(filenamefield, obj.buttonobj.fileobj, obj.formdata);
|
}else if (obj.buttonobj && obj.buttonobj.code == "uploadlist"){
|
me.onPopupByUploadFile_n(filenamefield, fileidfield, "wm_transfer", obj.formdata);
|
}else if (obj.buttonobj && obj.buttonobj.code == "delfilebyfile"){
|
me.deleteByFileId_n(filenamefield, obj.buttonobj.fileobj, obj.formdata);
|
}
|
},
|
|
}
|
},
|
};
|
|
//表格字段事件设置
|
this.tablefieldClick = {
|
file_operate: {
|
val: {//有值时的点击事件
|
notclick_val: ["已发货"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222"
|
notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"]
|
onclick: function(obj) {//数据值点击事件
|
if (obj.row.file_operate == "新增发货") {
|
// 如果已全部发货,则无需新增,订单明细数量 == 已发货数量 + 本次发货
|
if (obj.row.order_qty*1 == (obj.row.delivery_qty*1 + obj.row.qty*1)) {
|
Root.message({
|
type: 'warning',
|
message: "发货数量已等于订货数量"
|
});
|
return
|
}
|
|
me.tablepopup_productlist("add", obj, function(popupobj) {
|
var tableData_ = clone(obj.row.children);
|
if (popupobj.rowlist && popupobj.rowlist.length) {
|
popupobj.rowlist.map(row=>{
|
var newrow = {
|
id: uuid_short(),
|
isWithinEdit: true,
|
file_operate: "删除",
|
h_classname: "h_row_input",
|
order_channel_detail_id: obj.row.id,
|
wm_transfer__state_code: "InputAdd",
|
parent_id: me.formData.id,
|
|
from_warehouse_id: row.warehouse_id,
|
from_warehouse_code: row.wm_warehouse__code,
|
from_warehouse_name: row.wm_warehouse__name,
|
|
// book_detail_id: popupobj.row.book_detail_id,
|
product_id: row.product_id,
|
product_code: row.product_code,
|
product_name: row.product_name,
|
spec: row.spec,
|
|
unit: row.unit,
|
batch_no: row.batch_no,
|
batch_sn: row.batch_sn,
|
valid_from: row.valid_from,
|
valid_to: row.valid_to,
|
stock_type_code: row.stock_type_code,
|
stock_type_name: row.stock_type_name,
|
stock_qty: row.qty_total * 1 - row.qty_frozen * 1,
|
qty: 1,
|
}
|
obj.row.qty += 1;
|
if (obj.row.order_qty*1 < (obj.row.delivery_qty*1 + obj.row.qty*1)) {
|
obj.row.qty -= 1;
|
Root.message({
|
type: 'warning',
|
message: "发货数量已等于订货数量"
|
});
|
}
|
else {
|
tableData_.unshift(clone(newrow));
|
}
|
})
|
}
|
|
obj.row.children = clone(tableData_)
|
var tableData_ = clone(me.tableData);
|
me.tableData = clone(tableData_);
|
})
|
}
|
else if (obj.row.file_operate == "删除") {
|
var row = obj.row;
|
var txt = clone(row.product_name + row.spec + row.batch_no);
|
me.deleteDataById(row.id, "wm_transfer_detail", "【" + txt + "】", function(){
|
// me.tableData.splice(obj.selectRowIndex, 1);
|
var tableData_ = clone(me.tableData);
|
var select_r_index_ = 0;
|
var select_r_parent_ = [];
|
var qty_sum = 0;
|
|
tableData_.map((r, index)=>{
|
if (r.id == row.order_channel_detail_id) {
|
select_r_index_ = index
|
}
|
})
|
var select_cr_index_ = 0;
|
select_r_parent_ = tableData_[select_r_index_].children;
|
for (var i = 0; i < select_r_parent_.length; i++) {
|
var cr = select_r_parent_[i];
|
if (cr.id == row.id) {
|
select_cr_index_ = i;
|
}
|
else {
|
qty_sum += cr.qty ? cr.qty * 1 : 0
|
}
|
}
|
select_r_parent_.splice(select_cr_index_, 1);
|
|
tableData_[select_r_index_].qty = qty_sum
|
me.tableData = clone(tableData_);
|
})
|
}
|
|
},
|
},
|
},
|
qty: {
|
input: {
|
onchange: function(obj) {//输入更改事件
|
var qty_me = obj.row.qty * 1;
|
var is_reset = false;
|
var is_reset_minus = false; // 是否存在负数
|
var is_reset_inventory_overflow = false; // 是否库存溢出
|
var is_reset_delivery_overflow = false; // 是否发货溢出
|
// 标准化数值
|
obj.row.qty = obj.row.qty * 1;
|
|
if (obj.row.qty * 1 < 0) {
|
is_reset_minus = true;
|
is_reset = true;
|
}
|
else if (obj.row.qty * 1 > obj.row.stock_qty * 1) {
|
is_reset_inventory_overflow = true;
|
is_reset = true;
|
}
|
|
// 校验是否超过订单数量 (已发货数量 + 本次发货数量)汇总 > 订单数量
|
var channel_detail_id = obj.row.order_channel_detail_id;
|
var channel_detail_s_index = 0;
|
var channel_detail_row = {};
|
var delivery_qty_sum = 0;
|
var qty_sum = 0;
|
for (var i = 0; i < me.tableData.length; i++) {
|
var r = me.tableData[i];
|
if (r.id == channel_detail_id) {
|
channel_detail_row = r;
|
channel_detail_s_index = i;
|
break;
|
}
|
}
|
if (channel_detail_row.children) {
|
channel_detail_row.children.map(r=>{
|
delivery_qty_sum += r.delivery_qty ? r.delivery_qty *1 : 0
|
qty_sum += r.qty ? r.qty *1 : 0;
|
})
|
}
|
if ((delivery_qty_sum + qty_sum) > channel_detail_row.order_qty) {
|
is_reset_delivery_overflow = true;
|
is_reset = true;
|
}
|
|
if (is_reset) {
|
obj.row.qty = 0;
|
channel_detail_row.qty = qty_sum - qty_me;
|
me.tableData[channel_detail_s_index] = channel_detail_row;
|
if (is_reset_minus) {
|
Root.message({
|
type: 'warning',
|
message: "发货量必须大于0"
|
});
|
}
|
else if (is_reset_inventory_overflow) {
|
Root.message({
|
type: 'warning',
|
message: "发货数量超出库存数量"
|
});
|
}
|
else if (is_reset_delivery_overflow) {
|
Root.message({
|
type: 'warning',
|
message: "发货数量超出订货数量"
|
});
|
}
|
}
|
else {
|
channel_detail_row.qty = qty_sum;
|
me.tableData[channel_detail_s_index] = channel_detail_row
|
}
|
|
}
|
},
|
}
|
};
|
},
|
|
// 设置表格工具栏按键事件
|
tableButtonClick() {
|
var me = this;
|
var tablebuttonclick = [];
|
me.tablebuttonClick = tablebuttonclick
|
},
|
|
tablepopup_productlist(sceneCode, obj, callback) {
|
var me = this;
|
var data_ = {};
|
var delta_ = {};
|
console.log(obj);
|
|
//排除已选物料
|
obj.row.children.map(row=>{
|
if (row.wm_transfer__state_code != "Received") {
|
if (row.batch_sn) {
|
var key_ = row.from_warehouse_id + "_" + row.product_code + "_" + row.batch_no + "_" + row.batch_sn
|
delta_[key_] = true
|
}
|
else if (row.product_code) {
|
var key_ = row.from_warehouse_id + "_" + row.product_code + "_" + row.batch_no
|
delta_[key_] = true
|
}
|
}
|
|
})
|
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "800px",
|
height: "520px",
|
icon: "icon-product",
|
text: "明细选择",
|
id: "popup_book_detail",//totab: true时需设置,用于判断是否已打开此页面
|
url: "module/inventory/page/popup/popup_book_detail.html",
|
data: data_,
|
delta: delta_,
|
// filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'",
|
// filter: "warehouse_name='" + me.formData.from_warehouse_name +"'" ,
|
filter: "wm_book_detail.account_id='" + me.formData.account_id +"' and wm_book_detail.spec='"+ obj.row.spec +"'" ,
|
sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(popupobj, popupcallback) {
|
callback(popupobj);
|
if (popupcallback) {
|
popupcallback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
deleteDataById(id, dataname, confirm_txt, callback){
|
var me = this;
|
var formData_ = clone(me.formData);
|
Root.confirm('确定删除该' + confirm_txt + '吗?', '删除发货明细提示', {
|
confirmButtonText: '删除',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
if (id) {
|
let param = {
|
dataname: dataname,
|
id: id
|
}
|
Server.call("root/data/deleteEntity", param, function(result) {
|
console.log(result);
|
if (result && result.data) {
|
callback();
|
}
|
});
|
}
|
else {
|
callback();
|
}
|
|
}).catch(() => {
|
Root.message({
|
type: 'info',
|
message: '已取消删除'
|
});
|
});
|
|
},
|
|
showFileImgByFileId_n(filenamefield, fileobj, objformdata){
|
let me = this;
|
var formData_ = clone(me.formData);
|
var file_id = fileobj.id
|
var file_name = fileobj.file_name
|
var dataname_ = this.dataname
|
|
this.zzimg = {};
|
this.zzimgList = [];
|
this.file_txt = false;
|
if(file_id) {
|
var fileid = file_id;
|
let fileName = clone(file_name);
|
let index1 = fileName.lastIndexOf(".");
|
let index2 = fileName.length;
|
let suffix = fileName.substring(index1, index2).toLowerCase(); //后缀名
|
if (suffix == ".png" || suffix == ".jpg" || suffix == ".jpeg" || suffix == ".pdf") {
|
var row = {
|
fileid: fileid,
|
dataname: dataname_,
|
filename: fileName
|
}
|
var config = {
|
totab: false,
|
width: "1200px",
|
height: 800,
|
icon: "icon-product",
|
text: "附件预览",
|
id: "pdf_" + fileid,
|
url: "module/tool/page/popup_file_pdf.html",
|
data: row,
|
delta: {},
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
this.doPopupByPublic(config);
|
|
}
|
else {//只可下载,不可预览
|
// handleDownloadUrl(fileid,false);
|
handleDownload(fileid, dataname_);
|
}
|
}
|
},
|
onPopupByUploadFile_n(filenamefield, fileidfield, dataname, objformdata) {
|
var me = this;
|
var analysistype_ = "";
|
var sender_id_ = ""; // 业务数据id;
|
if (objformdata.id) {
|
sender_id_ = objformdata.id;
|
}
|
|
// var analysistype = "invoiceIdentify"; // 发票验真
|
// if (me.formData.implant_evidence_code == "deliver") { // 出库单
|
// analysistype = "";
|
// }
|
var delta_ = {filetypelist: [".png", ".jpg", ".jpeg",".pdf"]}; //, ".pdf"
|
var config = {
|
totab: false,
|
width: "500px",
|
icon: "icon-product",
|
text: "附件上传",
|
id: "popupByUploadFile",
|
url: "module/tool/page/popup_uploadFile.html",
|
data: {
|
dataName: dataname,
|
fileidfieldName: fileidfield,
|
id: sender_id_,
|
fileNamefieldName: filenamefield
|
},
|
delta: delta_,
|
callback: function(obj, callback) {
|
var f_ = {
|
id: obj.row[0].id,
|
file_name: decodeURI(obj.row[0].name)
|
}
|
if (!objformdata[filenamefield]) {
|
objformdata[filenamefield] = []
|
}
|
me.$message({
|
showClose: true,
|
message: '上传成功!',
|
type: 'success'
|
});
|
|
objformdata[filenamefield].push(f_);
|
if (!objformdata.id) {
|
objformdata.id = obj.row[0].sender_id;
|
}
|
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
this.doPopupByPublic(config);
|
},
|
|
deleteByFileId_n(filenamefield, fileobj, objformdata){
|
var me = this;
|
var formData_ = clone(me.formData);
|
Root.confirm('确定删除附件【' + fileobj.file_name + '】吗?', '删除提示', {
|
confirmButtonText: '删除',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
if (fileobj.id) {
|
let param = {
|
dataname: "wm_transfer_file",
|
id: fileobj.id
|
}
|
|
Server.call("root/data/deleteEntity", param, function(result) {
|
console.log(result);
|
if (result && result.data) {
|
objformdata[filenamefield].remove(fileobj);
|
// me.formData[filenamefield].remove(fileobj);
|
|
// me.formData = formData_;
|
Root.message({
|
type: 'success',
|
message: '删除成功!'
|
});
|
}
|
});
|
}
|
}).catch(() => {
|
Root.message({
|
type: 'info',
|
message: '已取消删除'
|
});
|
});
|
|
},
|
|
openOrg(obj,callback){
|
var me = this;
|
var filter_ = "";
|
if (obj.obj.field == "to_org_name") {
|
filter_ = " and company_id='"+me.formData.company_id+"' and bu_id='"+me.formData.bu_id+"'" //根据调出公司id和buid
|
}
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "800px",
|
height: "520px",
|
icon: "icon-product",
|
text: "选择公司",
|
id: "popup_org",//totab: true时需设置,用于判断是否已打开此页面
|
url: "module/inventory/page/popup/popup_account.html", //标识:此处选择开户经销商
|
data: {},
|
delta: {field: obj.obj.field},
|
// filter: "org_id='"+ me.positiondata.org_id + "' and bu_id='" + me.positiondata.bu_id + "'",
|
filter: "md_org_account.id!='"+me.formData.account_id+"' and md_org_account.id!='"+me.formData.to_account_id+"'"+filter_ , //经销商筛选
|
sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(popupobj, popupcallback) {
|
callback(popupobj)
|
if (popupcallback) {
|
popupcallback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
|
rowChange(row, type, tablename) {
|
var me = this;
|
if (type == "add") {
|
this.tableData.unshift(row);
|
}
|
else if (type == "del") {
|
if (row.id) {
|
let param = {
|
dataname: tablename,
|
id: row.id
|
}
|
|
Server.call("root/data/deleteEntity", param, function(result) {
|
console.log(result);
|
if (result && result.data) {
|
me.tableData.remove(row);
|
|
Root.message({
|
type: 'success',
|
message: '删除成功!'
|
});
|
}
|
});
|
}
|
else {
|
this.tableData.remove(row);
|
}
|
}
|
else {
|
|
}
|
},
|
|
submitRowTable() {
|
var me = this;
|
var bo_ = true;
|
var batch_no_ = true;
|
|
var bo_ = this.$refs.form1.checkForm();
|
if (!bo_) {
|
bo_ = false;
|
Root.message({
|
type: 'error',
|
message: '请填写必填项'
|
});
|
return
|
}
|
|
if (me.tableData.length == 0) {
|
bo_ = false;
|
Root.message({
|
type: 'warning',
|
message: '请先添加明细数据'
|
});
|
return
|
}
|
|
me.tableData.map(r=>{
|
if (r.qty == null || r.qty === "" || isNaN(r.qty) || r.qty == 0) {
|
bo_ = false;
|
}
|
if (r.batch_no == null || r.batch_no === "") {
|
batch_no_ = false;
|
}
|
})
|
if (!bo_) {
|
Root.message({
|
type: 'error',
|
message: '明细中存在数量为空的数据'
|
});
|
return
|
}
|
|
this.iscommit = true;
|
this.saveRowTable();
|
},
|
|
saveRowTable() {
|
var me = this;
|
var operator_ = "saveEntity";//保存
|
if(me.iscommit) {
|
operator_ = "commit";//提交
|
}
|
|
var entity_ = clone(this.formData);
|
var entity = {};
|
for (var r in entity_) {
|
if (entity_[r] || entity_[r] == "" || entity_[r] == false || entity_[r] == 0) {
|
entity[r] = entity_[r];
|
}
|
}
|
|
var tableData_ = [];
|
var tableData_me = clone(this.tableData);
|
var qty_total_ = 0;
|
tableData_me.map(r=>{
|
if (r.children) {
|
r.children.map(cr=>{
|
if (cr.wm_transfer__state_code == "Input" || cr.wm_transfer__state_code == "InputAdd") {
|
cr.wm_transfer__state_code = "Input";
|
var row_ = {};
|
for (var k in cr) {
|
if (cr[k]) {
|
row_[k] = cr[k];
|
}
|
}
|
qty_total_ += row_.qty ? row_.qty*1 : 0;
|
tableData_.push(row_);
|
}
|
})
|
}
|
})
|
entity.qty_total = qty_total_;
|
if (tableData_.length == 0) {
|
Root.message({
|
type: 'warning',
|
message: '请先添加发货明细数据'
|
});
|
return
|
}
|
|
let param = {
|
dataname: this.dataname,
|
data: {},
|
}
|
// param.data["wm_transfer"] = entity;
|
param.data[this.dataname] = entity;
|
param.data[this.table_dataname] = tableData_;
|
|
// if(me.iscommit) {
|
// param.book_command = "Transfer.open"
|
// }
|
if (this.formData.id) {
|
param.id = this.formData.id
|
}
|
console.log(param);
|
// return
|
Server.call("root/data/" + operator_, param, function(result) {
|
console.log(result);
|
if (result.success) {
|
if(me.iscommit){
|
me.iscommit = false;
|
me.formData.state_code = "Input"
|
me.formData.state_name = "生效"
|
Root.message({
|
type: 'success',
|
message: '提交成功'
|
});
|
me.saveAfter();
|
}
|
else {
|
Root.message({
|
type: 'success',
|
message: '保存成功'
|
});
|
me.saveAfter();
|
}
|
}
|
}, function(errorresult) {
|
console.log("错误信息", errorresult);
|
|
if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) {
|
me.iscommit = false;
|
if (errorresult.messages.list) {
|
var config = {
|
totab: false,
|
// width: "1200px",
|
// height: 800,
|
icon: "icon-product",
|
text: "错误信息",
|
url: "module/tool/page/popup_error_messages.html",
|
data: {},
|
delta: errorresult.messages.list,
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
}
|
}
|
else {
|
if (me.iscommit) {
|
Root.message({
|
type: 'error',
|
message: '提交失败'
|
});
|
me.iscommit = false;
|
}
|
else {
|
Root.message({
|
type: 'error',
|
message: '保存失败'
|
});
|
}
|
|
}
|
});
|
},
|
|
// 通过或拒绝
|
onShowApproval(passOrRefuse) {
|
this.approveremark = "";
|
this.reasonvisible = true;//审批备注填写弹窗
|
this.passOrRefuse = passOrRefuse;// commit下一个状态;approve通过;gohome;//拒绝 goback;//回退
|
},
|
saveReason() {
|
this.loading_pass = true;
|
if(this.passOrRefuse == "commit" || this.passOrRefuse == "approve"){
|
this.doApproval();
|
}
|
else{
|
if(this.approveremark != ""){
|
this.doApproval();
|
}
|
else{
|
Root.message({
|
type: 'warning',
|
message: '请填写原因'
|
});
|
this.loading_pass = false;
|
}
|
}
|
},
|
doApproval(bo) {
|
var me = this;
|
this.getMachine(function(next_step, up_step) { //
|
me.doRunApproval(next_step, up_step);
|
});
|
},
|
|
getMachine(callback) {
|
var me = this;
|
let param = {
|
dataname: me.dataname,
|
}
|
Server.call("root/state/getMachine", param, function(result) {
|
var next_step = {}; // 向下流程
|
var up_step = {}; // 向上流程
|
|
if (result && result.machine && result.machine.detail) {
|
result.machine.detail.map(md=>{
|
next_step[md.from_code] = md.to_code;
|
up_step[md.to_code] = md.from_code;
|
})
|
|
callback(next_step, up_step);
|
}
|
})
|
},
|
|
doRunApproval(next_step, up_step) {
|
var me = this;
|
this.passOrRefuse;//首次开户-通过
|
// commit // 下一个状态
|
// approve // 通过
|
// gohome // 拒绝
|
// goback // 回退
|
|
var to_state_ = "";
|
if (this.passOrRefuse == "commit") {
|
to_state_ = next_step[this.formData.state_code];
|
}
|
else if (this.passOrRefuse == "approve") {
|
|
}
|
else if (this.passOrRefuse == "gohome") {
|
// to_state_ = up_step[this.formData.state_code];
|
}
|
else if (this.passOrRefuse == "goback") {
|
to_state_ = up_step[this.formData.state_code];
|
}
|
|
let param = {
|
dataname: me.dataname,
|
id: me.formData.id,
|
to_state: to_state_,
|
remark: this.approveremark
|
}
|
//
|
// return
|
Server.call("root/data/" + this.passOrRefuse, param, function(result) {
|
me.loading_pass = false;
|
console.log(result);
|
if (me.passOrRefuse == "commit" || me.passOrRefuse == "approve") {
|
Root.message({
|
type: 'success',
|
message: '审批成功'
|
});
|
}
|
else if (me.passOrRefuse == "goback") {
|
Root.message({
|
type: 'success',
|
message: '已退回'
|
});
|
}
|
else if (me.passOrRefuse == "gohome") {
|
Root.message({
|
type: 'success',
|
message: '已拒绝'
|
});
|
}
|
me.saveAfter();
|
}, function(errorresult) {
|
console.log("错误信息", errorresult);
|
me.loading_pass = false;
|
if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) {
|
if (errorresult.messages.list) {
|
var config = {
|
totab: false,
|
// width: "1200px",
|
// height: 800,
|
icon: "icon-product",
|
text: "错误信息",
|
url: "module/tool/page/popup_error_messages.html",
|
data: {},
|
delta: errorresult.messages.list,
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
|
}
|
}
|
else {
|
Root.message({
|
type: 'error',
|
message: '审批失败'
|
});
|
}
|
});
|
},
|
|
}
|
});
|
};
|
|
loadJsCss(function () {
|
initVue();
|
});
|
</script>
|
<style>
|
/* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
|
[v-cloak] {
|
display: none !important;
|
}
|
.h_row_headline td.el-table__cell{
|
background-color: #ffe1be !important;
|
}
|
.h_row_input td.el-table__cell{
|
background-color: #fff !important;
|
}
|
.h_row_freeze td.el-table__cell{
|
background-color: #d0d5d6 !important;
|
}
|
.h_row_headline td.el-table__cell .h_capsuletag{
|
border-radius: 5px;
|
background-color: #2984e2;
|
border-color: #409EFF;
|
color: #fff;
|
}
|
.h_row_input td.el-table__cell .h_capsuletag{
|
border-radius: 5px;
|
background-color: #F56C6C;
|
border-color: #F56C6C;
|
color: #fff;
|
}
|
</style>
|
|
</head>
|
|
<body style="margin: 0px;">
|
<div v-cloak id="vbody">
|
<div id="page_root">
|
<div ref="popup_body" style="padding: 0 20px;">
|
<div class="el-dialog__header">
|
<div class="dialog-title">
|
<i class="iconfont icon-customermanagement"></i>
|
<span> {{title}}</span>
|
</div>
|
</div>
|
<div :style="{height: dheight + 'px', 'overflow-y': 'auto'}">
|
<div class="el-dialog__body">
|
<h-form
|
ref="form2"
|
:form-attr="formAttr_channel"
|
:table-fields="meta_so_channel"
|
:form-data="channelOrderFormData"
|
:table-field-click="formfieldClick_channel"
|
>
|
</h-form>
|
|
<h-form
|
ref="form1"
|
:form-attr="formAttr"
|
:table-fields="formFields"
|
:form-data="formData"
|
:table-field-click="formfieldClick"
|
>
|
</h-form>
|
|
<div class="h_dialog__body">
|
<h-table
|
v-if="isRefresh && tableFields.length"
|
ref="table1"
|
:table-attr="tableAttr"
|
:table-fields="tableFields"
|
:table-data="tableData"
|
:is-within-edit-table-data="false"
|
:is-pagination="false"
|
:table-field-click="tablefieldClick"
|
:table-buttons-click="tablebuttonClick"
|
:is-selection="false"
|
:isfilterfield="false"
|
:isdraggableorder="false"
|
:show-summary="true"
|
:rowkey="rowkey"
|
:default-expand-all="true"
|
|
v-on:get-data="getData"
|
v-on:del-data="delData"
|
>
|
</h-table>
|
</div>
|
<el-dialog title="填写原因" :visible.sync="reasonvisible" height="50%">
|
<el-input
|
type="textarea"
|
:autosize="{ minRows: 2, maxRows: 10}"
|
placeholder="请输入原因"
|
v-model="approveremark">
|
</el-input>
|
|
<div slot="footer" class="dialog-footer" >
|
<el-button type="primary" :loading="loading_pass" @click="saveReason">确 定</el-button>
|
<el-button type="default" @click="reasonvisible = false">取 消</el-button>
|
</div>
|
</el-dialog>
|
|
</div>
|
</div>
|
<div class="el-dialog__footer">
|
<el-button-group style="margin-right: 80px;" >
|
<el-button size="small" v-if="isapproval" type="warning" plain @click="onShowApproval('gohome')">退回到申请人</el-button>
|
<el-button size="small" v-if="isapproval" type="danger" plain @click="onShowApproval('goback')">退回到上一步</el-button>
|
</el-button-group>
|
<el-button size="small" type="default" @click="closeDialog">取 消</el-button>
|
<el-button size="small" v-if="isedit && formData.id" type="primary" @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button>
|
<el-button size="small" v-if="isedit && formData.id" type="success" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button>
|
<!-- <el-button size="small" v-if="isrefuseedit" type="success" @click="">再次提交</el-button> -->
|
|
<!-- <el-button size="small" v-if="isapproval" type="danger" @click="onRefuseApproval">拒 绝</el-button> -->
|
<!-- <el-button size="small" v-if="isapproval" type="success" @click="onPassApproval">通 过</el-button> -->
|
<el-button size="small" v-if="isapproval" type="success" @click="onShowApproval('approve')">通 过</el-button>
|
<!-- <el-button size="small" v-if="isapproval" type="primary" @click="">转 办</el-button> -->
|
<!-- <el-button size="small" v-if="isapproval" type="success" @click="">退 回</el-button> -->
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;">
|
<div class="spinner">
|
<div class="cube1"></div>
|
<div class="cube2"></div>
|
</div>
|
</div>
|
</body>
|
</html>
|