Sfoglia il codice sorgente

前后:合同类型名

dubch 4 anni fa
parent
commit
fada8dca79

+ 1 - 1
src/dashoo.cn/backend/api/business/oilcontract/contract/contract.go

@@ -75,7 +75,7 @@ type OilContract struct {
 	ImportSupplierName   string    `json:"ImportSupplierName" xorm:"comment('导入公司名') VARCHAR(255) 'ImportSupplierName'"`
 	IsYear               int       `json:"IsYear" xorm:"comment('0未跨年,1跨年') int(2) 'IsYear'"`
 	ImportSecondUnit     string    `json:"ImportSecondUnit" xorm:"comment('导入二级单位') VARCHAR(255) 'ImportSecondUnit'"`
-	Class     			 string    `json:"Class" xorm:"comment('类别') VARCHAR(255) 'Class'"`
+	ClassName     	 	 string    `json:"ClassName" xorm:"comment('类别') VARCHAR(255) 'ClassName'"`
 }
 type OilContractMoney struct {
 	Id                   int       `json:"Id" xorm:"not null pk autoincr INT(11) 'Id'"`

+ 4 - 4
src/dashoo.cn/backend/api/controllers/oilcontract/contract.go

@@ -508,7 +508,7 @@ func (this *OilContractController) ImportExcel() {
 			if con1.Id > 0 {
 				con1.ContractName = sheet.Rows[i].Cells[1].String()
 				con1.Amount = sheet.Rows[i].Cells[2].String()
-				con1.Class = sheet.Rows[i].Cells[3].String()
+				con1.ClassName = sheet.Rows[i].Cells[3].String()
 				con1.ContractSonClass = sheet.Rows[i].Cells[4].String()
 				con1.SmallClass = sheet.Rows[i].Cells[5].String()
 				con1.SignedDate,_ = time.ParseInLocation("2006-01-02", convertToFormatDay(sheet.Rows[i].Cells[6].Value), time.Local)
@@ -555,7 +555,7 @@ func (this *OilContractController) ImportExcel() {
 			con.ContractNo = sheet.Rows[i].Cells[0].String()
 			con.ContractName = sheet.Rows[i].Cells[1].String()
 			con.Amount = sheet.Rows[i].Cells[2].String()
-			con.Class = sheet.Rows[i].Cells[3].String()
+			con.ClassName = sheet.Rows[i].Cells[3].String()
 
 			con.ContractSonClass = sheet.Rows[i].Cells[4].String()
 			con.SmallClass = sheet.Rows[i].Cells[5].String()
@@ -700,10 +700,10 @@ func (this *OilContractController) ImportUpdate() {
 	where := "1=1"
 	if Column == "ContractClass" {
 		if Id != "" {
-			where += " and Id = " + Id + " and ImportStatus = 0 and Class = '" + Class + "'"
+			where += " and Id = " + Id + " and ImportStatus = 0 and ClassName = '" + Class + "'"
 			sql = "update OilContract set SupplierName = '" + supp.SupplierName + "', " + Column + " = '" + Value + "' where " + where
 		} else {
-			where += " and ImportStatus = 0 and Class = '" + Class + "' and " + Column + " = ''"
+			where += " and ImportStatus = 0 and ClassName = '" + Class + "' and " + Column + " = ''"
 			sql = "update OilContract set " + Column + " = '" + Value + "' where " + where
 		}
 		_, err = utils.DBE.Query(sql)

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-import/index.vue

@@ -285,7 +285,7 @@
             size="small"
             style="width: 100%" v-loading="tableSelectLoading">
            <el-table-column type="index"  min-width="70" label="序号" align="center" show-overflow-tooltip></el-table-column>
-          <el-table-column  prop="Class"  min-width="110" label="合同类别" align="center" show-overflow-tooltip></el-table-column>
+          <el-table-column  prop="ClassName"  min-width="110" label="合同类别" align="center" show-overflow-tooltip></el-table-column>
           <el-table-column  prop="ContractClass"  min-width="140" label="选择类别" align="center" show-overflow-tooltip >
             <template slot-scope="scope">
               <el-form-item  style="margin-bottom: 0px;" :prop="'tableData.' + scope.$index + '.ContractClass'" :rules="rules.ContractClass">