“linengliang”
2023-11-22 c2ba0d418a2d33043e396d385dc73664737686e0
系统签审
已添加1个文件
已修改2个文件
255 ■■■■■ 文件已修改
src/views/eam/ABC/StreamList.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/ABC/StreamOperationList.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/ABC/modules/NodeModel.vue 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/ABC/StreamList.vue
@@ -4,6 +4,20 @@
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col
          :span="6"
          >
            <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="单据号"
            >
              <a-input
                placeholder="请输入单据号查询"
                v-model="queryParam.num"
              ></a-input>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
@@ -11,7 +25,16 @@
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button @click="handleAdd" type="primary" icon="plus" v-if="nodeSort===1">新增</a-button>
      <!-- <a-button type="primary" icon="download" @click="handleExportXls('设备ABC评价')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
@@ -61,10 +84,13 @@
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <div v-if="nodeValue===record.status">
            <a @click="handleStreamNext(record)" :disabled="nodeSort===1&&nodeValue!==record.status" >{{button1.name}}</a>
          <a-divider type="vertical" />
            <a @click="handleStreamLast(record)" :disabled="nodeSort===1" >{{button2.name}}</a>
         </div>
         <div v-if="nodeSort===1&&nodeValue===record.status">
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -74,8 +100,12 @@
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item>
                <a @click="handleEdit(record)">编辑</a>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
         </div>
        </span>
      </a-table>
@@ -91,6 +121,7 @@
    </a-tabs>
    <stream-modal ref="modalForm" @ok="modalFormOk"></stream-modal>
    <node-model ref="nodeModel" @ok="modalFormOk"></node-model>
  </a-card>
</template>
@@ -102,6 +133,8 @@
  import StreamOperationList from './StreamOperationList'
  import ABCAssessmentList from './ABCAssessmentList'
  import '@/assets/less/TableExpand.less'
  import NodeModel from './modules/NodeModel.vue'
  export default {
    name: "StreamList",
@@ -109,7 +142,8 @@
    components: {
      StreamOperationList,
      ABCAssessmentList,
      StreamModal
      StreamModal,
        NodeModel
    },
    data () {
      return {
@@ -135,13 +169,13 @@
          {
            title:'当前节点',
            align:"center",
            dataIndex: 'status',
            dataIndex: 'status_dictText',
            width:300
          },
          {
            title:'单据类型',
            align:"center",
            dataIndex: 'type',
            dataIndex: 'type_dictText',
            width:300
          },
          {
@@ -170,6 +204,7 @@
          deleteBatch: "/eam/stream/deleteBatch",
          exportXlsUrl: "/eam/stream/exportXls",
          importExcelUrl: "eam/stream/importExcel",
          getPreInfo:"eam/stream/getPreInfo"
        },
        dictOptions:{
        },
@@ -189,10 +224,17 @@
        superFieldList:[],
        streamOperationMainId: '',
        aBCAssessmentMainId: '',
        button1:{},
        button2:{},
        nodeSort:0,
        nodeValue:''
      }
    },
    created() {
      this.getSuperFieldList();
    },
    mounted(){
      this.getPreInfo();
    },
    computed: {
      importExcelUrl: function(){
@@ -210,6 +252,30 @@
            }
          }
        }
      },
      handleStreamNext(record){
        var step = {
          name:this.button1.name,
          value:this.button1.value,
          opType:'next',
          nodeSort:this.nodeSort,
          node:this.nodeValue,
          streamId:record.id
        }
        this.$refs.nodeModel.title = this.button1.name+"操作";
        this.$refs.nodeModel.edit(step);
      },
      handleStreamLast(record){
        var step = {
          name:this.button2.name,
          value:this.button2.value,
          opType:'last',
          nodeSort:this.nodeSort,
          node:this.nodeValue,
          streamId:record.id
        }
        this.$refs.nodeModel.title = this.button2.name+"操作";
        this.$refs.nodeModel.edit(step);
      },
      onClearSelected() {
        this.selectedRowKeys = [];
@@ -260,6 +326,16 @@
        fieldList.push({type:'string',value:'status',text:'status',dictCode:''})
        fieldList.push({type:'string',value:'type',text:'单据类型',dictCode:''})
        this.superFieldList = fieldList
      },
      getPreInfo(){
        getAction(this.url.getPreInfo).then(res=>{
            if(res.result.msg==='ok'){
              this.button1 = res.result.buttons[0];
              this.button2 = res.result.buttons[1];
              this.nodeSort = res.result.nodeSort;
              this.nodeValue = res.result.nodeValue;
            }
        })
      }
    }
  }
src/views/eam/ABC/StreamOperationList.vue
@@ -115,21 +115,28 @@
          {
            title:'操作',
            align:"center",
            dataIndex: 'operation',
            width:400
            dataIndex: 'operation_dictText',
            width:300
          },
          {
            title:'操作节点',
            align:"center",
            dataIndex: 'streamId',
            width:400
            dataIndex: 'operationNode_dictText',
            width:300
          },
          
          {
            title:'操作人',
            align:"center",
            dataIndex: 'userId_dictText',
            width:400
            width:300
          },
          {
            title:'操作时间',
            align:"center",
            dataIndex: 'createTime',
            width:300
          },
          {
            title:'操作人意见',
src/views/eam/ABC/modules/NodeModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,148 @@
<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form-model
        ref="form"
        :model="model"
        :rules="validatorRules"
      >
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-model-item
              label="意见或原因"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="remark"
            >
            <a-textarea v-model="model.remark" rows="4" placeholder="意见或原因" />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import pick from 'lodash.pick'
import { postAction, requestPut, getAction } from '@/api/manage'
import { duplicateCheck } from '@/api/api'
import moment from 'moment'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
export default {
  name: "NodeModel",
  mixins: [JVxeTableModelMixin],
  components: {
    validateDuplicateValue,
  },
  props: {
    disableSubmit: {
      type: Boolean,
      default: false,
      required: false
    },
    caytegoryParam: {
      type: String,
      default: '',
      required: false
    }
  },
  data() {
    return {
      title: "操作",
      width: 1500,
      visible: false,
      model: {
      },
      labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
      },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
      },
      confirmLoading: false,
      validatorRules: {
        remark: [
          { min: 0, max: 100, message: '长度不超过 100 ä¸ªå­—符', trigger: 'blur' },
        ],
      },
      url: {
        next: "/eam/stream/next",
        last: "/eam/stream/last",
      },
    }
  },
  created() {
    //备份model原始值
    this.initOptions();
    this.modelDefault = JSON.parse(JSON.stringify(this.model));
  },
  methods: {
    add() {
      this
      this.edit(this.modelDefault);
    },
    edit(record) {
      this.model = Object.assign({}, record);
      this.visible = true;
    },
    close() {
      this.$emit('close');
      this.visible = false;
      this.$refs.form.clearValidate();
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.$refs.form.validate(valid => {
        if (valid) {
          that.confirmLoading = true;
          let httpurl = '';
          let method = '';
          if (this.model.opType=='next') {
            httpurl += this.url.next;
          } else {
            httpurl += this.url.last;
          }
          method = 'post';
          httpAction(httpurl, this.model, method).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        } else {
          return false
        }
      })
    },
    handleCancel() {
      this.close()
    },
  },
  computed: {
    formDisabled() {
      return this.disableSubmit
    },
  },
}
</script>