Преглед на файлове

工具借用协议新增调整

qymljy преди 1 година
родител
ревизия
38849a604b
променени са 1 файла, в които са добавени 37 реда и са изтрити 1 реда
  1. 37 1
      src/template/addTool/index.vue

+ 37 - 1
src/template/addTool/index.vue

@@ -25,7 +25,10 @@
           </el-input>
           <el-input  style="width:200px;" :placeholder="$t(`规格`)" :suffix-icon="params.content.where.spec?params.content.where.spec.length > 0?'':'':'el-icon-search'" v-model="params.content.where.spec" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="bottom-margin input-with-select inline-24 layout_search__panel" clearable>
           </el-input>
+          <slot name="optionSystem"></slot>
         </div>
+        <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
+        <div style="width: 100%;border-bottom: 1px solid #ebeef5;margin-bottom: 10px;"></div>
         <div >
           <tableTemp ref="table" :data="list" :layout="tablecolsAdd" :opwidth="200" :custom="true" height="calc(100vh - 370px)" @checkboxCallBack="checkboxCallBack" fixedName="operation">
             <template v-slot:customcol="scope">
@@ -60,10 +63,16 @@
 import tableTemp from './table'
 import uploadAllData from '@/components/uploadAllData/index'
 import previewImage from '@/components/previewImage/index'
+import selectClass from '@/SDrpManagement/ProductGroup/modules/Select2.vue'
 export default {
   name: "index",
   props:["data","tradefield","discountrate","params","title","tablecolsAdd","sa_projectid","querySa_brandid"],
-  components:{tableTemp,uploadAllData,previewImage},
+  components:{tableTemp,uploadAllData,previewImage,selectClass},
+  provide () {
+    return {
+      sys_enterpriseid:() => ''
+    }
+  },
   data(){
     return {
       dialogFormVisible:false,
@@ -94,6 +103,33 @@ export default {
       this.total = res.total
       this.$refs.table.$refs.table.doLayout()
     },
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    brandChange(id){
+      this.params.content.where.sa_brandid = id[0]
+      this.$refs.class.clickClass(false)
+      // this.listData(this.params.content.pageNumber = 1)
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.listData(this.params.content.pageNumber = 1)
+    },
     /*拉取数据*/
     handlePullApi (pullApi) {
       pullApi.content = JSON.parse(JSON.stringify(this.params.content))