Browse Source

7.15的代码

Tartarus 3 years ago
parent
commit
f419fe8251

BIN
dist.rar


+ 11 - 6
src/layout/components/Navbar.vue

@@ -16,9 +16,14 @@
               首页
               首页
             </el-dropdown-item>
             </el-dropdown-item>
           </router-link>
           </router-link>
-          <el-dropdown-item divided @click.native="logout">
+          <!-- <el-dropdown-item divided @click.native="logout">
             <span style="display:block;">退出</span>
             <span style="display:block;">退出</span>
-          </el-dropdown-item>
+          </el-dropdown-item> -->
+		  <router-link to="/login">
+		    <el-dropdown-item>
+		      退出
+		    </el-dropdown-item>
+		  </router-link>
         </el-dropdown-menu>
         </el-dropdown-menu>
       </el-dropdown>
       </el-dropdown>
     </div>
     </div>
@@ -45,10 +50,10 @@ export default {
     toggleSideBar() {
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
       this.$store.dispatch('app/toggleSideBar')
     },
     },
-    async logout() {
-      await this.$store.dispatch('user/logout')
-      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
-    }
+    // async logout() {
+    //   await this.$store.dispatch('user/logout')
+    //   this.$router.push({path:'/login'})
+    // }
   }
   }
 }
 }
 </script>
 </script>

+ 1 - 0
src/utils/request.js

