From b16561838a0e9120dd16ded16cfe2f729f0d2ccc Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 23 一月 2025 15:37:49 +0800
Subject: [PATCH] NC程序签派流程配置

---
 src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineForm.vue                |  216 +++++++++++++++++++++
 src/views/dnc/base/ActivitiSingExamineList.vue                                            |  203 ++++++++++++++++++++
 src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal.vue               |   65 ++++++
 src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal__Style#Drawer.vue |   91 +++++++++
 4 files changed, 575 insertions(+), 0 deletions(-)

diff --git a/src/views/dnc/base/ActivitiSingExamineList.vue b/src/views/dnc/base/ActivitiSingExamineList.vue
new file mode 100644
index 0000000..0949d22
--- /dev/null
+++ b/src/views/dnc/base/ActivitiSingExamineList.vue
@@ -0,0 +1,203 @@
+<!--
+ Description: NC绋嬪簭绛炬淳娴佺▼閰嶇疆 List
+ Author: 浣滆�� liuyh
+ Date:   2025-01-15
+-->
+<template>
+  <a-card :bordered="false">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="娴佺▼鍚嶇О">
+              <a-input placeholder="杈撳叆娴佺▼鍚嶇О" v-model="queryParam.actName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            涓嬭浇
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">缂栬緫</a>
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">鏇村
+              <a-icon type="down" />
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">璇︽儏</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm
+                  title="纭畾鍒犻櫎鍚�?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+      </a-table>
+    </div>
+
+
+    <ActivitiSignExamineModal ref="modalForm" @ok="modalFormOk"></ActivitiSignExamineModal>
+
+  </a-card>
+</template>
+
+<script>
+
+import '@assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JDictSelectTag from '@comp/dict/JDictSelectTag.vue'
+import ActivitiSignExamineModal from './modules/ActivitiSingExamine/ActivitiSignExamineModal__Style#Drawer.vue'
+
+export default {
+  name: 'AssignApproveUser',
+  mixins:[JeecgListMixin, mixinDevice],
+  components: {
+    JDictSelectTag,
+    ActivitiSignExamineModal
+  },
+  data () {
+    return {
+      description: 'NC绋嬪簭绛炬淳娴佺▼閰嶇疆',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '搴忓彿',
+          dataIndex: '',
+          key:'rowIndex',
+          width:200,
+          align:"center",
+          customRender:function (t,r,index) {
+            return parseInt(index)+1;
+          }
+        },
+        {
+          title: '娴佺▼鍚嶇О',
+          align: "center",
+          dataIndex: 'actName',
+          width: 200,
+        },
+        {
+          title: '鎵�灞為儴闂�',
+          align: "center",
+          dataIndex: 'departId_dictText',
+          width: 220,
+        },
+        {
+          title: '鏍″浜哄憳',
+          align: "center",
+          dataIndex: 'proofreaderUser_dictText',
+          width: 250,
+        },
+        {
+          title: '鎵瑰噯浜哄憳',
+          align: "center",
+          dataIndex: 'approveUser_dictText',
+          width: 250,
+        },
+        {
+          title: '璇曞垏浜哄憳',
+          align: "center",
+          dataIndex: 'cutterUser_dictText',
+          width: 250,
+        },
+        {
+          title: '瀹氬瀷浜哄憳',
+          align: "center",
+          dataIndex: 'typecastUser_dictText',
+          width: 250,
+        },
+        {
+          title: '鎿嶄綔鏃堕棿',
+          align: "center",
+          dataIndex: 'createTime',
+          width:300
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          scopedSlots: { customRender: 'action' },
+          align: 'center',
+          width: 200,
+          fixed: 'right'
+        }
+      ],
+      url: {
+        list: "/nc/activitiSignExamine/find/page",
+        delete: "/nc/activitiSignExamine/delete",
+      },
+      dictOptions:{},
+    }
+  },
+  created() {
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig(){
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineForm.vue b/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineForm.vue
new file mode 100644
index 0000000..00fbe31
--- /dev/null
+++ b/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineForm.vue
@@ -0,0 +1,216 @@
+<!--
+ Description: NC绋嬪簭绛炬淳娴佺▼閰嶇疆 Form
+ Author: 浣滆�� liuyh
+ Date:   2025-01-15
+-->
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form :form="form" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-item label="娴佺▼鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-input :disabled="formDisabled" v-decorator="['actName', validatorRules.actName]" placeholder="璇疯緭鍏ユ祦绋嬪悕绉�"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="鎵�灞為儴闂�" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <j-dict-select-tag :disabled="formDisabled" type="list" v-decorator="['departId']" :trigger-change="true" dictCode="sys_department,depart_name,depart_id" placeholder="璇烽�夋嫨鎵�灞為儴闂�"/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="鏍″浜哄憳" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <j-select-multi-user valueKey="id" displayKey="realname" v-decorator="['proofreaderUser']"  placeholder="璇烽�夋嫨瀹℃壒浜�"/>
+              {{ getFormFieldValue('proofreaderUser') }}
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="鎵瑰噯浜哄憳" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <j-select-multi-user valueKey="id" displayKey="realname" v-decorator="['approveUser']"  placeholder="璇烽�夋嫨瀹℃壒浜�"/>
+              {{ getFormFieldValue('approveUser') }}
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="璇曞垏浜哄憳" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <j-select-multi-user valueKey="id" displayKey="realname" v-decorator="['cutterUser']"  placeholder="璇烽�夋嫨瀹℃壒浜�"/>
+              {{ getFormFieldValue('cutterUser') }}
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="瀹氬瀷浜哄憳" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <j-select-multi-user valueKey="id" displayKey="realname" v-decorator="['typecastUser']"  placeholder="璇烽�夋嫨瀹℃壒浜�"/>
+              {{ getFormFieldValue('typecastUser') }}
+            </a-form-item>
+          </a-col>
+          <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
+            <a-button @click="submitForm">鎻� 浜�</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import JFormContainer from '@/components/jeecg/JFormContainer'
+  import JDictSelectTag from "@/components/dict/JDictSelectTag"
+
+  export default {
+    name: 'ActivitiSignExamineForm',
+    components: {
+      JFormContainer,
+      JDictSelectTag,
+    },
+    props: {
+      //娴佺▼琛ㄥ崟data
+      formData: {
+        type: Object,
+        default: ()=>{},
+        required: false
+      },
+      //琛ㄥ崟妯″紡锛歵rue娴佺▼琛ㄥ崟 false鏅�氳〃鍗�
+      formBpm: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      //琛ㄥ崟绂佺敤
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        form: this.$form.createForm(this),
+        users:"",
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+          actName: {
+            rules: [
+              { required: true, message: '璇疯緭鍏ユ祦绋嬪悕绉�!'},
+            ]
+          },
+          departId: {
+            rules: [
+              { required: true, message: '璇烽�夋嫨閮ㄩ棬鍒嗙粍!'},
+            ]
+          },
+          approveUsers: {
+            rules: [
+              { required: true, message: '璇烽�夋嫨瀹℃壒浜�!'},
+            ]
+          },
+          characters: {
+            rules: [
+              { required: true, message: '璇疯緭鍏ョ壒娈婂瓧绗�!'},
+            ]
+          },
+        },
+        url: {
+          add: "/nc/activitiSignExamine/add",
+          edit: "/nc/activitiSignExamine/edit",
+          // queryById: "/zhshj/wglltwh/query/by/id"
+        },
+        userOptions:[]
+      }
+    },
+    computed: {
+      formDisabled(){
+        if(this.formBpm===true){
+          if(this.formData.disabled===false){
+            return false
+          }
+          return true
+        }
+        return this.disabled
+      },
+      showFlowSubmitButton(){
+        if(this.formBpm===true){
+          if(this.formData.disabled===false){
+            return true
+          }
+        }
+        return false
+      }
+    },
+    created () {
+      //濡傛灉鏄祦绋嬩腑琛ㄥ崟锛屽垯闇�瑕佸姞杞芥祦绋嬭〃鍗昫ata
+      this.showFlowData();
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'actName','departId','approveUsers'))
+        })
+      },
+      getFormFieldValue(field){
+        return this.form.getFieldValue(field)
+      },
+      //娓叉煋娴佺▼琛ㄥ崟鏁版嵁
+      showFlowData(){
+        if(this.formBpm === true){
+          let params = {id:this.formData.dataId};
+          getAction(this.url.queryById,params).then((res)=>{
+            if(res.success){
+              this.edit (res.result);
+            }
+          });
+        }
+      },
+      submitForm () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            console.log("琛ㄥ崟鎻愪氦鏁版嵁",formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+      popupCallback(row){
+        this.form.setFieldsValue(pick(row,'actName','departId','approveUsers'))
+      },
+    }
+  }
+</script>
\ No newline at end of file
diff --git a/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal.vue b/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal.vue
new file mode 100644
index 0000000..957080b
--- /dev/null
+++ b/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal.vue
@@ -0,0 +1,65 @@
+<!--
+ Description: NC绋嬪簭绛炬淳娴佺▼閰嶇疆 Modal
+ Author: 浣滆�� liuyh
+ Date:   2025-01-15
+-->
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+    <ActivitiSignExamineForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></ActivitiSignExamineForm>
+  </j-modal>
+</template>
+
+<script>
+
+  import ActivitiSignExamineForm from './ActivitiSignExamineForm.vue'
+  export default {
+    name: 'AssignApproveUserModal',
+    components: {
+      ActivitiSignExamineForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
\ No newline at end of file
diff --git "a/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal__Style\043Drawer.vue" "b/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal__Style\043Drawer.vue"
new file mode 100644
index 0000000..349ed96
--- /dev/null
+++ "b/src/views/dnc/base/modules/ActivitiSingExamine/ActivitiSignExamineModal__Style\043Drawer.vue"
@@ -0,0 +1,91 @@
+<!--
+ Description: NC绋嬪簭绛炬淳娴佺▼閰嶇疆 Modal-Drawer
+ Author: 浣滆�� liuyh
+ Date:   2025-01-15
+-->
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <ActivitiSignExamineForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></ActivitiSignExamineForm>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+
+
+import ActivitiSignExamineForm from './ActivitiSignExamineForm.vue'
+
+export default {
+  name: 'AssignApproveUserModal',
+  components: {
+    ActivitiSignExamineForm,
+  },
+  data() {
+    return {
+      title: "鎿嶄綔",
+      width: 800,
+      visible: false,
+      disableSubmit: false
+    }
+  },
+  methods: {
+    add() {
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs.realForm.add();
+      })
+    },
+    edit(record) {
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit('close');
+      this.visible = false;
+    },
+    submitCallback() {
+      this.$emit('ok');
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    handleCancel() {
+      this.close()
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+/** Button鎸夐挳闂磋窛 */
+.ant-btn {
+  margin-left: 30px;
+  margin-bottom: 30px;
+  float: right;
+}
+.drawer-footer{
+  position: absolute;
+  bottom: -8px;
+  width: 100%;
+  border-top: 1px solid #e8e8e8;
+  padding: 10px 16px;
+  text-align: right;
+  left: 0;
+  background: #fff;
+  border-radius: 0 0 2px 2px;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3