|  | @@ -0,0 +1,625 @@
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +  <div class="app-container">
 | 
	
		
			
				|  |  | +    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
 | 
	
		
			
				|  |  | +      <!--      <el-form-item label="业务编号" prop="fBillno">-->
 | 
	
		
			
				|  |  | +      <!--        <el-input-->
 | 
	
		
			
				|  |  | +      <!--          v-model="queryParams.fBillno"-->
 | 
	
		
			
				|  |  | +      <!--          placeholder="请输入业务编号"-->
 | 
	
		
			
				|  |  | +      <!--          clearable-->
 | 
	
		
			
				|  |  | +      <!--          size="small"-->
 | 
	
		
			
				|  |  | +      <!--          @keyup.enter.native="handleQuery"-->
 | 
	
		
			
				|  |  | +      <!--        />-->
 | 
	
		
			
				|  |  | +      <!--      </el-form-item>-->
 | 
	
		
			
				|  |  | +      <el-form-item label="客户名称" prop="fCorpid">
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          v-model="queryParams.fCorpid"
 | 
	
		
			
				|  |  | +          placeholder="请输入客户名称"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          size="small"
 | 
	
		
			
				|  |  | +          @keyup.enter.native="handleQuery"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="货物品名" prop="fGoodsid">
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          v-model="queryParams.fGoodsid"
 | 
	
		
			
				|  |  | +          placeholder="请输入货物品名"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          size="small"
 | 
	
		
			
				|  |  | +          @keyup.enter.native="handleQuery"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="制单部门" prop="fDeptid">
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          v-model="queryParams.fDeptid"
 | 
	
		
			
				|  |  | +          placeholder="请输入制单部门"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          size="small"
 | 
	
		
			
				|  |  | +          @keyup.enter.native="handleQuery"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="有效期起" prop="fBegindate">
 | 
	
		
			
				|  |  | +        <el-date-picker clearable size="small" style="width: 200px"
 | 
	
		
			
				|  |  | +                        v-model="queryParams.fBegindate"
 | 
	
		
			
				|  |  | +                        type="date"
 | 
	
		
			
				|  |  | +                        value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                        placeholder="选择有效期起"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +        </el-date-picker>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="有效期至" prop="fEnddate">
 | 
	
		
			
				|  |  | +        <el-date-picker clearable size="small" style="width: 200px"
 | 
	
		
			
				|  |  | +                        v-model="queryParams.fEnddate"
 | 
	
		
			
				|  |  | +                        type="date"
 | 
	
		
			
				|  |  | +                        value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                        placeholder="选择有效期至"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +        </el-date-picker>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="协议编号" prop="fContractno">
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          v-model="queryParams.fContractno"
 | 
	
		
			
				|  |  | +          placeholder="请输入协议编号"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          size="small"
 | 
	
		
			
				|  |  | +          @keyup.enter.native="handleQuery"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item>
 | 
	
		
			
				|  |  | +        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 | 
	
		
			
				|  |  | +        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +    </el-form>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <el-row :gutter="10" class="mb8">
 | 
	
		
			
				|  |  | +      <el-col :span="1.5">
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          type="primary"
 | 
	
		
			
				|  |  | +          icon="el-icon-plus"
 | 
	
		
			
				|  |  | +          size="mini"
 | 
	
		
			
				|  |  | +          @click="handleAdd()"
 | 
	
		
			
				|  |  | +          v-hasPermi="['warehouseBusiness:agreement:add']"
 | 
	
		
			
				|  |  | +        >新增
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </el-col>
 | 
	
		
			
				|  |  | +      <el-col :span="1.5">
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          type="success"
 | 
	
		
			
				|  |  | +          icon="el-icon-edit"
 | 
	
		
			
				|  |  | +          size="mini"
 | 
	
		
			
				|  |  | +          :disabled="single"
 | 
	
		
			
				|  |  | +          @click="handleUpdate"
 | 
	
		
			
				|  |  | +          v-hasPermi="['warehouseBusiness:agreement:edit']"
 | 
	
		
			
				|  |  | +        >修改
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </el-col>
 | 
	
		
			
				|  |  | +      <el-col :span="1.5">
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          type="danger"
 | 
	
		
			
				|  |  | +          icon="el-icon-delete"
 | 
	
		
			
				|  |  | +          size="mini"
 | 
	
		
			
				|  |  | +          :disabled="multiple"
 | 
	
		
			
				|  |  | +          @click="handleDelete"
 | 
	
		
			
				|  |  | +          v-hasPermi="['warehouseBusiness:agreement:remove']"
 | 
	
		
			
				|  |  | +        >删除
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </el-col>
 | 
	
		
			
				|  |  | +      <el-col :span="1.5">
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          type="warning"
 | 
	
		
			
				|  |  | +          icon="el-icon-download"
 | 
	
		
			
				|  |  | +          size="mini"
 | 
	
		
			
				|  |  | +          @click="handleExport"
 | 
	
		
			
				|  |  | +          v-hasPermi="['warehouseBusiness:agreement:export']"
 | 
	
		
			
				|  |  | +        >导出
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </el-col>
 | 
	
		
			
				|  |  | +      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
	
		
			
				|  |  | +    </el-row>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <el-table v-loading="loading" :data="agreementList" @selection-change="handleSelectionChange">
 | 
	
		
			
				|  |  | +      <el-table-column type="selection" width="55" align="center"/>
 | 
	
		
			
				|  |  | +      <el-table-column label="合同编号" align="center" prop="fContractno"/>
 | 
	
		
			
				|  |  | +      <el-table-column label="客户名称" align="center" prop="fCorpid"/>
 | 
	
		
			
				|  |  | +      <el-table-column label="货物品名" align="center" prop="fGoodsid"/>
 | 
	
		
			
				|  |  | +      <el-table-column label="有效期起" align="center" prop="fBegindate" width="180">
 | 
	
		
			
				|  |  | +        <template slot-scope="scope">
 | 
	
		
			
				|  |  | +          <span>{{ parseTime(scope.row.fBegindate, '{y}-{m}-{d}') }}</span>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +      </el-table-column>
 | 
	
		
			
				|  |  | +      <el-table-column label="有效期至" align="center" prop="fEnddate" width="180">
 | 
	
		
			
				|  |  | +        <template slot-scope="scope">
 | 
	
		
			
				|  |  | +          <span>{{ parseTime(scope.row.fEnddate, '{y}-{m}-{d}') }}</span>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +      </el-table-column>
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="状态" align="center" prop="fId" />-->
 | 
	
		
			
				|  |  | +      <el-table-column label="状态" align="center" prop="fBillstatus"/>
 | 
	
		
			
				|  |  | +      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
	
		
			
				|  |  | +        <template slot-scope="scope">
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            size="mini"
 | 
	
		
			
				|  |  | +            type="text"
 | 
	
		
			
				|  |  | +            icon="el-icon-edit"
 | 
	
		
			
				|  |  | +            @click="handleUpdate(scope.row)"
 | 
	
		
			
				|  |  | +            v-hasPermi="['warehouseBusiness:agreement:edit']"
 | 
	
		
			
				|  |  | +          >修改
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            size="mini"
 | 
	
		
			
				|  |  | +            type="text"
 | 
	
		
			
				|  |  | +            icon="el-icon-delete"
 | 
	
		
			
				|  |  | +            @click="handleDelete(scope.row)"
 | 
	
		
			
				|  |  | +            v-hasPermi="['warehouseBusiness:agreement:remove']"
 | 
	
		
			
				|  |  | +          >删除
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +      </el-table-column>
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="业务编号" align="center" prop="fBillno" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="制单部门" align="center" prop="fDeptid" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="结算方式" align="center" prop="fStltypeid" :formatter="fStltypeidFormat" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="费用类型" align="center" prop="fFeetypeid" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="货物类别" align="center" prop="tPackages" :formatter="tPackagesFormat" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="贸易方式" align="center" prop="fTrademodeid" :formatter="fTrademodeidFormat" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="免堆天数" align="center" prop="fFreedays" />-->
 | 
	
		
			
				|  |  | +      <!--      <el-table-column label="备注" align="center" prop="remark" />-->
 | 
	
		
			
				|  |  | +    </el-table>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <pagination
 | 
	
		
			
				|  |  | +      v-show="total>0"
 | 
	
		
			
				|  |  | +      :total="total"
 | 
	
		
			
				|  |  | +      :page.sync="queryParams.pageNum"
 | 
	
		
			
				|  |  | +      :limit.sync="queryParams.pageSize"
 | 
	
		
			
				|  |  | +      @pagination="getList"
 | 
	
		
			
				|  |  | +    />
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <!-- 添加或修改仓储费对话框 -->
 | 
	
		
			
				|  |  | +    <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
 | 
	
		
			
				|  |  | +      <el-form ref="form" :model="form" :rules="rules" label-width="80px"
 | 
	
		
			
				|  |  | +               style="display: flex;flex-wrap: wrap;justify-content:space-between"
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +        <el-form-item label="客户名称" prop="fCorpid">
 | 
	
		
			
				|  |  | +          <el-input v-model="form.fCorpid" placeholder="请输入客户名称" style="width: 200px"/>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="货物品名" prop="fGoodsid">
 | 
	
		
			
				|  |  | +          <el-input v-model="form.fGoodsid" placeholder="请输入货物品名" style="width: 200px"/>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="制单部门" prop="fDeptid">
 | 
	
		
			
				|  |  | +          <el-input v-model="form.fDeptid" placeholder="请输入制单部门" style="width: 200px"/>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="有效期起" prop="fBegindate">
 | 
	
		
			
				|  |  | +          <el-date-picker clearable size="small" style="width: 200px"
 | 
	
		
			
				|  |  | +                          v-model="form.fBegindate"
 | 
	
		
			
				|  |  | +                          type="date"
 | 
	
		
			
				|  |  | +                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                          placeholder="选择有效期起"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +          </el-date-picker>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="有效期至" prop="fEnddate">
 | 
	
		
			
				|  |  | +          <el-date-picker clearable size="small" style="width: 200px"
 | 
	
		
			
				|  |  | +                          v-model="form.fEnddate"
 | 
	
		
			
				|  |  | +                          type="date"
 | 
	
		
			
				|  |  | +                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                          placeholder="选择有效期至"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +          </el-date-picker>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="合同编号" prop="fContractno">
 | 
	
		
			
				|  |  | +          <el-input v-model="form.fContractno" placeholder="请输入合同编号" style="width: 200px"/>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="业务编号" prop="fBillno">-->
 | 
	
		
			
				|  |  | +        <!--          <el-input v-model="form.fBillno" placeholder="请输入业务编号" />-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="结算方式" prop="fStltypeid">-->
 | 
	
		
			
				|  |  | +        <!--          <el-select v-model="form.fStltypeid" placeholder="请选择结算方式">-->
 | 
	
		
			
				|  |  | +        <!--            <el-option-->
 | 
	
		
			
				|  |  | +        <!--              v-for="dict in fStltypeidOptions"-->
 | 
	
		
			
				|  |  | +        <!--              :key="dict.dictValue"-->
 | 
	
		
			
				|  |  | +        <!--              :label="dict.dictLabel"-->
 | 
	
		
			
				|  |  | +        <!--              :value="parseInt(dict.dictValue)"-->
 | 
	
		
			
				|  |  | +        <!--            ></el-option>-->
 | 
	
		
			
				|  |  | +        <!--          </el-select>-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="费用类型" prop="fFeetypeid">-->
 | 
	
		
			
				|  |  | +        <!--          <el-select v-model="form.fFeetypeid" placeholder="请选择费用类型">-->
 | 
	
		
			
				|  |  | +        <!--            <el-option label="请选择字典生成" value="" />-->
 | 
	
		
			
				|  |  | +        <!--          </el-select>-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="货物类别" prop="tPackages">-->
 | 
	
		
			
				|  |  | +        <!--          <el-select v-model="form.tPackages" placeholder="请选择货物类别">-->
 | 
	
		
			
				|  |  | +        <!--            <el-option-->
 | 
	
		
			
				|  |  | +        <!--              v-for="dict in tPackagesOptions"-->
 | 
	
		
			
				|  |  | +        <!--              :key="dict.dictValue"-->
 | 
	
		
			
				|  |  | +        <!--              :label="dict.dictLabel"-->
 | 
	
		
			
				|  |  | +        <!--              :value="dict.dictValue"-->
 | 
	
		
			
				|  |  | +        <!--            ></el-option>-->
 | 
	
		
			
				|  |  | +        <!--          </el-select>-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="贸易方式" prop="fTrademodeid">-->
 | 
	
		
			
				|  |  | +        <!--          <el-select v-model="form.fTrademodeid" placeholder="请选择贸易方式">-->
 | 
	
		
			
				|  |  | +        <!--            <el-option-->
 | 
	
		
			
				|  |  | +        <!--              v-for="dict in fTrademodeidOptions"-->
 | 
	
		
			
				|  |  | +        <!--              :key="dict.dictValue"-->
 | 
	
		
			
				|  |  | +        <!--              :label="dict.dictLabel"-->
 | 
	
		
			
				|  |  | +        <!--              :value="parseInt(dict.dictValue)"-->
 | 
	
		
			
				|  |  | +        <!--            ></el-option>-->
 | 
	
		
			
				|  |  | +        <!--          </el-select>-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="免堆天数" prop="fFreedays">-->
 | 
	
		
			
				|  |  | +        <!--          <el-input v-model="form.fFreedays" placeholder="请输入免堆天数" />-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="状态">-->
 | 
	
		
			
				|  |  | +        <!--          <el-radio-group v-model="form.fBillstatus">-->
 | 
	
		
			
				|  |  | +        <!--            <el-radio label="1">请选择字典生成</el-radio>-->
 | 
	
		
			
				|  |  | +        <!--          </el-radio-group>-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="删除状态" prop="delFlag">-->
 | 
	
		
			
				|  |  | +        <!--          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +        <!--        <el-form-item label="备注" prop="remark">-->
 | 
	
		
			
				|  |  | +        <!--          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />-->
 | 
	
		
			
				|  |  | +        <!--        </el-form-item>-->
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  | +      <el-button type="primary" @click="">请 核</el-button>
 | 
	
		
			
				|  |  | +      <div class="dialogTableTitle flex a-center jlr">
 | 
	
		
			
				|  |  | +        <h2>标题</h2>
 | 
	
		
			
				|  |  | +        <!--        <el-button :disabled="browseStatus" @click.prevent="addRelevant()">新增</el-button>-->
 | 
	
		
			
				|  |  | +        <!--        <el-button :disabled="dataListSelection.length <= 0" @click.prevent="creditClick()">入库确认</el-button>-->
 | 
	
		
			
				|  |  | +        <!--        <el-button :disabled="browseStatus" @click.prevent="deleteRoww(warehouseDrList)">删除</el-button>-->
 | 
	
		
			
				|  |  | +        <el-button @click="getList_s()">新增</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="test_s">删除</el-button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <el-table v-loading="loading_s" :data="agreementitemsList" @selection-change="handleSelectionChange">
 | 
	
		
			
				|  |  | +        <el-table-column type="selection" width="55" align="center"/>
 | 
	
		
			
				|  |  | +        <el-table-column label="行号" align="center" type="index" width="100" />
 | 
	
		
			
				|  |  | +        <el-table-column label="计价单位" align="center" width="150">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <el-input
 | 
	
		
			
				|  |  | +              v-model="scope.row.fFeeunitid"
 | 
	
		
			
				|  |  | +              placeholder="请输入计价单位"
 | 
	
		
			
				|  |  | +              clearable
 | 
	
		
			
				|  |  | +              size="small"
 | 
	
		
			
				|  |  | +            />
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="开始天数" align="center" width="250">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <el-date-picker clearable size="small"
 | 
	
		
			
				|  |  | +                            v-model="scope.row.fFromdays"
 | 
	
		
			
				|  |  | +                            type="date"
 | 
	
		
			
				|  |  | +                            value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                            placeholder="选择有效期起">
 | 
	
		
			
				|  |  | +            </el-date-picker>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="结束天数" align="center" width="250">
 | 
	
		
			
				|  |  | +          <el-date-picker clearable size="small"
 | 
	
		
			
				|  |  | +                          slot-scope="scope"
 | 
	
		
			
				|  |  | +                          v-model="scope.row.fEndays"
 | 
	
		
			
				|  |  | +                          type="date"
 | 
	
		
			
				|  |  | +                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                          placeholder="选择有效期起">
 | 
	
		
			
				|  |  | +          </el-date-picker>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="单价" align="center" width="150">
 | 
	
		
			
				|  |  | +          <el-input
 | 
	
		
			
				|  |  | +            slot-scope="scope"
 | 
	
		
			
				|  |  | +            v-model="scope.row.fPrice"
 | 
	
		
			
				|  |  | +            placeholder="请输入单价"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="录入人" align="center" width="150">
 | 
	
		
			
				|  |  | +          <el-input
 | 
	
		
			
				|  |  | +            slot-scope="scope"
 | 
	
		
			
				|  |  | +            v-model="scope.row.createBy"
 | 
	
		
			
				|  |  | +            placeholder="默认录入人"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="录入时间" align="center" width="150">
 | 
	
		
			
				|  |  | +          <el-input
 | 
	
		
			
				|  |  | +            slot-scope="scope"
 | 
	
		
			
				|  |  | +            v-model="scope.row.createTime"
 | 
	
		
			
				|  |  | +            placeholder="默认录入时间"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="费用名称" align="center" width="150">
 | 
	
		
			
				|  |  | +          <el-input
 | 
	
		
			
				|  |  | +            slot-scope="scope"
 | 
	
		
			
				|  |  | +            v-model="scope.row.fFeeid"
 | 
	
		
			
				|  |  | +            placeholder="请输入费用名称"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +              size="mini"
 | 
	
		
			
				|  |  | +              type="text"
 | 
	
		
			
				|  |  | +              icon="el-icon-delete"
 | 
	
		
			
				|  |  | +              @click="handleDelete(scope.row)"
 | 
	
		
			
				|  |  | +              v-hasPermi="['warehouseBusiness:agreementitems:remove']"
 | 
	
		
			
				|  |  | +            >删除
 | 
	
		
			
				|  |  | +            </el-button>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +      </el-table>
 | 
	
		
			
				|  |  | +      <div slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  | +        <el-button type="primary" @click="submitForm">确 定</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="cancel">取 消</el-button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  | +  </div>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  listAgreement,
 | 
	
		
			
				|  |  | +  getAgreement,
 | 
	
		
			
				|  |  | +  delAgreement,
 | 
	
		
			
				|  |  | +  addAgreement,
 | 
	
		
			
				|  |  | +  updateAgreement,
 | 
	
		
			
				|  |  | +  exportAgreement,
 | 
	
		
			
				|  |  | +  listAgreementitems
 | 
	
		
			
				|  |  | +} from '@/api/warehouseBusiness/agreement'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  name: 'Agreement',
 | 
	
		
			
				|  |  | +  components: {},
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +      dataList: '',
 | 
	
		
			
				|  |  | +      // 遮罩层
 | 
	
		
			
				|  |  | +      loading: true,
 | 
	
		
			
				|  |  | +      loading_s: false,
 | 
	
		
			
				|  |  | +      // 选中数组
 | 
	
		
			
				|  |  | +      ids: [],
 | 
	
		
			
				|  |  | +      // 非单个禁用
 | 
	
		
			
				|  |  | +      single: true,
 | 
	
		
			
				|  |  | +      // 非多个禁用
 | 
	
		
			
				|  |  | +      multiple: true,
 | 
	
		
			
				|  |  | +      // 显示搜索条件
 | 
	
		
			
				|  |  | +      showSearch: true,
 | 
	
		
			
				|  |  | +      // 总条数
 | 
	
		
			
				|  |  | +      total: 0,
 | 
	
		
			
				|  |  | +      // 仓储费表格数据
 | 
	
		
			
				|  |  | +      agreementList: [],
 | 
	
		
			
				|  |  | +      // 弹出层标题
 | 
	
		
			
				|  |  | +      title: '',
 | 
	
		
			
				|  |  | +      // 是否显示弹出层
 | 
	
		
			
				|  |  | +      open: false,
 | 
	
		
			
				|  |  | +      // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典
 | 
	
		
			
				|  |  | +      fStltypeidOptions: [],
 | 
	
		
			
				|  |  | +      // 货物类别,存储t_packages,f_id 显示名称,可以多选t_packages 中的no或 name,模糊查找选择后,存储f_id,显示name字典
 | 
	
		
			
				|  |  | +      tPackagesOptions: [],
 | 
	
		
			
				|  |  | +      // 贸易方式,对应t_trademodels 字典
 | 
	
		
			
				|  |  | +      fTrademodeidOptions: [],
 | 
	
		
			
				|  |  | +      // 仓储费明细表表格数据
 | 
	
		
			
				|  |  | +      agreementitemsList: [],
 | 
	
		
			
				|  |  | +      // 查询参数
 | 
	
		
			
				|  |  | +      queryParams: {
 | 
	
		
			
				|  |  | +        pageNum: 1,
 | 
	
		
			
				|  |  | +        pageSize: 10,
 | 
	
		
			
				|  |  | +        fBillno: null,
 | 
	
		
			
				|  |  | +        fDeptid: null,
 | 
	
		
			
				|  |  | +        fContractno: null,
 | 
	
		
			
				|  |  | +        fCorpid: null,
 | 
	
		
			
				|  |  | +        fStltypeid: null,
 | 
	
		
			
				|  |  | +        fGoodsid: null,
 | 
	
		
			
				|  |  | +        fFeetypeid: null,
 | 
	
		
			
				|  |  | +        tPackages: null,
 | 
	
		
			
				|  |  | +        fTrademodeid: null,
 | 
	
		
			
				|  |  | +        fFreedays: null,
 | 
	
		
			
				|  |  | +        fBegindate: null,
 | 
	
		
			
				|  |  | +        fEnddate: null,
 | 
	
		
			
				|  |  | +        fBillstatus: null
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // 表单参数
 | 
	
		
			
				|  |  | +      form: {},
 | 
	
		
			
				|  |  | +      // 表单校验
 | 
	
		
			
				|  |  | +      rules: {
 | 
	
		
			
				|  |  | +        fBillno: [
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            required: true,
 | 
	
		
			
				|  |  | +            message: '业务编号,格式WA+YYYY+YY+NNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始不能为空',
 | 
	
		
			
				|  |  | +            trigger: 'blur'
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  | +        fDeptid: [
 | 
	
		
			
				|  |  | +          { required: true, message: '制单部门不能为空', trigger: 'blur' }
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  | +        fCorpid: [
 | 
	
		
			
				|  |  | +          { required: true, message: '客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name不能为空', trigger: 'blur' }
 | 
	
		
			
				|  |  | +        ]
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  created() {
 | 
	
		
			
				|  |  | +    this.getList()
 | 
	
		
			
				|  |  | +    this.getDicts('data_settlement_method').then(response => {
 | 
	
		
			
				|  |  | +      this.fStltypeidOptions = response.data
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    this.getDicts('data_package_unit').then(response => {
 | 
	
		
			
				|  |  | +      this.tPackagesOptions = response.data
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    this.getDicts('data_trademodes').then(response => {
 | 
	
		
			
				|  |  | +      this.fTrademodeidOptions = response.data
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    test_s(){
 | 
	
		
			
				|  |  | +      console.log(this.agreementitemsList)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 创建仓储费明细表列表 */
 | 
	
		
			
				|  |  | +    getList_s() {
 | 
	
		
			
				|  |  | +      console.log(this.agreementitemsList)
 | 
	
		
			
				|  |  | +      this.agreementitemsList.push({
 | 
	
		
			
				|  |  | +        //行号
 | 
	
		
			
				|  |  | +        fLineno:'',
 | 
	
		
			
				|  |  | +        //计价单位
 | 
	
		
			
				|  |  | +        fFeeunitid:'',
 | 
	
		
			
				|  |  | +        //费用名称
 | 
	
		
			
				|  |  | +        fFeeid:'',
 | 
	
		
			
				|  |  | +        //开始天数
 | 
	
		
			
				|  |  | +        fFromdays:'',
 | 
	
		
			
				|  |  | +        //结束天数
 | 
	
		
			
				|  |  | +        fEndays:'',
 | 
	
		
			
				|  |  | +        //单价
 | 
	
		
			
				|  |  | +        fPrice:'',
 | 
	
		
			
				|  |  | +        //录入人
 | 
	
		
			
				|  |  | +        createBy:'',
 | 
	
		
			
				|  |  | +        //创建时间
 | 
	
		
			
				|  |  | +        createTime:''
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      listAgreementitems(this.queryParams).then(response => {
 | 
	
		
			
				|  |  | +        console.log(response)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 查询仓储费列表 */
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      this.loading = true
 | 
	
		
			
				|  |  | +      listAgreement(this.queryParams).then(response => {
 | 
	
		
			
				|  |  | +        console.log(response)
 | 
	
		
			
				|  |  | +        this.agreementList = response.rows
 | 
	
		
			
				|  |  | +        this.total = response.total
 | 
	
		
			
				|  |  | +        this.loading = false
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典翻译
 | 
	
		
			
				|  |  | +    fStltypeidFormat(row, column) {
 | 
	
		
			
				|  |  | +      return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 货物类别,存储t_packages,f_id 显示名称,可以多选t_packages 中的no或 name,模糊查找选择后,存储f_id,显示name字典翻译
 | 
	
		
			
				|  |  | +    tPackagesFormat(row, column) {
 | 
	
		
			
				|  |  | +      return this.selectDictLabel(this.tPackagesOptions, row.tPackages)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 贸易方式,对应t_trademodels 字典翻译
 | 
	
		
			
				|  |  | +    fTrademodeidFormat(row, column) {
 | 
	
		
			
				|  |  | +      return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 取消按钮
 | 
	
		
			
				|  |  | +    cancel() {
 | 
	
		
			
				|  |  | +      this.open = false
 | 
	
		
			
				|  |  | +      this.reset()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 表单重置
 | 
	
		
			
				|  |  | +    reset() {
 | 
	
		
			
				|  |  | +      this.form = {
 | 
	
		
			
				|  |  | +        fId: null,
 | 
	
		
			
				|  |  | +        fBillno: null,
 | 
	
		
			
				|  |  | +        fDeptid: null,
 | 
	
		
			
				|  |  | +        fContractno: null,
 | 
	
		
			
				|  |  | +        fCorpid: null,
 | 
	
		
			
				|  |  | +        fStltypeid: null,
 | 
	
		
			
				|  |  | +        fGoodsid: null,
 | 
	
		
			
				|  |  | +        fFeetypeid: null,
 | 
	
		
			
				|  |  | +        tPackages: null,
 | 
	
		
			
				|  |  | +        fTrademodeid: null,
 | 
	
		
			
				|  |  | +        fFreedays: null,
 | 
	
		
			
				|  |  | +        fBegindate: null,
 | 
	
		
			
				|  |  | +        fEnddate: null,
 | 
	
		
			
				|  |  | +        fBillstatus: '0',
 | 
	
		
			
				|  |  | +        delFlag: null,
 | 
	
		
			
				|  |  | +        createBy: null,
 | 
	
		
			
				|  |  | +        createTime: null,
 | 
	
		
			
				|  |  | +        updateBy: null,
 | 
	
		
			
				|  |  | +        updateTime: null,
 | 
	
		
			
				|  |  | +        remark: null
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.resetForm('form')
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 搜索按钮操作 */
 | 
	
		
			
				|  |  | +    handleQuery() {
 | 
	
		
			
				|  |  | +      this.queryParams.pageNum = 1
 | 
	
		
			
				|  |  | +      this.getList()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 重置按钮操作 */
 | 
	
		
			
				|  |  | +    resetQuery() {
 | 
	
		
			
				|  |  | +      this.resetForm('queryForm')
 | 
	
		
			
				|  |  | +      this.handleQuery()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 多选框选中数据
 | 
	
		
			
				|  |  | +    handleSelectionChange(selection) {
 | 
	
		
			
				|  |  | +      this.ids = selection.map(item => item.fId)
 | 
	
		
			
				|  |  | +      this.single = selection.length !== 1
 | 
	
		
			
				|  |  | +      this.multiple = !selection.length
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 新增按钮操作 */
 | 
	
		
			
				|  |  | +    handleAdd() {
 | 
	
		
			
				|  |  | +      this.reset()
 | 
	
		
			
				|  |  | +      this.open = true
 | 
	
		
			
				|  |  | +      this.title = '添加仓储费'
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 修改按钮操作 */
 | 
	
		
			
				|  |  | +    handleUpdate(row) {
 | 
	
		
			
				|  |  | +      this.reset()
 | 
	
		
			
				|  |  | +      const fId = row.fId || this.ids
 | 
	
		
			
				|  |  | +      getAgreement(fId).then(response => {
 | 
	
		
			
				|  |  | +        this.form = response.data
 | 
	
		
			
				|  |  | +        this.open = true
 | 
	
		
			
				|  |  | +        this.title = '修改仓储费'
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 提交按钮 */
 | 
	
		
			
				|  |  | +    submitForm() {
 | 
	
		
			
				|  |  | +      this.$refs['form'].validate(valid => {
 | 
	
		
			
				|  |  | +        if (valid) {
 | 
	
		
			
				|  |  | +          if (this.form.fId != null) {
 | 
	
		
			
				|  |  | +            updateAgreement(this.form).then(response => {
 | 
	
		
			
				|  |  | +              this.msgSuccess('修改成功')
 | 
	
		
			
				|  |  | +              this.open = false
 | 
	
		
			
				|  |  | +              this.getList()
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          } else {
 | 
	
		
			
				|  |  | +            let formData = new window.FormData();
 | 
	
		
			
				|  |  | +            // 附件数据
 | 
	
		
			
				|  |  | +            formData.append("agreement",JSON.stringify(this.form))
 | 
	
		
			
				|  |  | +            formData.append("agreementitems", JSON.stringify(this.agreementitemsList));
 | 
	
		
			
				|  |  | +            addAgreement(formData).then(response => {
 | 
	
		
			
				|  |  | +              this.msgSuccess('新增成功')
 | 
	
		
			
				|  |  | +              this.open = false
 | 
	
		
			
				|  |  | +              this.getList()
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 删除按钮操作 */
 | 
	
		
			
				|  |  | +    handleDelete(row) {
 | 
	
		
			
				|  |  | +      const fIds = row.fId || this.ids
 | 
	
		
			
				|  |  | +      this.$confirm('是否确认删除仓储费编号为"' + fIds + '"的数据项?', '警告', {
 | 
	
		
			
				|  |  | +        confirmButtonText: '确定',
 | 
	
		
			
				|  |  | +        cancelButtonText: '取消',
 | 
	
		
			
				|  |  | +        type: 'warning'
 | 
	
		
			
				|  |  | +      }).then(function() {
 | 
	
		
			
				|  |  | +        return delAgreement(fIds)
 | 
	
		
			
				|  |  | +      }).then(() => {
 | 
	
		
			
				|  |  | +        this.getList()
 | 
	
		
			
				|  |  | +        this.msgSuccess('删除成功')
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 导出按钮操作 */
 | 
	
		
			
				|  |  | +    handleExport() {
 | 
	
		
			
				|  |  | +      const queryParams = this.queryParams
 | 
	
		
			
				|  |  | +      this.$confirm('是否确认导出所有仓储费数据项?', '警告', {
 | 
	
		
			
				|  |  | +        confirmButtonText: '确定',
 | 
	
		
			
				|  |  | +        cancelButtonText: '取消',
 | 
	
		
			
				|  |  | +        type: 'warning'
 | 
	
		
			
				|  |  | +      }).then(function() {
 | 
	
		
			
				|  |  | +        return exportAgreement(queryParams)
 | 
	
		
			
				|  |  | +      }).then(response => {
 | 
	
		
			
				|  |  | +        this.download(response.msg)
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +</script>
 |