loulijun2021
2024-05-08 e80c672ac136b3171a74b1728431b9537b6eeb7d
1. 圣沣 同步 U8 数据
已修改7个文件
758 ■■■■■ 文件已修改
src/api/ProductModel.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/myEcharts.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicSettings/contactUnitList.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kanbanManager/cj.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/materialManager/inventoryList.vue 120 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/materialManager/unitList.vue 545 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ProductModel.js
@@ -16,6 +16,22 @@
    method: 'get'
  })
}
// 计量单位组新增/编辑
export function AddUpdateTUnitGroup(data, OperType) {
  return request({
    url: 'ProductModel/AddUpdateTUnitGroup?OperType=' + OperType,
    method: 'post',
    data
  })
}
// 计量单位组删除
export function DeleteTUnitGroup(data) {
  return request({
    url: 'ProductModel/DeleteTUnitGroup',
    method: 'post',
    params: data
  })
}
// 计量单位信息列表
export function TUnitData(data) {
src/utils/myEcharts.js
@@ -327,7 +327,8 @@
        }
      }
    },
    series: [{
    series: [
      {
      name: '时间',
      type: 'line',
      smooth: false,
@@ -346,7 +347,8 @@
        }
      },
      data: dataY
    }]
    }
    ]
  }
  return option
src/views/basicSettings/contactUnitList.vue
@@ -14,11 +14,11 @@
              <div style="margin-left: 8px;">往来单位</div>
            </div>
            <div style="margin-right:10px">
              <el-tooltip v-del-tab-index class="item" effect="dark" content="新增" placement="top">
                <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />
              </el-tooltip>
            </div>
            <!--            <div style="margin-right:10px">-->
            <!--              <el-tooltip v-del-tab-index class="item" effect="dark" content="新增" placement="top">-->
            <!--                <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />-->
            <!--              </el-tooltip>-->
            <!--            </div>-->
          </div>
@@ -34,40 +34,41 @@
            :expand-on-click-node="false"
            @node-click="getTCunstomerData"
          >
            <span slot-scope="{ node, data }" class="custom-tree-node">
              <span v-if="!data.isEdit">{{ data.name }}</span>
              <span v-if="!data.isEdit">
                <el-tooltip v-del-tab-index class="item" effect="dark" content="编辑" placement="top">
                  <i
                    v-if="data.code!=='-1'"
                    class="el-icon-edit"
                    style="margin-right:10px;color: #999"
                    @click.stop="treeEditClick(node,data,'edit')"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i
                    v-if="data.code!=='-1'"
                    class="el-icon-delete"
                    style="margin-right: 4px;color: #999"
                    @click.stop="treeDeleteClick(node,data)"
                  />
                </el-tooltip>
              </span>
            </span>
            <!--            <span slot-scope="{ node, data }" class="custom-tree-node">-->
            <!--              <span v-if="!data.isEdit">{{ data.name }}</span>-->
            <!--              <span v-if="!data.isEdit">-->
            <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="编辑" placement="top">-->
            <!--                  <i-->
            <!--                    v-if="data.code!=='-1'"-->
            <!--                    class="el-icon-edit"-->
            <!--                    style="margin-right:10px;color: #999"-->
            <!--                    @click.stop="treeEditClick(node,data,'edit')"-->
            <!--                  />-->
            <!--                </el-tooltip>-->
            <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">-->
            <!--                  <i-->
            <!--                    v-if="data.code!=='-1'"-->
            <!--                    class="el-icon-delete"-->
            <!--                    style="margin-right: 4px;color: #999"-->
            <!--                    @click.stop="treeDeleteClick(node,data)"-->
            <!--                  />-->
            <!--                </el-tooltip>-->
            <!--              </span>-->
            <!--            </span>-->
          </el-tree>
        </div>
        <div
          style=" width:calc(100% - 300px);"
        >
          <div class="bodyTopButtonGroup" style="justify-content: space-between">
            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
            <div style="display: flex">
              <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=5')">导入</el-button>
              <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步往来单位</el-button>
          <div class="bodyTopButtonGroup" style="justify-content: end">
            <!--            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>-->
            <!--            <div style="display: flex">-->
            <!--              <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=5')">导入</el-button>-->
            <!--              <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步往来单位</el-button>-->
            <!--            </div>-->
            </div>
            <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步往来单位</el-button>
          </div>
          <div class="bodyTopFormGroup">
