Quellcode durchsuchen

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

mxx vor 3 Jahren
Ursprung
Commit
e06877371c

+ 15 - 7
src/api/V2/salesManagement/index.js

@@ -1,9 +1,3 @@
-//销售订单列表
-export const API_GET_SALE_ORDER_LIST = '/saleOrder/selectSaleOrder'
-//销售订单成交
-export const API_POST_SALE_ORDER_DEAL = '/saleOrder/api/deal'
-//销售订单平仓
-export const API_POST_SALE_CLOSEPOSITION = '/saleOrder/api/closePosition'
 //销售计划列表
 export const API_GET_SALEPLAN_LIST = '/salePlanInfo/selectSalePlanInfo'
 //销售计划查看
@@ -15,4 +9,18 @@ export const API_POST_SALEPLAN_EDIT = '/salePlanInfo/api/editSalePlanInfo'
 //销售计划删除
 export const API_POST_SALEPLAN_DELETE = '/salePlanInfo/api/deleteSalePlanInfo'
 //销售状态,基差,单价修改 
-export const API_POST_SALEPLAN_EDITSTATUS = '/salePlanInfo/api/editStatus'
+export const API_POST_SALEPLAN_EDITSTATUS = '/salePlanInfo/api/editStatus' 
+//销售订单列表
+export const API_GET_SALE_ORDER_LIST = '/saleOrder/selectSaleOrder'
+//销售订单成交
+export const API_POST_SALE_ORDER_DEAL = '/saleOrder/api/deal'
+//销售订单平仓
+export const API_POST_SALE_CLOSEPOSITION = '/saleOrder/api/closePosition'
+//销售订单审核编辑
+export const API_POST_ADUIT_SALE = '/saleOrder/api/editSaleOrder'
+//销售订单合同编号下拉列表
+export const API_GET_ADUIT_CONTRACTNO = '/warehouseBaseInfo/selectContractNoList'
+//销售订单flag0 补充定金 1解冻定金 2完成 3更改基差
+export const API_POST_EDITSTATUS = '/saleOrder/api/editStatus'
+//销售订单删除
+export const API_POST_DELETESALE = '/saleOrder/api/deleteSaleOrder'

+ 6 - 18
src/api/V2/statisticalReport/index.js

@@ -1,23 +1,11 @@
 //采购入库报表
 export const API_GET_PURCHRECEIPT = '/purchaseReceiptReport/selectPurchaseOrder'
-//采购订单成交
-export const API_POST_PURCHASING_LIST = '/purchaseOrder/api/deal'
-//采购订单平仓
-export const API_POST_PURCHASING_CLOSEPOSITION = '/purchaseOrder/api/closePosition'
-//采购计划列表
-export const API_GET_PROCUREMENT_LIST = '/procurementPlanInfo/selectProcurementPlanInfo'
-//采购计划查看
-export const API_GET_PROCUREMENT_LOOK = '/procurementPlanInfo/getProcurementPlan'
-//采购计划添加
-export const API_POST_PROCUREMENT_ADD = '/procurementPlanInfo/api/insertProcurementPlanInfo'
-//采购计划编辑
-export const API_POST_PROCUREMENT_EDIT = '/procurementPlanInfo/api/editProcurementPlan'
-//采购计划删除
-export const API_POST_PROCUREMENT_DELETE = '/procurementPlanInfo/api/deleteProcurementPlan'
-// 采购订单审核
-export const API_POST_ADUIT_PURCHASE = '/purchaseOrder/api/editPurchaseOrder'
-// 采购订单合同
-export const API_GET_ADUIT_CONTRACTNO = '/warehouseBaseInfo/selectContractNoList'
+// 采购合同
+export const API_GET_CONTRACTNO = '/warehouseBaseInfo/selectContractNoList'
+// 采购入库修改
+export const API_POST_AMEND_PURCHRECEIPT = '/purchaseReceiptReport/api/editProcurementReceiptReport'
+// 采购入库补货结转
+export const API_POST_REPLANISHENT = '/purchaseReceiptReport/api/replenishment'
 // 采购订单flag0 补充定金 1解冻定金 2完成 3更改基差
 export const API_POST_EDITSTATUS = '/purchaseOrder/api/editStatus'
 //采购状态,基差,单价修改 

+ 15 - 3
src/model/salesManagement/index.js