@@ -17,6 +17,7 @@ service.interceptors.request.use(
   config => {
   config => {
     // do something before request is sent
     // do something before request is sent
         config.headers['Content-Type'] = 'application/json'
         config.headers['Content-Type'] = 'application/json'
+				// config.headers['Content-Type']='charset=utf-8'
 		config.headers = {'User-Agent-type': 'apifox/1.0.0 (https://www.apifox.cn)'}
 		config.headers = {'User-Agent-type': 'apifox/1.0.0 (https://www.apifox.cn)'}
     if (store.getters.token) {
     if (store.getters.token) {
       // let each request carry token
       // let each request carry token

+ 426 - 446
src/views/contracts/addcontract.vue

@@ -1,474 +1,454 @@
 <template>
 <template>
-  <div class="app-container">
-    <el-card class="box-card" style="padding: 20px 10px;margin-bottom: 20px;">
-      <el-row>
-       <!-- <el-form ref="form" :model="form" label-width="90px">
+	<div class="app-container">
+		<el-card class="box-card" style="padding: 20px 10px;margin-bottom: 20px;">
+			<el-row>
+				<div class="contract">
+					<div>
+						<p>合同名称</p>
+						<el-input v-model='contractName' placeholder="请输入合同名称" style="width: 500px;"></el-input>
+					</div>
+					<div>
+						<p>合同编号</p>
+						<el-input v-model='contractNumber' placeholder="请输入合同编号" style="width: 500px;"></el-input>
+					</div>
+				</div>
 
 
-        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" style="padding:0 15px;">
-          <el-form-item label="汇票名称" :rules="[{  message: '姓名不能为空不能为空'}]">
-            <el-input v-model="form.name" class="ipwidth" placeholder="请填写汇票名称" />
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" style="padding:0 15px;">
-          <el-form-item label="汇票名称" :rules="[{  message: '姓名不能为空不能为空'}]">
-            <el-input v-model="form.name" class="ipwidth" placeholder="请填写汇票名称" />
-          </el-form-item>
-        </el-col>
-        </el-form> -->
-        <div class="contract">
-          <div >
-             <p>合同名称</p>
-             <el-input v-model='contractName' placeholder="请输入合同名称" style="width: 500px;"></el-input>
-           </div>
-          <div>
-            <p>合同编号</p>
-            <el-input v-model='contractNumber' placeholder="请输入合同编号" style="width: 500px;"></el-input>
-          </div>
-        </div>
+				<div class="titlesa">
+					<span>合同附件</span>
+					<span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
+				</div>
+				<div>
+					<el-upload action="#" list-type="picture-card" :auto-upload="false">
+						<i slot="default" class="el-icon-plus"></i>
+						<div slot="file" slot-scope="{file}">
+							<img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+							<span class="el-upload-list__item-actions">
+								<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+									<i class="el-icon-zoom-in"></i>
+								</span>
+								<span v-if="!disabled" class="el-upload-list__item-delete"
+									@click="handleDownload(file)">
+									<i class="el-icon-download"></i>
+								</span>
+								<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+									<i class="el-icon-delete"></i>
+								</span>
+							</span>
+						</div>
+					</el-upload>
+					<el-dialog :visible.sync="dialogVisible">
+						<img width="100%" :src="dialogImageUrl" alt="">
+					</el-dialog>
+				</div>
+				<div class="titlesa">
+					<span>发票附件</span>
+					<span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
+				</div>
+				<div>
+					<el-upload action="#" list-type="picture-card" :auto-upload="false">
+						<i slot="default" class="el-icon-plus"></i>
+						<div slot="file" slot-scope="{file}">
+							<img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+							<span class="el-upload-list__item-actions">
+								<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+									<i class="el-icon-zoom-in"></i>
+								</span>
+								<span v-if="!disabled" class="el-upload-list__item-delete"
+									@click="handleDownload(file)">
+									<i class="el-icon-download"></i>
+								</span>
+								<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+									<i class="el-icon-delete"></i>
+								</span>
+							</span>
+						</div>
+					</el-upload>
+					<el-dialog :visible.sync="dialogVisible">
+						<img width="100%" :src="dialogImageUrl" alt="">
+					</el-dialog>
+				</div>
+				<div class="titlesa">
+					<span>贸易合同</span>
+					<span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
+				</div>
+				<div>
+					<el-upload action="#" list-type="picture-card" :auto-upload="false">
+						<i slot="default" class="el-icon-plus"></i>
+						<div slot="file" slot-scope="{file}">
+							<img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+							<span class="el-upload-list__item-actions">
+								<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+									<i class="el-icon-zoom-in"></i>
+								</span>
+								<span v-if="!disabled" class="el-upload-list__item-delete"
+									@click="handleDownload(file)">
+									<i class="el-icon-download"></i>
+								</span>
+								<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+									<i class="el-icon-delete"></i>
+								</span>
+							</span>
+						</div>
+					</el-upload>
+					<el-dialog :visible.sync="dialogVisible">
+						<img width="100%" :src="dialogImageUrl" alt="">
+					</el-dialog>
+				</div>
+			</el-row>
+		</el-card>
 
 
-       <div class="titlesa">
-         <span>合同附件</span>
-         <span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
-       </div>
-       <div>
-         <el-upload action="#" list-type="picture-card" :auto-upload="false">
-           <i slot="default" class="el-icon-plus"></i>
-           <div slot="file" slot-scope="{file}">
-             <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
-             <span class="el-upload-list__item-actions">
-               <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                 <i class="el-icon-zoom-in"></i>
-               </span>
-               <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
-                 <i class="el-icon-download"></i>
-               </span>
-               <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                 <i class="el-icon-delete"></i>
-               </span>
-             </span>
-           </div>
-         </el-upload>
-         <el-dialog :visible.sync="dialogVisible">
-           <img width="100%" :src="dialogImageUrl" alt="">
-         </el-dialog>
-       </div>
-       <div class="titlesa">
-         <span>发票附件</span>
-         <span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
-       </div>
-       <div>
-         <el-upload action="#" list-type="picture-card" :auto-upload="false">
-           <i slot="default" class="el-icon-plus"></i>
-           <div slot="file" slot-scope="{file}">
-             <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
-             <span class="el-upload-list__item-actions">
-               <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                 <i class="el-icon-zoom-in"></i>
-               </span>
-               <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
-                 <i class="el-icon-download"></i>
-               </span>
-               <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                 <i class="el-icon-delete"></i>
-               </span>
-             </span>
-           </div>
-         </el-upload>
-         <el-dialog :visible.sync="dialogVisible">
-           <img width="100%" :src="dialogImageUrl" alt="">
-         </el-dialog>
-       </div>
-       <div class="titlesa">
-         <span>贸易合同</span>
-         <span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
-       </div>
-       <div>
-         <el-upload action="#" list-type="picture-card" :auto-upload="false">
-           <i slot="default" class="el-icon-plus"></i>
-           <div slot="file" slot-scope="{file}">
-             <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
-             <span class="el-upload-list__item-actions">
-               <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                 <i class="el-icon-zoom-in"></i>
-               </span>
-               <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
-                 <i class="el-icon-download"></i>
-               </span>
-               <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                 <i class="el-icon-delete"></i>
-               </span>
-             </span>
-           </div>
-         </el-upload>
-         <el-dialog :visible.sync="dialogVisible">
-           <img width="100%" :src="dialogImageUrl" alt="">
-         </el-dialog>
-       </div>
-    </el-row>
-    </el-card>
+		<el-card class="box-card" style="padding: 20px 10px;margin: 20px 0px;" ref="draft" v-for="(item,index) in list"
+			:key="index">
+			<el-row>
+				<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
+					<el-form ref="form" :model="form" label-width="90px">
 
 
-    <el-card class="box-card" style="padding: 20px 10px;margin: 20px 0px;" ref="draft" v-for="(item,index) in list" :key="index">
-      <el-row>
-        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
-          <el-form ref="form" :model="form" label-width="90px">
+						<el-form-item label="汇票名称" :rules="[{  message: '姓名不能为空不能为空'}]">
+							<el-input v-model="form.name" class="ipwidth" placeholder="请填写汇票名称" />
+						</el-form-item>
+						<el-form-item label="金额" :rules="[{ message: '电话号码不能为空'}]">
+							<el-input v-model="form.money" class="ipwidth" placeholder="请填写金额" />
+						</el-form-item>
+						<el-form-item label="预计贴现日" :rules="[{  message: '身份证不能为空'}]">
+							<el-date-picker v-model="value1" type="date" placeholder="选择日期">
+							</el-date-picker>
+						</el-form-item>
+						<el-form-item label="利率" :rules="[{  message: '身份证不能为空'}]">
+							<el-input v-model="form.count" class="ipwidth" placeholder="请填写利率" />
+						</el-form-item>
+						</el-form-item>
+					</el-form>
+				</el-col>
+				<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
+					<el-form ref="form" :model="form" label-width="110px">
 
 
-            <el-form-item label="汇票名称" :rules="[{  message: '姓名不能为空不能为空'}]">
-              <el-input v-model="form.name" class="ipwidth" placeholder="请填写汇票名称" />
-            </el-form-item>
-            <el-form-item label="金额" :rules="[{ message: '电话号码不能为空'}]">
-              <el-input v-model="form.money" class="ipwidth" placeholder="请填写金额" />
-            </el-form-item>
-            <el-form-item label="预计贴现日" :rules="[{  message: '身份证不能为空'}]">
-              <el-date-picker v-model="value1" type="date" placeholder="选择日期">
-              </el-date-picker>
-            </el-form-item>
-            <el-form-item label="利率" :rules="[{  message: '身份证不能为空'}]">
-              <el-input v-model="form.count" class="ipwidth" placeholder="请填写利率" />
-            </el-form-item>
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
-          <el-form ref="form" :model="form" label-width="110px">
+						<el-form-item label="汇票号码" :rules="[{  message: '姓名不能为空不能为空'}]">
+							<el-input v-model="form.nom" class="ipwidth" placeholder="请填写汇票号码" />
+						</el-form-item>
+						<el-form-item label="承兑日期" :rules="[{ message: '电话号码不能为空'}]">
+							<el-date-picker v-model="value2" type="date" placeholder="选择日期">
+							</el-date-picker>
+						</el-form-item>
+						<el-form-item label="最高贷款额度" :rules="[{  message: '身份证不能为空'}]">
+							<el-input v-model="form.max_mony" class="ipwidth" placeholder="请填写最高贷款额度" />
+						</el-form-item>
+						<el-form-item label="利息" :rules="[{  message: '身份证不能为空'}]">
+							<el-input v-model="form.rate" class="ipwidth" placeholder="请填写利息" />
+						</el-form-item>
 
 
-            <el-form-item label="汇票号码" :rules="[{  message: '姓名不能为空不能为空'}]">
-              <el-input v-model="form.nom" class="ipwidth" placeholder="请填写汇票号码" />
-            </el-form-item>
-            <el-form-item label="承兑日期" :rules="[{ message: '电话号码不能为空'}]">
-              <el-date-picker v-model="value2" type="date" placeholder="选择日期">
-              </el-date-picker>
-            </el-form-item>
-            <el-form-item label="最高贷款额度" :rules="[{  message: '身份证不能为空'}]">
-              <el-input v-model="form.max_mony" class="ipwidth" placeholder="请填写最高贷款额度" />
-            </el-form-item>
-            <el-form-item label="利息" :rules="[{  message: '身份证不能为空'}]">
-              <el-input v-model="form.rate" class="ipwidth" placeholder="请填写利息" />
-            </el-form-item>
 
 
+						</el-form-item>
+					</el-form>
+				</el-col>
+				<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
+					<el-form ref="form" :model="form" label-width="80px">
 
 
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
-          <el-form ref="form" :model="form" label-width="80px">
+						<el-form-item label="承兑人">
+							<el-select v-model="form.accepetper" placeholder="请选择承兑人" class="ipwidth">
+								<el-option label="区域一" value="shanghai"></el-option>
+								<el-option label="区域二" value="beijing"></el-option>
+							</el-select>
+						</el-form-item>
+						<el-form-item label="出票日期">
+							<el-date-picker v-model="value3" type="date" placeholder="选择日期" class="ipwidth">
+							</el-date-picker>
+						</el-form-item>
+						<el-form-item label="服务费率">
+							<el-input v-model="form.serpointo" class="ipwidth" placeholder="请填写服务费率" />
+						</el-form-item>
 
 
-            <el-form-item label="承兑人">
-              <el-select v-model="form.accepetper" placeholder="请选择承兑人" class="ipwidth">
-                <el-option label="区域一" value="shanghai"></el-option>
-                <el-option label="区域二" value="beijing"></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="出票日期">
-              <el-date-picker v-model="value3" type="date" placeholder="选择日期" class="ipwidth">
-              </el-date-picker>
-            </el-form-item>
-            <el-form-item label="服务费率">
-              <el-input v-model="form.serpointo" class="ipwidth" placeholder="请填写服务费率" />
-            </el-form-item>
+					</el-form>
 
 
-          </el-form>
+				</el-col>
+				<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
+					<el-form ref="form" :model="form.drawper" label-width="85px">
+						<el-form-item label="出票人">
+							<el-select v-model="form.region" placeholder="请选择出票人" class="ipwidth">
+								<el-option label="区域一" value="shanghai"></el-option>
+								<el-option label="区域二" value="beijing"></el-option>
+							</el-select>
+						</el-form-item>
+						<el-form-item label="汇票到期日">
+							<el-date-picker v-model="value4" type="date" placeholder="选择日期" class="ipwidth">
+							</el-date-picker>
+						</el-form-item>
+						<el-form-item label="服务费">
+							<el-input v-model="form.serpointt" class="ipwidth" placeholder="请填写服务费" />
+						</el-form-item>
+					</el-form>
 
 
-        </el-col>
-        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" style="padding:0 15px;">
-          <el-form ref="form" :model="form.drawper" label-width="85px">
-            <el-form-item label="出票人">
-              <el-select v-model="form.region" placeholder="请选择出票人" class="ipwidth">
-                <el-option label="区域一" value="shanghai"></el-option>
-                <el-option label="区域二" value="beijing"></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="汇票到期日">
-              <el-date-picker v-model="value4" type="date" placeholder="选择日期" class="ipwidth">
-              </el-date-picker>
-            </el-form-item>
-            <el-form-item label="服务费">
-              <el-input v-model="form.serpointt" class="ipwidth" placeholder="请填写服务费" />
-            </el-form-item>
-          </el-form>
+				</el-col>
 
 
-        </el-col>
+			</el-row>
+			<el-row>
+				<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="margin:0 30px;;">
+					<div class="titlesa">
+						<span>附件</span>
+						<span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
+					</div>
+					<div>
+						<el-upload accept=".pdf, .jpg, .jpeg, .png" action="#" :file-list="fileArr"
+							list-type="picture-card" :show-file-list="true" :auto-upload="false"
+							:before-upload="beforeUpload" :on-success="upSuccess" :on-error="upError"
+							:on-change="imgPreview">
 
 
-      </el-row>
-      <el-row>
-        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="margin:0 30px;;">
-          <div class="titlesa">
-            <span>附件</span>
-            <span style="color: #D05C39;">*支持上传pdf、jpg/jpeg、png格式</span>
-          </div>
-          <div>
-            <!-- <el-upload action="#" list-type="picture-card" :auto-upload="false" accept=".pdf,.jpg,.jpeg,.png">
-              <i slot="default" class="el-icon-plus"></i>
-              <div slot="file" slot-scope="{file}">
-                <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
-                <span class="el-upload-list__item-actions">
-                  <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                    <i class="el-icon-zoom-in"></i>
-                  </span>
-                  <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
-                    <i class="el-icon-download"></i>
-                  </span>
-                  <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                    <i class="el-icon-delete"></i>
-                  </span>
-                </span>
-              </div>
-            </el-upload> -->
-             <el-upload accept=".pdf, .jpg, .jpeg, .png"
-                            action="#" :file-list="fileArr" list-type="picture-card"
-                            :show-file-list="true" :auto-upload="false" :before-upload="beforeUpload"
-                            :on-success="upSuccess" :on-error="upError" :on-change="imgPreview">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+						<el-dialog :visible.sync="dialogVisible">
+							<img width="100%" :src="dialogImageUrl" alt="">
+						</el-dialog>
+					</div>
+				</el-col>
+			</el-row>
+		</el-card>
+		<div class="commit">
+			<div class="addnew">
+				<el-button type="info" @click="adddraft">新增汇票</el-button>
+			</div>
+			<div class="addall">
+				<el-button type="warning" style="width: 180px;height: 45px;font-size: 16px;" @click="onSubmit">确认上传
+				</el-button>
+			</div>
+		</div>
 
 
-                            <i class="el-icon-plus"></i>
-                </el-upload>
-            <el-dialog :visible.sync="dialogVisible">
-              <img width="100%" :src="dialogImageUrl" alt="">
-            </el-dialog>
-          </div>
-        </el-col>
-      </el-row>
-    </el-card>
-    <div class="commit">
-      <div class="addnew">
-        <el-button type="info" @click="adddraft">新增汇票</el-button>
-      </div>
-      <div class="addall">
-        <el-button type="warning" style="width: 180px;height: 45px;font-size: 16px;" @click="onSubmit">确认上传</el-button>
-      </div>
-    </div>
-
-  </div>
+	</div>
 </template>
 </template>
 
 
 <script>
 <script>
-  import  pdf from 'vue-pdf'
-  export default {
-    components:{pdf},
-    data() {
-      return {
-        url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
-        srcList: [
-          'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
-          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
-        ],
-        resource: '',
-        radio: '1',
-        activeNames: '',
-        list:[
-          {
-            contractName:'',
-            contractNumber:'',
-            name: '',
-            money: '',
-            count: '',
-            nom: '',
-            max_mony: '',
-            rate: '',
-            serpointo: '',
-            serpointt: '',
-            drawper: '',
-            accepetper: ''
-          },
-        ],
-        form: {
-          contractName:'',
-          contractNumber:'',
-          name: '',
-          money: '',
-          count: '',
-          nom: '',
-          max_mony: '',
-          rate: '',
-          serpointo: '',
-          serpointt: '',
-          drawper: '',
-          accepetper: ''
-        },
-        pdfUrl:'',
-        numPages:[],
-        fileArr:[],
-        upLoadImgUrl:'',
-        pickerOptions: {
-          disabledDate(time) {
-            return time.getTime() > Date.now();
-          },
-          shortcuts: [{
-            text: '今天',
-            onClick(picker) {
-              picker.$emit('pick', new Date());
-            }
-          }, {
-            text: '昨天',
-            onClick(picker) {
-              const date = new Date();
-              date.setTime(date.getTime() - 3600 * 1000 * 24);
-              picker.$emit('pick', date);
-            }
-          }, {
-            text: '一周前',
-            onClick(picker) {
-              const date = new Date();
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', date);
-            }
-          }]
-        },
-        value1: '',
-        value2: '',
-        value3: '',
-        value4: '',
-        dialogImageUrl: '',
-        dialogVisible: false,
-        disabled: false
-      }
-    },
-    methods: {
-      beforeUpload(file) {
-            const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
-            const whiteList = ["pdf", "jpg", "jpeg", "png"];
-            if (whiteList.indexOf(fileSuffix) === -1) {
-              this.$msg("上传文件只能是 pdf、jpg、jpeg、png", "error");
-              return false;
-            }
-          },
-          imgPreview(file) {
-            this.fileArr = [];
-            this.fileArr.push(file);
-            this.form.position = "";
-            console.log(file);
-            this.form.position = file.name;
-            let fileName = file.name;
-            let regex = /(.jpg|.jpeg|.gif|.png|.pdf)$/;
-            if (regex.test(fileName.toLowerCase())) {
-              this.upLoadImgUrl = URL.createObjectURL(file.raw); // 获取URL
-              this.pdfUrl = this.getPdfUrl(file);
-              console.log(this.upLoadImgUrl);
-            } else {
-              this.$message.error("请选择图片文件");
-            }
-          },
- // 上传成功
-    upSuccess(res) {
-      this.$message({
-        message: "上传成功",
-        type: "success",
-      });
-    },
-    // 上传失败
-    upError(e) {
-      this.$message({
-        message: "上传失败",
-        type: "error",
-      });
-    },
- getPdfUrl(file) {
-      console.log(file);
-      let url = window.URL.createObjectURL(file.raw); //将文件转化成url
-      //加载pdf
-      let loadingTask = pdf.createLoadingTask(url);
-      loadingTask.promise
-        .then((pdf) => {
-          this.numPages = pdf.numPages;
-          console.log(this.numPages);
-        })
-        .catch((err) => {
-          console.error("pdf 加载失败", err);
-        });
-      return url;
-    },
-      // handleRemove(file) {
-      //   console.log(file);
-      // },
-      // handlePictureCardPreview(file) {
-      //   this.dialogImageUrl = file.url;
-      //   this.dialogVisible = true;
-      // },
-      // handleDownload(file) {
-      //   console.log(file);
-      // },
-      // handleChange() {
+	import pdf from 'vue-pdf'
+	export default {
+		components: {
+			pdf
+		},
+		data() {
+			return {
+				url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
+				srcList: [
+					'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
+					'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
+				],
+				resource: '',
+				radio: '1',
+				activeNames: '',
+				list: [{
+					contractName: '',
+					contractNumber: '',
+					name: '',
+					money: '',
+					count: '',
+					nom: '',
+					max_mony: '',
+					rate: '',
+					serpointo: '',
+					serpointt: '',
+					drawper: '',
+					accepetper: ''
+				}, ],
+				form: {
+					contractName: '',
+					contractNumber: '',
+					name: '',
+					money: '',
+					count: '',
+					nom: '',
+					max_mony: '',
+					rate: '',
+					serpointo: '',
+					serpointt: '',
+					drawper: '',
+					accepetper: ''
+				},
+				pdfUrl: '',
+				numPages: [],
+				fileArr: [],
+				upLoadImgUrl: '',
+				pickerOptions: {
+					disabledDate(time) {
+						return time.getTime() > Date.now();
+					},
+					shortcuts: [{
+						text: '今天',
+						onClick(picker) {
+							picker.$emit('pick', new Date());
+						}
+					}, {
+						text: '昨天',
+						onClick(picker) {
+							const date = new Date();
+							date.setTime(date.getTime() - 3600 * 1000 * 24);
+							picker.$emit('pick', date);
+						}
+					}, {
+						text: '一周前',
+						onClick(picker) {
+							const date = new Date();
+							date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
+							picker.$emit('pick', date);
+						}
+					}]
+				},
+				value1: '',
+				value2: '',
+				value3: '',
+				value4: '',
+				dialogImageUrl: '',
+				dialogVisible: false,
+				disabled: false
+			}
+		},
+		methods: {
+			beforeUpload(file) {
+				const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
+				const whiteList = ["pdf", "jpg", "jpeg", "png"];
+				if (whiteList.indexOf(fileSuffix) === -1) {
+					this.$msg("上传文件只能是 pdf、jpg、jpeg、png", "error");
+					return false;
+				}
+			},
+			imgPreview(file) {
+				this.fileArr = [];
+				this.fileArr.push(file);
+				this.form.position = "";
+				console.log(file);
+				this.form.position = file.name;
+				let fileName = file.name;
+				let regex = /(.jpg|.jpeg|.gif|.png|.pdf)$/;
+				if (regex.test(fileName.toLowerCase())) {
+					this.upLoadImgUrl = URL.createObjectURL(file.raw); // 获取URL
+					this.pdfUrl = this.getPdfUrl(file);
+					console.log(this.upLoadImgUrl);
+				} else {
+					this.$message.error("请选择图片文件");
+				}
+			},
+			// 上传成功
+			upSuccess(res) {
+				this.$message({
+					message: "上传成功",
+					type: "success",
+				});
+			},
+			// 上传失败
+			upError(e) {
+				this.$message({
+					message: "上传失败",
+					type: "error",
+				});
+			},
+			getPdfUrl(file) {
+				console.log(file);
+				let url = window.URL.createObjectURL(file.raw); //将文件转化成url
+				//加载pdf
+				let loadingTask = pdf.createLoadingTask(url);
+				loadingTask.promise
+					.then((pdf) => {
+						this.numPages = pdf.numPages;
+						console.log(this.numPages);
+					})
+					.catch((err) => {
+						console.error("pdf 加载失败", err);
+					});
+				return url;
+			},
+			// handleRemove(file) {
+			//   console.log(file);
+			// },
+			// handlePictureCardPreview(file) {
+			//   this.dialogImageUrl = file.url;
+			//   this.dialogVisible = true;
+			// },
+			// handleDownload(file) {
+			//   console.log(file);
+			// },
+			// handleChange() {
+
+			// },
+			onSubmit() {
+				this.$message('submit!')
 
 
-      // },
-      onSubmit() {
-        this.$message('submit!')
-		
-      },
-      onCancel() {
-        this.$message({
-          message: 'cancel!',
-          type: 'warning'
-        })
-      },
-      adddraft(){
-        let form={
-          contractName:'',
-          contractNumber:'',
-          name: '',
-          money: '',
-          count: '',
-          nom: '',
-          max_mony: '',
-          rate: '',
-          serpointo: '',
-          serpointt: '',
-          drawper: '',
-          accepetper: ''
-        }
-        this.list.push(form)
-      }
-    }
-  }
+			},
+			onCancel() {
+				this.$message({
+					message: 'cancel!',
+					type: 'warning'
+				})
+			},
+			adddraft() {
+				let form = {
+					contractName: '',
+					contractNumber: '',
+					name: '',
+					money: '',
+					count: '',
+					nom: '',
+					max_mony: '',
+					rate: '',
+					serpointo: '',
+					serpointt: '',
+					drawper: '',
+					accepetper: ''
+				}
+				this.list.push(form)
+			}
+		}
+	}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-  .line {
-    text-align: center;
-  }
+	.line {
+		text-align: center;
+	}
+
+	.ipwidth {
+		width: 100%;
+	}
+
+
+	.el-radio__label {
+		margin-left: 80px;
+	}
+
+	.el-collapse-item__header {
+		font-weight: 600;
+		color: #606266;
+	}
+
+	.addnew {
+		display: flex;
+		justify-content: flex-end;
+	}
 
 
-  .ipwidth {
-    width: 100%;
-  }
+	.addall {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin-top: 40px;
+	}
 
 
+	.titlesa {
+		margin: 20px 0;
 
 
-  .el-radio__label {
-    margin-left: 80px;
-  }
+		span:nth-child(2) {
+			font-size: 10px;
+			margin: 0 20px
+		}
+	}
 
 
-  .el-collapse-item__header {
-    font-weight: 600;
-    color: #606266;
-  }
+	.contract {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 20px;
+	}
 
 
-  .addnew {
-    display: flex;
-    justify-content: flex-end;
-  }
+	.el-upload {
+		width: 100px;
+		height: 100px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 
 
-  .addall {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-top: 40px;
-  }
-  .titlesa{
-    margin: 20px 0;
-    span:nth-child(2){
-      font-size: 10px;
-      margin:0 20px
-    }
-  }
-  .contract{
-    display: flex;
-    justify-content:space-between;
-    margin-bottom: 20px;
-  }
-  .el-upload{
-    width: 100px;
-    height: 100px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-  }
-  .commit{
-    margin: 20px 0;
-  }
+	.commit {
+		margin: 20px 0;
+	}
 </style>
 </style>

+ 248 - 257
src/views/contracts/index.vue

@@ -1,273 +1,264 @@
 <template>
 <template>
-  <div class="app-container">
-    <el-row  style="">
-      <el-col :xs="24" :sm="24" :md="12" :lg="4" :xl="3">
-        <div class="grid-content bg-purple">
-          <el-dropdown @command="handleCommand">
-            <div class="pulldown">
-              <span class="el-dropdown-link" v-if="!status">
-                合同状态
-              </span>
-              <span class="el-dropdown-link" v-if="status">
-                {{status}}
-              </span>
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </div>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="未通过">未通过</el-dropdown-item>
-              <el-dropdown-item command="待审核">待审核</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="3">
-        <div class="grid-content bg-purple">
-          <el-dropdown @command="handlehpCommand()">
-            <div class="pulldown">
-              <span class="el-dropdown-link" v-if="!hpstatus">
-                汇票状态
-              </span>
-              <span class="el-dropdown-link" v-if="hpstatus">
-                {{hpstatus}}
-              </span>
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </div>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="成功">成功</el-dropdown-item>
-              <el-dropdown-item command="失败">失败</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="6" :xl="5" >
-        <div class="grid-content bg-purple">
-          <div class="block">
-            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
-            </el-date-picker>
-          </div>
+	<div class="app-container">
+		<el-row style="">
+			<el-col :xs="24" :sm="24" :md="12" :lg="4" :xl="3">
+				<div class="grid-content bg-purple">
+					<el-dropdown @command="handleCommand">
+						<div class="pulldown">
+							<span class="el-dropdown-link" v-if="!status">
+								合同状态
+							</span>
+							<span class="el-dropdown-link" v-if="status">
+								{{status}}
+							</span>
+							<i class="el-icon-arrow-down el-icon--right"></i>
+						</div>
+						<el-dropdown-menu slot="dropdown">
+							<el-dropdown-item command="未通过">未通过</el-dropdown-item>
+							<el-dropdown-item command="待审核">待审核</el-dropdown-item>
+						</el-dropdown-menu>
+					</el-dropdown>
+				</div>
+			</el-col>
+			<el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="3">
+				<div class="grid-content bg-purple">
+					<el-dropdown @command="handlehpCommand()">
+						<div class="pulldown">
+							<span class="el-dropdown-link" v-if="!hpstatus">
+								汇票状态
+							</span>
+							<span class="el-dropdown-link" v-if="hpstatus">
+								{{hpstatus}}
+							</span>
+							<i class="el-icon-arrow-down el-icon--right"></i>
+						</div>
+						<el-dropdown-menu slot="dropdown">
+							<el-dropdown-item command="成功">成功</el-dropdown-item>
+							<el-dropdown-item command="失败">失败</el-dropdown-item>
+						</el-dropdown-menu>
+					</el-dropdown>
+				</div>
+			</el-col>
+			<el-col :xs="24" :sm="24" :md="24" :lg="6" :xl="5">
+				<div class="grid-content bg-purple">
+					<div class="block">
+						<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels
+							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+							:picker-options="pickerOptions">
+						</el-date-picker>
+					</div>
 
 
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="6">
-        <div class="grid-content bg-purple" style="margin-left: 25px;">
-          <el-input
-              placeholder="合同名称/编号、承兑人名称或出票..."
-              v-model="input4" style="width: 80%;">
-              <i slot="prefix" class="el-input__icon el-icon-search"></i>
-            </el-input>
-        </div>
-      </el-col>
-     <!-- <el-col :span="1">
-        <div class="grid-content bg-purple"></div>
-      </el-col> -->
-      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="7">
-        <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-           <el-button type="primary" @click="addNewContract" v-if="checked==1">上传合同</el-button>
-           <el-button type="primary" v-if="checked==0">审核失败</el-button>
-            <el-button type="primary" v-if="checked==0">审核成功</el-button>
-          <el-button type="primary">导出</el-button>
-            <el-button type="success">复原</el-button>
-            <el-button type="danger">删除</el-button>
-        </div>
-      </el-col>
+				</div>
+			</el-col>
+			<el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="6">
+				<div class="grid-content bg-purple" style="margin-left: 25px;">
+					<el-input placeholder="合同名称/编号、承兑人名称或出票..." v-model="input4" style="width: 80%;">
+						<i slot="prefix" class="el-input__icon el-icon-search"></i>
+					</el-input>
+				</div>
+			</el-col>
+			<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="7">
+				<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
+					<el-button type="primary" @click="addNewContract" v-if="checked==1">上传合同</el-button>
+					<el-button type="primary" v-if="checked==0">审核失败</el-button>
+					<el-button type="primary" v-if="checked==0">审核成功</el-button>
+					<el-button type="primary">导出</el-button>
+					<el-button type="success">复原</el-button>
+					<el-button type="danger">删除</el-button>
+				</div>
+			</el-col>
 
 
-    </el-row>
-    <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row  @select="handleSelectionChange">
-      <el-table-column align="center" label="" width="55" type="selection">
-        <!-- <template slot-scope="scope">
-         <el-checkbox v-model="checked"></el-checkbox>
-        </template> -->
-      </el-table-column>
-      <el-table-column label="合同名称"  align="center" width="340" prop="name">
-       <!-- <template slot-scope="scope">
-          成都韩晶供应商公司
-        </template> -->
-      </el-table-column>
-      <el-table-column label="合同编号"  align="center" prop="contractNo">
-       <!-- <template slot-scope="scope">
-          <span>合同编号</span>
-        </template> -->
-      </el-table-column>
-      <el-table-column label="承兑人" width="190" align="center" prop="acceptorName">
-        <!-- <template slot-scope="scope">
-          承兑人
-        </template> -->
-      </el-table-column>
-      <el-table-column label="出票人" width="190" align="center" prop="drawersName">
-        <!-- <template slot-scope="scope">
-          出票人
-        </template> -->
-      </el-table-column>
-      <el-table-column label="汇票状态" width="190" align="center" >
-        <template slot-scope="scope">
-          正常
-        </template>
-      </el-table-column>
-      <el-table-column label="合同状态" width="180" align="center" >
-        <template slot-scope="scope">
-          正常
-        </template>
-      </el-table-column>
-      <el-table-column class-name="status-col" label="审核状态" width="155" align="center" prop="statusText">
-        <!-- <template slot-scope="scope">
-          <el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>
-        </template> -->
-      </el-table-column>
-      <el-table-column align="center"  label="时间" prop="createdAt">
-        <!-- <template slot-scope="scope">
-          <i class="el-icon-time" />
-          <span>{{ scope.row.display_time }}</span>
-        </template> -->
-      </el-table-column>
-      <el-table-column align="center" prop="created_at" label="操作" width="200">
-        <template slot-scope="scope">
-          <el-tag type="success" style="cursor: pointer;" @click="tapDetail">查看详情</el-tag>
-         <!-- <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">通过</el-tag>
-          <el-tag type="info">不通过</el-tag> -->
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
-      <el-pagination
-        background
-        layout="prev, pager, next"
-        :total="200">
-      </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
-    </div>
-  </div>
+		</el-row>
+		<el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row
+			@select="handleSelectionChange">
+			<el-table-column align="center" label="" width="55" type="selection">
+
+			</el-table-column>
+			<el-table-column label="合同名称" align="center" width="340" prop="name">
+
+			</el-table-column>
+			<el-table-column label="合同编号" align="center" prop="contractNo">
+
+			</el-table-column>
+			<el-table-column label="承兑人" width="190" align="center" prop="acceptorName">
+
+			</el-table-column>
+			<el-table-column label="出票人" width="190" align="center" prop="drawersName">
+
+			</el-table-column>
+			<el-table-column label="汇票状态" width="190" align="center">
+				<template slot-scope="scope">
+					正常
+				</template>
+			</el-table-column>
+			<el-table-column label="合同状态" width="180" align="center">
+				<template slot-scope="scope">
+					正常
+				</template>
+			</el-table-column>
+			<el-table-column class-name="status-col" label="审核状态" width="155" align="center" prop="statusText">
+
+			</el-table-column>
+			<el-table-column align="center" label="时间" prop="createdAt">
+
+			</el-table-column>
+			<el-table-column align="center" prop="created_at" label="操作" width="200">
+				<template slot-scope="scope">
+					<el-tag type="success" style="cursor: pointer;" @click="tapDetail">查看详情</el-tag>
+				</template>
+			</el-table-column>
+		</el-table>
+		<div class="pagesip">
+			<el-button type="primary" size="small"
+				style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页
+			</el-button>
+			<el-pagination background layout="prev, pager, next" :total="100" :size="5" prev-text="上一页" next-text="下一页"
+				:hide-on-single-page="false" ref="pagination">
+			</el-pagination>
+			<el-button type="primary" size="small"
+				style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
+			</el-button>
+		</div>
+	</div>
 </template>
 </template>
 
 
 <script>
 <script>
-  import {
-    getList
-  } from '@/api/table'
+	import {
+		getList
+	} from '@/api/table'
 
 
-  export default {
-    filters: {
-      statusFilter(status) {
-        const statusMap = {
-          published: 'success',
-          draft: 'gray',
-          deleted: 'danger'
-        }
-        return statusMap[status]
-      }
-    },
-    mounted() {
-			this.checked=this.$store.state.user.checked
-         this.$request({
-            url: '/api/Contract/search',
-            method: 'post',
-            data: {
-              pageIndex:1,
-              pageSize:10
-            }
-          }).then((res)=>{
-            console.log(res)
-            this.list=res.data.result
-          })
+	export default {
+		filters: {
+			statusFilter(status) {
+				const statusMap = {
+					published: 'success',
+					draft: 'gray',
+					deleted: 'danger'
+				}
+				return statusMap[status]
+			}
+		},
+		mounted() {
+			this.checked = this.$store.state.user.checked
+			this.$request({
+				url: '/api/Contract/search',
+				method: 'post',
+				data: {
+					pageIndex: 1,
+					pageSize: 10
+				}
+			}).then((res) => {
+				console.log(res)
+				this.list = res.data.result
+			})
 
 
-    },
-    data() {
-      return {
-        list:[],
-        listLoading: false,
-        status: '',
-        hpstatus:'',
-        input4:'',
-        checked:'',
-        pickerOptions: {
-          shortcuts: [{
-            text: '最近一周',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近一个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近三个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit('pick', [start, end]);
-            }
-          }]
-        },
-        value1: '',
-        value2: ''
-      }
-    },
-    created() {
-      // this.fetchData()
-      // this.init()
-    },
-    methods: {
+		},
+		data() {
+			return {
+				list: [],
+				listLoading: false,
+				status: '',
+				hpstatus: '',
+				input4: '',
+				checked: '',
+				pickerOptions: {
+					shortcuts: [{
+						text: '最近一周',
+						onClick(picker) {
+							const end = new Date();
+							const start = new Date();
+							start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+							picker.$emit('pick', [start, end]);
+						}
+					}, {
+						text: '最近一个月',
+						onClick(picker) {
+							const end = new Date();
+							const start = new Date();
+							start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+							picker.$emit('pick', [start, end]);
+						}
+					}, {
+						text: '最近三个月',
+						onClick(picker) {
+							const end = new Date();
+							const start = new Date();
+							start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+							picker.$emit('pick', [start, end]);
+						}
+					}]
+				},
+				value1: '',
+				value2: ''
+			}
+		},
+		created() {},
+		methods: {
 
 
-      addNewContract(){
-        this.$router.push({path:'contracts/addcontract'})
-      },
-      tapDetail(){
-        this.$router.push({path:'/detail'})
-      },
-      handleCommand(command) {
-        this.status = command
+			addNewContract() {
+				this.$router.push({
+					path: 'contracts/addcontract'
+				})
+			},
+			tapDetail() {
+				this.$router.push({
+					path: '/detail'
+				})
+			},
+			handleCommand(command) {
+				this.status = command
 
 
-      },
-      handlehpCommand(command) {
-        this.hpstatus = command
+			},
+			handlehpCommand(command) {
+				this.hpstatus = command
 
 
-      },
+			},
 			handleSelectionChange(data) {
 			handleSelectionChange(data) {
-			  this.multipleSelection=data
-			  console.log(this.multipleSelection)
+				this.multipleSelection = data
+				console.log(this.multipleSelection)
+			},
+			jumpFirstPage() {
+				this.$refs.pagination.handleCurrentChange(1);
+				this.$emit('handleCurrentChange', 1);
 			},
 			},
-      // fetchData() {
-      //   this.listLoading = true
-      //   getList().then(response => {
-      //     this.list = response.data.items
-      //     this.listLoading = false
-      //   })
-      // }
-    }
-  }
+			jumpLastPage() {
+				let font = this.$refs.pagination
+				let cpage = Math.ceil(font.total / font.pageSize);
+				font.handleCurrentChange(cpage);
+			},
+		}
+	}
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
-  .pulldown {
-    width: 185px;
-    height: 40px;
-    border: 1px solid #E8E8E8;
-    border-radius: 10px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    justify-content: space-between;
-    padding: 0 20px;
-    color: #999999;
-  }
-  .pagesip{
-    width: 100%;
-    margin: 20px auto;
-    display: flex;
-    // align-items: center;
-    justify-content: flex-end;
-  }
-  .el-pagination.is-background .el-pager li:not(.disabled).active{
-    background-color:#D8AB5A;
-  }
-  .el-col{
-    margin-bottom: 20px;
-  }
+	.pulldown {
+		width: 185px;
+		height: 40px;
+		border: 1px solid #E8E8E8;
+		border-radius: 10px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20px;
+		color: #999999;
+	}
+
+	.pagesip {
+		position: fixed;
+		bottom: 16px;
+		width: 88%;
+		margin: 20px auto;
+		padding-right: 50px;
+		display: flex;
+		// align-items: center;
+		justify-content: flex-end;
+	}
+
+	.el-pagination.is-background .el-pager li:not(.disabled).active {
+		background-color: #D8AB5A;
+	}
+
+	.el-col {
+		margin-bottom: 20px;
+	}
 </style>
 </style>

+ 28 - 8
src/views/databackup/index.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
-  <div class="app-container">
-   <el-row  >
+  <div class="app-container"  >
+   <el-row>
      <el-col :xs="24" :sm="7" :md="6" :lg="4" :xl="3">
      <el-col :xs="24" :sm="7" :md="6" :lg="4" :xl="3">
        <div class="grid-content bg-purple">
        <div class="grid-content bg-purple">
          <el-dropdown @command="handleCommand">
          <el-dropdown @command="handleCommand">
@@ -55,7 +55,7 @@
      </el-col>
      </el-col>
 
 
    </el-row>
    </el-row>
-    <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
+    <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row >
       <el-table-column align="center" label="" width="55">
       <el-table-column align="center" label="" width="55">
         <template slot-scope="scope">
         <template slot-scope="scope">
          <el-checkbox v-model="checked"></el-checkbox>
          <el-checkbox v-model="checked"></el-checkbox>
@@ -95,14 +95,19 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -174,6 +179,15 @@
         this.hpstatus = command
         this.hpstatus = command
 
 
       },
       },
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
       // fetchData() {
       // fetchData() {
       //   this.listLoading = true
       //   this.listLoading = true
       //   getList().then(response => {
       //   getList().then(response => {
@@ -185,6 +199,9 @@
   }
   }
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
+  .app-container{
+	position: relative;
+  }
   .pulldown {
   .pulldown {
     width: 185px;
     width: 185px;
     height: 40px;
     height: 40px;
@@ -198,7 +215,9 @@
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;
@@ -210,4 +229,5 @@
   .el-col{
   .el-col{
     margin-bottom: 20px;
     margin-bottom: 20px;
   }
   }
+
 </style>
 </style>

+ 41 - 251
src/views/delivery/edit.vue

@@ -1,256 +1,46 @@
 <template>
 <template>
-  <div class="app-container">
-    <el-row  style="">
-      <el-col :xs="24" :sm="24" :md="12" :lg="3" :xl="3">
-        <div class="grid-content bg-purple">
-          <el-dropdown @command="handleCommand">
-            <div class="pulldown">
-              <span class="el-dropdown-link" v-if="!status">
-                供应商状态状态
-              </span>
-              <span class="el-dropdown-link" v-if="status">
-                {{status}}
-              </span>
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </div>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="未通过">未通过</el-dropdown-item>
-              <el-dropdown-item command="待审核">待审核</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="3" :xl="3">
-        <div class="grid-content bg-purple">
-          <el-dropdown @command="handlehpCommand()">
-            <div class="pulldown">
-              <span class="el-dropdown-link" v-if="!hpstatus">
-                审核状态
-              </span>
-              <span class="el-dropdown-link" v-if="hpstatus">
-                {{hpstatus}}
-              </span>
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </div>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="成功">成功</el-dropdown-item>
-              <el-dropdown-item command="失败">失败</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="5" >
-        <div class="grid-content bg-purple">
-          <div class="block">
-            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
-            </el-date-picker>
-          </div>
-
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="6">
-        <div class="grid-content bg-purple" style="margin-left: 25px;">
-          <el-input
-              placeholder="请输入供应商名称"
-              v-model="input4" style="width: 80%;">
-              <i slot="prefix" class="el-input__icon el-icon-search"></i>
-            </el-input>
-        </div>
-      </el-col>
-     <!-- <el-col :span="1">
-        <div class="grid-content bg-purple"></div>
-      </el-col> -->
-      <el-col :xs="24" :sm="24" :md="24" :lg="14" :xl="7">
-        <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-           <el-button type="primary">审核失败</el-button>
-            <el-button type="primary">审核成功</el-button>
-          <el-button type="primary">导出</el-button>
-            <el-button type="success">复原</el-button>
-            <el-button type="danger">禁用</el-button>
-        </div>
-      </el-col>
-
-    </el-row>
-    <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
-      <el-table-column align="center" label="" width="55">
-        <template slot-scope="scope">
-         <el-checkbox v-model="checked"></el-checkbox>
-        </template>
-      </el-table-column>
-      <el-table-column label="供应商名称"  align="center" >
-        <template slot-scope="scope">
-          成都韩晶供应商公司
-        </template>
-      </el-table-column>
-      <el-table-column label="社会统一信用代码" width="240" align="center">
-        <template slot-scope="scope">
-          <span>xxxx</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="账号" width="180" align="center">
-        <template slot-scope="scope">
-          xxxx
-        </template>
-      </el-table-column>
-      <el-table-column label="法人名称" width="180" align="center">
-        <template slot-scope="scope">
-          xxxx
-        </template>
-      </el-table-column>
-      <el-table-column label="联系人" width="180" align="center">
-        <template slot-scope="scope">
-          出票人
-        </template>
-      </el-table-column>
-
-      <el-table-column label="电话" width="180" align="center">
-        <template slot-scope="scope">
-          汇票状态
-        </template>
-      </el-table-column>
-      <el-table-column label="审核状态" width="180" align="center">
-        <template slot-scope="scope">
-          通过
-        </template>
-      </el-table-column>
-      <el-table-column label="认证图片" width="180" align="center">
-        <template slot-scope="scope">
-          通过
-        </template>
-      </el-table-column>
-      <el-table-column label="授权委托书" width="180" align="center">
-        <template slot-scope="scope">
-          通过
-        </template>
-      </el-table-column>
-      <!-- <el-table-column align="center" prop="created_at" label="时间" >
-        <template slot-scope="scope">
-          <i class="el-icon-time" />
-          <span>{{ scope.row.display_time }}</span>
-        </template>
-      </el-table-column> -->
-      <el-table-column align="center" prop="created_at" label="审核操作" width="250">
-        <template slot-scope="scope">
-          <el-tag type="success" style="cursor: pointer;margin-right: 15px;">认证成功</el-tag>
-         <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">认证失败</el-tag>
-         
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
-      <el-pagination
-        background
-        layout="prev, pager, next"
-        :total="200">
-      </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
-    </div>
-  </div>
+	<el-descriptions title="供应商详情">
+	    <el-descriptions-item label="供应商名称">{{list.name}}</el-descriptions-item>
+	    <el-descriptions-item label="社会统一信用代码">{{list.socialCode}}</el-descriptions-item>
+	    <el-descriptions-item label="账号">{{list.account}}</el-descriptions-item>
+		<el-descriptions-item label="法人名称">{{list.legalPerson}}</el-descriptions-item>
+		<el-descriptions-item label="联系人">{{list.contacts}}</el-descriptions-item>
+		<el-descriptions-item label="电话">{{list.contactsMobile}}</el-descriptions-item>
+		<el-descriptions-item label="审核状态">{{list.statusText}}</el-descriptions-item>
+		<el-descriptions-item label="认证照片">
+			<el-image style="width: 100px; height: 100px" :src="list.proxyFileList[0]">
+			</el-image>
+			<el-image style="width: 100px; height: 100px" :src="list.proxyFileList[1]">
+			</el-image>
+		</el-descriptions-item>
+		<el-descriptions-item label="授权委托书">
+			<el-image style="width: 100px; height: 100px" :src="list.identifyPicList[0]">
+			</el-image>
+		<el-image style="width: 100px; height: 100px" :src="list.identifyPicList[1]">
+		</el-image>
+		</el-descriptions-item>
+	</el-descriptions>
 </template>
 </template>
 
 
 <script>
 <script>
-  import {
-    getList
-  } from '@/api/table'
-
-  export default {
-    filters: {
-      statusFilter(status) {
-        const statusMap = {
-          published: 'success',
-          draft: 'gray',
-          deleted: 'danger'
-        }
-        return statusMap[status]
-      }
-    },
-    data() {
-      return {
-        list: null,
-        listLoading: true,
-        status: '',
-        hpstatus:'',
-        input4:'',
-         checked:false,
-        pickerOptions: {
-          shortcuts: [{
-            text: '最近一周',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近一个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近三个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit('pick', [start, end]);
-            }
-          }]
-        },
-        value1: '',
-        value2: ''
-      }
-    },
-    created() {
-      this.fetchData()
-    },
-    methods: {
-      handleCommand(command) {
-        this.status = command
-
-      },
-      handlehpCommand(command) {
-        this.hpstatus = command
-
-      },
-      fetchData() {
-        this.listLoading = true
-        getList().then(response => {
-          this.list = response.data.items
-          this.listLoading = false
-        })
-      }
-    }
-  }
+	export default{
+		data(){
+			return{
+				list:[],
+			}
+		},
+		mounted() {
+			let id=this.$route.query.id
+			this.$request({
+				url:'/api/Supplier/'+id,
+				method:'get'
+			}).then((res)=>{
+				this.list=res.data
+				console.log(this.list)
+			})
+		}
+	}
 </script>
 </script>
-<style lang="scss">
-  .pulldown {
-    width: 185px;
-    height: 40px;
-    border: 1px solid #E8E8E8;
-    border-radius: 10px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    justify-content: space-between;
-    padding: 0 20px;
-    color: #999999;
-  }
-  .pagesip{
-    width: 100%;
-    margin: 20px auto;
-    display: flex;
-    // align-items: center;
-    justify-content: flex-end;
-  }
-  .el-pagination.is-background .el-pager li:not(.disabled).active{
-    background-color:#D8AB5A;
-  }
-  .el-col{
-    margin-bottom: 20px;
-  }
-</style>
+
+<style>
+</style>

+ 57 - 43
src/views/delivery/index.vue

@@ -73,46 +73,43 @@
 
 
     </el-row>
     </el-row>
     <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
     <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
-      <el-table-column align="center" label="" width="55">
-        <template slot-scope="scope">
-         <el-checkbox v-model="checked"></el-checkbox>
-        </template>
+      <el-table-column align="center" label="" width="55" type="selection">
       </el-table-column>
       </el-table-column>
-      <el-table-column label="供应商名称"  align="center" >
-        <template slot-scope="scope">
-          成都韩晶供应商公司
-        </template>
+      <el-table-column label="供应商名称"  align="center" prop="name">
+        <!-- <template slot-scope="scope">
+          {{scope.name}}
+        </template> -->
       </el-table-column>
       </el-table-column>
-      <el-table-column label="社会统一信用代码" width="240" align="center">
-        <template slot-scope="scope">
-          <span>xxxx</span>
-        </template>
+      <el-table-column label="社会统一信用代码" width="240" align="center" prop="socialCode">
+        <!-- <template slot-scope="scope">
+          {{scope.socialCode}}
+        </template> -->
       </el-table-column>
       </el-table-column>
-      <el-table-column label="账号" width="180" align="center">
-        <template slot-scope="scope">
-          xxxx
-        </template>
+      <el-table-column label="账号" width="180" align="center" prop="account">
+        <!-- <template slot-scope="scope">
+          {{scope.account}}
+        </template> -->
       </el-table-column>
       </el-table-column>
-      <el-table-column label="法人名称" width="180" align="center">
-        <template slot-scope="scope">
-          xxxx
-        </template>
+      <el-table-column label="法人名称" width="180" align="center" prop="legalPerson">
+        <!-- <template slot-scope="scope">
+          {{scope.legalPerson}}
+        </template> -->
       </el-table-column>
       </el-table-column>
-      <el-table-column label="联系人" width="180" align="center">
-        <template slot-scope="scope">
-          出票人
-        </template>
+      <el-table-column label="联系人" width="180" align="center" prop="contacts">
+       <!-- <template slot-scope="scope">
+          {{scope.contacts}}
+        </template> -->
       </el-table-column>
       </el-table-column>
 
 
-      <el-table-column label="电话" width="180" align="center">
-        <template slot-scope="scope">
-          汇票状态
-        </template>
+      <el-table-column label="电话" width="180" align="center" prop="contactsMobile">
+       <!-- <template slot-scope="scope">
+          {{scope.contactsMobile}}
+        </template> -->
       </el-table-column>
       </el-table-column>
-      <el-table-column label="审核状态" width="180" align="center">
-        <template slot-scope="scope">
-          通过
-        </template>
+      <el-table-column label="审核状态" width="180" align="center" prop="statusText">
+        <!-- <template slot-scope="scope">
+          {{scope.statusText}}
+        </template> -->
       </el-table-column>
       </el-table-column>
       <el-table-column align="center" prop="created_at" label="时间" >
       <el-table-column align="center" prop="created_at" label="时间" >
         <template slot-scope="scope">
         <template slot-scope="scope">
@@ -122,20 +119,25 @@
       </el-table-column>
       </el-table-column>
       <el-table-column align="center" prop="created_at" label="操作" width="250">
       <el-table-column align="center" prop="created_at" label="操作" width="250">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-tag type="success" style="cursor: pointer;margin-right: 15px;" @click="toedit">编辑</el-tag>
+          <el-tag type="success" style="cursor: pointer;margin-right: 15px;" @click="toedit(scope.row.id)">编辑</el-tag>
          <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">复原</el-tag>
          <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">复原</el-tag>
           <el-tag type="info">禁用</el-tag>
           <el-tag type="info">禁用</el-tag>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -201,13 +203,14 @@
     mounted(){
     mounted(){
       this.$request({
       this.$request({
         url:"/api/Supplier/search",
         url:"/api/Supplier/search",
-        method:'get',
+        method:'post',
         data:{
         data:{
           pageIndex:1,
           pageIndex:1,
           pageSize:10,
           pageSize:10,
         }
         }
       }).then((res)=>{
       }).then((res)=>{
-        console.log(res)
+        this.list=res.data.result
+		console.log(this.list)
       })
       })
     },
     },
     methods: {
     methods: {
@@ -226,9 +229,18 @@
       //     this.listLoading = false
       //     this.listLoading = false
       //   })
       //   })
       // },
       // },
-      toedit(){
-        this.$router.push({path:'/edit'})
-      }
+      toedit(id){
+        this.$router.push({path:'/edit',query:{id:id}})
+      },
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
     }
     }
   }
   }
 </script>
 </script>
