瀏覽代碼

显示导入的

lining 6 年之前
父節點
當前提交
de2f5c055c

+ 2 - 2
src/dashoo.cn/backend/api/business/oilsupplier/goodsaptitude/oilgoodsaptitudeSession.go

@@ -36,8 +36,8 @@ func (s *OilGoodsAptitudeSession) SelectGoodsAptitudeClassCode(code string) stri
 }
 
 func (s *OilGoodsAptitudeSession) InsertGoodsAptitude(parentId, fcode, val string) error {
-	sql := "INSERT INTO `tmp_OilGoodsAptitude` (ClassId," + fcode + ") "
-	sql += " VALUES ("+ parentId +"," + val + ")"
+	sql := "INSERT INTO `tmp_OilGoodsAptitude` (Edition,ClassId," + fcode + ") "
+	sql += " VALUES ('1',"+ parentId +"," + val + ")"
 	_, err := s.Session.Query(sql)
 	return err
 }

+ 2 - 0
src/dashoo.cn/backend/api/controllers/base.go

@@ -245,6 +245,8 @@ var (
 	OilGoodsAptDetailViewName                string = "oil_goodsapt_detail_view"    //物資类视图
 	OilTechsrvClassViewName                  string = "oil_techsrv_class_view"      //技术服务类视图
 	OilGoodsAptClassViewName                 string = "oil_goodsapt_class_view"     //物資类视图
+	ImportOilGoodsAptDetailViewName          string = "oil_goodsapt_import_detail_view"    //物資类视图
+	ImportOilGoodsAptClassViewName           string = "oil_goodsapt_import_class_view"     //物資类视图
 	OilClassOrgSettingName                   string = "OilClassOrgSetting"          //分类部门审批配置表
 	OilAnnualAuditName                       string = "OilAnnualAudit"              //年审表
 	OilSupplierOpinionName                   string = "OilSupplierOpinion"          //追加意见表

+ 104 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -86,7 +86,7 @@ func (this *OilGoodsAptitudeController) GetEntityList() {
 	}
 
 	if SmallClassName != "" {
-		where = where + " and  Name3 '%" + SmallClassName + "%'"
+		where = where + " and  Name3 like '%" + SmallClassName + "%'"
 	}
 
 	if GoodsName != "" {
@@ -130,6 +130,109 @@ func (this *OilGoodsAptitudeController) GetEntityList() {
 	this.ServeJSON()
 }
 
+// @Title 获取列表新导入的列表
+// @Description get user by token
+// @Success 200 {object} []goodsaptitude.OilGoodsAptitude
+// @router /importlist [get]
+func (this *OilGoodsAptitudeController) GetImportEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Code"
+	asc := true
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		} else {
+			asc = false
+		}
+	}
+	Edition := this.GetString("Edition")
+	CreateOn := this.GetString("CreateOn")
+	Code := this.GetString("Code")
+	Name := this.GetString("Name")
+	BigClassName := this.GetString("BigClassName")
+	BigClassCode := this.GetString("BigClassCode")
+	MiddleClassName := this.GetString("MiddleClassName")
+	SmallClassName := this.GetString("SmallClassName")
+	GoodsName := this.GetString("GoodsName")
+	GoodsLevel := this.GetString("GoodsLevel")
+	GoodsDesc := this.GetString("GoodsDesc")
+	Standard := this.GetString("Standard")
+	CompanyType := this.GetString("CompanyType")
+
+	if Edition != "" {
+		where = where + " and Edition = '" + Edition + "'"
+	}
+	if Code != "" {
+		where = where + " and Code like '%" + Code + "%'"
+	}
+
+	if Name != "" {
+		where = where + " and Name like '%" + Name + "%'"
+	}
+
+	if BigClassName != "" {
+		where = where + " and Name1 like '%" + BigClassName + "%'"
+	}
+
+	if BigClassCode != "" {
+		where = where + " and Code1 like '%" + BigClassCode + "%'"
+	}
+
+	if MiddleClassName != "" {
+		where = where + " and Name2 like '%" + MiddleClassName + "%'"
+	}
+
+	if SmallClassName != "" {
+		where = where + " and  Name3 like '%" + SmallClassName + "%'"
+	}
+
+	if GoodsName != "" {
+		where = where + " and Name4 like '%" + GoodsName + "%'"
+	}
+
+	if GoodsLevel != "" {
+		where = where + " and GoodsLevel like '%" + GoodsLevel + "%'"
+	}
+
+	if GoodsDesc != "" {
+		where = where + " and GoodsDesc like '%" + GoodsDesc + "%'"
+	}
+
+	if Standard != "" {
+		where = where + " and  Standard '%" + Standard + "%'"
+	}
+
+	if CompanyType != "" {
+		where = where + " and  CompanyType '%" + CompanyType + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
+	var list []goodsaptitude.OilGoodsAptitudeView
+	total := svc.GetMyPagingEntitiesWithOrderBytbl(ImportOilGoodsAptDetailViewName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取列表2019版本
 // @Description
 // @Success 200 {object}

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/goodsaptitude.js

@@ -92,5 +92,12 @@ export default {
       method: 'get',
       params: params
     })
+  },
+  getImportList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/goodsaptitude/importlist?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
   }
 }

