Просмотр исходного кода

服务工单,服务改善表格查询调整

qymljy 1 месяц назад
Родитель
Сommit
b2e0779030

+ 267 - 8
src/HDrpManagement/serveWorkBill/modules/serviceWorkOrder/modules/addMaterials.vue

@@ -4,15 +4,135 @@
     <el-drawer
         :title="$t('添加物料')"
         :visible.sync="drawerVisible"
-        size="70%"
+        size="80%"
         direction="rtl"
         append-to-body
         :show-close="false"
         @close="onClose"
     >
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
-        <el-input style="width:200px;margin-bottom: 10px" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearchValue" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
-        </el-input>
+        <div class="flex-between" >
+          <el-select
+              v-model="where.sa_brandid"
+              :placeholder="$t(`选择品牌`)"
+              size="small"
+              clearable
+              class="inline-24"
+              @change="brandChange"
+          >
+            <el-option
+                v-for="item in options.brands"
+                :key="item.sa_brandid"
+                :label="$t(item.brandname)"
+                :value="item.sa_brandid"
+            >
+            </el-option>
+          </el-select>
+          <el-cascader
+              :placeholder="$t(`选择分类`)"
+              size="small"
+              v-model="itemclassid"
+              :options="options.itemclass"
+              :props="{
+              checkStrictly: true,
+              children: 'subdep',
+              label: 'itemclassname',
+              value: 'itemclassid',
+            }"
+              clearable
+              @change="classChange"
+          ></el-cascader>
+        </div>
+        <div class="top-margin">
+          <el-button
+              size="small"
+              :type="selectList.length == 0?'':'primary'"
+              :loading="loading"
+              @click="onSubmit"
+              class="normal-btn-width inline-24"
+              :disabled="selectList.length == 0"
+          >{{ $t("添加选中商品") }}</el-button
+          >
+          <el-input style="width:200px;margin-bottom: 10px" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearchValue" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          </el-input>
+          <el-select
+              v-model="where.standards"
+              :placeholder="$t(`选择标准`)"
+              size="small"
+              clearable
+              class="inline-24 bottom-margin"
+              @change="selectChange"
+          >
+            <el-option
+                v-for="item in options.itemstandards"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{
+                  item.remarks ? $t(item.remarks) : $t("暂无描述")
+                }}</span>
+            </el-option>
+          </el-select>
+          <el-select
+              v-model="where.material"
+              :placeholder="$t(`选择材质`)"
+              size="small"
+              clearable
+              class="inline-24 bottom-margin"
+              @change="selectChange"
+          >
+            <el-option
+                v-for="item in options.itemmaterials"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{
+                  item.remarks ? $t(item.remarks) : $t("暂无描述")
+                }}</span>
+            </el-option>
+          </el-select>
+          <el-input
+              style="width: 200px"
+              :placeholder="$t(`型号`)"
+              :suffix-icon="
+              where.model
+                ? where.model.length > 0
+                  ? ''
+                  : ''
+                : 'el-icon-search'
+            "
+              v-model="where.model"
+              @keyup.native.enter="selectChange"
+              @clear="selectChange"
+              size="small"
+              class="bottom-margin input-with-select inline-24 layout_search__panel"
+              clearable
+          >
+          </el-input>
+          <el-input
+              style="width: 200px"
+              :placeholder="$t(`规格`)"
+              :suffix-icon="
+              where.spec
+                ? where.spec.length > 0
+                  ? ''
+                  : ''
+                : 'el-icon-search'
+            "
+              v-model="where.spec"
+              @keyup.native.enter="selectChange"
+              @clear="selectChange"
+              size="small"
+              class="bottom-margin input-with-select inline-24 layout_search__panel"
+              clearable
+          >
+          </el-input>
+        </div>
+
         <el-table ref="table" :fit="tool.calculatedColumnWidth($refs.table,layout)"  current-row-key="id"  highlight-current-row
                   :data="list"  size="mini"  :height="height"  :style="{width:'100%',minHeight:minHeight?minHeight:''}" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
                   :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange" >