src/views/kanbanManager/cj.vue
@@ -6,7 +6,7 @@
      <div class="kb_header">
        <div class="kb_headTime" style="top: 35px;left:  20px">
          <span>永康市巨立防护用品有限公司</span>
          <span>圣沣</span>
        </div>
        <div class="kb_headTime kb_header_text" style="top: 35px;left:  765px">
src/views/materialManager/inventoryList.vue
@@ -14,18 +14,18 @@
              <div style="margin-left: 8px;">存货档案</div>
            </div>
            <div style="margin-right:10px">
              <el-tooltip v-del-tab-index class="item" effect="dark" content="新增" placement="top">
                <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />
              </el-tooltip>
            </div>
            <!--            <div style="margin-right:10px">-->
            <!--              <el-tooltip v-del-tab-index class="item" effect="dark" content="新增" placement="top">-->
            <!--                <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />-->
            <!--              </el-tooltip>-->
            <!--            </div>-->
          </div>
          <el-tree
            ref="treeLeftRef"
            style="padding: 10px;overflow: auto"
            :style="{height:(tableHeight+222)+'px'}"
            :style="{height:(tableHeight+192)+'px'}"
            :data="treeLeft"
            node-key="code"
            highlight-current
@@ -34,42 +34,44 @@
            :expand-on-click-node="false"
            @node-click="getTMaterielData"
          >
            <span slot-scope="{ node, data }" class="custom-tree-node">
              <span v-if="!data.isEdit">{{ data.name }}</span>
              <span v-if="!data.isEdit">
                <el-tooltip v-del-tab-index class="item" effect="dark" content="编辑" placement="top">
                  <i
                    v-if="data.code!=='-1'"
                    class="el-icon-edit"
                    style="margin-right:10px;color: #999"
                    @click.stop="treeEditClick(node,data,'edit')"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i
                    v-if="data.code!=='-1'"
                    class="el-icon-delete"
                    style="margin-right: 4px;color: #999"
                    @click.stop="treeDeleteClick(node,data)"
                  />
                </el-tooltip>
              </span>
            </span>
            <!--            <span slot-scope="{ node, data }" class="custom-tree-node">-->
            <!--              <span v-if="!data.isEdit">{{ data.name }}</span>-->
            <!--              <span v-if="!data.isEdit">-->
            <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="编辑" placement="top">-->
            <!--                  <i-->
            <!--                    v-if="data.code!=='-1'"-->
            <!--                    class="el-icon-edit"-->
            <!--                    style="margin-right:10px;color: #999"-->
            <!--                    @click.stop="treeEditClick(node,data,'edit')"-->
            <!--                  />-->
            <!--                </el-tooltip>-->
            <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">-->
            <!--                  <i-->
            <!--                    v-if="data.code!=='-1'"-->
            <!--                    class="el-icon-delete"-->
            <!--                    style="margin-right: 4px;color: #999"-->
            <!--                    @click.stop="treeDeleteClick(node,data)"-->
            <!--                  />-->
            <!--                </el-tooltip>-->
            <!--              </span>-->
            <!--            </span>-->
          </el-tree>
        </div>
        <div
          style=" width:calc(100% - 300px);"
        >
          <div class="bodyTopButtonGroup" style="justify-content: space-between">
            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
            <div style="display: flex">
              <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=8')">导入</el-button>
              <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步存货档案</el-button>
            </div>
          <div class="bodyTopButtonGroup" style="justify-content: end">
            <!--                      <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>-->
            <!--                      <div style="display: flex">-->
            <!--                        <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=8')">导入</el-button>-->
            <!--                        <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步存货档案</el-button>-->
            <!--                      </div>-->
            <el-button v-waves icon="el-icon-refresh-right" @click="syncERP">同步存货档案</el-button>
          </div>
          <div class="bodyTopFormGroup">
          <div class="bodyTopFormGroup" style="margin-top: 10px">
            <el-form
              ref="form"
              :model="form"
