Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 2 years ago
parent
commit
4693016663

+ 5 - 1
src/api/V2/profitable/index.js

@@ -116,9 +116,13 @@ export const API_IMPORT_FIXED ='/fixedAssetsInfo/api/importFixedAssets'
 export const API_GET_COALPARAGRAPH = '/coalPaymentInfo/selectCoalInfo'
 //煤款记录
 export const API_GET_COALPARAGRAPH_RECORD = '/expenseInfo/selectRequestRecordInfo'
+//导出
+export const API_GET_EXPORT_TEXT = '/contractManagementInfo/settlementExport'
+//查看附件
+export const API_GET_LOOK_ANNEX = '/appendix/query/getFileList'
 //备用金列表
 export const API_GET_PETTCASHLIST = '/expenseInfo/selectPettyCashInfo'
 //备用金账户列表
 export const API_GET_PETTACCOUNTLIST = '/pettyCashInfo/selectPettyAccountInfo'
 //备用金账户下拉列表
-export const API_GET_GETACCOUNTLIST = '/pettyCashInfo/getPettyAccountList'
+export const API_GET_GETACCOUNTLIST = '/pettyCashInfo/getPettyAccountList'

+ 6 - 0
src/model/profitable/index.js

@@ -59,6 +59,8 @@ import {
   API_POST_UPLOADIMAGE,
   API_GET_COALPARAGRAPH,
   API_GET_COALPARAGRAPH_RECORD,
+  API_GET_EXPORT_TEXT,
+  API_GET_LOOK_ANNEX,
   API_GET_PETTCASHLIST,
   API_GET_PETTACCOUNTLIST,
   API_GET_GETACCOUNTLIST
@@ -180,6 +182,10 @@ export const importFixed = appRx.post(API_IMPORT_FIXED, errorCatcher, errorHandl
 export const coalPayment = appRx.get(API_GET_COALPARAGRAPH, errorCatcher, errorHandle, filter)
 // 煤款记录
 export const coalPaymentRecord = appRx.get(API_GET_COALPARAGRAPH_RECORD, errorCatcher, errorHandle, filter)
+// 导出
+export const exportText = appRx.get(API_GET_EXPORT_TEXT)
+//查看附件
+export const getAnnex = appRx.get(API_GET_LOOK_ANNEX, errorCatcher, errorHandle, filter)
 // 备用金列表
 export const pettCashList = appRx.get(API_GET_PETTCASHLIST, errorCatcher, errorHandle, filter)
 // 备用金账户列表

+ 1 - 1
src/views/home/right-top.vue

@@ -31,7 +31,7 @@ export default {
     };
   },
   watch:{
-    crklistData(res){debugger
+    crklistData(res){
       console.log('rightyop')
       console.log(res)
       this.pageflag = true;

+ 17 - 10
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -241,12 +241,13 @@
                     size="small" />
                 </ws-form-item>
                 <ws-form-item v-if='serviceManagementType == 1' label="成本(元/吨)" span="1" prop="cost">
-                  <ws-input v-model="deptBudgetList.cost" placeholder="自动获取,不可编辑" maxlength="100" size="small" />
-                  <img width="17" height="18" style="
+                <ws-input v-model="deptBudgetList.cost" v-if="deptBudgetList.inOutType == '退库' " placeholder="自动获取,不可编辑" maxlength="100" size="small" disabled />
+                  <ws-input v-model="deptBudgetList.cost" v-else placeholder="自动获取,不可编辑" maxlength="100" size="small" />
+                  <!-- <img width="17" height="18" style="
                       vertical-align: text-top;
                       position: relative;
                       top: -1px;
-                    " src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
+                    " src="../../../public/img/edit.png" @click="editClick(1)" alt="" /> -->
                 </ws-form-item>
                 <ws-form-item v-if='serviceManagementType == 1' label="提示" span="1" prop="tips">
                   <ws-input v-model="deptBudgetList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled
@@ -3960,14 +3961,20 @@ export default {
         }
         this.deptBudgetList.inOutTypeKey = 6
       }
-      this.cost = this.outContractNo.contractPrice
-      if (this.cost) {
-        this.isGetCost = true
-        this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
-      } else {
-        this.isGetCost = false
-        this.deptBudgetList.cost = this.deptBudgetList.cost
+      if(this.outContractNo.contractPrice){
+          this.cost = this.outContractNo.contractPrice
+          if (this.cost) {
+            this.isGetCost = true
+            this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
+          } else {
+            this.isGetCost = false
+            this.deptBudgetList.cost = this.deptBudgetList.cost
+          }
+      }
+      else{
+        this.deptBudgetList.cost =''
       }
+      
       this.deptBudgetList.inOutType = this.outContractNo.inOutType
       if (this.outContractNo.inOutType == '移库入库') {
         this.isSelectType = true

+ 91 - 11
src/views/profitable/contractprofitsdetails.vue

@@ -87,12 +87,13 @@
           </el-table-column>
           <el-table-column width="80" prop="status" label="状态"></el-table-column>
           <el-table-column width="100" prop="signingDate" label="签订日期"></el-table-column>
-          <el-table-column prop="address" label="操作" width="300">
+          <el-table-column prop="address" label="操作" width="350">
             <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="exportText(scope.row)" type="primary" v-if="scope.row.status == '已结算'">导出</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -134,10 +135,7 @@
             <td class="col">{{tableData.seller}}</td>
           </tr>
           <tr class="row">
-            <td class="col col-bgc"> 
-              <span v-if="tableData.agreementType == '采购合同'">采购</span>
-              <span v-if="tableData.agreementType == '收购合同'">收购</span>
-              <span v-if="tableData.agreementType == '销售合同'">销售</span>结算单价(元/吨)</td>
+            <td class="col col-bgc">结算单价(元/吨)</td>
             <td class="col">{{tableData.settlementPrice}}</td>
             <td class="col col-bgc">合计利润(元)</td>
             <td class="col">{{tableData.profit}}</td>
@@ -149,11 +147,7 @@
             <td class="col col-bgc">利润(元)</td>
           </tr>
           <tr v-for="item in tableData.contractList" class="row">
-            <td class="col">{{item.contractNo}}
-              <span v-if="item.agreementType == '采购合同'">(采购)</span>
-              <span v-if="item.agreementType == '收购合同'">(收购)</span>
-              <span v-if="item.agreementType == '销售合同'">(销售)</span>
-            </td>
+            <td class="col">{{item.contractNo}}</td>
             <td class="col">{{item.settlementPrice}}</td>
             <td class="col">{{item.weight}}</td>
             <td class="col">{{item.profit}}</td>
@@ -161,6 +155,20 @@
         </table>
     </div>
 </el-dialog>
+<el-dialog title="导出" :visible.sync="exportShow" width="500px" :before-close="exportClose" :show-close="true">
+      <div class="check">
+        <el-checkbox-group v-model="checkList" @change="checkChange">
+          <el-checkbox label="合同附件" :disabled="contract"></el-checkbox>
+          <el-checkbox label="发运记录"></el-checkbox>
+          <el-checkbox label="费用记录"></el-checkbox>
+          <el-checkbox label="结算单"></el-checkbox>
+        </el-checkbox-group>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="exportClose">取 消</el-button>
+        <el-button type="primary" @click="exportSubmit">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -168,8 +176,13 @@
     getcontractdetails,
     getrelationcontract,
     editcontract,
-    judgesettlement
+    judgesettlement,
+    exportText,
+  getAnnex
   } from '@/model/profitable/index'
+  import {
+  downloadFile
+} from '@/utils/batchDown'
   export default {
     components: {},
     data() {
@@ -195,6 +208,10 @@
         tableData:{},
         datalist:{},
         compId:localStorage.getItem('ws-pf_compId'),
+        exportShow: false,//导出
+      checkList: [],
+      exportObj: {},
+      contract: false,
       }
     },
     activated() {
@@ -206,6 +223,66 @@
       this.getPassYearFormatDate()
     },
     methods: {
+      async exportSubmit() {
+      const {
+        data
+      } = await exportText(
+        this.exportObj, {}, {
+        responseType: 'blob',
+      }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: this.exportObj.contractNo + `结算详情`,
+        type: 'doc',
+      })
+      this.exportShow = false
+      this.checkList = []
+      this.exportObj = {}
+    },
+    exportText(row) {//导出
+      this.exportObj.contractNo = row.contractNo
+      if (row.addressUrl) {//查看附件后返回后端
+        getAnnex({
+          appendixIds: row.addressUrl,
+        }).toPromise().then(res => {
+          let arr = []
+          if (res.length > 0) {
+            for (let i = 0; i < res.length; i++) {
+              arr.push(res[i].appendixPath)
+            }
+          }
+          if (arr.length > 0) {
+            this.exportObj.addressUrl = arr.toString()
+          } else {//合同附件为空不让勾选
+            this.contract = true
+          }
+        })
+      }
+      this.exportShow = true
+    },
+    checkChange(e) {
+      for (let i = 0; i < this.checkList.length; i++) {
+        switch (this.checkList[i]) {
+          case '合同附件':
+            this.exportObj.needContractUrl = 1
+            break
+          case '发运记录':
+            this.exportObj.shippingRecord = 1
+            break
+          case '费用记录':
+            this.exportObj.expenseRecord = 1
+            break
+          case '结算单':
+            this.exportObj.needSettlementUrl = 1
+            break
+        }
+      }
+    },
+    exportClose() {
+      this.checkList = []
+      this.exportShow = false
+    },
       handleClose(){
         this.correlationshow=false
       },
@@ -493,4 +570,7 @@
   .el-icon-connection{
     color:#409eff;
   }
+  .check {
+  text-align: center;
+}
 </style>

+ 3 - 1
src/views/profitable/expensemanagementdetails.vue

@@ -429,6 +429,9 @@ export default {
     }
   },
   activated() {
+    if(this.$route.query.id){//有id证从任务页面进来的  将筛选状态变成待付款
+      this.toExamineType = "2"
+    }
     this.getPassYearFormatDate()
     if(this.$route.query.contractNo){
         this.flowTo=this.$route.query.contractNo
@@ -580,7 +583,6 @@ export default {
         })
     },
     getList1() {
-      console.log(this.toExamineType)
       this.currentPage = 1
       this.getList()
     },

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

@@ -236,22 +236,30 @@
                   size="small"
                 />
               </ws-form-item>
+               <!--装车日期-->
+              <ws-form-item
+                label="装车日期:"
+                span="1"
+                prop="loadingDate"
+                style="width: 200px"
+                >{{ item.loadingDate }}</ws-form-item
+              >
               <!--卸车日期-->
               <ws-form-item
                 label="卸车日期:"
                 span="1"
-                prop="receiveDateEnd"
+                prop="unloadingDate"
                 style="width: 340px"
               >
                 <ws-date-picker
-                  v-model="item.receiveDateEnd"
+                  v-model="item.unloadingDate"
                   v-if="item.status == '已送达' || item.status == '未装车'"
                   :disabled="readonly"
                   type="date"
                   value-format="yyyy-MM-dd"
                 />
                 <ws-date-picker
-                  v-model="item.receiveDateEnd"
+                  v-model="item.unloadingDate"
                   v-else
                   type="date"
                   placeholder="请选择日期"
@@ -548,7 +556,7 @@ export default {
             obj.driverPhone = v.司机电话
             obj.driver = v.司机姓名
             obj.unloadNetWeight = v.卸车净重
-            obj.receiveDateEnd = v.卸车日期
+            obj.unloadingDate = v.卸车日期
             obj.status = v.状态
             obj.carNo = v.车牌号
             obj.unloadPoundImg = v.磅单

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

@@ -132,10 +132,10 @@
                 size="small" />
             </ws-form-item>
             <!--装车日期-->
-            <ws-form-item label="装车日期:" span="1" prop="sendDateStart">
+            <ws-form-item label="装车日期:" span="1" prop="loadingDate">
               <ws-date-picker v-if="item.status == '已装车'||item.status == '已送达'" :disabled="readonly"
-                v-model="item.sendDateStart" type="date" class="picker" placeholder="请选择日期" value-format="yyyy-MM-dd" />
-              <ws-date-picker v-else v-model="item.sendDateStart" type="date" class="picker" placeholder="请选择日期"
+                v-model="item.loadingDate" type="date" class="picker" placeholder="请选择日期" value-format="yyyy-MM-dd" />
+              <ws-date-picker v-else v-model="item.loadingDate" type="date" class="picker" placeholder="请选择日期"
                 value-format="yyyy-MM-dd" />
             </ws-form-item>
             <!--磅单-->
@@ -434,7 +434,7 @@
               obj.driverPhone = v.司机电话
               obj.driver = v.姓名
               obj.loadNetWeight = v.装车净重
-              obj.sendDateStart = v.装车日期
+              obj.loadingDate = v.装车日期
               obj.status = v.状态
               obj.carNo = v.车牌号
               obj.loadPoundImg = v.磅单