+ 312 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/index.vue

@@ -15,6 +15,8 @@
           </router-link>
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出
           </el-button>
+          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="showimport">查看导入内容
+          </el-button>
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="importExcel">导入
           </el-button>
         </span>
@@ -285,6 +287,164 @@
         </el-row>
       </el-form>
     </el-dialog>
+    <el-dialog title="新导入"  width="100%" top="5vh" :visible.sync="showimportvisible">
+      <el-card class="box-card" v-loading="loading">
+        <div slot="header">
+          <span>
+            <i class="icon icon-table2"></i> 物资类项目与资质对照表(新导入)
+          </span>
+          <span style="float: right;">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">清空所有导入
+            </el-button>
+          </span>
+          <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+            <el-form-item label="编码">
+              <el-input size="mini" v-model="searchImportForm.Code" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+            <el-form-item label="名称">
+              <el-input size="mini" v-model="searchImportForm.Name" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-dropdown split-button type="primary" size="mini" @click="importhandleSearch" @command="importsearchCommand">
+                查询
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                  <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </el-form-item>
+          </el-form>
+        </div>
+        <el-table :data="importentityList" id="rebateSetTableimport" size="mini" border height="calc(100vh - 350px)"
+                  style="width: 100%" @sort-change="importorderby">
+
+          <el-table-column v-for="column in tableColumns" :prop="column.prop" sortable :width="column.width"
+                           :key="column.Id" :label="column.label" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ transferStr(scope.row[column.prop]) }}
+            </template>
+          </el-table-column>
+
+          <!--动态显示的表头-->
+          <template v-for="column in dynamicTableColumns">
+            <el-table-column :prop="column.prop" sortable :width="80"
+                             :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='0'" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ transferStr(scope.row[column.prop]) }}
+              </template>
+            </el-table-column>
+          </template>
+
+          <el-table-column label="贸易产品">
+            <template v-for="column in dynamicTableColumns">
+              <el-table-column :prop="column.prop" sortable :width="80"
+                               :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='2'" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  {{ transferStr(scope.row[column.prop]) }}
+                </template>
+              </el-table-column>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="制造产品">
+            <template v-for="column in dynamicTableColumns">
+              <el-table-column :prop="column.prop" sortable :width="80"
+                               :key="column.Id" :label="column.label" align="center" v-if="column.IsManuf=='1'" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  {{ transferStr(scope.row[column.prop]) }}
+                </template>
+              </el-table-column>
+            </template>
+          </el-table-column>
+          <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ jstimehandle(scope.row.CreateOn+'') }}
+            </template>
+          </el-table-column>-->
+        </el-table>
+        <el-pagination @size-change="importhandleSizeChange" @current-change="importhandleCurrentChange" :current-page="importcurrentPage"
+                       :page-sizes="[10, 50, 100, 200, 400]" :page-size="importsize" layout="total, sizes, prev, pager, next, jumper"
+                       :total="importcurrentItemCount">
+        </el-pagination>
+      </el-card>
+    </el-dialog>
+    <el-dialog title="高级查询" :visible.sync="importDialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="12">
+            <el-form-item label="编码">
+              <el-input size="mini" v-model="searchImportForm.Code" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="名称">
+              <el-input size="mini" v-model="searchImportForm.Name" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="大类名称">
+              <el-input size="mini" v-model="searchImportForm.BigClassName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="大类编码">
+              <el-input size="mini" v-model="searchImportForm.BigClassCode" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="中类名称">
+              <el-input size="mini" v-model="searchImportForm.MiddleClassName" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="小类名称">
+              <el-input size="mini" v-model="searchImportForm.SmallClassName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="品名">
+              <el-input size="mini" v-model="searchImportForm.GoodsName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="物资级别">
+              <el-input size="mini" v-model="searchImportForm.GoodsLevel" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="产品说明">
+              <el-input size="mini" v-model="searchImportForm.GoodsDesc" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="标准备案">
+              <el-input size="mini" v-model="searchImportForm.Standard" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="供应商类型">
+              <el-input size="mini" v-model="searchImportForm.CompanyType" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="importDialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="importhandleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -306,6 +466,7 @@
 
     data () {
       return {
+        showimportvisible: false,
         Excelurl: '',
         uploadshow: false,
         loading: false,
@@ -314,6 +475,7 @@
         myclassid: '',
         deptsetVisible: false,
         dialogVisible: false,
+        importDialogVisible: false,
         // 列表数据
         entityList: [],
         // 分页参数
@@ -325,6 +487,17 @@
           Order: '',
           Prop: ''
         },
+        // 列表数据
+        importentityList: [],
+        // 分页参数
+        importsize: 10,
+        importcurrentPage: 1,
+        importcurrentItemCount: 0,
+        // 列表排序
+        importColumn: {
+          Order: '',
+          Prop: ''
+        },
         formData: {
           Id: '',
           Id1: '',
@@ -344,6 +517,7 @@
         },
         // 查询时间
         CreateOn: [],
+        importCreateOn: [],
         // 查询项
         searchFormReset: {},
         searchForm: {
@@ -414,6 +588,75 @@
           ModifiedUserId: '',
           ModifiedBy: ''
 
+        },
+        searchImportForm: {
+          Id: '',
+          Code: '',
+          Name: '',
+          BigClassName: '',
+          BigClassCode: '',
+          MiddleClassName: '',
+          SmallClassName: '',
+          GoodsName: '',
+          GoodsLevel: '',
+          GoodsDesc: '',
+          Standard: '',
+          CompanyType: '',
+          F01: '',
+          F02: '',
+          F03: '',
+          F04: '',
+          F05: '',
+          F06: '',
+          F07: '',
+          F08: '',
+          F09: '',
+          F10: '',
+          F11: '',
+          F12: '',
+          F13: '',
+          F14: '',
+          F15: '',
+          F16: '',
+          F17: '',
+          F18: '',
+          F19: '',
+          F20: '',
+          F21: '',
+          F22: '',
+          F23: '',
+          F24: '',
+          F25: '',
+          F26: '',
+          F27: '',
+          F28: '',
+          F29: '',
+          F30: '',
+          F31: '',
+          F32: '',
+          F33: '',
+          F34: '',
+          F35: '',
+          F36: '',
+          F37: '',
+          F38: '',
+          F39: '',
+          F40: '',
+          F41: '',
+          F42: '',
+          F43: '',
+          F44: '',
+          F45: '',
+          F46: '',
+          Remark: '',
+          DeletionStateCode: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: ''
+
         },
         setForm: {
           SupplierTypeCode: '01',
@@ -545,6 +788,10 @@
       this.getDictOptions()
     },
     methods: {
+      showimport () {
+        this.initImportDatas()
+        this.showimportvisible = true
+      },
       uploadExcel () {
         let params = {
           ExcelUrl: this.Excelurl
@@ -775,7 +1022,35 @@
           console.error(err)
         })
       },
+      initImportDatas () {
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.importcurrentPage,
+          _size: this.importsize,
+          Order: this.initImportDatas.Order,
+          Prop: this.initImportDatas.Prop,
+          Edition: '1'
+        }
+        let myCreateOn = []
+        // 解析时间
 
+        if (this.importCreateOn != null && this.importCreateOn.length === 2) {
+          this.importCreateOn[1].setHours(23)
+          this.importCreateOn[1].setMinutes(59)
+          this.importCreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.importCreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.importCreateOn[1]))
+        }
+        // 查询条件
+        Object.assign(params, this.searchImportForm)
+        // 访问接口
+        api.getImportList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.importentityList = res.data.items
+          this.importcurrentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       getDictOptions () {
         api.getDictList(this.$axios).then(res => {
           this.AuditStepOptions = res.data.items['AuditStep']
@@ -839,6 +1114,43 @@
         this.currentPage = 1
         this.initDatas()
       },
+      importsearchCommand (command) {
+        if (command === 'search') {
+          this.importDialogVisible = true
+        } else if (command === 'clear') {
+          this.importclearSearch()
+        }
+      },
+      // 列表排序功能
+      importorderby (column) {
+        if (column.order === 'ascending') {
+          this.importColumn.Order = 'asc'
+        } else if (column.order === 'descending') {
+          this.importColumn.Order = 'desc'
+        }
+        this.importColumn.Prop = column.prop
+        this.initImportDatas()
+      },
+      importclearSearch () {
+        Object.assign(this.searchImportForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
+        this.importCreateOn = ''
+        this.initImportDatas()
+      },
+      importhandleSearch () {
+        this.importcurrentPage = 1
+        this.importDialogVisible = false
+        this.initImportDatas()
+      },
+      importhandleCurrentChange (value) {
+        this.importcurrentPage = value
+        this.initImportDatas()
+      },
+      importhandleSizeChange (value) {
+        this.importsize = value
+        this.importcurrentPage = 1
+        this.initImportDatas()
+      },
       deleteEntity (row) {
         // row.deleteConfirmFlag = false
         this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {