Browse Source

核销单放大镜提示语句

zhuth 7 years ago
parent
commit
382faa7abd

+ 5 - 5
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -302,7 +302,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
         receipts_offset_receivable : {
             main: [{
                 xtype: 'hidden',
-                fieldLabel: '客户id',
+                fieldLabel: '客户名称',
                 name: 'vc_custid',
                 listeners: {
                     change: 'clearDetails'
@@ -328,7 +328,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             main: [{
                 xtype: 'hidden',
                 name: 'vc_vendid',
-                fieldLabel: '供应商ID',
+                fieldLabel: '供应商名称',
                 listeners: {
                     change: 'clearDetails'
                 }
@@ -352,7 +352,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
         // 应收冲应付
         receivable_offset_payable: {
             main: [{
-                fieldLabel: '客户id',
+                fieldLabel: '客户名称',
                 xtype: 'textfield',
                 name: 'vc_custid',
                 hidden: true,
@@ -395,7 +395,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
         // 应收转应收
         receivable_to_receivable: {
             main: [{
-                fieldLabel: '转出客户id',
+                fieldLabel: '转出客户',
                 xtype: 'textfield',
                 name: 'vc_outcustid',
                 hidden: true,
@@ -436,7 +436,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
         // 应付转应付
         payable_to_payable: {
             main: [{
-                fieldLabel: '转出供应商id',
+                fieldLabel: '转出供应商',
                 xtype: 'textfield',
                 name: 'vc_outvendid',
                 hidden: true,

+ 5 - 2
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -212,6 +212,7 @@ Ext.define('saas.view.money.verification.FormPanelController', {
     getDefaultCondition: function(idx) {
         var me = this,
         form = me.getView(),
+        formItems = form.formItems,
         viewModel = me.getViewModel(),
         acitveType = form.acitveType,
         etc = form.etc,
@@ -220,10 +221,12 @@ Ext.define('saas.view.money.verification.FormPanelController', {
 
         var reg = /(.*){(.*)}(.*)/g;
         var fieldName = defaultConditionMode.match(/(.*){(.*)}(.*)/)[2];
+        var fieldLabel = Ext.Array.findBy(formItems, function(f) {
+            return f.name == fieldName;
+        }).fieldLabel;
         var fieldValue = viewModel.get(fieldName);
         if(!fieldValue) {
-            // TODO 这里可以分情况提示具体字段
-            saas.util.BaseUtil.showErrorToast('请先录入主表必填字段');
+            saas.util.BaseUtil.showErrorToast('请先录入主表字段【' + '<span style="color: red;">' + fieldLabel + '</span>】');
             return null;
         }
         var defaultCondition = defaultConditionMode.replace(reg, '$1' + fieldValue + '$3');