Browse Source

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

mxx 3 years ago
parent
commit
3447085a67

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

@@ -93,6 +93,8 @@ export const API_POST_DISORREMARKS = '/stockSaleReceiptReport/api/disAndRemark'
 export const API_POST_SALEEDITSETTLEMENTWEIGHT = '/stockSaleReceiptReport/api/editSettlementWeight'
 //现货销售出库合同下拉
 export const API_GET_STOCK_SALE_CONTRACTNO = '/stockSaleReceiptReport/selectContractNoList'
+//现货销售出库修改反馈重量或单独开发票
+export const API_POST_EDIT_SETTLEMENTWEIGHT = '/stockSaleReceiptReport/api/editSettlementWeight'
 // 火运,船运合同编号下拉
 export const API_GET_YUNSHUXIALA = '/tranTaskInfo/selectTranTask'
 // 火运,船运运输编号下拉

+ 4 - 1
src/model/statisticalReport/index.js

@@ -46,7 +46,8 @@ import {
     API_GET_STOCK_SALE_CONTRACTNO,
     API_GET_YUNSHUXIALA,
     API_GET_YUNSHUNUMBER,
-    API_POST_YUNSHUSETPRICE
+    API_POST_YUNSHUSETPRICE,
+    API_POST_EDIT_SETTLEMENTWEIGHT
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -144,6 +145,8 @@ export const disOrRemarks = appRx.post(API_POST_DISORREMARKS, errorCatcher, erro
 export const saleEditSettlementWeight = appRx.post(API_POST_SALEEDITSETTLEMENTWEIGHT, errorCatcher, errorHandle, filter)
 //现货销售出库合同下拉
 export const getStockSaleContractNoList = appRx.get(API_GET_STOCK_SALE_CONTRACTNO, errorCatcher, errorHandle, filter)
+//反馈重量或已开发票
+export const editSettlementWeightStock = appRx.post(API_POST_EDIT_SETTLEMENTWEIGHT, errorCatcher, errorHandle, filter)
 
 // 火运,船运合同编号下拉
 export const getYunShuXiaLa = appRx.get(API_GET_YUNSHUXIALA, errorCatcher, errorHandle, filter)

+ 6 - 3
src/views/houseSelfCollect/inspectInfo.vue

@@ -99,11 +99,11 @@
                 maxlength="10" size="small" :disabled="disabled2" />
             </ws-form-item>
             <el-row>
-              <ws-form-item label="复检备注" span="2" prop="reMemo" v-if="information == '编辑复检'">
-                <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" />
+              <ws-form-item label="复检备注" span="2" prop="reMemo" v-if="information == '编辑复检' || statusShow == '已复检'">
+                <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" v-if="statusShow != '已复检'" />
+                <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" v-else disabled />
               </ws-form-item>
             </el-row>
-
           </ws-info-table>
 
           <div class="title">质检数据</div>
@@ -231,6 +231,7 @@
         num: 0,
         tipFlag: true,
         allowEdit: 0,
+        statusShow :""
       }
     },
     activated() {
@@ -256,11 +257,13 @@
       this.warehouseName = this.$route.query.warehouseName
       this.cangNo = this.$route.query.warehouseNo
       this.count = Number(this.$route.query.count) + 1
+      this.statusShow = this.$route.query.status
       // this.purchasePriceList = this.$route.query.purchasePriceList
       this.id = this.$route.query.id
       if (this.types == 2) {
         this.disabled = true
         this.disabled1 = true
+        this.disabled2 = true
         this.disabledName = true
         this.information = '查看质检'
       } else if (this.types == 3) {

+ 2 - 1
src/views/houseSelfCollect/inspectionManagement.vue

@@ -209,7 +209,8 @@
 						warehouseName: this.warehouseName,
 						count: this.warehouseCount,
 						warehouseNo: this.warehouseNo,
-						allowEdit:this.allowEdit
+						allowEdit:this.allowEdit,
+						status:row.status
 					},
 				})
 			},