@@ -246,7 +258,9 @@
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 26 - 9
src/views/form/addTicketdrawer.vue

@@ -1,17 +1,18 @@
 <template>
 <template>
-  <div>
+  <div class="form">
     <el-form ref="form" :model="form" label-width="100px" >
     <el-form ref="form" :model="form" label-width="100px" >
-      <el-form-item label="出票人名称" style="width: 500px;">
+      <el-form-item label="出票人名称" style="width: 500px;" prop="name">
         <el-input v-model="form.name"></el-input>
         <el-input v-model="form.name"></el-input>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="账号" style="width: 500px;">
+      <el-form-item label="账号" style="width: 500px;" prop="bankAccount">
         <el-input v-model="form.bankAccount"></el-input>
         <el-input v-model="form.bankAccount"></el-input>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="开户行名称" style="width: 500px;">
+      <el-form-item label="开户行名称" style="width: 500px;" prop="bankName">
         <el-input v-model="form.bankName"></el-input>
         <el-input v-model="form.bankName"></el-input>
       </el-form-item>
       </el-form-item>
             <el-form-item>
             <el-form-item>
               <el-button type="primary" @click="onSubmit">立即提交</el-button>
               <el-button type="primary" @click="onSubmit">立即提交</el-button>
+							<el-button type="primary" @click="resetForm('form')">重置</el-button>
             </el-form-item>
             </el-form-item>
         </el-form>
         </el-form>
   </div>
   </div>
