Browse Source

4.24小仓库

bulusiLuo 1 year ago
parent
commit
7da5c6517c

+ 5 - 8
src/views/zhpt/projectManager/projManageChange/materialWriteOff/addwriteOff/index.vue

@@ -6,12 +6,8 @@
       <addFlow :flowTitle="flowTitle"></addFlow>
     </el-row>
     <div :style="'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'">
-      <tableCom
-        v-if="tableConfig.method || tableConfig.testData"
-        ref="tableCom"
-        v-model="tableInfo"
-        :config="tableConfig"
-      ></tableCom>
+      <tableCom v-if="tableConfig.method || tableConfig.testData" ref="tableCom" v-model="tableInfo"
+        :config="tableConfig"></tableCom>
     </div>
     <subFlowInfo v-if="flowShow" :title="title" :config="config" v-model="flowShow"></subFlowInfo>
   </div>
@@ -187,7 +183,7 @@ export default {
   created() {
     this.config.subflowName = this.$options.name
   },
-  destroyed() {},
+  destroyed() { },
   methods: {
     /**
      * 流程删除
@@ -331,9 +327,10 @@ export default {
 </script>
 <style lang='scss' scoped>
 .pageContentDiv {
-  .searchDiv > * {
+  .searchDiv>* {
     margin-top: 10px;
   }
+
   .el-button {
     position: relative;
     float: left;

+ 18 - 32
src/views/zhpt/projectManager/projManageChange/materidlRequisition/addRequisition/tableDispatch.vue

@@ -1,18 +1,12 @@
 <template>
   <div>
     <el-row :gutter="24" style="margin: 0 0 12px 0"> </el-row>
-    <el-table
-      border
-      :data="tableData"
-      stripe
-      style="width: 100%"
-      :header-cell-style="{
-        background: 'rgba(250,250,250)',
-        color: 'rgb(50,59,65)',
-        height: '39px',
-        textAlign: 'center'
-      }"
-    >
+    <el-table border :data="tableData" stripe style="width: 100%" :header-cell-style="{
+      background: 'rgba(250,250,250)',
+      color: 'rgb(50,59,65)',
+      height: '39px',
+      textAlign: 'center'
+    }">
       <el-table-column type="index" width="50" label="序号" align="center"> </el-table-column>
       <!-- <el-table-column type="index" label="序号" width="50" align="center"> -->
       <el-table-column prop="matterTypeName" label="厂家" align="center"> </el-table-column>
@@ -22,22 +16,15 @@
       <el-table-column prop="availableqty" label="库存" align="center"> </el-table-column>
       <el-table-column prop="yuliang" label="本次领取" align="center">
         <template slot-scope="scope">
-          <el-input
-            class="tf-input-border"
-            v-model="scope.row.yuliang"
-            v-bind:ref="'r' + scope.$index + 'c' + 1"
-            size="small"
-            :disabled="isDetailShow"
-            maxlength="15"
-            @change="changePriceFn(scope.row.yuliang, scope.$index, scope.row)"
-          ></el-input>
+          <el-input class="tf-input-border" v-model="scope.row.yuliang" v-bind:ref="'r' + scope.$index + 'c' + 1"
+            size="small" :disabled="isDetailShow" maxlength="15"
+            @change="changePriceFn(scope.row.yuliang, scope.$index, scope.row)"></el-input>
         </template>
       </el-table-column>
       <el-table-column prop="prop" label="操作" align="center" width="60px" fixed="right" v-if="!isDetailShow">
         <template slot-scope="scope">
-          <el-button v-if="!scope.row.isDeteltShow" type="text" style="color: #f40" @click="delMaterial(scope.row)"
-            >删除</el-button
-          >
+          <el-button v-if="!scope.row.isDeteltShow" type="text" style="color: #f40"
+            @click="delMaterial(scope.row)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -186,11 +173,11 @@ export default {
     changePriceFn(value, index, row) {
       // console.log('12222222222222', row)
       const fValue = parseFloat(value) || 0
-      if (fValue > Number(row.availableqty)) {
-        this.tableData[index].yuliang = Number(row.availableqty)
-      } else {
-        this.tableData[index].yuliang = fValue
-      }
+      // if (fValue > Number(row.availableqty)) {
+      //   this.tableData[index].yuliang = Number(row.availableqty)
+      // } else {
+      this.tableData[index].yuliang = fValue || 0
+      // }
     },
     /**
      * 提交文件
@@ -216,6 +203,5 @@ export default {
   }
 }
 </script>
- 
-<style lang = "scss" scoped>
-</style>
+
+<style lang="scss" scoped></style>