Ver código fonte

后:准入位置返回大小写

MAC 5 anos atrás
pai
commit
d3a669e981

+ 9 - 9
src/dashoo.cn/backend/api/controllers/oilsupplier/tableheader.go

@@ -128,17 +128,17 @@ func (this *TableHeaderController) Getlocations() {
 	var dbName = utils.Cfg.MustValue("db", "name")
 	var sql string = ""
 	if val == "01" {
-		sql = "select column_name from information_schema.COLUMNS where table_name='" + OilGoodsAptitudeName + "'" +
-			"and TABLE_SCHEMA='" + dbName + "'and column_name like 'F%'" +
-			"and column_name not in (select code from " + BaseTableHeader + " where categorycode='" + val + "')"
+		sql = "select COLUMN_NAME as column_name from information_schema.COLUMNS where TABLE_NAME='" + OilGoodsAptitudeName + "'" +
+			"and TABLE_SCHEMA='" + dbName + "'and COLUMN_NAME like 'F%'" +
+			"and COLUMN_NAME not in (select Code from " + BaseTableHeader + " where CategoryCode='" + val + "')"
 	} else if val == "02" {
-		sql = "select column_name from information_schema.COLUMNS where table_name='" + OilBasisBuildName + "'" +
-			"and TABLE_SCHEMA='" + dbName + "'and column_name like 'F%'" +
-			"and column_name not in (select code from " + BaseTableHeader + " where categorycode='" + val + "')"
+		sql = "select COLUMN_NAME as column_name from information_schema.COLUMNS where TABLE_NAME='" + OilBasisBuildName + "'" +
+			"and TABLE_SCHEMA='" + dbName + "'and COLUMN_NAME like 'F%'" +
+			"and COLUMN_NAME not in (select Code from " + BaseTableHeader + " where CategoryCode='" + val + "')"
 	} else {
-		sql = "select column_name from information_schema.COLUMNS where table_name='" + OilTechnologyServiceName + "'" +
-			"and TABLE_SCHEMA='" + dbName + "'and column_name like 'F%'" +
-			"and column_name not in (select code from " + BaseTableHeader + " where categorycode='" + val + "')"
+		sql = "select COLUMN_NAME as column_name from information_schema.COLUMNS where TABLE_NAME='" + OilTechnologyServiceName + "'" +
+			"and TABLE_SCHEMA='" + dbName + "'and COLUMN_NAME like 'F%'" +
+			"and COLUMN_NAME not in (select Code from " + BaseTableHeader + " where CategoryCode='" + val + "')"
 	}
 
 	results, _ = svc.DBE.QueryString(sql)

+ 14 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/_opera/operation.vue

@@ -20,12 +20,23 @@
       <el-form label-width="240px" ref="EntityForm" :model="formData">
         <el-row>
           <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label="名称" label-width="110px">
+            <el-form-item label="父节点名称" label-width="110px">
               <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择名称">
                 <el-button slot="append" placeholder="选择" @click="goodsDialog = true">选择</el-button>
               </el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="名称" label-width="110px">
+              <el-input v-model="formData.Name" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label-width="110px" label="编码">
+              <el-input v-model="formData.Code" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
           <!-- <el-col :span="8">
             <el-form-item v-if="serviceId == 'add'" label-width="110px" label="部门ID">
               <el-input v-model="formData.OrgId" style="width:100%" placeholder="请输入"></el-input>
@@ -218,8 +229,8 @@
           return
         } else if (this.checkList.length == 1) {
           this.auditerName = this.checkList[0].Name
-          this.formData.Code = this.checkList[0].Code
-          this.formData.Name = this.checkList[0].Name
+          this.formData.Code = this.checkList[0].Code + "00"
+          // this.formData.Name = this.checkList[0].Name
           this.classid = this.checkList[0].id
         }
         this.goodsDialog = false