Browse Source

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

gjy 2 years ago
parent
commit
45157f313a

+ 2 - 0
src/api/V2/contract/index.js

@@ -120,3 +120,5 @@ export const API_GET_SETTLEMENTPRICE ='/contractManagementInfo/settlementPrice'
 
 // 发起人撤回
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
+// 编辑合同流程信息
+export const API_EDIT_PROCESS ='/contractProcessInfo/editInfo'

+ 4 - 2
src/model/contarct/index.js

@@ -51,7 +51,8 @@ import {
     API_PAYMENT,
     API_GET_SETTLEMENTPRICE,
     API_GET_STAFF_ALL,
-    API_SPONSOR_WITHDRAW
+    API_SPONSOR_WITHDRAW,
+    API_EDIT_PROCESS
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -172,5 +173,6 @@ export const getsettlementprice = appRx.get(API_GET_SETTLEMENTPRICE, errorCatche
 
 // 发起人撤回
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
-
+// 编辑合同流程信息
+export const editProcessInfo = appRx.post(API_EDIT_PROCESS, errorCatcher, errorHandle, filter)
 

+ 70 - 4
src/views/contractManagement/acquisitionContract.vue

@@ -150,9 +150,23 @@
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       
       <!-- <el-table-column width='130' prop="mildewGrain" label="已付款(元)"> -->
-      </el-table-column>
+      <!-- </el-table-column> -->
       <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
-      <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
+      <el-table-column width='120' prop="goodsNames" label="已开发票 (元)">
+        <template slot-scope="scope">
+             <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.invoiced" v-if="scope.row.identification1 == 'true'"></el-input>
+              <div v-if="scope.row.identification1 == 'false'" class="inputs">
+                {{ scope.row.invoiced }}
+              </div>
+            </div>
+             <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row)"
+              v-if="scope.row.identification1 == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification1 == 'true'" @click="varietyClick(scope.row)"></i>
+        </template>
       </el-table-column>
       <el-table-column prop="addressUrl" label="附件">
         <template slot-scope="scope">
@@ -249,7 +263,8 @@
     editInfo,
     getsettlementprice,
     getstafffind,
-    sponsorWithdraw
+    sponsorWithdraw,
+    editProcessInfo
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -466,6 +481,49 @@
       //     },
       //   })
       // },
+      handlecost(row){
+         this.$router.push({
+          name: 'buyContractcost',
+          query: {
+            id: row.id,
+            contractNo: row.contractNo,
+            status:row.status,
+            seller:row.seller
+          },
+        })
+      },
+       whether(row) {
+          row.identification1 = 'true'
+      },
+      //修改开票金额
+      varietyClick(row) {
+        var title = ''
+        var data = {}
+        title = '确定要修改已开发票金额?'
+        data = {
+            goodsName: row.invoiced,
+            id: row.id
+          }
+        this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editProcessInfo(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '修改成功',
+                })
+                this.getList()
+              })
+              .catch(() => {
+                return false
+              })
+          })
+      },
       onChange() {
         this.$refs.upload
           .handleSaveBill()
@@ -579,6 +637,7 @@
           .toPromise()
           .then((response) => {
             for (var i = 0; i < response.records.length; i++) {
+              response.records[i].identification1 = 'false'
               if (response.records[i].creator == localStorage.getItem('ws-pf_staffName')) {
                 response.records[i].showFlag = true
               }
@@ -862,7 +921,14 @@
   //   padding: 3px;
   //   border-radius: 2px;
   // }
-
+ .inputChenge {
+    width: 100%;
+    display: inline-flex;
+    margin-left: -28%;
+  }
+    .inputs {
+    margin: 0 auto;
+  }
   .wrap {
     width: 400px;
     position: absolute;

+ 59 - 7
src/views/contractManagement/purchaseContract.vue

@@ -152,15 +152,26 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
+      <el-table-column width='120' prop="goodsNames" label="已开发票 (元)">
         <template slot-scope="scope">
-          <div v-if="!scope.row.editgoodsNames" style="display:inline-block;">
-            <span @dblclick="scope.row.editgoodsNames=true">{{ scope.row.invoiced?scope.row.invoiced:0 }}</span>
-            <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+          <div v-if="!scope.row.editgoodsNames">
+            <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.invoiced" v-if="scope.row.identification1 == 'true'"></el-input>
+              <div v-if="scope.row.identification1 == 'false'" class="inputs">
+                {{ scope.row.invoiced }}
+              </div>
+            </div>
+            <!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/fujian.png" @click="invoiceUploade(scope.row)" alt="" />
             <span v-if="scope.row.invoiceUrl != null">
               {{ scope.row.invoiceUrl ? scope.row.invoiceUrl.split(",").length : "" }}
-            </span>
+            </span> -->
+             <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row)"
+              v-if="scope.row.identification1 == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification1 == 'true'" @click="varietyClick(scope.row)"></i>
           </div>
           <div v-if="scope.row.editgoodsNames">
             <el-input class="goodsnamesinput" v-model="scope.row.invoiced" placeholder="输入累计开票金额" ></el-input>
@@ -286,7 +297,8 @@ import {
   editInfo,
   getsettlementprice,
   getstafffind,
-  sponsorWithdraw
+  sponsorWithdraw,
+  editProcessInfo
 } from '@/model/contarct/index'
 import {
   downloadFile
@@ -472,6 +484,38 @@ export default {
               this.getList()
             })
     },
+     whether(row) {
+          row.identification1 = 'true'
+      },
+      //修改开票金额
+      varietyClick(row) {
+        var title = ''
+        var data = {}
+        title = '确定要修改已开发票金额?'
+        data = {
+            goodsName: row.invoiced,
+            id: row.id
+          }
+        this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editProcessInfo(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '修改成功',
+                })
+                this.getList()
+              })
+              .catch(() => {
+                return false
+              })
+          })
+      },
     persionXiaLa() {
       getstafffind({
         roles: 'b96299bb5dcf461e916b72b64c6943b0'
@@ -696,6 +740,7 @@ export default {
         .toPromise()
         .then((response) => {
           for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification1 = 'false'
             if (response.records[i].status) {
               response.records[i].currectstatus = response.records[i].status
             }
@@ -1152,7 +1197,14 @@ export default {
 .findValue {
   margin: 0 10px;
 }
-
+.inputChenge {
+    width: 100%;
+    display: inline-flex;
+    margin-left: -28%;
+  }
+    .inputs {
+    margin: 0 auto;
+  }
 /deep/.findValue .el-input__inner {
   border-top-right-radius: 0px;
   border-bottom-right-radius: 0px;

+ 88 - 9
src/views/contractManagement/salesContract.vue

@@ -146,9 +146,21 @@
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       <el-table-column width='120' prop="mildewGrain" label="未回款(元)">
         <template slot-scope="scope">
-          <span style='color:red;'
+          <!-- <span style='color:red;'
             v-if='scope.row.datestatus && scope.row.invoiced > scope.row.contractRevenue'>{{ scope.row.mildewGrain }}</span>
-          <span v-else>{{ scope.row.mildewGrain }}</span>
+          <span v-else>{{ scope.row.mildewGrain }}</span> -->
+           <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.mildewGrain" v-if="scope.row.identification == 'true'"></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.mildewGrain }}
+              </div>
+            </div>
+           <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row,1)"
+              v-if="scope.row.identification == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'" @click="varietyClick(scope.row,1)"></i>
         </template>
       </el-table-column>
 
@@ -162,15 +174,27 @@
           </span>
         </template>
       </el-table-column> -->
-      <el-table-column width='190' prop="goodsNames" label="已开发票 (元)">
+      <el-table-column width='120' prop="goodsNames" label="已开发票 (元)">
         <template slot-scope="scope">
-          <div v-if="!scope.row.editgoodsNames" style="display:inline-block;">
-            <span @dblclick="scope.row.editgoodsNames=true">{{ scope.row.invoiced?scope.row.invoiced:0 }}</span>
-            <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+          <div v-if="!scope.row.editgoodsNames" >
+            <!-- <span @dblclick="scope.row.editgoodsNames=true">{{ scope.row.invoiced?scope.row.invoiced:0 }}</span> -->
+             <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.invoiced" v-if="scope.row.identification1 == 'true'"></el-input>
+              <div v-if="scope.row.identification1 == 'false'" class="inputs">
+                {{ scope.row.invoiced }}
+              </div>
+            </div>
+            <!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/fujian.png" @click="invoiceUploade(scope.row)" alt="" />
             <span v-if="scope.row.invoiceUrl != null">
               {{ scope.row.invoiceUrl ? scope.row.invoiceUrl.split(",").length : "" }}
-            </span>
+            </span> -->
+             <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row,2)"
+              v-if="scope.row.identification1 == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification1 == 'true'" @click="varietyClick(scope.row,2)"></i>
           </div>
           <div v-if="scope.row.editgoodsNames">
             <el-input class="goodsnamesinput" v-model="scope.row.invoiced" placeholder="输入累计开票金额" ></el-input>
@@ -327,7 +351,8 @@ import {
   editInfo,
   getsettlementprice,
   getstafffind,
-  sponsorWithdraw
+  sponsorWithdraw,
+  editProcessInfo
 } from '@/model/contarct/index'
 import {
   downloadFile
@@ -551,6 +576,51 @@ export default {
         },
       })
     },
+    whether(row, flag) {
+        if (flag == 1) {
+          row.identification = 'true'
+        } else {
+          row.identification1 = 'true'
+        }
+      },
+      //修改未回款、开票金额
+      varietyClick(row, flag) {
+        var title = ''
+        var data = {}
+        if(flag==1){
+            title = '确定要修改未回款金额?'
+            data = {
+              mildewGrain: row.mildewGrain,
+              id: row.id
+            }
+        }
+        else{
+          title = '确定要修改已开发票金额?'
+          data = {
+              goodsName: row.invoiced,
+              id: row.id
+            }
+        }
+        this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editProcessInfo(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '修改成功',
+                })
+                this.getList()
+              })
+              .catch(() => {
+                return false
+              })
+          })
+      },
     handleClose1() {
       this.show = false
       this.getList()
@@ -744,6 +814,8 @@ export default {
         .then((response) => {
           var date = new Date().getTime()
           for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+            response.records[i].identification1 = 'false'
             if (response.records[i].status) {
               response.records[i].currectstatus = response.records[i].status
             }
@@ -1028,7 +1100,14 @@ export default {
 .flex {
   display: flex;
 }
-
+ .inputChenge {
+    width: 100%;
+    display: inline-flex;
+    margin-left: -28%;
+  }
+    .inputs {
+    margin: 0 auto;
+  }
 .el-range-editor.el-input__inner {
   margin-left: 10px;
 }

+ 7 - 6
src/views/taskManagement/supplyofgoods.vue

@@ -33,7 +33,7 @@
         </ws-button>
       </template>
       <template slot="right">
-        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按合同编号或任务编号查找" clearable maxlength="300" type="input"></ws-input>
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按合同编号查找" clearable maxlength="300" type="input"></ws-input>
         <ws-button class="find" type="primary" @click="lookUp()">
           <img width="16" height="16" style="
               vertical-align: text-top;
@@ -66,12 +66,13 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="goodsSource" label="货源" width="160"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="160"></el-table-column>
+        <!-- <el-table-column prop="goodsSource" label="货源" width="160"></el-table-column> -->
         <el-table-column prop="goodsName" label="货名" width="160">
         </el-table-column>
         <el-table-column prop="surplusWeight" class="table_td" label="剩余重量(吨)"></el-table-column>
         <el-table-column prop="avgCost" class="table_td" label="平均成本(吨)"></el-table-column>
-        <el-table-column prop="issuingTimeOther" class="table_td" label="入库单日期"></el-table-column>
+        <!-- <el-table-column prop="issuingTimeOther" class="table_td" label="入库单日期"></el-table-column> -->
         <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
             <template slot-scope="scope">
                 <el-input @input='outweightchange' v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
@@ -134,7 +135,7 @@
         showType: true,
         // 年
         year: '',
-        goodsName:'0',
+        goodsName:'',
         goodsList:[],
         gainList: [],
         gainList1:[],
@@ -266,7 +267,7 @@
             pageSize: this.pageSize,
             searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
-            
+            goodsName:this.goodsName,
             // inOutType:this.inOutType,
             baseId:this.baseId,
             flag:this.flag
@@ -382,7 +383,7 @@
             startDate:this.startDate,
             endDate:this.endDate,
             searchType: this.searchType,
-            goodsName:this.goodsName==0?'':this.goodsName1,
+            goodsName:this.goodsName,
             searchKeyWord: this.searchKeyWord,
             // inOutType:this.inOutType,
             baseId:this.baseId,

+ 1 - 0
src/views/taskManagement/supplyofgoodslook.vue

@@ -24,6 +24,7 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="160"></el-table-column>
         <el-table-column prop="goodsSource" label="货源" width="160"></el-table-column>
         <el-table-column prop="goodsName" label="货名" width="160">
         </el-table-column>