Browse Source

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

gjy 3 years ago
parent
commit
8d41354109

+ 2 - 2
src/views/purchasingManagement/procurementPlanList.vue

@@ -455,7 +455,7 @@ export default {
               .then((response) => {
                 this.$notify.success({
                   title: '成功',
-                  message: '状态修改成功',
+                  message: '隐藏成功',
                 })
                 this.getList()
               })
@@ -484,7 +484,7 @@ export default {
               .then((response) => {
                 this.$notify.success({
                   title: '成功',
-                  message: '状态修改成功',
+                  message: '操作成功',
                 })
                 this.getList()
               })

+ 90 - 22
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>
@@ -101,14 +102,21 @@
       >
         <template slot-scope="scope">
           <div class="inputChenge">
-            <!-- readonly -->
-            <el-input
-              v-model="scope.row.basis"
-              v-if="scope.row.identification == 'true'"
-            ></el-input>
-            <div v-if="scope.row.identification == 'false'" class="inputs">
-              {{ scope.row.basis }}
-            </div>
+          <span v-if="scope.row.procurementPlanType == '现货'">--</span>
+          <span
+            v-if="
+              scope.row.identification == 'false' &&
+              scope.row.basis &&
+              scope.row.procurementPlanType == '期货'
+            "
+            >{{scope.row.basis }}</span
+          >
+          <input
+            v-if="scope.row.identification == 'true'&&scope.row.procurementPlanType == '期货'"
+            style="width: 60px"
+            v-model="scope.row.basis"
+            type="text"
+          />
           </div>
           <img
             width="17"
@@ -116,13 +124,13 @@
             style="vertical-align: text-top; position: relative; top: -1px"
             src="../../../public/img/edit.png"
             @click="whether(scope.row)"
-            v-if="scope.row.identification == 'false'"
+            v-if="scope.row.identification == 'false'&&scope.row.procurementPlanType == '期货'"
             alt=""
           />
           <i
             class="el-icon-check"
             style="line-height: 29px; margin-left: 10px"
-            v-if="scope.row.identification == 'true'"
+            v-if="scope.row.identification == 'true'&&scope.row.procurementPlanType == '期货'"
             @click="varietyClick(scope.row)"
           ></i>
         </template>
@@ -134,25 +142,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 +196,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 +222,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 +240,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.procurementPlanType == '期货'">{{
+            scope.row.cumulativeTurnover
+          }}</span>
           <i
+            v-if="scope.row.procurementPlanType == '期货'"
             @click="transactionRecord(scope.row)"
             class="iconfont icon-lishi"
           ></i>
@@ -283,6 +332,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 +349,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 +1184,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')
@@ -1622,6 +1689,7 @@ export default {
         .toPromise()
         .then((response) => {
           for (var i = 0; i < response.records.length; i++) {
+            response.records[i].basischange = false
             response.records[i].identification = 'false'
             response.records[i].openPosition =
               response.records[i].cumulativeTurnover -
@@ -2082,7 +2150,7 @@ hr {
   color: #8890b1;
 }
 .inputChenge {
-  width: 50%;
+  width: 40%;
   display: inline-flex;
 }
 .price {

+ 2 - 2
src/views/salesManagement/salesPlanList.vue

@@ -454,7 +454,7 @@ export default {
               .then((response) => {
                 this.$notify.success({
                   title: '成功',
-                  message: '状态修改成功',
+                  message: '隐藏成功',
                 })
                 this.getList()
               })
@@ -483,7 +483,7 @@ export default {
               .then((response) => {
                 this.$notify.success({
                   title: '成功',
-                  message: '状态修改成功',
+                  message: '操作成功',
                 })
                 this.getList()
               })

+ 8 - 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">
@@ -1604,6 +1606,12 @@ export default {
         this.aduitlist.basis = '+' + this.aduitlist.basis
       }
       this.aduitlist.salePlanType = this.aduitlist.salePlanType
+      if (this.aduitlist.salePlanType == '期货') {
+        this.aduitlist.freezingDeposit = this.aduitlist.transactionsNumber*this.aduitlist.depositRatio
+        if(this.aduitlist.invoiceFee){
+          this.aduitlist.invoiceFee=-Math.abs(this.aduitlist.invoiceFee)
+        }
+       }
       this.dialogFormVisible4 = false
       this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {
         confirmButtonText: '确定',