+ 1 - 1
src/views/login/index.vue

@@ -148,7 +148,7 @@
               <el-form-item prop="companyName">
                 <!-- <el-input v-model="loginForm.companyName" :placeholder="$t('login.verification08')" /> -->
                 <el-select v-model="loginForm.companyName" filterable placeholder="请选择" class="comp-select">
-                  <el-option v-for="item in compOptionList" :key="item.compName" :label="item.compName" :value="item.compName">
+                  <el-option v-for="(item,index) in compOptionList" :key="index" :label="item.compName" :value="item.compName">
                   </el-option>
                 </el-select>
               </el-form-item>

+ 177 - 57
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -10,6 +10,8 @@
           </ws-button>
           <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.payment`" @click="handlecollect()">收款
           </ws-button>
+          <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.payment`" @click="handleinvoice()">开发票
+          </ws-button>
         </el-col>
         <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
           <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
@@ -39,8 +41,7 @@
             <span v-else>合同重量: 0 吨</span>
             <span v-if="outboundVolume">出库量: {{ outboundVolume.toFixed(3)}} 吨</span>
             <span v-else>出库量: 0 吨</span>
-            <span v-if="orderList.unitContractPrice&&this.tranType!='随行就市'">合同单价:
-              {{ orderList.unitContractPrice.toFixed(3) }} 元/吨</span>
+            <span v-if="orderList.unitContractPrice&&this.tranType!='随行就市'">合同单价: {{ orderList.unitContractPrice.toFixed(3) }} 元/吨</span>
             <span v-else>合同单价: 0 元/吨</span>
             <span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(3)}} 元</span>
             <span v-else>应收: 0 元</span>
@@ -97,13 +98,32 @@
             <span>-{{scope.row.netWeight }}</span>
           </template>
         </el-table-column>
-        <el-table-column class="table_td" prop="unloadingWeight" label="卸车净重(吨)"
+        <el-table-column width='120' class="table_td" prop="unloadingWeight" label="卸车净重(吨)"
           v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
         <el-table-column v-else-if="this.tranType=='散船'||this.tranType=='箱船'" class="table_td" prop="unloadingWeight"
           label="卸船净重(吨)"></el-table-column>
-        <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width='120' class="table_td" prop="feedbackWeight" label="反馈重量(吨)">
+            <template slot-scope="scope">
+            <div class="inputChenge">
+              <el-input v-model="scope.row.feedbackWeight" v-if="scope.row.identification2 == 'true'">
+              </el-input>
+              <div v-if="scope.row.identification2 == 'false'" class="inputs">
+                <span>{{scope.row.feedbackWeight}}</span>
+              </div>
+            </div>
+            <div style='display:inline-block;' v-if="scope.row.identification2 == 'false'">
+              <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
+                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+                @click="weightedit(scope.row)" alt="" />
+            </div>
+
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification2 == 'true'" @click="weightsave(scope.row,4)"></i>
+          </template>
+          </el-table-column>
+        <el-table-column width='120' class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
         <el-table-column class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
-          <template slot-scope="scope">
+        <template slot-scope="scope">
             <div class="inputChenge">
               <el-input v-model="scope.row.settlementPrice" v-if="scope.row.identification1 == 'true'">
               </el-input>
@@ -119,12 +139,23 @@
 
             <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
               v-if="scope.row.identification1 == 'true'" @click="weightClick(scope.row,2)"></i>
-          </template>
-        </el-table-column>
-        <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)"></el-table-column>
-        <el-table-column class="table_td" prop="amountEdReceivable" label="已收金额(元)">
+          </template></el-table-column>
+        <el-table-column width='120' class="table_td" prop="amountIngReceivable" label="应收金额(元)"></el-table-column>
+        <el-table-column width='120' class="table_td" prop="amountEdReceivable" label="已收金额(元)">
         </el-table-column>
