2
3
Преглед на файлове

git commit -a -m '前后:发票展示,备注'

dubch преди 5 години
родител
ревизия
d9a62da97b

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

@@ -40,6 +40,7 @@ type BillReceiveMoneyParams struct {
 	BankSerialNum  string    `json:"bankSerialNum"`
 	BankName       string    `json:"bankName"`
 	ReceiveAmount  float64   `json:"receiveAmount"`
+	Remark  	   string    `json:"remark"`
 }
 
 type BillReceiveMoneyParamsICBC struct {

+ 3 - 1
src/dashoo.cn/backend/api/business/paymentinfo/paymentinfoService.go

@@ -24,12 +24,14 @@ func (s *PaymentService) GetPaymentinfoList(pageIndex, itemsPerPage int64, order
 		"FROM OilPaymentInfo p " +
 		"LEFT JOIN OilSupplier s ON p.SupplierId = s.Id " +
 		"LEFT JOIN OilSupplierCert c ON p.SupplierCertId = c.Id " +
+		"LEFT JOIN OilInvoiceInfo d ON p.Id in (d.SrcIds) " +
 		"WHERE "+ where
 
-	sql := "SELECT c.SupplierTypeCode,c.SupplierTypeName,s.SupplierName,s.CommercialNo,p.* " +
+	sql := "SELECT c.SupplierTypeCode,c.SupplierTypeName,s.SupplierName,s.CommercialNo,d.Remark,d.Url,p.* " +
 		"FROM OilPaymentInfo p " +
 		"LEFT JOIN OilSupplier s ON p.SupplierId = s.Id " +
 		"LEFT JOIN OilSupplierCert c ON p.SupplierCertId = c.Id " +
+		"LEFT JOIN OilInvoiceInfo d ON p.Id in (d.SrcIds) " +
 		"WHERE "+ where +
 		" Order By " + order + asc + " Limit " + strconv.Itoa(int(itemsPerPage)) +" OFFSET " + strconv.Itoa((int(pageIndex)-1)*int(itemsPerPage))
 

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

@@ -532,6 +532,7 @@ func (this *PaymentInfoController) ReceiveMoneyBillListCopy() {
 	ivinfo.BankAccount = suppentity.BankAccount
 	ivinfo.DepositBank = suppentity.DepositBank
 	ivinfo.Email = suppentity.EMail
+	ivinfo.Remark = billParams.Remark
 	ivinfo.CreateOn = time.Now()
 
 	svc.InsertEntity(&ivinfo)
@@ -728,6 +729,7 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 	invoiceInfo.BankAccount = suppentity.BankAccount
 	invoiceInfo.DepositBank = suppentity.DepositBank
 	invoiceInfo.Email = suppentity.EMail
+	invoiceInfo.Remark = billParams.Remark
 	invoiceInfo.CreateOn = time.Now()
 
 	svc.InsertEntity(&invoiceInfo)
@@ -1060,3 +1062,21 @@ func (this *PaymentInfoController) IsPermission() {
 	this.Data["json"] = &errinfo
 	this.ServeJSON()
 }
+
+
+// @Title 查询发票
+// @Description
+// @Success	200	{object} controllers.Request
+// @router /selectInvoice [post]
+func (this *PaymentInfoController) SelectInvoice() {
+	var info paymentinfo.OilPaymentInfo
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &info)
+	svc := invoiceinfo.GetInvoiceService(utils.DBE)
+	var invoice invoiceinfo.OilInvoiceInfo
+
+	svc.GetEntityByWhere("OilInvoiceInfo", strconv.Itoa(info.Id) + " in (SrcIds)", &invoice)
+
+	this.Data["json"] = &invoice
+	this.ServeJSON()
+}

+ 8 - 1
src/dashoo.cn/frontend_web/src/api/oilsupplier/paymentinfo.js

@@ -78,5 +78,12 @@ export default {
       url: '/paymentinfo/ispermission',
       method: 'GET'
     })
-  }
+  },
+  selectInvoice (params, myAxios) {
+    return myAxios({
+      url: '/paymentinfo/selectInvoice',
+      method: 'post',
+      data: params
+    })
+  },
 }

+ 0 - 16
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -488,22 +488,6 @@ import WfHistory from '@/components/workflow/wfmultihistory.vue'
         })
       },
 
-      getorgtreelist () {
-        let _this = this
-        let params = {
-          IsInnerOrganize: 1
-        }
-        _this.$axios.get('organizes/orgalllist', {
-          params
-        })
-          .then(res => {
-            _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
-          })
-          .catch(err => {
-            console.error(err)
-          })
-      },
-
       getDictOptions () {
         supplierapi.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items

+ 7 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/paymentinfo/icbclist.vue

@@ -17,7 +17,9 @@
             <el-form-item label="">
               <el-input v-model="searchForm.commercialNo" placeholder="组织机构代码" style="width: 300px"></el-input>
             </el-form-item>
-
+            <el-form-item label="">
+              <el-input v-model="Remark" placeholder="备注" style="width: 300px"></el-input>
+            </el-form-item>
             <el-form-item>
               <el-button type="plain" plain icon="el-icon-search" @click="handleSearch" :loading="btnLoading">获取账单</el-button>
               <el-button type="primary" icon="el-icon-money" @click="handleGetMoneyConfirm" :loading="btnLoading">确认收款</el-button>
@@ -114,7 +116,8 @@
         searchForm: {
           commercialNo: ''
 
-        }
+        },
+        Remark: ''
       }
     },
     created () {
@@ -241,7 +244,8 @@
           bankName: '现场交费',
           bankSerialNum: this.RndNum(11) + '_SD',
           // payDate: new Date(),
-          payMode: '现金'
+          payMode: '现金',
+          remark: this.Remark
         }
         // 下面调用接口修改状态
         api.receiveMoneyBillList(params, this.$axios).then(res => {

+ 21 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/paymentinfo/paymented.vue

@@ -15,7 +15,7 @@
                             <!--start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>-->
           <!--</el-form-item>-->
           <el-form-item label="公司名称">
-            <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入" style="width: 100%"></el-input>
+            <el-input size="mini" v-model="searchForm.SupplierName" clearable placeholder="请输入" style="width: 100%"></el-input>
           </el-form-item>
           <el-form-item label="项目类别">
             <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeCode" placeholder="准入类别">
@@ -37,11 +37,13 @@
         </el-form>
       </div>
       <el-table :data="entityList" border  size="mini" height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
-        <el-table-column label="操作" width="100" align="center" fixed="right">
+        <el-table-column label="操作" width="200" align="center" fixed="right">
           <template slot-scope="scope">
             <router-link :to="'/oilsupplier/paymentinfo/' + scope.row.Id + '/operation'">
               <el-button type="primary" plain title="查看详情" size="mini">打开</el-button>
             </router-link>
+            &nbsp;
+            <el-button type="primary" plain title="查看发票" size="mini" @click="selectPdf(scope.row.Id)">查看发票</el-button>
           </template>
         </el-table-column>
 
@@ -253,7 +255,23 @@
         this.CreateOn = ''
         this.initDatas()
       },
-
+      selectPdf(id) {
+        let param = {
+          Id: id
+        }
+        api.selectInvoice(param, this.$axios).then(res=>{
+          if (res.data.Url != '') {
+            window.open(res.data.Url)
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '暂无发票!'
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       transferStr (val) {
         if (val === '1') {
           return '准入交费'