2
3
lining 6 سال پیش
والد
کامیت
29bd291fb5

+ 74 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/paymentinfo.go

@@ -585,3 +585,77 @@ func (this *PaymentInfoController) DeleteEntity() {
 		this.ServeJSON()
 	}
 }
+
+
+// @Title 修改金额
+// @Description 修改实体
+// @Param 	body body paymentinfo.Paymentinfo
+// @Success	200	{object} controllers.Request
+// @router /addpayinfo [post]
+func (this *PaymentInfoController) AddPayInfo() {
+	supplierId := this.GetString("SupplierId")
+	payType := this.GetString("PayType")
+	amount := this.GetString("Amount")
+	supplierTypeCode := this.GetString("SupplierTypeCode")
+
+	var supp supplier.OilSupplier
+	svc := paymentinfo.GetPaymentService(utils.DBE)
+	has := svc.GetEntityById(supplierId, &supp)
+	var errinfo ErrorInfo
+	if !has {
+		errinfo.Message = "没有相关企业信息!"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var cert []suppliercert.OilSupplierCert
+	wherec := "SupplierId=" + supplierId + " and SupplierTypeCode='" + supplierTypeCode + "'"
+	svc.GetEntities(&cert, wherec)
+
+	if cert == nil {
+		errinfo.Message = "没有相关企业信息!"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+
+	where := "SupplierId=" + strconv.Itoa(supp.Id) + " and USCCode='" + supp.CommercialNo + "' and PayType='" + payType + "' and SupplierCertId=" + strconv.Itoa(cert[0].Id)
+	var model1 paymentinfo.OilPaymentInfo
+	has = svc.GetEntity(&model1, where)
+    if has {
+		errinfo.Message = "已经存在相关缴费记录,不能重复添加!"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model paymentinfo.OilPaymentInfo
+	model.SupplierId,_ = strconv.Atoi(supplierId)
+	model.SupplierCertId = cert[0].Id
+	model.SupplierName = supp.SupplierName
+	model.USCCode = supp.CommercialNo
+	model.PayType = payType
+	model.IsPay = "0"
+	model.Amount = amount
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	_,err := svc.InsertEntity(&model)
+
+	if err == nil {
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}

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

@@ -59,5 +59,12 @@ export default {
       method: 'post',
       data: params
     })
+  },
+  addPayInfo (params, myAxios) {
+    return myAxios({
+      url: '/paymentinfo/addpayinfo',
+      method: 'post',
+      params: params
+    })
   }
 }

+ 105 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/paymentinfo/index.vue

@@ -9,7 +9,7 @@
         <span>
           <i class="icon icon-table2"></i> 缴费信息列表
         </span>
-        <!--<el-button type="primary" size="mini" style="float: right;margin-top: -3px;margin-left: 15px" @click="addpayinfo">添加缴费信息</el-button>-->
+        <el-button type="primary" size="mini" style="float: right;margin-top: -3px;margin-left: 15px" @click="addpayinfo" v-if="authUser.Profile.IsCompanyUser != '1'">添加缴费信息</el-button>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px;">
           <!--<el-form-item label="缴费日期">-->
             <!--<el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"-->
@@ -79,34 +79,57 @@
 
           <el-col :span="12">
             <el-form-item label="企业名称">
-              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+              <el-select v-model="addForm.SupplierId" filterable placeholder="请选择">
+                <el-option
+                  v-for="item in supplierOptions"
+                  :key="item.Id"
+                  :label="item.SupplierName"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
-
           <el-col :span="12">
             <el-form-item label="项目类型">
-              <el-input size="mini" v-model="searchForm.AccessCardNo" style="width:100%" placeholder="请输入">
-              </el-input>
+              <el-select v-model="addForm.SupplierTypeCode" filterable placeholder="请选择">
+                <el-option
+                  v-for="item in codeOptions"
+                  :key="item.Id"
+                  :label="item.Value"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
+          <!--<el-col :span="12">-->
+            <!--<el-form-item label="统一社会信用代码">-->
+              <!--<el-input v-model="addForm.USCCode" 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="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
-              </el-input>
+              <el-select v-model="addForm.PayType" filterable placeholder="请选择">
+                <el-option
+                  v-for="item in payTypeOptions"
+                  :key="item.Id"
+                  :label="item.Value"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
 
           <el-col :span="12">
             <el-form-item label="缴费金额">
-              <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
+              <el-input v-model="addForm.Amount" 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="dialogVisible = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="handleSearch">添 加</el-button>
+        <el-button size="mini" type="primary" @click="savePayInfo">添 加</el-button>
       </span>
     </el-dialog>
   </div>
@@ -116,6 +139,7 @@
     mapGetters
   } from 'vuex'
   import api from '@/api/oilsupplier/paymentinfo'