-        <el-table-column class="table_td" prop="amountNotReceivable" label="未收金额(元)">
+        <el-table-column  width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
+           <template slot-scope="scope">
+            <div class="inputChenge">
+              <div class="inputs">
+                <span>{{scope.row.alreadyInvoice}}</span>
+              </div>
+            </div>
+            <div style='display:inline-block;'>
+              <img  width="17" height="18"
+                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+                @click="invoiceedit(scope.row)" alt="" />
+            </div>
+          </template>
         </el-table-column>
         <el-table-column class="table_td" prop="collectionDate" label="收款日期">
         </el-table-column>
@@ -154,6 +185,7 @@
             <span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
           </template>
         </el-table-column>
+        
         <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
           <template slot-scope="scope">
             <div class="inputChenge">
@@ -174,8 +206,27 @@
               v-if="scope.row.identification == 'true'" @click="weightClick(scope.row,1)"></i>
           </template>
         </el-table-column>
-        <el-table-column class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
+        <el-table-column width='120' class="table_td" prop="feedbackWeight" label="反馈重量(吨)">
           <template slot-scope="scope">
+            <div class="inputChenge">
+              <el-input v-model="scope.row.feedbackWeight" v-if="scope.row.identification2 == 'true'">
+              </el-input>
+              <div v-if="scope.row.identification2 == 'false'" class="inputs">
+                <span>{{scope.row.feedbackWeight}}</span>
+              </div>
+            </div>
+            <div style='display:inline-block;' v-if="scope.row.identification2 == 'false'">
+              <img  width="17" height="18"
+                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+                @click="weightedit(scope.row)" alt="" />
+            </div>
+
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification2 == 'true'" @click="weightsave(scope.row,4)"></i>
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
+        <template slot-scope="scope">
             <div class="inputChenge">
               <el-input v-model="scope.row.settlementPrice" v-if="scope.row.identification1 == 'true'">
               </el-input>
@@ -191,8 +242,7 @@
 
             <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
               v-if="scope.row.identification1 == 'true'" @click="weightClick(scope.row,2)"></i>
-          </template>
-        </el-table-column>
+          </template></el-table-column>
         <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
           <template slot-scope="scope">
             <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
@@ -208,6 +258,20 @@
             <span v-if="scope.row.returnFlag == null">{{scope.row.amountNotReceivable.toFixed(2) }}</span>
           </template>
         </el-table-column>
+        <el-table-column  width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
+           <template slot-scope="scope">
+            <div class="inputChenge">
+              <div class="inputs">
+                <span>{{scope.row.alreadyInvoice}}</span>
+              </div>
+            </div>
+            <div style='display:inline-block;'>
+              <img  width="17" height="18"
+                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+                @click="invoiceedit(scope.row)" alt="" />
+            </div>
+          </template>
+        </el-table-column>
         <el-table-column class="table_td" prop="collectionDate" label="收款日期">
         </el-table-column>
         <el-table-column class="table_td" prop="status" label="状态">
@@ -236,11 +300,7 @@
         </div>
       </div>
     </WinseaContentModal>
-    <WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
-      @on-cancel="handleClose">
-      <img width="100" height="100" :src="appendixIdss2" alt="">
-    </WinseaContentModal>
-    <!-- 收款 -->
+    <!-- 已收弹窗 -->
     <el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="未收金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
@@ -266,6 +326,26 @@
         </el-button>
       </div>
     </el-dialog>
