石广澎
2024-01-05 b2429057ae17e9f5b357435b0bff5f6cc0040b69
admin-web/src/views/foundation/material/index.vue
@@ -218,7 +218,7 @@
            {
              title: '编辑',
              events: (row) => {
                this.showAudit(row);
                this.showAdd(row.id);
              },
            },
            {
@@ -268,7 +268,7 @@
    updState(row) {
      let vm = this
      let text = row.states == 0 ? "启用" : "禁用";
      vm.$modal.confirm('确认要' + text + '"' + row.goodsName + '"吗?').then(function () {
      vm.$modal.confirm('确认要' + text + '"' + row.goodsName + '"物品吗?').then(function () {
        let params = Object.assign({}, row)
        params.states = row.states == 1 ? 0 : 1
        updStatus(params).then(res => {
@@ -282,7 +282,7 @@
    },
    del(row) {
      this.$modal
        .confirm('是否确认删除名称为"' + row.goodsName + '"的机构吗?')
        .confirm('是否确认删除名称为"' + row.goodsName + '"的物品吗?')
        .then(function () {
          delGoods({id: row.id}).then((res) => {
          });
@@ -294,23 +294,19 @@
        .catch(() => {
        });
    },
    showAdd() {
      // if (!this.editSetting.orgId) {
      //   this.$message.warning('请先选择左侧机构')
      // } else {
        this.editSetting.id = null;
        this.editSetting.title = '新增';
        this.editSetting.show = true;
      // }
    showAdd(id) {
      this.editSetting.id = id;
      this.editSetting.title = id?'编辑':'新增';
      this.editSetting.show = true;
    },
    showSpecs(row) {
      this.specsSetting.id = row.id;
      this.specsSetting.goodsTemplatesId = row.id;
      this.specsSetting.show = true;
    },
    // 查询table列表
    search(pageNum) {
      if (pageNum != undefined) {
        this.$refs.myTable.search(pageNum)
        this.$refs.myTable.search({pageNum})
      } else {
        this.$refs.myTable.search()
      }