Browse Source

前后:资质查询trim;资质的样式

dubch 4 years ago
parent
commit
efac0e41e2

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/basisbuild.go

@@ -64,11 +64,11 @@ func (this *OilBasisBuildController) GetEntityList() {
 	Name := this.GetString("Name")
 
 	if Code != "" {
-		where = where + " and Code like '" + Code + "%'"
+		where = where + " and Code like '" + strings.Trim(Code, " ") + "%'"
 	}
 
 	if Name != "" {
-		where = where + " and Name like '%" + Name + "%'"
+		where = where + " and Name like '%" + strings.Trim(Name, " ") + "%'"
 	}
 
 	if CreateOn != "" {

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

@@ -85,11 +85,11 @@ func (this *OilGoodsAptitudeController) GetEntityList() {
 		where = where + " and Edition = '" + Edition + "'"
 	}
 	if Code != "" {
-		where = where + " and Code like '" + Code + "%'"
+		where = where + " and Code like '" + strings.Trim(Code, " ") + "%'"
 	}
 
 	if Name != "" {
-		where = where + " and Name like '%" + Name + "%'"
+		where = where + " and Name like '%" + strings.Trim(Name, " ") + "%'"
 	}
 
 	if BigClassName != "" {

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go

@@ -71,11 +71,11 @@ func (this *OilTechnologyServiceController) GetEntityList() {
 	Code4 := this.GetString("Code4")
 	Name4 := this.GetString("Name4")
 	if Code != "" {
-		where = where + " and Code like '" + Code + "%'"
+		where = where + " and Code like '" + strings.Trim(Code, " ") + "%'"
 	}
 
 	if Name != "" {
-		where = where + " and Name like '%" + Name + "%'"
+		where = where + " and Name like '%" + strings.Trim(Name, " ") + "%'"
 	}
 
 	if Code1 != "" {

+ 9 - 9
src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/_opera/operation.vue

@@ -44,14 +44,12 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
-          <el-row>
-            <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
-              <el-form-item :label="item.label">
-                <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
-              </el-form-item>
-            </el-col>
-          </el-row>
+        <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
+          <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
+            <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label">
+              <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
     </el-card>
@@ -146,6 +144,7 @@
 
         },
         dynamicTableColumns: [],
+        dynamicTableColumnsCount: [],
         CurrentPage: 1, // 分页
         Size: 10,
         classId: '',
@@ -177,7 +176,8 @@
         setapi.initBbTableHeader(this.$axios).then(res => {
 
           this.dynamicTableColumns = res.data.items
-          console.log(res.data.items)
+          let count = Math.ceil(this.dynamicTableColumns.length/4)      //  (向上取整)
+          this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
         })
       },
       getChooseCode(val) {

+ 6 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/_opera/operation.vue

@@ -130,13 +130,14 @@
             <span style="color: #E6A23C; margin-left: 10px">· 非制造商</span>
           </el-col>
         </el-row>
-        <el-row>
+        <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
           <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
-            <el-form-item :label="item.label" :class="isManuf(item.IsManuf)">
+            <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label" :class="isManuf(item.IsManuf)">
               <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
             </el-form-item>
           </el-col>
         </el-row>
+
       </el-form>
     </el-card>
     <el-dialog title="物资类业务列表" :visible.sync="goodsDialog" top="5vh">
@@ -259,6 +260,7 @@
           ModifiedBy: '',
         },
         dynamicTableColumns: [],
+        dynamicTableColumnsCount: [],
         checkList: []
         //下拉选择项
         //wellNoOptions: [],
@@ -293,6 +295,8 @@
         setapi.initGoodTableHeader(this.$axios).then(res => {
 
           this.dynamicTableColumns = res.data.items
+          let count = Math.ceil(this.dynamicTableColumns.length/4)      //  (向上取整)
+          this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
         })
       },
       selectgood () {

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

@@ -53,6 +53,7 @@
             <router-link :to="'/oilsupplier/goodsaptitude/' + scope.row.Id + '/operation'">
               <el-button type="primary" plain title="编辑" size="mini">编辑</el-button>
             </router-link>
+            &nbsp;
             <el-dropdown @command="MoreCmdClick">
               <el-button size="mini" type="primary" plain>
                 更多<i class="el-icon-arrow-down el-icon--right"></i>

+ 5 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/_opera/operation.vue

@@ -58,9 +58,9 @@
             </el-form-item>
           </el-col> -->
         </el-row>
-        <el-row>
+        <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
           <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
-            <el-form-item :label="item.label">
+            <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label">
               <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
             </el-form-item>
           </el-col>
@@ -196,6 +196,7 @@
 
         },
         dynamicTableColumns: [],
+        dynamicTableColumnsCount: [],
         isdis: false,
         checkList: []
         //下拉选择项
@@ -223,6 +224,8 @@
         setapi.initTsTableHeader(this.$axios).then(res => {
 
           this.dynamicTableColumns = res.data.items
+          let count = Math.ceil(this.dynamicTableColumns.length/4)      //  (向上取整)
+          this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
         })
       },
       getorgtreelist() {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/index.vue

@@ -50,6 +50,7 @@
             <router-link :to="'/oilsupplier/technologyservice/' + scope.row.Id + '/operation'">
               <el-button type="primary" plain title="编辑" size="mini">编辑</el-button>
             </router-link>
+            &nbsp;
             <el-dropdown @command="MoreCmdClick">
               <el-button size="mini" type="primary" plain>
                 更多<i class="el-icon-arrow-down el-icon--right"></i>

+ 5 - 2
src/dashoo.cn/frontend_web/src/pages/select/aptitude/basisbuild/index.vue

@@ -89,9 +89,9 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
+        <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
           <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
-            <el-form-item :label="item.label">
+            <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label">
               <el-switch v-model="formData1[item.prop]" active-value="1" inactive-value="0" disabled></el-switch>
             </el-form-item>
           </el-col>
@@ -228,6 +228,7 @@
           AuditStepName: ''
         },
         dynamicTableColumns: [],
+        dynamicTableColumnsCount: [],
         tableColumns: [
 
           {
@@ -339,6 +340,8 @@
       initTableHeader () {
         setapi.initBbTableHeader(this.$axios).then(res => {
           this.dynamicTableColumns = res.data.items
+          let count = Math.ceil(this.dynamicTableColumns.length/4)      //  (向上取整)
+          this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
         })
       },
       initDatas () {

+ 15 - 2
src/dashoo.cn/frontend_web/src/pages/select/aptitude/goods/index.vue

@@ -207,9 +207,9 @@
             <span style="color: #E6A23C; margin-left: 10px">· 非制造商</span>
           </el-col>
         </el-row>
-        <el-row>
+        <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
           <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
-            <el-form-item :label="item.label" :class="isManuf(item.IsManuf)">
+            <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label" :class="isManuf(item.IsManuf)">
               <el-switch v-model="formData1[item.prop]" active-value="1" inactive-value="0" disabled></el-switch>
             </el-form-item>
           </el-col>
@@ -591,6 +591,7 @@
 
         ],
         dynamicTableColumns: [],
+        dynamicTableColumnsCount: [],
         organizeProps: {
           value: 'id',
           label: 'name',
@@ -675,6 +676,8 @@
       initTableHeader () {
         setapi.initGoodTableHeader(this.$axios).then(res => {
           this.dynamicTableColumns = res.data.items
+          let count = Math.ceil(this.dynamicTableColumns.length/4)      //  (向上取整)
+          this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
         })
       },
       initDatas () {
@@ -828,4 +831,14 @@
   .attach-uploader-icon:hover {
     color: #228B22;
   }
+
+  .setLabelRed label{
+    color: #409EFF;
+  }
+  .setLabelGreen label{
+    color: #E6A23C;
+  }
+  .setLabelBlue label{
+    color: #606266;
+  }
 </style>

+ 5 - 2
src/dashoo.cn/frontend_web/src/pages/select/aptitude/techservice/index.vue

@@ -172,9 +172,9 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
+        <el-row v-for="(item1,index) in dynamicTableColumnsCount" :key="index">
           <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
-            <el-form-item :label="item.label">
+            <el-form-item v-if="index > 0 && i < index * 4 && i > index * 4 - 5" :label="item.label">
               <el-switch v-model="formData1[item.prop]" active-value="1" inactive-value="0" disabled></el-switch>
             </el-form-item>
           </el-col>
@@ -377,6 +377,7 @@
           AuditStepName: ''
         },
         dynamicTableColumns: [],
+        dynamicTableColumnsCount: [],
         tableColumns: [{
           prop: 'Code',
           label: '编码',
@@ -547,6 +548,8 @@
       initTableHeader () {
         setapi.initTsTableHeader(this.$axios).then(res => {
           this.dynamicTableColumns = res.data.items
+          let count = Math.ceil(this.dynamicTableColumns.length/4)      //  (向上取整)
+          this.dynamicTableColumnsCount = this.dynamicTableColumns.slice(0,count + 1)
         })
       },
       exportExcel () {