+    <WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <img width="100" height="100" :src="appendixIdss2" alt="">
+    </WinseaContentModal>
+    <!-- 收款 -->
+    <el-dialog width="25%" title="开发票" :visible.sync="dialogFormVisible3" :append-to-body="true">
+      <el-form :model="form">
+        <el-form-item label="可开发票金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
+          <span>{{ activeinvoice }}</span>
+        </el-form-item>
+        <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
+          <el-input v-model="invoice" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible3 = false">取 消</el-button>
+        <el-button  type="primary" @click="Invoicing()">提 交
+        </el-button>
+      </div>
+    </el-dialog>
     <!-- 定金 -->
     <el-dialog width="25%" title="定金" :visible.sync="dialogFormVisible2" :append-to-body="true">
       <el-form :model="form">
@@ -307,6 +387,7 @@
     stockSaleCollectMoney,
     disOrRemarks,
     saleEditSettlementWeight,
+    editSettlementWeightStock
   } from '@/model/statisticalReport/index'
   import Pagination from '@/components/Pagination'
   import WsUpload from '@/components/WsUpload'
@@ -340,9 +421,12 @@
         deptBudgetList: {},
         //分页
         currentPage: 1,
+        invoice:'',
         pageSize: 10,
         allmoney1: 0,
+        dialogFormVisible3:false,
         deptCircularPage: {},
+        identification2:false,
         deptBudgetTotal: 0,
         uncollectedAmount1: 0,
         stockSaleReceiptReportList: [],
@@ -361,6 +445,7 @@
         contractNo: '',
         dialogVisible: false,
         form: {},
+        id:0,
         compId: localStorage.getItem('ws-pf_compId'),
         collectForm: false,
         collectForm1: false,
@@ -399,6 +484,7 @@
         modification: [],
         accessoryTFs: false,
         appendixIdss: [],
+        activeinvoice:0,
         accessoryTFs1: false,
         appendixIdss1: [],
         appendixIdss2: '',
