|
|
@@ -8,6 +8,7 @@
|
|
|
*******************************************************************************/
|
|
|
const Constants = require('@/utils/Constants.js');
|
|
|
const util = require('@/utils/util.js')
|
|
|
+import Dialog from '@/dist/dialog/dialog.js';
|
|
|
const mixins = require('@/mixins/index.js')
|
|
|
const app = getApp()
|
|
|
Page({
|
|
|
@@ -158,7 +159,7 @@ Page({
|
|
|
}
|
|
|
if (formDataName == '客户标签') {
|
|
|
//设置新建编辑字段 客户来源
|
|
|
- popContent =[]
|
|
|
+ popContent = []
|
|
|
}
|
|
|
popContent.push({ code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false })
|
|
|
}
|
|
|
@@ -201,10 +202,34 @@ Page({
|
|
|
service = this.data.service
|
|
|
id = 'dataId'
|
|
|
}
|
|
|
+ if (this.data.formDataName == mixins.$t('accountCategory')) { //账户类别
|
|
|
+ this.countByCondMoneyAccount(item.dataId,service, item, id)
|
|
|
+ } else {
|
|
|
+
|
|
|
+ //执行接口
|
|
|
+ this.handleMoreDataIsValid(service, item, id)
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ countByCondMoneyAccount(dataId,service, item, id) {
|
|
|
|
|
|
+ this.excute(this.data.service, this.data.service.countByCondMoneyAccount + '/' + dataId, {}).then(res => {
|
|
|
+ console.log(res,service)
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (res.data.data > 0 && item.flgValid) {
|
|
|
+ //提示信息
|
|
|
+ Dialog.confirm({
|
|
|
+ message:'账户类别有资金账户不能停用',
|
|
|
+ }).then(() => { }).catch(() => {
|
|
|
+ });
|
|
|
|
|
|
- //执行接口
|
|
|
- this.handleMoreDataIsValid(service, item, id)
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ //执行接口
|
|
|
+ this.handleMoreDataIsValid(service, item, id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 分类切换
|
|
|
@@ -371,7 +396,7 @@ Page({
|
|
|
service = this.data.service
|
|
|
id = params.dataId
|
|
|
params.dictCode = this.data.dictCode
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
if (id) { //编辑
|
|
|
return this.excute(service, service.update, params);
|