瀏覽代碼

服务项目菜单完成

caojunjie 2 年之前
父節點
當前提交
8eb01f6397

+ 97 - 0
src/api/basicData/ServiceLtems.js

@@ -0,0 +1,97 @@
+import request from '@/router/axios';
+
+// 服务项目列表
+export const projectGoodsList = (current, size, params) => {
+    return request({
+        url: '/api/blade-client/projectGoods/list',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
+// 服务项目 设备 详情
+export const projectGoodsDetail = (data) => {
+  return request({
+    url: '/api/blade-client/projectGoods/detail',
+    method: 'get',
+    params: data
+  })
+}
+// 服务项目 设备 保存
+export const projectGoodsSubmit = (data) => {
+  return request({
+    url: '/api/blade-client/projectGoods/submit',
+    method: 'post',
+    data: data
+  })
+}
+// 服务项目 设备 删除
+export const projectGoodsRemove = (data) => {
+  return request({
+    url: '/api/blade-client/projectGoods/remove',
+    method: 'post',
+    params: data
+  })
+}
+// 服务项目 类别 列表
+export const goodsTypeProjectList = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/page',
+    method: 'get',
+    params: data
+  })
+}
+// 服务项目 类别 详情
+export const goodsTypeProjectDetail = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/detail',
+    method: 'get',
+    params: data
+  })
+}
+// 服务项目 类别 所有类别
+//
+export const goodsTypeProjectListAll = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/listAll',
+    method: 'get',
+    params: data
+  })
+}
+// 服务项目 类别 保存
+export const goodsTypeProjectSubmit = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/submit',
+    method: 'post',
+    data: data
+  })
+}
+// 服务项目 类别 删除
+export const goodsTypeProjectRemove = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/remove',
+    method: 'post',
+    params: {
+      ids:data
+    }
+  })
+}
+// 服务项目 类别 类别列表树
+export const goodsTypeProjectTree = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/tree',
+    method: 'get',
+    params: data
+  })
+}
+// 服务项目 类别 懒加载类别树形结构
+export const goodsTypeProjectLazyTree = (data) => {
+  return request({
+    url: '/api/blade-client/goodsTypeProject/lazy-tree',
+    method: 'get',
+    params: data
+  })
+}

+ 109 - 0
src/components/goodsTypeQX/configuration/mainList.json