+  import supapi from '@/api/oilsupplier/supplier'
 
   export default {
     computed: {
@@ -131,6 +155,35 @@
         dialogVisible: false,
         delevisble: false,
         // 列表数据
+        codeOptions: [
+          {
+            Id: '01',
+            Value: '物资类'
+          },
+          {
+            Id: '02',
+            Value: '基建类'
+          },
+          {
+            Id: '03',
+            Value: '技术服务类'
+          }
+        ],
+        payTypeOptions: [
+          {
+            Id: '1',
+            Value: '准入缴费'
+          },
+          {
+            Id: '2',
+            Value: '年审缴费'
+          },
+          {
+            Id: '3',
+            Value: '增项缴费'
+          }
+        ],
+        supplierOptions: [],
         selectsupplierlist: [],
         entityList: [],
         // 分页参数
@@ -169,7 +222,14 @@
           ModifiedOn: '',
           ModifiedUserId: '',
           ModifiedBy: ''
-
+        },
+        addForm: {
+          SupplierId: '',
+          SupplierName: '',
+          SupplierTypeCode: '',
+          USCCode: '',
+          PayType: '',
+          Amount: ''
         }
       }
     },
@@ -181,8 +241,43 @@
       // this.getDictOptions()
     },
     methods: {
+      savePayInfo () {
+        let params = {
+          SupplierId: this.addForm.SupplierId,
+          SupplierTypeCode: this.addForm.SupplierTypeCode,
+          PayType: this.addForm.PayType,
+          Amount: this.addForm.Amount
+        }
+        api.addPayInfo(params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.dialogVisible = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        })
+      },
       addpayinfo () {
         this.dialogVisible = true
+        // 分页及列表条件
+        let params = {
+          _currentPage: 0,
+          _size: 0,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop
+        }
+        supapi.getList('', params, this.$axios).then(res => {
+          console.log(res)
+          this.supplierOptions = res.data.items
+        }).catch(err => {
+          console.error(err)
+        })
       },
       initDatas () {
         // 分页及列表条件

+ 24 - 16
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -552,24 +552,32 @@
     },
     methods: {
       radioChange () {
-        if (this.shenheForm.SuccessStatus === 1) {
-          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
-          if (this.inStyle == '1') {
-            this.shenheForm.AuditorRemark = '集中评审通过'
-          } else if (this.inStyle == '2') {
-            this.shenheForm.AuditorRemark = '一级物资备案准入'
-          } else if (this.inStyle == '3') {
-            this.shenheForm.AuditorRemark = '二级物资备案准入'
-          } else if (this.inStyle == '4') {
-            this.shenheForm.AuditorRemark = '战略合作准入'
-          }
-        } else {
-          if (this.formData.Status == '5') {
-            this.textplaceholder = ''
+        if (this.formData.Status == '5') {
+          if (this.shenheForm.SuccessStatus === 1) {
+            this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+            if (this.inStyle == '1') {
+              this.shenheForm.AuditorRemark = '集中评审通过'
+            } else if (this.inStyle == '2') {
+              this.shenheForm.AuditorRemark = '一级物资备案准入'
+            } else if (this.inStyle == '3') {
+              this.shenheForm.AuditorRemark = '二级物资备案准入'
+            } else if (this.inStyle == '4') {
+              this.shenheForm.AuditorRemark = '战略合作准入'
+            } else if (this.inStyle == '5') {
+              this.shenheForm.AuditorRemark = '集中评审通过。'
+            } else if (this.inStyle == '6') {
+              this.shenheForm.AuditorRemark = '外部市场准入通过。'
+            } else {
+              this.shenheForm.AuditorRemark = '集中评审通过。'
+            }
           } else {
-            this.textplaceholder = '退回意见不能少于5个字'
+            if (this.formData.Status == '5') {
+              this.textplaceholder = ''
+            } else {
+              this.textplaceholder = '退回意见不能少于5个字'
+            }
+            this.shenheForm.AuditorRemark = ''
           }
-          this.shenheForm.AuditorRemark = ''
         }
       },
       changeOrgUnit (val) {