@@ -126,6 +246,7 @@
             type="primary"
             :loading="loading"
             @click="onSubmit"
+            :disabled="selectList.length == 0"
             class="normal-btn-width"
         >{{ $t("确 定") }}</el-button
         >
@@ -156,17 +277,42 @@ export default {
       },
       list:[],
       minHeight:'300px',
-      height:'calc(100vh - 240px)',
+      height:'calc(100vh - 300px)',
       total:0,
       currentPage:0,
-      selectList:[]
+      selectList:[],
+      sa_brandid:"",
+      itemclassid: "",
+      options: {
+        brands: [],
+        itemclass: [],
+        itemstandards: [],
+        itemmaterials: [],
+      },
+      where:{
+        "condition": "",
+        "sa_brandid": "",
+        "itemclassid":"",
+        "standards": "",
+        "material": "",
+        "spec":"",
+        "model":"",
+        "tradefield":""
+      }
     }
   },
   methods:{
     addShow(){
       this.drawerVisible = true
       this.param.content.pageNUmber = 1
-      this.listData()
+      this.listData(this.param.content.pageNumber = 1)
+      this.queryBrands()
+      this.$store.dispatch("optiontypeselect", "itemstandards").then((res) => {
+        this.options.itemstandards = res.data;
+      });
+      this.$store.dispatch("optiontypeselect", "itemmaterial").then((res) => {
+        this.options.itemmaterials = res.data;
+      });
     },
     async listData(){
       console.log(this.itemtype,'itemtype')
@@ -206,12 +352,125 @@ export default {
       this.$emit('addList',this.selectList)
     },
     onClose(){
+      this.sa_brandid = ''
+      this.itemclassid = ''
+      this.where = {
+        "condition": "",
+        "sa_brandid": "",
+        "itemclassid":"",
+        "standards": "",
+        "material": "",
+        "spec":"",
+        "model":"",
+        "tradefield":""
+      }
       this.selectList = []
-    }
+      this.selectChange()
+    },
+    brandChange(){
+      this.selectChange()
+      this.queryClass()
+    },
+    /*获取品牌*/
+    async queryBrands() {
+      const res = await this.$api.requested({
+        id: "20220924163702",
+        content: {
+          pageSize: 1000,
+          where: {
+            condition: "",
+          },
+        },
+      });
+      this.options.brands = res.data;
+      console.log("获取品牌", res.data);
+    },
+    /*获取分类*/
+    async queryClass() {
+      const res = await this.$api.requested({
+        id: "20220922110403",
+        content: {
+          sa_brandid: this.where.sa_brandid !== "" ? this.where.sa_brandid : 0,
+        },
+      });
+      let arr = [];
+      function converTree(node) {
+        var elNode = {
+          isdeep: node["isdeep"],
+          ishide: node["ishide"],
+          istool: node["istool"],
+          itemclassfullname: node["itemclassfullname"],
+          itemclassfullnum: node["itemclassfullnum"],
+          itemclassid: node["itemclassid"],
+          itemclassname: node["itemclassname"],
+          itemclassnum: node["itemclassnum"],
+          num: node["num"],
+          parentid: node["parentid"],
+          rowindex: node["rowindex"],
+          subdep: [],
+        };
+        if (node.subdep.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subdep.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.subdep.push(converTree(node.subdep[index]));
+          }
+        } else {
+          elNode = {
+            isdeep: node["isdeep"],
+            ishide: node["ishide"],
+            istool: node["istool"],
+            itemclassfullname: node["itemclassfullname"],
+            itemclassfullnum: node["itemclassfullnum"],
+            itemclassid: node["itemclassid"],
+            itemclassname: node["itemclassname"],
+            itemclassnum: node["itemclassnum"],
+            num: node["num"],
+            parentid: node["parentid"],
+            rowindex: node["rowindex"],
+          };
+        }
+        return elNode;
+      }
+      // this.options.itemclass = arr
+      res.data[0].ttemclass.forEach((e) => {
+        arr.push(converTree(e));
+      });
+
+      this.options.itemclass = arr;
+      return arr;
+    },
+    classChange(){
+      this.where.itemclassid = this.itemclassid[this.itemclassid.length -1]
+      this.selectChange()
+    },
+    selectChange(){
+      this.param.content.where = this.where
+      this.listData(this.param.content.pageNumber = 1)
+    },
   }
 }
 </script>
 
 <style scoped>
