Browse Source

待交费

lining 5 years ago
parent
commit
2fee8861e8

+ 1 - 0
src/dashoo.cn/backend/api/business/invoiceinfo/invoiceinfo.go

@@ -13,6 +13,7 @@ type OilInvoiceInfo struct {
 	Address        string    `xorm:"comment('注册地址') VARCHAR(255)"`
 	DepositBank    string    `xorm:"comment('开户行') VARCHAR(255)"`
 	BankAccount    string    `xorm:"comment('银行账号') VARCHAR(255)"`
+	Email          string    `xorm:"comment('邮箱') VARCHAR(255)"`
 	Amount         float64   `xorm:"DECIMAL(10,2)"`
 	IsInvoice      string    `xorm:"default '0' comment('是否已开发票 0 否 1 是') VARCHAR(5)"`
 	InvoiceOn      time.Time `xorm:"comment('开票时间') DATETIME"`

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

@@ -514,6 +514,7 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 	ivinfo.Address = suppentity.Address
 	ivinfo.BankAccount = suppentity.BankAccount
 	ivinfo.DepositBank = suppentity.DepositBank
+	ivinfo.Email = suppentity.EMail
 	ivinfo.CreateOn = time.Now()
 
 	svc.InsertEntity(&ivinfo)
@@ -840,7 +841,9 @@ func (this *PaymentInfoController) IsPermission() {
 	dictList := make(map[string]interface{})
 	svcPerm := permission.GetPermissionService(utils.DBE)
 	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.PaymentInfo.CanEdit")
+	isAdd := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.PaymentInfo.IsAdd")
 	dictList["IsEdit"] = isauth
+	dictList["IsAdd"] = isAdd
 	var errinfo ErrorDataInfo
 	errinfo.Code = 0
 	errinfo.Item = dictList

+ 25 - 14
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -263,11 +263,11 @@
         <el-button  type="primary" size="mini" @click="ComAudit" v-if="formData.CheckStatus == 0">审核</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="待开发票" :visible.sync="invoiceVisible">
+    <el-dialog :title="invoicetitle" :visible.sync="invoiceVisible" width="70%">
       <el-card class="box-card">
         <div slot="header">
         <span>
-          <i class="icon icon-table2"></i> 待开发票
+          <i class="icon icon-table2"></i> {{this.invoicetitle}}
         </span>
           <span style="float: right;">
           <el-form ref="form" :inline="true" style="margin-top: -10px">
@@ -279,24 +279,27 @@
         </div>
         <div class="table-layout" style="margin-top: 0px">
           <el-row>
-            <el-col :span="6" class="table-cell-title">单位名称</el-col>
-            <el-col :span="6" class="table-cell-title">税号</el-col>
-            <el-col :span="12" class="table-cell-title">注册地址</el-col>
+            <el-col :span="9" class="table-cell-title">单位名称</el-col>
+            <el-col :span="10" class="table-cell-title">注册地址</el-col>
+            <el-col :span="5" class="table-cell-title">税号</el-col>
           </el-row>
 
           <el-row>
-            <el-col :span="6" class="table-cell">{{this.formDataInvoice.SupplierName}}</el-col>
-            <el-col :span="6" class="table-cell">{{this.formDataInvoice.CommercialNo}}</el-col>
-            <el-col :span="12" class="table-cell">{{this.formDataInvoice.Address}}</el-col>
+            <el-col :span="9" class="table-cell">{{this.formDataInvoice.SupplierName}}</el-col>
+            <el-col :span="10" class="table-cell">{{this.formDataInvoice.Address}}</el-col>
+            <el-col :span="5" class="table-cell">{{this.formDataInvoice.CommercialNo}}</el-col>
+
           </el-row>
           <el-row>
-            <el-col :span="12" class="table-cell-title">开户银行</el-col>
-            <el-col :span="12" class="table-cell-title">银行账号</el-col>
+            <el-col :span="9" class="table-cell-title">开户银行</el-col>
+            <el-col :span="10" class="table-cell-title">银行账号</el-col>
+            <el-col :span="5" class="table-cell-title">邮箱</el-col>
           </el-row>
 
           <el-row>
-            <el-col :span="12" class="table-cell">{{this.formDataInvoice.DepositBank}}</el-col>
-            <el-col :span="12" class="table-cell">{{this.formDataInvoice.BankAccount}}</el-col>
+            <el-col :span="9" class="table-cell">{{this.formDataInvoice.DepositBank}}</el-col>
+            <el-col :span="10" class="table-cell">{{this.formDataInvoice.BankAccount}}</el-col>
+            <el-col :span="5" class="table-cell">{{this.formDataInvoice.Email}}</el-col>
           </el-row>
         </div>
       </el-card>
@@ -372,6 +375,7 @@
         urlList: [], // 照片地址数组
         urlList2: [], // 照片地址数组2
         bigUrl: '',
+        invoicetitle: '待开发票',
         Auditshow: false,
         dialogVisible: false,
         invoiceVisible: false,
@@ -485,6 +489,7 @@
           Address: '',
           DepositBank: '',
           BankAccount: '',
+          Email: '',
           Amount: ''
         },
         paymentinfoList: [],
@@ -568,6 +573,7 @@
         }
       },
       rowClick (val) {
+        console.log(val, 'val')
         let SupplierType = ''
         if (val.Type === '1') {
           if (val.SupplierTypeCode === '01') {
@@ -611,6 +617,11 @@
           }
           this.$router.push('oilsupplier/supplierstorage/' + val.Id + '/' + SupplierType + '?certid=' + val.CertId)
         } else if (val.Type === '8') {
+          if (val.Status === '未开') {
+            this.invoicetitle = '待开发票'
+          } else {
+            this.invoicetitle = '已开发票'
+          }
           this.initInvoiceDatas(val.Id)
           this.invoiceVisible = true
         } else if (val.Type === '9') {
@@ -927,8 +938,8 @@
     border-top: 1px solid #DCDFE6;
   }
   .table-cell {
-    height: 40px;
-    line-height: 20px;
+    /*height: 40px;*/
+    /*line-height: 20px;*/
     border-right: 1px solid #DCDFE6;
     border-bottom: 1px solid #DCDFE6;
     padding: 10px;

+ 11 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/paymentinfo/_opera/operation.vue

@@ -12,7 +12,7 @@
         <span style="float: right;">
           <el-button type="primary" size="mini" style="margin-right: 15px" v-if="formData.IsPay == '1'" @click="printBtn" >打印</el-button>
           <!--<el-button type="primary" size="mini" style="margin-right: 15px" @click="submitPay" v-if="formData.IsPay == '1'">提交交费</el-button>-->
-          <el-button type="primary" size="mini" style="margin-right: 15px" @click="updateEntity" v-if="formData.IsPay == '0' && authUser.Profile.IsCompanyUser!=1 "><i class="el-icon-circle-check"></i>保存</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 15px" @click="updateEntity" v-if="IsEdit && formData.IsPay == '0' && authUser.Profile.IsCompanyUser!=1 "><i class="el-icon-circle-check"></i>保存</el-button>
 
           <el-button type="plain" plain size="mini" @click="$router.back()">返回</el-button>
         </span>
@@ -31,7 +31,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="交费金额">
-              <el-input v-model="formData.Amount" placeholder="请输入" style="width: 100%" :disabled="formData.IsPay != '0' || authUser.Profile.IsCompanyUser==1 " ></el-input>
+              <el-input v-model="formData.Amount" placeholder="请输入" style="width: 100%" :disabled="!IsEdit && (formData.IsPay != '0' || authUser.Profile.IsCompanyUser==1) " ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -155,6 +155,7 @@
 
     data () {
       return {
+        IsEdit: false,
         dialogVisible: false,
         serviceId: '',
         formData: {
@@ -197,8 +198,16 @@
     created () {
       this.formData.Id = this.$route.params.opera
       this.initDatas()
+      this.isPermission()
     },
     methods: {
+      isPermission () {
+        api.isPermission(this.$axios).then(res => {
+          this.IsEdit = res.data.item['IsEdit']
+        }).catch(err => {
+          console.log(err)
+        })
+      },
       printBtn () {
         supapi.getEntity(this.formData.SupplierId, this.$axios).then(res => {
           this.formDataSup = res.data

+ 3 - 1
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" v-if="authUser.Profile.IsCompanyUser != '1'" @click="addpayinfo">添加交费信息</el-button>
+        <el-button type="primary" size="mini" style="float: right;margin-top: -3px;margin-left: 15px" v-if="isAdd && authUser.Profile.IsCompanyUser != '1'" @click="addpayinfo">添加交费信息</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="至"-->
@@ -160,6 +160,7 @@
 
     data () {
       return {
+        isAdd: false,
         isAllowDel: false,
         payVisible: false,
         dialogVisible: false,
@@ -254,6 +255,7 @@
     methods: {
       isPermission () {
         api.isPermission(this.$axios).then(res => {
+          this.isAdd = res.data.item['IsAdd']
         }).catch(err => {
           console.log(err)
         })