chris пре 3 година
родитељ
комит
03f1659b6a
1 измењених фајлова са 10 додато и 10 уклоњено
  1. 10 10
      src/views/modules/warehouse/stock-order-inbound.vue

+ 10 - 10
src/views/modules/warehouse/stock-order-inbound.vue

@@ -4,7 +4,7 @@
     width="80%"
     :close-on-click-modal="false"
     :visible.sync="visible">
-    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
       <el-row class="my-row my-row-1">
         <el-col :span="8">
           <el-form-item label="编码" prop="recordCode">
@@ -44,8 +44,8 @@
                     :value="item.code">
                   </el-option>
                 </el-select>
-                <el-button v-show="!display && item.buttonType && item.buttonType === '1'" @click="changeButtonType(item, 0)" type="danger">转为选择</el-button>
-                <el-button v-show="!display && (!item.buttonType || item.buttonType === '0')" @click="changeButtonType(item, 1)" type="danger">转为输入</el-button>
+                <el-button v-show="!display && item.buttonType && item.buttonType === '1'" @click="changeButtonType(item, 0)" type="danger">选择</el-button>
+                <el-button v-show="!display && (!item.buttonType || item.buttonType === '0')" @click="changeButtonType(item, 1)" type="danger">输入</el-button>
               </el-form-item>
             </el-col>
             <el-col :span="8" style="padding-left: 20px">
@@ -112,7 +112,7 @@
             </el-col>
             <el-col :span="8" style="padding-left: 20px">
               <el-form-item label="是否换算" prop="unitNeedChange">
-                <el-input v-if="display" v-model="item.unitNeedChange" :disabled="true"></el-input>
+                <el-input v-if="display" v-model="item.conversionName" :disabled="true"></el-input>
                 <el-select v-else
                            v-model="item.unitNeedChange"
                            remote
@@ -131,7 +131,7 @@
           </el-row>
           <el-row>
             <el-form-item label="备注" prop="notes">
-              <el-input type="textarea" v-model="item.notes" :disabled="display" placeholder="备注"></el-input>
+              <el-input type="textarea" v-model="item.notes" :disabled="display"></el-input>
             </el-form-item>
           </el-row>
         </div>
@@ -192,7 +192,8 @@
               if (data.data[0]) {
                 this.dataForm = {
                   recordCode: data.data[0].recordCode,
-                  applicant: data.data[0].applicant
+                  applicant: data.data[0].applicant,
+                  orgName: data.data[0].orgName
                 }
               }
               data.data.forEach((item) => {
@@ -226,7 +227,8 @@
           usage: item ? item.usage : '',
           userId: item ? item.userId : '',
           orgName: item ? item.orgName : '',
-          unitNeedChange: item ? item.unitNeedChange : ''
+          unitNeedChange: item ? item.unitNeedChange : '',
+          conversionName: item ? item.conversionName : ''
         })
       },
       removeOne (index) {
@@ -249,7 +251,7 @@
                 cnt: item.cnt,
                 materialId: item.materialId,
                 materialName: item.materialName ? item.materialName : item.materialId,
-                materialTypeId: item.materialTypeId,
+                materialTypeId: item.materialTypeId ? item.materialTypeId : item.cateId,
                 notes: item.notes,
                 orgId: this.orgId,
                 price: item.price,
@@ -333,14 +335,12 @@
         })
       },
       onMaterialChanged (item) {
-        if (!item.id) return
         let item2 = this.optionsMaterial.find((item1) => item1.code === item.materialId)
         if (!item2) return
         item.categoryName = item2.categoryName
         item.cateId = item2.cateId
         item.specifications = item2.specifications
         item.unitName = item2.unitName
-        // this.remoteNeedChange(item.materialId)
       },
       // 远程选择:是否需要换算
       remoteNeedChange (query) {