Explorar o código

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan %!s(int64=2) %!d(string=hai) anos
pai
achega
6e5bdcca58

+ 22 - 2
src/views/contractManagement/acquisitionContractAdd.vue

@@ -31,8 +31,20 @@
     </el-row>
       </div>
       <ws-info-table>
-        <!--合同编号-->
-        <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly" required>
+        <!-- <ws-form-item label="合同类型" span="1" prop="agreementType" class="readonly">
+          <el-radio v-model="deptBudgetList.agreementType" label="收购合同">收购合同</el-radio>
+          <el-radio v-model="deptBudgetList.agreementType" label="补充协议">补充协议</el-radio>
+        </ws-form-item>
+         <ws-form-item prop="agreementNo" label="关联合同" span="1" v-show="deptBudgetList.agreementType =='补充协议'">
+          <ws-select v-model="deptBudgetList.agreementNo" placeholder="请选择编号" @change="selectRelation">
+            <ws-option v-for="item in contractNoList"  :key="item.id" :label="item.contractNo"
+              :value="item.contractNo"></ws-option>
+          </ws-select>
+        </ws-form-item>
+        <ws-form-item v-show="deptBudgetList.agreementType == '补充协议'" label="补充协议编号" span="1" prop="contractNo">
+          <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入补充协议编号" maxlength="100" size="small" />
+        </ws-form-item> -->
+        <ws-form-item v-show="deptBudgetList.agreementType =='收购合同'" label="合同编号" span="1" prop="contractNo" class="readonly" required>
           <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small" />
         </ws-form-item>
         <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
@@ -674,6 +686,14 @@ import { isUndefined } from 'xe-utils/methods'
             _obj.staffMobilePhone = "(默认)"
             this.feedbackLeaders.unshift(_obj)
           })
+          getRelationContractNo({
+            agreementType: '收购合同',
+            goodsType: 1
+          })
+          .toPromise()
+          .then((response) => {
+            this.contractNoList = response
+          })
           getcustomerinfo({compId: localStorage.getItem('ws-pf_compId'),}).toPromise()
           .then((response) => {
             var arr=[]

+ 71 - 3
src/views/statisticalReport/autoSettlementList.vue

@@ -137,7 +137,32 @@
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editdeductionAmount(scope.row)" alt="" />
           </template></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+            <template slot-scope="scope">
+            <span v-if="
+              !scope.row.serviceChargechange && scope.row.serviceCharge
+            ">{{ scope.row.serviceCharge }}</span>
+            <input v-if="scope.row.serviceChargechange" style="width: 60px" v-model="serviceCharge" type="text" />
+            <!--改服务费-->
+            <i @click="changeserviceCharge(scope.row)" v-if="
+              (scope.row.serviceChargechange &&
+                scope.row.status == '待请款') ||
+              (scope.row.serviceChargechange &&
+                scope.row.status == '已驳回')
+            " class="iconfont icon-dui"></i>
+            <img v-if="
+              (!scope.row.serviceChargechange &&
+                scope.row.status == '待请款') ||
+              (!scope.row.serviceChargechange &&
+                scope.row.status == '已驳回')
+            " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="editserviceCharge(scope.row)" alt="" />
+          </template>
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
         <el-table-column width="100" class="table_td" label="应付金额(元)" prop="amountIngPayable"></el-table-column>
+        <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
         <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable"><template
             slot-scope="scope">
             <div style="
@@ -395,6 +420,7 @@ export default {
       isHover: false,
       settlementWeightchange: false,
       deductionAmountchange: false,
+      serviceChargechange: false,
       isShow: !this.autohide,
       //弹出框
       dialogViewSpareMoney: false,
@@ -550,9 +576,9 @@ export default {
       var m = date.getMonth() + 1;
       var d = date.getDate();
 
-      m = m < 10 ? "0" + m : m;
-      d = d < 10 ? "0" + d : d;
-      return y + "-" + m + "-" + d;
+      m = m < 10 ? '0' + m : m;
+      d = d < 10 ? '0' + d : d;
+      return y + '-' + m + '-' + d;
     },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
@@ -920,6 +946,48 @@ export default {
       this.deductionAmount = item.deductionAmount
       item.deductionAmountchange = true
     },
+    //修改服务费
+    changeserviceCharge(item) {
+      if (!this.serviceCharge) {
+        this.$message({
+          message: '服务费金额不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.serviceCharge &&
+          String(this.serviceCharge).indexOf('.') != -1 &&
+          String(this.serviceCharge).length -
+          (String(this.serviceCharge).indexOf('.') + 1) >
+          2) ||
+        (this.serviceCharge && this.serviceCharge > 100000) ||
+        (this.serviceCharge && this.serviceCharge < -100000)
+      ) {
+        this.$message({
+          message: '服务费输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      editauto({
+        serviceCharge: this.serviceCharge,
+        id: item.id,
+        flag: 4,
+      })
+        .toPromise()
+        .then((response) => {
+          this.$message.success('修改服务费成功')
+          this.getList()
+        })
+        .catch((req) => {
+          this.$message.warning('修改服务费失败')
+        })
+    },
+    editserviceCharge(item) {
+      this.serviceCharge = item.serviceCharge
+      item.serviceChargechange = true
+    },
     //装车磅单
     lookloadingImg(row) {
       if (row.loadingImg == null || row.loadingImg == '') {

+ 34 - 2
src/views/warehousenew/warehousingOrder.vue

@@ -84,7 +84,7 @@
         </ws-button>
         </div>
       </div>
-      <el-table class="wenzi" :ref="'multipleTable'+index" :data="item.warehousingOrderList" style="width: 100%"  @selection-change="handleSelectionChange($event,item,index)" >
+      <el-table show-summary :summary-method="getSummaries" class="wenzi" :ref="'multipleTable'+index" :data="item.warehousingOrderList" style="width: 100%"  @selection-change="handleSelectionChange($event,item,index)" >
           <el-table-column
           :selectable='selectInit'
       type="selection"
@@ -486,6 +486,9 @@
   getenabledinfo,
   setenabledinfo
 } from '@/model/warehouse/index'
+import {
+  selectWarehouseSelf,
+} from '@/model/houseSelfCollect/index'
   import {getpayeeinfo,getbuypayeeinfo} from '@/model/profitable/index'
   import {
     downloadFile
@@ -665,7 +668,35 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
       this.showType = this.isShow
     },
     methods: {
-      warehousechange(e){
+      getSummaries(param) {
+        const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            if(index==8||index==9||index==10||index==11||index==12||index==13||index==14||index==15){
+              sums[index] = values.reduce((prev, curr) => {
+                const value = Number(curr);
+                if (!isNaN(value)) {
+                  return prev + curr;
+                } else {
+                  return prev;
+                }
+              }, 0).toFixed(2)
+            }
+            
+          } else {
+            sums[index] = '';
+          }
+        });
+
+        return sums;
+      },
+      warehouseNameChange(e){
         if(e=='全部仓库'){
           this.warehouseName=''
         }
@@ -1581,6 +1612,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             endDate:this.endDate,
             currentPage: this.currentPage,
             pageSize: this.pageSize,
+            baseId:this.warehouseName,
             searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
           })