@@ -0,0 +1,109 @@
+{
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "stripe": true,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
+  "tree": true,
+  "selection": true,
+  "viewBtn": true,
+  "menuWidth": 400,
+  "column": [
+    {
+      "label": "类别名称",
+      "prop": "cname",
+      "search": true,
+      "index": 1,
+      "width": 400,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入类别名称",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "创建时间",
+      "prop": "createTime",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "search": true,
+      "searchRange":true,
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 2,
+      "width": 250,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入创建时间",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "上级类型",
+      "prop": "parentId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "props": {
+        "label": "title",
+        "value": "value"
+      },
+      "rules": [{
+        "required": false,
+        "message": "请选择上级机构",
+        "trigger": "click"
+      }]
+    },
+    {
+      "label": "排序",
+      "prop": "sort",
+      "type": "number",
+      "index": 5,
+      "width": 200,
+      "rules": [{
+        "required": true,
+        "message": "请输入排序",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "状态",
+      "type": "select",
+      "prop": "status",
+      "search": true,
+      "index": 4,
+      "width": 200,
+      "value":0,
+      "dicData": [{
+        "label": "正常",
+        "value": 0
+      }, {
+        "label": "关闭",
+        "value": 1
+      }],
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入状态",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "cell": true,
+      "overHidden": true
+    }
+  ]
+}

+ 211 - 0
src/components/goodsTypeQX/index.vue

@@ -0,0 +1,211 @@
+<template>
+    <avue-crud
+      :option="option"
+      :data="dataList"
+      ref="crud"
+      v-model="form"
+      :page.sync="page"
+      @row-del="rowDel"
+      @row-update="rowUpdate"
+      :before-open="beforeOpen"
+      :before-close="beforeClose"
+      @row-save="rowSave"
+      @search-change="searchChange"
+      @search-reset="searchReset"
+
+      @selection-change="selectionChange"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+      @refresh-change="refreshChange"
+      @on-load="onLoad"
+      @tree-load="treeLoad"
+    >
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          icon="el-icon-circle-plus-outline"
+          size="small"
+          @click.stop="handleAdd(scope.row, scope.index)"
+          >新增子项
+        </el-button>
+      </template>
+    </avue-crud>
+</template>
+
+<script>
+import option from "./configuration/mainList.json";
+import {
+  customerList,
+  typeSave,
+  detail,
+  deleteDetails,
+  getTreeList
+} from "@/api/basicData/commodityCategory";
+import {
+    goodsTypeProjectLazyTree,
+    goodsTypeProjectList,
+    goodsTypeProjectRemove,
+    goodsTypeProjectSubmit
+} from "@/api/basicData/ServiceLtems";
+
+export default {
+  name: "customerInformation",
+  data() {
+    return {
+      form: {},
+      option: option,
+      parentId: 0,
+      dataList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      query: {}
+    };
+  },
+  created() {
+      // 获取懒加载列表
+    goodsTypeProjectLazyTree({ parentId: 0 }).then(res => {
+      const column = this.findObject(this.option.column, "parentId");
+      column.dicData = res.data.data;
+    });
+    this.option.height = window.innerHeight - 500;
+  },
+  methods: {
+    //删除列表后面的删除按钮触发触发(row, index, done)
+    rowDel(row, index, done) {
+        if(row.hasChildren) return this.$message.warning('请先删除子项');
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return goodsTypeProjectRemove(row.id);
+        })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        });
+    },
+    //修改时的修改按钮点击触发
+    rowUpdate(row, index, done, loading) {
+      typeSave(row).then(
+        () => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        },
+        error => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
+    //新增修改时保存触发
+    rowSave(row, done, loading) {
+     goodsTypeProjectSubmit(row).then(res => {
+        this.page.currentPage = 1;
+        this.onLoad(this.page, { parentId: 0 });
+        done();
+      });
+    },
+    //新增子项触发
+    handleAdd(row) {
+      this.parentId = row.id;
+      const column = this.findObject(this.option.column, "parentId");
+      this.$set(this.form, "parentId", row.id);
+      column.addDisabled = true;
+      this.$refs.crud.rowAdd();
+    },
+    //新增子项和新增触发查询所有
+    beforeOpen(done, type) {
+      if (["add", "edit"].includes(type)) {
+      }
+      if (["edit", "view"].includes(type)) {
+        detail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    //点击新增时触发
+    beforeClose(done) {
+      this.parentId = "";
+      const column = this.findObject(this.option.column, "parentId");
+      column.value = "";
+      column.addDisabled = false;
+      done();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    searchReset() {
+      console.log("1");
+    },
+    selectionChange() {
+      console.log("1");
+    },
+    currentChange() {
+      console.log("1");
+    },
+    sizeChange() {
+      console.log("1");
+    },
+    refreshChange() {
+      console.log("1");
+    },
+      // 获取数据
+    onLoad(page, params = {}) {
+      const { createTimeA } = this.query;
+      let values = {
+        ...params,
+        size: this.page.pageSize,
+        current: this.page.currentPage
+      };
+      if (createTimeA) {
+        values = {
+          ...params,
+          createTime: createTimeA[0] + " 00:00:00",
+          endTime: createTimeA[1] + " 23:59:59",
+          size: this.page.pageSize,
+          current: this.page.currentPage,
+          ...this.query
+        };
+        values.createTimeA = null;
+      }
+      values.parentId = 0;
+      goodsTypeProjectList(values).then(res => {
+        this.dataList = res.data.data.records;
+        this.page.total = res.data.data.total;
+      });
+    },
+    //树桩列点击展开触发
+    treeLoad(tree, treeNode, resolve) {
+      const parentId = tree.id;
+      goodsTypeProjectList({ parentId: parentId, size: 10000 }).then(res => {
+        resolve(res.data.data.records);
+      });
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.8vh;
+}
+</style>

+ 571 - 0
src/views/ServiceLtems/detailsPage.vue

@@ -0,0 +1,571 @@
+<template>
+  <div>
+    <div class="borderless">
+      <div class="customer-head">
+        <div class="customer-back">
+          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList">
+            返回列表
+          </el-button>
+        </div>
+        <div class="add-customer-btn">
+          <el-button type="primary" size="small" @click="editCustomer">
+            保存数据
+          </el-button>
+        </div>
+      </div>
+      <trade-card title="基础资料" style="margin-top: 60px">
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+          <template slot="goodsTypeId">
+            <div style="display:flex;">
+              <avue-cascader :emit-path="false" check-strictly :show-all-levels="false" v-model="form.goodsTypeId" placeholder="请选择商品类型" :dic="goodsTypeList" :props="props"></avue-cascader>
+              <!--<i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px" @click="goodsTypeVisible = true"></i>-->
+            </div>
+          </template>
+          <template slot="unit">
+            <div style="display:flex;">
+              <avue-select v-model="form.unit" filterable placeholder="请选择单位" :dic="unitList" :props="props2"></avue-select>
+              <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px" @click="$refs.dictbiz.open()"></i>
+            </div>
+          </template>
+          <template slot="whether">
+            <el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>
+          </template>
+            <template slot="whetherIntegral">
+                <el-switch v-model="form.whetherIntegral" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherIntegralChange"/>
+            </template>
+        </avue-form>
+      </trade-card>
+      <!--<trade-card title="库存管理" v-loading="loadingBtn">-->
+      <!--  <avue-crud ref="crud" :option="optionList" :data="data" :table-loading="loading" @saveColumn="saveColumn"-->
+      <!--             @resetColumn="resetColumn" :cell-style="cellStyle" @row-update="rowUpdate"  @row-save="rowSave">-->
+      <!--    &lt;!&ndash;<template slot="headerSerial">&ndash;&gt;-->
+      <!--    &lt;!&ndash;  <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"&ndash;&gt;-->
+      <!--    &lt;!&ndash;             :disabled="detailData.status == 1" circle></el-button>&ndash;&gt;-->
+      <!--    &lt;!&ndash;</template>&ndash;&gt;-->
+      <!--    <template slot="storageIdHeader" slot-scope="{column}">-->
+      <!--      <span style="color: #409EFF;cursor: pointer" @click.stop="storageVisible = true">仓库</span>-->
+      <!--    </template>-->
+      <!--    <template slot="menu" slot-scope="{ row, index }">-->
+      <!--      <el-button size="small" type="text" @click="rowCell(row, index)">{{ row.$cellEdit ? "保存" : "修改" }}-->
+      <!--      </el-button>-->
+      <!--      &lt;!&ndash;<el-button size="small" type="text" @click="rowDel(row, index)">删除</el-button>&ndash;&gt;-->
+      <!--    </template>-->
+      <!--  </avue-crud>-->
+      <!--</trade-card>-->
+      <containerTitle title="主图附件"></containerTitle>
+      <c-upload :data="filesList" display deleteUrl="/api/blade-client/goodsfiles/delete" :enumerationValue="160" />
+      <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog"
+        width="80%" append-to-body @closed="goodsTypeClosed">
+        <span>
+          <!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px"></avue-form> -->
+          <goods-type></goods-type>
+        </span>
+        <div class="avue-dialog__footer">
+          <el-button @click="goodsTypeVisible = false" size="mini">取 消</el-button>
+          <el-button @click="saveGoodstype" type="primary" size="mini">确 定</el-button>
+        </div>
+      </el-dialog>
+      <el-dialog title="添加仓库" v-dialogDrag :visible.sync="storageVisible" class="avue-dialog avue-dialog--top" width="30%" append-to-body @closed="storageClosed">
+        <span>
+          <avue-form :key="reload2" ref="storage" v-model="form3" :option="option3" style="margin-top:20px"></avue-form>
+        </span>
+        <div class="avue-dialog__footer">
+          <el-button @click="storageVisible = false" size="mini">取 消</el-button>
+          <el-button @click="savestorage" type="primary" size="mini">确 定</el-button>
+        </div>
+      </el-dialog>
+      <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts"></dictbiz-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getGoodstype, getDetails, goodsTypesubmit, getStoragetype, submit, itemRemove, disabled, getStoragelist, storagesubmit } from "@/api/basicData/product";
+import { optionList } from "./js/optionList";
+import goodsType from '@/components/goodsType/index'
+import {getList} from "@/api/basicData/client";
+import {
+    goodsTypeProjectTree,
+    projectGoodsDetail, projectGoodsSubmit
+} from "@/api/basicData/ServiceLtems";
+import {getList as getListpp } from "@/api/tirePartsMall/basicData/brandPage";
+export default {
+  name: "index",
+  data() {
+    return {
+      loadingBtn: false,
+      goodsTypeVisible: false,
+      storageVisible: false,
+      form: {},
+      form2: {},
+      form3: {},
+      data: [],
+      option: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "名称",
+            prop: "cname",
+            span: 16,
+            rules: [{
+              required: true,
+              message: "请输入名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "商品类型",
+            prop: "goodsTypeId",
+            type: 'select',
+            dicData: [],
+            props: {
+              label: 'detailedAddress',
+              value: 'detailedAddress'
+            },
+            filterable: true,
+            span: 8,
+            rules: [{
+              required: true,
+              message: "请输入商品类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "单位",
+            prop: "unit",
+            type: "select",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
+            span: 8,
+            rules: [{
+              required: true,
+              message: "请输入通知标题",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "参考售价",
+            prop: "price",
+            type: 'number',
+            minRows: 0,
+            controls: false,
+            span: 8,
+            rules: [{
+              required: true,
+              message: "请输入通知标题",
+              trigger: "blur"
+            }]
+          },
+            {
+                label: "厂家",
+                prop: "corpId",
+                type: "select",
+                props: {
+                    label: "cname",
+                    value: "id"
+                },
+                dicData: [],
+                span: 8,
+            },
+            {
+                label: "规格",
+                prop: "specs",
+                span: 8,
+            },
+            {
+                label: "品牌",
+                prop: "brand",
+                type: "select",
+                props: {
+                    label: "cname",
+                    value: "id"
+                },
+                dicData: [],
+                span: 8,
+            },
+          {
+            label: "备注",
+            prop: "remarks",
+            type: "textarea",
+            minRows: 3,
+            span: 24,
+          }
+        ]
+      },
+      option2: {
+        menuBtn: false,
+        labelWidth: 80,
+        column: [
+          {
+            label: "分类名称",
+            prop: "cname",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 24,
+          },
+          {
+            label: "上级类型",
+            prop: "parentId",
+            dicData: [],
+            type: "tree",
+            props: {
+              label: "title",
+              value: "id"
+            },
+            span: 24,
+          }
+        ]
+      },
+      option3: {
+        menuBtn: false,
+        labelWidth: 80,
+        column: [
+          {
+            label: "仓库名称",
+            prop: "cname",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 24,
+          },
+          {
+            label: "仓库编码",
+            prop: "code",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 24,
+          },
+          {
+            label: "上级类型",
+            prop: "parentId",
+            dicData: [],
+            type: "tree",
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            span: 24,
+          }
+        ]
+      },
+      filesList: [],
+      props: {
+        label: 'title',
+        value: 'value'
+      },
+      props2: {
+        label: 'dictValue',
+        value: 'dictValue'
+      },
+      goodsTypeList: [],
+        // 单位数据
+      unitList: [],
+      optionList: {},
+        // admin 权限
+        roleNameqx:[]
+    };
+  },
+  components: {
+    goodsType
+  },
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  async created() {
+    this.optionList = await this.getColumnData(
+      this.getColumnName(218),
+      optionList
+    );
+    if (this.detailData.id) {
+      this.projectGoodsDetailfun(this.detailData.id);
+    }
+    if (this.detailData.status == 1) {
+      this.option.disabled = true;
+    }
+
+    // 获取供应商数据
+      this.getListfun()
+
+    this.getAllWorkDicts()
+  },
+  methods: {
+      // 获取供应商数据
+      getListfun(){
+          getList(1,20, {corpType:'GYS'}).then(res=>{
+              console.log(res.data)
+              this.findObject(this.option.column, "corpId").dicData = res.data.data.records
+          })
+      },
+      // 获取下拉数据
+    getAllWorkDicts() {
+        // 获取商品类型数据
+      goodsTypeProjectTree().then(res => {
+        this.goodsTypeList = res.data.data;
+        this.findObject(this.option2.column, "parentId").dicData = res.data.data;
+      });
+      getStoragelist().then(res => {
+        this.findObject(this.optionList.column, "storageId").dicData = res.data;
+        this.findObject(this.option3.column, "parentId").dicData = res.data;
+      });
+      // 单位
+      this.getWorkDicts("unit").then(res => {
+        this.unitList = res.data.data;
+      });
+      // 获取品牌数据
+        getListpp().then(res=>{
+            this.findObject(this.option.column, "brand").dicData = res.data.data.records
+        })
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    addRow() {
+      this.data.push({$cellEdit: true})
+    },
+    rowCell(row, index) {
+      this.$refs.crud.rowCell(row, index)
+    },
+    rowSave(form, done) {
+      done()
+    },
+    rowUpdate(form, index, done) {
+      done()
+    },
+    rowDel(row, index) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          itemRemove({ids: row.id}).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.data.splice(index, 1);
+          });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.data.splice(index, 1);
+        }
+      });
+    },
+    disabled(val) {
+      disabled({ id: this.form.id, status: val }).then(res => {
+        this.projectGoodsDetailfun(this.detailData.id);
+      })
+    },
+    saveGoodstype() {
+      this.$refs["goodsType"].validate((valid, done) => {
+        done();
+        if (valid) {
+          goodsTypesubmit({ ...this.form2, status: 0 }).then(res => {
+            this.getAllWorkDicts()
+          })
+          this.goodsTypeVisible = false
+        } else {
+          return false;
+        }
+      });
+    },
+    savestorage() {
+      // this.$refs["storage"].validate((valid, done) => {
+      //   done();
+      //   if (valid) {
+      //     storagesubmit({ ...this.form3, status: 0 }).then(res => {
+      //       this.getAllWorkDicts()
+      //     })
+      //     this.storageVisible = false
+      //   } else {
+      //     return false;
+      //   }
+      // });
+      this.getAllWorkDicts()
+      this.goodsTypeVisible = false
+    },
+    goodsTypeClosed() {
+      // this.reload = Math.random();
+      // this.form2 = this.$options.data().form2
+    },
+    storageClosed() {
+      this.reload2 = Math.random();
+      this.form3 = this.$options.data().form3
+    },
+    projectGoodsDetailfun(id) {
+      this.loadingBtn = true
+      projectGoodsDetail({ id: id })
+        .then(res => {
+          this.form = res.data.data;
+          this.filesList = res.data.data.projectGoodsFilesList
+          this.whetherChange(res.data.data.whether)
+        })
+        .finally(() => {
+          this.loadingBtn = false;
+        });
+    },
+      // 是否为积分商品的change事件
+      whetherIntegralChange(val){
+          console.log(val,557)
+          if (this.form.whetherIntegral == 1) {
+              // disabled:true,
+              this.findObject(this.option.column, "storeIntegral").disabled = true
+              this.findObject(this.option.column, "referenceIntegral").disabled = true
+              this.findObject(this.option.column, "salesmanIntegral").disabled = true
+              this.findObject(this.option.column, "integral").disabled = true
+
+              // 四个售价变成正整数
+              this.findObject(this.option.column, "wholesalePrice").rules[0].pattern = /^[+]{0,1}(\d+)$/
+              this.findObject(this.option.column, "repairDepotPrice").rules[0].pattern = /^[+]{0,1}(\d+)$/
+              this.findObject(this.option.column, "storePrice").rules[0].pattern = /^[+]{0,1}(\d+)$/
+              this.findObject(this.option.column, "price").rules[0].pattern = /^[+]{0,1}(\d+)$/
+
+          }else if (this.form.whetherIntegral == 0 && this.roleNameqx.indexOf('admin') != -1) {
+              this.findObject(this.option.column, "storeIntegral").disabled = false
+              this.findObject(this.option.column, "referenceIntegral").disabled = false
+              this.findObject(this.option.column, "salesmanIntegral").disabled = false
+              this.findObject(this.option.column, "integral").disabled = false
+          }
+
+      },
+      // 是否管理批次号的change事件
+    whetherChange(val){
+      console.log(val)
+      if (val == 0||val==null) {
+          this.findObject(this.optionList.column, "lotNo").hide = true
+          this.findObject(this.optionList.column, "lotNo").showColumn = false
+        } else {
+          this.findObject(this.optionList.column, "lotNo").hide = false
+          this.findObject(this.optionList.column, "lotNo").showColumn = true
+        }
+    },
+    //修改提交触发
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          this.loadingBtn = true;
+          projectGoodsSubmit({
+            ...this.form,
+            projectGoodsFilesList:this.filesList
+          }).then(res => {
+            this.$message.success("保存成功");
+            this.form = res.data.data;
+            this.filesList = res.data.data.projectGoodsFilesList;
+            setTimeout(() => {
+              this.backToList()
+            }, 1000);
+          }).finally(() => {
+            this.loadingBtn = false;
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(218),
+        this.optionList
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.optionList = optionList;
+      const inSave = await this.delColumnData(
+        this.getColumnName(218),
+        optionList
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.getAllWorkDicts()
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+::v-deep .el-dialog__body {
+  padding: 0px 20px 15px 20px;
+}
+
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+
+.img-form ::v-deep .el-form-item {
+  height: 150px;
+  line-height: 150px;
+  margin-bottom: 8px !important;
+}
+
+.img-form ::v-deep .avue-upload__icon {
+  font-size: 20px;
+  width: 150px;
+  height: 150px;
+  line-height: 150px;
+}
+
+::v-deep .el-table .cell {
+  padding: 0 2px !important;
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+  left: -1px;
+}
+
+.addressTabs {
+  display: flex;
+  justify-content: center;
+
+  span {
+    width: 100px;
+    font-size: 18px;
+    font-weight: 600;
+    text-align: center;
+  }
+}
+</style>

+ 671 - 0
src/views/ServiceLtems/index.vue

@@ -0,0 +1,671 @@
+<template>
+  <div>
+    <basic-container v-show="show" class="page-crad">
+      <el-row>
+        <el-col :span="4">
+          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:82vh;">
+            <template slot="addBtn">
+              <i class="el-icon-setting" @click="goodsTypeVisible = true"
+                style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"></i>
+            </template>
+          </avue-tree>
+        </el-col>
+        <el-col :span="20">
+          <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+            @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+            @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+            @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+            <template slot="menuLeft">
+              <el-button type="primary" size="mini" @click.stop="newAdd()">新建项目
+              </el-button>
+            </template>
+            <template slot-scope="{ row, index }" slot="cname">
+              <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.cname }}
+              </span>
+            </template>
+            <template slot-scope="{ row, index }" slot="menu">
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
+                <i class="tradingIcon icon-del" @click.stop="rowDel(row, index)" />
+              </el-tooltip>
+            </template>
+          </avue-crud>
+        </el-col>
+      </el-row>
+    </basic-container>
+
+    <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
+
+    <el-dialog title="设置商品类别" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog" width="80%"
+      append-to-body @closed="goodsTypeClosed">
+      <span>
+        <goods-typeQX></goods-typeQX>
+      </span>
+      <div class="avue-dialog__footer">
+        <el-button @click="goodsTypeVisible = false" size="mini">取 消</el-button>
+        <el-button @click="saveGoodstype" type="primary" size="mini">确 定</el-button>
+      </div>
+    </el-dialog>
+
+      <el-dialog title="导入项目" append-to-body class="el-dialogDeep" :visible.sync="productVisible" width="80%"
+                 :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods">
+          <el-row :style="{ height: rowHeight }">
+              <el-col :span="5" style="height: 100%;overflow-y: auto">
+                  <div>
+                      <el-scrollbar>
+                          <basic-container>
+                              <avue-tree :option="productOption" :data="productDataGoods" @node-click="productnodeClick" />
+                          </basic-container>
+                      </el-scrollbar>
+                  </div>
+              </el-col>
+              <el-col :span="19">
+                  <basic-container>
+                          <avue-crud ref="productCrud" :option="optionTwo" :data="productListShow" :page.sync="productPage"
+                                     :search.sync="productSearch" @selection-change="productSelection" @search-change="goodsSearch"
+                                     @current-change="productCurrent" @size-change="productSize"
+                                     @refresh-change="productRefresh" @on-load="productonLoad" :table-loading="loading"
+                                     @saveColumn="productSave" @resetColumn="productReset" :cell-style="cellStyle">
+                          <template slot="menuLeft" slot-scope="{size}">
+                              <el-tabs v-model="activeName" @tab-click="tabHandle">
+                                  <el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
+                                  <el-tab-pane label="已选定数据" name="importStaging"></el-tab-pane>
+                              </el-tabs>
+                          </template>
+                          <template slot-scope="scope" slot="menu">
+                              <el-button type="text" icon="el-icon-edit" size="small"
+                                         @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
+                                         :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                              </el-button>
+                              <el-button type="text" icon="el-icon-delete" size="small"
+                                         @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                              </el-button>
+                          </template>
+                      </avue-crud>
+                  </basic-container>
+              </el-col>
+          </el-row>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="productVisible = false">取 消</el-button>
+              <el-button type="primary" @click="importGoods">导入</el-button>
+            <!--<el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>-->
+            <!--<el-button type="primary" @click="importChoice" v-if="commodityData === true"-->
+            <!--       :disabled="tableData.length !== 1">导入</el-button>-->
+          </span>
+      </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import detailsPage from "./detailsPage";
+import { option } from "./js/optionList";
+import { optionTwo } from "./js/optionListTwo";
+import { getList, remove, getAllgoods, getGoodstype, goodsTypesubmit } from "@/api/basicData/product";
+import { getToken } from "@/util/auth";
+import goodsTypeQX from '@/components/goodsTypeQX/index'
+import billApplication from "@/components/bill/billApplication";
+import {getList as CJgetList} from "@/api/basicData/client";
+import {getList as getListpp } from "@/api/tirePartsMall/basicData/brandPage";
+import {
+    goodsTypeProjectListAll,
+    goodsTypeProjectSubmit,
+    goodsTypeProjectTree,
+    projectGoodsList, projectGoodsRemove,
+    projectGoodsSubmit
+} from "@/api/basicData/ServiceLtems";
+export default {
+  name: "index",
+  data() {
+    return {
+        // 类别的弹窗关闭开启
+      goodsTypeVisible: false,
+        // 导入项目的弹窗
+        productVisible:false,
+        // 导入项目弹窗高度
+        rowHeight: '',
+        // 产品左侧类别
+        productOption: {
+            addBtn: false,
+            menu: false,
+            size: "small",
+            props: {
+                labelText: "标题",
+                label: "title",
+                value: "value",
+            }
+        },
+        // 产品左侧是数据
+        productDataGoods:[],
+        // 产品弹窗列表
+        optionTwo:optionTwo,
+        productPage:{
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        productListShow:[],
+        // 暂存的数据
+        goodsListSave:[],
+        // 产品弹窗tabs切换
+        activeName:'searchList',
+        // 弹窗选中的数据
+        tableData:[],
+        productSearch:{},
+        // 详情列表的切换
+      show: true,
+        // 表格等待框的控制
+      loading: false,
+        // 检索数据
+      search: {},
+        // 列表左侧选择的id
+        goodsTypeId:null,
+        // 详情传的数据
+      detailData: {},
+        // 列表的数据
+      dataList: [],
+      selectionList: [],
+        // 分页数据
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+        // 类别的当地数据
+      treeData: [],
+
+      form2: {},
+      option2: {
+        menuBtn: false,
+        labelWidth: 80,
+        column: [
+          {
+            label: "分类名称",
+            prop: "cname",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 24,
+          },
+          {
+            label: "上级类型",
+            prop: "parentId",
+            dicData: [],
+            type: "tree",
+            props: {
+              label: "title",
+              value: "id"
+            },
+            span: 24,
+          }
+        ]
+      },
+
+        // 左侧类别配置
+      treeOption: {
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "value",
+        }
+      },
+    };
+  },
+  components: {
+    detailsPage,
+    goodsTypeQX,
+      billApplication
+  },
+  async created() {
+      // 初始化
+      this.rowHeight = (window.innerHeight - 130) + 'px'
+    // this.option = await this.getColumnData(this.getColumnName(217), option);
+      this.option = option
+    this.option.height = window.innerHeight - 210;
+    this.getAllWorkDicts()
+  },
+  mounted() {
+    this.$nextTick(() => {
+        // 监听浏览器高度变化,改变表格高度
+        window.onresize = () => {
+            this.rowHeight = (window.innerHeight - 130) + 'px'
+        }
+    })
+  },
+  activated() {
+    this.$refs.crud.refreshTable();
+  },
+  methods: {
+      // 获取搜索框的数据
+    getAllWorkDicts() {
+        // 获取商品名称
+      // this.getWorkDicts("label").then(res => {
+      //   this.findObject(this.option.column, "label").dicData = res.data.data;
+      // });
+      //   获取单位字典
+      this.getWorkDicts("unit").then(res => {
+        this.findObject(this.option.column, "unit").dicData = res.data.data;
+        this.findObject(this.optionTwo.column, "unit").dicData = res.data.data;
+      });
+      // 获取状态字典
+      this.getWorkDicts("goods_status").then(res => {
+        this.findObject(this.option.column, "status").dicData = res.data.data;
+        this.findObject(this.optionTwo.column, "status").dicData = res.data.data;
+      });
+      //   获取左侧数据
+      goodsTypeProjectTree().then(res => {
+        this.treeData = res.data.data;
+        // this.findObject(this.option.column, "goodsTypeId").dicData = res.data.data;
+        this.findObject(this.option2.column, "parentId").dicData = res.data.data;
+      });
+      // 获取所有类别数据
+        goodsTypeProjectListAll().then(res=>{
+            this.findObject(this.option.column, "goodsTypeId").dicData = res.data.data;
+        })
+        // 获取供应商
+        CJgetList(1,20, {corpType:'GYS'}).then(res=>{
+            this.findObject(this.option.column, "corpId").dicData = res.data.data.records
+        })
+        // 获取品牌数据
+        getListpp().then(res=>{
+            this.findObject(this.option.column, "brand").dicData = res.data.data.records
+        })
+      // this.$refs.crud.init();
+    },
+      // 设置高度
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+      // 刷新触发
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+      // 添加项目
+    newAdd() {
+        if(!this.search.goodsTypeId) {
+            return this.$message.warning('请先选中类别');
+        }
+        console.log('添加')
+        this.tableData = []
+        this.goodsListSave = []
+        // 获取产品弹窗的左侧类型
+        this.getGoodstypefun()
+        this.productVisible = true
+    },
+      // 设置产品分类的确认按钮
+    saveGoodstype() {
+      this.getAllWorkDicts()
+      this.goodsTypeVisible = false
+    },
+    goodsTypeClosed() {
+      // this.reload = Math.random();
+      // this.form2 = this.$options.data().form2
+    },
+      // 选中数据
+    nodeClick(data) {
+      this.search.goodsTypeId = data.value
+      this.page.currentPage = 1;
+      this.goodsTypeId = data.value
+      this.onLoad(this.page, this.search);
+    },
+      // 获取列表数据
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign(params, this.search));
+      data.whetherIntegral = 0
+      this.loading = true;
+      projectGoodsList(
+        page.currentPage,
+        page.pageSize,
+        data
+      )
+        .then(res => {
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+      // 详情跳转
+    editOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+          status:status
+      };
+      this.show = false;
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+      // 列表删除
+    rowDel(row, index, done) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        projectGoodsRemove({ ids: row.id }).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.onLoad(this.page, this.search);
+          }
+        });
+      });
+    },
+      // 列表保存数据
+      projectGoodsSubmitfun(obj){
+          projectGoodsSubmit(obj).then(res=>{
+              if (res.data.code == 200) {
+                  this.productVisible = false
+                  this.onLoad(this.page, this.search);
+              }else {
+                  this.$message.error(res.data.msg);
+              }
+          })
+      },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(217),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(217), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.getAllWorkDicts()
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //返回列表
+    goBack() {
+      this.detailData = this.$options.data().detailData;
+      this.show = true;
+      this.onLoad(this.page, this.search);
+    },
+
+
+      // -------------------------产品弹窗的方法---------------------------------------------------------------
+      // 产品弹窗导入
+      importGoods(){
+          // id
+          // 商品名称 cname
+          // 产品名称提取数字 cnameInt
+          // 中文描述 nameDescription
+          // 计量单位 unit
+          // 品牌 brand
+          // 规格尺寸 specs
+          // 包装单位 packgeunit
+          // 单价 price
+          // 备注(收费指示)remarks
+          // 修改人 updateUser
+          // createUser 创建人
+          // 创建时间 createTime
+          // 修改时间 updateTime
+          // 状态(0 正常 1停用) status
+          // 供应商 corpId
+          // 供应商名称 corpName
+          // 出场日期 exitDate
+          // 维修日期 maintenanceDate
+          // 来源商品id srcId
+          // 商品类型id goodsTypeId
+          // 附件集合 projectGoodsFilesList
+          // 品牌id brandId
+          if (this.goodsListSave.length > 0) {
+              console.log(this.goodsListSave,'445')
+              for (let item of this.goodsListSave) {
+                  const obj = {
+                      id:null,
+                      cname:item.cname,
+                      cnameInt:item.cnameInt,
+                      nameDescription:item.nameDescription,
+                      unit:item.unit,
+                      brand:item.brand,
+                      specs:item.specs,
+                      packgeunit:item.packgeunit,
+                      price:item.price,
+                      remarks:item.remarks,
+                      updateUser:item.updateUser,
+                      createUser:item.createUser,
+                      createTime:item.createTime,
+                      updateTime:item.updateTime,
+                      status:item.status,
+                      corpId:item.corpId,
+                      corpName:item.corpName,
+                      exitDate:item.exitDate,
+                      maintenanceDate:item.maintenanceDate,
+                      srcId:item.id,
+                      goodsTypeId:this.goodsTypeId,
+                      projectGoodsFilesList:item.filesList,
+                      brandId:item.brand,
+                  }
+                  this.projectGoodsSubmitfun(obj)
+              }
+          }else {
+              console.log('475')
+              for (let item of this.tableData) {
+                  const obj = {
+                      id:null,
+                      cname:item.cname,
+                      cnameInt:item.cnameInt,
+                      nameDescription:item.nameDescription,
+                      unit:item.unit,
+                      brand:item.brand,
+                      specs:item.specs,
+                      packgeunit:item.packgeunit,
+                      price:item.price,
+                      remarks:item.remarks,
+                      updateUser:item.updateUser,
+                      createUser:item.createUser,
+                      createTime:item.createTime,
+                      updateTime:item.updateTime,
+                      status:item.status,
+                      corpId:item.corpId,
+                      corpName:item.corpName,
+                      exitDate:item.exitDate,
+                      maintenanceDate:item.maintenanceDate,
+                      srcId:item.id,
+                      goodsTypeId:this.goodsTypeId,
+                      projectGoodsFilesList:item.filesList,
+                      brandId:item.brand,
+                  }
+                  this.projectGoodsSubmitfun(obj)
+              }
+          }
+      },
+      // 产品选择左侧数据
+      productnodeClick(data){
+          this.productSearch.goodsTypeId = data.value
+          this.productPage.currentPage = 1;
+          this.productonLoad(this.productPage, this.productSearch);
+      },
+      // 产品弹窗的列表数据获取
+      productonLoad(page, params = {}){
+          let data = this.deepClone(Object.assign(params, this.productSearch));
+          this.loading = true;
+          getList(
+              page.currentPage,
+              page.pageSize,
+              data
+          ).then(res=>{
+              // this.productListShow = res.data.data.records ? res.data.data.records : [];
+              this.productListShow = res.data.data.records
+              this.productPage.total = res.data.data.total;
+              this.$nextTick(() => {
+                  this.$refs.productCrud.doLayout();
+              });
+          }).finally(() => {
+              this.loading = false;
+          });
+      },
+      // 标签页切换
+      tabHandle(data) {
+          if (data.name == 'searchList') {
+              this.productListShow = this.data;
+              // this.productSearch.total = this.pageList.total
+              this.productonLoad(this.productPage,this.productSearch);
+          } else if (data.name == 'importStaging') {
+              this.productListShow = this.goodsListSave;
+              this.productSearch.total = 0
+          }
+      },
+      // 获取产品左侧数据
+      getGoodstypefun(){
+          getGoodstype().then(res => {
+              this.productDataGoods = res.data.data;
+              // this.findObject(this.option2.column, "parentId").dicData = res.data.data;
+          });
+      },
+      // 弹窗选中的数据
+      importStagList(row, index) {
+          this.goodsListSave.push(row);
+      },
+      // 产品弹窗移除
+      removeStagList(row, index) {
+          this.goodsListSave.splice(row.$index, 1)
+      },
+      // 产品弹窗刷新触发
+      productRefresh(){
+          // this.treeDeptId = '';
+          this.productPage.currentPage = 1;
+          this.productonLoad(this.productPage,this.productSearch);
+      },
+      // 产品弹窗选择触发
+      productSelection(list) {
+          this.tableData = list
+      },
+      // 产品弹窗搜索按钮触发
+      goodsSearch(params, done) {
+          // this.treeDeptId = '';
+          this.productonLoad(this.productPage,params);
+          done()
+      },
+      // 产品弹窗分页
+      productCurrent(val){
+          this.productPage.currentPage = val;
+      },
+      productSize(val){
+          this.productPage.currentPage = 1;
+          this.productPage.pageSize = val;
+      },
+      // 产品弹窗的重置和保存
+      productSave(){
+          const inSave = optionTwo
+          if (inSave) {
+              this.$nextTick(() => {
+                  this.$refs.productCrud.doLayout();
+              });
+              this.$message.success("保存成功");
+              //关闭窗口
+              this.$refs.productCrud.$refs.dialogColumn.columnBox = false;
+          }
+      },
+      productReset(){
+          this.optionTwo = optionTwo;
+          // const inSave = await this.delColumnData(this.getColumnName(217), option);
+          const inSave = option
+          if (inSave) {
+              this.$nextTick(() => {
+                  this.$refs.productCrud.doLayout();
+              });
+              this.getAllWorkDicts()
+              this.$message.success("重置成功");
+              this.$refs.productCrud.$refs.dialogColumn.columnBox = false;
+          }
+      },
+      // 关闭弹窗的回调
+      closeGoods() {
+          this.productDataGoods = [];
+          // this.treeDeptId = "";
+          this.activeName = "searchList";
+      },
+
+  }
+}
+</script>
+
+<style  lang="scss"  scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+
+::v-deep .el-input-group__append {
+  padding: 0 0px !important;
+}
+
+.stat-td {
+  text-align: center;
+  position: relative;
+}
+
+.stat-img {
+  width: 95%;
+  height: 100px;
+}
+
+.stat-tip {
+  position: absolute;
+  left: 15px;
+  top: 5px;
+
+  .money {
+    color: #fff;
+    font-size: 28px;
+    text-align: left;
+    font-weight: 600;
+  }
+
+  .title {
+    color: #fff;
+    font-size: 14px;
+    text-align: left;
+    margin-top: 5px;
+    margin-bottom: 0px;
+  }
+}
+</style>

