|
@@ -1,39 +1,937 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-form label-position="right" label-width="80px" :model="form">
|
|
|
- <el-row>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="名称">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <div>
|
|
|
+ <div class="app-container" v-if="dialogVisibleTwo">
|
|
|
+ <el-form label-position="right" label-width="80px" :model="form">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="协议名称">
|
|
|
+ <el-input v-model="form.name"
|
|
|
+ size="small"
|
|
|
+ style="width: 250px"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="客户名称">
|
|
|
+ <el-select
|
|
|
+ v-model="form.region"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请输入关键词"
|
|
|
+ style="width: 200px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in fMblnoOptions"
|
|
|
+ :key="index.fId"
|
|
|
+ :label="item.fName"
|
|
|
+ :value="item.fId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="业务类型">
|
|
|
+ <el-input v-model="form.type"
|
|
|
+ size="small"
|
|
|
+ style="width: 250px"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="截止日期">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 250px"
|
|
|
+ v-model="form.name"
|
|
|
+ size="small"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </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:inStock:add']"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="活动区域">
|
|
|
- <el-input v-model="form.region"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:edit']"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="活动形式">
|
|
|
- <el-input v-model="form.type"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="info"-->
|
|
|
+ <!-- icon="el-icon-download"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="single"-->
|
|
|
+ <!-- @click="copyUpdate"-->
|
|
|
+ <!-- v-hasPermi="['agreement:agreementStorage:export']"-->
|
|
|
+ <!-- >复制新增-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <div class="tabSetting">
|
|
|
+ <div style="margin-right: 20px">
|
|
|
+ <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
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
+ <div style="margin: 0 12px">
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-setting"
|
|
|
+ size="mini"
|
|
|
+ circle
|
|
|
+ @click="showSetting = !showSetting"
|
|
|
+ ></el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="warehousebillsList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="50" fixed align="center"/>
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="行号"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
+ fixed
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in getRowList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :width="item.width"
|
|
|
+ :prop="item.label"
|
|
|
+ align="center"
|
|
|
+ :fixed="item.fixed"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ sortable
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ min-width="180"
|
|
|
+ fixed="right"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row, true)"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:edit']"
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row, false)"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:edit']"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ <el-dialog
|
|
|
+ title="自定义列显示"
|
|
|
+ :visible.sync="showSetting"
|
|
|
+ width="700px"
|
|
|
+ v-dialogDrag
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <template slot="title">
|
|
|
+ <div class="avue-crud__dialog__header">
|
|
|
+ <span class="el-dialog__title">
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ display: inline-block;
|
|
|
+ width: 3px;
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 5px;
|
|
|
+ float: left;
|
|
|
+ margin-top: 2px;
|
|
|
+ "
|
|
|
+ ></span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div>配置排序列数据(拖动调整顺序)</div>
|
|
|
+ <div style="margin-left: 17px">
|
|
|
+ <el-checkbox
|
|
|
+ v-model="allCheck"
|
|
|
+ label="全选"
|
|
|
+ @change="allChecked"
|
|
|
+ ></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 4px; display: flex; justify-content: center">
|
|
|
+ <draggable
|
|
|
+ v-model="setRowList"
|
|
|
+ group="site"
|
|
|
+ animation="300"
|
|
|
+ @start="onStart"
|
|
|
+ @end="onEnd"
|
|
|
+ handle=".indraggable"
|
|
|
+ >
|
|
|
+ <transition-group>
|
|
|
+ <div
|
|
|
+ v-for="item in setRowList"
|
|
|
+ :key="item.surface"
|
|
|
+ class="listStyle"
|
|
|
+ >
|
|
|
+ <div style="width: 500px" class="indraggable">
|
|
|
+ <div class="progress" :style="{ width: item.width + 'px' }">
|
|
|
+ <el-checkbox
|
|
|
+ :label="item.name"
|
|
|
+ v-model="item.checked"
|
|
|
+ :true-label="0"
|
|
|
+ :false-label="1"
|
|
|
+ >{{ item.name }}
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input-number
|
|
|
+ v-model.number="item.width"
|
|
|
+ controls-position="right"
|
|
|
+ :min="1"
|
|
|
+ :max="500"
|
|
|
+ size="mini"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ </transition-group>
|
|
|
+ </draggable>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showSetting = false">取 消</el-button>
|
|
|
+ <el-button @click="delRow" type="danger">重 置</el-button>
|
|
|
+ <el-button type="primary" @click="save()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+ <div class="app-container" v-else>
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ @click="goBack"
|
|
|
+ >返回列表
|
|
|
+ </el-button>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="协议名称" prop="fName" style="width: 250px;" size="small">
|
|
|
+ <el-input v-model="form.fName" placeholder="请输入内容"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="客户名称" prop="fCorpId" size="small" style="width: 250px;">
|
|
|
+ <!-- <el-input v-model="form.fCorpId" placeholder="请输入客户名称"/>-->
|
|
|
+ <el-select
|
|
|
+ v-model="form.fCorpId"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请输入关键词"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in fMblnoOptions"
|
|
|
+ :key="index.fId"
|
|
|
+ :label="item.fName"
|
|
|
+ :value="item.fId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-form-item label="分类类型ID" prop="fTFeeAgreementTypeFId">-->
|
|
|
+ <!-- <el-input v-model="form.fTFeeAgreementTypeFId" placeholder="赋值" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="备注" prop="fRemark">-->
|
|
|
+ <!-- <el-input v-model="form.fRemark" type="textarea" placeholder="请输入内容" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="是否有效" prop="fIsValid" size="small" style="width: 250px;">
|
|
|
+ <el-select v-model="form.fIsValid" placeholder="请选择是否有效">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in fIsValidOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="是否提交" prop="fIsCommit" size="small" style="width: 250px;">
|
|
|
+ <el-select v-model="form.fIsCommit" placeholder="请选择是否提交">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in fIsCommitOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="是否标准" prop="fIsStandard" size="small" style="width: 250px;">
|
|
|
+ <el-select v-model="form.fIsStandard" placeholder="请选择是否标准">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in fIsStandardOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-menu v-show="dialogVisibleTwo === false" :default-active="activeIndex" class="el-menu-demo" mode="horizontal"
|
|
|
+ @select="handleSelect">
|
|
|
+ <el-menu-item
|
|
|
+ v-for="(item,index) in classType"
|
|
|
+ :key="item.fId"
|
|
|
+ :index="index.toString()">{{ item.fName }}
|
|
|
+ </el-menu-item>
|
|
|
+ </el-menu>
|
|
|
+ <el-row :gutter="10" style="margin: 10px auto">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="entryDetails"
|
|
|
+ >录入明细
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="submit"
|
|
|
+ >保存
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="6"></el-col>
|
|
|
+ <div style="margin: 0 12px;float: right">
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-setting"
|
|
|
+ size="mini"
|
|
|
+ circle
|
|
|
+ @click="showSettingTwo = !showSettingTwo"
|
|
|
+ ></el-button>
|
|
|
+ </div>
|
|
|
</el-row>
|
|
|
- </el-form>
|
|
|
+ <el-table
|
|
|
+ v-loading="loadingTwo"
|
|
|
+ :data="dataList"
|
|
|
+ @selection-change="handleSelectionChangeTwo"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="50" fixed align="center"/>
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="行号"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
+ fixed
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in getRowListTwo"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :width="item.width"
|
|
|
+ :prop="item.label"
|
|
|
+ align="center"
|
|
|
+ :fixed="item.fixed"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ sortable
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="item.label == 'fFeeItem'">{{ scope.row[item.label] }}</span>
|
|
|
+ <span v-else-if="item.label == 'fTFeeAgreementTypeFId'">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row[item.label]"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择业务"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in classType"
|
|
|
+ :key="index.fId"
|
|
|
+ :label="item.fName"
|
|
|
+ :value="item.fId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.label == 'fComputingMethod'">
|
|
|
+ <el-input v-model="scope.row[item.label]" placeholder="请输入内容" size="small"></el-input>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.label == 'fReceiptPaymentType'">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row[item.label]"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ size="small"
|
|
|
+ placeholder="请选择业务"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option label="收" value="D"></el-option>
|
|
|
+ <el-option label="付" value="C"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="item.label == 'fGetValue'">
|
|
|
+ <el-input v-model="scope.row[item.label]" size="small" placeholder="请输入内容"></el-input>
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ scope.row[item.label] }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ min-width="180"
|
|
|
+ fixed="right"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-dialog
|
|
|
+ title="自定义列显示"
|
|
|
+ :visible.sync="showSettingTwo"
|
|
|
+ width="700px"
|
|
|
+ v-dialogDrag
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <template slot="title">
|
|
|
+ <div class="avue-crud__dialog__header">
|
|
|
+ <span class="el-dialog__title">
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ display: inline-block;
|
|
|
+ width: 3px;
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 5px;
|
|
|
+ float: left;
|
|
|
+ margin-top: 2px;
|
|
|
+ "
|
|
|
+ ></span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div>配置排序列数据(拖动调整顺序)</div>
|
|
|
+ <div style="margin-left: 17px">
|
|
|
+ <el-checkbox
|
|
|
+ v-model="allCheckTwo"
|
|
|
+ label="全选"
|
|
|
+ @change="allChecked"
|
|
|
+ ></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 4px; display: flex; justify-content: center">
|
|
|
+ <draggable
|
|
|
+ v-model="setRowListTwo"
|
|
|
+ group="site"
|
|
|
+ animation="300"
|
|
|
+ @start="onStart"
|
|
|
+ @end="onEnd"
|
|
|
+ handle=".indraggable"
|
|
|
+ >
|
|
|
+ <transition-group>
|
|
|
+ <div
|
|
|
+ v-for="item in setRowListTwo"
|
|
|
+ :key="item.surface"
|
|
|
+ class="listStyle"
|
|
|
+ >
|
|
|
+ <div style="width: 500px" class="indraggable">
|
|
|
+ <div class="progress" :style="{ width: item.width + 'px' }">
|
|
|
+ <el-checkbox
|
|
|
+ :label="item.name"
|
|
|
+ v-model="item.checked"
|
|
|
+ :true-label="0"
|
|
|
+ :false-label="1"
|
|
|
+ >{{ item.name }}
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input-number
|
|
|
+ v-model.number="item.width"
|
|
|
+ controls-position="right"
|
|
|
+ :min="1"
|
|
|
+ :max="500"
|
|
|
+ size="mini"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ </transition-group>
|
|
|
+ </draggable>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showSettingTwo = false">取 消</el-button>
|
|
|
+ <el-button @click="delRow" type="danger">重 置</el-button>
|
|
|
+ <el-button type="primary" @click="save()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+
|
|
|
+import Cookies from "js-cookie";
|
|
|
+import draggable from "vuedraggable";
|
|
|
+import {addSet, resetModule, select} from "@/api/system/set";
|
|
|
+import {
|
|
|
+ listCorps,
|
|
|
+ listCorpsTwo,
|
|
|
+ detailed,
|
|
|
+ costType,
|
|
|
+ typeClassificationQuery,
|
|
|
+ submitSave
|
|
|
+} from "@/api/synthesis/index";
|
|
|
+import AddOrUpdate from "@/views/Warehousing/inStock/AddOrUpdate";
|
|
|
+
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
|
return {
|
|
|
- form: {
|
|
|
- name: '',
|
|
|
- region: '',
|
|
|
- type: ''
|
|
|
+ activeIndex: '0',
|
|
|
+ fMblnoOptions: [],
|
|
|
+ dialogVisibleTwo: true,
|
|
|
+ showSetting: false,
|
|
|
+ showSettingTwo: false,
|
|
|
+ getRowListTwo: [],
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ },
|
|
|
+ loading: true,
|
|
|
+ loadingTwo: true,
|
|
|
+ dataList: [],
|
|
|
+ getListOfDetailRows: [
|
|
|
+ {
|
|
|
+ surface: "1",
|
|
|
+ label: "fFeeItem",
|
|
|
+ name: "费目",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "2",
|
|
|
+ label: "fTFeeAgreementTypeFId",
|
|
|
+ name: "业务",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "3",
|
|
|
+ label: "fComputingMethod",
|
|
|
+ name: "计算方法",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "4",
|
|
|
+ label: "fReceiptPaymentType",
|
|
|
+ name: "收付类型",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "5",
|
|
|
+ label: "fGetValue",
|
|
|
+ name: "取值",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ warehousebillsList: [],
|
|
|
+ getRowList: [],
|
|
|
+ tableDate: [
|
|
|
+ {
|
|
|
+ surface: "1",
|
|
|
+ label: "fIsStandardName",
|
|
|
+ name: "标准",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "2",
|
|
|
+ label: "fIsValidName",
|
|
|
+ name: "有效",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "3",
|
|
|
+ label: "fIsCommitName",
|
|
|
+ name: "提交",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "4",
|
|
|
+ label: "fName",
|
|
|
+ name: "协议名称",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }, {
|
|
|
+ surface: "5",
|
|
|
+ label: "fCorpName",
|
|
|
+ name: "客户名称",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ setRowList: [],
|
|
|
+ setRowListTwo: [],
|
|
|
+ single: true,
|
|
|
+ allCheck: false,
|
|
|
+ allCheckTwo: false,
|
|
|
+ total: 0,
|
|
|
+ fIsValidOptions: [],
|
|
|
+ fIsCommitOptions: [],
|
|
|
+ fIsStandardOptions: [],
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ classType: [],
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ fCorpId: [
|
|
|
+ {required: true, message: " ", trigger: "blur"}
|
|
|
+ ],
|
|
|
}
|
|
|
};
|
|
|
+ },
|
|
|
+ components: {draggable},
|
|
|
+ created() {
|
|
|
+ this.getDicts("sys_yes_no").then(response => {
|
|
|
+ this.fIsValidOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_yes_no").then(response => {
|
|
|
+ this.fIsCommitOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_yes_no").then(response => {
|
|
|
+ this.fIsStandardOptions = response.data;
|
|
|
+ });
|
|
|
+ listCorpsTwo({type: 1}).then((response) => {
|
|
|
+ this.fMblnoOptions = response.rows;
|
|
|
+ });
|
|
|
+ costType().then(res => {
|
|
|
+ this.classType = res.rows
|
|
|
+ console.log(res.rows)
|
|
|
+ })
|
|
|
+ this.setRowList = this.tableDate;
|
|
|
+ this.getRowList = this.tableDate;
|
|
|
+ this.getList()
|
|
|
+ this.getRow()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleClose(done) {
|
|
|
+
|
|
|
+ },
|
|
|
+ //录入明细
|
|
|
+ entryDetails(){
|
|
|
+ this.dataList.push({
|
|
|
+ fFeeItem:27,
|
|
|
+ fTFeeAgreementTypeFId:this.classType[this.activeIndex].fId,
|
|
|
+ fComputingMethod:'',
|
|
|
+ fReceiptPaymentType:'',
|
|
|
+ fGetValue:'',
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //提交保存
|
|
|
+ submit(){
|
|
|
+ let data = this.form
|
|
|
+ data.TWarehouseFeeAgreementType = this.dataList
|
|
|
+ console.log(data)
|
|
|
+ submitSave(data).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goBack() {
|
|
|
+ this.$confirm("是否确定返回列表?", "提示", {
|
|
|
+ confirmButtonText: "保存",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.saveForm("goBack");
|
|
|
+ }).catch(() => {
|
|
|
+ this.cancel();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.getRow()
|
|
|
+ this.dialogVisibleTwo = true
|
|
|
+ },
|
|
|
+ handleSelect(key, keyPath) {
|
|
|
+ console.log(key, keyPath);
|
|
|
+ this.activeIndex = key
|
|
|
+ typeClassificationQuery({fTFeeAgreementTypeFId: this.classType[key].fId}).then(res => {
|
|
|
+ this.dataList = res.rows
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查询列数据
|
|
|
+ getRow() {
|
|
|
+ let that = this;
|
|
|
+ this.data = {
|
|
|
+ tableName: "综合协议",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ select(this.data).then((res) => {
|
|
|
+ if (res.data.length != 0) {
|
|
|
+ this.getRowList = res.data.filter((e) => e.checked == 0);
|
|
|
+ this.setRowList = res.data;
|
|
|
+ this.setRowList = this.setRowList.reduce((res, item) => {
|
|
|
+ res.push({
|
|
|
+ surface: item.surface,
|
|
|
+ label: item.label,
|
|
|
+ name: item.name,
|
|
|
+ checked: item.checked,
|
|
|
+ width: item.width,
|
|
|
+ fixed: item.fixed,
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查询详情列数据
|
|
|
+ getDetailsList() {
|
|
|
+ let that = this;
|
|
|
+ let data = {
|
|
|
+ tableName: "综合协议详情",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ select(data).then((res) => {
|
|
|
+ if (res.data.length != 0) {
|
|
|
+ this.getRowListTwo = res.data.filter((e) => e.checked == 0);
|
|
|
+ this.setRowListTwo = res.data;
|
|
|
+ this.setRowListTwo = this.setRowListTwo.reduce((res, item) => {
|
|
|
+ res.push({
|
|
|
+ surface: item.surface,
|
|
|
+ label: item.label,
|
|
|
+ name: item.name,
|
|
|
+ checked: item.checked,
|
|
|
+ width: item.width,
|
|
|
+ fixed: item.fixed,
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //保存列设置
|
|
|
+ save() {
|
|
|
+ this.showSetting = false;
|
|
|
+ let data = {
|
|
|
+ tableName: "综合协议",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ sysTableSetList: this.setRowList,
|
|
|
+ };
|
|
|
+ addSet(data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.showSetting = false;
|
|
|
+ this.getRowList = this.setRowList.filter((e) => e.checked == 0);
|
|
|
+ console.log(this.tableDate);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //重置列表
|
|
|
+ delRow() {
|
|
|
+ let data = {
|
|
|
+ tableName: "综合协议",
|
|
|
+ userId: Cookies.get("userName"),
|
|
|
+ };
|
|
|
+ resetModule(data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.showSetting = false;
|
|
|
+ this.setRowList = this.$options.data().tableDate;
|
|
|
+ this.getRowList = this.$options.data().tableDate;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //开始拖拽事件
|
|
|
+ onStart() {
|
|
|
+ this.drag = true;
|
|
|
+ },
|
|
|
+ //拖拽结束事件
|
|
|
+ onEnd() {
|
|
|
+ this.drag = false;
|
|
|
+ },
|
|
|
+ //列设置全选
|
|
|
+ allChecked() {
|
|
|
+ if (this.allCheck == true) {
|
|
|
+ this.setRowList.map((e) => {
|
|
|
+ return (e.checked = 0);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setRowList.map((e) => {
|
|
|
+ return (e.checked = 1);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ //获取仓库
|
|
|
+ listCorps(this.queryParams).then(res => {
|
|
|
+ this.warehousebillsList = res.rows
|
|
|
+ this.total = res.total
|
|
|
+ this.loading = false;
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row, state) {
|
|
|
+ this.setRowListTwo = this.getListOfDetailRows;
|
|
|
+ this.getRowListTwo = this.getListOfDetailRows;
|
|
|
+ this.dialogVisibleTwo = false
|
|
|
+ this.loadingTwo = false
|
|
|
+ console.log(row, state)
|
|
|
+ detailed(row.fId).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.form = res.data
|
|
|
+ this.dataList = res.data.tWarehouseFeeAgreementTypeBusinessList
|
|
|
+ delete this.form.tWarehouseFeeAgreementTypeBusinessList
|
|
|
+ console.log(this.form)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 多选框选中数据 */
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ console.log(selection)
|
|
|
+ },
|
|
|
+ /** 多选框选中数据二 */
|
|
|
+ handleSelectionChangeTwo(selection) {
|
|
|
+ console.log(selection)
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.queryParams = {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ };
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ //合计
|
|
|
+ getSum(param) {
|
|
|
+ const {columns, data} = param;
|
|
|
+ const sums = [];
|
|
|
+ var values = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = "";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (column.property === "fGrossweight") {
|
|
|
+ values = data.map((item) => Number(item["fGrossweight"]));
|
|
|
+ }
|
|
|
+ if (column.property === "fNetweight") {
|
|
|
+ values = data.map((item) => Number(item["fNetweight"]));
|
|
|
+ }
|
|
|
+ if (column.property === "fQty") {
|
|
|
+ values = data.map((item) => Number(item["fQty"]));
|
|
|
+ }
|
|
|
+ if (column.property === "fPlanqty") {
|
|
|
+ values = data.map((item) => Number(item.fPlanqty));
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ column.property === "fGrossweight" ||
|
|
|
+ column.property === "fNetweight" ||
|
|
|
+ column.property === "fQty" ||
|
|
|
+ column.property === "fPlanqty"
|
|
|
+ ) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ if (column.property === "fGrossweight") {
|
|
|
+ sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
|
|
|
+ }
|
|
|
+ if (column.property === "fNetweight") {
|
|
|
+ sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
|
|
|
+ }
|
|
|
+ if (column.property === "fQty") {
|
|
|
+ sums[index] = sums[index].toFixed(2);
|
|
|
+ }
|
|
|
+ if (column.property === "fPlanqty") {
|
|
|
+ if (sums[index]) {
|
|
|
+ sums[index] = sums[index];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|