@@ -27,6 +28,9 @@
         bankName:'',
         bankName:'',
       }
       }
      }
      }
+   },
+   mounted() {
+   	
    },
    },
    methods:{
    methods:{
       onSubmit(){
       onSubmit(){
@@ -34,14 +38,27 @@
          url:'/api/Drawer',
          url:'/api/Drawer',
          method:'post',
          method:'post',
          data:this.form
          data:this.form
-       }).then(function(res){
-         alert("提交成功")
+       }).then((res)=>{
+         this.$message("注册成功")
+		 this.$router.push({path:'index'})
        })
        })
-},
-
+      },
+			resetForm(form) {
+			    this.$refs[form].resetFields();
+			}
    },
    },
    }
    }
 </script>
 </script>
 
 
-<style>
+<style lang="scss">
+	.form{
+		margin-top: 100px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	.el-form-item:last-child{
+		display: flex;
+		justify-content: space-between;
+	}
 </style>
 </style>

+ 28 - 8
src/views/form/index.vue

@@ -94,11 +94,19 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <div class="pagesip">
-      <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
-      <el-pagination background layout="prev, pager, next" :total="200">
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
+      <el-pagination
+        background
+        layout="prev, pager, next"
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-      <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -219,9 +227,19 @@
 				this.$router.push({path:'/form/detail',query:{id:id}},)
 				this.$router.push({path:'/form/detail',query:{id:id}},)
 	  },
 	  },
 	  deleteRow(index,rows) {
 	  deleteRow(index,rows) {
-			  console.log(rows)
-	          rows.splice(index, 1);
-	        }
+		console.log(rows)
+	    rows.splice(index, 1);
+	  },
+	  jumpFirstPage () {
+	      this.$refs.pagination.handleCurrentChange(1);
+	      this.$emit('handleCurrentChange', 1);
+	  },
+	  jumpLastPage () {
+	      let font = this.$refs.pagination
+	      let cpage = Math.ceil(font.total / font.pageSize);
+	      font.handleCurrentChange(cpage);
+	  },
+			
     }
     }
   }
   }
 </script>
 </script>