@@ -236,30 +238,30 @@
                width="160"
              />
              <el-table-column
                label="操作"
                width="120"
                fixed="right"
              >
                <template slot-scope="{row}">
                  <div class="operationClass">
                    <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                      <i
                        class="el-icon-edit-outline"
                        :style="{color:$store.state.settings.theme}"
                        @click="edit('edit',row)"
                      />
                    </el-tooltip>
                    <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                      <i
                        class="el-icon-delete"
                        :style="{color:$store.state.settings.theme}"
                        @click="del(row)"
                      />
                    </el-tooltip>
                  </div>
                </template>
              </el-table-column>
              <!--              <el-table-column-->
              <!--                label="操作"-->
              <!--                width="120"-->
              <!--                fixed="right"-->
              <!--              >-->
              <!--                <template slot-scope="{row}">-->
              <!--                  <div class="operationClass">-->
              <!--                    <el-tooltip class="item" effect="dark" content="编辑" placement="top">-->
              <!--                      <i-->
              <!--                        class="el-icon-edit-outline"-->
              <!--                        :style="{color:$store.state.settings.theme}"-->
              <!--                        @click="edit('edit',row)"-->
              <!--                      />-->
              <!--                    </el-tooltip>-->
              <!--                    <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">-->
              <!--                      <i-->
              <!--                        class="el-icon-delete"-->
              <!--                        :style="{color:$store.state.settings.theme}"-->
              <!--                        @click="del(row)"-->
              <!--                      />-->
              <!--                    </el-tooltip>-->
              <!--                  </div>-->
              <!--                </template>-->
              <!--              </el-table-column>-->
            </el-table>
          </div>
@@ -743,7 +745,7 @@
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 280
        this.tableHeight = this.mainHeight - 290
        this.$refs.tableDataRef.doLayout()
      })
    },
src/views/materialManager/unitList.vue
@@ -15,9 +15,10 @@
            </div>
            <!--            <div style="margin-right:10px">-->
            <!--              <i class="el-icon-plus" style="cursor: pointer;color: #999" />-->
            <!--              <el-tooltip v-del-tab-index class="item" effect="dark" content="新增" placement="top">-->
            <!--                <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="treeAddClick('add')" />-->
            <!--              </el-tooltip>-->
            <!--            </div>-->
          </div>
          <el-tree
@@ -32,14 +33,38 @@
            :default-expand-all="true"
            :expand-on-click-node="false"
            @node-click="nodeClick"
          />
          >
            <!--            <span slot-scope="{ node, data }" class="custom-tree-node">-->
            <!--              <span v-if="!data.isEdit">{{ data.code +' '+ data.name }}</span>-->
            <!--              <span v-if="!data.isEdit">-->
            <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="编辑" placement="top">-->
            <!--                  <i-->
            <!--                    v-if="data.code!=='-1'"-->
            <!--                    class="el-icon-edit"-->
            <!--                    style="margin-right:10px;color: #999"-->
            <!--                    @click.stop="treeEditClick(node,data,'edit')"-->
            <!--                  />-->
            <!--                </el-tooltip>-->
            <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">-->
            <!--                  <i-->
            <!--                    v-if="data.code!=='-1'"-->
            <!--                    class="el-icon-delete"-->
            <!--                    style="margin-right: 4px;color: #999"-->
            <!--                    @click.stop="treeDeleteClick(node,data)"-->
            <!--                  />-->
            <!--                </el-tooltip>-->
            <!--              </span>-->
            <!--            </span>-->
          </el-tree>
        </div>
        <div style="width: calc(100% - 300px)">
          <div class="bodyTopButtonGroup">
            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="getSaveSearchUnit">同步计量单位</el-button>
          <div class="bodyTopButtonGroup" style="justify-content: end">
            <!--            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>-->
            <el-button v-waves icon="el-icon-refresh" @click="getSaveSearchUnit">同步计量单位</el-button>
          </div>
          <div class="elTableDiv">
