Prechádzať zdrojové kódy

森语-事故处理单

jbb 2 rokov pred
rodič
commit
e830263099

+ 24 - 12
src/views/oa/IncidentTicketList.vue

@@ -32,6 +32,18 @@
                 <j-input placeholder="请输入质量事故单主题" v-model="queryParam.accidentTheme"></j-input>
               </a-form-item>
               
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="单价状态">
+                <a-select placeholder="" v-model="queryParam.state">
+                  <a-select-option value="1">未处理</a-select-option>
+                  <a-select-option value="2">已通知</a-select-option>
+                  <a-select-option value="3">已反馈通知</a-select-option>
+                  <a-select-option value="4">已推送</a-select-option>
+                  <a-select-option value="5">已完结</a-select-option>
+                </a-select>
+              </a-form-item>
+              
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
               <a-form-item label="财务备注">
@@ -86,7 +98,7 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :scroll="{x: 2000}"
+        :scroll="{x: 1590}"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
@@ -176,7 +188,7 @@
             align:"center",
             ellipsis: true,
             dataIndex: 'accidentData',
-            width:100
+            width:110
           
           },
           {
@@ -184,14 +196,14 @@
             align:"center",
             customRender: (t) => ellipsis(t),
             dataIndex: 'accidentNumber',
-            width:100
+            width:130
           },
           {
             title:'质量事故单主题',
             align:"center",
             customRender: (t) => ellipsis(t),
             dataIndex: 'accidentTheme',
-            width:100,
+            width:170,
             ellipsis: true,
           },
           {
@@ -199,32 +211,32 @@
             align:"center",
             customRender: (t) => ellipsis(t),
             dataIndex: 'responsibilityCompany',
-            width:160,
+            width:105,
           },
           {
             title:'责任人1',
             align:"center",
             dataIndex: 'responsibilityPerson1',
-            width:80
+            width:85
           },
           {
             title:'责任人2',
             align:"center",
             dataIndex: 'responsibilityPerson2',
-            width:80
+            width:85
           },
           {
             title:'责任人3',
             align:"center",
             dataIndex: 'responsibilityPerson3',
-            width:80
+            width:85
           },
 
           {
             title:'计划单号',
             align:"center",
             dataIndex: 'planNumber',
-            width:100
+            width:120
           },
           {
             title:'款号',
@@ -243,14 +255,14 @@
             align:"center",
             dataIndex: 'financeRemark',
             customRender: (t) => ellipsis(t),
-            width:140
+            width:160
           },
           {
             title:'状态',
             align:"center",
             dataIndex: 'state',
             scopedSlots: { customRender: 'state' },
-            width:80
+            width:140
           },
           {
             title: '操作',
@@ -258,7 +270,7 @@
             align:"center",
             scopedSlots: { customRender: 'action' },
             fixed:"right",
-            width:120
+            width:169
           }
         ],
         url: {

+ 23 - 19
src/views/oa/modules/IncidentTicketModal.vue

@@ -163,13 +163,13 @@
           :columns="incidentTicketChildrenTable.columns"
           :data-source="incidentTicketChildrenTable.dataSource"
          :loading="incidentTicketChildrenTable.loading"
-         :scroll="{x: 2000,y:300 }"
+         :scroll="{x: 1500,y:300 }"
           :pagination="false"
             >
              <!-- 自定义表头 -->
-             <span slot="zhanghaoIdTitle" class="form-table-heard">
+             <!-- <span slot="zhanghaoIdTitle" class="form-table-heard">
              账套号
-            </span>
+            </span> -->
             <span slot="exchangeRateTitle" class="form-table-heard">
              汇率
             </span>
@@ -332,28 +332,28 @@
             title: '计划单号',
             align: "center",
             dataIndex: 'planNumber',
-            width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'planNumber' },
           },
           {
             title: '事故类型',
             align: "center",
             dataIndex: 'accidentType',
-            width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'accidentType' },
           },
           {
             title: '事故金额',
             align: "center",
             dataIndex: 'accidentSum',
-            width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'accidentSum' },
           },
           {
             // title: '汇率',
             align: "center",
             dataIndex: 'exchangeRate',
-            width: 140,
+            width: '9%',
             scopedSlots: { customRender: 'exchangeRate' },
             slots:{title:'exchangeRateTitle'},
           },