@@ -240,7 +258,9 @@
   }
   }
 
 
   .pagesip {
   .pagesip {
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 27 - 19
src/views/management/index.vue

@@ -48,7 +48,6 @@
           </el-dropdown>
           </el-dropdown>
         </div>
         </div>
       </el-col>
       </el-col>
-      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="7">
         <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;margin-left: 10px;">
         <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;margin-left: 10px;">
           <el-button type="primary">审核成功</el-button>
           <el-button type="primary">审核成功</el-button>
           <el-button type="primary">审核失败</el-button>
           <el-button type="primary">审核失败</el-button>
@@ -56,8 +55,6 @@
             <el-button type="success">复原</el-button>
             <el-button type="success">复原</el-button>
             <el-button type="primary">批量导出</el-button>
             <el-button type="primary">批量导出</el-button>
         </div>
         </div>
-      </el-col>
-
     </el-row>
     </el-row>
     <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
     <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
       <el-table-column align="center" label="" width="55">
       <el-table-column align="center" label="" width="55">
@@ -81,38 +78,43 @@
         </template> -->
         </template> -->
       </el-table-column>
       </el-table-column>
       <el-table-column label="业务管理员状态" width="190" align="center">
       <el-table-column label="业务管理员状态" width="190" align="center">
-        <template slot-scope="scope">
+        <!-- <template slot-scope="scope">
           出票人
           出票人
-        </template>
+        </template> -->
       </el-table-column>
       </el-table-column>
       <el-table-column label="审核状态" width="190" align="center">
       <el-table-column label="审核状态" width="190" align="center">
-        <template slot-scope="scope">
+        <!-- <template slot-scope="scope">
           汇票状态
           汇票状态
-        </template>
+        </template> -->
       </el-table-column>
       </el-table-column>
       <el-table-column label="时间" width="180" align="center">
       <el-table-column label="时间" width="180" align="center">
-        <template slot-scope="scope">
+        <!-- <template slot-scope="scope">
           正常
           正常
-        </template>
+        </template> -->
       </el-table-column>
       </el-table-column>
       <el-table-column align="center" prop="created_at" label="操作" width="200">
       <el-table-column align="center" prop="created_at" label="操作" width="200">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-tag type="success" style="cursor: pointer;" @click="tapDetail">编辑</el-tag>
-          <el-tag type="success" style="cursor: pointer;" @click="tapDetail">禁用</el-tag>
-          <el-tag type="success" style="cursor: pointer;" @click="tapDetail">复原</el-tag>
+          <el-tag type="primary" style="cursor: pointer; margin:0 5px;" @click="tapDetail">编辑</el-tag>
+          <el-tag type="warning" style="cursor: pointer; margin:0 5px;" @click="tapDetail">禁用</el-tag>
+          <el-tag type="success" style="cursor: pointer; margin:0 5px;" @click="tapDetail">复原</el-tag>
          <!-- <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">通过</el-tag>
          <!-- <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">通过</el-tag>
           <el-tag type="info">不通过</el-tag> -->
           <el-tag type="info">不通过</el-tag> -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -185,9 +187,6 @@
       })
       })
     },
     },
     methods: {
     methods: {
-      addNewContract(){
-        this.$router.push({path:'contracts/addcontract'})
-      },
       tapDetail(){
       tapDetail(){
         this.$router.push({path:'/detail'})
         this.$router.push({path:'/detail'})
       },
       },
@@ -199,6 +198,15 @@
         this.hpstatus = command
         this.hpstatus = command
 
 
       },
       },
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
       // fetchData() {
       // fetchData() {
       //   this.listLoading = true
       //   this.listLoading = true
       //   getList().then(response => {
       //   getList().then(response => {