@@ -66,32 +91,26 @@
                prop="code"
                label="计量单位编码"
                sortable="custom"
              >
                <template slot-scope="{row}">
                  {{ row.isGroup === '0' ? row.code :(!isMainUnitHidden?row.code:'') }}
                </template>
              </el-table-column>
              />
              <el-table-column
                prop="name"
                label="计量单位名称"
                sortable="custom"
              />
              <el-table-column
                v-if="!isMainUnitHidden"
                prop="isMainUnit"
                label="主计量"
                sortable="custom"
              >
                <template slot-scope="{row}">
                  {{ row.isMainUnit === '1' ? '是' : '否' }}
                </template>
              </el-table-column>
              <el-table-column
                v-if="!isMainUnitHidden"
                prop="changeRate"
                label="换算率"
                sortable="custom"
              />
              <!--              <el-table-column-->
              <!--                prop="isMainUnit"-->
              <!--                label="主计量"-->
              <!--                sortable="custom"-->
              <!--              >-->
              <!--                <template slot-scope="{row}">-->
              <!--                  {{ row.isMainUnit === '1' ? '是' : '否' }}-->
              <!--                </template>-->
              <!--              </el-table-column>-->
              <!--              <el-table-column-->
              <!--                prop="changeRate"-->
              <!--                label="换算率"-->
              <!--                sortable="custom"-->
              <!--              />-->
              <!--              <el-table-column-->
              <!--                prop="data_sources"-->
@@ -108,31 +127,31 @@
                label="创建时间"
                sortable="custom"
              />
              <el-table-column
                label="操作"
                width="120"
                fixed="right"
              >
                <template slot-scope="{row}">
                  <div class="operationClass">
                    <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                      <i
                        class="el-icon-edit-outline"
                        :style="{color:$store.state.settings.theme}"
                        @click="edit('edit',row)"
                      />
                    </el-tooltip>
              <!--              <el-table-column-->
              <!--                label="操作"-->
              <!--                width="120"-->
              <!--                fixed="right"-->
              <!--              >-->
              <!--                <template slot-scope="{row}">-->
              <!--                  <div class="operationClass">-->
              <!--                    <el-tooltip class="item" effect="dark" content="编辑" placement="top">-->
              <!--                      <i-->
              <!--                        class="el-icon-edit-outline"-->
              <!--                        :style="{color:$store.state.settings.theme}"-->
              <!--                        @click="edit('edit',row)"-->
              <!--                      />-->
              <!--                    </el-tooltip>-->
                    <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                      <i
                        class="el-icon-delete"
                        :style="{color:$store.state.settings.theme}"
                        @click="del(row)"
                      />
                    </el-tooltip>
                  </div>
                </template>
              </el-table-column>
              <!--                    <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">-->
              <!--                      <i-->
              <!--                        class="el-icon-delete"-->
              <!--                        :style="{color:$store.state.settings.theme}"-->
              <!--                        @click="del(row)"-->
              <!--                      />-->
              <!--                    </el-tooltip>-->
              <!--                  </div>-->
              <!--                </template>-->
              <!--              </el-table-column>-->
            </el-table>
          </div>
          <!--分页-->
@@ -151,6 +170,7 @@
    </div>
    <!--    单位明细-->
    <el-dialog
      v-el-drag-dialog
      :title="operation==='add'?'新增':'编辑'"