+ 187 - 0
src/views/ServiceLtems/js/optionList.js

@@ -0,0 +1,187 @@
+import { number } from "echarts"
+
+export const option = {
+  searchShow: true,
+  searchMenuSpan: 8,
+  align: "center",
+  searchSpan: 8,
+  tip: false,
+  border: true,
+  index: true,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
+  delBtn: false,
+  menuWidth: 70,
+  searchIcon: true,
+  searchIndex: 2,
+  column: [
+    {
+      label: "商品名称",
+      prop: "cname",
+      // type: "select",
+      // dicUrl:"/api/blade-client/goodsdesc/descListByCname?cname={{key}}",
+      // filterable:true,
+      // remote:true,
+      // props: {
+      //   label: "cname",
+      //   value: "cname"
+      // },
+      search: true,
+      overHidden: true,
+      index: 1
+    },
+    {
+      label: "商品类型",
+      prop: "goodsTypeId",
+      type: 'select',
+      dicData: [],
+      props: {
+        label: 'cname',
+        value: 'id'
+      },
+      index:2,
+    },
+    {
+      label: "单位",
+      prop: "unit",
+      type: "select",
+      filterable:true,
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
+      search: true,
+      overHidden: true,
+      index: 4
+    },
+    {
+      label: "参考售价",
+      prop: "price",
+      overHidden: true,
+      index: 5
+    },
+    {
+      label: "厂家",
+      prop: "corpId",
+      type: "select",
+      props: {
+        label: "cname",
+        value: "id"
+      },
+      width:160,
+      dicData: [],
+      span: 6,
+      index: 13
+    },
+    {
+      label: "规格",
+      prop: "specs",
+      span: 6,
+      index: 15
+    },
+    {
+      label: "品牌",
+      prop: "brand",
+      type: "select",
+      props: {
+        label: "cname",
+        value: "id"
+      },
+      dicData: [],
+      span: 6,
+      index: 16
+    },
+    {
+      label: "备注",
+      prop: "remarks",
+      search: true,
+      overHidden: true,
+      index: 17
+    }
+  ]
+}
+export const optionList = {
+  align: "center",
+  addBtn: false,
+  refreshBtn: false,
+  editBtn: false,
+  delBtn: false,
+  border: true,
+  menuWidth: 120,
+  stripe: true,
+  index: true,
+  indexSlot: true,
+  column: [
+    {
+      label: "仓库",
+      prop: "storageId",
+      type: "select",
+      props: {
+        label: 'cname',
+        value: 'id'
+      },
+      dicData:[],
+      filterable:true,
+      // cell: true,
+      disabled:true,
+      // overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: "blur"
+        }
+      ],
+    },
+    {
+      label: "库存数量",
+      prop: "balanceQuantity",
+      type: 'number',
+      controls: false,
+      // cell: true,
+      disabled:true,
+      // overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "",
+          trigger: "blur"
+        }
+      ],
+    },
+    {
+      label: "批次号",
+      prop: "lotNo",
+      // cell: true,
+      hide:true,
+      showColumn:false,
+      overHidden: true
+    },
+    {
+      label: "结余金额",
+      prop: "balanceAmount",
+      type: 'number',
+      controls: false,
+      // cell: true,
+      overHidden: true
+    },
+    {
+      label: "库存下限",
+      prop: "lowerLimit",
+      type: 'number',
+      controls: false,
+      cell: true,
+      overHidden: true
+    },
+    {
+      label: "送货数量",
+      prop: "actualQuantity",
+      type: 'number',
+      controls: false,
+      cell: true,
+      overHidden: true
+    }
+  ]
+}

