Browse Source

发票合同修改

chen 3 weeks ago
parent
commit
f38e56712c

+ 4 - 2
src/utils/htmltopdf.js

@@ -43,12 +43,14 @@ const htmltopdf  = {
     // 根据 A4 的宽高计算 DOM 页面一页应该对应的高度
     let pageheight = printdom.offsetWidth / 592.28 * 880; 
     // 将所有不允许被截断的元素进行处理
-    let wholeNodes = document.querySelectorAll('p,table'); 
+    // let wholeNodes = document.querySelectorAll('p,table,.page-break'); 
+    let wholeNodes = document.querySelectorAll('p,table,.page-break'); 
     for (let i = 0; i < wholeNodes.length; i++) {
       // 1. 判断当前的不可分页元素是否在两页显示
       const topPagenum = Math.ceil((wholeNodes[i].offsetTop) / pageheight);
       const bottomPagenum = Math.ceil((wholeNodes[i].offsetTop + wholeNodes[i].offsetHeight) / pageheight);
       if (topPagenum!== bottomPagenum) { 
+      debugger
         // 说明该 DOM 会被截断
         // 2. 插入空白块使被截断元素下移
         let divParent = wholeNodes[i].parentNode;
@@ -57,7 +59,7 @@ const htmltopdf  = {
         newBlock.style.background = '#fff'; 
         // 3. 计算插入空白块的高度,可以适当流出空间使得内容不太靠边,根据自己需求而定
         let _h = topPagenum * pageheight - wholeNodes[i].offsetTop;
-        newBlock.style.height = _h + 20 + 'px'; 
+        newBlock.style.height = _h + 24 + 'px'; 
         divParent.insertBefore(newBlock, wholeNodes[i]); 
       }
     }

+ 4 - 3
src/views/contract/basicData/basicSupplier/index.vue

@@ -31,10 +31,11 @@
         <el-button type="success" plain icon="el-icon-bottom" size="mini" @click="openSyncForm(undefined)"
                    v-hasPermi="['contract:basic-supplier:sync']">同步</el-button>
       </el-col>
-      <!-- <el-col :span="1.5">
+      <el-col :span="1.5">
+        <!-- v-hasPermi="['contract:basic-supplier:export']" -->
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
-                   v-hasPermi="['contract:basic-supplier:export']">导出</el-button>
-      </el-col> -->
+                  >导出</el-button>
+      </el-col>
               <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 

+ 1 - 0
src/views/contract/contractTemplate/TemplateForm.vue

@@ -151,6 +151,7 @@
                     <el-button type="danger"  size="small" @click="addValue('运输方式')"> 运输方式 </el-button>
                     <el-button type="danger"  size="small" @click="addValue('运输方式描述')"> 运输方式描述 </el-button>
                     <el-button type="danger"  size="small" @click="addValue('付款方式')"> 付款方式 </el-button>
+                    <el-button type="danger"  size="small" @click="addValue('框架协议名')"> 框架协议名 </el-button>
                     <el-button type="danger"  size="small" @click="addValue('框架协议号')"> 框架协议号 </el-button>
                     <el-button type="danger"  size="small" @click="addValue('区域名称')"> 区域名称 </el-button>
                     <el-button type="danger"  size="small" @click="addValue('雇员名称')"> 雇员名称 </el-button>

+ 1 - 1
src/views/contract/invoice/index.vue

@@ -233,7 +233,7 @@
       <el-table-column label="编号" type="index" width="50" align="center"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
         <template v-slot="scope">
-          <el-popconfirm title="确认关闭发票么?" @confirm="handleUpdateStatus(scope.row,'-2')" v-if="scope.row.status==0" >
+          <el-popconfirm title="确认关闭发票么?" @confirm="handleUpdateStatus(scope.row,'-2')" v-if="scope.row.status==0 || scope.row.status==2" >
             <el-button size="mini" type="text" icon="el-icon-circle-close" slot="reference">关闭</el-button>
           </el-popconfirm>
             <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetails(scope.row.id)">详情</el-button>

+ 7 - 3
src/views/contract/invoice/list.vue

@@ -238,13 +238,17 @@
       <el-table-column label="客户编码" align="center" prop="clientCode" width="100" show-overflow-tooltip sortable="custom"/>
       <el-table-column label="购方名称" align="center" prop="gfmc" width="200" show-overflow-tooltip sortable="custom"/>
       <el-table-column label="销售凭证" align="center" prop="ddh" width="100" show-overflow-tooltip sortable="custom"/>
-      <el-table-column label="凭证日期" align="center" prop="audat" width="150" show-overflow-tooltip sortable="custom">
+      <el-table-column label="凭证日期" align="center" prop="audat" width="100" show-overflow-tooltip sortable="custom">
         <template v-slot="scope">
-          <span>{{ parseTime(scope.row.audat) }}</span>
+          <span>{{ parseTime(scope.row.audat, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="开票月" align="center" prop="invoiceMonth" width="100" show-overflow-tooltip sortable="custom"/>
-      <el-table-column label="开票日期" align="center" prop="kprq" width="150" show-overflow-tooltip sortable="custom"/>
+      <el-table-column label="开票日期" align="center" prop="kprq" width="100" show-overflow-tooltip sortable="custom">
+        <template v-slot="scope">
+          {{parseTime(scope.row.kprq, '{y}-{m}-{d}')}} 
+        </template>
+      </el-table-column>
       <el-table-column label="发票号码" align="center" prop="fphm" width="180" show-overflow-tooltip sortable="custom"/>
       <el-table-column label="发票状态" align="center" prop="fpzt" width="100" show-overflow-tooltip sortable="custom">
         <template v-slot="scope">