-
+.image {
+  height: 38px;
+  width: 38px;
+  margin-top: 0;
+}
+.top-margin {
+  margin-top: 20px;
+}
+.bottom-margin {
+  margin-bottom: 20px;
+}
+/deep/ input::-webkit-input-placeholder {
+  color: #58585d;
+}
+/deep/ input::-moz-input-placeholder {
+  color: #58585d;
+}
+/deep/ input::-ms-input-placeholder {
+  color: #58585d;
+}
 </style>

Разница между файлами не показана из-за своего большого размера
+ 28 - 15
src/HDrpManagement/serviceImprovement/components/actionImplementation/FileItem.vue


+ 11 - 10
src/HDrpManagement/serviceImprovement/components/actionImplementation/actionDetail.vue

@@ -26,16 +26,17 @@
         <el-divider></el-divider>
         <div>{{$t(`执行记录`)}}:</div>
         <div>{{item.record}}</div>
-<!--        <div v-if="item.attinfos" style="margin-bottom: 10px">-->
-<!--          <FileItem-->
-<!--              :marginRight="21"-->
-<!--              :margin-top="10"-->
-<!--              :rowCount="5"-->
-<!--              :isDownLoad="true"-->
-<!--              :fileData="item.attinfos"-->
-<!--              @deleteSuccess="deleteFile">-->
-<!--          </FileItem>-->
-<!--        </div>-->
+        <div v-if="item.attinfos" style="margin-bottom: 10px">
+          <file-item
+              :marginRight="21"
+              :margin-top="10"
+              :rowCount="5"
+              :isDownLoad="false"
+              :fileData="item.attinfos"
+              :isDelete="false"
+          >
+          </file-item>
+        </div>
       </el-card>
     </div>
   </div>

+ 5 - 5
src/HDrpManagement/serviceImprovement/components/actionImplementation/addRecord.vue

@@ -27,9 +27,9 @@
             v-model="record">
         </el-input>
       </div>
-      <div style="height: 10px;background: #f1f2f3" v-if="btnType == '隐藏'"></div>
-      <div style="margin: 10px;font-weight: bold;" v-if="btnType == '隐藏'">{{$t(`上传附件`)}}</div>
-      <div class="drawer__panel" v-if="btnType == '隐藏'">
+      <div style="height: 10px;background: #f1f2f3" ></div>
+      <div style="margin: 10px;font-weight: bold;" >{{$t(`上传附件`)}}</div>
+      <div class="drawer__panel" >
         <uploadFile ref="upload"  :folderid="folderid"
                     :bindData="{ownertable:'sa_service_improvement_record',ownerid:sa_service_improvement_recordid,usetype:'default'}"
                     @onSuccess="uploadSuccess" :id="data.sa_service_improvement_recordid"></uploadFile>
