|
@@ -58,16 +58,16 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {fetchList, getObj, addObj, putObj, delObj, getListDrugEntOrAgent} from '@/api/wmmanagement';
|
|
|
|
-import {tableOption, teamTableOption} from '@/const/crud/wmmanagement';
|
|
|
|
-import {mapGetters} from 'vuex';
|
|
|
|
-import {getObjDept, fetchTreeAddUser, getDeptBuildNameById, settleConfig} from '@/api/admin/dept';
|
|
|
|
-import {getSubList, saveSettleConfig, updateSubLimitAmount} from '@/api/admin/deptSub';
|
|
|
|
-import {saves} from '@/api/wmdadrugent';
|
|
|
|
-import {getDictType} from '@/api/common';
|
|
|
|
|
|
+import { fetchList, getObj, addObj, putObj, delObj, getListDrugEntOrAgent } from '@/api/wmmanagement';
|
|
|
|
+import { tableOption, teamTableOption } from '@/const/crud/wmmanagement';
|
|
|
|
+import { mapGetters } from 'vuex';
|
|
|
|
+import { getObjDept, fetchTreeAddUser, getDeptBuildNameById, settleConfig } from '@/api/admin/dept';
|
|
|
|
+import { getSubList, saveSettleConfig, updateSubLimitAmount } from '@/api/admin/deptSub';
|
|
|
|
+import { saves } from '@/api/wmdadrugent';
|
|
|
|
+import { getDictType } from '@/api/common';
|
|
import store from '@/store';
|
|
import store from '@/store';
|
|
-import {filterCodes, extractPaths} from '@/util/treeUtils.js';
|
|
|
|
-import {getAreaTreeApi} from '@/api/areaTree';
|
|
|
|
|
|
+import { filterCodes, extractPaths } from '@/util/treeUtils.js';
|
|
|
|
+import { getAreaTreeApi } from '@/api/areaTree';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'wmmanagement',
|
|
name: 'wmmanagement',
|
|
@@ -125,11 +125,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- 'form.qylx': function(val, oldVal) {
|
|
|
|
|
|
+ 'form.qylx': function (val, oldVal) {
|
|
if (this.agentType === 'AE') {
|
|
if (this.agentType === 'AE') {
|
|
if ('' != val) {
|
|
if ('' != val) {
|
|
var obj = tableOption;
|
|
var obj = tableOption;
|
|
- let index = tableOption.column.findIndex(item => item['label'] === '服务上级组织');
|
|
|
|
|
|
+ let index = tableOption.column.findIndex((item) => item['label'] === '服务上级组织');
|
|
obj.column[index].addDisplay = false;
|
|
obj.column[index].addDisplay = false;
|
|
if (val == 0) {
|
|
if (val == 0) {
|
|
obj.column[index].addDisplay = true;
|
|
obj.column[index].addDisplay = true;
|
|
@@ -142,7 +142,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
if ('' != val) {
|
|
if ('' != val) {
|
|
var obj = teamTableOption;
|
|
var obj = teamTableOption;
|
|
- let index = teamTableOption.column.findIndex(item => item['label'] === '服务上级组织');
|
|
|
|
|
|
+ let index = teamTableOption.column.findIndex((item) => item['label'] === '服务上级组织');
|
|
obj.column[index].addDisplay = false;
|
|
obj.column[index].addDisplay = false;
|
|
if (val == 0) {
|
|
if (val == 0) {
|
|
obj.column[index].addDisplay = true;
|
|
obj.column[index].addDisplay = true;
|
|
@@ -202,6 +202,8 @@ export default {
|
|
this.tableOption = teamTableOption;
|
|
this.tableOption = teamTableOption;
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
}
|
|
}
|
|
|
|
+ console.log('row', row);
|
|
|
|
+
|
|
this.$refs.crud.rowEdit(row, index);
|
|
this.$refs.crud.rowEdit(row, index);
|
|
},
|
|
},
|
|
|
|
|
|
@@ -217,9 +219,9 @@ export default {
|
|
this.searchForm
|
|
this.searchForm
|
|
)
|
|
)
|
|
)
|
|
)
|
|
- .then(response => {
|
|
|
|
|
|
+ .then((response) => {
|
|
let answer = response.data.data.records;
|
|
let answer = response.data.data.records;
|
|
- answer.forEach(item => {
|
|
|
|
|
|
+ answer.forEach((item) => {
|
|
if (item.deptPermissions && item.deptPermissions.length > 1) {
|
|
if (item.deptPermissions && item.deptPermissions.length > 1) {
|
|
item.deptPermissions = item.deptPermissions.sort((a, b) => a - b);
|
|
item.deptPermissions = item.deptPermissions.sort((a, b) => a - b);
|
|
}
|
|
}
|
|
@@ -235,26 +237,27 @@ export default {
|
|
this.tableLoading = false;
|
|
this.tableLoading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- rowDel: function(row, index) {
|
|
|
|
|
|
+ rowDel: function (row, index) {
|
|
this.$confirm('是否确认删除ID为' + row.id, '提示', {
|
|
this.$confirm('是否确认删除ID为' + row.id, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
})
|
|
})
|
|
- .then(function() {
|
|
|
|
|
|
+ .then(function () {
|
|
return delObj(row.id);
|
|
return delObj(row.id);
|
|
})
|
|
})
|
|
- .then(data => {
|
|
|
|
|
|
+ .then((data) => {
|
|
this.$message.success('删除成功');
|
|
this.$message.success('删除成功');
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleUpdate: function(row, index, done, loading) {
|
|
|
|
|
|
+ handleUpdate: function (row, index, done, loading) {
|
|
const flattenedArray = this.form.areaCodesData.flat();
|
|
const flattenedArray = this.form.areaCodesData.flat();
|
|
const areaCodes = Array.from(new Set(flattenedArray));
|
|
const areaCodes = Array.from(new Set(flattenedArray));
|
|
row.areaCodes = areaCodes;
|
|
row.areaCodes = areaCodes;
|
|
row.updateUser = 0;
|
|
row.updateUser = 0;
|
|
- if (undefined != row.sbjnzm && row.sbjnzm.length > 0) {
|
|
|
|
|
|
+
|
|
|
|
+ if (undefined != row.sbjnzm && row.sbjnzm.length > 0 && Array.isArray(row.sbjnzm)) {
|
|
row.sbjnzm = row.sbjnzm.join(',');
|
|
row.sbjnzm = row.sbjnzm.join(',');
|
|
} else {
|
|
} else {
|
|
row.sbjnzm = null;
|
|
row.sbjnzm = null;
|
|
@@ -267,7 +270,7 @@ export default {
|
|
let params = Object.assign({}, row);
|
|
let params = Object.assign({}, row);
|
|
params.provAbbr = params.provAbbrList.join(',');
|
|
params.provAbbr = params.provAbbrList.join(',');
|
|
putObj(params)
|
|
putObj(params)
|
|
- .then(data => {
|
|
|
|
|
|
+ .then((data) => {
|
|
this.$message.success('修改成功');
|
|
this.$message.success('修改成功');
|
|
done();
|
|
done();
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
@@ -276,7 +279,7 @@ export default {
|
|
loading();
|
|
loading();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleSave: function(row, done, loading) {
|
|
|
|
|
|
+ handleSave: function (row, done, loading) {
|
|
const flattenedArray = this.form.areaCodesData.flat();
|
|
const flattenedArray = this.form.areaCodesData.flat();
|
|
const areaCodes = Array.from(new Set(flattenedArray));
|
|
const areaCodes = Array.from(new Set(flattenedArray));
|
|
row.areaCodes = areaCodes;
|
|
row.areaCodes = areaCodes;
|
|
@@ -294,7 +297,7 @@ export default {
|
|
let params = Object.assign({}, row);
|
|
let params = Object.assign({}, row);
|
|
params.provAbbr = params.provAbbrList.join(',');
|
|
params.provAbbr = params.provAbbrList.join(',');
|
|
addObj(params)
|
|
addObj(params)
|
|
- .then(data => {
|
|
|
|
|
|
+ .then((data) => {
|
|
this.$message.success('添加成功');
|
|
this.$message.success('添加成功');
|
|
done();
|
|
done();
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
@@ -330,16 +333,16 @@ export default {
|
|
getObjDept1() {
|
|
getObjDept1() {
|
|
let deptId = this.userInfo.deptId;
|
|
let deptId = this.userInfo.deptId;
|
|
getObjDept(deptId)
|
|
getObjDept(deptId)
|
|
- .then(data => {
|
|
|
|
|
|
+ .then((data) => {
|
|
var deptInfo = data.data.data;
|
|
var deptInfo = data.data.data;
|
|
this.entLevel = deptInfo.level;
|
|
this.entLevel = deptInfo.level;
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
},
|
|
},
|
|
- updateTy: function(row, index, done, loading) {
|
|
|
|
|
|
+ updateTy: function (row, index, done, loading) {
|
|
row.enableFlag = '1';
|
|
row.enableFlag = '1';
|
|
putObj(row)
|
|
putObj(row)
|
|
- .then(data => {
|
|
|
|
|
|
+ .then((data) => {
|
|
this.$message.success('停用成功');
|
|
this.$message.success('停用成功');
|
|
done();
|
|
done();
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
@@ -348,10 +351,10 @@ export default {
|
|
loading();
|
|
loading();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- updateQy: function(row, index, done, loading) {
|
|
|
|
|
|
+ updateQy: function (row, index, done, loading) {
|
|
row.enableFlag = '0';
|
|
row.enableFlag = '0';
|
|
putObj(row)
|
|
putObj(row)
|
|
- .then(data => {
|
|
|
|
|
|
+ .then((data) => {
|
|
this.$message.success('启用成功');
|
|
this.$message.success('启用成功');
|
|
done();
|
|
done();
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
@@ -364,7 +367,7 @@ export default {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
const rowData = this.$refs.crud.$refs.dialogForm.value;
|
|
const rowData = this.$refs.crud.$refs.dialogForm.value;
|
|
// 查询'服务上级组织'列表
|
|
// 查询'服务上级组织'列表
|
|
- getListDrugEntOrAgent({deptLevel: rowData.deptLevel}).then(res => {
|
|
|
|
|
|
+ getListDrugEntOrAgent({ deptLevel: rowData.deptLevel }).then((res) => {
|
|
this.extDrugEntOptions = res.data.data;
|
|
this.extDrugEntOptions = res.data.data;
|
|
});
|
|
});
|
|
|
|
|