فهرست منبع

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

ccj 2 سال پیش
والد
کامیت
b78811fb0a

+ 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'

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

@@ -267,7 +267,6 @@ export default {
   },
   mounted() {
     this.getDefaultFiles(this.appendixIds)
-
     const handleChange = this.$refs.elUpload.$refs['upload-inner'].handleChange
     this.$refs.elUpload.$refs['upload-inner'].handleChange = (ev) => {
       this.initFileList = []
@@ -570,7 +569,7 @@ export default {
 
     // 获取文件样式
     getFileClass(file) {
-      const ext = this.getExtName(file.name)
+      const ext = this.getExtName(file.name).toLowerCase()
       return 'ext ' + ext
     },
     // 是否为图片

+ 3 - 1
src/components/pdf/pdf.vue

@@ -37,8 +37,10 @@ export default {
   },
   methods: {
     pdfTask (pdfUrl) {
-      var loadingTask = pdf.createLoadingTask(pdfUrl)
+        let CMAP_URL = 'https://unpkg.com/pdfjs-dist@2.0.943/cmaps/'
+      var loadingTask = pdf.createLoadingTask({url: pdfUrl,withCredentials: false,cMapUrl: CMAP_URL,cMapPacked: true})
       loadingTask.promise.then(pdf => {
+        
         this.pdfUrl = loadingTask
         this.numPages = pdf.numPages
       }).catch((err) => {

+ 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)
 

+ 5 - 2
src/model/houseSelfCollect/index.js

@@ -71,7 +71,8 @@ import {
     API_POST_GETVIDEO,
     API_POST_GETCARNUMBER,
     API_POST_GETOKEN,
-    API_POST_GEROM
+    API_POST_GEROM,
+    API_GETQUALITY
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -213,4 +214,6 @@ export const changeCustomer = appRx.post(API_POST_CUSTOMER, errorCatcher, errorH
 export const getwarehouse = appRx.get(API_GET_WAREHOUSE, errorCatcher, errorHandle, filter)
 
 export const getToken = appRx.post(API_POST_GETOKEN, errorCatcher, errorHandle, filter)
-export const getRom = appRx.post(API_POST_GEROM, errorCatcher, errorHandle, filter)
+export const getRom = appRx.post(API_POST_GEROM, errorCatcher, errorHandle, filter)
+// 查询交易量
+export const getquality = appRx.get(API_GETQUALITY, 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;

+ 60 - 9
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
             }
@@ -845,9 +890,8 @@ export default {
         },
       })
     },
-    async handletransport(row) {
+    handletransport(row) {
   gettask({contractNo:row.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
-                console.log(response,111111111111)
         if(!response||response==0){
           this.$message({
             message: '联系内勤创建运输任务',
@@ -1153,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/houseSelfCollect/inspectionManagementNew.vue

@@ -1149,8 +1149,8 @@ export default {
         }
       }
       if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) {
-        await getquality({ goodsName: this.deptBudgetList.goodsName, compId: localStorage.getItem('ws-pf_compId'), warehouseName: this.warehouseName, customerNumberCard: this.deptBudgetList.customerNumberCard })
-          .toPromise().then((response) => {
+        var response=await getquality({ goodsName: this.deptBudgetList.goodsName, compId: localStorage.getItem('ws-pf_compId'), warehouseName: this.warehouseName, customerNumberCard: this.deptBudgetList.customerNumberCard })
+          .toPromise()
             if (response.A + response.B + response.C * 50 > response.D - 50) {
               this.redstatus = true
             } else {
@@ -1162,7 +1162,6 @@ export default {
 
             this.deptBudgetList.volumeofbusiness = a + b + c
             this.$forceUpdate()
-          })
       }
     },
     waterContentChange(type) {
@@ -1322,7 +1321,7 @@ export default {
             .toPromise()
             .then((response) => {
               if (response) {
-                this.$set(this.deptBudgetList, "dryGrainPrice", response)
+                this.$set(this.deptBudgetList, 'dryGrainPrice', response)
                 // this.deptBudgetList.dryGrainPrice = response
                 this.dryGrainPrice = response
               }
@@ -3373,6 +3372,7 @@ export default {
                           console.log(response)
                           // this.$message.warning(response)
                         })
+                        this.$forceUpdate()
                     } else {
                       this.deptBudgetList.id = zjid
                       // if (this.serviceManagementType==3) {
@@ -3427,6 +3427,7 @@ export default {
                               // this.$message.warning(response)
                             })
                           this.getList()
+                          this.$forceUpdate()  
                           this.selectWarehouse()
                           this.add()
                         })
@@ -4013,8 +4014,8 @@ export default {
           })
       }
       if (this.deptBudgetList.goodsName == '大豆') {
-        this.deptBudgetList.transgene = "非转基因"
-        this.deptBudgetList.colorLustre = "正常"
+        this.deptBudgetList.transgene = '非转基因'
+        this.deptBudgetList.colorLustre = '正常'
       } else {
         delete this.deptBudgetList.transgene
         delete this.deptBudgetList.colorLustre

+ 1 - 1
src/views/personnelManagement/component/router/route.js

@@ -19,7 +19,7 @@ const checkWorkListRouter = {
             meta: {
                 title: '考勤管理',
                 shortcutEntrance: 'checkWorkList',
-                module: 'customerManagement.customer.customerInfo',
+                // module: 'customerManagement.customer.customerInfo',
                 permissicon: [],
                 keepAlive: true,
                 // module: 'procurement.sparepart.applDetail'

+ 9 - 3
src/views/profitable/contractprofitsdetails.vue

@@ -134,7 +134,10 @@
             <td class="col">{{tableData.seller}}</td>
           </tr>
           <tr class="row">
-            <td class="col col-bgc">结算单价(元/吨)</td>
+            <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">{{tableData.settlementPrice}}</td>
             <td class="col col-bgc">合计利润(元)</td>
             <td class="col">{{tableData.profit}}</td>
@@ -146,7 +149,11 @@
             <td class="col col-bgc">利润(元)</td>
           </tr>
           <tr v-for="item in tableData.contractList" class="row">
-            <td class="col">{{item.contractNo}}</td>
+            <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.settlementPrice}}</td>
             <td class="col">{{item.weight}}</td>
             <td class="col">{{item.profit}}</td>
@@ -191,7 +198,6 @@
       }
     },
     activated() {
-      
       if(this.$route.query.contractNo){
         this.searchKeyWord=this.$route.query.contractNo
       }else{

+ 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>