@@ -112,8 +112,8 @@ export default {
       })
       this.tool.showMessage(res,()=>{
         if (this.btnTitle != '编辑'){
-          // this.listFiles = this.$refs.list.list
-          // this.batchBinding(res.data.sa_service_improvement_recordid)
+          this.listFiles = this.$refs.list.list
+          this.batchBinding(res.data.sa_service_improvement_recordid)
         }
         this.drawerShow = false
         this.$emit('addSuccess',this.data.sa_service_improvement_planid)

+ 32 - 1
src/HDrpManagement/serviceImprovement/components/actionImplementation/fileTable.vue

@@ -8,16 +8,25 @@
         <p v-else>{{$t(scope.column.data[scope.column.columnname])}}</p>
       </template>
       <template v-slot:opreation="scope">
+        <el-button
+            type="text"
+            size="small"
+            @click="download(scope.data)"
+        >{{$t(`下 载`)}}</el-button>
+        <el-button type="text" size="small" @click="seeClick(scope.data)">{{$t(`预 览`)}}</el-button>
         <el-button size="mini" type="text" @click="delFile(scope.data)">{{$t(`删除`)}}</el-button>
       </template>
     </table-new-layout>
+    <filePreviewer ref="previewerRef" :fileUrl="fileUrl" :fileName="fileName"></filePreviewer>
   </div>
 </template>
 
 <script>
+import filePreviewer from '@/components/preview/index'
 export default {
   name: "fileTable",
   props:["id"],
+  components:{filePreviewer},
   data(){
     return {
       tableHieght:'calc(100vh - 375px)',
@@ -32,6 +41,8 @@ export default {
         }
       },
       actid: null,
+      fileUrl:'',
+      fileName:''
     }
   },
   mounted() {
@@ -57,7 +68,27 @@ export default {
       }else {
         this.listData()
       }
-    }
+    },
+    download(row) {
+      window.open(row.url);
+      this.downloadRecord(row);
+    },
+    /*保存下载操作记录*/
+    async downloadRecord(row) {
+      const res = await this.$api.requested({
+        id: 10020701,
+        content: {
+          linksid: row.linksid,
+          attachmentid: row.attachmentid,
+        },
+      });
+    },
+    seeClick(item) {
+      console.log(item);
+      this.fileUrl = item.url
+      this.fileName = item.document
+      this.$refs.previewerRef.dialogVisible = true
+    },
   },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).fileTable.tablecols

+ 277 - 13
src/HDrpManagement/serviceImprovement/components/affectedProductScope/add.vue

@@ -4,21 +4,142 @@
     <el-drawer
         :title="$t(`添加产品`)"
         :visible.sync="drawerVisible"
-        size="75%"
+        size="80%"
         direction="rtl"
         :show-close="false"
         append-to-body
         @close="onClose">
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
-        <el-input
-            style="width: 250px; margin-bottom: 10px"
-            size="small"
-            :placeholder="$t('请输入搜索内容')"
-            clearable
-            @clear="listData((params.content.pageNumber = 1))"
-            v-model="params.content.where.condition"
-            @keyup.enter.native="listData((params.content.pageNumber = 1))"
-        ></el-input>
+        <div class="flex-between" >
+          <el-select
+              v-model="where.sa_brandid"
+              :placeholder="$t(`选择品牌`)"
+              size="small"
+              clearable
+              class="inline-24"
+              @change="brandChange"
+          >
+            <el-option
+                v-for="item in options.brands"
+                :key="item.sa_brandid"
+                :label="$t(item.brandname)"
+                :value="item.sa_brandid"
+            >
+            </el-option>
+          </el-select>
+          <el-cascader
+              :placeholder="$t(`选择分类`)"
+              size="small"
+              v-model="itemclassid"
+              :options="options.itemclass"
+              :props="{
+              checkStrictly: true,
+              children: 'subdep',
+              label: 'itemclassname',
+              value: 'itemclassid',
+            }"
+              clearable
+              @change="classChange"
+          ></el-cascader>
+        </div>
+        <div class="top-margin">
+          <el-button
+              size="small"
+              :type="selectData.length == 0?'':'primary'"
+              :loading="loading"
+              @click="onSubmit"
+              class="normal-btn-width inline-24"
+              :disabled="selectData.length == 0"
+          >{{ $t("添加选中商品") }}</el-button
+          >
+          <el-input
+              style="width: 250px; margin-bottom: 10px"
+              class="inline-24"
+              size="small"
+              :placeholder="$t('请输入搜索内容')"
+              clearable
+              @clear="listData((params.content.pageNumber = 1))"
+              v-model="params.content.where.condition"
+              @keyup.enter.native="listData((params.content.pageNumber = 1))"
+          ></el-input>
+          <el-select
+              v-model="where.standards"
+              :placeholder="$t(`选择标准`)"
+              size="small"
+              clearable
+              class="inline-24 bottom-margin"
+              @change="selectChange"
+          >
+            <el-option
+                v-for="item in options.itemstandards"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{
+                  item.remarks ? $t(item.remarks) : $t("暂无描述")
+                }}</span>
+            </el-option>
+          </el-select>
+          <el-select
+              v-model="where.material"
+              :placeholder="$t(`选择材质`)"
+              size="small"
+              clearable
+              class="inline-24 bottom-margin"
+              @change="selectChange"
+          >
+            <el-option
+                v-for="item in options.itemmaterials"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{
+                  item.remarks ? $t(item.remarks) : $t("暂无描述")
+                }}</span>
+            </el-option>
+          </el-select>
+          <el-input
+              style="width: 200px"
+              :placeholder="$t(`型号`)"
+              :suffix-icon="
+              where.model
+                ? where.model.length > 0
+                  ? ''
+                  : ''
+                : 'el-icon-search'
+            "
+              v-model="where.model"
+              @keyup.native.enter="selectChange"
+              @clear="selectChange"
+              size="small"
+              class="bottom-margin input-with-select inline-24 layout_search__panel"
+              clearable
+          >
+          </el-input>
+          <el-input
+              style="width: 200px"
+              :placeholder="$t(`规格`)"
+              :suffix-icon="
+              where.spec
+                ? where.spec.length > 0
+                  ? ''
+                  : ''
+                : 'el-icon-search'
+            "
+              v-model="where.spec"
+              @keyup.native.enter="selectChange"
+              @clear="selectChange"
+              size="small"
+              class="bottom-margin input-with-select inline-24 layout_search__panel"
+              clearable
+          >
+          </el-input>
+        </div>
+
         <table-detail :layout="tablecols" :data="list" :custom="true" :width="true" :checkbox="true" :height="tableHieght" minHeight="200px"
                       fixedName="operation" @selectionChange="selectionChange">
           <template v-slot:customcol="scope">
