jsk
This commit is contained in:
parent
525d80c384
commit
72e36d90c2
|
|
@ -17,11 +17,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点单号" prop="checkCode">
|
<el-form-item label="盘点单号" prop="checkCode">
|
||||||
<el-input v-model="queryParams.checkCode" placeholder="请输入盘点单号" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="queryParams.checkCode" placeholder="请输入盘点单号" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams.areaId"
|
<el-cascader v-model="queryParams.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'label'
|
value:'id',label:'label'
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
:label="item.warehouseName"
|
:label="item.warehouseName"
|
||||||
:value="item.warehouseId"
|
:value="item.warehouseId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -62,39 +62,39 @@
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="盘点单号" align="center" prop="checkCode" :show-overflow-tooltip="true" />
|
<el-table-column label="盘点单号" align="center" prop="checkCode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="盘点员" align="center" prop="firstCheckUserName" :show-overflow-tooltip="true" />
|
<el-table-column label="盘点员" align="center" prop="firstCheckUserName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="盘点开始时间" align="center" prop="firstCheckDate" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="盘点开始时间" align="center" prop="firstCheckDate" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="盘点结束时间" align="center" prop="secondCheckDate" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="盘点结束时间" align="center" prop="secondCheckDate" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="差异总数" align="center" prop="differNum" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="差异总数" align="center" prop="differNum" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="差异总额(元)" align="center" prop="totalProfitLoss" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="差异总额(元)" align="center" prop="differAmount" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.totalProfitLoss/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.differAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" width="120"/>
|
<!-- <el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/> -->
|
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/> -->
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==1"
|
icon="el-icon-edit" v-if="scope.row.status==1"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==2"
|
icon="el-icon-edit" v-if="scope.row.status==2"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete" v-if="scope.row.status==1"
|
icon="el-icon-delete" v-if="scope.row.status==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -126,9 +126,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
||||||
import { checkInventoryPageApi,delCheckInventoryApi } from "@/api/foodManage/stockManage";
|
import { checkInventoryPageApi,delCheckInventoryApi } from "@/api/foodManage/stockManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -153,11 +153,11 @@ export default {
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
treeAreaOptions:[],//区域树
|
treeAreaOptions:[],//区域树
|
||||||
wareHouseOptions:[],//仓库下拉选
|
wareHouseOptions:[],//仓库下拉选
|
||||||
|
|
@ -202,8 +202,8 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getAreaTreeData();
|
this.getAreaTreeData();
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
@ -211,18 +211,18 @@ export default {
|
||||||
//区域树
|
//区域树
|
||||||
getAreaTreeData() {
|
getAreaTreeData() {
|
||||||
systemAreaTreeApi({}).then((response) => {
|
systemAreaTreeApi({}).then((response) => {
|
||||||
this.treeAreaOptions = response.data;
|
this.treeAreaOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAreaChange(e){
|
handleAreaChange(e){
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
},
|
},
|
||||||
/** 查询货品下拉结构 */
|
/** 查询货品下拉结构 */
|
||||||
getWareHouseData() {
|
getWareHouseData() {
|
||||||
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
|
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
|
||||||
this.wareHouseOptions = response.rows||[];
|
this.wareHouseOptions = response.rows||[];
|
||||||
this.$set(this.queryParams,'warehouseId',null)
|
this.$set(this.queryParams,'warehouseId',null)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -230,7 +230,7 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = this.defaultDateRange()
|
this.dateRange = this.defaultDateRange()
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -243,12 +243,12 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"checkCode": this.queryParams.checkCode,
|
"checkCode": this.queryParams.checkCode,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
// "warehouseId": this.queryParams.warehouseId,
|
// "warehouseId": this.queryParams.warehouseId,
|
||||||
// "status": this.queryParams.status,
|
// "status": this.queryParams.status,
|
||||||
// "intoType": this.queryParams.intoType
|
// "intoType": this.queryParams.intoType
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
|
|
@ -257,23 +257,23 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
param.startTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
checkInventoryPageApi(param).then(response => {
|
checkInventoryPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit" });
|
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit" });
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.$router.push({ path: "/foodManage/stockManage/inventoryCountDetail",query: {countRowData:JSON.stringify(row)} });
|
this.$router.push({ path: "/foodManage/stockManage/inventoryCountDetail",query: {countRowData:JSON.stringify(row)} });
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit",query: {countRowData:JSON.stringify(row)} });
|
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit",query: {countRowData:JSON.stringify(row)} });
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
|
@ -285,7 +285,7 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
@ -307,7 +307,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delCheckInventoryApi({checkId:row.checkId});
|
return delCheckInventoryApi({checkId:row.checkId});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
@ -319,11 +319,11 @@ export default {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
||||||
const start = new Date((new Date().toLocaleDateString()));
|
const start = new Date((new Date().toLocaleDateString()));
|
||||||
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
||||||
this.start = parseInt(start.getTime() / 1000)
|
this.start = parseInt(start.getTime() / 1000)
|
||||||
this.end = parseInt(end.getTime() / 1000)
|
this.end = parseInt(end.getTime() / 1000)
|
||||||
return [start, end]
|
return [start, end]
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
@ -344,7 +344,7 @@ export default {
|
||||||
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue