gjy 2 years ago
parent
commit
bb2d394e07

+ 1 - 1
src/components/WsUpload/index.vue

@@ -45,7 +45,7 @@
       <template v-slot:file="{ file }">
         <div class="thumbnail-group">
           <img 
-          v-if='getFileClass(file)=="ext png"||getFileClass(file)=="ext jpg"||getFileClass(file)=="ext jpeg"'
+          v-if='getFileClass(file)=="ext png"||getFileClass(file)=="ext jpg"||getFileClass(file)=="ext jpeg"||getFileClass(file)=="ext JPG"'
           :src='file.url'
             class="el-upload-list__item-thumbnail"
             :class="getFileClass(file)"

+ 1 - 1
src/model/universalityAudit/index.js

@@ -16,7 +16,7 @@ export const editaduitinfo = appRx.get(API_EDIT_AUDITINFO, errorCatcher, errorHa
 // 删除
 export const deladuitinfo = appRx.get(API_DEL_AUDITINFO, errorCatcher, errorHandle, filter)
 // 添加
-export const addaduitinfo = appRx.get(API_ADD_AUDITINFO, errorCatcher, errorHandle, filter)
+export const addaduitinfo = appRx.post(API_ADD_AUDITINFO, errorCatcher, errorHandle, filter)
 // 列表
 export const aduitinfoList = appRx.get(API_LIST_AUDITINFO, errorCatcher, errorHandle, filter)
 // 类型下拉

+ 3 - 0
src/views/outboundManagement/weighingManagementNew.vue

@@ -1091,6 +1091,9 @@
       },
 
       listclick(row) {
+        if(this.tpyeNo == 2){
+          
+        }
         this.id = row.id
         getweighing({
             id: row.id,

+ 1 - 1
src/views/salesManagement/salesPlanOrderList.vue

@@ -1272,7 +1272,7 @@
               posthandle({
                   taskId: this.aduitlist.taskId,
                   approved: true,
-                  auditMind: ',
+                  auditMind: '',
                   needReapply: false,
                 })
                 .toPromise()

+ 4 - 4
src/views/tranManagement/tranManagementReceivingloading.vue

@@ -45,11 +45,11 @@
             >
 
             <!--发货地址-->
-            <ws-form-item label="发货地址" span="1" prop="netWeight">
+            <!-- <ws-form-item label="发货地址" span="1" prop="netWeight">
               {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
               }}{{ deptBudgetList.sendArea
               }}{{ deptBudgetList.sendDetailedAddress }}
-            </ws-form-item>
+            </ws-form-item> -->
             <!--发货人-->
             <ws-form-item label="发货人" span="1" prop="agent">{{
               deptBudgetList.sender
@@ -60,11 +60,11 @@
               deptBudgetList.senderPhone
             }}</ws-form-item>
             <!--收货地址-->
-            <ws-form-item label="收货地址" span="1" prop="netWeight">
+            <!-- <ws-form-item label="收货地址" span="1" prop="netWeight">
               {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
               }}{{ deptBudgetList.receiveArea
               }}{{ deptBudgetList.receiveDetailedAddress }}
-            </ws-form-item>
+            </ws-form-item> -->
             <!--收货人-->
             <ws-form-item label="收货人" span="1" prop="receiver">{{
               deptBudgetList.receiver

+ 10 - 10
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -31,11 +31,11 @@
                 <el-input type="text" class="row-item" v-model="deptBudgetList.weight" disabled></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
+            <!-- <el-col :span="8">
               <el-form-item label="发货地址" span="1" prop="netWeight">
                 <el-input type="text" class="row-item" v-model="fhaddress" disabled></el-input>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :span="8">
               <el-form-item label="发货人" span="1" prop="agent">
                 <el-input type="text" class="row-item" v-model="deptBudgetList.sender" disabled></el-input>
@@ -46,11 +46,11 @@
                 <el-input type="text" class="row-item" v-model="deptBudgetList.senderPhone" disabled></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
+            <!-- <el-col :span="8">
               <el-form-item label="收货地址" span="1" prop="netWeight">
                 <el-input type="text" class="row-item" v-model="shaddress" disabled></el-input>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :span="8">
               <el-form-item label="收货人电话" span="1" prop="receiverPhone">
                 <el-input type="text" class="row-item" v-model="deptBudgetList.receiverPhone" disabled></el-input>
@@ -513,7 +513,7 @@
           } else {
             var tmp1 = 'C00'
             this.deptBudgetList.count++
-            if (this.deptBudgetList.tranCarInfoList.length + 1 < 10) {
+            if (this.deptBudgetList.tranCarInfoList.length < 10) {
               this.deptBudgetList.tranCarInfoList.push({
                 driverName: '',
                 driverPhone: '',
@@ -532,7 +532,7 @@
                 tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length+ 1 < 100 && this.deptBudgetList.tranCarInfoList.length + 1>=
+            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
               10) {
               tmp1 = 'C0'
               this.deptBudgetList.count++
@@ -554,7 +554,7 @@
                 tranCarNo: 'C0' + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length+ 1 >=
+            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
               100) {
               tmp1 = 'C'
               this.deptBudgetList.count++
@@ -587,7 +587,7 @@
           } else {
             var tmp1 = 'C00'
             this.deptBudgetList.count++
-            if (this.deptBudgetList.tranCarInfoList.length + 1 < 10) {
+            if (this.deptBudgetList.tranCarInfoList.length < 10) {
               this.deptBudgetList.tranCarInfoList.push({
                 driverName: '',
                 driverPhone: '',
@@ -606,7 +606,7 @@
                 tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length+ 1 >=
+            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
               10) {
               tmp1 = 'C0'
               this.deptBudgetList.count++
@@ -628,7 +628,7 @@
                 tranCarNo: 'C0' + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length+ 1 >=
+            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
               100) {
               tmp1 = 'C'
               this.deptBudgetList.count++

+ 234 - 98
src/views/universalityAudit/audit.vue

@@ -4,9 +4,6 @@
     
     <div class="center">
       <el-row style='margin-bottom:10px;'>
-        <el-col :span="12">
-          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
-        </el-col>
         <el-col :span="12">
           <div style='margin-left:10px;' class="datascreen">
             <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" unlink-panels range-separator="至"
@@ -16,18 +13,22 @@
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
                 src="../../../public/img/sousuo.png" alt="" /></el-button>
           </div>
+          
+        </el-col>
+        <el-col style="text-align:right;" :span="12">
+          <el-button style="margin-right:10px" @click="addlist" type="primary">添加</el-button>
         </el-col>
       </el-row>
       <el-row style='margin-bottom:10px;'>
         <el-col :span="18">
           <el-button style="margin-left:10px" @click="typeChange1('')" :type="searchType == ''?'primary':''">全部</el-button>
-          <el-button @click="typeChange1(4)" :type="searchTypeCon == 4?'primary':''">待审核</el-button>
-          <el-button @click="typeChange1(1)" :type="searchTypeCon == 1?'primary':''">已驳回</el-button>
-          <el-button @click="typeChange1(3)" :type="searchTypeCon == 3?'primary':''">已通过</el-button>
-          <el-select v-model="contractType" filterable clearable placeholder="选择类型" @change="selecttype" :value="searchType">
+          <el-button @click="typeChange1(1)" :type="searchType == 1?'primary':''">待审核</el-button>
+          <el-button @click="typeChange1(2)" :type="searchType == 2?'primary':''">已驳回</el-button>
+          <el-button @click="typeChange1(3)" :type="searchType == 3?'primary':''">已通过</el-button>
+          <el-select v-model="businessType" filterable clearable placeholder="选择类型" @change="typeChange" >
           <el-option  key="type0" label="全部类型" value=""
             style="color: #8890b1" />
-            <el-option v-for="item in xialaList"  :key="item.id" :label="item" :value="item"
+            <el-option v-for="item in xialaList"  :key="item.id" :label="item.constValue" :value="item.constValue"
             style="color: #8890b1" />
         </el-select>
         </el-col>
@@ -52,12 +53,25 @@
           <el-table-column prop="businessType" label="类型">
           </el-table-column>
           <el-table-column prop="buyer" label="备注">
-            <template slot-scope="scope">
-            </template>
+             <template slot-scope="scope">
+              <el-popover
+              placement="bottom"
+              title="备注详情"
+              width="400"
+              trigger="click"
+             >
+              <div>
+                <div>{{scope.row.sponsor+'('+scope.row.auditBusinessNo+')'}}</div>
+                <div>{{scope.row.remark}}</div>
+              </div>
+              
+              <el-button slot="reference">查看</el-button>
+            </el-popover>
+            </template> 
           </el-table-column>
           <el-table-column prop="addressUrl" label="附件">
-        <template slot-scope="scope">
-          <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+       <template slot-scope="scope">
+           <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
             src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
           <span v-if="scope.row.addressUrlArray != null">
             {{
@@ -66,17 +80,19 @@
                 : scope.row.addressUrlArray.length
             }}
           </span>
-        </template>
+        </template> 
       </el-table-column>
           <el-table-column prop="createDate" label="时间"></el-table-column>
     
           <el-table-column prop="status" label="状态"></el-table-column>
           <el-table-column prop="address" label="操作" width="300">
             <template slot-scope="scope">
-              <!-- <el-button v-if="scope.row.status=='已结算'" @click="finalstatement(scope.row)" type="primary">结算单</el-button>
-              <el-button v-if="scope.row.status=='已完成'" @click="closeaccount(scope.row)" type="primary">结算</el-button> -->
-              <el-button @click="inventory(scope.row)" type="primary">库存</el-button>
-              <el-button @click="cost(scope.row)" type="primary">费用</el-button>
+              
+              <el-button @click="pass(scope.row)" type="primary">通过</el-button>
+              <el-button @click="reject(scope.row)" type="primary">驳回</el-button>
+              <!-- <div style="display:inline-block;"> -->
+                <el-button v-if="scope.row.status=='已驳回'" @click="del(scope.row)" type="danger">删除</el-button>
+              <!-- </div> -->
             </template>
           </el-table-column>
         </el-table>
@@ -88,23 +104,37 @@
     </div>
     <el-dialog
   title="提示"
-  :visible.sync="correlationshow"
+  :visible.sync="addshow"
   width="30%"
   :before-close="handleClose">
-  <div v-if="contractList.length>0">
-    <div style="display:flex;justify-content: space-between;" v-for="item in contractList"><div>{{item.contractNo}}</div>
-  <div><span v-if="item.status!='已完成'&&item.status!='已结算'&&item.status!='发运结束'">未完成</span><span v-else>未完成</span></div>
-     </div>
-  </div>
-  <div v-else>暂无关联合同</div>
+  <el-form ref="form" :model="form" label-width="80px">
+  <el-form-item label="类型">
+    <el-select v-model="form.businessType" filterable clearable placeholder="选择类型">
+      <el-option v-for="item in xialaList"  :key="item.id" :label="item.constValue" :value="item.constValue" style="color: #8890b1" />
+    </el-select>
+  </el-form-item>
+  <el-form-item label="附件">
+    <ws-upload ref="upload" limit="20" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="form.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
+  </el-form-item>
+  
+  <el-form-item label="备注">
+    <el-input maxlength="2000" type="textarea" show-word-limit v-model="form.remark"></el-input>
+  </el-form-item>
+  <el-form-item>
+    <el-button @click="addshow=false">取消</el-button>
+    <el-button type="primary" @click="onSubmit">提交</el-button>
+  </el-form-item>
+</el-form>
 </el-dialog>
 <el-dialog
   title="合同结算单"
   :visible.sync="show"
   width="30%"
   :before-close="handleClose1">
-  <div>
-    <table class="table">
+  <!--<div>
+     <table class="table">
           <tr class="row">
             <td class="col col-bgc">合同编号</td>
             <td class="col">{{tableData.contractNo}}</td>
@@ -136,131 +166,220 @@
             <td class="col">{{item.profit}}</td>
           </tr>
         </table>
-    </div>
+    </div> -->
 </el-dialog>
+<el-dialog
+      :title="title"
+      :visible.sync="rejectshow"
+      width="30%"
+      :before-close="handleClose">
+      <span>{{title=='驳回'?'确定驳回审核?':'确定通过审核?'}}</span>
+      <div><el-input
+  type="textarea"
+  :rows="2"
+  placeholder="请输入审核意见"
+  v-model="textarea">
+</el-input>
+</div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="rejectclick">确 定</el-button>
+      </span>
+    </el-dialog>
+<WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </WinseaContentModal>
   </div>
 </template>
 <script>
   import {
     xiala,
-    aduitinfoList
+    aduitinfoList,
+    addaduitinfo,
+    deladuitinfo
   } from '@/model/universalityAudit/index'
+  import WsUpload from '@/components/WsUpload'
   export default {
-    components: {},
+    components: {
+      WsUpload
+    },
     data() {
       return {
         value: "",
         tableData: [],
         show:false,
+        title:'',
+        textarea:'',
+        rejectshow:false,
+        addshow:false,
         correlationshow:false,
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
-        agreementType:'',
-        deptCircularPage: {},
+        businessType:'',
         searchType:"",
         searchKeyWord:"",
         startDate:"",
-        searchContractType:'',
-        searchTypeCon:'',
         endDate:"",
         outtotal:0,
         xialaList:[],
         intotal:0,
+        form:{},
+        dialogVisible:false,
         contractList:[],
-        tableData:{},
         datalist:{},
+        size:100,
+        accessoryTFs:false,
+        appendixIdss:'',
         compId:localStorage.getItem('ws-pf_compId'),
+        currectdata:{}
       }
     },
     activated() {
-      xiala({constCode:'EXA1'}).toPromise()
+      xiala({constId:'EXA1'}).toPromise()
           .then(response => {
             this.xialaList=response
           })
           this.getList()
     },
     methods: {
-      handleClose(){
-        this.correlationshow=false
-      },
-      handleClose1(){
-        this.show=false
-      },
-      correlation(row){
-        getrelationcontract({
-          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
-          .toPromise()
-          .then(response => {
-            this.contractList=response
-            this.correlationshow=true
+      rejectclick(){
+        if(this.title=='驳回'){
+          woekflowhandle({
+            taskId: this.currectdata.taskId,
+            approved:false,
+            auditMind: this.textarea,
+            needReapply: true,
+          }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.rejectshow=false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
           })
+        }else{
+          woekflowhandle({
+              taskId: this.currectdata.taskId,
+              approved:true,
+              auditMind: this.textarea,
+              needReapply: true,
+            }).toPromise()
+            .then((response) => {
+              this.$message({
+                message: '通过成功!',
+                type: 'success',
+              })
+            }).catch((response) => {
+              this.$message({
+                message: '通过失败!',
+                type: 'error',
+              })
+            })
+        }
         
       },
-      typeChange(num){
-        this.searchContractType= num
-        this.getList()
+      pass(row){
+        this.currectdata=row
+        this.title='通过'
+        this.rejectshow=true
       },
-      typeChange1(num){
-        this.searchTypeCon= num
-        this.getList()
+      reject(row){
+        this.currectdata=row
+        this.title='驳回'
+        this.rejectshow=true
       },
-      async closeaccount(row){
-      
-        var data=await getrelationcontract({
-          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
-            .toPromise()
-            var arr=[row].concat(data)
-            this.datalist.contractManagementInfoList=arr
-            judgesettlement(this.datalist).toPromise().then(response => {
-                         var weightprice=0
-                  for (let i = 0; i < data.length; i++) {
-                      weightprice+=(data[i].weight*data[i].settlementPrice)
-                  }
-                  if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
-                    row.profit=weightprice-(row.weight*row.settlementPrice)
-                  }else if(row.agreementType=='销售合同'){
-                    row.profit=(row.weight*row.settlementPrice)-weightprice
-                  }
-        this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
+      fujian(row) {
+        this.id = row.id
+        this.accessoryTFs = true
+        this.appendixIdss = row.addressUrl
+        console.log(this.appendixIdss)
+      },
+      del(row){
+        this.$confirm('确定删除审核信息?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           })
           .then(() => {
-            editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
-          .then(response => {
+            deladuitinfo({id:row.id}).toPromise().then(response => {
             this.$message({
-                message: '结算成功!',
+                message: '删除成功!',
                 type: 'success',
+            })
+            this.getList()
           })
-          this.getList()
-          }).catch(()=>{
-            this.$message({
-                message: '结算失败!',
-                type: 'warning',
           })
+      },  
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.form.addressUrl = response
           })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
           })
-        })
       },
-      finalstatement(row){
-        this.tableData.contractNo=row.contractNo
-        this.tableData.agreementType=row.agreementType
-        this.tableData.buyer=row.buyer
-        this.tableData.seller=row.seller
-        this.tableData.settlementPrice=row.settlementPrice
-        this.tableData.profit=row.profit
-        getrelationcontract({
-          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
-          .toPromise()
-          .then(response => {
-            this.tableData.contractList=response
-            this.show=true
+      
+      onSubmit(){
+        if(!this.form.businessType){
+          this.$message({
+                message: '审核类型不能为空!',
+                type: 'warning',
+            })
+        }
+        if(this.form.remark&&this.form.remark.length<2||this.form.remark&&this.form.remark.length>1000){
+          this.$message({
+                message: '备注信息10-2000个字!',
+                type: 'warning',
+            })
+        }
+        this.$confirm('确定发起审核?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            this.form.compId=localStorage.getItem('ws-pf_compId')
+            this.form.sponsor=localStorage.getItem('ws-pf_roleName')
+          addaduitinfo(this.form).toPromise().then(response => {
+            this.$message({
+                message: '提交成功!',
+                type: 'success',
+            })
+            this.form={}
+            this.$refs.upload.clearFiles()
+            this.addshow=false
+            this.getList()
           })
+        })
+      },
+      addlist(){
+        this.addshow=true
+      },
+      handleClose(){
+        this.addshow=false
       },
-      inventory(row){
-        this.$router.push({name:'contractinventory',query:{contractNo:row.contractNo,contractType:row.contractType,buyer:row.buyer,seller:row.seller}})
+      handleClose1(){
+        this.show=false
+      },
+      typeChange(num){
+        this.businessType= num
+        this.getList()
+      },
+      typeChange1(num){
+        this.searchType= num
+        this.getList()
       },
       returnsales(){
         this.$router.go(-1)
@@ -269,7 +388,6 @@
         this.multipleSelection = val;
       },
       async getList() {
-        
         aduitinfoList({
             startDate:this.startDate,
             endDate:this.endDate,
@@ -277,10 +395,28 @@
             currentPage: this.currentPage,
             pageSize:this.pageSize ,
             searchType:this.searchType,
+            businessType:this.businessType
           })
           .toPromise()
           .then(response => {
-            this.tableData=response
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                if(response.records[i].addressUrl){
+                  response.records[i].addressUrlArray=[]
+                  var arr=response.records[i].addressUrl.split(',')
+                  for (let q = 0; q < arr.length; q++) {
+                    if(arr[q]!=''){
+                      response.records[i].addressUrlArray.push(arr[q])
+                    }
+                    
+                  }
+                  
+                }
+                
+              }
+            }
+            this.tableData=response.records
+            this.deptBudgetTotal=response.total
           })
       },
 

+ 2 - 2
src/views/universalityAudit/component/routers/route.js

@@ -1,6 +1,6 @@
 import Layout from '@/layout/index';
 
-const profitableRouter = {
+// const profitableRouter = {
 //   path: '/aduitmanagement',
 //   component: Layout,
 //   redirect: '/aduitmanagement',
@@ -33,4 +33,4 @@ const profitableRouter = {
 
 // };
 
-export default profitableRouter;
+// export default profitableRouter;