+ 201 - 0
src/views/ServiceLtems/js/optionListTwo.js

@@ -0,0 +1,201 @@
+import { number } from "echarts"
+
+export const optionTwo = {
+  searchShow: true,
+  searchMenuSpan: 8,
+  align: "center",
+  searchSpan: 8,
+  tip: false,
+  border: true,
+  index: true,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
+  delBtn: false,
+  menuWidth: 70,
+  searchIcon: true,
+  searchIndex: 2,
+  selection:true,
+  column: [
+    {
+      label: "商品名称",
+      prop: "cname",
+      // type: "select",
+      // dicUrl:"/api/blade-client/goodsdesc/descListByCname?cname={{key}}",
+      // filterable:true,
+      // remote:true,
+      // props: {
+      //   label: "cname",
+      //   value: "cname"
+      // },
+      search: true,
+      overHidden: true,
+      index: 1
+    },
+    {
+      label: "产品分类",
+      prop: "goodsTypeName",
+      overHidden: true,
+      index: 2
+    },
+    {
+      label: "单位",
+      prop: "unit",
+      type: "select",
+      filterable:true,
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
+      search: true,
+      overHidden: true,
+      index: 4
+    },
+    {
+      label: "参考售价",
+      prop: "standardPrice",
+      overHidden: true,
+      index: 5
+    },
+    {
+      label: "库存数量",
+      prop: "stockGoodsNumber",
+      overHidden: true,
+      index: 6
+    },{
+      label: '是否上架',
+      prop: 'upperFrame',
+      filterable: true,
+      search: true,
+      type: 'select',
+      dataType: "string",
+      index: 7,
+      dicData:[{
+        label: "上架",
+        value: 1
+      },{
+        label: "下架",
+        value: 0
+      }]
+    },
+    {
+      label: '积分商品',
+      prop: 'whetherIntegral',
+      width:140,
+      filterable: true,
+      search: true,
+      type: 'select',
+      dataType: "string",
+      index: 8,
+      dicData:[{
+        label: "是",
+        value: 1
+      },{
+        label: "否",
+        value: 0
+      }]
+    },
+    {
+      label: "门店积分",
+      prop: "storeIntegral",
+      overHidden: true,
+      index: 9
+    },
+    {
+      label: "推荐人积分",
+      width:120,
+      prop: "referenceIntegral",
+      overHidden: true,
+      index: 10
+    },
+    {
+      label: "业务员积分",
+      width:120,
+      prop: "salesmanIntegral",
+      overHidden: true,
+      index: 11
+    },
+    {
+      label: "商品积分",
+      prop: "integral",
+      overHidden: true,
+      index: 12
+    },
+    {
+      label: "厂家",
+      prop: "corpId",
+      type: "select",
+      props: {
+        label: "cname",
+        value: "id"
+      },
+      dicData: [],
+      span: 6,
+      index: 13
+    },
+    {
+      label: "采购日期",
+      prop: "exitDate",
+      type: "date",
+      format: "yyyy-MM-dd",
+      valueFormat: "yyyy-MM-dd 00:00:00",
+      span: 6,
+      index: 14
+    },
+    {
+      label: "规格",
+      prop: "specs",
+      span: 6,
+      index: 15
+    },
+    {
+      label: "品牌",
+      prop: "brand",
+      span: 6,
+      index: 16
+    },
+
+    {
+      label: "备注",
+      prop: "remarks",
+      search: true,
+      overHidden: true,
+      index: 17
+    },
+    {
+      label: "状态",
+      prop: "status",
+      type: "select",
+      filterable:true,
+      dataType: "Number",
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      dicData:[],
+      search: true,
+      hide: true,
+      showColumn: false,
+      overHidden: true,
+      index: 14
+    },
+    {
+      label: "标签",
+      prop: "label",
+      type: 'checkbox',
+      dataType: "string",
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
+      search: true,
+      multiple:true,
+      hide: true,
+      showColumn: false,
+      overHidden: true,
+      index: 15
+    }
+  ]
+}

