002201 1 năm trước cách đây
mục cha
commit
3edb4082bc

+ 4 - 4
src/views/purchase/task/xie-yi-zhi-cai/column.js

@@ -57,10 +57,10 @@ export const TableColumns = [
     },
   },
   {
-    item: { key: "purchaseQuantity", title: "本次采购数量", fixed: "left" },
+    item: { key: "purchaseQuantity", title: "本次采购数量", fixed: true },
     attr: {
       is: "el-input-number",
-      min: () => 0,
+      min: 0,
       max: (prop) => {
         const { puQty = 0, executeQty = 0 } = prop;
         return puQty - executeQty;
@@ -69,7 +69,7 @@ export const TableColumns = [
     },
   },
   {
-    item: { key: "arrivalDatePlan", title: "计划到货日期", fixed: "left" },
+    item: { key: "arrivalDatePlan", title: "计划到货日期", fixed: true },
     attr: {
       is: "el-date-picker",
       valueFormat: "yyyy-MM-dd",
@@ -81,7 +81,7 @@ export const TableColumns = [
     },
   },
   {
-    item: { key: "note", title: "备注", fixed: "left" },
+    item: { key: "note", title: "备注", fixed: true },
     attr: {
       is: "el-input",
       autosize: true,

+ 9 - 70
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -142,83 +142,22 @@ export default {
           }}</span
           >) <span> {{ item.puUnitName }}</span>
         </h3>
-        <!-- <el-descriptions :size="$attrs.size" :column="column" border>
-          <template #title>
-          </template>
-          <el-descriptions-item label="采购组织">
-            {{ item.puOrgName }}
-          </el-descriptions-item>
-          <el-descriptions-item label="需求时间">
-            {{ item.demandDate }}
-          </el-descriptions-item>
-        </el-descriptions> -->
         <el-super-table
           v-model="item.orderPriceVos"
           :columns="tableColumns"
           :size="$attrs.size"
           :dict="dict"
         >
+          <template slot="purchaseQuantity" slot-scope="scope">
+            <component
+              v-bind="scope.attr"
+              v-model="scope.row[scope.item.key]"
+              :size="$attrs.size"
+              :max="scope.attr.max(scope.row)"
+            >
+            </component>
+          </template>
         </el-super-table>
-        <!-- <el-table
-          v-loading="loading"
-          :size="$attrs.size"
-          :data="item.orderPriceVos"
-          style="width: 100%"
-        >
-          <el-table-column
-            v-for="(cItem, cIndex) in tableColumns"
-            :key="cIndex"
-            :prop="cItem.item.key"
-            :label="cItem.item.title"
-            :fixed="cItem.item.fixed"
-            :width="cItem.item.width || 250"
-            show-overflow-tooltip
-          >
-            <template slot-scope="scope">
-              <el-input-number
-                v-if="cItem.attr.is === 'el-input-number'"
-                v-model="scope.row[cItem.item.key]"
-                :size="$attrs.size"
-                :min="cItem.attr.min(item)"
-                :max="cItem.attr.max(item)"
-                :controls-position="cItem.attr.controlsPosition"
-                style="width: 90%"
-              ></el-input-number>
-              <el-date-picker
-                v-else-if="cItem.attr.is === 'el-date-picker'"
-                v-model="scope.row[cItem.item.key]"
-                :size="$attrs.size"
-                :type="cItem.attr.type"
-                :value-format="cItem.attr.valueFormat"
-                :picker-options="cItem.attr.pickerOptions"
-                style="width: 90%"
-              ></el-date-picker>
-              <el-input
-                v-else-if="cItem.attr.is === 'el-input'"
-                v-model="scope.row[cItem.item.key]"
-                :size="$attrs.size"
-                autosize
-                type="textarea"
-                style="width: 90%"
-              ></el-input>
-              <el-computed-input-v2
-                v-else-if="cItem.attr.is === 'el-computed-input-v2'"
-                v-on="cItem.listeners"
-                v-model="scope.row[cItem.item.key]"
-                :source="scope.row"
-                :formatter="cItem.attr.formatter"
-                style="width: 100%"
-              ></el-computed-input-v2>
-              <el-dict-tag
-                v-else-if="cItem.attr.is === 'el-dict-tag'"
-                :size="$attrs.size"
-                :value="scope.row[cItem.item.key]"
-                :options="dict.type[cItem.attr.dictName]"
-              />
-              <span v-else>{{ scope.row[cItem.item.key] }}</span>
-            </template>
-          </el-table-column>
-        </el-table> -->
       </div>
     </el-drawer>
   </el-button>