@@ -161,145 +181,145 @@
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form
        ref="dialogForm"
        inline
        :rules="dialogFormRules"
        :model="dialogForm"
        label-width="120px"
        style="display: flex;justify-content: space-between;align-content: flex-end"
      <!--      <el-form-->
      <!--        ref="dialogForm"-->
      <!--        inline-->
      <!--        :rules="dialogFormRules"-->
      <!--        :model="dialogForm"-->
      <!--        label-width="120px"-->
      <!--        style="display: flex;justify-content: space-between;align-content: flex-end"-->
      <!--      >-->
      <!--        <el-form-item :label="dialogForm.tunittype==='S'? '计量单位名称':'计量单位组名称'" prop="unitname">-->
      <!--          <el-input v-model="dialogForm.unitname" style="width: 200px" />-->
      <!--        </el-form-item>-->
      <!--        <el-form-item v-if="dialogForm.tunittype==='M'">-->
      <!--          <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="tableDataDialogAdd">新增行-->
      <!--          </el-button>-->
      <!--        </el-form-item>-->
      <!--      </el-form>-->
      <el-button v-waves style="margin-bottom: 10px" type="primary" icon="el-icon-circle-plus-outline" @click="tableDataDialogAdd">新增行
      </el-button>
      <el-table
        ref="tableDataDialogRef"
        class="tableFixed"
        :data="tableDataDialog"
        row-class-name="custom-row"
        height="400"
        border
        :style="{width: 100+'%',height:'400px',}"
        highlight-current-row
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
      >
        <el-form-item :label="dialogForm.tunittype==='S'? '计量单位名称':'计量单位组名称'" prop="unitname">
          <el-input v-model="dialogForm.unitname" style="width: 200px" />
        </el-form-item>
        <el-form-item v-if="dialogForm.tunittype==='M'">
          <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="tableDataDialogAdd">新增行
          </el-button>
        </el-form-item>
      </el-form>
      <div v-if="dialogForm.tunittype==='M'">
        <el-table
          ref="tableDataDialogRef"
          class="tableFixed"
          :data="tableDataDialog"
          row-class-name="custom-row"
          height="400"
          border
          :style="{width: 100+'%',height:'400px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
        <el-table-column
          type="index"
          width="50"
          fixed
          label="序号"
        />
        <el-table-column
          prop="unitname"
          label="计量单位名称"
        >
          <template slot-scope="{row}">
            <el-input
              v-if="row.isVisible===1"
              v-model="row.unitname"
              placeholder="请输入"
            />
            <div v-else> {{ row.unitname }}</div>
          </template>
          <el-table-column
            type="index"
            width="50"
            fixed
            label="序号"
          />
          <el-table-column
            prop="unitname"
            label="计量单位名称"
          >
            <template slot-scope="{row}">
              <el-input
                v-if="row.isVisible===1"
                v-model="row.unitname"
                placeholder="请输入"
        </el-table-column>
        <el-table-column
          label="主计量"
          prop="checkboxSelected"
        >
          <template slot-scope="{row}">
            <el-select
              v-if="row.isVisible===1"
              v-model="row.checkboxSelected"
              :popper-append-to-body="false"
              :disabled="row.checkboxSelected==='1'"
              placeholder="请选择"
              filterable
              @change="val=>checkboxSelectedChange(val,row)"
            >
              <el-option
                v-for="item in checkboxSelectedArr"
                :key="item.code"
                :label="item.name"
                :value="item.code"
              />
              <div v-else> {{ row.unitname }}</div>
            </template>
            </el-select>
            <div v-else> {{ row.checkboxSelected === '1' ? '是' : '否' }}</div>
          </template>
        </el-table-column>
          </el-table-column>
          <el-table-column
            label="主计量"
            prop="checkboxSelected"
          >
            <template slot-scope="{row}">
              <el-select
                v-if="row.isVisible===1"
                v-model="row.checkboxSelected"
                :popper-append-to-body="false"
                :disabled="row.checkboxSelected==='1'"
                placeholder="请选择"
                filterable
                @change="val=>checkboxSelectedChange(val,row)"
              >
                <el-option
                  v-for="item in checkboxSelectedArr"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
        <el-table-column
          prop="changeRate"
          label="换算率"
        >
          <template slot-scope="{row}">
            <el-input
              v-if="row.isVisible===1"
              v-model="row.changeRate"
              :disabled="row.checkboxSelected==='1'"
              placeholder="请输入"
              oninput="value=value.replace(/[^0-9.]/g,'')"
            />
            <div v-else> {{ row.changeRate }}</div>
          </template>
        </el-table-column>
        <el-table-column
          prop="rateDescription"
          label="换算说明"
        />
        <el-table-column
          label="操作"
          width="120"
          fixed="right"
        >
          <template slot-scope="{row}">
            <div class="operationClass">
              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                <i
                  v-if="row.isVisible===0&&tableDataDialog.filter(i=>i.isVisible===1).length===0"
                  class="el-icon-edit-outline"
                  :style="{color:$store.state.settings.theme}"
                  @click="tableDataDialogEdit(row)"
                />
              </el-select>
              <div v-else> {{ row.checkboxSelected === '1' ? '是' : '否' }}</div>
            </template>
          </el-table-column>
              </el-tooltip>
              <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                <i
                  v-if="row.isVisible===0&&tableDataDialog.filter(i=>i.isVisible===1).length===0"
                  class="el-icon-delete"
                  :style="{color:$store.state.settings.theme}"
                  @click="tableDataDialogDel(row)"
                />
              </el-tooltip>
              <el-tooltip class="item" effect="dark" content="保存" placement="top">
                <i
                  v-if="row.isVisible===1"
                  class="el-icon-circle-check"
                  style="cursor:pointer;"
                  :style="{color:$store.state.settings.theme}"
                  @click="tableDataDialogSave(row)"
                />
              </el-tooltip>
            </div>
          </template>
        </el-table-column>
          <el-table-column
            prop="changeRate"
            label="换算率"
          >
            <template slot-scope="{row}">
              <el-input
                v-if="row.isVisible===1"
                v-model="row.changeRate"
                :disabled="row.checkboxSelected==='1'"
                placeholder="请输入"
                oninput="value=value.replace(/[^0-9.]/g,'')"
              />
              <div v-else> {{ row.changeRate }}</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="rateDescription"
            label="换算说明"
          />
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i
                    v-if="row.isVisible===0&&tableDataDialog.filter(i=>i.isVisible===1).length===0"
                    class="el-icon-edit-outline"
                    :style="{color:$store.state.settings.theme}"
                    @click="tableDataDialogEdit(row)"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i
                    v-if="row.isVisible===0&&tableDataDialog.filter(i=>i.isVisible===1).length===0"
                    class="el-icon-delete"
                    :style="{color:$store.state.settings.theme}"
                    @click="tableDataDialogDel(row)"
                  />
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="保存" placement="top">
                  <i
                    v-if="row.isVisible===1"
                    class="el-icon-circle-check"
                    style="cursor:pointer;"
                    :style="{color:$store.state.settings.theme}"
                    @click="tableDataDialogSave(row)"
                  />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