+ 29 - 11
src/views/product/detailsPage.vue

@@ -90,6 +90,7 @@ import { getGoodstype, getDetails, goodsTypesubmit, getStoragetype, submit, item
 import { optionList } from "./js/optionList";
 import goodsType from '@/components/goodsType/index'
 import {getList} from "@/api/basicData/client";
+import {getList as getListpp } from "@/api/tirePartsMall/basicData/brandPage";
 export default {
   name: "index",
   data() {
@@ -350,25 +351,31 @@ export default {
                     value: "id"
                 },
                 dicData: [],
-                span: 6,
-            },
-            {
-                label: "采购日期",
-                prop: "exitDate",
-                type: "date",
-                format: "yyyy-MM-dd",
-                valueFormat: "yyyy-MM-dd 00:00:00",
-                span: 6,
+                span: 8,
             },
+            // {
+            //     label: "采购日期",
+            //     prop: "exitDate",
+            //     type: "date",
+            //     format: "yyyy-MM-dd",
+            //     valueFormat: "yyyy-MM-dd 00:00:00",
+            //     span: 6,
+            // },
             {
                 label: "规格",
                 prop: "specs",
-                span: 6,
+                span: 8,
             },
             {
                 label: "品牌",
                 prop: "brand",
-                span: 6,
+                type: "select",
+                props: {
+                    label: "cname",
+                    value: "id"
+                },
+                dicData: [],
+                span: 8,
             },
           {
             label: "备注",
@@ -490,6 +497,7 @@ export default {
 
     // 获取供应商数据
       this.getListfun()
+      this.getListppfun()
 
     this.getAllWorkDicts()
   },
@@ -501,6 +509,16 @@ export default {
               this.findObject(this.option.column, "corpId").dicData = res.data.data.records
           })
       },
+      // 获取品牌数据
+      getListppfun(){
+          getListpp({
+              current: 1,
+              size: 20,
+          }).then(res=>{
+              this.findObject(this.option.column, "brand").dicData = res.data.data.records
+          })
+      },
+
     getAllWorkDicts() {
       getGoodstype().then(res => {
         this.goodsTypeList = res.data.data;