| | |
| | | dataname: "agm_agreement", |
| | | //Tab项设置 |
| | | tabs_d: [//agm_agreement |
| | | {code: "Input", name: "费用单申请", dataname: "agm_agreement", filterTxt: " (agm_agreement.state_code='Input' or agm_agreement.state_code='Rejected' or agm_agreement.state_code='OpeningApproval')", orderby: "agm_agreement.update_time desc",}, |
| | | {code: "Open", name: "生效", dataname: "agm_agreement", filterTxt: " agm_agreement.state_code='Open'", orderby: "agm_agreement.update_time desc", }, |
| | | {code: "Close", name: "终止", dataname: "agm_agreement", filterTxt: " (agm_agreement.state_code='Closed' or date_to < NOW())", orderby: "agm_agreement.update_time desc",}, |
| | | {code: "All", name: "全部", dataname: "agm_agreement", filterTxt: "1=1", orderby: "agm_agreement.update_time desc",}, |
| | | {code: "Input", name: "费用单申请", dataname: "fee_payment", filterTxt: "state_code='Input'", orderby: "",}, |
| | | {code: "Open", name: "生效", dataname: "fee_payment", filterTxt: "state_code='Open'", orderby: "", }, |
| | | {code: "Close", name: "终止", dataname: "fee_payment", filterTxt: "state_code='Repeal'", orderby: "",}, |
| | | {code: "All", name: "全部", dataname: "fee_payment", filterTxt: "1=1", orderby: "",}, |
| | | ], |
| | | default_tableFields: [ |
| | | { field: "state_name", name: "状态", isshow: "T", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | // { field: "state_name", name: "状态", isshow: "T", width: "80"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80" }, |
| | | { field: "id", name: "费用单编号", isshow: "T", width: "120", isfilter: true }, |
| | | { field: "province", name: "省份", isshow: "T" ,width: "100"}, |
| | | { field: "rate", name: "费率", isshow: "T" ,width: "100"}, |
| | | { field: "amt_rate", name: "付款比例", isshow: "T" ,width: "100"}, |
| | | { field: "customer_code", name: "服务供应商编码", isshow: "T" ,width: "110"}, |
| | | { field: "customer_name", name: "服务供应商", isshow: "T" ,width: "200",align:"left"}, |
| | | { field: "amt", name: "应付金额", isshow: "T" ,width: "100",formatter:'formatter_money'}, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "center", width: "100",formatter:'formatter_money' }, |
| | | { field: "after_deduction_amt", name: "扣款后金额", isshow: "T", align: "center", width: "100",formatter:'formatter_money' }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center", width: "100" ,formatter:'formatter_date'}, |
| | | { field: "order_state", name: "尾款状态", isshow: "T", align: "center", width: "100" }, |
| | | { field: "order_code", name: "关联首款单号", isshow: "T", align: "center", width: "100", isfilter: true }, |
| | | { field: "province_order_code", name: "省级费用单号", isshow: "T", align: "center", width: "100", isfilter: true }, |
| | | { field: "payment", name: "付款金额", isshow: "T", align: "center", width: "100",formatter:'formatter_money' }, |
| | | { field: "payment_date", name: "付款时间", isshow: "T", align: "center", width: "100", isfilter: true ,formatter:'formatter_date'}, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", width: "100" }, |
| | | ], |
| | | |
| | | |
| | | // d_tabs: { |
| | | // Input: true, |
| | | // Working: true, |
| | |
| | | me.tableButtonClick(); |
| | | this.doQueryByTab(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.selectTabObj.dataname] && result.meta[me.selectTabObj.dataname].fields) { |
| | | var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | // var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | var filterFields_ = []; |
| | | var tableFields_ = []; |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | me.default_tableFields.map(f=>{ |
| | | |
| | | if (me.selectTabObj.code == 'Input') { |
| | | if (f.field == 'contract_attachment_name') { |
| | | f.isshow = "F"; |
| | | } |
| | | } |
| | | |
| | | if (me.isCustomer && (f.field == "contact_department" || f.field == "contact_phone" |
| | | || f.field == "template_attachment_name" || f.field == "logistics_code" |
| | | || f.field == "creator_name" || f.field == "create_time" || f.field == "update_time" |
| | | )) { |
| | | f.isshow = "F" |
| | | f.isfilter = false |
| | | } |
| | | |
| | | if (me.isCustomer && me.selectTabObj.code != "Close" && (f.field == "suspend_date" || f.field == "suspend_remark")) { |
| | | f.isshow = "F" |
| | | f.isfilter = false |
| | | } |
| | | |
| | | if (f.isfilter) { |
| | | filterFields_.push(clone(f)); |
| | | } |
| | | else { |
| | | var filter_f = clone(f); |
| | | filter_f.isshow = "F"; |
| | | filterFields_.push(filter_f); |
| | | } |
| | | |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | if (!me.selectTabObj.filterFields || (me.selectTabObj.filterFields && me.selectTabObj.filterFields.length == 0)) { |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(tableFields_); |
| | | me.selectTabObj.tableFields = clone(me.default_tableFields); |
| | | |
| | | // me.selectTabObj.filterFields = clone(me.default_filterFields); |
| | | // me.selectTabObj.tableFields = clone(me.default_tableFields); |
| | |
| | | tablebuttonClick.Input = [ |
| | | { |
| | | // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.add ? me.cbuttons_r.add : false, |
| | | isbuttonshow: true, |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openAgreement('add', obj.selectedList[0]); |
| | | me.openPayment('add') |
| | | } |
| | | }, |
| | | { |
| | | // name: "提交", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.submit ? me.cbuttons_r.submit : false, type: "success", |
| | | code: "submit", isselected: true, classname: "", |
| | | isbuttonshow:true, type: "success", |
| | | code: "edit", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Input") { |
| | |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.commitData(obj.selectedList[0]); |
| | | me.openAgreement('edit', obj.selectedList[0]); |
| | | me.openPayment('edit') |
| | | } |
| | | }, |
| | | { |
| | | // name: "详情", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false, |
| | | isbuttonshow: true, |
| | | code: "formdetail", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openAgreement('browse', obj.selectedList[0]); |
| | | me.openPayment('browse') |
| | | } |
| | | }, |
| | | { |
| | | // name: "编辑", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.edit ? me.cbuttons_r.edit : false, |
| | | code: "edit", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | // name: "作废", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: true, type: "danger", |
| | | code: "cancel", isselected: true, classname: "", |
| | | islistselected: true, // 可以多选 |
| | | disabled: function(selectRowList, selectedList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Input") { |
| | | if (selectedList.length) { // 可以多选 |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openAgreement('edit', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false, type: "danger", |
| | | isbuttonshow: true, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | |
| | | // } |
| | | // }, |
| | | |
| | | { |
| | | name: "协议打印", type: "primary", icon: "el-icon-copy-document", |
| | | isbuttonshow: me.cbuttons_r.PDFFile ? me.cbuttons_r.PDFFile : false, |
| | | code: "PDFFile", isselected: true, classname: "", |
| | | disabled: function(selectRowList, selectedList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].comeback_attachment_id) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.showFileImgByFileId(me.selectTabObj.selectedrow, 'comeback_attachment_name', 'comeback_attachment_id', me.dataname) |
| | | } |
| | | }, |
| | | { |
| | | name: "协议回挂", type: "primary", icon: "el-icon-copy-document", |
| | | isbuttonshow: me.cbuttons_r.uploadFilePDF ? me.cbuttons_r.uploadFilePDF : false, |
| | | code: "uploadFilePDF", isselected: true, classname: "", |
| | | disabled: function(selectRowList, selectedList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.onPopupByUploadFile(me.selectTabObj.selectedrow, 'comeback_attachment_name', 'comeback_attachment_id', me.dataname) |
| | | } |
| | | }, |
| | | { |
| | | name: "续签", type: "primary", icon: "el-icon-copy-document", |
| | | isbuttonshow: me.cbuttons_r.agmCopy ? me.cbuttons_r.agmCopy : false, |
| | |
| | | }) |
| | | } |
| | | }, |
| | | { |
| | | name: "变更", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.change ? me.cbuttons_r.change : false, |
| | | code: "change", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Open") { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openAgreement('change', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | // name: "作废", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.repeal ? me.cbuttons_r.repeal : false, type: "danger", |
| | |
| | | var tablefieldClick = {}; |
| | | //表格字段事件设置 |
| | | tablefieldClick = { |
| | | agreement_no: {//字段事件设置 |
| | | id: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | //打开 |
| | | me.onShowData(obj); |
| | | me.openPayment('browse'); |
| | | }, |
| | | }, |
| | | defaultval: { |
| | | val: "查看",//空值时的显示值 |
| | | onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | me.onShowData(obj); |
| | | } |
| | | }, |
| | | }, |
| | | state_name: {//状态 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","草稿"], |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | var config = { |
| | | totab: false, |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "popup_workflow_step_user" + obj.row.id, |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {}, |
| | | sceneCode: "browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | template_attachment_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [{field:"contract_attachment_id", val: null}],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | //打开 |
| | | me.showFileImgByFileId(obj.row, "template_attachment_name", "contract_attachment_id", me.dataname); |
| | | }, |
| | | }, |
| | | }, |
| | | contract_attachment_name: {//字段事件设置 |
| | | defaultval: { |
| | | val: "原协议上传",//空值时的显示值 |
| | | onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | me.onPopupByUploadFile(obj.row, "contract_attachment_name", "contract_attachment_id", me.dataname); |
| | | } |
| | | }, |
| | | val:{ |
| | | onclick: function(obj){ |
| | | me.showFileImgByFileId(obj.row, "contract_attachment_name", "contract_attachment_id", me.dataname); |
| | | } |
| | | }, |
| | | suffixval: { |
| | | val: "原协议上传",//有值时的后缀,此后缀和单位后缀不同,如:详情,更多,查看等 |
| | | onclick: function(obj) {//有值时的后缀点击事件,此事件需要设置val才有效 |
| | | me.onPopupByUploadFile(obj.row, "contract_attachment_name", "contract_attachment_id", me.dataname); |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | comeback_attachment_name: {//字段事件设置 |
| | | defaultval: { |
| | | val: "协议回挂",//空值时的显示值 |
| | | onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | me.onPopupByUploadFile(obj.row, "comeback_attachment_name", "comeback_attachment_id", me.dataname); |
| | | } |
| | | }, |
| | | val:{ |
| | | onclick: function(obj){ |
| | | me.showFileImgByFileId(obj.row, "comeback_attachment_name", "comeback_attachment_id", me.dataname); |
| | | } |
| | | }, |
| | | suffixval: { |
| | | val: "协议回挂",//有值时的后缀,此后缀和单位后缀不同,如:详情,更多,查看等 |
| | | onclick: function(obj) {//有值时的后缀点击事件,此事件需要设置val才有效 |
| | | me.onPopupByUploadFile(obj.row, "comeback_attachment_name", "comeback_attachment_id", me.dataname); |
| | | } |
| | | }, |
| | | // defaultval: { |
| | | // val: "查看",//空值时的显示值 |
| | | // onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | // me.onShowData(obj); |
| | | // } |
| | | // }, |
| | | }, |
| | | }; |
| | | |
| | | tablefieldClickBeforeOpen = { |
| | | agreement_no: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | //打开 |
| | | me.onShowData(obj); |
| | | }, |
| | | }, |
| | | defaultval: { |
| | | val: "查看",//空值时的显示值 |
| | | onclick: function(obj) {//默认值点击事件,此事件需要设置val才有效 |
| | | me.onShowData(obj); |
| | | } |
| | | }, |
| | | }, |
| | | state_name: {//状态 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","草稿"], |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | var config = { |
| | | totab: false, |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "popup_workflow_step_user" + obj.row.id, |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {}, |
| | | sceneCode: "browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | template_attachment_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [{field:"contract_attachment_id", val: null}],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | //打开 |
| | | me.showFileImgByFileId(obj.row, "template_attachment_name", "contract_attachment_id", me.dataname); |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | if (this.selectTabObj.code != 'Input') { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick; |
| | | } else { |
| | | this.selectTabObj.tablefieldClick = tablefieldClickBeforeOpen; |
| | | } |
| | | }, |
| | | |
| | | onSuspend(callback) { |
| | |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | onShowData(obj) { |
| | | var me = this; |
| | | var row = obj.row; |
| | | |
| | | //1. empty row |
| | | if (!row || !row.id) { |
| | | openPayment(sceneCode){ |
| | | let me = this; |
| | | var row = {}; |
| | | if (sceneCode == "edit" || sceneCode == "browse") { |
| | | row = me.selectTabObj.selectedrow; |
| | | if (!row.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择要查看的数据' |
| | | message: '请选择一条数据' |
| | | }); |
| | | return false; |
| | | return; |
| | | } |
| | | |
| | | } |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "900px", |
| | | height: "900px", |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "协议详情", |
| | | id: "apply_edit_b" + row.id, |
| | | url: "module/md/page/customer/page/customer_list_agreement_edit.html", |
| | | text: "单据信息" + (row.name ? row.name : ""), |
| | | id: "fee_payment" + (row.id? row.id : "add"),//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/fee/page/popup/popup_fee_payment.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: "browse", //"add"//"browse", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | onAddData() { |
| | | var me = this; |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | icon: "icon-product", |
| | | text: "协议信息", |
| | | id: "apply_edit",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_list_agreement_edit.html", |
| | | data: {}, |
| | | delta: {}, |
| | | sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | commitData(obj) { |
| | | var me = this; |
| | | Root.confirm('确定提交协议' + obj.agreement_no + '吗?', '提交提示', { |
| | | confirmButtonText: '提交', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | var param = { |
| | | dataname: me.selectTabObj.dataname, |
| | | id: obj.id, |
| | | // to_state: "OpeningApproval" |
| | | } |
| | | Server.call("root/data/commit", param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '提交成功' |
| | | }); |
| | | me.onQuery(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | onEditData() { |
| | | var me = this; |
| | | var row = this.selectTabObj.selectedrow;; |
| | | |
| | | //1. empty row |
| | | if (!row || !row.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择要编辑的数据' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | icon: "icon-product", |
| | | text: "协议信息", |
| | | id: "apply_edit" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_list_agreement_edit.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | delData: function(scope) { |
| | | let me = this; |
| | | var row = me.selectTabObj.selectedrow; |
| | |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //作废模板 |
| | | cancelConfirm() { |
| | | let me = this; |
| | | data = me.selectTabObj.selectedrow; |
| | | Root.confirm('确定终止-' + data.agreement_no + '-吗?', '终止提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | me.onCancelData(); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消终止' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | onCancelData() { |
| | | var me = this; |
| | | |
| | | let param = { |
| | | dataname: me.dataname, |
| | | data: { |
| | | "agm_agreement" :{ |
| | | id: me.selectTabObj.selectedrow.id, |
| | | date_suspend: "", // 终止日期 |
| | | remark_suspend: "", // 终止说明 |
| | | state_code: "Cancel", |
| | | state_name: "终止", |
| | | } |
| | | }, |
| | | } |
| | | |
| | | Server.call("root/data/saveEntity", param, function(result) { |
| | | console.log(result); |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '已作废' |
| | | }); |
| | | me.onQuery(); |
| | | }); |
| | | }, |
| | | |
| | | showFileImgByFileId(row, filenamefield, fileidfield, dataname) { |
| | | let me = this; |
| | | var file_name = row[filenamefield]; |
| | | var file_id = row[fileidfield]; |
| | | 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 == ".pdf") { |
| | | var row = { |
| | | fileid: fileid, |
| | | filename: fileName, |
| | | dataname: dataname |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, |
| | | width: "1000px", |
| | | 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(row, filenamefield, fileidfield, dataname) { |
| | | var me = this; |
| | | if (row.state_code != 'Open') { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '仅生效数据可以进行协议回挂' |
| | | }); |
| | | return; |
| | | } |
| | | var txt_ = ""; |
| | | var isexists = false; |
| | | if (filenamefield == "comeback_attachment_name") { // 协议回挂 |
| | | txt_ = "重新进行协议回挂将替换原回挂协议"; |
| | | if (row.comeback_attachment_id) { |
| | | isexists = true; |
| | | } |
| | | } |
| | | else if (filenamefield == "contract_attachment_name") { // 协议原件 |
| | | txt_ = "重新上传协议原件将替换原协议原件"; |
| | | if (row.contract_attachment_id) { |
| | | isexists = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | if (isexists) { |
| | | Root.confirm(txt_, '上传提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | me.doPopupByUploadFile(row, filenamefield, fileidfield, dataname); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消上传' |
| | | }); |
| | | }); |
| | | } else { |
| | | me.doPopupByUploadFile(row, filenamefield, fileidfield, dataname); |
| | | } |
| | | }, |
| | | |
| | | doPopupByUploadFile(row, filenamefield, fileidfield, dataname) { |
| | | var me = this; |
| | | var analysistype_ = ""; |
| | | var delta_ = {filetypelist: []}//[".png", ".jpg", ".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: row.id, |
| | | fileNamefieldName: filenamefield |
| | | }, |
| | | delta: delta_, |
| | | callback: function(fileobj, callback) { |
| | | me.$message({ |
| | | showClose: true, |
| | | message: '上传成功!', |
| | | type: 'success' |
| | | }); |
| | | row[filenamefield] =decodeURI(fileobj.row[0].name); |
| | | row[fileidfield] = fileobj.row[0].id; |
| | | me.onQuery(); |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | }, |
| | | |
| | | download() { |
| | |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | |
| | | rowClick(obj){ |
| | | var me = this; |
| | | me.selectTabObj.selectedrow = obj.row; |
| | | }, |
| | | selectionChange(obj){ |
| | | var me = this; |
| | | me.selectTabObj.selectedrows = obj; |
| | | me.selectedrows = obj; |
| | | }, |
| | | saveShoppingcart(list) { |
| | | var me = this; |
| | | me.selectTabObj.selectedrows = list; |
| | | }, |
| | | onDownload() { |
| | | let me = this; |
| | | var ioname = "" |
| | | var filename = '协议导出' + String(new Date().getTime()); |
| | | var filter_ = "1 = 1"; |
| | | filter_ = this.getFilterData(filter_); |
| | | if (me.selectTabObj.code == "Input") { |
| | | ioname = "export_agm" |
| | | filename = '协议申请导出' + String(new Date().getTime()); |
| | | } |
| | | else if (me.selectTabObj.code == "Open") { |
| | | ioname = "export_agm_apply" |
| | | } |
| | | let param = { |
| | | sign: "agm_agreement", |
| | | filename: filename, |
| | | filter: filter_, |
| | | ioname:ioname, |
| | | orderby: "", |
| | | token: Root.getToken() |
| | | } |
| | | window.top.vue.textdownloadForm(param); |
| | | }, |
| | | |
| | | editLogisticsCode() { |
| | | var me = this; |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "500px", |
| | | height: "300px", |
| | | icon: "icon-product", |
| | | text: "编辑物流单号", |
| | | id: "delivery_info_expresscode" + me.selectTabObj.selectedrow.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/agreement-popup/delivery_info_expresscode.html", |
| | | data: me.selectTabObj.selectedrow, |
| | | delta: {}, |
| | | sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | openAgreement(sceneCode, obj) { |
| | | let me = this; |
| | | var row = {} |
| | | if (sceneCode == "edit" || sceneCode == "browse" || sceneCode == "change") { |
| | | row = me.selectTabObj.selectedrow; |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "协议详情" + (row.customer_name ? ("-" + row.customer_name) : ""), |
| | | id: "customer_list_agreement_edit" + row.id + sceneCode,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_list_agreement_edit.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | DownloadTemplate() { |
| | | var pathurl = ""; |
| | | if (this.selectTabObj.code == "Input") { |
| | | pathurl = "template/1.导入模板/0_协议申请导入.xlsx"; |
| | | } |
| | | handleDownload(pathurl); |
| | | }, |
| | | |
| | | |
| | | onPopupByUploadFileToDB() { |
| | | var me = this; |
| | | var delta_ = { |
| | | filetypelist: [], |
| | | isToDB: true, |
| | | dataname: this.selectTabObj.dataname, |
| | | tableFields: this.selectTabObj.tableFields, |
| | | otherSave: "salesBizLogic/saveDealerTargetByImport", |
| | | } |
| | | var config = { |
| | | totab: false, |
| | | width: "500px", |
| | | icon: "icon-product", |
| | | text: "数据文件上传", |
| | | id: "popup_uploadFileToDB", |
| | | url: "module/tool/page/popup_uploadFileToDB.html", |
| | | data: { |
| | | uploadType: "dealertarget", |
| | | tempTable: "temp_target_dealer", |
| | | operate_type: "dealertarget", |
| | | userid: me.userid, |
| | | ioname:"", |
| | | // position_id: me.position_id, |
| | | }, |
| | | delta: delta_, |
| | | callback: function(obj, callback) { |
| | | me.$message({ |
| | | showClose: true, |
| | | message: '上传成功!', |
| | | type: 'success' |
| | | }); |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | me.selectedrows = list; |
| | | }, |
| | | |
| | | } |
| | |
| | | <el-button v-show="cbuttons_r.Renew" @click="onCopy" :disabled="!(selectedrows.length > 0)">协议续签</el-button> |
| | | </el-button-group> --> |
| | | <el-button-group style="margin-left: 3px;"> |
| | | <el-button v-show="cbuttons_r.downloadTemplate && selectTabObj.code == 'Input'" @click="DownloadTemplate">模板下载</el-button> |
| | | <el-button v-show="cbuttons_r.import && selectTabObj.code == 'Input'" @click="onPopupByUploadFileToDB":icon="buttonsconfig.import.icon">{{buttonsconfig.import.name}}</el-button> |
| | | <el-button v-show="cbuttons_r.export && (selectTabObj.code == 'Input' || selectTabObj.code == 'Open')" type="primary" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | <el-button type="primary" @click="" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> |
| | | </div> |
| | | </div> |
| | |
| | | title: "数量单确认", |
| | | //Tab项设置 |
| | | tabs_d: [ |
| | | {code: "matched", name: "匹配数量单", dataname: "md_org_customer", filterTxt: "", orderby: "md_org.update_time desc, md_org.code"}, |
| | | {code: "notmatched", name: "不匹配数量单", dataname: "md_org_account", filterTxt: "(md_org_account.state_code='OpeningApproval' or md_org_account.state_code='Open' or md_org_account.state_code='CooperateApproval')", orderby: "md_org_account.update_time desc, md_org_account.code"}, |
| | | {code: "Open", name: "已确认数量单", dataname: "md_org_partnership", filterTxt: "md_org_account.state_code='Incooperation'", orderby: "md_org_account.update_time desc, md_org_account.code"}, |
| | | {code: "matched", name: "匹配数量单", dataname: "fee_qty", filterTxt: "state_code='Input'", orderby: ""}, |
| | | {code: "notmatched", name: "不匹配数量单", dataname: "fee_qty", filterTxt: "state_code='Refused'"}, |
| | | {code: "Open", name: "已确认数量单", dataname: "fee_qty", filterTxt: "state_code='Comfirmed'", orderby: ""}, |
| | | ], |
| | | filterTxt: "", |
| | | default_tableFields: { |
| | | matched: [ |
| | | { field: "state_name", name: "状态", isshow: "T", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80",isnotfilter:'true' }, |
| | | { field: "id", name: "确认单号", isshow: "T", width: "120", isfilter: true }, |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "date", name: "销售日期", isshow: "T",width: "100",type:"date",formatter:"formatter_date"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "150" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "invoince_price", name: "开票价", isshow: "T", align: "center", }, |
| | | { field: "settlement_price", name: "结算低价", isshow: "T", align: "center", }, |
| | | { field: "tax", name: "税点", isshow: "T", align: "center", }, |
| | | { field: "policy", name: "政策", isshow: "T", align: "center", }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "comfirm_qyt", name: "确认数量", isshow: "T", align: "center", }, |
| | | { field: "return_qty", name: "应返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "returned_qty", name: "实返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "deduction_remark", name: "扣款备注", isshow: "T", align: "left",width:'200' }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | { field: "order_total", name: "订单金额", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_amt", name: "订单单价", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_state", name: "订单状态", isshow: "T", align: "center",width:'80' }, |
| | | { field: "platform_information", name: "平台信息", isshow: "T", align: "center", }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", }, |
| | | { field: "product_group", name: "产品组", isshow: "T", align: "center", }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "pre_merger_customer", name: "合并前客户", isshow: "T", align: "center", width: "100" }, |
| | | { field: "last_arrpove_time", name: "最后审批时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "agency_fee_state", name: "代理费用单状态", isshow: "T", align: "center",width: "110" }, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", }, |
| | | { field: "ferrze_remark", name: "冻结原因", isshow: "T", align: "left", }, |
| | | ], |
| | | notmatched:[ |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "no_commit_remark", name: "未提交原因", isshow: "T", align: "center", width:'150' }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "150" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | ], |
| | | Open: [ |
| | | { field: "state_name", name: "状态", isshow: "T", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80" }, |
| | | { field: "id", name: "确认单号", isshow: "T", width: "120", isfilter: true }, |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "date", name: "销售日期", isshow: "T",width: "100",type:"date",formatter:"formatter_date"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "100" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "invoince_price", name: "开票价", isshow: "T", align: "center", }, |
| | | { field: "settlement_price", name: "结算低价", isshow: "T", align: "center", }, |
| | | { field: "tax", name: "税点", isshow: "T", align: "center", }, |
| | | { field: "policy", name: "政策", isshow: "T", align: "center", }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "comfirm_qyt", name: "确认数量", isshow: "T", align: "center", }, |
| | | { field: "return_qty", name: "应返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "returned_qty", name: "实返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "deduction_remark", name: "扣款备注", isshow: "T", align: "left",width:'200' }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | { field: "order_total", name: "订单金额", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_amt", name: "订单单价", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_state", name: "订单状态", isshow: "T", align: "center",width:'80' }, |
| | | { field: "platform_information", name: "平台信息", isshow: "T", align: "center", }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", }, |
| | | { field: "product_group", name: "产品组", isshow: "T", align: "center", }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "pre_merger_customer", name: "合并前客户", isshow: "T", align: "center", width: "100" }, |
| | | { field: "last_arrpove_time", name: "最后审批时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "agency_fee_state", name: "代理费用单状态", isshow: "T", align: "center",width: "110" }, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", }, |
| | | { field: "ferrze_remark", name: "冻结原因", isshow: "T", align: "left", }, |
| | | ], |
| | | }, |
| | | d_tabs: { |
| | | matched: true, |
| | | nccsy: true, |
| | |
| | | //设置工具栏事件 |
| | | this.doQueryByTab(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.selectTabObj.dataname] && result.meta[me.selectTabObj.dataname].fields) { |
| | | var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | // var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | var filterFields_ = []; |
| | | var tableFields_ = []; |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | me.default_tableFields[me.activeTabName].map(f=>{ |
| | | // f.issortable = "custom" |
| | | // if (me.selectTabObj.code == "matched") { |
| | | // if(f.field == 'state_detail_name' || f.field == 'actor' || f.field == 'business_need_code'){ |
| | |
| | | // f.isshow = "F"; |
| | | // } |
| | | // } |
| | | if (f.field != 'state_code') { |
| | | filterFields_.push(clone(f)) |
| | | |
| | | if(me.selectTabObj.code == "distributorlist" && f.field == 'ncc_code'){ |
| | | f.isshow = "F"; |
| | | f.isfilter = false; |
| | | } |
| | | |
| | | if(f.field == 'category_code' || f.field == 'is_preload' || f.field == 'credit_amt' || f.field == 'credit_available' || f.field == 'order_date' || f.field == 'hope_delivery' || f.field == 'amt_available'){ |
| | | f.isshow = "F"; |
| | | } |
| | | if (f.isfilter) { |
| | | if (f.field == "state_name") { |
| | | f.options = me.dataRequestObj.machine_state; |
| | | } |
| | | filterFields_.push(clone(f)); |
| | | } |
| | | else { |
| | | var filter_f = clone(f); |
| | | filter_f.isshow = "F"; |
| | | filterFields_.push(filter_f); |
| | | } |
| | | |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | |
| | |
| | | if (!me.selectTabObj.filterFields || (me.selectTabObj.filterFields && me.selectTabObj.filterFields.length == 0)) { |
| | | |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(tableFields_); |
| | | me.selectTabObj.tableFields = clone(me.default_tableFields[me.activeTabName]); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | |
| | | var filterfieldClick = {}; |
| | | //表格字段事件设置 |
| | | tablefieldClick.All = { |
| | | |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {machine_code: "Org_Account_Open", dataname: "md_org_account"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | md_org__code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | var row = {} |
| | | if (me.activeTabName == "matched" || me.activeTabName == "distributorlist") { // 客商信息 |
| | | row = obj.row; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | else { |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | |
| | | url = "customer_basic.html"; |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_basic_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | if (me.activeTabName == "matched" || me.activeTabName == "distributorlist") { // 客商信息 |
| | | url = "customer_basic.html"; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | url = "customer_ncc.html"; |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "80vh", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | name: { |
| | | input: { |
| | | valuekey: "name", // 输入框搜索时的选项对应字段 |
| | | onQuerySearch: function(obj, callback) { // 输入框搜索事件 |
| | | let param_ = { |
| | | dataname: "md_org_customer", |
| | | filter: obj.fieldobj.field + " like '%" + obj.inputstring + "%'", |
| | | orderby: obj.fieldobj.field |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | var inputoptions_ = [] |
| | | if (result && result.data && result.data.entityset) { |
| | | inputoptions_ = result.data.entityset; |
| | | callback(inputoptions_) |
| | | } |
| | | else { |
| | | callback(inputoptions_) |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | tablefieldClick.Change = { |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","录入"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {machine_code: "Org_Account_Open"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | type_name: {//类型 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "", |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | //打开 |
| | | // me.openBrowseDetail(obj) |
| | | me.openChangeCustomerUser('browse', obj.row) |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | }; |
| | | |
| | | tablefieldClick.matched = { |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["未生效"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "600px", |
| | | height: "450px", |
| | | icon: "icon-product", |
| | | text: "开户信息", |
| | | id: "popup_account_state" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_account_state.html", |
| | | data: obj.row, |
| | | // dataname:me.selectTabObj.dataname, |
| | | filter:"org_id='" + obj.row.id + "'", //标识2:无对应的字段进行过滤 |
| | | delta: {from: "customer_list_account"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | md_org__code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | /* |
| | | tabs_d: [ |
| | | {code: "matched", name: "客商列表", dataname: "md_org", filterTxt: "actor_id<>'Master'", orderby: "update_time desc, code"}, |
| | | {code: "nccsy", name: "NCC首营", dataname: "md_org_account_ncc", filterTxt: "1=1", orderby: "update_time desc, code"}, |
| | | {code: "notmatched", name: "待开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Input'", orderby: "update_time desc, code"}, |
| | | {code: "Open", name: "已开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Open'", orderby: "update_time desc, code"}, |
| | | {code: "Close", name: "已关闭", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Close'", orderby: "update_time desc, code"}, |
| | | {code: "All", name: "全部", dataname: "md_org_account", filterTxt: "1=1", orderby: "md_org_account.update_time desc, code"}, |
| | | {code: "Change", name: "变更申请", dataname: "md_org_account_change", orderby: "update_time desc"}, |
| | | ], |
| | | |
| | | */ |
| | | var row = {} |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | row = obj.row; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | |
| | | url = "customer_basic.html"; |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | /* |
| | | tabs_d: [ |
| | | {code: "matched", name: "客商列表", dataname: "md_org", filterTxt: "actor_id<>'Master'", orderby: "update_time desc, code"}, |
| | | {code: "nccsy", name: "NCC首营", dataname: "md_org_account_ncc", filterTxt: "1=1", orderby: "update_time desc, code"}, |
| | | {code: "notmatched", name: "待开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Input'", orderby: "update_time desc, code"}, |
| | | {code: "Open", name: "已开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Open'", orderby: "update_time desc, code"}, |
| | | {code: "Close", name: "已关闭", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Close'", orderby: "update_time desc, code"}, |
| | | {code: "All", name: "全部", dataname: "md_org_account", filterTxt: "1=1", orderby: "md_org_account.update_time desc, code"}, |
| | | {code: "Change", name: "变更申请", dataname: "md_org_account_change", orderby: "update_time desc"}, |
| | | ], |
| | | |
| | | */ |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | url = "customer_basic.html"; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | url = "customer_ncc.html"; |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | name: { |
| | | input: { |
| | | valuekey: "name", // 输入框搜索时的选项对应字段 |
| | | onQuerySearch: function(obj, callback) { // 输入框搜索事件 |
| | | let param_ = { |
| | | dataname: "md_org_customer", |
| | | filter: obj.fieldobj.field + " like '%" + obj.inputstring + "%'", |
| | | orderby: obj.fieldobj.field |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | var inputoptions_ = [] |
| | | if (result && result.data && result.data.entityset) { |
| | | inputoptions_ = result.data.entityset; |
| | | callback(inputoptions_) |
| | | } |
| | | else { |
| | | callback(inputoptions_) |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | | tablefieldClick.nccsy = { |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["DMS未开户"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "600px", |
| | | height: "450px", |
| | | icon: "icon-product", |
| | | text: "开户信息", |
| | | id: "popup_account_state" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_account_state.html", |
| | | data: obj.row, |
| | | dataname: "md_org_account", |
| | | filter:"md_org_account.org_ncc_id='" + obj.row.id + "'",//标识2:没有可点击的值,待验证 |
| | | delta: {from: "customer_list_account"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | md_org__code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | /* |
| | | tabs_d: [ |
| | | {code: "matched", name: "客商列表", dataname: "md_org", filterTxt: "actor_id<>'Master'", orderby: "update_time desc, code"}, |
| | | {code: "nccsy", name: "NCC首营", dataname: "md_org_account_ncc", filterTxt: "1=1", orderby: "update_time desc, code"}, |
| | | {code: "notmatched", name: "待开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Input'", orderby: "update_time desc, code"}, |
| | | {code: "Open", name: "已开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Open'", orderby: "update_time desc, code"}, |
| | | {code: "Close", name: "已关闭", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Close'", orderby: "update_time desc, code"}, |
| | | {code: "All", name: "全部", dataname: "md_org_account", filterTxt: "1=1", orderby: "md_org_account.update_time desc, code"}, |
| | | {code: "Change", name: "变更申请", dataname: "md_org_account_change", orderby: "update_time desc"}, |
| | | ], |
| | | |
| | | */ |
| | | var row = {} |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | row = obj.row; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | |
| | | url = "customer_basic.html"; |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | url = "customer_basic.html"; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | url = "customer_ncc.html"; |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | name: { |
| | | input: { |
| | | valuekey: "name", // 输入框搜索时的选项对应字段 |
| | | onQuerySearch: function(obj, callback) { // 输入框搜索事件 |
| | | let param_ = { |
| | | dataname: "md_org_customer", |
| | | filter: obj.fieldobj.field + " like '%" + obj.inputstring + "%'", |
| | | orderby: obj.fieldobj.field |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | var inputoptions_ = [] |
| | | if (result && result.data && result.data.entityset) { |
| | | inputoptions_ = result.data.entityset; |
| | | callback(inputoptions_) |
| | | } |
| | | else { |
| | | callback(inputoptions_) |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (this.activeTabName == "Change") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | } |
| | |
| | | var tablebuttonClick = {}; |
| | | tablebuttonClick.matched = [ |
| | | { |
| | | isbuttonshow: me.cbuttons_r.add ? me.cbuttons_r.add : false,type:"primary", |
| | | code: "add",isselected: false,classname: "", |
| | | onclick: function(obj) { |
| | | me.openCustomer('add') |
| | | } |
| | | }, |
| | | { |
| | | isbuttonshow: me.cbuttons_r.customerEdit ? me.cbuttons_r.customerEdit : false,type:"primary", |
| | | code: "edit",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Input") { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomer('edit') |
| | | } |
| | | }, |
| | | { |
| | | name: "转预合作", isbuttonshow: true,type:"success",icon: "el-icon-news", |
| | | name: "确认", isbuttonshow: true,type:"success",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && (selectRowList[0].state_code == "Open" || selectRowList[0].state_code == "Prepared")) { |
| | | if (selectRowList[0] ) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.commitData(obj.selectedList[0]); |
| | | obj.selectedList[0]['company_id'] = '1181' |
| | | obj.selectedList[0]['company_name'] = '汇宇制药' |
| | | obj.selectedList[0]['bu_id'] = 'BU-GM' |
| | | obj.selectedList[0]['bu_name'] = '肿瘤' |
| | | console.log(obj.selectedList[0]) |
| | | me.openCustomerUser('add', obj.selectedList[0]); |
| | | |
| | | } |
| | | }, |
| | | { |
| | | name: "冻结", isbuttonshow: true,type:"danger",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | } |
| | | }, |
| | | { |
| | | name: "解除冻结", isbuttonshow: true,type:"warning",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | } |
| | | }, |
| | | // { |
| | |
| | | // onclick: function(obj) { |
| | | // me.repealDataPolicy(obj, obj.selectedList[0]) |
| | | // } |
| | | // }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Input') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | me.delData() |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.closeData(); |
| | | } |
| | | }, |
| | | |
| | | |
| | | // { |
| | | // // name: "终止", // type: "primary", // icon: "el-icon-edit", |
| | |
| | | // }, |
| | | ] |
| | | |
| | | tablebuttonClick.nccsy = [ |
| | | { |
| | | name: "开户", isbuttonshow: me.cbuttons_r.accountOpenNCC ? me.cbuttons_r.accountOpenNCC : false,type:"success",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomerUserByNCCId('add', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | ] |
| | | tablebuttonClick.Open = [{ |
| | | name: "重发邮件", isbuttonshow: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"primary",icon: "el-icon-message", |
| | | code: "account",isselected: true,classname: "",isloading: false, |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Open') { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | obj.buttonobj.isloading = true |
| | | me.toAccountMail(obj.selectedList[0], function(){ |
| | | obj.buttonobj.isloading = false |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | name: "退出", isbuttonshow: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"danger",icon: "el-icon-circle-close", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'InCooperation') { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // me.closeData(); |
| | | me.openCustomerUser('close', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | { |
| | | name: "变更", isbuttonshow: me.cbuttons_r.accountChange ? me.cbuttons_r.accountChange : false,type:"primary",icon: "el-icon-share", |
| | | code: "change",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'InCooperation') { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomerUser('change', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | // { |
| | | // name: "编辑", isbuttonshow: me.cbuttons_r.accountCloseEdit ? me.cbuttons_r.accountCloseEdit : false,type:"primary",icon: "el-icon-edit-outline", |
| | | // code: "account",isselected: true,classname: "", |
| | | // disabled: function(selectRowList) { |
| | | // var bo_ = true; |
| | | // if (selectRowList[0] && (selectRowList[0].state_code == 'Rejected' || selectRowList[0].state_code == 'CloseingSaleInput')) { |
| | | // bo_ = false; |
| | | // } |
| | | // return bo_ |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // me.closeDataEdit(); |
| | | // } |
| | | // }, |
| | | { |
| | | name: "等级设置", type: "primary", icon: "el-icon-edit", |
| | | // isbuttonshow: me.cbuttons_r.edit_degree ? me.cbuttons_r.edit_degree : false, |
| | | isbuttonshow: true, |
| | | code: "edit_degree", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | var fieldobjlist = [ |
| | | {isshow: "T", field: "degree", name: "等级", type: "input"} |
| | | ] |
| | | me.editFieldsByFieldList(fieldobjlist, obj.selectedList[0], function(suspendData){ |
| | | var selectedList_ = clone(obj.selectedList); |
| | | selectedList_.map(row=>{ |
| | | fieldobjlist.map(f=>{ |
| | | row[f.field] = suspendData[f.field] |
| | | }) |
| | | }) |
| | | me.onSaveDataByFieldLsit(selectedList_, me.selectTabObj.dataname, fieldobjlist, function(){ |
| | | me.onQuery(); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | tablebuttonClick.notmatched = [ |
| | | { |
| | | name: "转合作", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.commitData ? me.cbuttons_r.commitData : false, type: "success", |
| | | code: "toCooperation", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Open') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.commitData(obj.selectedList[0]); |
| | | me.commitnCustomerUser('edit', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | // name: "详情", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false, |
| | | code: "formdetail", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openCustomerUser('browse', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | // name: "编辑", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.accountEdit ? me.cbuttons_r.accountEdit : false, |
| | | code: "edit", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Input') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openCustomerUser('edit', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | name: "等级设置", type: "primary", icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.edit_degree ? me.cbuttons_r.edit_degree : false, |
| | | // isbuttonshow: true, |
| | | code: "edit_degree", isselected: true, classname: "", |
| | | name: "冻结", isbuttonshow: true,type:"danger",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | var fieldobjlist = [ |
| | | {isshow: "T", field: "degree", name: "等级", type: "input"} |
| | | ] |
| | | me.editFieldsByFieldList(fieldobjlist, obj.selectedList[0], function(suspendData){ |
| | | var selectedList_ = clone(obj.selectedList); |
| | | selectedList_.map(row=>{ |
| | | fieldobjlist.map(f=>{ |
| | | row[f.field] = suspendData[f.field] |
| | | }) |
| | | }) |
| | | me.onSaveDataByFieldLsit(selectedList_, me.selectTabObj.dataname, fieldobjlist, function(){ |
| | | me.onQuery(); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Input') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | me.delData() |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.closeData(); |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | tablebuttonClick.All = [ |
| | | { |
| | | // name: "详情", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false, |
| | | code: "formdetail", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openCustomerUser('browse', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | name: "等级设置", type: "primary", icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.edit_degree ? me.cbuttons_r.edit_degree : false, |
| | | code: "edit_degree", isselected: true, classname: "", |
| | | name: "解除冻结", isbuttonshow: true,type:"warning",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | var fieldobjlist = [ |
| | | {isshow: "T", field: "degree", name: "等级", type: "input"} |
| | | ] |
| | | me.editFieldsByFieldList(fieldobjlist, obj.selectedList[0], function(suspendData){ |
| | | var selectedList_ = clone(obj.selectedList); |
| | | selectedList_.map(row=>{ |
| | | fieldobjlist.map(f=>{ |
| | | row[f.field] = suspendData[f.field] |
| | | }) |
| | | }) |
| | | me.onSaveDataByFieldLsit(selectedList_, me.selectTabObj.dataname, fieldobjlist, function(){ |
| | | me.onQuery(); |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | tablebuttonClick.Change = [ |
| | | // { |
| | | // name: "关户", isbuttonshow: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"danger",icon: "el-icon-circle-close", |
| | | // code: "account",isselected: true,classname: "", |
| | | // disabled: function(selectRowList) { |
| | | // var bo_ = true; |
| | | // if (selectRowList[0] && selectRowList[0].type_code == "close" && selectRowList[0].state_code == 'Input') { |
| | | // bo_ = false; |
| | | // } |
| | | // return bo_ |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // // me.closeData(); |
| | | // me.openChangeCustomerUser('edit', obj.selectedList[0]) |
| | | // } |
| | | // }, |
| | | { |
| | | name: "编辑", isbuttonshow: me.cbuttons_r.accountChange ? me.cbuttons_r.accountChange : false,type:"primary",icon: "el-icon-edit", |
| | | code: "edit",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && (selectRowList[0].state_code == 'Input')) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openChangeCustomerUser('edit', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | |
| | | if (tablebuttonClick[this.activeTabName]) { |
| | | this.selectTabObj.tablebuttonClick = tablebuttonClick[this.activeTabName]; |
| | | } |
| | | else if (this.activeTabName == "distributorlist") { |
| | | this.selectTabObj.tablebuttonClick = tablebuttonClick.matched; |
| | | } |
| | | |
| | | else { |
| | | this.selectTabObj.tablebuttonClick = [] |
| | | } |
| | |
| | | |
| | | <div :class="page_title == 'right' ? 'h_page_button_left' : 'h_page_button_right'"> |
| | | |
| | | <div style="float: right;" v-show= "selectTabObj.code == 'nccsy'"> |
| | | <div style="float: right;"> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id )" type="primary" @click="openCustomerUserByNCCId('add')" icon="el-icon-news">开户</el-button> --> |
| | | <el-button-group style="margin-left: 3px;"> |
| | | <el-button v-show= "cbuttons_r.DownloadTemplate ? cbuttons_r.DownloadTemplate : false" type="primary" @click="DownloadTemplate" icon="el-icon-download">开户模板下载</el-button> |
| | | <el-button v-show= "cbuttons_r.imports ? cbuttons_r.imports : false" type="primary" @click="onPopupByUploadFile" icon="el-icon-upload2">批量开户导入</el-button> |
| | | <el-button type="primary" @click="" icon="el-icon-download">导出确认单</el-button> |
| | | <el-button type="primary" @click="" icon="el-icon-download">导出确认单费用明细</el-button> |
| | | </el-button-group> |
| | | <el-button v-show= "cbuttons_r.synchronous ? cbuttons_r.synchronous : false" type="primary" @click="getNCC" :loading="loading_ncc" icon="el-icon-refresh-right">同步NCC</el-button> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id )" type="primary" @click="openCustomerNCC('add')" :icon="buttonsconfig.edit.icon">NCC{{buttonsconfig.edit.name}}</el-button> --> |
| | |
| | | <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && selectTabObj.selectedrow.state_code == 'Open')" type="danger" @click="closeData">关 户</el-button> |
| | | <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && (selectTabObj.selectedrow.state_code == 'Rejected' || selectTabObj.selectedrow.state_code == 'CloseingSaleInput'))" type="primary" @click="closeDataEdit">关户编辑</el-button> |
| | | </el-button-group> --> |
| | | <el-button v-show= "cbuttons_r.onDownload ? cbuttons_r.onDownload : false" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | <!-- <el-button v-show= "cbuttons_r.onDownload ? cbuttons_r.onDownload : false" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> --> |
| | | <!-- <el-button-group style="margin-left: 3px;"> |
| | | <el-button disabled :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> --> |
New file |
| | |
| | | |
| | | <!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: "fee_payment", |
| | | table_dataname: "fee_qty", |
| | | title: "单据信息", |
| | | dataRequest: [ |
| | | ], |
| | | default_formFields: [ |
| | | { field: "state_name", name: "状态", isshow: "F", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | // { field: "state_name", name: "状态", isshow: "T", width: "80"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80" }, |
| | | { field: "id", name: "费用单编号", isshow: "T", width: "120", }, |
| | | { field: "province", name: "省份", isshow: "T" ,width: "100"}, |
| | | { field: "rate", name: "费率", isshow: "T" ,width: "100"}, |
| | | { field: "amt_rate", name: "付款比例", isshow: "T" ,width: "100"}, |
| | | { field: "customer_code", name: "服务供应商编码", isshow: "T" ,width: "110"}, |
| | | { field: "customer_name", name: "服务供应商", isshow: "T" ,width: "200",align:"left"}, |
| | | { field: "amt", name: "应付金额", isshow: "T" ,width: "100",formatter:'formatter_money'}, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "center", width: "100",formatter:'formatter_money' }, |
| | | { field: "after_deduction_amt", name: "扣款后金额", isshow: "T", align: "center", width: "100",formatter:'formatter_money' }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center", width: "100" ,formatter:'formatter_date'}, |
| | | { field: "order_state", name: "尾款状态", isshow: "T", align: "center", width: "100" }, |
| | | { field: "order_code", name: "关联首款单号", isshow: "T", align: "center", width: "100", }, |
| | | { field: "province_order_code", name: "省级费用单号", isshow: "T", align: "center", width: "100", }, |
| | | { field: "payment", name: "付款金额", isshow: "T", align: "center", width: "100",formatter:'formatter_money' }, |
| | | { field: "payment_date", name: "付款时间", isshow: "T", align: "center", width: "100", formatter:'formatter_date'}, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", width: "100" }, |
| | | ], |
| | | default_tableFields:[ |
| | | { field: "state_name", name: "状态", isshow: "F", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80" }, |
| | | { field: "parent_id", name: "确认单号", isshow: "T", width: "120", }, |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "date", name: "销售日期", isshow: "T",width: "100",type:"date",formatter:"formatter_date"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "150",inputtype:'span'}, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", }, |
| | | { field: "invoince_price", name: "开票价", isshow: "T", align: "center", }, |
| | | { field: "settlement_price", name: "结算低价", isshow: "T", align: "center", }, |
| | | { field: "tax", name: "税点", isshow: "T", align: "center", }, |
| | | { field: "policy", name: "政策", isshow: "T", align: "center", }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "comfirm_qyt", name: "确认数量", isshow: "T", align: "center", }, |
| | | { field: "return_qty", name: "应返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "returned_qty", name: "实返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "deduction_remark", name: "扣款备注", isshow: "T", align: "left",width:'200' }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", width:'120' }, |
| | | { field: "order_total", name: "订单金额", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_amt", name: "订单单价", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_state", name: "订单状态", isshow: "T", align: "center",width:'80' }, |
| | | { field: "platform_information", name: "平台信息", isshow: "T", align: "center", }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", }, |
| | | { field: "product_group", name: "产品组", isshow: "T", align: "center", }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "pre_merger_customer", name: "合并前客户", isshow: "T", align: "center", width: "100" }, |
| | | { field: "last_arrpove_time", name: "最后审批时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "agency_fee_state", name: "代理费用单状态", isshow: "T", align: "center",width: "110" }, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", }, |
| | | { field: "ferrze_remark", name: "冻结原因", isshow: "T", align: "left", }, |
| | | ], |
| | | options_wm_warehouse: [], |
| | | |
| | | formAttr: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 2, |
| | | labelwidth: "120px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "5px solid #c6c6c600" |
| | | }, |
| | | formFields: [], |
| | | newformData: { |
| | | code: createCode("YC"), |
| | | doc_date: createDate(), |
| | | create_time: createDatetime(), |
| | | state_code: "Input", |
| | | state_name: "草稿", |
| | | account_id:window.top.vue.userinfo.currentactor.target_id, |
| | | to_account_id:window.top.vue.userinfo.currentactor.target_id, |
| | | company_id:window.top.vue.userinfo.currentactor.company_id, |
| | | bu_name:window.top.vue.userinfo.currentactor.bu_name, |
| | | bu_id:window.top.vue.userinfo.currentactor.bu_id, |
| | | org_id:window.top.vue.userinfo.org.id, |
| | | org_code:window.top.vue.userinfo.org.code, |
| | | org_name:window.top.vue.userinfo.org.name, |
| | | creator_name: window.top.vue.userinfo.name, |
| | | }, |
| | | formData: {}, |
| | | |
| | | isRefresh: true, |
| | | tablebuttonClick:[], |
| | | tableFields: [], |
| | | newTableData: { |
| | | create_time: createDatetime(), |
| | | creator_name: window.top.vue.userinfo.name, |
| | | }, |
| | | tableData: [], |
| | | stock_qty:0, |
| | | //按键权限设置 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | | isrefuseedit: false,//拒绝后编辑,保存/再次提交 |
| | | isapproval: false,//审批,同意/拒绝/转办/退回 |
| | | |
| | | iscommit: false,//提交标记 |
| | | |
| | | //弹窗参数 |
| | | popupParames: {}, |
| | | //字段设置 |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | dheight: 0, |
| | | checkarr:[], |
| | | delarr:[], |
| | | iscustomer: false, |
| | | tableAttr:{} |
| | | }, |
| | | created() { |
| | | this.tableButtonClick(); |
| | | if (window.top.vue.userinfo && window.top.vue.userinfo.org && window.top.vue.userinfo.org.is_account) { |
| | | this.iscustomer = 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); |
| | | } |
| | | |
| | | if (this.popupParames.sceneCode) { |
| | | if (this.popupParames.sceneCode == "add") {//新增 |
| | | if (this.newformData) { |
| | | let formData_ = clone(this.formData); |
| | | |
| | | for (var k in this.newformData) { |
| | | formData_[k] = this.newformData[k]; |
| | | } |
| | | this.formData = formData_; |
| | | } |
| | | |
| | | // if (this.newTableData) { |
| | | // this.tableData.push(clone(this.newTableData)); |
| | | // } |
| | | |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "browse") {//只读 |
| | | this.formAttr.disabled = true; |
| | | this.isedit = false; |
| | | } |
| | | else if (this.popupParames.sceneCode == "edit") {//编辑 |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "approval") {//审批 |
| | | this.formAttr.disabled = true; |
| | | this.isapproval = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "refuseedit") {//拒绝后的编辑 |
| | | this.isrefuseedit = true; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | me.tableButtonClick(); |
| | | |
| | | // this.tableAttr.toolbarobj={}; |
| | | // this.$set(tableAttr , 'toolbarobj', ''); |
| | | //预加载数据 |
| | | 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 |
| | | } |
| | | 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; |
| | | me.tableButtonClick(); |
| | | |
| | | if (this.formData.id) { |
| | | id_ = this.formData.id; |
| | | } |
| | | |
| | | 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_dataname_ = ""; |
| | | for (var dataname_ in result.meta) { |
| | | if (dataname_ != me.dataname && !table_dataname_) { |
| | | table_dataname_ = dataname_; |
| | | } |
| | | } |
| | | var table_metas = []; |
| | | if (table_dataname_) { |
| | | me.table_dataname = table_dataname_; |
| | | table_metas = clone(result.meta[table_dataname_].fields); |
| | | |
| | | } |
| | | |
| | | var formFields_ = []; |
| | | var tableFields_ = []; |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | // if(f.field == "org_code" || f.field == "org_name"){ |
| | | // if(me.iscustomer){ |
| | | // f.isshow = "F"; |
| | | // } |
| | | // } |
| | | if (f.field == "from_warehouse_name") { |
| | | f.options = me.options_wm_warehouse; |
| | | } |
| | | if (f.field == "to_warehouse_name") { |
| | | f.options = me.options_wm_warehouse; |
| | | } |
| | | formFields_.push(clone(f)); |
| | | }) |
| | | table_metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | |
| | | if (f.field == "stock_type") { |
| | | 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";//按键正整数 |
| | | var f_stock_qty = {isshow: "T", field: "stock_qty", name: "可用数量", align: "right",width: "100"} |
| | | tableFields_.push(clone(f_stock_qty)); |
| | | } |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | |
| | | if (!me.formFields || (me.formFields && me.formFields.length == 0)) { |
| | | me.formFields = clone(me.default_formFields); |
| | | me.tableFields = clone(me.default_tableFields); |
| | | |
| | | |
| | | } |
| | | } |
| | | if (me.rowData[me.dataname]) { |
| | | me.formData = me.rowData[me.dataname]; |
| | | } |
| | | if (me.rowData[me.table_dataname]) { |
| | | me.tableData = me.rowData[me.table_dataname]; |
| | | } |
| | | }) |
| | | |
| | | me.tableButtonClick(); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | org_name: { |
| | | popup: { |
| | | onclick: function(obj) {//弹窗点击事件 |
| | | //打开 |
| | | me.tablePopup_customerList() |
| | | } |
| | | }, |
| | | }, |
| | | from_warehouse_name: { |
| | | visible: { |
| | | onchange: function(obj) { |
| | | // me.formData.from_warehouse_name//这是出仓项 |
| | | var formFields_ = []; |
| | | var options_ = [] |
| | | formFields_ = clone(me.formFields) |
| | | me.options_wm_warehouse.map(f=>{ |
| | | if(f.name != me.formData.to_warehouse_name && f.account_id == me.formData.account_id) { |
| | | 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) { |
| | | me.tableData = [] |
| | | obj.data.from_warehouse_name = obj.selectoption.name//将选中项赋值 |
| | | 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.name != me.formData.from_warehouse_name && 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.name |
| | | obj.data.to_warehouse_id = obj.selectoption.id |
| | | obj.data.to_warehouse_code = obj.selectoption.code |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | |
| | | //表格字段事件设置 |
| | | this.tablefieldClick = { |
| | | material_name: { |
| | | popup: { |
| | | onclick: function(obj) {//弹窗点击事件 |
| | | //打开 |
| | | me.tablepopup_productlist(obj); |
| | | } |
| | | }, |
| | | }, |
| | | qty: { |
| | | input: { |
| | | onchange: function(obj) {//输入更改事件 |
| | | // if (obj.row.batch_sn) {//有序列号 |
| | | // //不能大于1且不能小于0 |
| | | // if (obj.row.qty > 1) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '存在序列号的数量不可大于1' |
| | | // }); |
| | | // me.$set(obj.row, "qty", 1); |
| | | // } |
| | | // else if (obj.row.qty < 0) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '存在序列号的数量不可小于0' |
| | | // }); |
| | | // me.$set(obj.row, "qty", 0); |
| | | // } |
| | | // } |
| | | if (obj.row.stock_qty) {//可用数 |
| | | if (obj.row.qty > obj.row.stock_qty) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '数量不可大于可用数' |
| | | }); |
| | | me.$set(obj.row, "qty", 0); |
| | | } |
| | | } |
| | | //将类似‘00099’之类的数字,前面的0都删掉 |
| | | if (obj.row.qty && obj.row.qty.length > 1) { |
| | | var p = 0; |
| | | for (q = 0; q <= (obj.row.qty.length + p); q++) { |
| | | if (obj.row.qty[0]*1 == 0) { |
| | | obj.row.qty = obj.row.qty.substring(1); |
| | | p ++; |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | // 设置表格工具栏按键事件 |
| | | tableButtonClick() { |
| | | var me = this; |
| | | var tablebuttonclick = []; |
| | | tablebuttonclick = [ |
| | | { |
| | | name:"新增明细", |
| | | isbuttonshow: me.isedit, type: "primary", |
| | | code: "addDetail", isselected: false, classname:"", |
| | | |
| | | onclick: function(obj) { |
| | | // if(!me.formData.from_warehouse_name || !me.formData.to_warehouse_name){ |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请先选择仓库' |
| | | // }); |
| | | // return; |
| | | // } |
| | | // me.tablepopup_productlist(obj) |
| | | me.tablepopup_feelist("add", obj, function(popupobj){ |
| | | // let row_ = clone(me.formData) |
| | | var tableData_ = clone(me.tableData); |
| | | if (popupobj.list && popupobj.list.length) { |
| | | popupobj.list.map(row => { |
| | | var newrow = { |
| | | parent_id: row.id, |
| | | sale_year: row.sale_year, |
| | | sale_month: row.sale_month, |
| | | date: row.date, |
| | | commit_year: row.commit_year, |
| | | commit_month: row.commit_month, |
| | | type: row.type, |
| | | sale_code: row.sale_code, |
| | | sale_name: row.sale_name, |
| | | customer_code: row.customer_code, |
| | | customer_name: row.customer_name, |
| | | product: row.product, |
| | | spec: row.spec, |
| | | agreement_code: row.agreement_code, |
| | | invoince_price: row.invoince_price, |
| | | settlement_price: row.settlement_price, |
| | | tax: row.tax, |
| | | policy: row.policy, |
| | | flow_qty: row.flow_qty, |
| | | comfirm_qyt: row.comfirm_qyt, |
| | | return_qty: row.return_qty, |
| | | other_deduction: row.other_deduction, |
| | | returned_qty: row.returned_qty, |
| | | deduction_remark: row.deduction_remark, |
| | | order_code: row.order_code, |
| | | order_total: row.order_total, |
| | | order_amt: row.order_amt, |
| | | order_state: row.order_state, |
| | | platform_information: row.platform_information, |
| | | applicant: row.applicant, |
| | | product_group: row.product_group, |
| | | apply_date: row.apply_date, |
| | | pre_merger_customer: row.pre_merger_customer, |
| | | last_arrpove_time: row.last_arrpove_time, |
| | | agency_fee_state: row.agency_fee_state, |
| | | freeze: row.freeze, |
| | | ferrze_remark: row.ferrze_remark, |
| | | } |
| | | |
| | | tableData_.unshift(clone(newrow)); |
| | | }) |
| | | } |
| | | me.tableData = clone(tableData_) |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | { |
| | | isbuttonshow: me.isedit, type: "danger", |
| | | code: "delete", isselected: true, classname:"", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0]) { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.product_name); |
| | | me.deleteDataById(row.id, "wm_movement_detail", "【" + txt + "】", function(){ |
| | | me.tableData.splice(obj.selectRowIndex, 1); |
| | | }) |
| | | } |
| | | } |
| | | ] |
| | | me.tablebuttonClick = tablebuttonclick |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | tablepopup_feelist(sceneCode, obj , callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | var delta_ = {}; |
| | | console.log(obj); |
| | | |
| | | //排除已选物料 |
| | | // me.tableData.map(row=>{ |
| | | // if (row.batch_sn) { |
| | | // var key_ = me.formData.from_warehouse_id + "_" + row.product_code + "_" + row.batch_no + "_" + row.batch_sn |
| | | // delta_[key_] = true |
| | | // } |
| | | // else if (row.product_code) { |
| | | // var key_ = me.formData.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_fee_qty",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/fee/page/popup/popup_fee_qty.html", |
| | | data: data_, |
| | | delta: delta_, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | filter: "state_code='Input'" , |
| | | 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: '已取消删除' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | |
| | | GFG_Fun() { |
| | | var suiji = Math.random().toString(36).slice(2); |
| | | return suiji; |
| | | }, |
| | | |
| | | addTableData() { |
| | | var me = this |
| | | // if(!this.formData.from_warehouse_name || !this.formData.to_warehouse_name){ |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请先选择仓库' |
| | | // }); |
| | | // return; |
| | | // } |
| | | }, |
| | | |
| | | delData(scope) { |
| | | let me = this; |
| | | let row = scope.row; |
| | | let index_ = scope.$index; |
| | | |
| | | Root.confirm('确定删除该数据吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | me.rowChange(row, "del", me.table_dataname); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | 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; |
| | | if (this.iscommit) { |
| | | 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 |
| | | } |
| | | |
| | | // if (!batch_no_) { |
| | | // 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_ = []; |
| | | this.tableData.map(r=>{ |
| | | var row_ = {}; |
| | | for (var k in r) { |
| | | if (r[k]) { |
| | | row_[k] = r[k]; |
| | | } |
| | | } |
| | | tableData_.push(row_); |
| | | }) |
| | | |
| | | if (tableData_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | return |
| | | } |
| | | |
| | | var bo_ = true; |
| | | var batch_no_ = true; |
| | | 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 |
| | | } |
| | | |
| | | let param = { |
| | | dataname: this.dataname, |
| | | data: {}, |
| | | } |
| | | param.data[this.dataname] = entity; |
| | | param.data[this.table_dataname] = tableData_; |
| | | |
| | | if (this.formData.id) { |
| | | param.id = this.formData.id |
| | | } |
| | | |
| | | Server.call("root/data/" + operator_, param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | if(me.iscommit){ |
| | | me.iscommit = false; |
| | | 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: '保存失败' |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | </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="form1" |
| | | :form-attr="formAttr" |
| | | :table-fields="formFields" |
| | | :form-data="formData" |
| | | :table-field-click="formfieldClick" |
| | | > |
| | | </h-form> |
| | | |
| | | <div class="h_dialog__body"> |
| | | <div v-if="isedit || isrefuseedit" style=" text-align: right; margin-top: 20px;"> |
| | | <!-- 工具栏 --> |
| | | <!-- <div style=" display: inline-block; width: 90px;"> |
| | | <el-button-group style="display: flex;justify-content: center;"> --> |
| | | <!-- <el-button>批量导入</el-button> |
| | | <el-button type = "danger" @click="delDetail">删 除</el-button> |
| | | <el-button>导入模板下载</el-button> --> |
| | | <!-- <el-button @click="addTableData">新增明细</el-button> --> |
| | | <!-- </el-button-group> |
| | | </div> --> |
| | | </div> |
| | | <h-table |
| | | v-if="isRefresh && tableFields.length" |
| | | ref="table1" |
| | | :table-fields="tableFields" |
| | | :table-data="tableData" |
| | | :is-within-edit-table-data="isedit || isrefuseedit" |
| | | :is-pagination="false" |
| | | :is-highlight-row="true" |
| | | :isdraggableorder="false" |
| | | :isfilterfield="false" |
| | | :table-field-click="tablefieldClick" |
| | | :table-buttons-click="tablebuttonClick" |
| | | |
| | | v-on:get-data="getData" |
| | | v-on:del-data="delData" |
| | | > |
| | | </h-table> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="el-dialog__footer"> |
| | | <el-button size="small" type="default" @click="closeDialog">取 消</el-button> |
| | | <el-button size="small" v-if="isedit || isrefuseedit" type="primary" @click="":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button> |
| | | <el-button size="small" v-if="isedit" type="success" @click="" :icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</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> |
New file |
| | |
| | | |
| | | <!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 ListVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | dataname: "fee_qty", //"md_hospital", |
| | | title: "数量单选择弹窗", |
| | | pageAttr: { |
| | | heightType: "popuppage" |
| | | }, |
| | | default_tableFields: [ |
| | | { field: "state_name", name: "状态", isshow: "T", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80" }, |
| | | { field: "id", name: "确认单号", isshow: "T", width: "120", isfilter: true }, |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "date", name: "销售日期", isshow: "T",width: "100",type:"date",formatter:"formatter_date"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "150" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "invoince_price", name: "开票价", isshow: "T", align: "center", }, |
| | | { field: "settlement_price", name: "结算低价", isshow: "T", align: "center", }, |
| | | { field: "tax", name: "税点", isshow: "T", align: "center", }, |
| | | { field: "policy", name: "政策", isshow: "T", align: "center", }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "comfirm_qyt", name: "确认数量", isshow: "T", align: "center", }, |
| | | { field: "return_qty", name: "应返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "returned_qty", name: "实返金额", isshow: "T", align: "center",formatter:"formatter_money" }, |
| | | { field: "deduction_remark", name: "扣款备注", isshow: "T", align: "left",width:'200' }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | { field: "order_total", name: "订单金额", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_amt", name: "订单单价", isshow: "T", align: "center",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_state", name: "订单状态", isshow: "T", align: "center",width:'80' }, |
| | | { field: "platform_information", name: "平台信息", isshow: "T", align: "center", }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", }, |
| | | { field: "product_group", name: "产品组", isshow: "T", align: "center", }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "pre_merger_customer", name: "合并前客户", isshow: "T", align: "center", width: "100" }, |
| | | { field: "last_arrpove_time", name: "最后审批时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "agency_fee_state", name: "代理费用单状态", isshow: "T", align: "center",width: "110" }, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", }, |
| | | { field: "ferrze_remark", name: "冻结原因", isshow: "T", align: "left", }, |
| | | ], |
| | | filterAttr: { |
| | | columnnumber: 3, |
| | | labelwidth: "100px", |
| | | labelposition: "right",//"left",//"right", |
| | | size: "medium", |
| | | border: "0px solid #c6c6c600" |
| | | }, |
| | | filterfieldClick: {}, |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | |
| | | selectedrows: [], |
| | | }, |
| | | created() { |
| | | this.popupParames = clone(Root.popupParames); |
| | | this.title = this.popupParames.title || this.popupParames.text |
| | | if (this.popupParames.filter) { |
| | | this.filterTxt = this.popupParames.filter |
| | | } |
| | | |
| | | if (this.popupParames.dataname) { |
| | | this.dataname = this.popupParames.dataname; |
| | | } |
| | | |
| | | if (this.popupParames.sceneCode) { |
| | | if (this.popupParames.sceneCode == "add") {//新增 |
| | | this.isedit = true; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | //获取数据 |
| | | this.initData(); |
| | | this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | }, |
| | | |
| | | methods:{ |
| | | //关闭弹窗 |
| | | closeDialog() { |
| | | this.docloseDialog(true); |
| | | }, |
| | | |
| | | //关闭前调回调 |
| | | saveAfter() { |
| | | var me = this; |
| | | var selectedrows = this.$refs.table1.getShoppingcart(); |
| | | |
| | | if(this.popupParames.callback) { |
| | | let obj = { |
| | | list: clone(selectedrows) |
| | | // row: clone(this.selectedrow) |
| | | } |
| | | this.popupParames.callback(obj, function() { |
| | | me.docloseDialog(); |
| | | }); |
| | | } |
| | | else { |
| | | me.docloseDialog(); |
| | | } |
| | | }, |
| | | |
| | | initData() { |
| | | var me = this; |
| | | this.onQuery(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) { |
| | | // var metas = clone(result.meta[me.dataname].fields); |
| | | var filterFields_ = []; |
| | | var tableFields_ = []; |
| | | |
| | | me.default_tableFields.map(f=>{ |
| | | f.isshow = "T"; |
| | | |
| | | if (f.isfilter) { |
| | | filterFields_.push(clone(f)); |
| | | } |
| | | else { |
| | | var filter_f = clone(f); |
| | | filter_f.isshow = "F"; |
| | | } |
| | | |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) { |
| | | me.filterFields = clone(filterFields_); |
| | | me.tableFields = clone(me.default_tableFields); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | } |
| | | |
| | | } |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //筛选字段事件设置 |
| | | this.filterfieldClick = { |
| | | }; |
| | | //表格字段事件设置 |
| | | this.tablefieldClick = { |
| | | }; |
| | | |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | }; |
| | | }, |
| | | |
| | | selectionChange(obj){ |
| | | var me = this; |
| | | me.selectedrows = obj; |
| | | }, |
| | | saveShoppingcart(list) { |
| | | var me = this; |
| | | me.selectedrows = list; |
| | | }, |
| | | |
| | | onRowDblClick() { |
| | | if (this.isedit) { |
| | | this.saveAfter(); |
| | | } |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | </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="h_dialog__body"> |
| | | <h-table |
| | | v-if="isRefresh && tableFields.length" |
| | | ref="table1" |
| | | :table-fields="tableFields" |
| | | :table-data="tableData" |
| | | :pagesize="pagesize" |
| | | :pagenum="pagenum" |
| | | :total="total" |
| | | :table-height="tableHeight" |
| | | :table-field-click="tablefieldClick" |
| | | :is-highlight-row="isedit" |
| | | :is-show-index="false" |
| | | :filtersobj="filterObj" |
| | | :isdraggableorder="false" |
| | | |
| | | v-on:get-data="getData" |
| | | v-on:row-click="rowClick" |
| | | |
| | | :select-table-data="selectedrows" |
| | | :is-selection="true" |
| | | :isshow-shoppingcart="true" |
| | | v-on:selection-change="selectionChange" |
| | | v-on:save-shoppingcart="saveShoppingcart" |
| | | > |
| | | </h-table> |
| | | <!-- v-on:row-dblclick="rowDblclick" --> |
| | | </div> |
| | | |
| | | <!-- 底部工具栏 --> |
| | | <div class="el-dialog__footer"> |
| | | <el-button size="small" type="default" @click="closeDialog">取 消</el-button> |
| | | <el-button size="small" v-if="isedit" type="primary" @click="saveAfter">确 定</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> |