@@ -4,6 +4,10 @@ import {
     API_GET_SALE_ORDER_LIST,
     API_POST_SALE_ORDER_DEAL,
     API_POST_SALE_CLOSEPOSITION,
+    API_POST_ADUIT_SALE,
+    API_GET_ADUIT_CONTRACTNO,
+    API_POST_EDITSTATUS,
+    API_POST_DELETESALE,
     API_GET_SALEPLAN_LIST,
     API_GET_SALEPLAN_LOOK,
     API_POST_SALEPLAN_ADD,
@@ -12,11 +16,11 @@ import {
     API_POST_SALEPLAN_EDITSTATUS,
 } from '@/api/V2/salesManagement'
 // import { API_GET_PROCUREMENT_LOOK } from '../../api/V2/purchasingManagement'
-//销售详情列表
+//销售订单列表
 export const detailsList = appRx.get(API_GET_SALE_ORDER_LIST, errorCatcher, errorHandle, filter)
-//销售详情成交
+//销售订单成交
 export const chengList = appRx.post(API_POST_SALE_ORDER_DEAL, errorCatcher, errorHandle, filter)
-//销售详情平仓
+//销售订单平仓
 export const closePositionList = appRx.post(API_POST_SALE_CLOSEPOSITION, errorCatcher, errorHandle,filter)
 //销售计划列表
 export const salePlan = appRx.get(API_GET_SALEPLAN_LIST,errorCatcher, errorHandle, filter)
@@ -30,3 +34,11 @@ export const saleEdit = appRx.post(API_POST_SALEPLAN_EDIT, errorCatcher, errorHa
 export const saleDel = appRx.post(API_POST_SALEPLAN_DELETE, errorCatcher,errorHandle,filter)
 //销售状态,基差,单价修改
 export const saleEditOther = appRx.post(API_POST_SALEPLAN_EDITSTATUS, errorCatcher,errorHandle,filter)
+//销售订单审核
+export const aduitsale = appRx.post(API_POST_ADUIT_SALE, errorCatcher,errorHandle,filter)
+//销售订单合同编号下拉列表
+export const aduitcontractno = appRx.get(API_GET_ADUIT_CONTRACTNO, errorCatcher,errorHandle,filter)
+//销售订单flag0 补充定金 1解冻定金 2完成 3更改基差
+export const editStatus = appRx.post(API_POST_EDITSTATUS, errorCatcher,errorHandle,filter)
+//销售订单删除
+export const deletesale = appRx.post(API_POST_DELETESALE, errorCatcher,errorHandle,filter)

+ 11 - 2
src/model/statisticalReport/index.js

@@ -1,7 +1,16 @@
 import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
 import {
-    API_GET_PURCHRECEIPT
+    API_GET_PURCHRECEIPT,
+    API_GET_CONTRACTNO,
+    API_POST_AMEND_PURCHRECEIPT,
+    API_POST_REPLANISHENT
 } from '@/api/V2/statisticalReport'
 //采购入库报表
-export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
+export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
+//采购合同
+export const getcontractno = appRx.get(API_GET_CONTRACTNO, errorCatcher, errorHandle, filter)
+//采购入库修改
+export const postamend = appRx.post(API_POST_AMEND_PURCHRECEIPT, errorCatcher, errorHandle, filter)
+//采购入库补货结转
+export const postreplanishent = appRx.post(API_POST_REPLANISHENT, errorCatcher, errorHandle, filter)

+ 139 - 104
src/views/customer/customerList.vue

@@ -35,12 +35,13 @@
         >
           默认定金比例</el-button
         >
-        <WinseaContentModal
-          v-model="outerVisibleDefaultEdit"
+        <el-dialog
+          width="25%"
           title="设置默认定金比例"
-          @on-cancel="handleClose"
+          :visible.sync="outerVisibleDefaultEdit"
+          :append-to-body="true"
         >
-          <div style="width: 90%">
+          <div style="width: 50%">
             <div class="dingjin">定金比例(元/吨)</div>
             <el-input
               type="textarea"
@@ -50,43 +51,22 @@
             >
             </el-input>
           </div>
-          <div class="dialog-footer">
+          <div slot="footer" class="dialog-footer">
             <el-button @click="outerVisibleDefaultEdit = false"
               >取 消</el-button
             >
-            <el-button type="primary" @click="editDepositRatio()"
-              >确定</el-button
+            <el-button type="primary" @click="editDefaultDepositRatio()"
+              >确 定</el-button
             >
           </div>
-        </WinseaContentModal>
-
-        <!--修改定金比例-->
-        <WinseaContentModal
-          v-model="outerVisibleEdit"
-          title="修改定金比例"
-          @on-cancel="handleClose"
-        >
-          <div style="width: 90%" class="xiugai">
-            <el-input
-              type="textarea"
-              :rows="2"
-              maxlength="30"
-              placeholder="请输入定金比例"
-              v-model="depositRatio"
-            >
-            </el-input>
-          </div>
-          <div class="dialog-footer">
-            <el-button @click="outerVisibleEdit = false">取 消</el-button>
-            <el-button type="primary" @click="editPrice(0)">确定</el-button>
-          </div>
-        </WinseaContentModal>
+        </el-dialog>
 
         <!--增加定金-->
-        <WinseaContentModal
-          v-model="outerVisibleAdd"
+        <el-dialog
+          width="30%"
           title="增加定金"
-          @on-cancel="handleClose"
+          :visible.sync="outerVisibleAdd"
+          :append-to-body="true"
         >
           <div class="addprice">
             已付定金
@@ -95,7 +75,7 @@
             </div>
           </div>
           <div class="addpricejine">增加金额</div>
-          <div style="width: 90%" class="zengjia">
+          <div style="width: 50%" class="zengjia">
             <el-input
               type="textarea"
               :rows="2"
@@ -106,17 +86,18 @@
             </el-input>
             <div class="yuan">元</div>
           </div>
-          <div class="dialog-footer">
+          <div slot="footer" class="dialog-footer">
             <el-button @click="outerVisibleAdd = false">取 消</el-button>
-            <el-button type="primary" @click="editPrice(1)">确定</el-button>
+            <el-button type="primary" @click="editPrice(1)">确 定</el-button>
           </div>
-        </WinseaContentModal>
+        </el-dialog>
 
         <!--退回定金-->
-        <WinseaContentModal
-          v-model="outerVisibleReturn"
+        <el-dialog
+          width="30%"
           title="退回定金"
-          @on-cancel="handleClose"
+          :visible.sync="outerVisibleReturn"
+          :append-to-body="true"
         >
           <div class="returnprice">
             可退定金
@@ -127,7 +108,7 @@
             </div>
           </div>
           <div class="returnpricejine">退回金额</div>
-          <div style="width: 90%" class="tuihui">
+          <div style="width: 50%" class="tuihui">
             <el-input
               type="textarea"
               :rows="2"
@@ -138,11 +119,11 @@
             </el-input>
             <div class="yuan">元</div>
           </div>
-          <div class="dialog-footer">
+          <div slot="footer" class="dialog-footer">
             <el-button @click="outerVisibleReturn = false">取 消</el-button>
-            <el-button type="primary" @click="editPrice(2)">确定</el-button>
+            <el-button type="primary" @click="editPrice(2)">确 定</el-button>
           </div>
-        </WinseaContentModal>
+        </el-dialog>
       </template>
     </BaseHeaderLayout>
     <div>
@@ -196,19 +177,41 @@
         </el-table-column>
         <el-table-column prop="freezingDeposit" label="冻结定金(元)">
         </el-table-column>
-        <el-table-column prop="depositRatio" label="定金比例(元/吨)">
+        <el-table-column
+          class="table_td"
+          prop="depositRatio"
+          label="定金比例(元/吨)"
+        >
           <template slot-scope="scope">
-            {{ scope.row.depositRatio }}
+            <div class="inputChenge">
+              <!-- readonly -->
+              <el-input
+                v-model="scope.row.depositRatio"
+                v-if="scope.row.identification == 'true'"
+              ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.depositRatio }}
+              </div>
+            </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="editClick(0, scope.row)"
+              @click="whether(scope.row)"
+              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)"
+            ></i>
+            <!-- <div>—</div> -->
           </template>
         </el-table-column>