@@ -56,6 +177,7 @@
             size="small"
             type="primary"
             @click="onSubmit"
+            :loading="loading"
             :disabled="selectData.length == 0"
             class="normal-btn-width"
         >{{ $t("确 定") }}</el-button
@@ -82,18 +204,46 @@ export default {
           }
         },
       },
-      tableHieght:'calc(100vh - 245px)',
+      tableHieght:'calc(100vh - 300px)',
       tablecols:[],
+      loading:false,
       list:[],
       currentPage:0,
       total:0,
-      selectData:[]
+      selectData:[],
+      sa_brandid:"",
+      itemclassid: "",
+      itemstandard: "",
+      itemmaterial: "",
+      options: {
+        brands: [],
+        itemclass: [],
+        itemstandards: [],
+        itemmaterials: [],
+      },
+      where:{
+        "condition": "",
+        "sa_brandid": "",
+        "itemclassid":"",
+        "standards": "",
+        "material": "",
+        "spec":"",
+        "model":"",
+        "tradefield":""
+      }
     }
   },
   methods:{
     addBtn(){
       this.drawerVisible = true
       this.listData(this.params.content.pageNumber = 1)
+      this.queryBrands()
+      this.$store.dispatch("optiontypeselect", "itemstandards").then((res) => {
+        this.options.itemstandards = res.data;
+      });
+      this.$store.dispatch("optiontypeselect", "itemmaterial").then((res) => {
+        this.options.itemmaterials = res.data;
+      });
     },
     async listData(){
       this.params.content.sa_service_improvementid = this.$route.query.id
@@ -131,7 +281,102 @@ export default {
         this.$emit('addSuccess')
       }
     },
+    brandChange(){
+      this.selectChange()
+      this.queryClass()
+    },
+    /*获取品牌*/
+    async queryBrands() {
+      const res = await this.$api.requested({
+        id: "20220924163702",
+        content: {
+          pageSize: 1000,
+          where: {
+            condition: "",
+          },
+        },
+      });
+      this.options.brands = res.data;
+      console.log("获取品牌", res.data);
+    },
+    /*获取分类*/
+    async queryClass() {
+      const res = await this.$api.requested({
+        id: "20220922110403",
+        content: {
+          sa_brandid: this.where.sa_brandid !== "" ? this.where.sa_brandid : 0,
+        },
+      });
+      let arr = [];
+      function converTree(node) {
+        var elNode = {
+          isdeep: node["isdeep"],
+          ishide: node["ishide"],
+          istool: node["istool"],
+          itemclassfullname: node["itemclassfullname"],
+          itemclassfullnum: node["itemclassfullnum"],
+          itemclassid: node["itemclassid"],
+          itemclassname: node["itemclassname"],
+          itemclassnum: node["itemclassnum"],
+          num: node["num"],
+          parentid: node["parentid"],
+          rowindex: node["rowindex"],
+          subdep: [],
+        };
+        if (node.subdep.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subdep.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.subdep.push(converTree(node.subdep[index]));
+          }
+        } else {
+          elNode = {
+            isdeep: node["isdeep"],
+            ishide: node["ishide"],
+            istool: node["istool"],
+            itemclassfullname: node["itemclassfullname"],
+            itemclassfullnum: node["itemclassfullnum"],
+            itemclassid: node["itemclassid"],
+            itemclassname: node["itemclassname"],
+            itemclassnum: node["itemclassnum"],
+            num: node["num"],
+            parentid: node["parentid"],
+            rowindex: node["rowindex"],
+          };
+        }
+        return elNode;
+      }
+      // this.options.itemclass = arr
+      res.data[0].ttemclass.forEach((e) => {
+        arr.push(converTree(e));
+      });
+
+      this.options.itemclass = arr;
+      return arr;
+    },
+    classChange(){
+      this.where.itemclassid = this.itemclassid[this.itemclassid.length -1]
+      this.selectChange()
+    },
+    selectChange(){
+      this.params.content.where = this.where
+      this.listData(this.params.content.pageNumber = 1)
+    },
     onClose(){
+      this.sa_brandid = ''
+      this.itemclassid = ''
+      this.where = {
+        "condition": "",
+        "sa_brandid": "",
+        "itemclassid":"",
+        "standards": "",
+        "material": "",
+        "spec":"",
+        "model":"",
+        "tradefield":""
+      }
+      this.selectData = []
+      this.selectChange()
       this.$emit('addSuccess')
     }
   },
@@ -142,5 +387,24 @@ export default {
 </script>
 
 <style scoped>
-
+.image {
+  height: 38px;
+  width: 38px;
+  margin-top: 0;
+}
+.top-margin {
+  margin-top: 20px;
+}
+.bottom-margin {
+  margin-bottom: 20px;
+}
+/deep/ input::-webkit-input-placeholder {
+  color: #58585d;
+}
+/deep/ input::-moz-input-placeholder {
+  color: #58585d;
+}
+/deep/ input::-ms-input-placeholder {
+  color: #58585d;
+}
 </style>

+ 272 - 7
src/components/addTable/btnAdd.vue

@@ -15,12 +15,135 @@
         :show-close="false"
         @close="onClose">
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
-        <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
+        <div class="flex-between" v-if="drawerTitle == '自产品档案添加'">
+          <el-select
+              v-model="where.sa_brandid"
+              :placeholder="$t(`选择品牌`)"
+              size="small"
+              clearable
+              class="inline-24"
+              @change="brandChange"
+          >
+            <el-option
+                v-for="item in options.brands"
+                :key="item.sa_brandid"
+                :label="$t(item.brandname)"
+                :value="item.sa_brandid"
+            >
+            </el-option>
+          </el-select>
+          <el-cascader
+              :placeholder="$t(`选择分类`)"
+              size="small"
+              v-model="itemclassid"
+              :options="options.itemclass"
+              :props="{
+              checkStrictly: true,
+              children: 'subdep',
+              label: 'itemclassname',
+              value: 'itemclassid',
+            }"
+              clearable
+              @change="classChange"
+          ></el-cascader>
+        </div>
+        <div class="top-margin" v-if="drawerTitle == '自产品档案添加'">
+          <el-button
+              size="small"
+              :type="selectList.length == 0?'':'primary'"
+              :loading="loading"
+              @click="onSubmit"
+              class="normal-btn-width inline-24"
+              :disabled="selectList.length == 0"
+          >{{ $t("添加选中商品") }}</el-button
+          >
+          <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
+                     v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)"
+                     size="small" class="input-with-select inline-24 layout_search__panel" clearable>
+          </el-input>
+          <el-select
+              v-model="where.standards"
+              :placeholder="$t(`选择标准`)"
+              size="small"
+              clearable
+              class="inline-24 bottom-margin"
+              @change="selectChange"
+          >
+            <el-option
+                v-for="item in options.itemstandards"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{
+                  item.remarks ? $t(item.remarks) : $t("暂无描述")
+                }}</span>
+            </el-option>
+          </el-select>
+          <el-select
+              v-model="where.material"
+              :placeholder="$t(`选择材质`)"
+              size="small"
+              clearable
+              class="inline-24 bottom-margin"
+              @change="selectChange"
+          >
+            <el-option
+                v-for="item in options.itemmaterials"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value"
+            >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{
+                  item.remarks ? $t(item.remarks) : $t("暂无描述")
+                }}</span>
+            </el-option>
+          </el-select>
+          <el-input
+              style="width: 200px"
+              :placeholder="$t(`型号`)"
+              :suffix-icon="
+              where.model
+                ? where.model.length > 0
+                  ? ''
+                  : ''
+                : 'el-icon-search'
+            "
+              v-model="where.model"
+              @keyup.native.enter="selectChange"
+              @clear="selectChange"
+              size="small"
+              class="bottom-margin input-with-select inline-24 layout_search__panel"
+              clearable
+          >
+          </el-input>
+          <el-input
+              style="width: 200px"
+              :placeholder="$t(`规格`)"
+              :suffix-icon="
+              where.spec
+                ? where.spec.length > 0
+                  ? ''
+                  : ''
+                : 'el-icon-search'
+            "
+              v-model="where.spec"
+              @keyup.native.enter="selectChange"
+              @clear="selectChange"
+              size="small"
+              class="bottom-margin input-with-select inline-24 layout_search__panel"
+              clearable
+          >
+          </el-input>
+        </div>
+        <el-input v-else style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
                    v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)"
