Procházet zdrojové kódy

🐞 fix([drp-采购需求处理]): 界面可修改字段显示错误

采购需求处理界面可修改字段显示错误 具体操作:在采购需求处理列表界面,修改原因在不是编辑的情况下也可以编辑;采购需求处理详情界面最终采购量和修改原因不能编辑,需求部门名称不是编辑的情况下也可以编辑。 需要改成:采购需求处理详情界面最终采购量和修改原因都要能编辑,并且所有能编辑的字段在不是编辑状态下需要置灰

20240506307
002390 před 1 rokem
rodič
revize
cc0b7bdd81

+ 9 - 2
src/views/purchase/DemandSummary/add/columns.js

@@ -39,7 +39,12 @@ export default function useColumns() {
     },
     {
       item: { key: "puQtyRes", title: "最终采购量", },
-      attr: {},
+      attr: {
+        is: "el-input-number",
+        min: 0,
+        controlsPosition: "right",
+        isSummary: true,
+      },
     },
     {
       item: { key: "closeQty", title: "关闭数量", hidden: false, width: 120, },
@@ -67,7 +72,9 @@ export default function useColumns() {
     },
     {
       item: { key: "updateCause", title: "修改原因", hidden: false, },
-      attr: {},
+      attr: {
+        is: "el-input",
+      },
     },
     {
       item: { key: "remark", title: "业务备注", },

+ 54 - 0
src/views/purchase/DemandSummary/add/index.vue

@@ -243,6 +243,24 @@ export default {
           </el-option>
         </component>
       </template>
+      <!-- 批号锁定标识-->
+      <template slot="isBatchLock" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="!isEdit || scope.row.status !== '1'"
+        >
+          <el-option
+            v-for="item in dict.type[scope.attr.dictName]"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </component>
+      </template>
       <!-- 收货仓库-->
       <template slot="deliveryWarehouseName" slot-scope="scope">
         <component
@@ -295,6 +313,42 @@ export default {
         >
         </component>
       </template>
+
+      <!-- 最终采购量-->
+      <template slot="puQtyRes" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="!isEdit || scope.row.status !== '1'"
+        >
+        </component>
+      </template>
+
+      <!-- 修改原因-->
+      <template slot="updateCause" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="!isEdit || scope.row.status !== '1'"
+        >
+        </component>
+      </template>
+      
+      <!-- 需求部门名称-->
+      <template slot="demandDeptName" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="$attrs.size"
+          :source.sync="scope.row"
+          :disabled="!isEdit || scope.row.status !== '1'"
+        >
+        </component>
+      </template>
     </el-super-ux-table>
   </el-drawer>
 </template>

+ 18 - 1
src/views/purchase/DemandSummary/index.vue

@@ -179,6 +179,10 @@ export default {
     changeBuyerName({ $rowIndex }) {
       this.recordData.push($rowIndex);
     },
+    // 修改原因
+    changeModifyReason({ $rowIndex }) {
+      this.recordData.push($rowIndex);
+    },
     changeMaterial(val) {
       this.params.materialCodeList = val;
       this.useQuery(this.params, this.page);
@@ -344,12 +348,25 @@ export default {
           v-model="scope.row[scope.item.key]"
           :size="size"
           :source.sync="scope.row"
-          :disabled="scope.row.status !== '1' ||!isEdit"
+          :disabled="scope.row.status !== '1' || !isEdit"
           @clear="changeBuyerName(scope)"
           @change="changeBuyerName(scope)"
         >
         </component>
       </template>
+      <!-- 修改原因 -->
+      <template slot="modifyReason" slot-scope="scope">
+        <component
+          v-bind="scope.attr"
+          v-model="scope.row[scope.item.key]"
+          :size="size"
+          :source.sync="scope.row"
+          :disabled="scope.row.status !== '1' || !isEdit"
+          @clear="changeModifyReason(scope)"
+          @change="changeModifyReason(scope)"
+        >
+        </component>
+      </template>
       <ux-table-column fixed="right" title="操作" align="center" width="80">
         <template slot-scope="scope">
           <el-button type="text" :size="size" @click="useSee(scope.row)"