项目清单确认流程
- 发起流程
+ 标准法规工程师确认
-
-
-
- 基础信息
-
-
+
+
+ 基础信息
+
+
+
-
-
-
-
-
+
- 选择项目
-
-
+
- 选择清单
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 流程发起人
-
-
-
-
-
-
-
-
-
-
- 确认人
-
-
-
-
-
-
-
-
-
-
- 审批人
-
-
-
-
-
-
-
-
+
+
隐藏基础信息
+
+
+ 展开基础信息
+
+
+
+ 填写信息
+
+
+
+
+
+
+ {{ scope.row.standSort
+ }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}
+ {{ scope.row.standSort }}
+ {{ scope.row.standNumber }}
+
+
+
+
+ {{ scope.row.standName }}
+
+
+
+
+ {{ scope.row.standEnName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") : "" }}
+
+
+
+
+ {{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD HH:mm:ss") : "" }}
+
+
+
+
+ {{ scope.row.commentText }}
+
+
+
+
+ {{ scope.row.endTime ? "已完成" : "未完成" }}
+
+
+
+ 流程列表加载中
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+ 清空
+
+
+
+
数据获取中
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
-
- 清空
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
-
- 清空
-
-
-
-
-
-
-
-
-
-
-
-
- 未发布
- 已发布
- 审核中
-
-
-
-
- {{ scope.row.detailedListVision
- }}
-
-
-
-
-
- {{ scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-DD") : scope.row.updateTime
- }}
-
-
-
-
-
-
-
-
-
-
-
-
@@ -371,392 +644,501 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
-import { saveTaskFirst } from "api/process";
+import { inboundLiaisonDetail, queryDetail, saveTaskForPub ,changeAssigneeNew, execTask} from "api/process";
export default {
name: "xmqdqrStep1-4",
components: {
+ ProcessTitle,
ProcessHeader,
- ProcessFooter,
- ProcessTitle
+ ProcessFooter
},
data() {
return {
- multipleSelection: [],
- active: "1", //默认显示
- commentText: "",
- modalshowflag: false,
- drawerTitle: "",
+ lawInfoTableLoading: true,
+ lawInfoTable:[],
+ textState: [],
+ handleSelectForm: {
+ isRelateAccess: '', //是否纳入认证清单
+ textStatus: '', //标准状态
+ standName: '', //标准名称
+ numberName: '', //政策名称
+ lawsNumber: '', //政策编号
+ standNumber: '', //标准编号
+ standCode: '', //企标编号
+ dataSource: 'INLAND',
+ standType: 'INLAND',
+ lawNumber: '', // 标准编号/政策编号
+ lawName: '', // 标准名称/政策名称
+ page: 1,
+ pageSize: this.$store.getters.userInfo.configContent,
+ total: 0,
+ quoteIdList: '',
+ validFlag: '0',
+ menuId: 'nomenu'
+ },
+ isTransfer: false,
+ foldFormFlag: false,
+ // 调整处理人抽屉状态
+ drawerModal: false,
+ drawerTitle:'',
+ active: "1",
nodeList: [],
+ nodeList2: [],
+ loading: false,
+ modalshowflag: false,
+ // 当前流程类型(1待办/2已办)
+ processType: 1,
isSubmit: false,
saveLoading: false,
- detailedListModel: false,
- projectModel: false,
- sarAccessListDatas: [],
- ProjectDatas: [],
- selectProject: [],
- selectedList: [],
- total: 0,
+ submitShow: false,
+ acceptShow: false,
+ todoId: '',
+ projectId: "",
+ standModel: false,
+ standSortOptions: [],
+ standList: [],
+ projectStand:[],
+ standardData: [],
+ handleSelectTableList: [], //标准数据
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
- totalNo: 0,
- pageNo: 1,
- pageSizeNo: this.$store.getters.userInfo.configContent,
- energyKindOptions: [], //存放适用车型数据
- // 查询相关参数
- sarSarAccessEOSearch: {
- carType: "",
- detailedListName: ""
- },
- projectSearch: {
- projectNumber: "",
- projectName: ""
-
+ total: 0,
+ //查询清单下标准数据
+ standCommonlySearch: {
+ standSort: "",
+ standNumber: "",
+ standType: "",
+ page: 1,
+ Size: this.$store.getters.userInfo.configContent
},
+ //表单的数据
qdform: {
- projectNumber: "",
- projectName: "",
- detailedListName: ""
+ BZFlag: " ", //1审批通过 其他为驳回
+ projectNumber: "", //项目编号
+ projectName: "", //项目名称
+ dataList: [], //项目下的标准数据
+ breakdownList: [] //标准下的分解单数据
},
- roleForm: {
- startUserName: this.$store.getters.userInfo.userName,
- startUser: this.$store.getters.userInfo.userId,
- confirmId: "",
- confirmName: "",
- approveId: "",
- approveName:"",
- },
- //表单验证
- formRules: {
- projectName: [
- { required: true, message: "请输入项目名称", trigger: "blur" }
- ],
- projectNumber: [
- { type: "string", required: true, message: "请输入项目编号", trigger: "change" }
- ],
- detailedListName: [
- { required: true, message: "请输入清单名称", trigger: "blur" },
- {trigger: 'change'}
- ]
- },
- // 角色验证
- roleFormRules: {
- confirmName: [
- { required: true, message: "请选择确认人", trigger: "change" }
- ],
- approveName: [
- { required: true, message: "请选择审批人", trigger: "change" }
- ]
- }
+ dataList: [], //展示的标准数据
+ commentText: "", //审批意见
+ detailData: [],//流程历史数据
+ userId: this.$store.getters.userInfo.userId,
+ taskIds: this.$route.query.taskIds,
+ pId: this.$route.query.prcId,
+ standMap: new Map(),
+ textStatusMap: {},// 文本状态id与name对应
};
},
- methods: {
- // 表格勾选
- handleSelectionChange(val) {
- // 单选
- if (val.length > 1) {
- this.$refs.table.clearSelection();
- this.$refs.table.toggleRowSelection(val.pop());
- }
- this.multipleSelection = val;
- },
- handleTabs(type) {
- this.active = type;
- },
- getProjectDataBtn() {
- this.page = 1;
- this.getProjectData();
- },
- //查询项目列表
- getProjectData() {
- this.$http.get("sarStandProjectLibrary/queryProjectConfirm", {
- PageSize: this.pageSize,
- Page: this.page,
- ...this.projectSearch
- }, {
- _this: this
- }, res => {
- this.ProjectDatas = res.data.total.records;
- this.total = res.data.total.total;
- this.page = 1;
- }, e => {
-
- });
- },
- //清空查询列表
- clearSearch() {
- this.projectSearch = {
- projectName: "",
- projectNumber: ""
- };
- this.getProjectData();
- },
- //项目带入取消事件
- cancelProject() {
- this.projectModel = false;
- },
- //项目带入确定事件
- OkProject() {
- if (this.selectProject.length < 1) {
- this.$message.warning("请至少选择一条数据进行带入");
- } else if (this.selectProject.length > 1) {
- this.$message.warning("您只能选择一条数据进行带入");
- } else {
- console.log(this.selectProject[0])
- this.qdform.projectNumber = this.selectProject[0].projectNumber;
- this.qdform.projectName = this.selectProject[0].projectName;
- this.qdform.projectId = this.selectProject[0].id;
- this.projectModel = false;
- }
-
- },
- //清单查询按钮
- searchSarAccessBtn() {
- this.pageNo = 1;
- this.searchSarAccess();
- },
- //查询清单列表
- searchSarAccess() {
- this.$http.get("sarLawsDetailedList/sar-laws-detailed-list/getAllStand", {
- page: this.pageNo,
- pageSize: this.pageSizeNo,
- ...this.sarSarAccessEOSearch,
- sortKey: 2
- }, {
- _this: this
- }, res => {
- let arr = res.data.records;
- arr.forEach(item => {
- // 适用车型转换
- if (item.carType !== null) {
- let k = (item.carType || "").split(",");
- for (let i in this.energyKindOptions) {
- for (let m = 0; m < k.length; m++) {
- if (this.energyKindOptions[i].value === k[m]) {
- k[m] = this.energyKindOptions[i].label;
- }
- item.carTypeShow = k.join(",");
- }
- }
- }
- });
- this.sarAccessListDatas = arr;
- this.tableLoading = false;
- this.toatl = res.data.total;
- }, e => {
- });
-
- },
- //清空查询清单
- clearSearchAccess() {
- this.sarSarAccessEOSearch = {
- carType: "",
- detailedListName: ""
- };
- this.searchSarAccess();
- },
- //选择项目点击事件
- choiceProject() {
- this.projectModel = true;
- },
- //选择清单点击事件
- choiceList() {
- this.detailedListModel = true;
- },
- //清单带入取消事件
- closeDrawer() {
- this.detailedListModel = false;
- },
- //清单带入确定事件
- OkDrawer() {
- if (this.selectedList.length < 1) {
- this.$message.warning("请至少选择一条数据进行带入");
- } else if (this.selectedList.length > 1) {
- this.$message.warning("您只能选择一条数据进行带入");
- } else {
- this.qdform.detailedListName = this.selectedList[0].detailedListName;
- this.qdform.detailedListId = this.selectedList[0].id;
- this.qdform.detailedListVision = this.selectedList[0].detailedListVision;
- this.detailedListModel = false;
- }
- },
- cancleUserInfo() {
- this.modalshowflag = false;
- },
- choiceZRR(type, title, id) {
- this.nodeList = [];
- this.nodeList.push(id);
- this.type = type;
- this.drawerTitle = title;
- this.modalshowflag = true;
- },
- checkedRole(data) {
- if (this.type === "confirmId") {
- this.roleForm.confirmId = data[0].id;
- this.roleForm.confirmName = data[0].name;
- }else if(this.type === "approveId"){
- this.roleForm.approveId = data[0].id;
- this.roleForm.approveName = data[0].name;
- }
- this.modalshowflag = false;
- },
- //项目分页器
- pageChange(page) {
- this.page = page;
- this.getProjectData();
- },
- pageSizeChange(pageSize) {
- this.pageSize = pageSize;
- this.getProjectData();
- },
- //清单分页器
- pageChangeNo(pageNo) {
- this.pageNO = pageNo;
- this.searchSarAccess();
- },
- pageSizeChangeNo(pageSizeNo) {
- this.pageSizeNo = pageSizeNo;
- this.searchSarAccess();
- },
- //清单勾选框数据
- selectListChange(data) {
- // 单选
- if (data.length > 1) {
- this.$refs.selection.clearSelection();
- this.$refs.selection.toggleRowSelection(data.pop());
- }
- this.multipleSelection = data
-
- this.selectedList = data;
- },
- //项目勾选框数据
- selectProjectChange(data) {
- // 单选
- if (data.length > 1) {
- this.$refs.selection.clearSelection();
- this.$refs.selection.toggleRowSelection(data.pop());
- }
- this.multipleSelection = data
-
- this.selectProject = data;
- },
- //提交事件
- handleSubmit() {
- this.qdform.commentText = this.commentText;
- var json = Object.assign(this.qdform, this.roleForm);
- this.$refs["qdqrForm"].validate((valid) => {
- if (valid) {
- this.$refs["Form"].validate((valid) => {
- if (valid) {
- this.isSubmit = true;
- this.$http.get("lawss/activiti/startProcess", { type: "10" }, {
- _this: this
- }, res => {
- if (res.ok) {
- this.$http.post("lawss/activiti/completeTask", {
- taskIds: res.data,
- userId: this.$store.getters.userInfo.userId,
- json: JSON.stringify(json)
- }, {
- _this: this
- }, res => {
- if (res.success) {
- this.$message.success(res.message);
- this.$router.push("/processCenter");
- }
- this.isSubmit = false;
- });
- }
- });
- } else {
- return this.$message.warning("请完善人员信息");
- }
- });
- } else {
- return this.$message.warning("请完善基础信息");
- }
- });
- },
- //保存事件
- handleSave() {
- this.saveLoading = true;
- let _formData = new FormData();
- _formData.append("id", this.bpnId || "");
- _formData.append("createUser", this.$store.getters.userInfo.userId);
- _formData.append("createUserName", this.$store.getters.userInfo.userName);
- _formData.append("prcType", "10");
- _formData.append("json", JSON.stringify({
- taskInfo: "确认人确认",
- form: this.qdform,
- roleForm: this.roleForm,
- commentText: this.commentText
- }));
- saveTaskFirst(_formData).then(res => {
- this.saveLoading = false;
- this.$message.success("保存成功");
- this.bpnId = res.result;
- }).catch(e => {
- this.saveLoading = false;
- });
- }
- },
mounted() {
- this.qdform.projectNumber = this.$route.query.row.projectNumber;
- this.qdform.projectName = this.$route.query.row.projectName;
- this.qdform.projectId = this.$route.query.row.id
+ this.processTable();
+ this.getData();
// 查询各下拉框数据
- this.$http.get("sys/dictype/getDicTypeListCode", "", {
+ this.$http.get("sys/dictype/getDicTypeListCode", {}, {
_this: this,
loading: "loading"
}, res => {
this.energyKindOptions = res.data.ENERGYTYPES; //适用车型
- this.$http.get("sarLawsDetailedList/sar-laws-detailed-list/getAllStand", {
- page: 1,
- pageSize: this.pageSize,
- ...this.sarSarAccessEOSearch,
- sortKey: 2
+ this.standSortOptions = res.data.STANDCLASSIFY; // 标准类别
+ this.setMap(res.data.WBZTCLASS);// 文本状态
+ this.setMap(this.zrbmMap, res.data.ZRBMCLASS);
+ this.textState = res.data.WBZTCLASS // 文本状态
+ this.showLocalProductData(this.getLocalPro);
+ }, e => {
+ });
+ },
+ methods: {
+ //折叠/展开基础信息方法
+ foldForm() {
+ this.foldFormFlag = !this.foldFormFlag;
+ },
+ formatIssueDate(str) {
+ const momentDate = this.$moment(str)
+ if (momentDate.isValid()) {
+ return this.$moment(str).format('YYYY-MM-DD')
+ } else {
+ return str
+ }
+ },
+ //确认转办
+ checkedTransferRole (data) {
+ this.assigneeNewLoading = true
+ changeAssigneeNew({
+ taskId: this.$route.query.taskIds, // 任务id
+ assignee: data[0].id, // 被委托人
+ userId: this.$store.getters.userInfo.userId, // 委托人
+ pId: this.$route.query.prcId // 流程实例
+ }).then(res => {
+ this.isTransfer = false
+ if (res.success) {
+ this.drawerModal = false
+ this.$message.success('调整成功')
+ this.$router.push("/processCenter");
+ this.processNum()
+ } else {
+ this.$message.warning(res.message)
+ }
+ })
+ },
+ // 请求转换流程图
+ processNum (row) {
+ axios.request({
+ url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(),
+ responseType: 'blob',
+ method: 'get',
+ params: {
+ prcNum: this.$route.query.prcNum
+ }
+ }).then(res => {
+ // let blob = new Blob([res.data], {type: 'image/jpg'})
+ // let url = window.URL.createObjectURL(res.data)
+ this.processStep = window.URL.createObjectURL(res.data)
+ })
+ },
+ //转办事件
+ handleTransfer(){
+ this.drawerModal = true
+ this.drawerTitle = '转办处理人'
+ this.selectPeople = row
+ },
+ // 将文本状态的id与name对应
+ setMap(data) {
+ data.forEach(item => {
+ this.$set(this.textStatusMap, item.value, item.label)
+ })
+ },
+ processTable() {
+ this.$http.get("lawss/activiti/get_list_by_instance", {
+ prcNum: this.$route.query.prcNum,
+ sortWord: this.shunxu ? this.paixu : "",
+ shunxu: this.shunxu
+ }, {
+ loading: "loading",
+ _this: this
+ }, res => {
+ this.detailData = res;
+ }, e => {
+ });
+ },
+ //tab改变
+ handleTabs(type) {
+ this.active = type;
+ },
+ // 点击查看
+ handlePreview(item) {
+ let routeUrl = this.$router.resolve({
+ name: "OtherStandardDetails",
+ params: {
+ id: item.id,
+ pageType: "INLAND_STAND"
+ }
+ });
+ window.open(routeUrl.href, "_blank");
+ },
+ //获取数据
+ getData() {
+ return new Promise((resolve, reject) => {
+ inboundLiaisonDetail({
+ taskIds: this.taskIds,
+ pId: this.pId
+ }).then(res => {
+ if (res) {
+ const processForm = JSON.parse(res.mesg);
+ let commitStatus = res.commitStatus
+ if(commitStatus && commitStatus > 0){
+ this.acceptShow = true
+ this.submitShow = false
+ }else {
+ this.acceptShow = false
+ this.submitShow = true
+ }
+ this.todoId = res.id
+ this.getFormFieldList(processForm);
+ }
+ }).catch(e => {
+ });
+ });
+ },
+ //动态表单读取
+ getFormFieldList(item) {
+ console.log(item);
+ this.$nextTick(() => {
+ if(!item.form){
+ this.qdform = JSON.parse(JSON.stringify(item));
+ this.qdform.prcNum = this.prcNum;
+ this.qdform.prcName = this.prcName;
+ this.qdform["id"] = item.id;
+ this.dataList = item.dataList
+ }else{
+ this.qdform = JSON.parse(JSON.stringify(item.form));
+ this.qdform.prcNum = this.prcNum;
+ this.qdform.prcName = this.prcName;
+ this.qdform["id"] = item.id;
+ this.dataList = item.form.dataList
+ this.commentText = item.commentText
+ }
+
+ });
+ },
+ // 接受按钮
+ handleAccept(){
+ this.isSubmit = true
+ execTask({
+ todoId: this.todoId // 当前节点ID
+ }).then(res => {
+ if (res.sign && res.sign === '0') {
+ this.$message.success('接收成功')
+ this.$router.push('/processCenter')
+ }
+ this.isSubmit = false
+ })
+ },
+ //提交事件
+ handleSubmit() {
+ this.dataList.forEach(item => {
+ this.$set(item, 'standId', item.id)
+ })
+ this.isSubmit = true;
+ this.qdform.commentText = this.commentText;
+ this.qdform.dataList = this.dataList
+ const json = JSON.stringify(this.qdform);
+ this.$http.post("lawss/activiti/completeTask", {
+ taskIds: this.taskIds,
+ userId: this.userId,
+ json: json
}, {
_this: this
}, res => {
- let arr = res.data.records;
- arr.forEach(item => {
- // 适用车型转换
- if (item.carType !== null) {
- let k = (item.carType || "").split(",");
- for (let i in this.energyKindOptions) {
- for (let m = 0; m < k.length; m++) {
- if (this.energyKindOptions[i].value === k[m]) {
- k[m] = this.energyKindOptions[i].label;
- }
- item.carTypeShow = k.join(",");
- }
- }
- }
- });
- this.sarAccessListDatas = arr;
- this.tableLoading = false;
- this.sarSarAccessEOSearch.page = 1;
- this.totalNo = res.data.total;
+ if (res.success) {
+ this.$message.success(res.message);
+ this.$router.push("/processCenter");
+ }
+ this.isSubmit = false;
}, e => {
});
- }, e => {
- });
- this.getProjectData();
- this.searchSarAccess();
- }
+ },
+ addList() {
+ this.searchLawBtn()
+ this.standModel = true;
+ },
+ //批量删除
+ delectList(){
+ if (this.projectStand.length < 1) {
+ this.$message.warning("请选择一条数据进行删除");
+ } else {
+ this.$confirm("您确认删除这些数据?", "提示", {
+ confirmButtonText: "确认",
+ confirmButtonClass: "common-button-primary",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ this.projectStand.map(item => {
+ let index;
+ index = this.dataList.findIndex(items => {
+ return items.id === item.id;
+ });
+ if (index > -1) {
+ this.dataList.splice(index, 1);
+ }
+ });
+ this.$refs.standSelection.clearSelection()
+ }).catch(() => {
+ });
+ }
+ },
+ //添加标准勾选框数据
+ handleSelectTableChange (data) {
+ this.handleSelectTableList = data
+ console.log(this.handleSelectTableList);
+ },
+ selectStandChange(data){
+ this.projectStand = data
+ },
+ cancelStand() {
+ this.standModel = false;
+ },
+ //添加标准带入事件
+ okStand() {
+ if(this.standList.length < 1){
+ this.$message.warning('请至少选择一条数据进行添加')
+ }else{
+ this.standList.forEach(item =>{
+ if(item.ssrq === "-"){
+ item.ssrq = ''
+ }
+ if(item.zrbm === '[]'){
+ item.zrbm =''
+ }
+ })
+ this.standList.map(item => {
+ let addIndex
+ addIndex = this.dataList.findIndex(items =>{
+ return items.id === item.id
+ })
+ if(addIndex > -1){
+ this.$message.warning('请勿重复添加数据')
+ }else{
+ this.dataList.push(item)
+ }
+ })
+
+ this.standModel = false
+ }
+
+ },
+ //手动查找的清空按钮
+ clearLawBtn(){
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.lawNumber = ''
+ this.handleSelectForm.standNumber = ''
+ this.handleSelectForm.lawsNumber = ''
+ this.handleSelectForm.standCode = ''
+ //清空标准名称/政策名称的查询
+ this.handleSelectForm.lawName = ''
+ this.handleSelectForm.standName = ''
+ this.handleSelectForm.numberName = ''
+ this.searchLawBtn()
+ },
+ //添加标准的查询按钮
+ searchLawBtn(){
+ console.log(this.handleSelectForm);
+ this.lawInfoTableLoading = true
+ if (this.handleSelectForm.dataSource === 'INLAND'){
+ this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{
+ _this: this
+ },res=>{
+ console.log('国内标准库数据',res)
+ if (res.ok){
+ this.lawInfoTable = res.data.list
+ this.handleSelectForm.total = res.data.count
+ if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
+ this.lawInfoTableLoading = true
+ this.handleSelectPageChange(1)
+ }else {
+ this.lawInfoTableLoading = false
+ this.lawInfoTableLoading = false
+ }
+ }else {
+ this.$message.error(res.message)
+ }
+ },e=>{
+ this.lawInfoTable = []
+ this.handleSelectForm.total = 0
+ })
+ }else if(this.handleSelectForm.dataSource === 'FOREIGN'){
+ this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{
+ _this: this
+ },res=>{
+ if (res.ok){
+ this.lawInfoTable = res.data.list
+ this.handleSelectForm.total = res.data.count
+ if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
+ this.lawInfoTableLoading = true
+ this.handleSelectPageChange(1)
+ }else {
+ this.lawInfoTableLoading = false
+ }
+ }else {
+ this.$message.error(res.message)
+ this.lawInfoTableLoading = false
+ }
+ },e=>{
+ this.lawInfoTable = []
+ this.handleSelectForm.total = 0
+ })
+ }else if(this.handleSelectForm.dataSource === 'BUSINESS_STAND'){
+ this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',this.handleSelectForm,{
+ _this: this
+ },res=>{
+ if (res.ok){
+ this.lawInfoTable = res.data.list
+ this.handleSelectForm.total = res.data.count
+ if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
+ this.lawInfoTableLoading = true
+ this.handleSelectPageChange(1)
+ }else {
+ this.lawInfoTableLoading = false
+ }
+ }else {
+ this.$message.error(res.message)
+ this.lawInfoTableLoading = false
+ }
+ },e=>{
+ this.lawInfoTable = []
+ this.handleSelectForm.total = 0
+ })
+ }else {
+ this.$message.warning('请先选择标准/政策来源')
+ }
+ },
+ handleSelectConfirm(){
+ if(this.handleSelectTableList.length < 1){
+ this.$message.warning('请至少选择一条数据进行添加')
+ }else{
+ this.standList.forEach(item =>{
+ if(item.ssrq === "-"){
+ item.ssrq = ''
+ }
+ if(item.zrbm === '[]'){
+ item.zrbm =''
+ }
+ })
+ this.handleSelectTableList.map(item => {
+ let addIndex
+ addIndex = this.dataList.findIndex(items =>{
+ return items.id === item.id
+ })
+ if(addIndex > -1){
+ this.$message.warning('请勿重复添加数据')
+ }else{
+ this.dataList.push(item)
+ }
+ })
+ this.standModel = false
+ }
+ },
+ dataSourceChange() {
+ this.handleSelectForm.page = 1
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.standType = this.handleSelectForm.dataSource
+ this.searchLawBtn()
+ },
+ isRelateAccessChange(){
+ this.handleSelectForm.page = 1
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.standType = this.handleSelectForm.dataSource
+ this.searchLawBtn()
+ },
+ //根据标准编号的查询
+ lawNumberSearch() {
+ this.handleSelectForm.standNumber = this.handleSelectForm.lawNumber
+ this.handleSelectForm.lawsNumber = this.handleSelectForm.lawNumber
+ this.handleSelectForm.standCode = this.handleSelectForm.lawNumber
+ },
+ handleSelectPageChange(page){
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.page = page
+ this.searchLawBtn()
+ },
+ handleSelectPageSizeChange(pageSize){
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.pageSize = pageSize
+ this.searchLawBtn()
+ },
+ },
+ computed: {
+ listNoDataText() {
+ return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
+ }
+ },
+
};
diff --git a/src/pages/processCenter/pages/creatProcess/xmqdqr/step1.vue b/src/pages/processCenter/pages/creatProcess/xmqdqr/step1.vue
index 103f23601..d2a0c7162 100644
--- a/src/pages/processCenter/pages/creatProcess/xmqdqr/step1.vue
+++ b/src/pages/processCenter/pages/creatProcess/xmqdqr/step1.vue
@@ -9,24 +9,21 @@
@@ -388,7 +863,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
-import { saveTaskFirst, taskDel } from "api/process";
+import { queryTaskFirst, saveTaskFirst, taskDel } from "api/process";
export default {
name: "xmqdqrStep1",
@@ -399,6 +874,35 @@ export default {
},
data() {
return {
+ //折叠的标志,true为折叠,false为不折叠
+ foldFormFlag: false,
+ standModel: false,
+ lawInfoTableLoading: true,
+ lawInfoTable: [],
+ handleSelectTableList: [],
+ projectStand: [],
+ dataList: [],
+ textStatusMap: {},// 文本状态id与name对应
+ textState: [],
+ handleSelectForm: {
+ standName: '', //标准名称
+ numberName: '', //政策名称
+ lawsNumber: '', //政策编号
+ standNumber: '', //标准编号
+ standCode: '', //企标编号
+ isRelateAccess: '', //是否纳入认证清单
+ textStatus: '', //标准状态
+ dataSource: 'INLAND',
+ standType: 'INLAND',
+ lawNumber: '', // 标准编号/政策编号
+ lawName: '', // 标准名称/政策名称
+ page: 1,
+ pageSize: this.$store.getters.userInfo.configContent,
+ total: 0,
+ quoteIdList: '',
+ validFlag: '0',
+ menuId: 'nomenu'
+ },
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
@@ -471,12 +975,204 @@ export default {
{ required: true, message: "请选择产品工程经理", trigger: "change" }
],
approveName: [
- { required: true, message: "请选择审批人", trigger: "change" }
+ { required: true, message: "请选择认证工程师", trigger: "change" }
]
}
};
},
methods: {
+ formatIssueDate(str) {
+ const momentDate = this.$moment(str)
+ if (momentDate.isValid()) {
+ return this.$moment(str).format('YYYY-MM-DD')
+ } else {
+ return str
+ }
+ },
+ //折叠/展开基础信息方法
+ foldForm() {
+ this.foldFormFlag = !this.foldFormFlag;
+ },
+ // 点击查看
+ handlePreview(item) {
+ let routeUrl = this.$router.resolve({
+ name: "OtherStandardDetails",
+ params: {
+ id: item.id,
+ pageType: "INLAND_STAND"
+ }
+ });
+ window.open(routeUrl.href, "_blank");
+ },
+ dataSourceChange() {
+ this.handleSelectForm.page = 1
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.standType = this.handleSelectForm.dataSource
+ this.searchLawBtn()
+ },
+ isRelateAccessChange(){
+ this.handleSelectForm.page = 1
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.standType = this.handleSelectForm.dataSource
+ this.searchLawBtn()
+ },
+ //添加标准确定按钮
+ handleSelectConfirm(){
+ if(this.handleSelectTableList.length < 1){
+ this.$message.warning('请至少选择一条数据进行添加')
+ }else{
+ this.handleSelectTableList.map(item => {
+ let addIndex
+ addIndex = this.dataList.findIndex(items =>{
+ return items.id === item.id
+ })
+ if(addIndex > -1){
+ this.$message.warning('请勿重复添加数据')
+ }else{
+ this.dataList.push(item)
+ }
+ })
+ this.standModel = false
+ }
+ },
+ //添加标准勾选框数据
+ handleSelectTableChange (data) {
+ this.handleSelectTableList = data
+ },
+ //dataList列表的添加数据
+ selectStandChange(data){
+ this.projectStand = data
+ },
+ //根据标准编号的查询
+ lawNumberSearch() {
+ this.handleSelectForm.standNumber = this.handleSelectForm.lawNumber
+ this.handleSelectForm.lawsNumber = this.handleSelectForm.lawNumber
+ this.handleSelectForm.standCode = this.handleSelectForm.lawNumber
+ },
+ //手动查找的清空按钮
+ clearLawBtn(){
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.lawNumber = ''
+ this.handleSelectForm.textStatus = ''
+ this.handleSelectForm.isRelateAccess = ''
+ this.handleSelectForm.standNumber = ''
+ this.handleSelectForm.lawsNumber = ''
+ this.handleSelectForm.standCode = ''
+ //清空标准名称/政策名称的查询
+ this.handleSelectForm.lawName = ''
+ this.handleSelectForm.standName = ''
+ this.handleSelectForm.numberName = ''
+ this.searchLawBtn()
+ },
+ //添加标准的查询按钮
+ searchLawBtn(){
+ this.lawInfoTableLoading = true
+ if (this.handleSelectForm.dataSource === 'INLAND'){
+ this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageByWk1',this.handleSelectForm,{
+ _this: this
+ },res=>{
+ if (res.ok){
+ this.lawInfoTable = res.data.list
+ this.handleSelectForm.total = res.data.count
+ if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
+ this.lawInfoTableLoading = true
+ this.handleSelectPageChange(1)
+ }else {
+ this.lawInfoTableLoading = false
+ this.lawInfoTableLoading = false
+ }
+ }else {
+ this.$message.error(res.message)
+ }
+ },e=>{
+ this.lawInfoTable = []
+ this.handleSelectForm.total = 0
+ })
+ }else if(this.handleSelectForm.dataSource === 'FOREIGN'){
+ this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageByWk1',this.handleSelectForm,{
+ _this: this
+ },res=>{
+ if (res.ok){
+ this.lawInfoTable = res.data.list
+ this.handleSelectForm.total = res.data.count
+ if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
+ this.lawInfoTableLoading = true
+ this.handleSelectPageChange(1)
+ }else {
+ this.lawInfoTableLoading = false
+ }
+ }else {
+ this.$message.error(res.message)
+ this.lawInfoTableLoading = false
+ }
+ },e=>{
+ this.lawInfoTable = []
+ this.handleSelectForm.total = 0
+ })
+ }else if(this.handleSelectForm.dataSource === 'BUSINESS_STAND'){
+ this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',this.handleSelectForm,{
+ _this: this
+ },res=>{
+ if (res.ok){
+ this.lawInfoTable = res.data.list
+ this.handleSelectForm.total = res.data.count
+ if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) {
+ this.lawInfoTableLoading = true
+ this.handleSelectPageChange(1)
+ }else {
+ this.lawInfoTableLoading = false
+ }
+ }else {
+ this.$message.error(res.message)
+ this.lawInfoTableLoading = false
+ }
+ },e=>{
+ this.lawInfoTable = []
+ this.handleSelectForm.total = 0
+ })
+ }else {
+ this.$message.warning('请先选择标准/政策来源')
+ }
+ },
+ handleSelectPageChange(page){
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.page = page
+ this.searchLawBtn()
+ },
+ handleSelectPageSizeChange(pageSize){
+ this.lawInfoTableLoading = true
+ this.handleSelectForm.pageSize = pageSize
+ this.searchLawBtn()
+ },
+ addList() {
+ this.searchLawBtn()
+ this.standModel = true;
+ },
+ //批量删除
+ delectList(){
+ if (this.projectStand.length < 1) {
+ this.$message.warning("请选择一条数据进行删除");
+ } else {
+ this.$confirm("您确认删除这些数据?", "提示", {
+ confirmButtonText: "确认",
+ confirmButtonClass: "common-button-primary",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ this.projectStand.map(item => {
+ let index;
+ index = this.dataList.findIndex(items => {
+ return items.id === item.id;
+ });
+ if (index > -1) {
+ this.dataList.splice(index, 1);
+ }
+ });
+ this.$refs.standSelection.clearSelection()
+ }).catch(() => {
+ });
+ }
+ },
// 表格勾选
handleSelectionChange(selection, val) {
if (selection.length > 1) {
@@ -605,10 +1301,44 @@ export default {
} else {
this.qdform.detailedListName = this.selectedList[0].detailedListName;
this.qdform.detailedListId = this.selectedList[0].id;
+ this.getStandData(this.qdform.detailedListId)
this.qdform.detailedListVision = this.selectedList[0].detailedListVision;
this.detailedListModel = false;
}
},
+ //查询清单下的标准
+ getStandData(id) {
+ this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", {
+ id: id,
+ page: 1,
+ Size: 100
+ }, {
+ _this: this
+ }, res => {
+ this.dataList = res.data.records;
+ this.dataList.forEach(item => {
+ // 责任部门转换
+ if (item.zrbm !== null || item.zrbm !== "" ) {
+ let k = (item.zrbm || "").split(",");
+ for (let i in this.zrbmOptions) {
+ for (let m = 0; m < k.length; m++) {
+ if (this.zrbmOptions[i].value === k[m]) {
+ k[m] = this.zrbmOptions[i].label;
+ }
+ item.zrbm = k.join(",");
+ }
+ }
+ }
+ });
+ this.dataList.map(item => {
+ if(item.zrbm === '[]'){
+ item.zrbm = ''
+ }
+ this.$set(item, 'zccssrq', item.zccssrqgj)
+ this.$set(item, 'xcxssrq', item.xcxssrqgj)
+ })
+ });
+ },
cancleUserInfo() {
this.modalshowflag = false;
},
@@ -658,7 +1388,8 @@ export default {
//提交事件
handleSubmit() {
this.qdform.commentText = this.commentText;
- var json = Object.assign(this.qdform, this.roleForm);
+ this.qdform.dataList = this.dataList;
+ let json = Object.assign(this.qdform, this.roleForm);
this.$refs["qdqrForm"].validate((valid) => {
if (valid) {
this.$refs["Form"].validate((valid) => {
@@ -714,6 +1445,7 @@ export default {
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
+ this.qdform.dataList = this.dataList
_formData.append("id", this.bpnId || "");
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.userName);
@@ -731,15 +1463,34 @@ export default {
}).catch(e => {
this.saveLoading = false;
});
- }
+ },
+ // 将文本状态的id与name对应
+ setMap(data) {
+ data.forEach(item => {
+ this.$set(this.textStatusMap, item.value, item.label)
+ })
+ },
},
mounted() {
+ if(this.$route.query.bpnId){
+ queryTaskFirst({
+ bpnId: this.$route.query.bpnId
+ }).then(res => {
+ let mes = JSON.parse(res.mes);
+ this.qdform = mes.form;
+ this.dataList = mes.form.dataList;
+ this.roleForm = mes.roleForm;
+ this.commentText = mes.commentText;
+ });
+ }
// 查询各下拉框数据
this.$http.get("sys/dictype/getDicTypeListCode", "", {
_this: this,
loading: "loading"
}, res => {
this.energyKindOptions = res.data.ENERGYTYPES; //适用车型
+ this.setMap(res.data.WBZTCLASS);// 文本状态
+ this.textState = res.data.WBZTCLASS // 文本状态
this.$http.get("sarLawsDetailedList/sar-laws-detailed-list/getAllStand", {
page: 1,
pageSize: this.pageSize,
diff --git a/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue b/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue
index 834de3ce9..06e645a26 100644
--- a/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue
+++ b/src/pages/processCenter/pages/creatProcess/xmqdqr/step2.vue
@@ -2,59 +2,60 @@