Browse Source

成本分配列表-审批

jbb 1 year ago
parent
commit
21e4899855

+ 9 - 1
src/api/document/cost-allocation-total.js

@@ -47,4 +47,12 @@ const addHalfInfo = params => postAction('/cost/syCostAllocation/add', params)
 
 const deleteFileDetail= params => deleteAction('/cost/syCostAllocation/deleteFile', params)
 
-export { costList, costByPlanNum, itemCheck, cancelItemCheck, seachPlanNum,addHalfInfo,deleteFileDetail }
+
+// 审批
+const cancelSubmit = params => postAction('/orderData/syCostLossReview/submit', params)
+//审批历史
+const historyApproval  = params => getAction('/orderData/syCostLossReview/querySyCostApprovalHistory', params)
+const assignedData  = params => getAction('/orderData/syCostLossReview/querySyCostApprovalAssignedBy', params)
+
+
+export { costList, costByPlanNum, itemCheck, cancelItemCheck, seachPlanNum,addHalfInfo,deleteFileDetail,cancelSubmit,historyApproval,assignedData }

File diff suppressed because it is too large
+ 872 - 660
src/views/cost-allocation-total/costDetailDrawer.vue


+ 41 - 7
src/views/cost-allocation-total/list.vue

@@ -106,13 +106,22 @@
           <a href="javascript:void(0);" @click="detail(record)">详情</a>
         </span> -->
         <span slot="action" slot-scope="text, record">
-          <a @click="handleApply(record)" v-if="apply == 1 && (record.status=='保存' || record.status=='' || !record.status)">发起申请</a>
+          <!-- <a @click="handleApply(record)" v-if="apply == 1 && (record.status=='保存' || record.status=='' || !record.status)">发起申请</a> -->
+          <a @click="detail(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="cancelSumit(record)">取消提交</a></a-menu-item>
+              <a-menu-item><a @click="approvalHistory(record)">审批历史</a></a-menu-item>
+            </a-menu>
+            </a-dropdown>  
         </span>
       </a-table>
     </a-card>
-
+    <ChistoryModal ref="ChistoryModal"></ChistoryModal>
     <!-- 详情 大抽屉 -->
-    <!-- <costDetail-drawer ref="costDetailDrawer" :fatherList="getCostList" @ok="modalFormOk"></costDetail-drawer> -->
+    <costDetail-drawer ref="costDetailDrawer"   @close="getCostList"></costDetail-drawer>
   </div>
 </template>
 
@@ -122,13 +131,14 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
 import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
+import ChistoryModal from '@views/cost-allocation-total/modal/ChistoryModal'
 
-import { costList, itemCheck, cancelItemCheck } from '@api/document/cost-allocation-total.js'
+import { costList, itemCheck, cancelItemCheck,cancelSubmit } from '@api/document/cost-allocation-total.js'
 
 export default {
   name: 'CostAllocationTotal', // 成本分配汇总 单证
   mixins: [JeecgListMixin],
-  components: { JEllipsis, moment, costDetailDrawer },
+  components: { JEllipsis, moment, costDetailDrawer,ChistoryModal },
 
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
@@ -218,11 +228,31 @@ export default {
         })
       })
     },
+    cancelSumit(record){
+      var syApprovalHistory={
+        stuta:'取消提交',
+        planNo:record.planNum,
+        processingOpinion:'',
+        processedBy:this.$store.getters.userInfo.realname,
+        processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        assignedBy:''
+      }
+      cancelSubmit({planNum:record.planNum,status:record.status,currentState:'取消提交',syApprovalHistory:syApprovalHistory}).then(res => {
+          if (res.success) {
+            this.getCostList()
+            this.$message.success('取消提交成功')
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
     //  详情
     detail(record) {
-      this.$refs.costDetailDrawer.visible = true
+      this.$refs.costDetailDrawer.detailModVis = true
+      this.$refs.costDetailDrawer.planNo = record.planNum
+      this.$refs.costDetailDrawer.status = record.status
       // console.log('参数record', this.$refs.costDetailDrawer.record.planNum)
-      this.$refs.costDetailDrawer.getALLDetail(record.planNum)
+      this.$refs.costDetailDrawer.onSearch(record.planNum)
     },
     //  审核
     check(record) {
@@ -250,6 +280,10 @@ export default {
         })
       })
     },
+    approvalHistory(record){
+      this.$refs.ChistoryModal.histiryModVis = true
+      this.$refs.ChistoryModal.getHistoryList(record.planNum)
+    },
 
     searchQuery() {
       this.getCostList()

+ 176 - 0
src/views/cost-allocation-total/modal/ChistoryModal.vue

@@ -0,0 +1,176 @@
+<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/cost-allocation-total.js'
+
+export default {
+  name: 'ChistoryModal', // 报关要素
+  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
+          }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/ .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
+//   padding: 9px 16px
+// }
+</style>

+ 76 - 0
src/views/cost-allocation-total/modal/CsubmitInformation.vue

@@ -0,0 +1,76 @@
+<template>
+    <a-modal
+      :title="text+'信息'"
+      v-model="submitInformationModVis"
+      width="50%"
+      @ok="ok"
+      cancelText="取消"
+      @cancel="close"
+    >
+    <div>
+      
+     <a-textarea
+      v-model="value"
+      placeholder="请输入"
+      :auto-size="{ minRows: 3, maxRows: 15 }"
+    />
+    </div>
+    </a-modal>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import { downFile } from '@/api/manage'
+  export default {
+    name: 'submitInformation', // 反馈信息 弹窗
+    mixins: [JeecgListMixin],
+    components: { JEllipsis},
+    data() {
+      return {      
+        submitInformationModVis : false,
+         value:'',
+         text:''
+      }
+    },
+    watch:{
+    },
+   
+    methods: {
+        ok(){
+          this.$emit('close',this.value,this.text)
+          this.close()
+          this.value = ''
+        },
+        close(){
+            this.submitInformationModVis = false
+            // this.value = ''
+        }
+   },
+  }
+  </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;
+  // }
+  //  /deep/ .ant-table-footer .ant-table-body {
+  //     overflow: hidden !important;
+  //   }
+  // /deep/ th.replacecolor {
+  //   background-color: #ccc;
+  // }
+  /deep/ .ant-modal-body {
+    height: 100% !important;
+  }
+  /deep/ .ant-modal-content{
+    overflow: auto;
+  }
+  </style>
+  

+ 7 - 0
src/views/reportForms/cost-allocation-table/submitInformation.vue

@@ -13,6 +13,7 @@
       v-model="value"
       placeholder="请输入"
       :auto-size="{ minRows: 3, maxRows: 15 }"
+      :readOnly="showAll=='yes'"
     />
     </div>
     </a-modal>
@@ -34,6 +35,12 @@
          father:{}
       }
     },
