Browse Source

面损列表-审批历史

jbb 2 years ago
parent
commit
049f3e0167

+ 4 - 1
src/api/document/fabricLossesSummary.js

@@ -8,5 +8,8 @@ const checkList = params => getAction('/orderData/syCostLossReview/queryFabricLo
 // 取消提交
 const cancelSubmit = params => getAction('/orderData/syCostLossReview/cancelSubmission', params)
 
+// 取消提交
+const historyApproval  = params => getAction('/orderData/syCostLossReview/cancelSubmission', params)
+
 
-export { checkList,cancelSubmit}
+export { checkList,cancelSubmit,historyApproval}

+ 16 - 3
src/views/cost-allocation-total/fabricLossesSummary.vue

@@ -109,7 +109,7 @@
             <a-menu slot="overlay" >
               <a-menu-item><a @click="cancelSumit(record)">取消提交</a></a-menu-item>
               <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
-              <a-menu-item><a @click="details(record)">审批历史</a></a-menu-item>
+              <a-menu-item><a @click="approvalHistory(record)">审批历史</a></a-menu-item>
             </a-menu>
             </a-dropdown>                  
         </span>
@@ -119,6 +119,7 @@
     <!-- 详情 大抽屉 -->
     <!-- <costDetail-drawer ref="costDetailDrawer" :fatherList="getCostList" @ok="modalFormOk"></costDetail-drawer> -->
     <attachment   ref="attachment"></attachment>
+    <history-modal ref="historyModal"></history-modal>
   </div>
 </template>
 
@@ -129,13 +130,14 @@ import moment from 'moment'
 
 import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
 import attachment from '@views/cost-allocation-total/modal/attachment.vue'
+import historyModal from '@views/cost-allocation-total/modal/historyModal.vue'
 
-import { checkList } from '@api/document/fabricLossesSummary.js'
+import { checkList,historyApproval,cancelSubmit } from '@api/document/fabricLossesSummary.js'
 
 export default {
   name: 'fabricLossesSummary',
   mixins: [JeecgListMixin],
-  components: { JEllipsis, moment, costDetailDrawer,attachment },
+  components: { JEllipsis, moment, costDetailDrawer,attachment,historyModal },
 
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
@@ -271,6 +273,17 @@ export default {
           }
         })
     },
+    approvalHistory(record){
+      this.$refs.historyModal.histiryModVis = true
+      this.$refs.historyModal.getHistoryList(record.ccode)
+      // historyApproval({code:record.ccode}).then(res => {
+      //     if (res.success) {
+           
+      //     }else{
+      //       this.$message.error(res.message);
+      //     }
+      //   })
+    },
     searchQuery() {
       this.getCostList()
     },

+ 178 - 0
src/views/cost-allocation-total/modal/historyModal.vue

@@ -0,0 +1,178 @@
+<template>
+  <div id="declareElementsModal">
+    <a-modal
+      title="审批历史"
+      v-model="histiryModVis"
+      :confirmLoading="confirmLoading"
+      @cancel="handleCancel"
+      width="80%"
+      style="top:330px;left:100px;"
+    >
+      <!-- 増行 子表 -->
+      <a-card :bordered="false" style="margin:10px 0">
+        <!-- 子表 -->
+        <a-spin :spinning="confirmLoading">
+          <a-form-model ref="formRef">
+            <a-table
+              v-if="historyData"
+              bordered
+              rowKey="id"
+              :columns="historyColumns"
+              :data-source="historyData"
+              :loading="loading"
+              :pagination="false"
+               :scroll="{y: 500}"
+            >
+            </a-table>
+          </a-form-model>
+        </a-spin>
+      </a-card>
+
+      <!-- 页面底部保存取消 -->
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1
+        }"
+      >
+        <!-- <a-popconfirm title="确定放弃?" @confirm="handleCancel" okText="确定" cancelText="取消"> -->
+          <a-button :style="{ marginRight: '8px' }" @click="handleCancel">返回</a-button>
+        <!-- </a-popconfirm>
+        <a-button type="primary" @click="addSave">
+          保存
+        </a-button> -->
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+import {historyApproval } from '@api/document/fabricLossesSummary.js'
+
+export default {
+  name: 'DeclareElementsModal', // 报关要素
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      loading: false, // 表格加载
+      pushState: false, //是否推送
+      query:'1',//是否查询
+      // 子表表头
+      historyColumns: [
+        {
+          title: '序号',
+          width: 30,
+          dataIndex: 'index',
+          customRender: (text, record, index) => `${index + 1}`,
+          className: 'replacecolor'
+        },
+        {
+          title: '状态',
+          dataIndex: 'stuta',
+          width: 250,
+          className: 'replacecolor'
+        },
+        {
+          title: '计划号',
+          dataIndex: 'planNo',
+          width: 250,
+          className: 'replacecolor'
+        },
+        {
+          title: '处理人',
+          dataIndex: 'processedBy',
+          width: 200,
+
+          className: 'replacecolor'
+        },
+
+        {
+          title: '处理时间',
+          dataIndex: 'processingTime',
+          width: 200,
+          className: 'replacecolor'
+        },
+        {
+          title: '处理意见',
+          dataIndex: 'processingOpinion',
+          width: 200,
+          className: 'replacecolor'
+        }
+      ],
+      declareElements: {}, // 主表信息
+      historyData: [], // 子表信息
+      confirmLoading: false,
+      histiryModVis: false,
+    }
+  },
+  // 接收父组件 方法
+  props: {},
+
+  created() {  
+  },
+  methods: {
+    getHistoryList(data){
+      historyApproval({code:data}).then(res => {
+          if (res.success) {
+            this.historyData = res.result.record
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+    handleCancel(){
+      this.histiryModVis = false 
+    }
+  },
+
+  computed: {}
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+// 对话框里的card样式
+/deep/ .ant-modal-content {
+  background-color: #f0f2f5;
+}
+/deep/ .ant-modal-body {
+  padding: 10px;
+}
+/deep/.ant-form-item{
+  margin-bottom: 0px !important;
+}
+/deep/.ant-table-tbody .ant-table-row td{
+  padding-top: 2px;
+    padding-bottom: 2px;
+}
+/deep/ thead.ant-table-thead>tr{
+      height: 0 !important;
+}
+/deep/ .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
+  padding: 9px 16px
+}
+</style>