+ 28 - 12
src/views/shipments/index.vue

@@ -89,14 +89,19 @@
         </template>
         </template>
       </el-table-column> -->
       </el-table-column> -->
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -193,14 +198,23 @@
         this.$router.push({path:"/shipments3"})
         this.$router.push({path:"/shipments3"})
       },
       },
       Export(){
       Export(){
-        this.$request({
-          url:'/api/Report/export/acceptorClassification?frequency=1&startDate=&endDate=',
-          method:'get',
-        }).then((res)=>{
+      //   this.$request({
+      //     url:'/api/Report/export/acceptorClassification?frequency=1&startDate=&endDate=',
+      //     method:'get',
+      //   }).then((res)=>{
         
         
-      })
-	  // window.open('http://123.207.180.167:8700/api/Report/export/acceptorClassification?frequency=1&startDate=&endDate=')
-      }
+      // })
+				window.open('http://123.207.180.167:8700/api/Report/export/acceptorClassification?frequency=1&startDate=&endDate=')
+      },
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
     }
     }
   }
   }
 </script>
 </script>
@@ -218,7 +232,9 @@
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 27 - 31
src/views/shipments/shipments1.vue

@@ -90,14 +90,19 @@
         </template>
         </template>
       </el-table-column> -->
       </el-table-column> -->
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -194,33 +199,22 @@ import XLSX from "xlsx";
         this.$router.push({path:"/shipments3"})
         this.$router.push({path:"/shipments3"})
       },
       },
       Export(){
       Export(){
-        this.$request({
-          url:'/api/Report/export/drawerClassification?frequency=1&startDate=&endDate=',
-          method:'get',
-        }).then((res)=>{
-		let obj=res
-		console.log("ss")
-      })
+      //   this.$request({
+      //     url:'/api/Report/export/drawerClassification?frequency=1&startDate=&endDate=',
+      //     method:'get',
+      //   }).then((res)=>{
+      // })
+				window.open('http://123.207.180.167:8700/api/Report/export/drawerClassification?frequency=1&startDate=&endDate=')
       },
       },