-                   size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+                   size="small" class="input-with-select inline-24 layout_search__panel" clearable>
         </el-input>
         <table-detail :layout="tablecols" :checkbox="true" :data="list" :custom="true" :width="true" :height="tableHieght" minHeight="200px" fixedName="operation"
-                      @selectionChange="selectionChange" style="margin-top: 10px">
+                      @selectionChange="selectionChange" >
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname == 'nominalpressure'">
               {{tool.nominalPressureSet(scope.column.data[[scope.column.columnname]])}}
@@ -71,12 +194,32 @@ export default {
   data(){
     return {
       drawerVisible:false,
-      tableHieght:'calc(100vh - 240px)',
+      tableHieght:this.drawerTitle == '自产品档案添加'?'calc(100vh - 300px)':'calc(100vh - 240px)',
       list:[],
       currentPage:0,
       total:0,
       loading:false,
-      selectList:[]
+      selectList:[],
+      sa_brandid:"",
+      itemclassid: "",
+      itemstandard: "",
+      itemmaterial: "",
+      options: {
+        brands: [],
+        itemclass: [],
+        itemstandards: [],
+        itemmaterials: [],
+      },
+      where:{
+        "condition": "",
+        "sa_brandid": "",
+        "itemclassid":"",
+        "standards": "",
+        "material": "",
+        "spec":"",
+        "model":"",
+        "tradefield":""
+      }
     }
   },
   methods:{
@@ -84,6 +227,13 @@ export default {
       this.drawerVisible = true
       this.selectList = []
       this.listData(this.param.content.pageNumber = 1)
+      this.queryBrands()
+      this.$store.dispatch("optiontypeselect", "itemstandards").then((res) => {
+        this.options.itemstandards = res.data;
+      });
+      this.$store.dispatch("optiontypeselect", "itemmaterial").then((res) => {
+        this.options.itemmaterials = res.data;
+      });
     },
     async listData(){
       const res = await this.$api.requested(this.param)
@@ -133,12 +283,127 @@ export default {
         this.$emit('addSuccess')
       }
     },
-    onClose(){}
+    brandChange(){
+      this.selectChange()
+      this.queryClass()
+    },
+    /*获取品牌*/
+    async queryBrands() {
+      const res = await this.$api.requested({
+        id: "20220924163702",
+        content: {
+          pageSize: 1000,
+          where: {
+            condition: "",
+          },
+        },
+      });
+      this.options.brands = res.data;
+      console.log("获取品牌", res.data);
+    },
+    /*获取分类*/
+    async queryClass() {
+      const res = await this.$api.requested({
+        id: "20220922110403",
+        content: {
+          sa_brandid: this.where.sa_brandid !== "" ? this.where.sa_brandid : 0,
+        },
+      });
+      let arr = [];
+      function converTree(node) {
+        var elNode = {
+          isdeep: node["isdeep"],
+          ishide: node["ishide"],
+          istool: node["istool"],
+          itemclassfullname: node["itemclassfullname"],
+          itemclassfullnum: node["itemclassfullnum"],
+          itemclassid: node["itemclassid"],
+          itemclassname: node["itemclassname"],
+          itemclassnum: node["itemclassnum"],
+          num: node["num"],
+          parentid: node["parentid"],
+          rowindex: node["rowindex"],
+          subdep: [],
+        };
+        if (node.subdep.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subdep.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.subdep.push(converTree(node.subdep[index]));
+          }
+        } else {
+          elNode = {
+            isdeep: node["isdeep"],
+            ishide: node["ishide"],
+            istool: node["istool"],
+            itemclassfullname: node["itemclassfullname"],
+            itemclassfullnum: node["itemclassfullnum"],
+            itemclassid: node["itemclassid"],
+            itemclassname: node["itemclassname"],
+            itemclassnum: node["itemclassnum"],
+            num: node["num"],
+            parentid: node["parentid"],
+            rowindex: node["rowindex"],
+          };
+        }
+        return elNode;
+      }
+      // this.options.itemclass = arr
+      res.data[0].ttemclass.forEach((e) => {
+        arr.push(converTree(e));
+      });
+
+      this.options.itemclass = arr;
+      return arr;
+    },
+    classChange(){
+      this.where.itemclassid = this.itemclassid[this.itemclassid.length -1]
+      this.selectChange()
+    },
+    selectChange(){
+      this.param.content.where = this.where
+      this.listData(this.param.content.pageNumber = 1)
+    },
+    onClose(){
+      this.sa_brandid = ''
+      this.itemclassid = ''
+      this.where = {
+        "condition": "",
+        "sa_brandid": "",
+        "itemclassid":"",
+        "standards": "",
+        "material": "",
+        "spec":"",
+        "model":"",
+        "tradefield":""
+      }
+      this.selectList = []
+      this.selectChange()
+    }
   },
 
 }
 </script>
 
 <style scoped>
-
+.image {
+  height: 38px;
+  width: 38px;
+  margin-top: 0;
+}
+.top-margin {
+  margin-top: 20px;
+}
+.bottom-margin {
+  margin-bottom: 20px;
+}
+/deep/ input::-webkit-input-placeholder {
+  color: #58585d;
+}
+/deep/ input::-moz-input-placeholder {
+  color: #58585d;
+}
+/deep/ input::-ms-input-placeholder {
+  color: #58585d;
+}
 </style>

Некоторые файлы не были показаны из-за большого количества измененных файлов