@@ -361,7 +361,7 @@
             // title: '实际事故金额',
             align: "center",
             dataIndex: 'practicalSum',
-            width: 140,
+            width: '7%',
             scopedSlots: { customRender: 'practicalSum' },
             slots:{title:'practicalSumTitle'},
 
@@ -370,16 +370,16 @@
             title: 'U8生成运费发票号',
             align: "center",
             dataIndex: 'u8Invoice',
-            width: 140,
+            width: '9%',
             scopedSlots: { customRender: 'u8Invoice' },
           },
           {
-            // title: '账套号',
+            title: '账套号',
             align: "center",
             dataIndex: 'zhanghaoId',
-            width: 140,
+            width: '9%',
             scopedSlots: { customRender: 'zhanghaoId' },
-            slots:{title:'zhanghaoIdTitle'},
+            // slots:{title:'zhanghaoIdTitle'},
 
           },
           
@@ -387,7 +387,7 @@
             title: '备注',
             align: "center",
             dataIndex: 'remark',
-            width: 140,
+            width: '20%',
             scopedSlots: { customRender: 'remark' },
           },
 
@@ -442,7 +442,10 @@
           if(res.success){
             this.incidentTicketChildrenTable.dataSource = res.result
             this.incidentTicketChildrenTable.dataSource.map(item=>{
-              item.practicalSum = item.accidentSum
+              if(item.practicalSum==''||!item.practicalSum){
+                item.practicalSum = item.accidentSum
+              }
+              item.exchangeRate = '1'
             })
           }else{
             this.$message.warning(res.message)
@@ -467,11 +470,11 @@
           this.formState.accessory2 = JSON.stringify(this.formState.accessory2)
           var addData = 'yes'
           this.incidentTicketChildrenTable.dataSource.every(item=>{
-            if(item.zhanghaoId==''||!item.zhanghaoId){
-              this.$message.warning('请选择账套号!')
-               addData = 'no'
-               return false;
-            }
+            // if(item.zhanghaoId==''||!item.zhanghaoId){
+            //   this.$message.warning('请选择账套号!')
+            //    addData = 'no'
+            //    return false;
+            // }
             if(item.exchangeRate=='' || !item.exchangeRate){
               this.$message.warning('请填写汇率!')
                addData = 'no'
@@ -577,6 +580,7 @@
 /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item>.ant-form-item-label{
   width: 118px;
 }
+/deep/.ant-table td { white-space: nowrap; }
 .form-table-heard:before {
       content: '*';
       color: red;

+ 34 - 9
src/views/oa/modules/IncidentTicketModalDetail.vue

@@ -11,14 +11,14 @@
     <template #footer>
         <a-button  @click="handleCancel" style="margin-left: 8px;">取消</a-button>
         <a-button  type="primary"  @click="addNotice" style="margin-left: 8px;" :disabled="!(formState.state=='1')">通知</a-button>
-        <a-popconfirm title="确定反馈通知吗?" ok-text="是" cancel-text="否" @confirm="feedbackNotice" :visible="visibleFk">
+        <a-popconfirm title="确定反馈通知吗?" ok-text="是" cancel-text="否" @confirm="feedbackNotice" @cancel="handleCancelPop('visibleFk')" :visible="visibleFk">
           <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='2')" @click="()=>visibleFk = true">反馈通知</a-button>
         </a-popconfirm>
-        <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push" :visible="visibleTs">
+        <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push" @cancel="handleCancelPop('visibleTs')" :visible="visibleTs">
           <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='3')" @click="()=>visibleTs = true">推送</a-button>
         </a-popconfirm>
-        <a-popconfirm title="确定完结吗?" ok-text="是" cancel-text="否" @confirm="end"  :visible="visibleWj">
-          <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='4')" @click="()=>visibleWj = true">完结</a-button>
+        <a-popconfirm title="确定完结吗?" ok-text="是" cancel-text="否" @confirm="end"   @cancel="handleCancelPop('visibleWj')" :visible="visibleWj">
+          <a-button  type="primary"   style="margin-left: 8px;" :disabled="!(formState.state=='3')" @click="()=>visibleWj = true">完结</a-button>
         </a-popconfirm>
       </template>
     <a-spin :spinning="confirmLoading">
@@ -176,7 +176,7 @@
           :columns="incidentTicketChildrenTable.columns"
           :data-source="incidentTicketChildrenTable.dataSource"
          :loading="incidentTicketChildrenTable.loading"
-         :scroll="{x: 2000,y:300 }"
+         :scroll="{x: 1500,y:300 }"
           :pagination="false"
             >
           <!-- 汇率 -->
@@ -400,6 +400,7 @@
             align: "center",
             dataIndex: 'planNumber',
             width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'planNumber' },
           },
           {
@@ -407,6 +408,7 @@
             align: "center",
             dataIndex: 'accidentType',
             width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'accidentType' },
           },
           {
@@ -414,6 +416,7 @@
             align: "center",
             dataIndex: 'accidentSum',
             width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'accidentSum' },
           },
           {
@@ -421,6 +424,7 @@
             align: "center",
             dataIndex: 'exchangeRate',
             width: 140,
+            width: '9%',
             // scopedSlots: { customRender: 'exchangeRate' },
           },
           {
@@ -428,20 +432,21 @@
             align: "center",
             dataIndex: 'practicalSum',
             width: 140,
+            width: '7%',
             // scopedSlots: { customRender: 'practicalSum' },
           },
           {
             title: 'U8生成运费发票号',
             align: "center",
             dataIndex: 'u8Invoice',
-            width: 140,
+            width: '9%',
             // scopedSlots: { customRender: 'u8Invoice' },
           },
           {
             title: '账套号',
             align: "center",
             dataIndex: 'zhanghaoId',
-            width: 140,
+            width: '9%',
             // scopedSlots: { customRender: 'zhanghaoId' },
           },
           