-	   // exportExcel() {
-	   //            var wb = XLSX.utils.table_to_book(
-	   //                document.querySelector("#download")
-	   //            );
-	   //            var wbout = XLSX.write(wb, {
-	   //                bookType: "xlsx",
-	   //                bookSST: true,
-	   //                type: "array"
-	   //            });
-	   //            try {
-	   //                FileSaver.saveAs(
-	   //                    new Blob([wbout], { type: "application/octet-stream" }),
-	   //                    this.title+".xlsx"
-	   //                );
-	   //            } catch (e) {
-	   //                if (typeof console !== "undefined") console.log(e, wbout);
-	   //            }
-	   //            return wbout;
-	   //        }
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
     }
     }
   }
   }
 </script>
 </script>
@@ -238,7 +232,9 @@ import XLSX from "xlsx";
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 29 - 12
src/views/shipments/shipments2.vue

@@ -95,14 +95,19 @@
         </template>
         </template>
       </el-table-column> -->
       </el-table-column> -->
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -199,13 +204,23 @@
         this.$router.push({path:"/shipments3"})
         this.$router.push({path:"/shipments3"})
       },
       },
       Export(){
       Export(){
-        this.$request({
-          url:'/api/Report/export/contractReport?contractName=&startDate=&endDate=',
-          method:'get',
-        }).then((res)=>{
-        console.log(res)
-      })
-      }
+      //   this.$request({
+      //     url:'/api/Report/export/contractReport?contractName=&startDate=&endDate=',
+      //     method:'get',
+      //   }).then((res)=>{
+      //   console.log(res)
+      // })
+				window.open('http://123.207.180.167:8700/api/Report/export/contractReport?contractName=&startDate=&endDate=')
+      },
+			jumpFirstPage(){
+			  this.$refs.pagination.handleCurrentChange(1);
+			  this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage(){
+			  let font = this.$refs.pagination
+			  let cpage = Math.ceil(font.total / font.pageSize);
+			  font.handleCurrentChange(cpage);
+			},
     }
     }
   }
   }
 </script>
 </script>
@@ -223,7 +238,9 @@
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 29 - 12
src/views/shipments/shipments3.vue

@@ -99,14 +99,19 @@
         </template>
         </template>
       </el-table-column> -->
       </el-table-column> -->
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -203,14 +208,24 @@
         this.$router.push({path:"/shipments2"})
         this.$router.push({path:"/shipments2"})
       },
       },
       Export(){
       Export(){
-        this.$request({
-          url:'/api/Report/export/supplierReport?supplierName=&startDate=&endDate=',
-          method:'get',
+      //   this.$request({
+      //     url:'/api/Report/export/supplierReport?supplierName=&startDate=&endDate=',
+      //     method:'get',
 
 
-        }).then((res)=>{
-        console.log(res)
-      })
-      }
+      //   }).then((res)=>{
+      //   console.log(res)
+      // })
+			window.open('http://123.207.180.167:8700/api/Report/export/supplierReport?supplierName=&startDate=&endDate=')
+      },
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
     }
     }
   }
   }
 </script>
 </script>
@@ -228,7 +243,9 @@
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 22 - 6
src/views/sucuirtyaudit/index.vue

@@ -98,14 +98,19 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <div class="pagesip">
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
+    <div class="pagesip" >
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
       <el-pagination
       <el-pagination
         background
         background
         layout="prev, pager, next"
         layout="prev, pager, next"
-        :total="200">
+        :total="100"
+    	:size="5"
+    	prev-text="上一页"
+    	next-text="下一页"
+    	:hide-on-single-page="false"
+    	ref="pagination">
       </el-pagination>
       </el-pagination>
-       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
+       <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -186,7 +191,16 @@
       // },
       // },
       toannexList(){
       toannexList(){
         this.$router.push({path:'/annexList'})
         this.$router.push({path:'/annexList'})
-      }
+      },
+			jumpFirstPage () {
+			    this.$refs.pagination.handleCurrentChange(1);
+			    this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage () {
+			    let font = this.$refs.pagination
+			    let cpage = Math.ceil(font.total / font.pageSize);
+			    font.handleCurrentChange(cpage);
+			},
     }
     }
   }
   }
 </script>
 </script>
@@ -204,7 +218,9 @@
     color: #999999;
     color: #999999;
   }
   }
   .pagesip{
   .pagesip{
-    width: 100%;
+    position: fixed;
+    bottom: 16px;
+    width: 88%;
     margin: 20px auto;
     margin: 20px auto;
     display: flex;
     display: flex;
     // align-items: center;
     // align-items: center;

+ 36 - 16
src/views/table/addAcceptor.vue

@@ -1,25 +1,28 @@
 <template>
 <template>
-  <div>
-    <el-form ref="form" :model="form" label-width="100px">
-      <el-form-item label="承兑人名称">
-        <el-input v-model="form.name" style="width: 500px;"></el-input>
+  <div class="form">
+    <el-form ref="form" :model="form" label-width="100px" >
+      <el-form-item label="承兑人名称" prop="name">
+        <el-input v-model="form.name" style="width: 500px;" placeholder="请输入承兑人名称"></el-input>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="账号">
-        <el-input v-model="form.bankAccount" style="width: 500px;"></el-input>
+      <el-form-item label="账号" prop="bankAccount">
+        <el-input v-model="form.bankAccount" style="width: 500px;" placeholder="请输入账号"></el-input>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="开户行名称">
-        <el-input v-model="form.bankName" style="width: 500px;"></el-input>
+      <el-form-item label="开户行名称" prop="bankName" >
+        <el-input v-model="form.bankName" style="width: 500px;" placeholder="请输入开户行名称"></el-input>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="服务费率">
-        <el-input v-model="form.serviceRate" placeholder="请输入服务费率" style="width: 500px;">
+      <el-form-item label="服务费率" prop="serviceRate">
+        <el-input v-model="form.serviceRate" placeholder="请输入服务费率" style="width: 500px;" >
+			<i slot="suffix" style="font-style:normal;margin-right: 10px;">%</i>
         </el-input>
         </el-input>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="利率">
+        <el-form-item label="利率" prop="interest">
           <el-input v-model="form.interest" placeholder="请输入利率" style="width: 500px;">
           <el-input v-model="form.interest" placeholder="请输入利率" style="width: 500px;">
+			  <i slot="suffix" style="font-style:normal;margin-right: 10px;">%</i>
           </el-input>
           </el-input>
           </el-form-item>
           </el-form-item>
            <el-form-item>
            <el-form-item>
               <el-button type="primary" @click="onsubmit">立即提交</el-button>
               <el-button type="primary" @click="onsubmit">立即提交</el-button>
+			  <el-button type="primary" @click="resetForm('form')">重置</el-button>
             </el-form-item>
             </el-form-item>
         </el-form>
         </el-form>
   </div>
   </div>
@@ -34,10 +37,13 @@
         name:'',
         name:'',
         bankAccount:'',
         bankAccount:'',
         bankName:'',
         bankName:'',
-        serviceRate:5,
-        interest:2
+        serviceRate:'',
+        interest:''
       }
       }
      }
      }
+   },
+   mounted() {
+   
    },
    },
    methods:{
    methods:{
     onsubmit(){
     onsubmit(){
@@ -46,12 +52,26 @@
         method:'post',
         method:'post',
         data:this.form
         data:this.form
       }).then((res)=>{
       }).then((res)=>{
-        alert("提交成功!")
+					// this.$message("注册成功")
+					// this.$router.push({path:'table'})
       })
       })
-    }
+    },
+	resetForm(form) {
+	    this.$refs[form].resetFields();
+	    }
    },
    },
    }
    }
 </script>
 </script>
 
 