@@ -315,6 +335,39 @@
      </span>
    </el-dialog>
    <!--   单位类别新增修改-->
    <el-dialog
      v-el-drag-dialog
      :title="operation==='add'?'新增':'编辑'"
      :visible.sync="dialogClassVisible"
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      @closed="handleClassClose"
      @close="handleClassClose"
    >
      <el-form ref="dialogClassForm" inline :rules="dialogClassFormRules" :model="dialogClassForm" label-width="110px">
        <el-form-item label="单位类型编码" prop="code">
          <el-input v-model="dialogClassForm.code" :disabled="operation!=='add'" style="width: 200px" />
        </el-form-item>
        <el-form-item label="单位类型名称" prop="name">
          <el-input v-model="dialogClassForm.name" style="width: 200px" />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button v-waves @click="dialogVisibleClassCancel">取 消</el-button>
          <el-button
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
            :disabled="$store.state.app.buttonIsDisabled"
            @click="dialogVisibleClassConfirm"
          >确 定</el-button>
        </div>
      </span>
    </el-dialog>
  </div>
</template>
@@ -323,7 +376,15 @@
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
import { SaveSearchUnit } from '@/api/ErpSyncMes'
import { AddUpdateTUnit, DeleteTUnit, TUnitData, TUnitGroup, TUnitGroupProject } from '@/api/ProductModel'
import {
  AddUpdateTUnit,
  AddUpdateTUnitGroup,
  DeleteTUnit, DeleteTUnitGroup,
  TUnitData,
  TUnitGroup,
  TUnitGroupProject
} from '@/api/ProductModel'
import { validateCode } from '@/utils/global'
export default {
  name: 'Zzjg',
@@ -375,7 +436,22 @@
        { code: '1', name: '是' }
      ],
      isMainUnitHidden: true
      isMainUnitHidden: true,
      dialogClassVisible: false,
      dialogClassForm: {
        code: '', // 单位类型编码
        name: '', // 单位名称名称
        OperType: ''// OperType
      },
      dialogClassFormRules: {
        code: [
          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
        ],
        name: [
          { required: true, message: '请输单位类型名称', trigger: ['blur', 'change'] }
        ]
      }
    }
  },
