lixiangyu
昨天 8b5bfdeb201b2653fb648f742b6d4ff5ff05ff6c
src/views/cms/modules/CuttingToolModal.vue
@@ -76,94 +76,94 @@
          </a-col>
        </a-row>
        <!-- 子表格信息-->
        <a-tabs defaultActiveKey="1">
          <a-tab-pane
            tab="刀具明细"
            key="1"
          >
<!--        <a-tabs defaultActiveKey="1">-->
<!--          <a-tab-pane-->
<!--            tab="刀具明细"-->
<!--            key="1"-->
<!--          >-->
            <a-table
              ref="table"
              bordered
              size="middle"
              rowKey="id"
              :columns="columns"
              :dataSource="dataSource"
              :pagination=false
            >
<!--            <a-table-->
<!--              ref="table"-->
<!--              bordered-->
<!--              size="middle"-->
<!--              rowKey="id"-->
<!--              :columns="columns"-->
<!--              :dataSource="dataSource"-->
<!--              :pagination=false-->
<!--            >-->
              <template
                v-for="col in columns"
                :slot="col.dataIndex"
                slot-scope='text, record, index'
              >
                <div :key="col.dataIndex">
<!--              <template-->
<!--                v-for="col in columns"-->
<!--                :slot="col.dataIndex"-->
<!--                slot-scope='text, record, index'-->
<!--              >-->
<!--                <div :key="col.dataIndex">-->
                  <a-input
                    :value="text"
                    :disabled="disableSubmit"
                    v-if="col.dataIndex == 'propertyCode'"
                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"
                  />
                  <a-input
                    :value="text"
                    :disabled="disableSubmit"
                    v-else-if="col.dataIndex == 'propertyName'"
                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"
                  />
                  <a-input
                    :value="text"
                    :disabled="disableSubmit"
                    v-else-if="col.dataIndex == 'propertyUnit'"
                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"
                  />
<!--                  <a-input-->
<!--                    :value="text"-->
<!--                    :disabled="disableSubmit"-->
<!--                    v-if="col.dataIndex == 'propertyCode'"-->
<!--                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"-->
<!--                  />-->
                  <a-input
                    :value="text"
                    :disabled="disableSubmit"
                    v-else-if="col.dataIndex == 'propertyValue'"
                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"
                  />
<!--                  <a-input-->
<!--                    :value="text"-->
<!--                    :disabled="disableSubmit"-->
<!--                    v-else-if="col.dataIndex == 'propertyName'"-->
<!--                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"-->
<!--                  />-->
                </div>
              </template>
<!--                  <a-input-->
<!--                    :value="text"-->
<!--                    :disabled="disableSubmit"-->
<!--                    v-else-if="col.dataIndex == 'propertyUnit'"-->
<!--                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"-->
<!--                  />-->
              <template
                slot="action"
                slot-scope="text,record,index"
              >
                <a-popconfirm
                  title="是否要删除此行?"
                  @confirm="handleDelete(text,record,index)"
                >
                  <Tooltip
                    placement="top"
                    title="删除"
                  >
                    <!-- shape="circle" -->
                    <a-button
                      :disabled="disableSubmit"
                      icon="delete"
                    />
                  </Tooltip>
                </a-popconfirm>
              </template>
<!--                  <a-input-->
<!--                    :value="text"-->
<!--                    :disabled="disableSubmit"-->
<!--                    v-else-if="col.dataIndex == 'propertyValue'"-->
<!--                    @change="(e)=>handleChange(e.target.value, record.key, col, index)"-->
<!--                  />-->
            </a-table>
<!--                </div>-->
<!--              </template>-->
            <a-button
              :disabled="disableSubmit"
              style="width: 100%; margin-top: 16px; margin-bottom: 8px"
              type="dashed"
              icon="plus"
              @click="addPropertiesList"
            >添加扩展属性</a-button>
          </a-tab-pane>
        </a-tabs>
<!--              <template-->
<!--                slot="action"-->
<!--                slot-scope="text,record,index"-->
<!--              >-->
<!--                <a-popconfirm-->
<!--                  title="是否要删除此行?"-->
<!--                  @confirm="handleDelete(text,record,index)"-->
<!--                >-->
<!--                  <Tooltip-->
<!--                    placement="top"-->
<!--                    title="删除"-->
<!--                  >-->
<!--                    &lt;!&ndash; shape="circle" &ndash;&gt;-->
<!--                    <a-button-->
<!--                      :disabled="disableSubmit"-->
<!--                      icon="delete"-->
<!--                    />-->
<!--                  </Tooltip>-->
<!--                </a-popconfirm>-->
<!--              </template>-->
<!--            </a-table>-->
<!--            <a-button-->
<!--              :disabled="disableSubmit"-->
<!--              style="width: 100%; margin-top: 16px; margin-bottom: 8px"-->
<!--              type="dashed"-->
<!--              icon="plus"-->
<!--              @click="addPropertiesList"-->
<!--            >添加扩展属性</a-button>-->
<!--          </a-tab-pane>-->
<!--        </a-tabs>-->
        <!-- 子表格信息结束-->
      </a-form>
    </a-spin>
@@ -329,7 +329,7 @@
      }
      this.$nextTick(() => {
        this.form.setFieldsValue(
          pick(this.model, 'cuttingCode', 'cuttingName', 'cuttingCategory', 'storeLocation','cuttingModel', 'supplierId', 'minimumPackageUnit',
          pick(this.model, 'cuttingCode', 'cuttingName', 'cuttingCategory', 'storeLocation','cuttingModel', 'supplierId', 'minimumPackageUnit',
          'cuttingMaterial','drawingNumber','inventoryWarning','remark')
        )
      })
@@ -354,6 +354,7 @@
        this.deletePropertiesIds.push(record.id);
      }
    },
    handleOk() {
      const that = this
      let dataSource = that.dataSource;
@@ -388,7 +389,7 @@
    handleCancel() {
      this.close()
    },
    //添加扩展属性
    addPropertiesList() {
      const temp = [...(this.dataSource || [])]