-<style>
+<style lang="scss">
+	.form{
+		margin-top: 100px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	.el-form-item:last-child{
+		display: flex;
+		justify-content: space-between;
+	}
 </style>
 </style>

+ 246 - 243
src/views/table/index.vue

@@ -1,250 +1,253 @@
 <template>
 <template>
-  <div class="app-container">
-    <el-row>
-      <el-col :xs="24" :sm="7" :md="6" :lg="4" :xl="3">
-        <div class="grid-content bg-purple">
-          <el-dropdown @command="handleCommand">
-            <div class="pulldown">
-              <span class="el-dropdown-link" v-if="!status">
-                承兑人状态
-              </span>
-              <span class="el-dropdown-link" v-if="status">
-                {{status}}
-              </span>
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </div>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="正常">正常</el-dropdown-item>
-              <el-dropdown-item command="删除">删除</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </div>
-      </el-col>
-
-
-      <!-- <el-col :xs="24" :sm="11" :md="9" :lg="7" :xl="5" >
-        <div class="grid-content bg-purple">
-          <div class="block">
-            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
-            </el-date-picker>
-          </div>
-
-        </div>
-      </el-col> -->
-      <el-col :xs="24" :sm="10" :md="8" :lg="5" :xl="5">
-        <div class="grid-content bg-purple">
-          <div class="grid-content bg-purple" style="margin-left: 30px;">
-            <el-input placeholder="请输入承兑人名称" v-model="input4" style="width: 80%;">
-              <i slot="prefix" class="el-input__icon el-icon-search"></i>
-            </el-input>
-          </div>
-        </div>
-      </el-col>
-      <!-- <el-col :span="1">
-        <div class="grid-content bg-purple"></div>
-      </el-col> -->
-      <el-col :xs="24" :sm="7" :md="6" :lg="8" :xl="16">
-        <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-          <el-button type="primary" @click="addAcceptor">新增承兑人</el-button>
-          <el-button type="primary" @click="Exports()">导出</el-button>
-
-        </div>
-      </el-col>
-
-    </el-row>
-    <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row  @select="handleSelectionChange">
-      <el-table-column align="center" label="" width="55" type="selection" >
-        <!-- <template slot-scope="scope">
-          <el-checkbox v-model="checked"></el-checkbox>
-        </template> -->
-      </el-table-column>
-      <el-table-column label="承兑人名称" align="center" prop="name">
-        <!-- <template slot-scope="scope">
-          XXXXXXXXXXX
-        </template> -->
-      </el-table-column>
-      <el-table-column label="账号" align="center" prop="bankAccount">
-        <!-- <template slot-scope="scope">
-          XXXXXXXXXXX
-        </template> -->
-      </el-table-column>
-      <el-table-column align="center"  label="开户行名称" prop="bankName">
-        <!-- <template slot-scope="scope">
-          <span>XXX</span>
-        </template> -->
-      </el-table-column>
-      <el-table-column align="center"  label="服务费率" >
-       <template slot-scope="scope">
-          {{scope.row.serviceRate}}%
-        </template>
-      </el-table-column>
-      <el-table-column align="center"  label="利率" prop="interest">
-       <template slot-scope="scope">
-		  {{scope.row.interest}}%
-        </template>
-      </el-table-column>
-      <el-table-column align="center"  label="状态" >
-        <!-- <template slot-scope="scope">
-          <span>XXX</span>
-        </template> -->
-      </el-table-column>
-      <el-table-column align="center"  label="时间">
-        <!-- <template slot-scope="scope">
-          <i class="el-icon-time" />
-          <span>{{ scope.row.display_time }}</span>
-        </template> -->
-      </el-table-column>
-      <el-table-column align="center" prop="created_at" label="操作" width="300">
-        <template slot-scope="scope">
-          <el-tag type="success" style="cursor: pointer;margin-right: 15px;" @click="toDetail(scope.row.id)">详情</el-tag>
-          <el-tag type="warning" style="cursor: pointer;margin-right: 15px;">复原</el-tag>
-          <el-tag type="danger" style="cursor: pointer;margin-right: 15px;" @click.native.prevent="deleteRow(scope.$index,list)">删除</el-tag>
-
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="pagesip">
-      <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">首页</el-button>
-      <el-pagination background layout="prev, pager, next" :total="200">
-      </el-pagination>
-      <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;">尾页</el-button>
-    </div>
-  </div>
+	<div class="app-container">
+		<el-row>
+			<el-col :xs="24" :sm="7" :md="6" :lg="4" :xl="3">
+				<div class="grid-content bg-purple">
+					<el-dropdown @command="handleCommand">
+						<div class="pulldown">
+							<span class="el-dropdown-link" v-if="!status">
+								承兑人状态
+							</span>
+							<span class="el-dropdown-link" v-if="status">
+								{{status}}
+							</span>
+							<i class="el-icon-arrow-down el-icon--right"></i>
+						</div>
+						<el-dropdown-menu slot="dropdown">
+							<el-dropdown-item command="正常">正常</el-dropdown-item>
+							<el-dropdown-item command="删除">删除</el-dropdown-item>
+						</el-dropdown-menu>
+					</el-dropdown>
+				</div>
+			</el-col>
+			<el-col :xs="24" :sm="10" :md="8" :lg="5" :xl="5">
+				<div class="grid-content bg-purple">
+					<div class="grid-content bg-purple" style="margin-left: 30px;">
+						<el-input placeholder="请输入承兑人名称" v-model="input4" style="width: 80%;">
+							<i slot="prefix" class="el-input__icon el-icon-search"></i>
+						</el-input>
+					</div>
+				</div>
+			</el-col>
+
+			<el-col :xs="24" :sm="7" :md="6" :lg="8" :xl="16">
+				<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
+					<el-button type="primary" @click="addAcceptor">新增承兑人</el-button>
+					<el-button type="primary" @click="Exports()">导出</el-button>
+
+				</div>
+			</el-col>
+
+		</el-row>
+		<el-table v-loading="listLoading" :data="srcList" element-loading-text="Loading" border fit
+			highlight-current-row @select="handleSelectionChange">
+			<el-table-column align="center" label="" width="55" type="selection">
+
+			</el-table-column>
+			<el-table-column label="承兑人名称" align="center" prop="name">
+
+			</el-table-column>
+			<el-table-column label="账号" align="center" prop="bankAccount">
+
+			</el-table-column>
+			<el-table-column align="center" label="开户行名称" prop="bankName">
+
+			</el-table-column>
+			<el-table-column align="center" label="服务费率">
+				<template slot-scope="scope">
+					{{scope.row.serviceRate}}%
+				</template>
+			</el-table-column>
+			<el-table-column align="center" label="利率" prop="interest">
+				<template slot-scope="scope">
+					{{scope.row.interest}}%
+				</template>
+			</el-table-column>
+			<el-table-column align="center" label="状态" prop="statusText">
+
+			</el-table-column>
+			<el-table-column align="center" label="时间" prop="createdAt">
+
+			</el-table-column>
+			<el-table-column align="center" prop="created_at" label="操作" width="300">
+				<template slot-scope="scope">
+					<el-tag type="success" style="cursor: pointer;margin-right: 15px;" @click="toDetail(scope.row.id)">
+						详情</el-tag>
+					<el-tag type="warning" style="cursor: pointer;margin-right: 15px;">复原</el-tag>
+					<el-tag type="danger" style="cursor: pointer;margin-right: 15px;"
+						@click.native.prevent="deleteRow(scope.row.id,list)">删除</el-tag>
+
+				</template>
+			</el-table-column>
+		</el-table>
+		<div class="pagesip">
+			<el-button type="primary" size="small"
+				style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页
+			</el-button>
+			<el-pagination background @current-change="handleCurrentChange" layout="prev, pager, next"
+				:total="list.length" :page-size="1" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
+				ref="pagination">
+			</el-pagination>
+			<el-button type="primary" size="small"
+				style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
+			</el-button>
+		</div>
+	</div>
 </template>
 </template>
 
 
 <script>
 <script>
-  import {
-    getList
-  } from '@/api/table'
-
-  export default {
-    filters: {
-      statusFilter(status) {
-        const statusMap = {
-          published: 'success',
-          draft: 'gray',
-          deleted: 'danger'
-        }
-        return statusMap[status]
-      }
-    },
-    data() {
-      return {
-        list: [],
-        listLoading: false,
-        status: '',
-		multipleSelection:[],
-        hpstatus: '',
-        input4: '',
-        checked: false,
-        pickerOptions: {
-          shortcuts: [{
-            text: '最近一周',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近一个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近三个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit('pick', [start, end]);
-            }
-          }]
-        },
-        value1: '',
-        value2: ''
-      }
-    },
-    created() {
-      // this.fetchData()
-    },
-    mounted() {
-        this.$request({
-        url:'/api/Acceptor/search',
-        method:'post',
-        data:{
-          pageIndex:1,
-          pageSize:10,
-        }
-      }).then((res)=>{
-        console.log(res.data.result)
-        this.list=res.data.result
-      })
-    },
-    methods: {
-      handleCommand(command) {
-        this.status = command
-
-      },
-      handlehpCommand(command) {
-        this.hpstatus = command
-      },
-	  handleSelectionChange(data) {
-		  this.multipleSelection=data
-		  console.log(this.multipleSelection)
-	  },
-      // fetchData() {
-      //   this.listLoading = true
-      //   getList().then(response => {
-      //     this.list = response.data.items
-      //     this.listLoading = false
-      //   })
-      // },
-      addAcceptor(){
-        this.$router.push({path:'table/addAcceptor'})
-      },
-      toDetail(id){
-        this.$router.push({path:'table/detail',query:{id:id}})
-      },
-	  deleteRow(index,rows) {
-	  		  console.log(rows)
-	            rows.splice(index, 1);
-	          }
-	  
-    }
-  }
+	import {
+		getList
+	} from '@/api/table'
+
+	export default {
+		filters: {
+			statusFilter(status) {
+				const statusMap = {
+					published: 'success',
+					draft: 'gray',
+					deleted: 'danger'
+				}
+				return statusMap[status]
+			}
+		},
+		data() {
+			return {
+				srcList: [],
+				list: [],
+				listLoading: false,
+				status: '',
+				currentPage: 1,
+				pagesize: 11,
+				multipleSelection: [],
+				hpstatus: '',
+				input4: '',
+				checked: false,
+				pickerOptions: {
+					shortcuts: [{
+						text: '最近一周',
+						onClick(picker) {
+							const end = new Date();
+							const start = new Date();
+							start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+							picker.$emit('pick', [start, end]);
+						}
+					}, {
+						text: '最近一个月',
+						onClick(picker) {
+							const end = new Date();
+							const start = new Date();
+							start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+							picker.$emit('pick', [start, end]);
+						}
+					}, {
+						text: '最近三个月',
+						onClick(picker) {
+							const end = new Date();
+							const start = new Date();
+							start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+							picker.$emit('pick', [start, end]);
+						}
+					}]
+				},
+				value1: '',
+				value2: ''
+			}
+		},
+		created() {
+		},
+		mounted() {
+			this.$request({
+				url: '/api/Acceptor/search',
+				method: 'post',
+				data: {
+					pageIndex: 1,
+					pageSize: 12,
+				}
+			}).then((res) => {
+				console.log(res.data.result);
+				this.list = res.data.result;
+				this.getPageData();
+			})
+		},
+		methods: {
+			handleCommand(command) {
+				this.status = command
+			},
+			handlehpCommand(command) {
+				this.hpstatus = command
+			},
+			handleSelectionChange(data) {
+				this.multipleSelection = data
+				console.log(this.multipleSelection)
+			},
+	
+			addAcceptor() {
+				this.$router.push({
+					path: 'table/addAcceptor'
+				})
+			},
+			toDetail(id) {
+				this.$router.push({
+					path: 'table/detail',
+					query: {
+						id: id
+					}
+				})
+			},
+			deleteRow(row, rows) {
+				rows.splice(row, 1);
+			},
+
+			handleCurrentChange(val) {
+				this.currentPage = val;
+				this.getPageData();
+			},
+			jumpFirstPage() {
+				this.$refs.pagination.handleCurrentChange(1);
+				this.$emit('handleCurrentChange', 1);
+			},
+			jumpLastPage() {
+				let font = this.$refs.pagination
+				let cpage = Math.ceil(font.total / font.pageSize);
+				font.handleCurrentChange(cpage);
+			},
+			getPageData() {
+				let start = (this.currentPage - 1) * this.pagesize;
+				let end = start + this.pagesize;
+				this.srcList = this.list.slice(start, end);
+			},
+		},
+	}
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
-  .pulldown {
-    width: 185px;
-    height: 40px;
-    border: 1px solid #E8E8E8;
-    border-radius: 10px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    justify-content: space-between;
-    padding: 0 20px;
-    color: #999999;
-  }
-
-  .pagesip {
-    width: 100%;
-    margin: 20px auto;
-    display: flex;
-    // align-items: center;
-    justify-content: flex-end;
-  }
-
-  .el-pagination.is-background .el-pager li:not(.disabled).active {
-    background-color: #D8AB5A;
-  }
-
-  .el-col {
-    margin-bottom: 20px;
-  }
+	.pulldown {
+		width: 185px;
+		height: 40px;
+		border: 1px solid #E8E8E8;
+		border-radius: 10px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20px;
+		color: #999999;
+	}
+
+	.pagesip {
+		position: fixed;
+		bottom: 16px;
+		width: 88%;
+		display: flex;
+		// align-items: center;
+		justify-content: flex-end;
+	}
+
+	.el-pagination.is-background .el-pager li:not(.disabled).active {
+		background-color: #D8AB5A;
+	}
+
+	.el-col {
+		margin-bottom: 20px;
+	}
 </style>
 </style>