@@ -420,6 +506,42 @@
       this.showType = this.isShow
     },
     methods: {
+      invoiceedit(item){
+        this.activeinvoice=item.amountEdReceivable-item.alreadyInvoice
+        this.id=item.id
+        this.dialogFormVisible3=true
+      },
+      Invoicing(){
+        editSettlementWeightStock({flag:3,alreadyInvoice:invoice,id:item.id}).toPromise()
+              .then((response) => {
+                  this.$notify.success({
+                  title: '成功',
+                  message: '提交成功',
+                })
+                this.dialogFormVisible3=false
+                this.getList(this.orderList.deliverType)
+              }).catch((response) => {
+                  this.$notify.warning({
+                  title: '失败',
+                  message: '提交失败',
+                })
+              })
+        
+      },
+      weightedit(item){
+        item.identification2='true'
+      },
+      weightsave(item,flag){
+        editSettlementWeightStock({flag:flag,feedbackWeight:item.feedbackWeight,id:item.id}).toPromise()
+              .then((response) => {
+                  this.$notify.success({
+                  title: '成功',
+                  message: '修改重量修改成功',
+                })
+                item.identification2=false
+                this.getList(this.orderList.deliverType)
+              })
+      },
       tableRowClassName({
         row,
         rowIndex
@@ -458,7 +580,6 @@
         for (var i = 0; i < this.contractNoList.length; i++) {
           if (this.contractNoList[i].contractNo == e) {
             this.orderList = this.contractNoList[i]
-            if (!this.orderList.tranTaskInfoList) this.orderList.tranTaskInfoList = []
             for (let i = 0; i < this.orderList.tranTaskInfoList.length; i++) {
               if (this.orderList.tranTaskInfoList[i].tranProcessInfo) {
                 this.tranProcessInfo.push({
@@ -470,10 +591,8 @@
               }
             }
             console.log(this.orderList.tranTaskInfoList)
-            if (this.tranProcessInfo.length > 0) {
-              this.activeName = this.tranProcessInfo[0].name
-              this.tranType = this.tranProcessInfo[0].tranType
-            }
+            this.activeName = this.tranProcessInfo[0].name
+            this.tranType = this.tranProcessInfo[0].tranType
             if (this.contractNoList[i].depositUrl) {
               this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
             } else {
@@ -504,15 +623,15 @@
         }
       },
       //修改结算重量
-      whether(row, flag) {
-        if (flag == 1) {
+      whether(row,flag) {
+        if(flag==1){
           row.identification = 'true'
-        } else {
+        }else{
           row.identification1 = 'true'
         }
-
+        
       },
-      weightClick(row, flag) {
+      weightClick(row,flag) {
         if (
           row.settlementWeight > 200 ||
           row.settlementWeight < 1 ||
@@ -532,22 +651,22 @@
           })
           return
         }
-        var title = ''
-        var data = {}
-        if (flag == 1) {
-          title = '确定要修改结算重量?'
-          data = {
-            settlementWeight: row.settlementWeight,
-            id: row.id,
-            flag: flag
-          }
-        } else {
-          title = '确定要修改结算单价?'
-          data = {
-            settlementPrice: row.settlementPrice,
-            id: row.id,
-            flag: flag
-          }
+        var title=''
+        var data={}
+        if(flag==1){
+          title='确定要修改结算重量?'
+          data={
+                settlementWeight: row.settlementWeight,
+                id: row.id,
+                flag:flag
+              }
+        }else{
+          title='确定要修改结算单价?'
+          data={
+                settlementPrice: row.settlementPrice,
+                id: row.id,
+                flag:flag
+              }
         }
         this.$confirm(title, {
             confirmButtonText: '确定',
@@ -558,18 +677,18 @@
             saleEditSettlementWeight(data)
               .toPromise()
               .then((response) => {
-                if (flag == 1) {
+                if(flag==1){
                   this.$notify.success({
-                    title: '成功',
-                    message: '结算重量修改成功',
-                  })
-                } else {
+                  title: '成功',
+                  message: '结算重量修改成功',
+                })
+                }else{
                   this.$notify.success({
-                    title: '成功',
-                    message: '结算单价修改成功',
-                  })
+                  title: '成功',
+                  message: '结算单价修改成功',
+                })
                 }
-
+                
                 this.getList(this.orderList.deliverType)
               })
               .catch(() => {
@@ -636,9 +755,9 @@
             if (index === 0) {
               sums[index] = '合计'
             } else if (
-              index === 8 ||
               index === 10 ||
               index === 11 ||
+              index === 13 ||
               index === 12
             ) {
               const values = data.map((item) => Number(item[column.property]))
@@ -665,7 +784,7 @@
                 index === 11 ||
                 index === 9 ||
                 index === 10 ||
-                index === 7
+                index === 8
               ) {
                 const values = data.map((item) => Number(item[column.property]))
                 if (!values.every((value) => isNaN(value))) {
@@ -688,7 +807,7 @@
                 sums[index] = '合计'
               } else if (
                 index === 11 ||
-                index === 9 ||
+                index === 10 ||
                 index === 13 ||
                 index === 12
               ) {
@@ -715,7 +834,7 @@
                 index === 11 ||
                 index === 12 ||
                 index === 10 ||
-                index === 8
+                index === 9
               ) {
                 const values = data.map((item) => Number(item[column.property]))
                 if (!values.every((value) => isNaN(value))) {
@@ -939,6 +1058,7 @@
             for (var i = 0; i < response.records.length; i++) {
               response.records[i].identification = 'false'
               response.records[i].identification1 = 'false'
+              response.records[i].identification2 = 'false'
               if (response.records[i].amountIngReceivable) {
                 this.amountReceivable += Number(response.records[i].amountIngReceivable.toFixed(2))
               }

+ 0 - 1
src/views/warehouse/warehouseManagementList.vue

@@ -541,7 +541,6 @@ export default {
                         pro.netWeight += Number(increment)
                         pro.grossWeight = Number((pro.tare + pro.netWeight).toFixed(2))
                         increment = 0
-                        
                          warehousePrint.push(pro)
                           }else{
                             increment -= pro.netWeight