+
         <el-table-column prop="updateDate" label="更新时间"> </el-table-column>
         <el-table-column prop="seller" label="操作" width="280">
           <template slot-scope="scope">
@@ -352,6 +355,7 @@ export default {
       }
       return fmt
     },
+
     handleClose() {
       this.accessoryTFs = false
     },
@@ -369,6 +373,66 @@ export default {
       this.searchType = state
       this.getList()
     },
+    //修改定金比例
+    varietyClick(row) {
+       if (
+        row.depositRatio < 0 ||
+        row.depositRatio > 100000 ||
+        (String(row.depositRatio).indexOf('.') != -1 &&
+          String(row.depositRatio).length -
+            (String(row.depositRatio).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '定金比例输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (row.depositRatio) {
+        if (isNaN(row.depositRatio)) {
+          this.$message({
+            message: '定金比例非数字!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (!row.depositRatio) {
+        this.$message({
+          message: '定金比例不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定要修改定金比例?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editCustomerInfo({
+            flag: 0,
+            depositRatio: row.depositRatio,
+            id: row.id,
+          })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {})
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    whether(row) {
+      row.identification = 'true'
+    },
     //列表查询
     getList() {
       getList({
@@ -380,17 +444,20 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+          }
+          this.customerList = response
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
-          this.customerList = response
         })
     },
     //设置默认定金比例
     installRatio() {
       this.outerVisibleDefaultEdit = true
     },
-    editDepositRatio() {
+    editDefaultDepositRatio() {
       if (
         this.depositRatio < 1 ||
         this.depositRatio > 100000 ||
@@ -439,13 +506,8 @@ export default {
       this.totalDeposit = row.totalDeposit
       this.freezingDeposit = row.freezingDeposit
 
-      //更改定金比例
-      if (index == 0) {
-        this.outerVisibleEdit = true
-        this.customerInfo.flag = 0
-      }
       //增加定金
-      else if (index == 1) {
+      if (index == 1) {
         this.outerVisibleAdd = true
         this.customerInfo.flag = 1
       }
@@ -462,41 +524,9 @@ export default {
       this.customerInfo.money = this.money
       this.customerInfo.totalDeposit = this.totalDeposit
       this.customerInfo.freezingDeposit = this.freezingDeposit
-      //修改定金比例
-      if (asdf == 0) {
-        if (
-          this.depositRatio < 0 ||
-          this.depositRatio > 100000 ||
-          (String(this.depositRatio).indexOf('.') != -1 &&
-            String(this.depositRatio).length -
-              (String(this.depositRatio).indexOf('.') + 1) >
-              2)
-        ) {
-          this.$message({
-            message: '定金比例输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (this.depositRatio) {
-          if (isNaN(this.depositRatio)) {
-            this.$message({
-              message: '定金比例非数字!',
-              type: 'warning',
-            })
-            return
-          }
-        }
-        if (!this.depositRatio) {
-          this.$message({
-            message: '定金比例不能为空!',
-            type: 'warning',
-          })
-          return
-        }
-      }
+
       //增加定金
-      else if (asdf == 1) {
+      if (asdf == 1) {
         if (
           this.money < 0 ||
           this.money > 100000000 ||
@@ -573,12 +603,9 @@ export default {
           this.outerVisibleReturn = false
           this.outerVisibleEdit = false
           this.getList()
-          //修改定金比例
-          if (asdf == 0) {
-            this.$message.success('修改定金比例成功')
-          }
+
           //增加定金
-          else if (asdf == 1) {
+          if (asdf == 1) {
             this.$message.success('增加成功')
           }
           //退回定金
@@ -727,7 +754,7 @@ export default {
 }
 /deep/.zengjia .el-textarea__inner {
   display: block;
-  padding: 13px 17px;
+  padding: 13px 9px;
   line-height: 0.5;
   box-sizing: border-box;
   width: 80%;
@@ -737,8 +764,8 @@ export default {
   background-image: none;
   border: 1px solid #dcdfe6;
   border-radius: 4px;
-  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
   margin-left: 180px;
+  margin-top: 10px;
 }
 
 /deep/.xiugai .el-textarea__inner {
@@ -754,12 +781,12 @@ export default {
   border: 1px solid #dcdfe6;
   border-radius: 4px;
   transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
-  margin-left: 0px;
+  margin-left: 95px;
 }
 
 /deep/.tuihui .el-textarea__inner {
   display: block;
-  padding: 13px 17px;
+  padding: 13px 9px;
   line-height: 0.5;
   box-sizing: border-box;
   width: 80%;
@@ -769,8 +796,8 @@ export default {
   background-image: none;
   border: 1px solid #dcdfe6;
   border-radius: 4px;
-  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
   margin-left: 180px;
+  margin-top: 10px;
 }
 /deep/.dingjin {
   width: 98px;
@@ -791,7 +818,8 @@ export default {
   border: 1px solid #dcdfe6;
   border-radius: 4px;
   transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
-  margin-left: 180px;
+  margin-left: 155px;
+  margin-top: 10px;
 }
 /deep/.addprice {
   width: 98px;
@@ -803,8 +831,8 @@ export default {
 }
 /deep/.yuan {
   width: 10px;
-  margin-left: 1400px;
-  margin-top: -36px;
+  margin-left: 150%;
+  margin-top: -32px;
 }
 /deep/.addpricejine {
   width: 98px;
@@ -824,11 +852,18 @@ export default {
 /deep/.yifudingjin {
   margin-left: 135px;
   width: 70px;
-  margin-top: -31px;
+  margin-top: -19px;
+}
+.inputChenge {
+  width: 50%;
+  display: inline-flex;
+}
+.inputs {
+  margin: 0 auto;
 }
 /deep/.ketuidingjin {
   margin-left: 135px;
   width: 70px;
-  margin-top: -31px;
+  margin-top: -19px;
 }
 </style>

+ 6 - 9
src/views/purchasingManagement/procurementPlanList.vue

@@ -1,7 +1,6 @@
 //采购计划
 <template>
   <div class="container">
-
     <BaseHeaderLayout :leftSpan="10">
       <template slot="left">
         <ws-button type="primary" @click="handleAdd()">添加</ws-button>
@@ -267,7 +266,6 @@ export default {
       deptCircularPage: {},
       warehouseList: [],
       deptBudgetList: {},
-      pcFlag: 1,
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -837,14 +835,13 @@ export default {
 }
 
 .base_header_layout .grid-content.right .find.el-button--primary {
-    width: 30px;
-    margin-left: 0;
-    border-top-left-radius: 0px;
-    border-bottom-left-radius: 0px;
-    margin-top: -1px;
-    margin-left: -6px;
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+  margin-top: -1px;
+  margin-left: -6px;
 }
 // .inputChenge>>>.el-input__inner{
 // border: none;
-
 </style>

+ 66 - 40
src/views/purchasingManagement/purchaseOrderList.vue

@@ -118,7 +118,7 @@
           <el-table-column class="table_td" label="平仓结算" prop="updateDate"></el-table-column>
           <el-table-column prop="seller" label="操作" width="360">
             <template slot-scope="scope">
-              <el-button v-if='scope.row.status=="已通过"||scope.row.status=="已成交"' class="record" @click="dialogFormVisible1 = true">成交</el-button>
+              <el-button v-if='scope.row.status=="已通过"||scope.row.status=="已成交"' class="record" @click="makeabargain(scope.row)">成交</el-button>
               <!-- 补充定金 -->
               <el-button v-if='scope.row.defaultDeposit>0' class="record" @click="addthedeposit(scope.row)">补充定金</el-button>
               <el-button v-if='scope.row.freezingDeposit>0' class="record" @click='unfreeze(scope.row)'>解冻定金</el-button>
@@ -147,14 +147,14 @@
                 :visible.sync="dialogFormVisible1"
                 :append-to-body="true"
               >
-                <el-form ref="warehouseList" :model="warehouseList">
+                <el-form ref="warehouseList">
                   <el-form-item
                     label="成交价(元/吨)"
                     prop="transactionPrice"
                     :label-width="formLabelWidth"
                   >
                     <el-input
-                      v-model="warehouseList.transactionPrice"
+                      v-model="clinchdeal1.transactionPrice"
                       autocomplete="off"
                       placeholder="请输入成交价"
                       class="deal"
@@ -166,15 +166,15 @@
                     :label-width="formLabelWidth"
                   >
                     <el-input
-                      v-model="warehouseList.transactionsNumber"
+                      v-model="clinchdeal1.turnover"
                       autocomplete="off"
-                      placeholder="请输入活动区域"
+                      placeholder="请输入成交量(吨)"
                       class="deal"
                     ></el-input>
                   </el-form-item>
                   <el-form-item label="基差(元/吨)" prop="basis" :label-width="formLabelWidth">
                     <el-input
-                      v-model="warehouseList.basis"
+                      v-model="clinchdeal1.basis"
                       autocomplete="off"
                       placeholder="请输入基差"
                       class="deal"
@@ -182,7 +182,7 @@
                   </el-form-item>
                   <el-form-item label="成交日期" prop="submissionDate" :label-width="formLabelWidth" class="deal">
                     <ws-date-picker
-                      v-model="deptBudgetList.submissionDate"
+                      v-model="clinchdeal.dealDate"
                       type="date"
                       placeholder="请选择成交日期"
                       value-format="yyyy-MM-dd"
@@ -192,7 +192,7 @@
                 </el-form>
                 <div slot="footer" class="dialog-footer">
                   <el-button @click="dialogFormVisible1 = false">取 消</el-button>
-                  <el-button type="primary" @click=" submit()">确 定</el-button>
+                  <el-button type="primary" @click=" chengjiao()">确 定</el-button>
                 </div>
               </el-dialog>
          <el-dialog
@@ -231,12 +231,19 @@
               >
                 <el-form class='closeposition'>
                   <el-form-item label="成交价格(元/吨)" prop="transactionPrice" >
-                    <el-select
-                      v-model="closePositionList1.transactionPrice"
-                      autocomplete="off"
-                      placeholder="请输入成交价"
-                      class="deal"
-                    ></el-select>
+                    <ws-select
+              v-model="closePositionList1.transactionPrice"
+              placeholder
+              class="deal"
+              placeholder="请输入成交价"
+            >
+              <ws-option
+                v-for="item in transactionRecordList"
+                :key="item.constKey"
+                :label="item.transactionPrice"
+                :value="item.transactionPrice"
+              />
+            </ws-select>
                   </el-form-item>
                   <el-form-item label="可平仓数量(吨)" prop="openPosition" >
                     <el-input v-model="closePositionList1.openPosition" autocomplete="off" class="deal"></el-input>
@@ -259,7 +266,7 @@
                   </el-form-item>
                   <el-form-item label="平仓基差(元/吨)" prop="closingBasis" >
                     <el-input
-                      v-model="closePositionList1.closingBasis"
+                      v-model="closePositionList1.basis"
                       autocomplete="off"
                       placeholder="请输入平仓基差"
                       class="deal"
@@ -569,6 +576,8 @@ dialogImageUrl:"",
       isTaped: false,
       isHover: false,
       isShow: !this.autohide,
+      clinchdeal:{},
+      clinchdeal1:{},
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -624,6 +633,7 @@ dialogImageUrl:"",
       basis:0,
       replenishlist:{},
       closePositionList1:{},
+      transactionRecordList:{},
       closePositionList:[],
       historyList: [],
       pickerBeginDateBefore: {
@@ -640,6 +650,26 @@ dialogImageUrl:"",
     this.showType = this.isShow
   },
   methods: {
+    handle(item){
+         this.$confirm(`状态修改为已完成后不可再进行交易操作,是否确定修改?`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            editStatus({id:item.id,flag:2}).toPromise()
+            .then(response => {
+            this.$message.success('修改成功')
+            this.getList()
+            }).catch(req => {
+              this.$message.success('修改失败')
+            })
+          })
+    },
+    makeabargain(item){
+        this.dialogFormVisible1 = true
+        this.clinchdeal.id=item.id
+    },
     deletehandle(item){
       this.$confirm(`采购订单删除后不可恢复,是否确定删除?`, {
           confirmButtonText: '确定',
@@ -656,18 +686,26 @@ dialogImageUrl:"",
           })
     },
     closepositionconfirm(){
+      this.closePositionList1.compId=sessionStorage.getItem('ws-pf_compId')
       closePositionList(this.closePositionList1).toPromise()
         .then(response => {
-          this.$message.success('修改基差成功')
+          this.$message.success('平仓成功')
           this.getList()
         }).catch(req => {
-          this.$message.success('修改基差失败')
+          this.$message.warning('平仓失败')
         })
     },
     cloaeposition1(item){
       this.dialogFormVisible2 = true
       this.$set(this.closePositionList1,'id',item.id)
+      this.transactionRecordList=item.transactionRecordList
       this.$set(this.closePositionList1,'openPosition',item.openPosition)
+      this.$set(this.closePositionList1,'transactionsNumber',item.transactionsNumber)
+      this.$set(this.closePositionList1,'contractNo',item.contractNo)
+      this.$set(this.closePositionList1,'planId',item.planId)
+      this.$set(this.closePositionList1,'closeRate',item.closeRate)
+      this.$set(this.closePositionList1,'seller',item.seller)
+      this.$set(this.closePositionList1,'commonId',item.commonId)
     },
     changebasis(item){
       editStatus({basis:this.basis,id:item.id,flag:3}).toPromise()
@@ -833,24 +871,13 @@ dialogImageUrl:"",
           type: 'warning',
         })
           .then(() => {
-            console.log(this.aduitlist)
-      aduitpurchase(this.aduitlist)
-        .toPromise()
-        .then(response => {
-          console.log(response)
-          woekflowhandle({
-            taskId: this.aduitlist.taskId,
-            approved: true,
-            auditMind: '34',
-            needReapply: false,
-          })
-            .toPromise()
-            .then((response) => {
+            aduitpurchase(this.aduitlist)
+              .toPromise()
+              .then(response => {
               this.$message.success('审核成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+              this.getList()
             })
         })
-        })
     },
     Changepricerecord(item){
       this.dialogFormVisible5 = true
@@ -877,8 +904,9 @@ dialogImageUrl:"",
     },
     
     //成交
-     submit() {
-      if (!this.warehouseList.transactionPrice) {
+     chengjiao() {
+       
+      if (!this.clinchdeal1.transactionPrice) {
         this.$message({
           message: '成交价不能为空',
           type: 'warning'
@@ -891,16 +919,14 @@ dialogImageUrl:"",
         type: 'warning'
       })
       .then(() => {
-        console.log(23456678790)
-      chengList(this.warehouseList)
+      chengList({transactionRecord:this.clinchdeal1,id:this.clinchdeal.id,compId:sessionStorage.getItem('ws-pf_compId'),dealDate:this.clinchdeal.dealDate})
         .toPromise()
         .then((response) => {
-          this.$message.success('添加成功')
-         
+          this.$message.success('成交成功')
+         this.dialogFormVisible1 = false
           // this.$router.go(-1)
         })
         .catch(() => {
-        console.log(1111111111)
           return false
         })
       })
@@ -921,7 +947,6 @@ dialogImageUrl:"",
       }
     },
     getList() {
-      console.log(123456)
       detailsList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
@@ -934,6 +959,7 @@ dialogImageUrl:"",
         .then(response => {
           for(var i=0;i<response.records.length;i++){
             response.records[i].basischange=false
+            response.records[i].openPosition=response.records[i].cumulativeTurnover-response.records[i].closedPosition-response.records[i].stockInQuantity
           }
           this.warehouseList = response
           this.deptCircularPage.currentPage = response.current

+ 14 - 4
src/views/salesManagement/salesPlanList.vue

@@ -7,7 +7,7 @@
       <template slot="right">
         <ws-input
           v-model="searchKeyWord"
-          placeholder="可按销售计划编号和标题查找"
+          placeholder="可按采购计划编号和标题查找"
           clearable
           maxlength="500"
           type="input"
@@ -607,9 +607,11 @@ export default {
 }
 /deep/.base_header_layout .grid-content.right .find.el-button--primary {
   width: 30px;
-  margin-left: 0;
-  border-top-left-radius: 0px;
-  border-bottom-left-radius: 0px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+    margin-top: -1px;
+    margin-left: -6px;
 }
 /deep/.findValue .el-input__inner {
   border-top-right-radius: 0px;
@@ -786,6 +788,14 @@ export default {
 .inputs1 {
   border: none;
 }
+.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+    margin-top: -1px;
+    margin-left: -6px;
+}
 // .inputChenge>>>.el-input__inner{
 // border: none;
 // }

Datei-Diff unterdrückt, da er zu groß ist
+ 717 - 861
src/views/salesManagement/salesPlanOrderList.vue


+ 183 - 97
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -4,14 +4,94 @@
     <el-scrollbar style="height:100%">
         <!-- <div> -->
         <div>
-          <ws-button type="primary" @click="handleAdd()">待审核</ws-button>
-          <ws-button type="primary" @click="handleAdd()">待结算</ws-button>
-          <ws-button type="primary" @click="handleAdd()">已结算</ws-button>
+          <ws-button type="primary" @click="handlestatus(1)">待审核</ws-button>
+          <ws-button type="primary" @click="handlestatus(2)">待结算</ws-button>
+          <ws-button type="primary" @click="handlestatus(3)">已结算</ws-button>
           <ws-button type="primary" @click="handleAdd()">全部</ws-button>
           <ws-button type="primary" @click="handleAdd()">通过</ws-button>
           <ws-button type="primary" @click="handleAdd()">驳回</ws-button>
           <ws-button type="primary" @click="dialogFormVisible1=true">付款</ws-button>
-          <el-dialog
+          <ws-button type="primary" @click="dialogFormVisible2=true">开发票</ws-button>
+          <ws-button type="primary" @click="amend()">修改</ws-button>
+          <ws-button type="primary" @click="carryover">补货结转</ws-button>
+          <ws-button type="primary" @click="handleAdd()">审核</ws-button>
+          <ws-select
+            v-model="contractNo"
+            placeholder="请选择合同"
+            clearable
+            @change='contractchange'
+            maxlength="500"
+            type="input"
+            class="findValue"
+          >
+          <ws-option
+                key=""
+                label="全部合同"
+                value=""
+              />
+          <ws-option
+                v-for="item in contractNoList.records"
+                :key="item.constKey"
+                :label="item.contractNo+'('+item.closeaccountstatus+')'"
+                :value="item.contractNo"
+              />
+          </ws-select>
+        </div>
+
+        <span>合同重量:吨</span>
+        <span>成交量:吨</span>
+        <span>已平仓:吨</span>
+        <span>入库量:吨</span>
+        <el-table
+          class="wenzi"
+          :data="warehouseList.records"
+          style="width: 100%; margin-top: 20px"
+          ref="warehouseList"
+          border
+          :summary-method="getSummaries"
+          show-summary
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="goodsName" label="货名"></el-table-column>
+          <el-table-column class="table_td" prop="positionNumber" label="仓位号"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
+          <el-table-column class="table_td" prop="warehousingDate" label="入库日期"></el-table-column>
+          <el-table-column class="table_td" prop="protein" label="蛋白(%)>="></el-table-column>
+          <el-table-column class="table_td" prop="defaultDeposit" label="水分(%)>="></el-table-column>
+          <el-table-column class="table_td" prop="unitPrice" label="单价(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="basisPrice" label="基差(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="unloadingCharge" label="卸车费(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="invoiceFee" label="发票费(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="deductionAmount" label="扣款(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="settlementPrice" label="结算单价(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="netWeight" label="净重(吨)"></el-table-column>
+          <el-table-column class="table_td" label="应付金额(元)" prop="amountIngPayable"></el-table-column>
+          <el-table-column class="table_td" label="已付金额(元)" prop="amountEdPayable"></el-table-column>
+          <el-table-column class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column class="table_td" label="付款日期"  prop="paymentDate"></el-table-column>
+          <el-table-column class="table_td" label="结转" prop="carryForward"></el-table-column>
+          <el-table-column class="table_td" label="客户确认"  prop="customerConfirmationStatus"></el-table-column>
+          <el-table-column class="table_td" label="客户" prop="customerName"></el-table-column>
+          <el-table-column class="table_td" label="库点"  prop="warehouseName"></el-table-column>
+          <el-table-column class="table_td" label="发票类型"  prop="invoiceTypeKey"></el-table-column>
+          <el-table-column class="table_td" label="已开发票(元)"  prop="alreadyInvoice"></el-table-column>
+          <el-table-column label="状态" prop="status"></el-table-column>
+        </el-table>
+
+        <!-- 页数 -->
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-size="pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="deptBudgetTotal"
+        ></el-pagination>
+    </el-scrollbar>
+     <el-dialog
             width="25%"
             title="付款"
             :visible.sync="dialogFormVisible1"
@@ -60,9 +140,7 @@
               <el-button type="primary" @click="dialogFormVisible1= false">提 交</el-button>
             </div>
           </el-dialog>
-          <!-- 开发票 -->
-          <ws-button type="primary" @click="dialogFormVisible2=true">开发票</ws-button>
-          <el-dialog
+           <el-dialog
             width="30%"
             title="批量开发票"
             :visible.sync="dialogFormVisible2"
@@ -104,50 +182,65 @@
               <el-button type="primary" @click="dialogFormVisible2 = false">提 交</el-button>
             </div>
           </el-dialog>
-          <ws-button type="primary" @click="dialogFormVisible5=true">修改</ws-button>
           <el-dialog
             width="30%"
             title="修改"
             :visible.sync="dialogFormVisible5"
             :append-to-body="true"
           >
-            <el-form :model="form">
+            <el-form>
               <el-form-item label="单价" :label-width="formLabelWidth">
-                <el-input v-model="form.name" autocomplete="off" class="deal"></el-input>
+                <el-input v-model="amendlist.unitPrice" autocomplete="off" class="deal"></el-input>
               </el-form-item>
               <el-form-item label="基差" :label-width="formLabelWidth">
-                <el-input v-model="form.region" autocomplete="off" class="deal"></el-input>
+                <el-input v-model="amendlist.basisPrice" autocomplete="off" class="deal"></el-input>
               </el-form-item>
               <el-form-item label="卸车费" :label-width="formLabelWidth">
-                <el-input v-model="form.region" autocomplete="off" class="deal"></el-input>
+                <el-input v-model="amendlist.unloadingCharge" autocomplete="off" class="deal"></el-input>
               </el-form-item>
               <el-form-item label="发票费" :label-width="formLabelWidth">
-                <el-input v-model="form.region" autocomplete="off" class="deal"></el-input>
+                <el-input v-model="amendlist.invoiceFee" autocomplete="off" class="deal"></el-input>
               </el-form-item>
               <el-form-item label="扣款" :label-width="formLabelWidth">
-                <el-input v-model="form.region" autocomplete="off" class="deal"></el-input>
+                <el-input v-model="amendlist.deductionAmount" autocomplete="off" class="deal"></el-input>
               </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
               <el-button @click="dialogFormVisible5 = false">取 消</el-button>
-              <el-button type="primary" @click="dialogFormVisible5 = false">提 交</el-button>
+              <el-button type="primary" @click="amendconfirm">提 交</el-button>
             </div>
           </el-dialog>
-          <ws-button type="primary" @click="dialogFormVisible11 = true">补货结转</ws-button>
-          <el-dialog
+           <el-dialog
             width="30%"
             title="补货结转"
             :visible.sync="dialogFormVisible11"
             :append-to-body="true"
           >
             <el-form :model="form">
-              <el-button @click="dialogFormVisible5 = false">本合同</el-button>
-              <el-button @click="dialogFormVisible5 = false">其他合同</el-button>
-              <el-form-item label="合同编号" :label-width="formLabelWidth">
-                <el-select v-model="form.name" autocomplete="off" class="deal"></el-select>
+              <el-button :type='currect?"primary":""' @click="currect=true">本合同</el-button>
+              <el-button :type='!currect?"primary":""' @click="currect=false">其他合同</el-button>
+              <el-form-item v-if='!currect' label="合同编号" :label-width="formLabelWidth">
+                <ws-select
+                v-if='carryovercontractnolist.length>0'
+            v-model="contractNo"
+            placeholder="请选择合同"
+            clearable
+            @change='contractchange'
+            maxlength="500"
+            type="input"
+            class="findValue"
+          >
+          <ws-option
+                v-for="item in carryovercontractnolist"
+                :key="item.constKey"
+                :label="item.contractNo+'('+item.closeaccountstatus+')'"
+                :value="item.contractNo"
+              />
+          </ws-select>
+          <div v-else>无可结转的其他合同</div>
               </el-form-item>
               <el-form-item label="结转重量" :label-width="formLabelWidth">
-                <el-input v-model="form.name" autocomplete="off" class="deal" placeholder="请输入结转重量"></el-input>
+                <el-input v-model="carryOverWeight" autocomplete="off" class="deal" placeholder="请输入结转重量"></el-input>
               </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -155,76 +248,13 @@
               <el-button type="primary" @click="dialogFormVisible11= false">确认</el-button>
             </div>
           </el-dialog>
-          <ws-button type="primary" @click="handleAdd()">审核</ws-button>
-          <ws-select
-            v-model="searchKeyWord"
-            placeholder="全部合同"
-            clearable
-            maxlength="500"
-            type="input"
-            class="findValue"
-          ></ws-select>
-        </div>
-
-        <span>合同重量:吨</span>
-        <span>成交量:吨</span>
-        <span>已平仓:吨</span>
-        <span>入库量:吨</span>
-        <el-table
-          class="wenzi"
-          :data="warehouseList.records"
-          style="width: 100%; margin-top: 20px"
-          ref="warehouseList"
-          border
-          :summary-method="getSummaries"
-          show-summary
-        >
-          <el-table-column type="selection" width="55"></el-table-column>
-          <el-table-column type="index" label="序号" width="50"></el-table-column>
-          <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
-          <el-table-column class="table_td" prop="goodsName" label="货名"></el-table-column>
-          <el-table-column class="table_td" prop="positionNumber" label="仓位号"></el-table-column>
-          <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
-          <el-table-column class="table_td" prop="warehousingDate" label="入库日期"></el-table-column>
-          <el-table-column class="table_td" prop="protein" label="蛋白(%)>="></el-table-column>
-          <el-table-column class="table_td" prop="defaultDeposit" label="水分(%)>="></el-table-column>
-          <el-table-column class="table_td" prop="unitPrice" label="单价(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="basisPrice" label="基差(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="unloadingCharge" label="卸车费(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="invoiceFee" label="发票费(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="deductionAmount" label="扣款(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="settlementPrice" label="结算单价(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="netWeight" label="净重(吨)"></el-table-column>
-          <el-table-column class="table_td" label="应付金额(元)" prop="amountIngPayable"></el-table-column>
-          <el-table-column class="table_td" label="已付金额(元)" prop="amountEdPayable"></el-table-column>
-          <el-table-column class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
-          <el-table-column class="table_td" label="付款日期"  prop="paymentDate"></el-table-column>
-          <el-table-column class="table_td" label="结转" prop="carryForward"></el-table-column>
-          <el-table-column class="table_td" label="客户确认"  prop="customerConfirmationStatus"></el-table-column>
-          <el-table-column class="table_td" label="客户" prop="customerName"></el-table-column>
-          <el-table-column class="table_td" label="库点"  prop="warehouseName"></el-table-column>
-          <el-table-column class="table_td" label="发票类型"  prop="invoiceTypeKey"></el-table-column>
-          <el-table-column class="table_td" label="已开发票(元)"  prop="alreadyInvoice"></el-table-column>
-          <el-table-column label="状态" prop="status"></el-table-column>
-        </el-table>
-
-        <!-- 页数 -->
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-size="pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="deptBudgetTotal"
-        ></el-pagination>
-    </el-scrollbar>
   </div>
 
   <!-- </div> -->
 </template>
 <script>
 import {
-  getpurchreceipt
+  getpurchreceipt,getcontractno,postamend,postreplanishent
 } from '@/model/statisticalReport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -269,8 +299,9 @@ export default {
         // resource: '',
         // desc: ''
       },
+      currect:true,
       formLabelWidth: '120px',
-
+      contractNo:'contractNo',
       barWidth: 0,
       barHeight: 0,
       retioX: 1,
@@ -280,12 +311,7 @@ export default {
       isShow: !this.autohide,
       //弹出框
       dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-
+      contractNoList:[],
       // 是否显示
       showType: true,
       // 年
@@ -324,6 +350,10 @@ export default {
       pageSize: 10,
       searchType: 1,
       pcFlag: 1,
+      carryoverlist:{},
+      modification:[],
+      amendlist:{},
+      carryovercontractnolist:[],
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: time => {
@@ -340,6 +370,47 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    amendconfirm(){
+      this.amendlist.id=this.modification[0].id
+      postamend(this.amendlist).toPromise()
+          .then(response => {
+            this.$message.success('修改成功')
+            this.dialogFormVisible5=false
+            this.getList()
+          })
+    },
+    amend(){
+      if(this.modification.length>1){
+        this.$message.warning('一次仅可修改一条数据')
+      }else if(this.modification.length==0){
+        this.$message.warning('请选择一条要修改的条目')
+      }else{
+        this.dialogFormVisible5=true
+      }
+    },
+    carryover(){
+      if(this.modification.length>1){
+        this.$message.warning('一次仅可结转一条数据')
+      }else if(this.modification.length==0){
+        this.$message.warning('请选择一条要结转的条目')
+      }else{
+        this.dialogFormVisible11 = true
+        this.carryovercontractnolist=this.contractNoList.records.filter(item=> {
+          return this.modification[0].id!=item.id
+        });
+      }
+    },
+    handleSelectionChange(val){
+      this.modification=val
+    },
+    handlestatus(status){
+      this.searchType=status
+      this.getList()
+    },
+    contractchange(e){ 
+      this.contractNo=e
+      this.getList()
+    },
     updated() {
       this.$nextTick(() => {
         this.$refs.warehouseList.doLayout()
@@ -413,15 +484,30 @@ export default {
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord
+        contractNo:this.contractNo
       })
         .toPromise()
         .then(response => {
           this.warehouseList = response
         })
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val
+        getpurchreceipt({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+      })
+        .toPromise()
+        .then(response => {
+          for (let i = 0; i < response.records.length; i++) {
+            if(response.records[i].amountNotPayable==0){
+              response.records[i].closeaccountstatus='已结算'
+            }else{
+              response.records[i].closeaccountstatus='待结算'
+            }
+            
+            
+          }
+           this.contractNoList = response
+        })
     },
     handleRemove(file) {
       console.log(file)

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

@@ -164,6 +164,7 @@
         row="3"
         placeholder="暂无"
         maxlength="200"
+        readonly
       />
       <div class="small-title" style="font-size: 16px">实际流转数量</div>
       <ws-info-table class="flow">

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.