+    props: {
+    showAll: {
+      type: String,
+      default: null
+    }
+  },
     watch:{
     },
    

+ 24 - 12
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -72,7 +72,7 @@
             <!-- 备注 -->
             <span slot="remarks" slot-scope="text,record">
               <!-- <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/> -->
-              <a @click="inputRemark(record,'辅料')" v-show='showSelect==0'> 备注</a>
+              <a @click="inputRemark(record,'辅料')" v-show="showSelect==0&&text!=='heji'"> 备注</a>
               <span v-show='showSelect==1'>{{ text }}</span>
             </span>
           </a-table>
@@ -89,6 +89,7 @@
             bordered
             :pagination="false"
             :scroll="{ x: 1500 }"
+            ref="table"
             class="shipData"
           >
           </a-table>
@@ -103,45 +104,45 @@
                 <a-form layout="inline" class="kk">
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出货数量合计" >
-                      <a-input v-model="sumInfo.shipQua" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.shipQua" v-show='showSelect==0'  :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.shipQua}}</span>
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运美元外销总价" >
-                      <a-input v-model="sumInfo.exportPriceUSD" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.exportPriceUSD" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.exportPriceUSD}}</span>
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运人民币外销金额">
-                      <a-input v-model="sumInfo.exportedAmountRMB" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.exportedAmountRMB" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.exportedAmountRMB}}</span>
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="成本合计金额">
-                      <a-input v-model="sumInfo.amountTotal" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.amountTotal" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.amountTotal}}</span>
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="面料金额合计" >
-                      <a-input v-model="sumInfo.fabricAmount" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.fabricAmount" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.fabricAmount}}</span>
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="辅料金额合计">
-                      <a-input v-model="sumInfo.ingAmount" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.ingAmount" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.ingAmount}}</span>
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运加工费">
-                      <a-input v-model="sumInfo.shipProcesFees" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.shipProcesFees" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.shipProcesFees}}</span>
                     </a-form-item>
                   </a-col>
@@ -150,19 +151,19 @@
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="面料不含税金额合计">
-                      <a-input v-model="sumInfo.fabricExcludTax" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.fabricExcludTax" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.fabricExcludTax}}</span>
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="辅料不含税金额合计" >
-                      <a-input v-model="sumInfo.ingExcludAmount" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.ingExcludAmount" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.ingExcludAmount}}</span>
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运不含税加工费金额" >
-                      <a-input v-model="sumInfo.excludingTaxProcessing" v-show='showSelect==0'></a-input>
+                      <a-input v-model="sumInfo.excludingTaxProcessing" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
                       <span v-show='showSelect==1'>{{sumInfo.excludingTaxProcessing}}</span>
                     </a-form-item>
                   </a-col>
@@ -187,7 +188,7 @@
       <!-- 余下数量 -->
       <ingRemQua-modal ref="ingRemQuaModal" :father="bb"></ingRemQua-modal>
       <pilosity-fewer-list-modal ref="pilosityFewerListModal"></pilosity-fewer-list-modal>
-      <submit-information  ref="submitInformation" @close="closeRemark"></submit-information>
+      <submit-information  ref="submitInformation" @close="closeRemark" :showAll="showAll=='yes'?'yes':'no'"></submit-information>
     </div>
   </div>
 </template>
@@ -633,8 +634,13 @@ export default {
     showSelect: {
       type: String,
       default: null
+    },
+    showAll: {
+      type: String,
+      default: null
     }
   },
+
   created() {},
   methods: {
     changeTaxrate(data){
@@ -647,6 +653,12 @@ export default {
       this.$forceUpdate()
       this.$emit('number',this.sumInfo.fabricExcludTax,this.sumInfo.ingExcludAmount)
     },
+    Refresh(){
+      setTimeout(()=> {
+      this.$forceUpdate();
+      this.$refs.table.doLayout()
+    },200)
+    },
     tabsCallback(key) {
       this.activeKey = key
       // console.log('点击的是', this.activeKey)

Some files were not shown because too many files changed in this diff