zxz 3 years ago
parent
commit
def9e979e3

+ 3 - 21
src/views/purchasingManagement/procurementPlanList.vue

@@ -210,12 +210,12 @@
 import {
   procurementPlan,
   procurementDel,
+  billoperatehis,
   procurementEditOther,
 } from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { dayjs, fmoney, EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -401,9 +401,6 @@ export default {
         'm+': (date.getMonth() + 1).toString(), // 月
         'd+': date.getDate().toString(), // 日
         'H+': date.getHours().toString(), // 时
-        // "M+": date.getMinutes().toString(),         // 分
-        // "S+": date.getSeconds().toString()          // 秒
-        // 有其他格式化字符需求可以继续添加,必须转化成字符串
       }
       for (let k in opt) {
         ret = new RegExp('(' + k + ')').exec(fmt)
@@ -450,7 +447,7 @@ export default {
               .then((response) => {
                 this.$notify.success({
                   title: '成功',
-                  message: '状态修改成功',
+                  message: '修改成功',
                 })
                 this.getList()
               })
@@ -479,7 +476,7 @@ export default {
               .then((response) => {
                 this.$notify.success({
                   title: '成功',
-                  message: '状态修改成功',
+                  message: '提交成功',
                 })
                 this.getList()
               })
@@ -500,21 +497,6 @@ export default {
         }
       }
     },
-    handleSizeChange() {},
-    // fujian(row) {
-    //   if (
-    //     row.receiveAttachmentPath === null ||
-    //     row.receiveAttachmentPath === ''
-    //   ) {
-    //     EventBus.$emit(
-    //       'warning',
-    //       this.$t('system.noticeCircular.NoInformation')
-    //     )
-    //   } else {
-    //     this.accessoryTFs = true
-    //   }
-    //   this.appendixIdss = row.receiveAttachmentPath
-    // },
     handleExamine(row) {
       this.$router.push({
         name: 'salesContractExamine',

+ 73 - 25
src/views/purchasingManagement/purchaseOrderList.vue

@@ -197,16 +197,33 @@
           ></i>
         </template>
       </el-table-column>
+
       <el-table-column
         class="table_td"
         label="发票类型"
         prop="type"
       ></el-table-column>
-      <el-table-column
-        class="table_td"
-        label="包装方式"
-        prop="packingType"
-      ></el-table-column>
+      <el-table-column prop="packingType" label="包装方式">
+        <template slot-scope="scope">
+          <el-popover
+            placement="top"
+            :width="160"
+            trigger="hover"
+            visible-arrow="false"
+          >
+            <template>
+              <span slot="reference">
+                {{ scope.row.packingType }}
+              </span>
+            </template>
+            <div>
+              <span style="margin-left: 6px" v-if="scope.row.packingType != '散装'">
+              {{ scope.row.baggingNotes }}</span>
+            </div>
+          </el-popover>
+        </template>
+      </el-table-column>
+
       <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
           <el-popover
@@ -244,17 +261,21 @@
         label="入库结算"
         prop="updateDate"
         width="130"
-      ></el-table-column>
+      ><span v-if="scope.row.procurementPlanType != '现货'">--</span></el-table-column>
       <el-table-column
         class="table_td"
         label="平仓结算"
         prop="updateDate"
         width="130"
-      ></el-table-column>
+      ><span v-if="scope.row.procurementPlanType != '现货'">--</span></el-table-column>
       <el-table-column prop="seller" label="操作" width="310">
         <template slot-scope="scope">
+          <!-- <div v-if="scope.row.procurementPlanType != '现货'"> -->
           <div
-            v-if="scope.row.status == '已通过' || scope.row.status == '已成交'"
+            v-if="
+              (scope.row.status == '已通过' || scope.row.status == '已成交') &&
+              scope.row.procurementPlanType != '现货'
+            "
             class="record"
             @click="makeabargain(scope.row)"
           >
@@ -262,14 +283,20 @@
           </div>
           <!-- 补充定金 -->
           <div
-            v-if="scope.row.defaultDeposit > 0"
+            v-if="
+              scope.row.defaultDeposit > 0 &&
+              scope.row.procurementPlanType != '现货'
+            "
             class="record"
             @click="addthedeposit(scope.row)"
           >
             补充定金
           </div>
           <div
-            v-if="scope.row.freezingDeposit > 0"
+            v-if="
+              scope.row.freezingDeposit > 0 &&
+              scope.row.procurementPlanType != '现货'
+            "
             class="record"
             @click="unfreeze(scope.row)"
           >
@@ -278,20 +305,28 @@
           <!-- 平仓 -->
 
           <div
-            v-if="scope.row.openPosition > 0"
+            v-if="
+              scope.row.openPosition > 0 &&
+              scope.row.procurementPlanType != '现货'
+            "
             class="record"
             @click="cloaeposition1(scope.row)"
           >
             平仓
           </div>
           <div
-            v-if="scope.row.status == '已通过' || scope.row.status == '已成交'"
+            v-if="
+              (scope.row.status == '已通过' || scope.row.status == '已成交') &&
+              scope.row.procurementPlanType != '现货'
+            "
             class="record"
             @click="handle(scope.row)"
           >
             完成
           </div>
+          <!-- </div> -->
           <!-- 审核 -->
+          <!-- "(scope.row.status == '已通过' || scope.row.status == '已成交') && scope.row.procurementPlanType != '现货'" -->
           <div
             v-if="scope.row.status == '待审核'"
             type="text"
@@ -366,7 +401,7 @@
         </el-form-item>
         <el-form-item
           label="成交日期"
-          prop="submissionDate"
+          prop="dealDate"
           :label-width="formLabelWidth"
           class="deal"
         >
@@ -496,14 +531,14 @@
     </el-dialog>
     <!--审核-->
     <el-dialog
-      width="30%"
+      width="40%"
       title="审核"
       :visible.sync="dialogFormVisible4"
       :append-to-body="true"
     >
       <el-form>
         <el-form-item label="交易类型" :label-width="formLabelWidth">
-          {{ aduitlist.type }}
+          <span>采购</span>
         </el-form-item>
         <el-form-item label="交易目标" :label-width="formLabelWidth">
           {{ aduitlist.tradingTarget }}
@@ -734,8 +769,10 @@
     >
       <div v-for="item in pricechange">
         <div>
-          {{ item.priceType }}&nbsp;&nbsp;&nbsp;
-          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ item.price }}
+          {{ item.priceType }}
+        </div>
+        <div class="price">
+          {{ item.price }}
         </div>
         <div>{{ item.updateDate }}</div>
       </div>
@@ -827,6 +864,7 @@ export default {
       pageSize: 10,
       searchType: '',
       searchTypeText: '全部订单',
+      procurementPlanType: '',
       searchKeyWord: '',
       contractType: 2,
       enter: {
@@ -858,6 +896,7 @@ export default {
       pricechange: [],
       aduitlist: {
         unloadingCharge: 0,
+        basis: 0,
       },
       basis: 0,
       replenishlist: {},
@@ -1103,13 +1142,12 @@ export default {
       this.$set(this.closePositionList1, 'commonId', item.commonId)
 
       getTransactionPriceList({
-          id : item.id
+        id: item.id,
       })
-      .toPromise()
+        .toPromise()
         .then((response) => {
           this.transactionRecordList = response
         })
-        
     },
     unfreeze(item) {
       this.$confirm(`确定解冻订单(${item.procurementPlan})的定金?`, {
@@ -1206,6 +1244,8 @@ export default {
       this.$set(this.aduitlist, 'taskId', item.taskId)
       this.$set(this.aduitlist, 'type', item.type)
       this.$set(this.aduitlist, 'typeKey', item.typeKey)
+      this.$set(this.aduitlist, 'procurementPlanType', item.procurementPlanType)
+      this.$set(this.aduitlist, 'basis', Math.abs(item.basis))
     },
     aduitconfirm() {
       if (!this.aduitlist.unitPrice) {
@@ -1215,7 +1255,10 @@ export default {
         })
         return
       }
-      if (!this.aduitlist.basis) {
+      if (
+        !this.aduitlist.basis &&
+        this.aduitlist.procurementPlanType != '现货'
+      ) {
         this.$message({
           message: '基差不能为空!',
           type: 'warning',
@@ -1284,8 +1327,9 @@ export default {
         })
         return
       }
-      this.aduitlist.unloadingCharge = -this.aduitlist.unloadingCharge
-      this.aduitlist.basis = -this.aduitlist.basis
+      this.aduitlist.unloadingCharge = '-' + this.aduitlist.unloadingCharge
+      this.aduitlist.basis = '-' + this.aduitlist.basis
+      this.aduitlist.procurementPlanType = this.aduitlist.procurementPlanType
       this.dialogFormVisible4 = false
       this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {
         confirmButtonText: '确定',
@@ -1430,14 +1474,14 @@ export default {
     selectpackingType(e) {
       for (var i = 0; i < this.packingTypeList.length; i++) {
         if (this.packingTypeList[i].constValue == e) {
-          this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+          this.aduitlist.packingTypeKey = this.packingTypeList[i].constKey
         }
       }
     },
     selectType(e) {
       for (var i = 0; i < this.invoiceList.length; i++) {
         if (this.invoiceList[i].constValue == e) {
-          this.dataList.typeKey = this.invoiceList[i].constKey
+          this.aduitlist.typeKey = this.invoiceList[i].constKey
         }
       }
     },
@@ -1891,6 +1935,10 @@ hr {
   width: 50%;
   display: inline-flex;
 }
+.price {
+  margin-left: 97px;
+  margin-top: -19px;
+}
 .chenglu {
   font-size: 14px;
   font-family: PingFangSC-Medium, PingFang SC;