@@ -402,14 +478,9 @@
    async getTUnitGroup(code) {
      const { data: res } = await TUnitGroup()
      this.treeLeft = [
        {
          code: '', name: '全部', children: [
            { code: 'S', name: '单计量' },
            { code: 'M', name: '多计量', children: res }
          ]
        }
      ]
      this.treeLeft = []
      this.treeLeft.push({ code: '', name: '全部', children: res })
      this.$nextTick(() => {
        this.$refs.treeLeftRef.setCurrentKey(code)
      })
@@ -470,11 +541,11 @@
      }
    },
    add(operation) {
      if (this.$refs.treeLeftRef.getCurrentKey() === 'S' || this.$refs.treeLeftRef.getCurrentKey() === 'M') {
        this.dialogForm.tunittype = this.$refs.treeLeftRef.getCurrentKey()
      } else {
        return this.$message.error('请先选择树上的单计量或多计量!')
      }
      // if (this.$refs.treeLeftRef.getCurrentKey() === 'S' || this.$refs.treeLeftRef.getCurrentKey() === 'M') {
      //   this.dialogForm.tunittype = this.$refs.treeLeftRef.getCurrentKey()
      // } else {
      //   return this.$message.error('请先选择树上的单计量或多计量!')
      // }
      this.operation = operation
      this.dialogVisible = true
      this.dialogForm.OperType = 'Add'
@@ -683,7 +754,87 @@
        this.tableHeight = this.mainHeight - 220
        this.$refs.tableDataRef.doLayout()
      })
    },
    treeEditClick(node, data, operation) {
      this.dialogClassForm.code = data.code
      this.dialogClassForm.name = data.name
      this.dialogClassForm.OperType = 'Update'
      this.operation = operation
      this.dialogClassVisible = true
    },
    treeDeleteClick(node, data) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteTUnitGroup({ tunitgroupcode: data.code }).then(res => {
          if (res.code === '200') {
            this.$notify.success('删除成功!')
            this.handleGetApi('')
          }
        })
      }).catch(() => {
        this.$notify.info('已取消删除')
      })
    },
    treeAddClick(operation) {
      this.operation = operation
      this.dialogClassVisible = true
      this.dialogClassForm.OperType = 'Add'
    },
    handleClassClose() {
      this.dialogClassForm.code = ''
      this.dialogClassForm.name = ''
      this.$refs.dialogClassForm.clearValidate()
    },
    dialogVisibleClassCancel() {
      this.dialogClassVisible = false
    },
    dialogVisibleClassConfirm() {
      this.$refs.dialogClassForm.validate(valid => {
        if (valid) {
          const data = [{
            code: this.dialogClassForm.code,
            name: this.dialogClassForm.name,
            group: '',
            description: ''
          }]
          AddUpdateTUnitGroup(data, this.dialogClassForm.OperType).then(res => {
            if (res.code === '200') {
              this.$notify.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.dialogClassVisible = false
              this.$store.state.app.buttonIsDisabled = false
              this.handleGetApi('')
            } else {
              this.$store.state.app.buttonIsDisabled = false
              this.$notify.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
            }
          })
        }
      })
    }
  }
}
</script>
<style scoped lang="scss">
.custom-tree-node {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  padding-right: 8px;
}
//::v-deep .el-checkbox__label {
//  width: 55px;
//}
//
.el-icon-plus:hover, .el-icon-edit:hover, .el-icon-delete:hover {
  color: #000 !important;
}
</style>
vue.config.js
@@ -52,8 +52,8 @@
    },
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        // target: 'http://192.168.18.245:8000', // 请求的第三⽅接⼝地址    客户
        target: 'http://121.196.36.24:8032', // 请求的第三⽅接⼝地址       本地开发服务器
        target: 'http://192.168.1.237:8000', // 请求的第三⽅接⼝地址    客户
        // target: 'http://121.196.36.24:8032', // 请求的第三⽅接⼝地址       本地开发服务器
        changeOrigin: true, // 请求跨域时,需 配置此项
        pathRewrite: { // 路径重写,替换target中的请求地址
          ['^' + process.env.VUE_APP_BASE_API]: '/api/'