|
@@ -173,37 +173,37 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="仓库" prop="fWarehouseid">
|
|
|
<el-select
|
|
|
- v-model="queryParams.fWarehouseid"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="请选择仓库"
|
|
|
- style="width: 200px"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
+ v-model="queryParams.fWarehouseid"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择仓库"
|
|
|
+ style="width: 200px"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in warehouseOptions"
|
|
|
- :key="index.fId"
|
|
|
- :label="item.fName"
|
|
|
- :value="item.fId"
|
|
|
+ v-for="(item, index) in warehouseOptions"
|
|
|
+ :key="index.fId"
|
|
|
+ :label="item.fName"
|
|
|
+ :value="item.fId"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="经营单位" prop="fSbu">-->
|
|
|
-<!-- <el-select-->
|
|
|
-<!-- v-model="queryParams.fSbu"-->
|
|
|
-<!-- 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-form-item label="经营单位" prop="fSbu">-->
|
|
|
+ <!-- <el-select-->
|
|
|
+ <!-- v-model="queryParams.fSbu"-->
|
|
|
+ <!-- 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="贸易方式" prop="fTrademodeid">
|
|
@@ -254,7 +254,7 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['warehouseBusiness:inStock:add']"
|
|
|
- >新增
|
|
|
+ >新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -265,7 +265,7 @@
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['warehouseBusiness:inStock:edit']"
|
|
|
- >修改
|
|
|
+ >修改
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -275,7 +275,7 @@
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['warehouseBusiness:inStock:export']"
|
|
|
- >导出
|
|
|
+ >导出
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -286,7 +286,7 @@
|
|
|
@click="handleExport"
|
|
|
:disabled="multiple"
|
|
|
v-hasPermi="['warehouseBusiness:inStock:export']"
|
|
|
- >导入
|
|
|
+ >导入
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -297,7 +297,7 @@
|
|
|
:disabled="single"
|
|
|
@click="copyUpdate"
|
|
|
v-hasPermi="['agreement:agreementStorage:export']"
|
|
|
- >复制新增
|
|
|
+ >复制新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<div class="tabSetting">
|
|
@@ -307,24 +307,24 @@
|
|
|
icon="el-icon-search"
|
|
|
size="mini"
|
|
|
@click="handleQuery"
|
|
|
- >搜索</el-button
|
|
|
+ >搜索</el-button
|
|
|
>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
- >重置</el-button
|
|
|
+ >重置</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
v-show="show"
|
|
|
@click="show = !show"
|
|
|
icon="el-icon-arrow-up"
|
|
|
size="mini"
|
|
|
- >展开</el-button
|
|
|
+ >展开</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
v-show="!show"
|
|
|
@click="show = !show"
|
|
|
icon="el-icon-arrow-down"
|
|
|
size="mini"
|
|
|
- >展开</el-button
|
|
|
+ >展开</el-button
|
|
|
>
|
|
|
</div>
|
|
|
<right-toolbar
|
|
@@ -341,6 +341,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
+
|
|
|
<el-dialog
|
|
|
title="自定义列显示"
|
|
|
:visible.sync="showSetting"
|
|
@@ -416,104 +417,106 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-table
|
|
|
- ref="table"
|
|
|
- v-loading="loading"
|
|
|
- :data="warehousebillsList"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- show-summary
|
|
|
- :summary-method="getSum"
|
|
|
- :height="tableHeight"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="60" 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
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="warehousebillsList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ show-summary
|
|
|
+ :summary-method="getSum"
|
|
|
+ :height="tableHeight"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="item.label == 'fMblno'">
|
|
|
- <el-link :underline="false" type="primary"
|
|
|
- ><div @click="handleUpdate(scope.row)">
|
|
|
- {{ scope.row.fMblno }}
|
|
|
- </div></el-link
|
|
|
- >
|
|
|
- </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="200"
|
|
|
- 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-table-column type="selection" width="60" 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
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="item.label == 'fMblno'">
|
|
|
+ <el-link :underline="false" type="primary"
|
|
|
+ ><div @click="handleUpdate(scope.row)">
|
|
|
+ {{ scope.row.fMblno }}
|
|
|
+ </div></el-link
|
|
|
+ >
|
|
|
+ </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="200"
|
|
|
+ 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"
|
|
|
- v-if="
|
|
|
- scope.row.fBillstatus == '录入' ||
|
|
|
- scope.row.fBillstatus == '暂存' ||
|
|
|
- scope.row.fBillstatus == '驳回'
|
|
|
- "
|
|
|
- @click="handleUpdate(scope.row, false)"
|
|
|
- v-hasPermi="['warehouseBusiness:inStock:edit']"
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ v-if="
|
|
|
+ scope.row.fBillstatus == '录入' ||
|
|
|
+ scope.row.fBillstatus == '暂存' ||
|
|
|
+ scope.row.fBillstatus == '驳回'
|
|
|
+ "
|
|
|
+ @click="handleUpdate(scope.row, false)"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:edit']"
|
|
|
>修改
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- v-if="scope.row.fItemsStatus == '计划'"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['warehouseBusiness:inStock:remove']"
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-if="scope.row.fItemsStatus == '计划'"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['warehouseBusiness:inStock:remove']"
|
|
|
>删除
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- v-if="
|
|
|
- scope.row.fBillstatus == '请核' ||
|
|
|
- scope.row.fBillstatus == '审核中'
|
|
|
- "
|
|
|
- @click="handleUpdate(scope.row, true)"
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-if="
|
|
|
+ scope.row.fBillstatus == '请核' ||
|
|
|
+ scope.row.fBillstatus == '审核中'
|
|
|
+ "
|
|
|
+ @click="handleUpdate(scope.row, true)"
|
|
|
>审核进度
|
|
|
- </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-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
<add-or-update
|
|
|
v-show="pageShow2"
|
|
@@ -753,6 +756,20 @@ export default {
|
|
|
// 使用子组件
|
|
|
components: { draggable, AddOrUpdate },
|
|
|
created() {
|
|
|
+ let date = new Date();
|
|
|
+ let year = parseInt(date.getFullYear())
|
|
|
+ let month = parseInt(date.getMonth() + 1)
|
|
|
+ let currentMonth = date.getMonth()
|
|
|
+ let nextMonth = ++currentMonth
|
|
|
+ let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
|
+ let oneDay = 1000*60*60*24
|
|
|
+ let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
|
+ let day = lastTime.getDate()
|
|
|
+ if (day < 10) {
|
|
|
+ day = '0' + day
|
|
|
+ }
|
|
|
+ this.queryParams.timeInterval = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
|
+
|
|
|
this.setRowList = this.tableDate;
|
|
|
this.getRowList = this.tableDate;
|
|
|
this.getDicts("data_trademodes").then((response) => {
|
|
@@ -775,7 +792,6 @@ export default {
|
|
|
});
|
|
|
this.getRow();
|
|
|
this.getList();
|
|
|
- this.getMonth();
|
|
|
},
|
|
|
activated() {
|
|
|
if (this.$route.query.id) {
|
|
@@ -783,38 +799,32 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.setHeight();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // 根据浏览器高度设置初始高度
|
|
|
+ this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
|
|
|
+ // 监听浏览器高度变化,改变表格高度
|
|
|
+ window.onresize = () => {
|
|
|
+ this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取当前月的第一天和最后一天
|
|
|
- getMonth() {
|
|
|
- let date = new Date();
|
|
|
- let year = parseInt(date.getFullYear())
|
|
|
- let month = parseInt(date.getMonth() + 1)
|
|
|
- let currentMonth = date.getMonth()
|
|
|
- let nextMonth = ++currentMonth
|
|
|
- let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
|
- let oneDay = 1000*60*60*24
|
|
|
- let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
|
- let day = lastTime.getDate()
|
|
|
- if (day < 10) {
|
|
|
- day = '0' + day
|
|
|
- }
|
|
|
- this.queryParams.timeInterval = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
|
- },
|
|
|
- setHeight() {
|
|
|
- console.log(this.$refs.table.$el);
|
|
|
- const offsetTop = window.innerHeight - this.$refs.table.$el.offsetTop - 210
|
|
|
- const offsetBodyHeight = document.querySelector('.el-table__body').offsetHeight
|
|
|
- console.log(offsetTop, offsetBodyHeight)
|
|
|
- if (this.warehousebillsList.length && offsetBodyHeight < offsetTop) {
|
|
|
- this.tableHeight = offsetBodyHeight + 75
|
|
|
- } else if (!this.warehousebillsList.length) {
|
|
|
- this.tableHeight = null
|
|
|
- } else {
|
|
|
- this.tableHeight = offsetTop
|
|
|
- }
|
|
|
- },
|
|
|
+ // getMonth() {
|
|
|
+ // let date = new Date();
|
|
|
+ // let year = parseInt(date.getFullYear())
|
|
|
+ // let month = parseInt(date.getMonth() + 1)
|
|
|
+ // let currentMonth = date.getMonth()
|
|
|
+ // let nextMonth = ++currentMonth
|
|
|
+ // let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
|
+ // let oneDay = 1000*60*60*24
|
|
|
+ // let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
|
+ // let day = lastTime.getDate()
|
|
|
+ // if (day < 10) {
|
|
|
+ // day = '0' + day
|
|
|
+ // }
|
|
|
+ // this.queryParams.timeInterval = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
|
+ // },
|
|
|
//列设置全选
|
|
|
allChecked() {
|
|
|
if (this.allCheck == true) {
|
|
@@ -1088,3 +1098,6 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+</style>
|