石广澎
2023-12-01 9cb389b74302ce6b0a2333328922e7c462234a56
admin-web/src/views/foundation/material/index.vue
@@ -159,12 +159,12 @@
        },
        // 列信息
        columns: [
          {title: '物品编号', field: 'goodsCode', align: 'center'},
          {title: '物品名称', field: 'goodsName', align: 'center'},
          {title: '分类', field: 'categoryName', align: 'center'},
          {title: '类别', field: 'classification', align: 'center'},
          {title: '物品编号', field: 'goodsCode', align: 'center', width: 120},
          {title: '物品名称', field: 'goodsName', align: 'left', minWidth: 140},
          {title: '分类', field: 'categoryName', align: 'left', minWidth: 140},
          {title: '类别', field: 'classification', align: 'center', width: 80},
          // {title: '采购类型', field: 'categoryId', align: 'center'},
          {title: '所属机构', field: '', align: 'center'},
          {title: '所属机构', field: 'agencyName', align: 'left', minWidth: 140},
          {
            title: '创建时间',
            field: 'createDate',
@@ -205,7 +205,7 @@
        // 操作信息
        operation: {
          show: true, // 显示操作列
          width: '250', // 列宽
          width: 160, // 列宽
          attr: [
            {
              title: '编辑',
@@ -258,13 +258,13 @@
    },
    updState(row) {
      let vm = this
      let text = row.status == 0 ? "启用" : "禁用";
      let text = row.states == 0 ? "启用" : "禁用";
      vm.$modal.confirm('确认要' + text + '"' + row.goodsName + '"吗?').then(function () {
        let params = Object.assign({}, row)
        params.status = row.status == 1 ? 0 : 1
        finsystenant.editcode(params).then(res => {
        params.states = row.states == 1 ? 0 : 1
        finsystenant.upcode(params).then(res => {
          if (res) {
            row.status = row.status === 1 ? 0 : 1
            row.states = row.states === 1 ? 0 : 1
            vm.$modal.msgSuccess(text + "成功");
            vm.search()
          }
@@ -290,19 +290,14 @@
      //   this.$message.warning('请先选择左侧机构')
      // } else {
        this.editSetting.id = null;
        this.editSetting.info = null;
        this.editSetting.title = '新增';
        this.editSetting.show = true;
      // }
    },
    showAudit(row) {
      finsystenant.editmaterial(row.id).then(res => {
        // console.log(res,'res');
        this.editSetting.id = res.id;
        this.editSetting.info = JSON.stringify(res);
        this.editSetting.title = '编辑';
        this.editSetting.show = true;
      })
      this.editSetting.id = row.id;
      this.editSetting.title = '编辑';
      this.editSetting.show = true;
    },
    // 查询table列表
    search(pageNum) {