@@ -449,7 +454,7 @@
             title: '备注',
             align: "center",
             dataIndex: 'remark',
-            width: 140,
+            width: '20%',
             // scopedSlots: { customRender: 'remark' },
           },
 
@@ -471,6 +476,7 @@
         this.$refs.JSelectBizComponent.showModal()
       },
       feedbackNotice(){
+        this.visibleFk =false
         getAction('/oa/incidentTicket/noticeUserReturn', {headId:this.formState.id,title:this.formState.accidentTheme,code:this.formState.accidentNumber}).then((res) => {
           if(res.success){
             this.$message.success(res.message)
@@ -483,7 +489,18 @@
         })
       },
       push(){
-        getAction('/oa/incidentTicket/propelling', {headId:this.formState.id}).then((res) => {
+        this.visibleTs = false
+        var pushOk = 'yes'
+        this.incidentTicketChildrenTable.dataSource.every(item=>{
+          if(item.zhanghaoId==''||!item.zhanghaoId){
+              this.$message.warning('请选择账套号!')
+              pushOk = 'no'
+               return false;
+            }
+            return true
+        })
+        if(pushOk=='yes'){
+          getAction('/oa/incidentTicket/propelling', {headId:this.formState.id}).then((res) => {
           if(res.success){
             this.$message.success(res.message)
             this.handleCancel()
@@ -491,8 +508,10 @@
             this.$message.warning(res.message)
           }
         })
+        }
       },
       end(){
+        this.visibleWj = false
         getAction('/oa/incidentTicket/endOrder', {headId:this.formState.id}).then((res) => {
           if(res.success){
             this.$message.success(res.message)
@@ -583,6 +602,12 @@
         this.visibleFk = false
         this.$emit('close')
       },
+      // 关闭提示框
+      handleCancelPop(data){
+        if(data=='visibleFk') this.visibleFk = false
+        if(data=='visibleTs') this.visibleTs = false
+        if(data=='visibleTs') this.visibleTs = false
+      },
       // getAllTable() {
       //   let values = this.tableKeys.map(key => getRefPromise(this, key))
       //   return Promise.all(values)