Quellcode durchsuchen

前端 采购计划sdy

zhongtianhaoyuan vor 3 Jahren
Ursprung
Commit
22d859e993
1 geänderte Dateien mit 42 neuen und 41 gelöschten Zeilen
  1. 42 41
      src/views/purchasingManagement/procurementPlanList.vue

+ 42 - 41
src/views/purchasingManagement/procurementPlanList.vue

@@ -1,34 +1,10 @@
 //采购计划
 <template>
   <div class="container">
-    <!-- <div> -->
-    <!-- <div>
-      <ws-input
-        v-model="searchKeyWord"
-        placeholder="可按采购计划编号和标题查找"
-        clearable
-        maxlength="500"
-        type="input"
-        class="findValue"
-      ></ws-input>
-      <ws-button class="but" type="primary" @click="find()">
-        <img
-          width="16"
-          height="16"
-          style="
-            vertical-align: text-top;
-            position: relative;
-            top: 0px;
-            left: -8px;
-          "
-          src="../../../public/img/sousuo.png"
-          alt
-        />
-      </ws-button>
-    </div> -->
-  
-     <BaseHeaderLayout :leftSpan="10">
-      <template slot="left">  <ws-button type="primary" @click="handleAdd()">添加</ws-button> </template>
+    <BaseHeaderLayout :leftSpan="10">
+      <template slot="left">
+        <ws-button type="primary" @click="handleAdd()">添加</ws-button>
+      </template>
       <!-- 接单开始 -->
       <template slot="right">
         <ws-input
@@ -87,18 +63,27 @@
             <div class="inputChenge">
               <el-input
                 v-model="scope.row.basisPrice"
-                @change="varietyClick(scope.row)"
-                class="inputs"
+                v-if="scope.row.identification == 'true'"
               ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.basisPrice }}
+              </div>
             </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="varietyClick(scope.row)"
+              @click="whether(scope.row)"
               alt=""
+              v-if="scope.row.identification == 'false'"
             />
+            <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 v-else>—</div>
         </template>
@@ -110,18 +95,27 @@
               <!-- readonly -->
               <el-input
                 v-model="scope.row.unitPrice"
-                v-bind:class="inputs"
-                @change="varietyClick(scope.row)"
+                v-if="scope.row.identification == 'true'"
               ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.unitPrice }}
+              </div>
             </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="varietyClick(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 v-else>—</div>
         </template>
@@ -279,7 +273,6 @@ export default {
         },
       },
       accessoryTFs: false,
-      inputs: 'inputs1',
     }
   },
   activated() {
@@ -296,11 +289,16 @@ export default {
         tranTypeKey: this.tranTypeKey,
         contractNo: this.contractNo,
         pcFlag: this.pcFlag,
-        searchKeyWord:this.searchKeyWord
+        searchKeyWord: this.searchKeyWord,
       })
         .toPromise()
         .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+          }
           this.warehouseList = response
+
+          console.log(this.warehouseList, 'kankan')
         })
     },
     statusquery(state) {
@@ -314,6 +312,10 @@ export default {
         query: { id: row.id },
       })
     },
+    whether(row) {
+      row.identification = 'true'
+    },
+
     getSpanArr(data) {
       let that = this
 
@@ -497,6 +499,7 @@ export default {
         }
       }
     },
+    handleSizeChange() {},
     // fujian(row) {
     //   if (
     //     row.receiveAttachmentPath === null ||
@@ -557,6 +560,7 @@ export default {
       })
     },
     varietyClick(row) {
+      console.log('jin')
       if (row.procurementPlanType == '期货') {
         this.$confirm(`确定要修改基差?`, {
           confirmButtonText: '确定',
@@ -825,10 +829,7 @@ export default {
   width: 50%;
   display: inline-flex;
 }
-.inputs1 {
-  border: none;
+.inputs {
+  margin: 0 auto;
 }
-// .inputChenge>>>.el-input__inner{
-// border: none;
-// }
 </style>