zhangyuewww 3 éve
szülő
commit
7b65dc0461

+ 109 - 13
src/views/purchasingManagement/purchaseOrderList.vue

@@ -85,9 +85,10 @@
         prop="unitPrice"
         label="单价(元/吨)"
       >
-        <template slot-scope="scope">
+              <template slot-scope="scope">
           {{ scope.row.unitPrice }}
           <i
+            v-if="scope.row.procurementPlanType == '期货'"
             @click="Changepricerecord(scope.row)"
             class="iconfont icon-lishi"
           ></i>
@@ -100,8 +101,44 @@
         width="100"
       >
         <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span
+            v-if="
+              !scope.row.basischange &&
+              scope.row.basis &&
+              scope.row.procurementPlanType == '期货'
+            "
+            >{{ '+'+scope.row.basis }}</span
+          >
+          <input
+            v-if="scope.row.basischange"
+            style="width: 60px"
+            v-model="basis"
+            type="text"
+          />
+          <!--改基差-->
+          <i
+            @click="changebasis(scope.row)"
+            v-if="scope.row.basischange && scope.row.procurementPlanType == '期货'"
+            class="iconfont icon-dui"
+          ></i>
+          <img
+            v-if="
+              !scope.row.basischange &&
+              scope.row.basis &&
+              scope.row.procurementPlanType == '期货'
+            "
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editbasis(scope.row)"
+            alt=""
+          />
+          <span v-if="!scope.row.basis">-</span>
+        </template>
+        <!-- <template slot-scope="scope">
           <div class="inputChenge">
-            <!-- readonly -->
             <el-input
               v-model="scope.row.basis"
               v-if="scope.row.identification == 'true'"
@@ -125,7 +162,7 @@
             v-if="scope.row.identification == 'true'"
             @click="varietyClick(scope.row)"
           ></i>
-        </template>
+        </template> -->
       </el-table-column>
 
       <el-table-column
@@ -134,25 +171,49 @@
         label="冻结定金(元)"
         width="90"
       >
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.freezingDeposit
+          }}</span>
+        </template>
       </el-table-column>
       <el-table-column
         class="table_td"
         prop="defaultDeposit"
         label="拖欠定金(元)"
         width="100"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.defaultDeposit
+          }}</span>
+        </template></el-table-column>
       <el-table-column
         width="100"
         class="table_td"
         prop="unloadingCharge"
         label="卸车费(元/吨)"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.unloadingCharge
+          }}</span>
+        </template></el-table-column>
       <el-table-column
         width="100"
         class="table_td"
         prop="invoiceFee"
         label="发票费(元/吨)"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.invoiceFee
+          }}</span>
+        </template></el-table-column>
       <el-table-column
         class="table_td"
         prop="transactionsNumber"
@@ -164,15 +225,24 @@
         prop="stockInQuantity"
         label="已入库量(吨)"
         width="90"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.stockInQuantity
+          }}</span>
+        </template></el-table-column>
       <el-table-column
         class="table_td"
         prop="openPosition"
         label="可平仓量(吨)"
         width="90"
       >
-        <template slot-scope="scope">
-          {{ scope.row.openPosition }}
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.openPosition
+          }}</span>
         </template>
       </el-table-column>
       <el-table-column
@@ -181,9 +251,13 @@
         label="已平仓量(吨)"
         width="90"
       >
-        <template slot-scope="scope">
-          {{ scope.row.closedPosition }}
+      <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.procurementPlanType == '期货'">{{
+            scope.row.closedPosition
+          }}</span>
           <i
+            v-if="scope.row.procurementPlanType == '期货'"
             @click="closedPositionLook(scope.row)"
             class="iconfont icon-lishi"
           ></i>
@@ -195,9 +269,13 @@
         label="已成交量(吨)"
         width="90"
       >
-        <template slot-scope="scope">
-          {{ scope.row.cumulativeTurnover }}
+       <template slot-scope="scope">
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span v-if="scope.row.salePlanprocurementPlanTypeType == '期货'">{{
+            scope.row.cumulativeTurnover
+          }}</span>
           <i
+            v-if="scope.row.procurementPlanType == '期货'"
             @click="transactionRecord(scope.row)"
             class="iconfont icon-lishi"
           ></i>
@@ -283,6 +361,7 @@
               class="record"
               @click="nocomplete1(scope.row)"
               v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.receiptUnpaid != null&&scope.row.receiptUnpaid==0">已结算</div>
+              <div v-else>--</div>
           </template>
           </el-table-column >
       <el-table-column
@@ -299,6 +378,7 @@
               class="record"
               @click="nocomplete(scope.row)"
               v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid ==0">已结算</div>
+              <div v-else>--</div>
           </template>
           </el-table-column >
       <el-table-column prop="seller" label="操作" width="310">
@@ -1133,6 +1213,22 @@ export default {
             this.$message.success('删除订单失败')
           })
       })
+    },
+     //修改基差
+    changebasis(item) {
+      editStatus({ basis: this.basis, id: item.id, flag: 3 })
+        .toPromise()
+        .then((response) => {
+          this.$message.success('修改基差成功')
+          this.getList()
+        })
+        .catch((req) => {
+          this.$message.success('修改基差失败')
+        })
+    },
+    editbasis(item) {
+      this.basis = item.basis
+      item.basischange = true
     },
     closepositionconfirm() {
       this.closePositionList1.compId = sessionStorage.getItem('ws-pf_compId')

+ 2 - 0
src/views/salesManagement/salesPlanOrderList.vue

@@ -338,6 +338,7 @@
     font-size: 14px;'
               @click="nocomplete1(scope.row)"
               v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.deliveryUnpaid != null&&scope.row.deliveryUnpaid==0">已结算</div>
+              <div v-else>--</div>
           </template></el-table-column>
       <el-table-column
         class="table_td"
@@ -362,6 +363,7 @@
     font-size: 14px;'
               @click="nocomplete(scope.row)"
               v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid ==0">已结算</div>
+              <div v-else>--</div>
           </template></el-table-column>
       <el-table-column prop="seller" label="操作" width="360">
         <template slot-scope="scope">